From 6fefa45096cdfb4ddd479163d48017f046f1e138 Mon Sep 17 00:00:00 2001 From: erickgonzalez Date: Fri, 23 Feb 2024 10:02:44 -0600 Subject: [PATCH] #26519 include in 23.10.24 --- .../src/lib/block-editor.module.ts | 4 +- .../dot-block-editor.component.stories.ts | 9 +- .../ai-content-actions.component.scss | 4 +- .../ai-content-actions.component.spec.ts | 4 +- .../ai-content-actions.component.ts | 19 +-- .../ai-content-actions.extension.ts | 6 +- .../plugins/ai-content-actions.plugin.ts | 50 +++---- .../ai-content-prompt.component.html | 49 ++++--- .../ai-content-prompt.component.spec.ts | 4 +- .../ai-content-prompt.component.ts | 58 ++++---- .../ai-content-prompt.extension.ts | 4 +- .../plugins/ai-content-prompt.plugin.ts | 64 ++++++--- .../store/ai-content-prompt.store.spec.ts | 78 +++++++++++ .../store/ai-content-prompt.store.ts | 61 +++++++++ .../ai-image-prompt.component.spec.ts | 4 +- .../ai-image-prompt.component.ts | 4 +- .../plugins/ai-image-prompt.plugin.ts | 2 +- .../ai-content/ai-content.service.spec.ts | 26 ---- .../dot-ai-service.mock.ts} | 2 +- .../services/dot-ai/dot-ai.service.spec.ts | 127 ++++++++++++++++++ .../dot-ai.service.ts} | 34 +---- .../src/lib/shared/services/index.ts | 2 +- dotCMS/hotfix_tracking.md | 3 +- .../main/webapp/html/dotcms-block-editor.js | 2 +- 24 files changed, 426 insertions(+), 194 deletions(-) create mode 100644 core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.spec.ts create mode 100644 core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.ts delete mode 100644 core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.spec.ts rename core-web/libs/block-editor/src/lib/shared/services/{ai-content/ai-content.service.mock.ts => dot-ai/dot-ai-service.mock.ts} (98%) create mode 100644 core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.spec.ts rename core-web/libs/block-editor/src/lib/shared/services/{ai-content/ai-content.service.ts => dot-ai/dot-ai.service.ts} (73%) diff --git a/core-web/libs/block-editor/src/lib/block-editor.module.ts b/core-web/libs/block-editor/src/lib/block-editor.module.ts index 6d74032dda67..36a23d51eec2 100644 --- a/core-web/libs/block-editor/src/lib/block-editor.module.ts +++ b/core-web/libs/block-editor/src/lib/block-editor.module.ts @@ -25,7 +25,7 @@ import { AssetFormModule } from './extensions/asset-form/asset-form.module'; import { BubbleFormComponent } from './extensions/bubble-form/bubble-form.component'; import { FloatingButtonComponent } from './extensions/floating-button/floating-button.component'; import { ContentletBlockComponent } from './nodes'; -import { AiContentService, DotUploadFileService } from './shared'; +import { DotAiService, DotUploadFileService } from './shared'; import { EditorDirective } from './shared/directives'; import { PrimengModule } from './shared/primeng.module'; import { SharedModule } from './shared/shared.module'; @@ -58,7 +58,7 @@ import { SharedModule } from './shared/shared.module'; AIContentActionsComponent, AIImagePromptComponent ], - providers: [DotUploadFileService, LoggerService, StringUtils, AiContentService], + providers: [DotUploadFileService, LoggerService, StringUtils, DotAiService], exports: [ EditorDirective, BubbleMenuComponent, diff --git a/core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.stories.ts b/core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.stories.ts index 444635c55f54..c1f76454b4d1 100644 --- a/core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.stories.ts +++ b/core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.stories.ts @@ -22,7 +22,7 @@ import { } from '../../extensions'; import { ContentletBlockComponent } from '../../nodes'; import { - AiContentService, + DotAiService, ASSET_MOCK, CONTENTLETS_MOCK, DotLanguageService, @@ -32,7 +32,7 @@ import { SuggestionsComponent, SuggestionsService } from '../../shared'; -import { AiContentServiceMock } from '../../shared/services/ai-content/ai-content.service.mock'; +import { DotAiServiceMock } from '../../shared/services/dot-ai/dot-ai-service.mock'; export default { title: 'Library/Block Editor' @@ -182,9 +182,8 @@ export const primary = () => ({ } }, { - provide: AiContentService, - useClass: - process.env.USE_MIDDLEWARE === 'true' ? AiContentService : AiContentServiceMock + provide: DotAiService, + useClass: process.env.USE_MIDDLEWARE === 'true' ? DotAiService : DotAiServiceMock } ], // We need these here because they are dynamically rendered diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.scss b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.scss index 35c10c4475cd..15ea0786f2c1 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.scss +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.scss @@ -18,13 +18,13 @@ // regenerate option &:nth-child(2) { padding: $spacing-3; - background-color: $white !important; + background-color: $white; } // delete option &:last-child { border-top: 1px solid $color-palette-gray-300; - background-color: $white !important; + background-color: $white; } &:hover { diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.spec.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.spec.ts index d57c1cbe1968..49d9813e8791 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.spec.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { AIContentActionsComponent } from './ai-content-actions.component'; -import { AiContentService } from '../../shared'; +import { DotAiService } from '../../shared'; describe('AIContentActionsComponent', () => { let component: AIContentActionsComponent; @@ -14,7 +14,7 @@ describe('AIContentActionsComponent', () => { await TestBed.configureTestingModule({ imports: [ReactiveFormsModule, HttpClientTestingModule], declarations: [AIContentActionsComponent], - providers: [AiContentService] + providers: [DotAiService] }).compileComponents(); fixture = TestBed.createComponent(AIContentActionsComponent); diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.ts index c95252054764..244ca5c9eca5 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.component.ts @@ -1,8 +1,4 @@ -import { Observable } from 'rxjs'; - -import { Component, EventEmitter, Output, OnInit } from '@angular/core'; - -import { AiContentService } from '../../shared/services/ai-content/ai-content.service'; +import { Component, EventEmitter, Output, OnInit, ChangeDetectionStrategy } from '@angular/core'; interface ActionOption { label: string; @@ -20,7 +16,8 @@ export enum ACTIONS { @Component({ selector: 'dot-ai-content-actions', templateUrl: './ai-content-actions.component.html', - styleUrls: ['./ai-content-actions.component.scss'] + styleUrls: ['./ai-content-actions.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush }) export class AIContentActionsComponent implements OnInit { @Output() actionEmitter = new EventEmitter(); @@ -28,8 +25,6 @@ export class AIContentActionsComponent implements OnInit { actionOptions!: ActionOption[]; tooltipContent = 'Describe the size, color palette, style, mood, etc.'; - constructor(private aiContentService: AiContentService) {} - ngOnInit() { this.actionOptions = [ { @@ -56,12 +51,4 @@ export class AIContentActionsComponent implements OnInit { private emitAction(action: ACTIONS) { this.actionEmitter.emit(action); } - - getLatestContent(): string { - return this.aiContentService.getLatestContent(); - } - - getNewContent(contentType: string): Observable { - return this.aiContentService.getNewContent(contentType); - } } diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.extension.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.extension.ts index cb08d6738bac..20c206c497dd 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.extension.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/ai-content-actions.extension.ts @@ -17,7 +17,7 @@ export interface AIContentActionsOptions { declare module '@tiptap/core' { interface Commands { AIContentActions: { - openAIContentActions: () => ReturnType; + openAIContentActions: (nodeType: string) => ReturnType; closeAIContentActions: () => ReturnType; }; } @@ -40,11 +40,11 @@ export const AIContentActionsExtension = (viewContainerRef: ViewContainerRef) => addCommands() { return { openAIContentActions: - () => + (nodeType) => ({ chain }) => { return chain() .command(({ tr }) => { - tr.setMeta(AI_CONTENT_ACTIONS_PLUGIN_KEY, { open: true }); + tr.setMeta(AI_CONTENT_ACTIONS_PLUGIN_KEY, { open: true, nodeType }); return true; }) diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/plugins/ai-content-actions.plugin.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/plugins/ai-content-actions.plugin.ts index 198b7c44daf7..41c0ef32889f 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/plugins/ai-content-actions.plugin.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-actions/plugins/ai-content-actions.plugin.ts @@ -10,6 +10,8 @@ import { takeUntil } from 'rxjs/operators'; import { Editor } from '@tiptap/core'; +import { DOT_AI_TEXT_CONTENT_KEY } from '../../ai-content-prompt/ai-content-prompt.extension'; +import { AiContentPromptStore } from '../../ai-content-prompt/store/ai-content-prompt.store'; import { ACTIONS, AIContentActionsComponent } from '../ai-content-actions.component'; import { AI_CONTENT_ACTIONS_PLUGIN_KEY } from '../ai-content-actions.extension'; import { TIPPY_OPTIONS } from '../utils'; @@ -23,6 +25,7 @@ interface AIContentActionsProps { } interface PluginState { + nodeType: string; open: boolean; } @@ -47,6 +50,8 @@ export class AIContentActionsView { public component: ComponentRef; + private aiContentPromptStore: AiContentPromptStore; + private destroy$ = new Subject(); constructor(props: AIContentActionsViewProps) { @@ -62,6 +67,10 @@ export class AIContentActionsView { this.pluginKey = pluginKey; this.component = component; + // Reference of stores available ROOT through the Angular component. + //TODO: Add the reference of the image store. + this.aiContentPromptStore = this.component.injector.get(AiContentPromptStore); + this.component.instance.actionEmitter.pipe(takeUntil(this.destroy$)).subscribe((action) => { switch (action) { case ACTIONS.ACCEPT: @@ -82,33 +91,27 @@ export class AIContentActionsView { } private acceptContent() { + const pluginState: PluginState = this.pluginKey?.getState(this.view.state); this.editor.commands.closeAIContentActions(); - const content = this.component.instance.getLatestContent(); - this.editor.commands.insertContent(content); + //TODO: add the image case to the add content. + switch (pluginState.nodeType) { + case DOT_AI_TEXT_CONTENT_KEY: + this.aiContentPromptStore.setAcceptContent(true); + break; + } } private generateContent() { - const nodeType = this.getNodeType(); + const pluginState: PluginState = this.pluginKey?.getState(this.view.state); this.editor.commands.closeAIContentActions(); - this.component.instance.getNewContent(nodeType).subscribe((newContent) => { - if (newContent) { - this.editor.commands.deleteSelection(); - this.editor.commands.insertAINode(newContent); - this.editor.commands.openAIContentActions(); - } - }); - } - - private getNodeType() { - const { state } = this.editor.view; - const { doc, selection } = state; - const { ranges } = selection; - const from = Math.min(...ranges.map((range) => range.$from.pos)); - const node = doc?.nodeAt(from); - - return node.type.name; + //TODO: add the image case to the re-generate content. + switch (pluginState.nodeType) { + case DOT_AI_TEXT_CONTENT_KEY: + this.aiContentPromptStore.reGenerateContent(); + break; + } } private deleteContent() { @@ -176,7 +179,8 @@ export const aiContentActionsPlugin = (options: AIContentActionsProps) => { state: { init(): PluginState { return { - open: false + open: false, + nodeType: null }; }, @@ -185,11 +189,11 @@ export const aiContentActionsPlugin = (options: AIContentActionsProps) => { value: PluginState, oldState: EditorState ): PluginState { - const { open } = transaction.getMeta(AI_CONTENT_ACTIONS_PLUGIN_KEY) || {}; + const { open, nodeType } = transaction.getMeta(AI_CONTENT_ACTIONS_PLUGIN_KEY) || {}; const state = AI_CONTENT_ACTIONS_PLUGIN_KEY?.getState(oldState); if (typeof open === 'boolean') { - return { open }; + return { open, nodeType }; } return state || value; diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.html b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.html index 290636044acd..99e7a1631538 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.html +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.html @@ -1,27 +1,26 @@ -
- - + + + + - - Pending - + + Pending + - - - - - + + + +
+ + diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.spec.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.spec.ts index 572f4ad377ae..191d496c6433 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.spec.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { AIContentPromptComponent } from './ai-content-prompt.component'; -import { AiContentService } from '../../shared'; +import { DotAiService } from '../../shared'; describe('AIContentPromptComponent', () => { let component: AIContentPromptComponent; @@ -14,7 +14,7 @@ describe('AIContentPromptComponent', () => { await TestBed.configureTestingModule({ imports: [ReactiveFormsModule, HttpClientTestingModule], declarations: [AIContentPromptComponent], - providers: [AiContentService] + providers: [DotAiService] }).compileComponents(); fixture = TestBed.createComponent(AIContentPromptComponent); diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.ts index 191134df0605..fea0497d0372 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.component.ts @@ -1,11 +1,18 @@ -import { of } from 'rxjs'; - -import { Component, ElementRef, EventEmitter, Output, ViewChild } from '@angular/core'; +import { Observable, Subject } from 'rxjs'; + +import { + ChangeDetectionStrategy, + Component, + ElementRef, + OnDestroy, + OnInit, + ViewChild +} from '@angular/core'; import { FormGroup, FormControl, Validators } from '@angular/forms'; -import { catchError } from 'rxjs/operators'; +import { takeUntil } from 'rxjs/operators'; -import { AiContentService } from '../../shared/services/ai-content/ai-content.service'; +import { AiContentPromptState, AiContentPromptStore } from './store/ai-content-prompt.store'; interface AIContentForm { textPrompt: FormControl; @@ -14,42 +21,37 @@ interface AIContentForm { @Component({ selector: 'dot-ai-content-prompt', templateUrl: './ai-content-prompt.component.html', - styleUrls: ['./ai-content-prompt.component.scss'] + styleUrls: ['./ai-content-prompt.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush }) -export class AIContentPromptComponent { - isFormSubmitting = false; +export class AIContentPromptComponent implements OnInit, OnDestroy { + vm$: Observable = this.aiContentPromptStore.vm$; + private destroy$: Subject = new Subject(); @ViewChild('input') private input: ElementRef; - @Output() formSubmission = new EventEmitter(); - @Output() aiResponse = new EventEmitter(); form: FormGroup = new FormGroup({ textPrompt: new FormControl('', Validators.required) }); - constructor(private aiContentService: AiContentService) {} + constructor(private readonly aiContentPromptStore: AiContentPromptStore) {} + + ngOnInit() { + this.aiContentPromptStore.open$.pipe(takeUntil(this.destroy$)).subscribe((open) => { + open ? this.input.nativeElement.focus() : this.form.reset(); + }); + } + + ngOnDestroy(): void { + this.destroy$.next(true); + this.destroy$.complete(); + } onSubmit() { - this.isFormSubmitting = true; const textPrompt = this.form.value.textPrompt; if (textPrompt) { - this.aiContentService - .generateContent(textPrompt) - .pipe(catchError(() => of(null))) - .subscribe((response) => { - this.isFormSubmitting = false; - this.formSubmission.emit(true); - this.aiResponse.emit(response); - }); + this.aiContentPromptStore.generateContent(textPrompt); } } - - cleanForm() { - this.form.reset(); - } - - focusField() { - this.input.nativeElement.focus(); - } } diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.extension.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.extension.ts index 8f0919aa29bb..f9aa3c08bccb 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.extension.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/ai-content-prompt.extension.ts @@ -23,7 +23,9 @@ declare module '@tiptap/core' { } } -export const AI_CONTENT_PROMPT_PLUGIN_KEY = new PluginKey('aiContentPrompt-form'); +export const DOT_AI_TEXT_CONTENT_KEY = 'dotAITextContent'; + +export const AI_CONTENT_PROMPT_PLUGIN_KEY = new PluginKey(DOT_AI_TEXT_CONTENT_KEY); export const AIContentPromptExtension = (viewContainerRef: ViewContainerRef) => { return Extension.create({ diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/plugins/ai-content-prompt.plugin.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/plugins/ai-content-prompt.plugin.ts index 8189ec9374cf..e32dec5e0efa 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/plugins/ai-content-prompt.plugin.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/plugins/ai-content-prompt.plugin.ts @@ -6,12 +6,16 @@ import tippy, { Instance, Props } from 'tippy.js'; import { ComponentRef } from '@angular/core'; -import { takeUntil } from 'rxjs/operators'; +import { filter, takeUntil } from 'rxjs/operators'; import { Editor } from '@tiptap/core'; import { AIContentPromptComponent } from '../ai-content-prompt.component'; -import { AI_CONTENT_PROMPT_PLUGIN_KEY } from '../ai-content-prompt.extension'; +import { + AI_CONTENT_PROMPT_PLUGIN_KEY, + DOT_AI_TEXT_CONTENT_KEY +} from '../ai-content-prompt.extension'; +import { AiContentPromptStore } from '../store/ai-content-prompt.store'; import { TIPPY_OPTIONS } from '../utils'; interface AIContentPromptProps { @@ -24,7 +28,6 @@ interface AIContentPromptProps { interface PluginState { open: boolean; - form: []; } export type AIContentPromptViewProps = AIContentPromptProps & { @@ -48,6 +51,8 @@ export class AIContentPromptView { public component: ComponentRef; + private componentStore: AiContentPromptStore; + private destroy$ = new Subject(); constructor(props: AIContentPromptViewProps) { @@ -63,14 +68,39 @@ export class AIContentPromptView { this.pluginKey = pluginKey; this.component = component; - this.component.instance.formSubmission.pipe(takeUntil(this.destroy$)).subscribe(() => { - this.editor.commands.closeAIPrompt(); - }); - - this.component.instance.aiResponse.pipe(takeUntil(this.destroy$)).subscribe((content) => { - this.editor.commands.insertAINode(content); - this.editor.commands.openAIContentActions(); - }); + this.componentStore = this.component.injector.get(AiContentPromptStore); + + /** + * Subscription to insert the AI Node and open the AI Content Actions. + */ + this.componentStore.content$ + .pipe( + takeUntil(this.destroy$), + filter((content) => !!content) + ) + .subscribe((content) => { + this.editor + .chain() + .closeAIPrompt() + .deleteSelection() + .insertAINode(content) + .openAIContentActions(DOT_AI_TEXT_CONTENT_KEY) + .run(); + }); + + /** + * Subscription to insert the text Content once accepted the generated content. + * Fired from the AI Content Actions plugin. + */ + this.componentStore.vm$ + .pipe( + takeUntil(this.destroy$), + filter((state) => state.acceptContent) + ) + .subscribe((state) => { + this.editor.commands.insertContent(state.content); + this.componentStore.setAcceptContent(false); + }); } update(view: EditorView, prevState?: EditorState) { @@ -84,7 +114,7 @@ export class AIContentPromptView { } if (!next.open) { - this.component.instance.cleanForm(); + this.componentStore.setOpen(true); } this.createTooltip(); @@ -115,11 +145,12 @@ export class AIContentPromptView { show() { this.tippy?.show(); - this.component.instance.focusField(); + this.componentStore.setOpen(true); } hide() { this.tippy?.hide(); + this.componentStore.setOpen(false); this.editor.view.focus(); } @@ -137,8 +168,7 @@ export const aiContentPromptPlugin = (options: AIContentPromptProps) => { state: { init(): PluginState { return { - open: false, - form: [] + open: false }; }, @@ -147,11 +177,11 @@ export const aiContentPromptPlugin = (options: AIContentPromptProps) => { value: PluginState, oldState: EditorState ): PluginState { - const { open, form } = transaction.getMeta(AI_CONTENT_PROMPT_PLUGIN_KEY) || {}; + const { open } = transaction.getMeta(AI_CONTENT_PROMPT_PLUGIN_KEY) || {}; const state = AI_CONTENT_PROMPT_PLUGIN_KEY.getState(oldState); if (typeof open === 'boolean') { - return { open, form }; + return { open }; } // keep the old state in case we do not receive a new one. diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.spec.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.spec.ts new file mode 100644 index 000000000000..9ff90fef8176 --- /dev/null +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.spec.ts @@ -0,0 +1,78 @@ +import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; +import { of } from 'rxjs'; + +import { AiContentPromptStore } from './ai-content-prompt.store'; + +import { DotAiService } from '../../../shared'; + +describe('AiContentPromptStore', () => { + let spectator: SpectatorService; + let store: AiContentPromptStore; + let dotAiService: jest.Mocked; + + const createStoreService = createServiceFactory({ + service: AiContentPromptStore, + mocks: [DotAiService] + }); + + beforeEach(() => { + spectator = createStoreService(); + store = spectator.service; + dotAiService = spectator.inject(DotAiService) as jest.Mocked; + }); + + it('should set open state', (done) => { + spectator.service.setOpen(true); + store.state$.subscribe((state) => { + expect(state.open).toBe(true); + done(); + }); + }); + + it('should set acceptContent state', (done) => { + spectator.service.setAcceptContent(true); + store.state$.subscribe((state) => { + expect(state.acceptContent).toBe(true); + done(); + }); + }); + + it('should call dotAiService.generateContent and update state', (done) => { + const prompt = 'test prompt'; + const content = 'generated content'; + + // Mock dotAiService.generateContent to return a known observable + dotAiService.generateContent.mockReturnValue(of(content)); + + // Trigger the effect + spectator.service.generateContent(of(prompt)); + + // Check if state is updated correctly + store.state$.subscribe((state) => { + expect(state.loading).toBe(false); + expect(state.content).toBe(content); + done(); + }); + }); + + it('should reGenerateContent using the last prompt', (done) => { + const state = spectator.service['state']; + const lastPrompt = 'last prompt'; + const content = 'generated content'; + + // Set the prompt to a known value + spectator.service.setState({ ...state, prompt: lastPrompt }); + + // Mock the generateContent method of DotAiService + dotAiService.generateContent.mockReturnValue(of(content)); + + // Trigger the reGenerateContent method + store.reGenerateContent(); + + store.state$.subscribe((state) => { + expect(state.content).toBe(content); + expect(dotAiService.generateContent).toHaveBeenCalledWith(lastPrompt); + done(); + }); + }); +}); diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.ts new file mode 100644 index 000000000000..fdf1adab5d92 --- /dev/null +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.ts @@ -0,0 +1,61 @@ +import { ComponentStore } from '@ngrx/component-store'; +import { Observable, of } from 'rxjs'; + +import { Injectable } from '@angular/core'; + +import { catchError, switchMap, tap } from 'rxjs/operators'; + +import { DotAiService } from '../../../shared'; + +export interface AiContentPromptState { + prompt: string; + loading: boolean; + content: string; + open: boolean; + acceptContent: boolean; +} + +@Injectable({ + providedIn: 'root' +}) +export class AiContentPromptStore extends ComponentStore { + constructor(private dotAiService: DotAiService) { + super({ prompt: '', loading: false, content: '', open: false, acceptContent: false }); + } + + //Selectors + readonly prompt$ = this.select((state) => state.prompt); + readonly content$ = this.select((state) => state.content); + readonly open$ = this.select((state) => state.open); + readonly vm$ = this.select((state) => state); + + //Updaters + readonly setOpen = this.updater((state, open: boolean) => ({ ...state, open })); + readonly setAcceptContent = this.updater((state, acceptContent: boolean) => ({ + ...state, + acceptContent + })); + + // Effects + readonly generateContent = this.effect((prompt$: Observable) => { + return prompt$.pipe( + switchMap((prompt) => { + this.patchState({ loading: true, prompt }); + + return this.dotAiService.generateContent(prompt).pipe( + tap((content) => this.patchState({ loading: false, content })), + catchError(() => of(null)) + ); + }) + ); + }); + + /** + * Use the last prompt to generate content + * @returns void + * @memberof AiContentPromptStore + */ + reGenerateContent() { + this.generateContent(this.prompt$); + } +} diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.component.spec.ts b/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.component.spec.ts index 2c731c999a6f..751022633036 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.component.spec.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.component.spec.ts @@ -4,7 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { AIImagePromptComponent } from './ai-image-prompt.component'; -import { AiContentService } from '../../shared'; +import { DotAiService } from '../../shared'; describe('AIImagePromptComponent', () => { let component: AIImagePromptComponent; @@ -14,7 +14,7 @@ describe('AIImagePromptComponent', () => { await TestBed.configureTestingModule({ imports: [ReactiveFormsModule, HttpClientTestingModule], declarations: [AIImagePromptComponent], - providers: [AiContentService] + providers: [DotAiService] }).compileComponents(); fixture = TestBed.createComponent(AIImagePromptComponent); diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.component.ts b/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.component.ts index 04400896a37d..1b7a228f04b7 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.component.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.component.ts @@ -5,7 +5,7 @@ import { FormBuilder, Validators } from '@angular/forms'; import { catchError, switchMap } from 'rxjs/operators'; -import { AiContentService } from '../../shared/services/ai-content/ai-content.service'; +import { DotAiService } from '../../shared/services/dot-ai/dot-ai.service'; @Component({ selector: 'dot-ai-image-prompt', @@ -25,7 +25,7 @@ export class AIImagePromptComponent { @Output() formSubmission = new EventEmitter(); @Output() aiResponse = new EventEmitter(); - constructor(private fb: FormBuilder, private aiContentService: AiContentService) {} + constructor(private fb: FormBuilder, private aiContentService: DotAiService) {} onSubmit() { this.isFormSubmitting = true; diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/plugins/ai-image-prompt.plugin.ts b/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/plugins/ai-image-prompt.plugin.ts index 94fcb3eb81d7..97b69f17b228 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/plugins/ai-image-prompt.plugin.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/plugins/ai-image-prompt.plugin.ts @@ -80,7 +80,7 @@ export class AIImagePromptView { if (data) { // eslint-disable-next-line @typescript-eslint/no-explicit-any this.editor.commands.insertImage(data as any); - this.editor.commands.openAIContentActions(); + this.editor.commands.openAIContentActions('image'); } }); } diff --git a/core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.spec.ts b/core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.spec.ts deleted file mode 100644 index b1b48abcd22a..000000000000 --- a/core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { TestBed } from '@angular/core/testing'; - -import { AiContentService } from './ai-content.service'; - -describe('AiContentService', () => { - let service: AiContentService; - let httpMock: HttpTestingController; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule], - providers: [AiContentService] - }); - service = TestBed.inject(AiContentService); - httpMock = TestBed.inject(HttpTestingController); - }); - - afterEach(() => { - httpMock.verify(); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.mock.ts b/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai-service.mock.ts similarity index 98% rename from core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.mock.ts rename to core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai-service.mock.ts index 43556c85ec77..e7435cdfda4e 100644 --- a/core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.mock.ts +++ b/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai-service.mock.ts @@ -1,6 +1,6 @@ import { Observable, of } from 'rxjs'; -export class AiContentServiceMock { +export class DotAiServiceMock { getIAContent(): Observable { return of( ` diff --git a/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.spec.ts b/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.spec.ts new file mode 100644 index 000000000000..7dae8a9419b5 --- /dev/null +++ b/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.spec.ts @@ -0,0 +1,127 @@ +import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; + +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; + +import { DotCMSContentlet } from '@dotcms/dotcms-models'; + +import { DotAiService } from './dot-ai.service'; + +describe('DotAiService', () => { + let spectator: SpectatorService; + let httpTestingController: HttpTestingController; + + const createService = createServiceFactory({ + service: DotAiService, + imports: [HttpClientTestingModule] + }); + + beforeEach(() => { + spectator = createService(); + httpTestingController = spectator.inject(HttpTestingController); + }); + + it('should generate content', () => { + const mockPrompt = 'Test prompt'; + const mockResponse = 'Test response'; + + spectator.service.generateContent(mockPrompt).subscribe((response) => { + expect(response).toEqual(mockResponse); + }); + + const req = httpTestingController.expectOne('/api/v1/ai/text/generate'); + + expect(req.request.method).toEqual('POST'); + expect(JSON.parse(req.request.body)).toEqual({ prompt: mockPrompt }); + + req.flush({ response: mockResponse }); + }); + + it('should handle errors while generating content', () => { + const mockPrompt = 'Test prompt'; + + spectator.service.generateContent(mockPrompt).subscribe( + () => fail('Expected an error, but received a response'), + (error) => { + expect(error).toBe('Error fetching AI content'); + } + ); + + const req = httpTestingController.expectOne('/api/v1/ai/text/generate'); + + req.flush(null, { status: 500, statusText: 'Server Error' }); + }); + + it('should generate image', () => { + const mockPrompt = 'Test prompt'; + const mockResponse = 'Test response'; + + spectator.service.generateImage(mockPrompt).subscribe((response) => { + expect(response).toEqual(mockResponse); + }); + + const req = httpTestingController.expectOne('/api/v1/ai/image/generate'); + + expect(req.request.method).toEqual('POST'); + expect(JSON.parse(req.request.body)).toEqual({ prompt: mockPrompt }); + + req.flush({ response: mockResponse }); + }); + + it('should handle errors while generating image', () => { + const mockPrompt = 'Test prompt'; + + spectator.service.generateImage(mockPrompt).subscribe( + () => fail('Expected an error, but received a response'), + (error) => { + expect(error).toBe('Error fetching AI content'); + } + ); + + const req = httpTestingController.expectOne('/api/v1/ai/image/generate'); + + req.flush(null, { status: 500, statusText: 'Server Error' }); + }); + + it('should create and publish contentlet', () => { + const mockFileId = '123'; + const mockResponse = ['contentlet'] as unknown as DotCMSContentlet[]; + + spectator.service.createAndPublishContentlet(mockFileId).subscribe((response) => { + expect(response).toEqual(mockResponse); + }); + + const req = httpTestingController.expectOne( + '/api/v1/workflow/actions/default/fire/PUBLISH' + ); + + expect(req.request.method).toEqual('POST'); + expect(JSON.parse(req.request.body)).toEqual({ + contentlets: [ + { + contentType: 'dotAsset', + asset: mockFileId, + hostFolder: '', + indexPolicy: 'WAIT_FOR' + } + ] + }); + req.flush({ entity: { results: mockResponse } }); + }); + + it('should handle errors while creating and publishing contentlet', () => { + const mockFileId = '123'; + + spectator.service.createAndPublishContentlet(mockFileId).subscribe( + () => fail('Expected an error, but received a response'), + (error) => { + expect(error).toBe('Test Error'); + } + ); + + const req = httpTestingController.expectOne( + '/api/v1/workflow/actions/default/fire/PUBLISH' + ); + + req.flush(null, { status: 500, statusText: 'Test Error' }); + }); +}); diff --git a/core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.ts b/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.ts similarity index 73% rename from core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.ts rename to core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.ts index e498e4540945..00f82ebe32e2 100644 --- a/core-web/libs/block-editor/src/lib/shared/services/ai-content/ai-content.service.ts +++ b/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.ts @@ -13,24 +13,10 @@ interface OpenAIResponse { response: string; } @Injectable() -export class AiContentService { - private lastUsedPrompt: string | null = null; - private lastImagePrompt: string | null = null; - private lastContentResponse: string | null = null; - +export class DotAiService { constructor(private http: HttpClient) {} - getLastUsedPrompt(): string | null { - return this.lastUsedPrompt; - } - - getLastContentResponse(): string | null { - return this.lastContentResponse; - } - generateContent(prompt: string): Observable { - this.lastUsedPrompt = prompt; - const url = '/api/v1/ai/text/generate'; const body = JSON.stringify({ prompt @@ -45,8 +31,6 @@ export class AiContentService { return throwError('Error fetching AI content'); }), map(({ response }) => { - this.lastContentResponse = response; - return response; }) ); @@ -67,27 +51,11 @@ export class AiContentService { return throwError('Error fetching AI content'); }), map(({ response }) => { - this.lastContentResponse = response; - return response; }) ); } - getLatestContent() { - return this.lastContentResponse; - } - - getNewContent(contentType: string): Observable { - if (contentType === 'aiContent') { - return this.generateContent(this.lastUsedPrompt); - } - - if (contentType === 'dotImage') { - return this.generateImage(this.lastImagePrompt); - } - } - createAndPublishContentlet(fileId: string): Observable { const contentlets = [ { diff --git a/core-web/libs/block-editor/src/lib/shared/services/index.ts b/core-web/libs/block-editor/src/lib/shared/services/index.ts index befd29a0e12f..57be502f8713 100644 --- a/core-web/libs/block-editor/src/lib/shared/services/index.ts +++ b/core-web/libs/block-editor/src/lib/shared/services/index.ts @@ -3,4 +3,4 @@ export * from './dot-marketing-config/dot-marketing-config.service'; export * from './dot-upload-file/dot-upload-file.service'; export * from './search/search.service'; export * from './suggestions/suggestions.service'; -export * from './ai-content/ai-content.service'; +export * from './dot-ai/dot-ai.service'; diff --git a/dotCMS/hotfix_tracking.md b/dotCMS/hotfix_tracking.md index e873ebb8dc8c..70b8762ff3ce 100644 --- a/dotCMS/hotfix_tracking.md +++ b/dotCMS/hotfix_tracking.md @@ -50,4 +50,5 @@ This maintenance release includes the following code fixes: 43. https://github.com/dotCMS/core/issues/22921 : Workflow API unable to archive contentlet #22921 44. https://github.com/dotCMS/core/issues/26521 : [UI] Create a Middleware to use Storybook with dotCMS #26521 45. https://github.com/dotCMS/core/issues/26657 : [UI] - Update the endpoints used by the extensions with the new URLS #26657 -46. https://github.com/dotCMS/core/issues/26664 : [UI] Setup a flag to use the middleware in storybook #26664 \ No newline at end of file +46. https://github.com/dotCMS/core/issues/26664 : [UI] Setup a flag to use the middleware in storybook #26664 +47. https://github.com/dotCMS/core/issues/26519 : [UI] Review AIContentPromptExtension #26519 \ No newline at end of file diff --git a/dotCMS/src/main/webapp/html/dotcms-block-editor.js b/dotCMS/src/main/webapp/html/dotcms-block-editor.js index b7bb687e1367..3bd7b892b4a0 100644 --- a/dotCMS/src/main/webapp/html/dotcms-block-editor.js +++ b/dotCMS/src/main/webapp/html/dotcms-block-editor.js @@ -1 +1 @@ -var runtime=function(c){"use strict";var l,M=Object.prototype,p=M.hasOwnProperty,w=Object.defineProperty||function(r,t,e){r[t]=e.value},O="function"==typeof Symbol?Symbol:{},L=O.iterator||"@@iterator",z=O.asyncIterator||"@@asyncIterator",_=O.toStringTag||"@@toStringTag";function v(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{v({},"")}catch{v=function(t,e,o){return t[e]=o}}function R(r,t,e,o){var i=Object.create((t&&t.prototype instanceof j?t:j).prototype),a=new I(o||[]);return w(i,"_invoke",{value:H(r,e,a)}),i}function k(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(o){return{type:"throw",arg:o}}}c.wrap=R;var Y="suspendedStart",q="executing",b="completed",s={};function j(){}function S(){}function d(){}var N={};v(N,L,function(){return this});var T=Object.getPrototypeOf,E=T&&T(T(A([])));E&&E!==M&&p.call(E,L)&&(N=E);var g=d.prototype=j.prototype=Object.create(N);function D(r){["next","throw","return"].forEach(function(t){v(r,t,function(e){return this._invoke(t,e)})})}function G(r,t){function e(i,a,u,h){var f=k(r[i],r,a);if("throw"!==f.type){var C=f.arg,m=C.value;return m&&"object"==typeof m&&p.call(m,"__await")?t.resolve(m.__await).then(function(y){e("next",y,u,h)},function(y){e("throw",y,u,h)}):t.resolve(m).then(function(y){C.value=y,u(C)},function(y){return e("throw",y,u,h)})}h(f.arg)}var o;w(this,"_invoke",{value:function n(i,a){function u(){return new t(function(h,f){e(i,a,h,f)})}return o=o?o.then(u,u):u()}})}function H(r,t,e){var o=Y;return function(i,a){if(o===q)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return $()}for(e.method=i,e.arg=a;;){var u=e.delegate;if(u){var h=W(u,e);if(h){if(h===s)continue;return h}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===Y)throw o=b,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=q;var f=k(r,t,e);if("normal"===f.type){if(o=e.done?b:"suspendedYield",f.arg===s)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=b,e.method="throw",e.arg=f.arg)}}}function W(r,t){var e=t.method,o=r.iterator[e];if(o===l)return t.delegate=null,"throw"===e&&r.iterator.return&&(t.method="return",t.arg=l,W(r,t),"throw"===t.method)||"return"!==e&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),s;var n=k(o,r.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,s;var i=n.arg;return i?i.done?(t[r.resultName]=i.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=l),t.delegate=null,s):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function J(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function P(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(J,this),this.reset(!0)}function A(r){if(r){var t=r[L];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var e=-1,o=function n(){for(;++e=0;--o){var n=this.tryEntries[o],i=n.completion;if("root"===n.tryLoc)return e("end");if(n.tryLoc<=this.prev){var a=p.call(n,"catchLoc"),u=p.call(n,"finallyLoc");if(a&&u){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),P(e),s}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var o=e.completion;if("throw"===o.type){var n=o.arg;P(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:A(r),resultName:t,nextLoc:e},"next"===this.method&&(this.arg=l),s}},c}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch{"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}(()=>{"use strict";var e,_={},v={};function r(e){var n=v[e];if(void 0!==n)return n.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return _[e](t,t.exports,r),t.loaded=!0,t.exports}r.m=_,e=[],r.O=(n,t,o,f)=>{if(!t){var a=1/0;for(i=0;i=f)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(l=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[t,o,f]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},(()=>{var n,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,o){if(1&o&&(t=this(t)),8&o||"object"==typeof t&&t&&(4&o&&t.__esModule||16&o&&"function"==typeof t.then))return t;var f=Object.create(null);r.r(f);var i={};n=n||[null,e({}),e([]),e(e)];for(var a=2&o&&t;"object"==typeof a&&!~n.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(l=>i[l]=()=>t[l]);return i.default=()=>t,r.d(f,i),f}})(),r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(8592===e?"common":e)+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="dotcms-block-editor:";r.l=(t,o,f,i)=>{if(e[t])e[t].push(o);else{var a,l;if(void 0!==f)for(var d=document.getElementsByTagName("script"),s=0;s{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(m=>m(b)),g)return g(b)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={3666:0};r.f.j=(o,f)=>{var i=r.o(e,o)?e[o]:void 0;if(0!==i)if(i)f.push(i[2]);else if(3666!=o){var a=new Promise((c,u)=>i=e[o]=[c,u]);f.push(i[2]=a);var l=r.p+r.u(o),d=new Error;r.l(l,c=>{if(r.o(e,o)&&(0!==(i=e[o])&&(e[o]=void 0),i)){var u=c&&("load"===c.type?"missing":c.type),p=c&&c.target&&c.target.src;d.message="Loading chunk "+o+" failed.\n("+u+": "+p+")",d.name="ChunkLoadError",d.type=u,d.request=p,i[1](d)}},"chunk-"+o,o)}else e[o]=0},r.O.j=o=>0===e[o];var n=(o,f)=>{var d,s,[i,a,l]=f,c=0;if(i.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(l)var u=l(r)}for(o&&o(f);c{"use strict";ge(88583),ge(30757)},30757:()=>{!function(X,oe){"use strict";function ge(){var e=Ue.splice(0,Ue.length);for(F=0;e.length;)e.shift().call(null,e.shift())}function ye(e,r){for(var i=0,h=e.length;i1)&&tt(this)}}}),x(o,pe,{value:function(p){-1>0,de="__"+se+dt,be="addEventListener",Le="attached",ce="Callback",me="detached",te="extends",pe="attributeChanged"+ce,vt=Le+ce,rt="connected"+ce,mt="disconnected"+ce,ze="created"+ce,kt=me+ce,ot="ADDITION",pt="REMOVAL",Oe="DOMAttrModified",bt="DOMContentLoaded",Et="DOMSubtreeModified",qe="<",st="=",Mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,wt=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],He=[],We=[],le="",De=A.documentElement,Ee=He.indexOf||function(e){for(var r=this.length;r--&&this[r]!==e;);return r},it=ne.prototype,Pe=it.hasOwnProperty,at=it.isPrototypeOf,Re=ne.defineProperty,Ne=[],Xe=ne.getOwnPropertyDescriptor,Y=ne.getOwnPropertyNames,Ct=ne.getPrototypeOf,Ye=ne.setPrototypeOf,Se=!!ne.__proto__,$e="__dreCEv1",Me=X.customElements,t=!/^force/.test(oe.type)&&!!(Me&&Me.define&&Me.get&&Me.whenDefined),a=ne.create||ne,u=X.Map||function(){var e,r=[],i=[];return{get:function(h){return i[Ee.call(r,h)]},set:function(h,s){(e=Ee.call(r,h))<0?i[r.push(h)-1]=s:i[e]=s}}},c=X.Promise||function(e){function r(o){for(h=!0;i.length;)i.shift()(o)}var i=[],h=!1,s={catch:function(){return s},then:function(o){return i.push(o),h&&setTimeout(r,1),s}};return e(r),s},f=!1,m=a(null),E=a(null),v=new u,C=function(e){return e.toLowerCase()},w=ne.create||function e(r){return r?(e.prototype=r,new e):this},b=Ye||(Se?function(e,r){return e.__proto__=r,e}:Y&&Xe?function(){function e(r,i){for(var h,s=Y(i),o=0,l=s.length;o
",new H(function(e,r){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var i=(Ce=Xe(P,"innerHTML"))&&Ce.set;i&&Re(P,"innerHTML",{set:function(h){for(;this.lastChild;)this.removeChild(this.lastChild);i.call(this,h)}})}r.disconnect(),Ce=null}).observe(Ce,{childList:!0,subtree:!0}),Ce.innerHTML=""),ue||(Ye||Se?(we=function(e,r){at.call(r,e)||Fe(e,r)},ae=Fe):(we=function(e,r){e[de]||(e[de]=ne(!0),Fe(e,r))},ae=we),G?(I=!1,e=Xe(P,be),r=e.value,i=function(o){var l=new CustomEvent(Oe,{bubbles:!0});l.attrName=o,l.prevValue=R.call(this,o),l.newValue=null,l[pt]=l.attrChange=2,V.call(this,o),$.call(this,l)},h=function(o,l){var d=Q.call(this,o),p=d&&R.call(this,o),y=new CustomEvent(Oe,{bubbles:!0});K.call(this,o,l),y.attrName=o,y.prevValue=d?p:null,y.newValue=l,d?y.MODIFICATION=y.attrChange=1:y[ot]=y.attrChange=0,$.call(this,y)},s=function(o){var l,d=o.currentTarget,p=d[de],y=o.propertyName;p.hasOwnProperty(y)&&(p=p[y],(l=new CustomEvent(Oe,{bubbles:!0})).attrName=p.name,l.prevValue=p.value||null,l.newValue=p.value=d[y]||null,null==l.prevValue?l[ot]=l.attrChange=0:l.MODIFICATION=l.attrChange=1,$.call(d,l))},e.value=function(o,l,d){o===Oe&&this[pe]&&this.setAttribute!==h&&(this[de]={className:{name:"class",value:this.className}},this.setAttribute=h,this.removeAttribute=i,r.call(this,"propertychange",s)),r.call(this,o,l,d)},Re(P,be,e)):H||(De[be](Oe,Te),De.setAttribute(de,1),De.removeAttribute(de),I&&(je=function(e){var r,i,h,s=this;if(s===e.target){for(h in r=s[de],s[de]=i=nt(s),i){if(!(h in r))return Be(0,s,h,r[h],i[h],ot);if(i[h]!==r[h])return Be(1,s,h,r[h],i[h],"MODIFICATION")}for(h in r)if(!(h in i))return Be(2,s,h,r[h],i[h],pt)}},Be=function(e,r,i,h,s,o){var l={attrChange:e,currentTarget:r,attrName:i,prevValue:h,newValue:s};l[o]=e,Qe(l)},nt=function(e){for(var r,i,h={},s=e.attributes,o=0,l=s.length;o$");if(r[te]="a",(e.prototype=w(S.prototype)).constructor=e,X.customElements.define(i,e,r),!h.test(A.createElement("a",{is:i}).outerHTML)||!h.test((new e).outerHTML))throw r}(function e(){return Reflect.construct(S,[],e)},{},"document-register-element-a"+dt)}catch{ft()}if(!oe.noBuiltIn)try{if(N.call(A,"a","a").outerHTML.indexOf("is")<0)throw{}}catch{C=function(r){return{is:r.toLowerCase()}}}}(window)},88583:()=>{"use strict";!function(t){const a=t.performance;function u(I){a&&a.mark&&a.mark(I)}function c(I,k){a&&a.measure&&a.measure(I,k)}u("Zone");const f=t.__Zone_symbol_prefix||"__zone_symbol__";function m(I){return f+I}const E=!0===t[m("forceDuplicateZoneCheck")];if(t.Zone){if(E||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let v=(()=>{class I{constructor(n,e){this._parent=n,this._name=e?e.name||"unnamed":"",this._properties=e&&e.properties||{},this._zoneDelegate=new w(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==re.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=I.current;for(;n.parent;)n=n.parent;return n}static get current(){return F.zone}static get currentTask(){return ue}static __load_patch(n,e,r=!1){if(re.hasOwnProperty(n)){if(!r&&E)throw Error("Already loaded patch: "+n)}else if(!t["__Zone_disable_"+n]){const i="Zone:"+n;u(i),re[n]=e(t,I,Te),c(i,i)}}get parent(){return this._parent}get name(){return this._name}get(n){const e=this.getZoneWith(n);if(e)return e._properties[n]}getZoneWith(n){let e=this;for(;e;){if(e._properties.hasOwnProperty(n))return e;e=e._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,e){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const r=this._zoneDelegate.intercept(this,n,e),i=this;return function(){return i.runGuarded(r,this,arguments,e)}}run(n,e,r,i){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,n,e,r,i)}finally{F=F.parent}}runGuarded(n,e=null,r,i){F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,n,e,r,i)}catch(h){if(this._zoneDelegate.handleError(this,h))throw h}}finally{F=F.parent}}runTask(n,e,r){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");if(n.state===B&&(n.type===O||n.type===j))return;const i=n.state!=Q;i&&n._transitionTo(Q,R),n.runCount++;const h=ue;ue=n,F={parent:F,zone:this};try{n.type==j&&n.data&&!n.data.isPeriodic&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,n,e,r)}catch(s){if(this._zoneDelegate.handleError(this,s))throw s}}finally{n.state!==B&&n.state!==K&&(n.type==O||n.data&&n.data.isPeriodic?i&&n._transitionTo(R,Q):(n.runCount=0,this._updateTaskCount(n,-1),i&&n._transitionTo(B,Q,B))),F=F.parent,ue=h}}scheduleTask(n){if(n.zone&&n.zone!==this){let r=this;for(;r;){if(r===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);r=r.parent}}n._transitionTo($,B);const e=[];n._zoneDelegates=e,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(r){throw n._transitionTo(K,$,B),this._zoneDelegate.handleError(this,r),r}return n._zoneDelegates===e&&this._updateTaskCount(n,1),n.state==$&&n._transitionTo(R,$),n}scheduleMicroTask(n,e,r,i){return this.scheduleTask(new b(N,n,e,r,i,void 0))}scheduleMacroTask(n,e,r,i,h){return this.scheduleTask(new b(j,n,e,r,i,h))}scheduleEventTask(n,e,r,i,h){return this.scheduleTask(new b(O,n,e,r,i,h))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");n._transitionTo(V,R,Q);try{this._zoneDelegate.cancelTask(this,n)}catch(e){throw n._transitionTo(K,V),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(n,-1),n._transitionTo(B,V),n.runCount=0,n}_updateTaskCount(n,e){const r=n._zoneDelegates;-1==e&&(n._zoneDelegates=null);for(let i=0;iI.hasTask(n,e),onScheduleTask:(I,k,n,e)=>I.scheduleTask(n,e),onInvokeTask:(I,k,n,e,r,i)=>I.invokeTask(n,e,r,i),onCancelTask:(I,k,n,e)=>I.cancelTask(n,e)};class w{constructor(k,n,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=k,this._parentDelegate=n,this._forkZS=e&&(e&&e.onFork?e:n._forkZS),this._forkDlgt=e&&(e.onFork?n:n._forkDlgt),this._forkCurrZone=e&&(e.onFork?this.zone:n._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:n._interceptZS),this._interceptDlgt=e&&(e.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this.zone:n._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:n._invokeZS),this._invokeDlgt=e&&(e.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this.zone:n._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:n._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this.zone:n._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:n._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this.zone:n._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:n._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this.zone:n._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:n._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this.zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=e&&e.onHasTask;(r||n&&n._hasTaskZS)&&(this._hasTaskZS=r?e:C,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=k,e.onScheduleTask||(this._scheduleTaskZS=C,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this.zone),e.onInvokeTask||(this._invokeTaskZS=C,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this.zone),e.onCancelTask||(this._cancelTaskZS=C,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this.zone))}fork(k,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,k,n):new v(k,n)}intercept(k,n,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,k,n,e):n}invoke(k,n,e,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,k,n,e,r,i):n.apply(e,r)}handleError(k,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,k,n)}scheduleTask(k,n){let e=n;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,k,n),e||(e=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=N)throw new Error("Task is missing scheduleFn.");T(n)}return e}invokeTask(k,n,e,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,k,n,e,r):n.callback.apply(e,r)}cancelTask(k,n){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,k,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");e=n.cancelFn(n)}return e}hasTask(k,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,k,n)}catch(e){this.handleError(k,e)}}_updateTaskCount(k,n){const e=this._taskCounts,r=e[k],i=e[k]=r+n;if(i<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=i||this.hasTask(this.zone,{microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:k})}}class b{constructor(k,n,e,r,i,h){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=k,this.source=n,this.data=r,this.scheduleFn=i,this.cancelFn=h,!e)throw new Error("callback is not defined");this.callback=e;const s=this;this.invoke=k===O&&r&&r.useG?b.invokeTask:function(){return b.invokeTask.call(t,s,this,arguments)}}static invokeTask(k,n,e){k||(k=this),fe++;try{return k.runCount++,k.zone.runTask(k,n,e)}finally{1==fe&&Z(),fe--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(B,$)}_transitionTo(k,n,e){if(this._state!==n&&this._state!==e)throw new Error(`${this.type} '${this.source}': can not transition to '${k}', expecting state '${n}'${e?" or '"+e+"'":""}, was '${this._state}'.`);this._state=k,k==B&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const H=m("setTimeout"),S=m("Promise"),P=m("then");let L,G=[],x=!1;function T(I){if(0===fe&&0===G.length)if(L||t[S]&&(L=t[S].resolve(0)),L){let k=L[P];k||(k=L.then),k.call(L,Z)}else t[H](Z,0);I&&G.push(I)}function Z(){if(!x){for(x=!0;G.length;){const I=G;G=[];for(let k=0;kF,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:T,showUncaughtError:()=>!v[m("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W};let F={parent:null,zone:new v(null,null)},ue=null,fe=0;function W(){}c("Zone","Zone"),t.Zone=v}(typeof window<"u"&&window||typeof self<"u"&&self||global);const oe=Object.getOwnPropertyDescriptor,ge=Object.defineProperty,ye=Object.getPrototypeOf,_t=Object.create,Ve=Array.prototype.slice,Ie="addEventListener",Je="removeEventListener",Qe=Zone.__symbol__(Ie),et=Zone.__symbol__(Je),he="true",ve="false",Ze=Zone.__symbol__("");function Fe(t,a){return Zone.current.wrap(t,a)}function lt(t,a,u,c,f){return Zone.current.scheduleMacroTask(t,a,u,c,f)}const U=Zone.__symbol__,Ae=typeof window<"u",ke=Ae?window:void 0,J=Ae&&ke||"object"==typeof self&&self||global,yt=[null];function tt(t,a){for(let u=t.length-1;u>=0;u--)"function"==typeof t[u]&&(t[u]=Fe(t[u],a+"_"+u));return t}function ft(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&typeof t.set>"u")}const A=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,ne=!("nw"in J)&&typeof J.process<"u"&&"[object process]"==={}.toString.call(J.process),ht=!ne&&!A&&!(!Ae||!ke.HTMLElement),Ue=typeof J.process<"u"&&"[object process]"==={}.toString.call(J.process)&&!A&&!(!Ae||!ke.HTMLElement),je={},Be=function(t){if(!(t=t||J.event))return;let a=je[t.type];a||(a=je[t.type]=U("ON_PROPERTY"+t.type));const u=this||t.target||J,c=u[a];let f;return ht&&u===ke&&"error"===t.type?(f=c&&c.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===f&&t.preventDefault()):(f=c&&c.apply(this,arguments),null!=f&&!f&&t.preventDefault()),f};function nt(t,a,u){let c=oe(t,a);if(!c&&u&&oe(u,a)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const f=U("on"+a+"patched");if(t.hasOwnProperty(f)&&t[f])return;delete c.writable,delete c.value;const m=c.get,E=c.set,v=a.substr(2);let C=je[v];C||(C=je[v]=U("ON_PROPERTY"+v)),c.set=function(w){let b=this;!b&&t===J&&(b=J),b&&(b[C]&&b.removeEventListener(v,Be),E&&E.apply(b,yt),"function"==typeof w?(b[C]=w,b.addEventListener(v,Be,!1)):b[C]=null)},c.get=function(){let w=this;if(!w&&t===J&&(w=J),!w)return null;const b=w[C];if(b)return b;if(m){let H=m&&m.call(this);if(H)return c.set.call(this,H),"function"==typeof w.removeAttribute&&w.removeAttribute(a),H}return null},ge(t,a,c),t[f]=!0}function Ge(t,a,u){if(a)for(let c=0;cfunction(E,v){const C=u(E,v);return C.cbIdx>=0&&"function"==typeof v[C.cbIdx]?lt(C.name,v[C.cbIdx],C,f):m.apply(E,v)})}function se(t,a){t[U("OriginalDelegate")]=a}let dt=!1,de=!1;function Le(){if(dt)return de;dt=!0;try{const t=ke.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(de=!0)}catch{}return de}Zone.__load_patch("ZoneAwarePromise",(t,a,u)=>{const c=Object.getOwnPropertyDescriptor,f=Object.defineProperty,E=u.symbol,v=[],C=!0===t[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],w=E("Promise"),b=E("then");u.onUnhandledError=s=>{if(u.showUncaughtError()){const o=s&&s.rejection;o?console.error("Unhandled Promise rejection:",o instanceof Error?o.message:o,"; Zone:",s.zone.name,"; Task:",s.task&&s.task.source,"; Value:",o,o instanceof Error?o.stack:void 0):console.error(s)}},u.microtaskDrainDone=()=>{for(;v.length;){const s=v.shift();try{s.zone.runGuarded(()=>{throw s.throwOriginal?s.rejection:s})}catch(o){P(o)}}};const S=E("unhandledPromiseRejectionHandler");function P(s){u.onUnhandledError(s);try{const o=a[S];"function"==typeof o&&o.call(this,s)}catch{}}function G(s){return s&&s.then}function x(s){return s}function L(s){return n.reject(s)}const T=E("state"),Z=E("value"),z=E("finally"),B=E("parentPromiseValue"),$=E("parentPromiseState"),Q=null,V=!0,K=!1;function j(s,o){return l=>{try{F(s,o,l)}catch(d){F(s,!1,d)}}}const Te=E("currentTaskTrace");function F(s,o,l){const d=function(){let s=!1;return function(l){return function(){s||(s=!0,l.apply(null,arguments))}}}();if(s===l)throw new TypeError("Promise resolved with itself");if(s[T]===Q){let p=null;try{("object"==typeof l||"function"==typeof l)&&(p=l&&l.then)}catch(y){return d(()=>{F(s,!1,y)})(),s}if(o!==K&&l instanceof n&&l.hasOwnProperty(T)&&l.hasOwnProperty(Z)&&l[T]!==Q)fe(l),F(s,l[T],l[Z]);else if(o!==K&&"function"==typeof p)try{p.call(l,d(j(s,o)),d(j(s,!1)))}catch(y){d(()=>{F(s,!1,y)})()}else{s[T]=o;const y=s[Z];if(s[Z]=l,s[z]===z&&o===V&&(s[T]=s[$],s[Z]=s[B]),o===K&&l instanceof Error){const _=a.currentTask&&a.currentTask.data&&a.currentTask.data.__creationTrace__;_&&f(l,Te,{configurable:!0,enumerable:!1,writable:!0,value:_})}for(let _=0;_{try{const g=s[Z],M=!!l&&z===l[z];M&&(l[B]=g,l[$]=y);const D=o.run(_,void 0,M&&_!==L&&_!==x?[]:[g]);F(l,!0,D)}catch(g){F(l,!1,g)}},l)}const k=function(){};class n{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(o){return F(new this(null),V,o)}static reject(o){return F(new this(null),K,o)}static race(o){let l,d,p=new this((g,M)=>{l=g,d=M});function y(g){l(g)}function _(g){d(g)}for(let g of o)G(g)||(g=this.resolve(g)),g.then(y,_);return p}static all(o){return n.allWithCallback(o)}static allSettled(o){return(this&&this.prototype instanceof n?this:n).allWithCallback(o,{thenCallback:d=>({status:"fulfilled",value:d}),errorCallback:d=>({status:"rejected",reason:d})})}static allWithCallback(o,l){let d,p,y=new this((D,q)=>{d=D,p=q}),_=2,g=0;const M=[];for(let D of o){G(D)||(D=this.resolve(D));const q=g;try{D.then(ee=>{M[q]=l?l.thenCallback(ee):ee,_--,0===_&&d(M)},ee=>{l?(M[q]=l.errorCallback(ee),_--,0===_&&d(M)):p(ee)})}catch(ee){p(ee)}_++,g++}return _-=2,0===_&&d(M),y}constructor(o){const l=this;if(!(l instanceof n))throw new Error("Must be an instanceof Promise.");l[T]=Q,l[Z]=[];try{o&&o(j(l,V),j(l,K))}catch(d){F(l,!1,d)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return n}then(o,l){let d=this.constructor[Symbol.species];(!d||"function"!=typeof d)&&(d=this.constructor||n);const p=new d(k),y=a.current;return this[T]==Q?this[Z].push(y,p,o,l):W(this,y,p,o,l),p}catch(o){return this.then(null,o)}finally(o){let l=this.constructor[Symbol.species];(!l||"function"!=typeof l)&&(l=n);const d=new l(k);d[z]=z;const p=a.current;return this[T]==Q?this[Z].push(p,d,o,o):W(this,p,d,o,o),d}}n.resolve=n.resolve,n.reject=n.reject,n.race=n.race,n.all=n.all;const e=t[w]=t.Promise;t.Promise=n;const r=E("thenPatched");function i(s){const o=s.prototype,l=c(o,"then");if(l&&(!1===l.writable||!l.configurable))return;const d=o.then;o[b]=d,s.prototype.then=function(p,y){return new n((g,M)=>{d.call(this,g,M)}).then(p,y)},s[r]=!0}return u.patchThen=i,e&&(i(e),ae(t,"fetch",s=>function h(s){return function(o,l){let d=s.apply(o,l);if(d instanceof n)return d;let p=d.constructor;return p[r]||i(p),d}}(s))),Promise[a.__symbol__("uncaughtPromiseErrors")]=v,n}),Zone.__load_patch("toString",t=>{const a=Function.prototype.toString,u=U("OriginalDelegate"),c=U("Promise"),f=U("Error"),m=function(){if("function"==typeof this){const w=this[u];if(w)return"function"==typeof w?a.call(w):Object.prototype.toString.call(w);if(this===Promise){const b=t[c];if(b)return a.call(b)}if(this===Error){const b=t[f];if(b)return a.call(b)}}return a.call(this)};m[u]=a,Function.prototype.toString=m;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ce=!1;if(typeof window<"u")try{const t=Object.defineProperty({},"passive",{get:function(){ce=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{ce=!1}const me={useG:!0},te={},pe={},vt=new RegExp("^"+Ze+"(\\w+)(true|false)$"),rt=U("propagationStopped");function mt(t,a){const u=(a?a(t):t)+ve,c=(a?a(t):t)+he,f=Ze+u,m=Ze+c;te[t]={},te[t][ve]=f,te[t][he]=m}function ze(t,a,u){const c=u&&u.add||Ie,f=u&&u.rm||Je,m=u&&u.listeners||"eventListeners",E=u&&u.rmAll||"removeAllListeners",v=U(c),C="."+c+":",w="prependListener",b="."+w+":",H=function(L,T,Z){if(L.isRemoved)return;const z=L.callback;"object"==typeof z&&z.handleEvent&&(L.callback=$=>z.handleEvent($),L.originalDelegate=z),L.invoke(L,T,[Z]);const B=L.options;B&&"object"==typeof B&&B.once&&T[f].call(T,Z.type,L.originalDelegate?L.originalDelegate:L.callback,B)},S=function(L){if(!(L=L||t.event))return;const T=this||L.target||t,Z=T[te[L.type][ve]];if(Z)if(1===Z.length)H(Z[0],T,L);else{const z=Z.slice();for(let B=0;Bfunction(f,m){f[rt]=!0,c&&c.apply(f,m)})}function pt(t,a,u,c,f){const m=Zone.__symbol__(c);if(a[m])return;const E=a[m]=a[c];a[c]=function(v,C,w){return C&&C.prototype&&f.forEach(function(b){const H=`${u}.${c}::`+b,S=C.prototype;if(S.hasOwnProperty(b)){const P=t.ObjectGetOwnPropertyDescriptor(S,b);P&&P.value?(P.value=t.wrapWithCurrentZone(P.value,H),t._redefineProperty(C.prototype,b,P)):S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}else S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}),E.call(a,v,C,w)},t.attachOriginToPatched(a[c],E)}const Et=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],st=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],le=["load"],De=["blur","error","focus","load","resize","scroll","messageerror"],Ee=["bounce","finish","start"],it=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Pe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],Re=["error","message"],Ne=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Et,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function Xe(t,a,u){if(!u||0===u.length)return a;const c=u.filter(m=>m.target===t);if(!c||0===c.length)return a;const f=c[0].ignoreProperties;return a.filter(m=>-1===f.indexOf(m))}function Y(t,a,u,c){t&&Ge(t,Xe(t,a,u),c)}Zone.__load_patch("util",(t,a,u)=>{u.patchOnProperties=Ge,u.patchMethod=ae,u.bindArguments=tt,u.patchMacroTask=Ce;const c=a.__symbol__("BLACK_LISTED_EVENTS"),f=a.__symbol__("UNPATCHED_EVENTS");t[f]&&(t[c]=t[f]),t[c]&&(a[c]=a[f]=t[c]),u.patchEventPrototype=ot,u.patchEventTarget=ze,u.isIEOrEdge=Le,u.ObjectDefineProperty=ge,u.ObjectGetOwnPropertyDescriptor=oe,u.ObjectCreate=_t,u.ArraySlice=Ve,u.patchClass=we,u.wrapWithCurrentZone=Fe,u.filterProperties=Xe,u.attachOriginToPatched=se,u._redefineProperty=Object.defineProperty,u.patchCallbacks=pt,u.getGlobalObjects=()=>({globalSources:pe,zoneSymbolEventNames:te,eventNames:Ne,isBrowser:ht,isMix:Ue,isNode:ne,TRUE_STR:he,FALSE_STR:ve,ZONE_SYMBOL_PREFIX:Ze,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Je})});const Ye=U("zoneTask");function Se(t,a,u,c){let f=null,m=null;u+=c;const E={};function v(w){const b=w.data;return b.args[0]=function(){return w.invoke.apply(this,arguments)},b.handleId=f.apply(t,b.args),w}function C(w){return m.call(t,w.data.handleId)}f=ae(t,a+=c,w=>function(b,H){if("function"==typeof H[0]){const S={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?H[1]||0:void 0,args:H},P=H[0];H[0]=function(){try{return P.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete E[S.handleId]:S.handleId&&(S.handleId[Ye]=null))}};const G=lt(a,H[0],S,v,C);if(!G)return G;const x=G.data.handleId;return"number"==typeof x?E[x]=G:x&&(x[Ye]=G),x&&x.ref&&x.unref&&"function"==typeof x.ref&&"function"==typeof x.unref&&(G.ref=x.ref.bind(x),G.unref=x.unref.bind(x)),"number"==typeof x||x?x:G}return w.apply(t,H)}),m=ae(t,u,w=>function(b,H){const S=H[0];let P;"number"==typeof S?P=E[S]:(P=S&&S[Ye],P||(P=S)),P&&"string"==typeof P.type?"notScheduled"!==P.state&&(P.cancelFn&&P.data.isPeriodic||0===P.runCount)&&("number"==typeof S?delete E[S]:S&&(S[Ye]=null),P.zone.cancelTask(P)):w.apply(t,H)})}Zone.__load_patch("legacy",t=>{const a=t[Zone.__symbol__("legacyPatch")];a&&a()}),Zone.__load_patch("queueMicrotask",(t,a,u)=>{u.patchMethod(t,"queueMicrotask",c=>function(f,m){a.current.scheduleMicroTask("queueMicrotask",m[0])})}),Zone.__load_patch("timers",t=>{const a="set",u="clear";Se(t,a,u,"Timeout"),Se(t,a,u,"Interval"),Se(t,a,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{Se(t,"request","cancel","AnimationFrame"),Se(t,"mozRequest","mozCancel","AnimationFrame"),Se(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,a)=>{const u=["alert","prompt","confirm"];for(let c=0;cfunction(C,w){return a.current.run(m,t,w,v)})}),Zone.__load_patch("EventTarget",(t,a,u)=>{(function Me(t,a){a.patchEventPrototype(t,a)})(t,u),function $e(t,a){if(Zone[a.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:f,FALSE_STR:m,ZONE_SYMBOL_PREFIX:E}=a.getGlobalObjects();for(let C=0;C{we("MutationObserver"),we("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,a,u)=>{we("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,a,u)=>{we("FileReader")}),Zone.__load_patch("on_property",(t,a,u)=>{!function Ct(t,a){if(ne&&!Ue||Zone[t.symbol("patchEvents")])return;const u=typeof WebSocket<"u",c=a.__Zone_ignore_on_properties;if(ht){const E=window,v=function be(){try{const t=ke.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:E,ignoreProperties:["error"]}]:[];Y(E,Ne.concat(["messageerror"]),c&&c.concat(v),ye(E)),Y(Document.prototype,Ne,c),typeof E.SVGElement<"u"&&Y(E.SVGElement.prototype,Ne,c),Y(Element.prototype,Ne,c),Y(HTMLElement.prototype,Ne,c),Y(HTMLMediaElement.prototype,st,c),Y(HTMLFrameSetElement.prototype,Et.concat(De),c),Y(HTMLBodyElement.prototype,Et.concat(De),c),Y(HTMLFrameElement.prototype,le,c),Y(HTMLIFrameElement.prototype,le,c);const C=E.HTMLMarqueeElement;C&&Y(C.prototype,Ee,c);const w=E.Worker;w&&Y(w.prototype,Re,c)}const f=a.XMLHttpRequest;f&&Y(f.prototype,it,c);const m=a.XMLHttpRequestEventTarget;m&&Y(m&&m.prototype,it,c),typeof IDBIndex<"u"&&(Y(IDBIndex.prototype,Pe,c),Y(IDBRequest.prototype,Pe,c),Y(IDBOpenDBRequest.prototype,Pe,c),Y(IDBDatabase.prototype,Pe,c),Y(IDBTransaction.prototype,Pe,c),Y(IDBCursor.prototype,Pe,c)),u&&Y(WebSocket.prototype,at,c)}(u,t)}),Zone.__load_patch("customElements",(t,a,u)=>{!function Pt(t,a){const{isBrowser:u,isMix:c}=a.getGlobalObjects();(u||c)&&t.customElements&&"customElements"in t&&a.patchCallbacks(a,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,u)}),Zone.__load_patch("XHR",(t,a)=>{!function C(w){const b=w.XMLHttpRequest;if(!b)return;const H=b.prototype;let P=H[Qe],G=H[et];if(!P){const N=w.XMLHttpRequestEventTarget;if(N){const j=N.prototype;P=j[Qe],G=j[et]}}const x="readystatechange",L="scheduled";function T(N){const j=N.data,O=j.target;O[m]=!1,O[v]=!1;const re=O[f];P||(P=O[Qe],G=O[et]),re&&G.call(O,x,re);const Te=O[f]=()=>{if(O.readyState===O.DONE)if(!j.aborted&&O[m]&&N.state===L){const ue=O[a.__symbol__("loadfalse")];if(0!==O.status&&ue&&ue.length>0){const fe=N.invoke;N.invoke=function(){const W=O[a.__symbol__("loadfalse")];for(let I=0;Ifunction(N,j){return N[c]=0==j[2],N[E]=j[1],B.apply(N,j)}),R=U("fetchTaskAborting"),Q=U("fetchTaskScheduling"),V=ae(H,"send",()=>function(N,j){if(!0===a.current[Q]||N[c])return V.apply(N,j);{const O={target:N,url:N[E],isPeriodic:!1,args:j,aborted:!1},re=lt("XMLHttpRequest.send",Z,O,T,z);N&&!0===N[v]&&!O.aborted&&re.state===L&&re.invoke()}}),K=ae(H,"abort",()=>function(N,j){const O=function S(N){return N[u]}(N);if(O&&"string"==typeof O.type){if(null==O.cancelFn||O.data&&O.data.aborted)return;O.zone.cancelTask(O)}else if(!0===a.current[R])return K.apply(N,j)})}(t);const u=U("xhrTask"),c=U("xhrSync"),f=U("xhrListener"),m=U("xhrScheduled"),E=U("xhrURL"),v=U("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function ut(t,a){const u=t.constructor.name;for(let c=0;c{const C=function(){return v.apply(this,tt(arguments,u+"."+f))};return se(C,v),C})(m)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,a)=>{function u(c){return function(f){kt(t,c).forEach(E=>{const v=t.PromiseRejectionEvent;if(v){const C=new v(c,{promise:f.promise,reason:f.rejection});E.invoke(C)}})}}t.PromiseRejectionEvent&&(a[U("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),a[U("rejectionHandledHandler")]=u("rejectionhandled"))})}},X=>{X(X.s=39061)}]);(self.webpackChunkdotcms_block_editor=self.webpackChunkdotcms_block_editor||[]).push([[179],{79632:(q,S,x)=>{"use strict";function k(n){return"function"==typeof n}let V=!1;const B={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else V&&console.log("RxJS: Back to a better error behavior. Thank you. <3");V=n},get useDeprecatedSynchronousErrorHandling(){return V}};function G(n){setTimeout(()=>{throw n},0)}const H={closed:!0,next(n){},error(n){if(B.useDeprecatedSynchronousErrorHandling)throw n;G(n)},complete(){}},R=Array.isArray||(n=>n&&"number"==typeof n.length);function P(n){return null!==n&&"object"==typeof n}const X=(()=>{function n(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((t,i)=>`${i+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return n.prototype=Object.create(Error.prototype),n})();class oe{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof oe)t.remove(this);else if(null!==t)for(let s=0;se.concat(t instanceof X?t.errors:t),[])}oe.EMPTY=((n=new oe).closed=!0,n);const me="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class ee extends oe{constructor(e,t,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=H;break;case 1:if(!e){this.destination=H;break}if("object"==typeof e){e instanceof ee?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new Z(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new Z(this,e,t,i)}}[me](){return this}static create(e,t,i){const r=new ee(e,t,i);return r.syncErrorThrowable=!1,r}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class Z extends ee{constructor(e,t,i,r){super(),this._parentSubscriber=e;let o,s=this;k(t)?o=t:t&&(o=t.next,i=t.error,r=t.complete,t!==H&&(s=Object.create(t),k(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;B.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:i}=B;if(this._error)i&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)i?(t.syncErrorValue=e,t.syncErrorThrown=!0):G(e),this.unsubscribe();else{if(this.unsubscribe(),i)throw e;G(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);B.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(i){if(this.unsubscribe(),B.useDeprecatedSynchronousErrorHandling)throw i;G(i)}}__tryOrSetError(e,t,i){if(!B.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,i)}catch(r){return B.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):(G(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const j="function"==typeof Symbol&&Symbol.observable||"@@observable";function z(n){return n}function he(...n){return Le(n)}function Le(n){return 0===n.length?z:1===n.length?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}let Se=(()=>{class n{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){const{operator:o}=this,s=function W(n,e,t){if(n){if(n instanceof ee)return n;if(n[me])return n[me]()}return n||e||t?new ee(n,e,t):new ee(H)}(t,i,r);if(s.add(o?o.call(s,this.source):this.source||B.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),B.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(i){B.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=i),function U(n){for(;n;){const{closed:e,destination:t,isStopped:i}=n;if(e||i)return!1;n=t&&t instanceof ee?t:null}return!0}(t)?t.error(i):console.warn(i)}}forEach(t,i){return new(i=Ee(i))((r,o)=>{let s;s=this.subscribe(a=>{try{t(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(t){const{source:i}=this;return i&&i.subscribe(t)}[j](){return this}pipe(...t){return 0===t.length?this:Le(t)(this)}toPromise(t){return new(t=Ee(t))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=e=>new n(e),n})();function Ee(n){if(n||(n=B.Promise||Promise),!n)throw new Error("no Promise impl found");return n}const ve=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class qe extends oe{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const i=t.indexOf(this.subscriber);-1!==i&&t.splice(i,1)}}class yt extends ee{constructor(e){super(e),this.destination=e}}let ae=(()=>{class n extends Se{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[me](){return new yt(this)}lift(t){const i=new Ii(this,this);return i.operator=t,i}next(t){if(this.closed)throw new ve;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew Ii(e,t),n})();class Ii extends ae{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):oe.EMPTY}}function vi(n){return n&&"function"==typeof n.schedule}function ue(n,e){return function(i){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Nr(n,e))}}class Nr{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new qi(e,this.project,this.thisArg))}}class qi extends ee{constructor(e,t,i){super(e),this.project=t,this.count=0,this.thisArg=i||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(t)}}const Ri=n=>e=>{for(let t=0,i=n.length;tn&&"number"==typeof n.length&&"function"!=typeof n;function wo(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const Be=n=>{if(n&&"function"==typeof n[j])return(n=>e=>{const t=n[j]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)})(n);if(sa(n))return Ri(n);if(wo(n))return(n=>e=>(n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,G),e))(n);if(n&&"function"==typeof n[bo])return(n=>e=>{const t=n[bo]();for(;;){let i;try{i=t.next()}catch(r){return e.error(r),e}if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof t.return&&e.add(()=>{t.return&&t.return()}),e})(n);{const t=`You provided ${P(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(t)}};function Vt(n,e){return new Se(t=>{const i=new oe;let r=0;return i.add(e.schedule(function(){r!==n.length?(t.next(n[r++]),t.closed||i.add(this.schedule())):t.complete()})),i})}function Pr(n,e){if(null!=n){if(function oi(n){return n&&"function"==typeof n[j]}(n))return function Ft(n,e){return new Se(t=>{const i=new oe;return i.add(e.schedule(()=>{const r=n[j]();i.add(r.subscribe({next(o){i.add(e.schedule(()=>t.next(o)))},error(o){i.add(e.schedule(()=>t.error(o)))},complete(){i.add(e.schedule(()=>t.complete()))}}))})),i})}(n,e);if(wo(n))return function dt(n,e){return new Se(t=>{const i=new oe;return i.add(e.schedule(()=>n.then(r=>{i.add(e.schedule(()=>{t.next(r),i.add(e.schedule(()=>t.complete()))}))},r=>{i.add(e.schedule(()=>t.error(r)))}))),i})}(n,e);if(sa(n))return Vt(n,e);if(function Fi(n){return n&&"function"==typeof n[bo]}(n)||"string"==typeof n)return function Sn(n,e){if(!n)throw new Error("Iterable cannot be null");return new Se(t=>{const i=new oe;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(e.schedule(()=>{r=n[bo](),i.add(e.schedule(function(){if(t.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void t.error(a)}s?t.complete():(t.next(o),this.schedule())}))})),i})}(n,e)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}function _t(n,e){return e?Pr(n,e):n instanceof Se?n:new Se(Be(n))}class Vn extends ee{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class Yo extends ee{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function Ql(n,e){if(e.closed)return;if(n instanceof Se)return n.subscribe(e);let t;try{t=Be(n)(e)}catch(i){e.error(i)}return t}function Jn(n,e,t=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(Jn((r,o)=>_t(n(r,o)).pipe(ue((s,a)=>e(r,s,o,a))),t)):("number"==typeof e&&(t=e),i=>i.lift(new J0(n,t)))}class J0{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new X0(e,this.project,this.concurrent))}}class X0 extends Yo{constructor(e,t,i=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}const rf=Jn;function Wa(n=Number.POSITIVE_INFINITY){return Jn(z,n)}function Ga(n,e){return e?Vt(n,e):new Se(Ri(n))}function ys(...n){let e=Number.POSITIVE_INFINITY,t=null,i=n[n.length-1];return vi(i)?(t=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(e=n.pop())):"number"==typeof i&&(e=n.pop()),null===t&&1===n.length&&n[0]instanceof Se?n[0]:Wa(e)(Ga(n,t))}function Zl(){return function(e){return e.lift(new Co(e))}}class Co{constructor(e){this.connectable=e}call(e,t){const{connectable:i}=this;i._refCount++;const r=new Gg(e,i),o=t.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class Gg extends ee{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:i}=this,r=e._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class Nu extends Se{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new oe,e.add(this.source.subscribe(new Yg(this.getSubject(),this))),e.closed&&(this._connection=null,e=oe.EMPTY)),e}refCount(){return Zl()(this)}}const ew=(()=>{const n=Nu.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})();class Yg extends yt{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}class tw{constructor(e,t){this.subjectFactory=e,this.selector=t}call(e,t){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(e);return o.add(t.subscribe(r)),o}}function la(){return new ae}function _n(n){for(let e in n)if(n[e]===_n)return e;throw Error("Could not find renamed property on target object.")}function af(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function mn(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(mn).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function ca(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const lf=_n({__forward_ref__:_n});function Bt(n){return n.__forward_ref__=Bt,n.toString=function(){return mn(this())},n}function Ke(n){return ua(n)?n():n}function ua(n){return"function"==typeof n&&n.hasOwnProperty(lf)&&n.__forward_ref__===Bt}function cf(n){return n&&!!n.\u0275providers}const Pu="https://g.co/ng/security#xss";class Q extends Error{constructor(e,t){super(function Lu(n,e){return`NG0${Math.abs(n)}${e?": "+e.trim():""}`}(e,t)),this.code=e}}function st(n){return"string"==typeof n?n:null==n?"":String(n)}function Ru(n,e){throw new Q(-201,!1)}function Lr(n,e){null==n&&function Gt(n,e,t,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${t} ${i} ${e} <=Actual]`))}(e,n,null,"!=")}function $(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function wt(n){return{providers:n.providers||[],imports:n.imports||[]}}function Fu(n){return Zg(n,Jl)||Zg(n,Jg)}function Zg(n,e){return n.hasOwnProperty(e)?n[e]:null}function qa(n){return n&&(n.hasOwnProperty(zu)||n.hasOwnProperty(aw))?n[zu]:null}const Jl=_n({\u0275prov:_n}),zu=_n({\u0275inj:_n}),Jg=_n({ngInjectableDef:_n}),aw=_n({ngInjectorDef:_n});var Ze=(()=>((Ze=Ze||{})[Ze.Default=0]="Default",Ze[Ze.Host=1]="Host",Ze[Ze.Self=2]="Self",Ze[Ze.SkipSelf=4]="SkipSelf",Ze[Ze.Optional=8]="Optional",Ze))();let uf;function Rr(n){const e=uf;return uf=n,e}function ey(n,e,t){const i=Fu(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:t&Ze.Optional?null:void 0!==e?e:void Ru(mn(n))}const dn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Fr={},df="__NG_DI_FLAG__",Vu="ngTempTokenPath",uw=/\n/gm,vs="__source";let Ka;function Qa(n){const e=Ka;return Ka=n,e}function Bu(n,e=Ze.Default){if(void 0===Ka)throw new Q(-203,!1);return null===Ka?ey(n,void 0,e):Ka.get(n,e&Ze.Optional?null:void 0,e)}function F(n,e=Ze.Default){return(function Xg(){return uf}()||Bu)(Ke(n),e)}function vt(n,e=Ze.Default){return F(n,ec(e))}function ec(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function Hu(n){const e=[];for(let t=0;t((to=to||{})[to.OnPush=0]="OnPush",to[to.Default=1]="Default",to))(),te=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}(te||(te={})),te))();const Ce={},Ge=[],lt=_n({\u0275cmp:_n}),An=_n({\u0275dir:_n}),Xn=_n({\u0275pipe:_n}),hi=_n({\u0275mod:_n}),tn=_n({\u0275fac:_n}),bi=_n({__NG_ELEMENT_ID__:_n});let no=0;function xe(n){return bs(()=>{const t=!0===n.standalone,i={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===to.OnPush,directiveDefs:null,pipeDefs:null,standalone:t,dependencies:t&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||Ge,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||te.Emulated,id:"c"+no++,styles:n.styles||Ge,_:null,setInput:null,schemas:n.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=n.dependencies,s=n.features;return r.inputs=hf(n.inputs,i),r.outputs=hf(n.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(hr).filter(Ko):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(fr).filter(Ko):null,r})}function wi(n,e,t){const i=n.\u0275cmp;i.directiveDefs=()=>("function"==typeof e?e():e).map(hr),i.pipeDefs=()=>("function"==typeof t?t():t).map(fr)}function hr(n){return gn(n)||Ki(n)}function Ko(n){return null!==n}function rt(n){return bs(()=>({type:n.type,bootstrap:n.bootstrap||Ge,declarations:n.declarations||Ge,imports:n.imports||Ge,exports:n.exports||Ge,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function hf(n,e){if(null==n)return Ce;const t={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),t[r]=i,e&&(e[r]=o)}return t}const Me=xe;function Wn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function gn(n){return n[lt]||null}function Ki(n){return n[An]||null}function fr(n){return n[Xn]||null}function io(n,e){const t=n[hi]||null;if(!t&&!0===e)throw new Error(`Type ${mn(n)} does not have '\u0275mod' property.`);return t}function ro(n){return Array.isArray(n)&&"object"==typeof n[1]}function Zo(n){return Array.isArray(n)&&!0===n[1]}function mw(n){return 0!=(4&n.flags)}function gf(n){return n.componentOffset>-1}function sy(n){return 1==(1&n.flags)}function Jo(n){return null!==n.template}function BV(n){return 0!=(256&n[2])}function ic(n,e){return n.hasOwnProperty(tn)?n[tn]:null}class WE{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}}function Ji(){return GE}function GE(n){return n.type.prototype.ngOnChanges&&(n.setInput=WV),$V}function $V(){const n=qE(this),e=n?.current;if(e){const t=n.previous;if(t===Ce)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function WV(n,e,t,i){const r=this.declaredInputs[t],o=qE(n)||function GV(n,e){return n[YE]=e}(n,{previous:Ce,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new WE(l&&l.currentValue,e,a===Ce),n[i]=e}Ji.ngInherit=!0;const YE="__ngSimpleChanges__";function qE(n){return n[YE]||null}function ji(n){for(;Array.isArray(n);)n=n[0];return n}function ay(n,e){return ji(e[n])}function oo(n,e){return ji(e[n.index])}function ZE(n,e){return n.data[e]}function Ku(n,e){return n[e]}function so(n,e){const t=e[n];return ro(t)?t:t[0]}function ly(n){return 64==(64&n[2])}function Ja(n,e){return null==e?null:n[e]}function JE(n){n[18]=0}function yw(n,e){n[5]+=e;let t=n,i=n[3];for(;null!==i&&(1===e&&1===t[5]||-1===e&&0===t[5]);)i[5]+=e,t=i,i=i[3]}const ht={lFrame:lx(null),bindingsEnabled:!0};function ex(){return ht.bindingsEnabled}function re(){return ht.lFrame.lView}function Zt(){return ht.lFrame.tView}function ge(n){return ht.lFrame.contextLView=n,n[8]}function ye(n){return ht.lFrame.contextLView=null,n}function zi(){let n=tx();for(;null!==n&&64===n.type;)n=n.parent;return n}function tx(){return ht.lFrame.currentTNode}function Cs(n,e){const t=ht.lFrame;t.currentTNode=n,t.isParent=e}function _w(){return ht.lFrame.isParent}function vw(){ht.lFrame.isParent=!1}function mr(){const n=ht.lFrame;let e=n.bindingRootIndex;return-1===e&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function Qu(){return ht.lFrame.bindingIndex++}function ga(n){const e=ht.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function oB(n,e){const t=ht.lFrame;t.bindingIndex=t.bindingRootIndex=n,bw(e)}function bw(n){ht.lFrame.currentDirectiveIndex=n}function ox(){return ht.lFrame.currentQueryIndex}function Cw(n){ht.lFrame.currentQueryIndex=n}function aB(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function sx(n,e,t){if(t&Ze.SkipSelf){let r=e,o=n;for(;!(r=r.parent,null!==r||t&Ze.Host||(r=aB(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;e=r,n=o}const i=ht.lFrame=ax();return i.currentTNode=e,i.lView=n,!0}function Dw(n){const e=ax(),t=n[1];ht.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function ax(){const n=ht.lFrame,e=null===n?null:n.child;return null===e?lx(n):e}function lx(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function cx(){const n=ht.lFrame;return ht.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const ux=cx;function Mw(){const n=cx();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function gr(){return ht.lFrame.selectedIndex}function rc(n){ht.lFrame.selectedIndex=n}function Gn(){const n=ht.lFrame;return ZE(n.tView,n.selectedIndex)}function Tw(){ht.lFrame.currentNamespace="svg"}function Sw(){!function dB(){ht.lFrame.currentNamespace=null}()}function cy(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t=i)break}else e[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===e){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class _f{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}}function Iw(n,e,t){let i=0;for(;ie){s=o-1;break}}}for(;o>16}(n),i=e;for(;t>0;)i=i[15],t--;return i}let Ow=!0;function py(n){const e=Ow;return Ow=n,e}let vB=0;const Ds={};function my(n,e){const t=_x(n,e);if(-1!==t)return t;const i=e[1];i.firstCreatePass&&(n.injectorIndex=e.length,Aw(i.data,n),Aw(e,null),Aw(i.blueprint,null));const r=kw(n,e),o=n.injectorIndex;if(mx(r)){const s=hy(r),a=fy(r,e),l=a[1].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function Aw(n,e){n.push(0,0,0,0,0,0,0,0,e)}function _x(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function kw(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;null!==r;){if(i=Tx(r),null===i)return-1;if(t++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|t<<16}return-1}function Nw(n,e,t){!function bB(n,e,t){let i;"string"==typeof t?i=t.charCodeAt(0)||0:t.hasOwnProperty(bi)&&(i=t[bi]),null==i&&(i=t[bi]=vB++);const r=255&i;e.data[n+(r>>5)]|=1<=0?255&e:MB:e}(t);if("function"==typeof o){if(!sx(e,n,i))return i&Ze.Host?vx(r,0,i):bx(e,t,i,r);try{const s=o(i);if(null!=s||i&Ze.Optional)return s;Ru()}finally{ux()}}else if("number"==typeof o){let s=null,a=_x(n,e),l=-1,c=i&Ze.Host?e[16][6]:null;for((-1===a||i&Ze.SkipSelf)&&(l=-1===a?kw(n,e):e[a+8],-1!==l&&Mx(i,!1)?(s=e[1],a=hy(l),e=fy(l,e)):a=-1);-1!==a;){const u=e[1];if(Dx(o,a,u.data)){const d=CB(a,e,t,s,i,c);if(d!==Ds)return d}l=e[a+8],-1!==l&&Mx(i,e[1].data[a+8]===c)&&Dx(o,a,e)?(s=u,a=hy(l),e=fy(l,e)):a=-1}}return r}function CB(n,e,t,i,r,o){const s=e[1],a=s.data[n+8],u=gy(a,s,t,null==i?gf(a)&&Ow:i!=s&&0!=(3&a.type),r&Ze.Host&&o===a);return null!==u?oc(e,s,u,a):Ds}function gy(n,e,t,i,r){const o=n.providerIndexes,s=e.data,a=1048575&o,l=n.directiveStart,u=o>>20,h=r?a+u:n.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===t)return f}if(r){const f=s[l];if(f&&Jo(f)&&f.type===t)return l}return null}function oc(n,e,t,i){let r=n[t];const o=e.data;if(function mB(n){return n instanceof _f}(r)){const s=r;s.resolving&&function da(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new Q(-200,`Circular dependency in DI detected for ${n}${t}`)}(function Qt(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():st(n)}(o[t]));const a=py(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Rr(s.injectImpl):null;sx(n,i,Ze.Default);try{r=n[t]=s.factory(void 0,o,n,i),e.firstCreatePass&&t>=i.directiveStart&&function fB(n,e,t){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(i){const s=GE(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,s)}r&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,r),o&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o))}(t,o[t],e)}finally{null!==l&&Rr(l),py(a),s.resolving=!1,ux()}}return r}function Dx(n,e,t){return!!(t[e+(n>>5)]&1<{const e=n.prototype.constructor,t=e[tn]||Pw(e),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const o=r[tn]||Pw(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function Pw(n){return ua(n)?()=>{const e=Pw(Ke(n));return e&&e()}:ic(n)}function Tx(n){const e=n[1],t=e.type;return 2===t?e.declTNode:1===t?n[6]:null}const ed="__parameters__";function nd(n,e,t){return bs(()=>{const i=function Lw(n){return function(...t){if(n){const i=n(...t);for(const r in i)this[r]=i[r]}}}(e);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(ed)?l[ed]:Object.defineProperty(l,ed,{value:[]})[ed];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class De{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=$({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function sc(n,e){n.forEach(t=>Array.isArray(t)?sc(t,e):e(t))}function Ex(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function _y(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Cf(n,e){const t=[];for(let i=0;i=0?n[1|i]=t:(i=~i,function IB(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(1===r)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;)n[r]=n[r-2],r--;n[e]=t,n[e+1]=i}}(n,i,e,t)),i}function Fw(n,e){const t=id(n,e);if(t>=0)return n[1|t]}function id(n,e){return function xx(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){const o=i+(r-i>>1),s=n[o<e?r=o:i=o+1}return~(r<({token:n})),-1),Df=Za(nd("Optional"),8),Mf=Za(nd("SkipSelf"),4);var jr=(()=>((jr=jr||{})[jr.Important=1]="Important",jr[jr.DashCase=2]="DashCase",jr))();const Uw=new Map;let ZB=0;const $w="__ngContext__";function Xi(n,e){ro(e)?(n[$w]=e[20],function XB(n){Uw.set(n[20],n)}(e)):n[$w]=e}function Gw(n,e){return undefined(n,e)}function xf(n){const e=n[3];return Zo(e)?e[3]:e}function Yw(n){return qx(n[13])}function qw(n){return qx(n[4])}function qx(n){for(;null!==n&&!Zo(n);)n=n[4];return n}function od(n,e,t,i,r){if(null!=i){let o,s=!1;Zo(i)?o=i:ro(i)&&(s=!0,i=i[0]);const a=ji(i);0===n&&null!==t?null==r?eI(e,t,a):ac(e,t,a,r||null,!0):1===n&&null!==t?ac(e,t,a,r||null,!0):2===n?function tC(n,e,t){const i=Dy(n,e);i&&function vU(n,e,t,i){n.removeChild(e,t,i)}(n,i,e,t)}(e,a,s):3===n&&e.destroyNode(a),null!=o&&function CU(n,e,t,i,r){const o=t[7];o!==ji(t)&&od(e,n,i,o,r);for(let a=10;a0&&(n[t-1][4]=i[4]);const o=_y(n,10+e);!function dU(n,e){If(n,e,e[11],2,null,null),e[0]=null,e[6]=null}(i[1],i);const s=o[19];null!==s&&s.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-65}return i}function Zx(n,e){if(!(128&e[2])){const t=e[11];t.destroyNode&&If(n,e,t,3,null,null),function pU(n){let e=n[13];if(!e)return Jw(n[1],n);for(;e;){let t=null;if(ro(e))t=e[13];else{const i=e[10];i&&(t=i)}if(!t){for(;e&&!e[4]&&e!==n;)ro(e)&&Jw(e[1],e),e=e[3];null===e&&(e=n),ro(e)&&Jw(e[1],e),t=e&&e[4]}e=t}}(e)}}function Jw(n,e){if(!(128&e[2])){e[2]&=-65,e[2]|=128,function _U(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=t[o+1]];t[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=n.data[i.directiveStart+r];if(o===te.None||o===te.Emulated)return null}return oo(i,t)}}(n,e.parent,t)}function ac(n,e,t,i,r){n.insertBefore(e,t,i,r)}function eI(n,e,t){n.appendChild(e,t)}function tI(n,e,t,i,r){null!==i?ac(n,e,t,i,r):eI(n,e,t)}function Dy(n,e){return n.parentNode(e)}function nI(n,e,t){return rI(n,e,t)}let Sy,rC,Ey,rI=function iI(n,e,t){return 40&n.type?oo(n,t):null};function My(n,e,t,i){const r=Jx(n,i,e),o=e[11],a=nI(i.parent||e[6],i,e);if(null!=r)if(Array.isArray(t))for(let l=0;ln,createScript:n=>n,createScriptURL:n=>n})}catch{}return Sy}()?.createHTML(n)||n}function dI(n){return function oC(){if(void 0===Ey&&(Ey=null,dn.trustedTypes))try{Ey=dn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Ey}()?.createHTML(n)||n}class cc{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Pu})`}}class IU extends cc{getTypeName(){return"HTML"}}class OU extends cc{getTypeName(){return"Style"}}class AU extends cc{getTypeName(){return"Script"}}class kU extends cc{getTypeName(){return"URL"}}class NU extends cc{getTypeName(){return"ResourceURL"}}function lo(n){return n instanceof cc?n.changingThisBreaksApplicationSecurity:n}function Ms(n,e){const t=function PU(n){return n instanceof cc&&n.getTypeName()||null}(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Pu})`)}return t===e}class VU{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const t=(new window.DOMParser).parseFromString(lc(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch{return null}}}class BU{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const i=this.inertDocument.createElement("body");t.appendChild(i)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=lc(e),t;const i=this.inertDocument.createElement("body");return i.innerHTML=lc(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(e){const t=e.attributes;for(let r=t.length-1;0"),!0}endElement(e){const t=e.nodeName.toLowerCase();sC.hasOwnProperty(t)&&!mI.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(vI(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const GU=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,YU=/([^\#-~ |!])/g;function vI(n){return n.replace(/&/g,"&").replace(GU,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(YU,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let Iy;function bI(n,e){let t=null;try{Iy=Iy||function pI(n){const e=new BU(n);return function UU(){try{return!!(new window.DOMParser).parseFromString(lc(""),"text/html")}catch{return!1}}()?new VU(e):e}(n);let i=e?String(e):"";t=Iy.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=t.innerHTML,t=Iy.getInertBodyElement(i)}while(i!==o);return lc((new WU).sanitizeChildren(lC(t)||t))}finally{if(t){const i=lC(t)||t;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function lC(n){return"content"in n&&function qU(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var kn=(()=>((kn=kn||{})[kn.NONE=0]="NONE",kn[kn.HTML=1]="HTML",kn[kn.STYLE=2]="STYLE",kn[kn.SCRIPT=3]="SCRIPT",kn[kn.URL=4]="URL",kn[kn.RESOURCE_URL=5]="RESOURCE_URL",kn))();function Af(n){const e=kf();return e?dI(e.sanitize(kn.HTML,n)||""):Ms(n,"HTML")?dI(lo(n)):bI(function uI(){return void 0!==rC?rC:typeof document<"u"?document:void 0}(),st(n))}function Xa(n){const e=kf();return e?e.sanitize(kn.URL,n)||"":Ms(n,"URL")?lo(n):xy(st(n))}function kf(){const n=re();return n&&n[12]}const Oy=new De("ENVIRONMENT_INITIALIZER"),DI=new De("INJECTOR",-1),MI=new De("INJECTOR_DEF_TYPES");class TI{get(e,t=Fr){if(t===Fr){const i=new Error(`NullInjectorError: No provider for ${mn(e)}!`);throw i.name="NullInjectorError",i}return t}}function t8(...n){return{\u0275providers:SI(0,n),\u0275fromNgModule:!0}}function SI(n,...e){const t=[],i=new Set;let r;return sc(e,o=>{const s=o;cC(s,t,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&EI(r,t),t}function EI(n,e){for(let t=0;t{e.push(o)})}}function cC(n,e,t,i){if(!(n=Ke(n)))return!1;let r=null,o=qa(n);const s=!o&&gn(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{const l=n.ngModule;if(o=qa(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)cC(c,e,t,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{sc(o.imports,u=>{cC(u,e,t,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&EI(c,e)}if(!a){const c=ic(r)||(()=>new r);e.push({provide:r,useFactory:c,deps:Ge},{provide:MI,useValue:r,multi:!0},{provide:Oy,useValue:()=>F(r),multi:!0})}const l=o.providers;null==l||a||uC(l,u=>{e.push(u)})}}return r!==n&&void 0!==n.providers}function uC(n,e){for(let t of n)cf(t)&&(t=t.\u0275providers),Array.isArray(t)?uC(t,e):e(t)}const n8=_n({provide:String,useValue:_n});function dC(n){return null!==n&&"object"==typeof n&&n8 in n}function uc(n){return"function"==typeof n}const hC=new De("Set Injector scope."),Ay={},r8={};let fC;function ky(){return void 0===fC&&(fC=new TI),fC}class Ts{}class OI extends Ts{get destroyed(){return this._destroyed}constructor(e,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,mC(e,s=>this.processProvider(s)),this.records.set(DI,sd(void 0,this)),r.has("environment")&&this.records.set(Ts,sd(void 0,this));const o=this.records.get(hC);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(MI.multi,Ge,Ze.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const t=Qa(this),i=Rr(void 0);try{return e()}finally{Qa(t),Rr(i)}}get(e,t=Fr,i=Ze.Default){this.assertNotDestroyed(),i=ec(i);const r=Qa(this),o=Rr(void 0);try{if(!(i&Ze.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function c8(n){return"function"==typeof n||"object"==typeof n&&n instanceof De}(e)&&Fu(e);a=l&&this.injectableDefInScope(l)?sd(pC(e),Ay):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(i&Ze.Self?ky():this.parent).get(e,t=i&Ze.Optional&&t===Fr?null:t)}catch(s){if("NullInjectorError"===s.name){if((s[Vu]=s[Vu]||[]).unshift(mn(e)),r)throw s;return function ty(n,e,t,i){const r=n[Vu];throw e[vs]&&r.unshift(e[vs]),n.message=function hw(n,e,t,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=mn(e);if(Array.isArray(e))r=e.map(mn).join(" -> ");else if("object"==typeof e){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):mn(a)))}r=`{${o.join(", ")}}`}return`${t}${i?"("+i+")":""}[${r}]: ${n.replace(uw,"\n ")}`}("\n"+n.message,r,t,i),n.ngTokenPath=r,n[Vu]=null,n}(s,e,"R3InjectorError",this.source)}throw s}finally{Rr(o),Qa(r)}}resolveInjectorInitializers(){const e=Qa(this),t=Rr(void 0);try{const i=this.get(Oy.multi,Ge,Ze.Self);for(const r of i)r()}finally{Qa(e),Rr(t)}}toString(){const e=[],t=this.records;for(const i of t.keys())e.push(mn(i));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Q(205,!1)}processProvider(e){let t=uc(e=Ke(e))?e:Ke(e&&e.provide);const i=function s8(n){return dC(n)?sd(void 0,n.useValue):sd(AI(n),Ay)}(e);if(uc(e)||!0!==e.multi)this.records.get(t);else{let r=this.records.get(t);r||(r=sd(void 0,Ay,!0),r.factory=()=>Hu(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t){return t.value===Ay&&(t.value=r8,t.value=t.factory()),"object"==typeof t.value&&t.value&&function l8(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=Ke(e.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}}function pC(n){const e=Fu(n),t=null!==e?e.factory:ic(n);if(null!==t)return t;if(n instanceof De)throw new Q(204,!1);if(n instanceof Function)return function o8(n){const e=n.length;if(e>0)throw Cf(e,"?"),new Q(204,!1);const t=function ju(n){const e=n&&(n[Jl]||n[Jg]);if(e){const t=function sw(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new Q(204,!1)}function AI(n,e,t){let i;if(uc(n)){const r=Ke(n);return ic(r)||pC(r)}if(dC(n))i=()=>Ke(n.useValue);else if(function II(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...Hu(n.deps||[]));else if(function xI(n){return!(!n||!n.useExisting)}(n))i=()=>F(Ke(n.useExisting));else{const r=Ke(n&&(n.useClass||n.provide));if(!function a8(n){return!!n.deps}(n))return ic(r)||pC(r);i=()=>new r(...Hu(n.deps))}return i}function sd(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function mC(n,e){for(const t of n)Array.isArray(t)?mC(t,e):t&&cf(t)?mC(t.\u0275providers,e):e(t)}class u8{}class kI{}class h8{resolveComponentFactory(e){throw function d8(n){const e=Error(`No component factory found for ${mn(n)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=n,e}(e)}}let dc=(()=>{class n{}return n.NULL=new h8,n})();function f8(){return ad(zi(),re())}function ad(n,e){return new kt(oo(n,e))}let kt=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=f8,n})();function p8(n){return n instanceof kt?n.nativeElement:n}class Nf{}let Vr=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function m8(){const n=re(),t=so(zi().index,n);return(ro(t)?t:n)[11]}(),n})(),g8=(()=>{class n{}return n.\u0275prov=$({token:n,providedIn:"root",factory:()=>null}),n})();class ld{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const y8=new ld("15.1.1"),gC={};function _C(n){return n.ngOriginalError}class cd{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e);this._console.error("ERROR",e),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&_C(e);for(;t&&_C(t);)t=_C(t);return t||null}}function PI(n){return n.ownerDocument.defaultView}function LI(n){return n.ownerDocument}function _a(n){return n instanceof Function?n():n}function FI(n,e,t){let i=n.length;for(;;){const r=n.indexOf(e,t);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const o=e.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}t=r+1}}const jI="ng-template";function S8(n,e,t){let i=0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==FI(f,c,0)||2&i&&c!==h){if(Xo(i))return!1;s=!0}}}}else{if(!s&&!Xo(i)&&!Xo(l))return!1;if(s&&Xo(l))continue;s=!1,i=l|1&i}}return Xo(i)||s}function Xo(n){return 0==(1&n)}function I8(n,e,t,i){if(null===e)return-1;let r=0;if(i||!t){let o=!1;for(;r-1)for(t++;t0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!Xo(s)&&(e+=BI(o,r),r=""),i=s,o=o||!Xo(i);t++}return""!==r&&(e+=BI(o,r)),e}const ft={};function C(n){UI(Zt(),re(),gr()+n,!1)}function UI(n,e,t,i){if(!i)if(3==(3&e[2])){const o=n.preOrderCheckHooks;null!==o&&uy(e,o,t)}else{const o=n.preOrderHooks;null!==o&&dy(e,o,0,t)}rc(t)}function GI(n,e=null,t=null,i){const r=YI(n,e,t,i);return r.resolveInjectorInitializers(),r}function YI(n,e=null,t=null,i,r=new Set){const o=[t||Ge,t8(n)];return i=i||("object"==typeof n?void 0:mn(n)),new OI(o,e||ky(),i||null,r)}let yr=(()=>{class n{static create(t,i){if(Array.isArray(t))return GI({name:""},i,t,"");{const r=t.name??"";return GI({name:r},t.parent,t.providers,r)}}}return n.THROW_IF_NOT_FOUND=Fr,n.NULL=new TI,n.\u0275prov=$({token:n,providedIn:"any",factory:()=>F(DI)}),n.__NG_ELEMENT_ID__=-1,n})();function O(n,e=Ze.Default){const t=re();return null===t?F(n,e):wx(zi(),t,Ke(n),e)}function tO(n,e){const t=n.contentQueries;if(null!==t)for(let i=0;i22&&UI(n,e,22,!1),t(i,r)}finally{rc(o)}}function TC(n,e,t){if(mw(e)){const r=e.directiveEnd;for(let o=e.directiveStart;o0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(s)!=a&&s.push(a),s.push(t,i,o)}}(n,e,i,Pf(n,t,r.hostVars,ft),r)}function Ss(n,e,t,i,r,o){const s=oo(n,e);!function AC(n,e,t,i,r,o,s){if(null==o)n.removeAttribute(e,r,t);else{const a=null==s?st(o):s(o,i||"",r);n.setAttribute(e,r,a,t)}}(e[11],s,o,n.value,t,i,r)}function bH(n,e,t,i,r,o){const s=o[e];if(null!==s){const a=i.setInput;for(let l=0;l0&&kC(t)}}function kC(n){for(let i=Yw(n);null!==i;i=qw(i))for(let r=10;r0&&kC(o)}const t=n[1].components;if(null!==t)for(let i=0;i0&&kC(r)}}function TH(n,e){const t=so(e,n),i=t[1];(function SH(n,e){for(let t=e.length;t-1&&(Zw(e,i),_y(t,i))}this._attachedToViewContainer=!1}Zx(this._lView[1],this._lView)}onDestroy(e){rO(this._lView[1],this._lView,null,e)}markForCheck(){NC(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){Fy(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Q(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function fU(n,e){If(n,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Q(902,!1);this._appRef=e}}class EH extends Lf{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;Fy(e[1],e,e[8],!1)}checkNoChanges(){}get context(){return null}}class mO extends dc{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=gn(e);return new Rf(t,this.ngModule)}}function gO(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}class IH{constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){i=ec(i);const r=this.injector.get(e,gC,i);return r!==gC||t===gC?r:this.parentInjector.get(e,t,i)}}class Rf extends kI{get inputs(){return gO(this.componentDef.inputs)}get outputs(){return gO(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function L8(n){return n.map(P8).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}create(e,t,i,r){let o=(r=r||this.ngModule)instanceof Ts?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new IH(e,o):e,a=s.get(Nf,null);if(null===a)throw new Q(407,!1);const l=s.get(g8,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function oH(n,e,t){return n.selectRootElement(e,t===te.ShadowDom)}(c,i,this.componentDef.encapsulation):Qw(c,u,function xH(n){const e=n.toLowerCase();return"svg"===e?"svg":"math"===e?"math":null}(u)),h=this.componentDef.onPush?288:272,f=xC(0,null,null,1,0,null,null,null,null,null),p=Py(null,f,null,h,null,null,a,c,l,s,null);let m,g;Dw(p);try{const y=this.componentDef;let v,w=null;y.findHostDirectiveDefs?(v=[],w=new Map,y.findHostDirectiveDefs(y,v,w),v.push(y)):v=[y];const _=function AH(n,e){const t=n[1];return n[22]=e,hd(t,22,2,"#host",null)}(p,d),N=function kH(n,e,t,i,r,o,s,a){const l=r[1];!function NH(n,e,t,i){for(const r of n)e.mergedAttrs=vf(e.mergedAttrs,r.hostAttrs);null!==e.mergedAttrs&&(jy(e,e.mergedAttrs,!0),null!==t&&cI(i,t,e))}(i,n,e,s);const c=o.createRenderer(e,t),u=Py(r,iO(t),null,t.onPush?32:16,r[n.index],n,o,c,a||null,null,null);return l.firstCreatePass&&OC(l,n,i.length-1),Ry(r,u),r[n.index]=u}(_,d,y,v,p,a,c);g=ZE(f,22),d&&function LH(n,e,t,i){if(i)Iw(n,t,["ng-version",y8.full]);else{const{attrs:r,classes:o}=function R8(n){const e=[],t=[];let i=1,r=2;for(;i0&&lI(n,t,o.join(" "))}}(c,y,d,i),void 0!==t&&function RH(n,e,t){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=vf(r.hostAttrs,t=vf(t,r.hostAttrs))}}(i)}function RC(n){return n===Ce?{}:n===Ge?[]:n}function zH(n,e){const t=n.viewQuery;n.viewQuery=t?(i,r)=>{e(i,r),t(i,r)}:e}function VH(n,e){const t=n.contentQueries;n.contentQueries=t?(i,r,o)=>{e(i,r,o),t(i,r,o)}:e}function BH(n,e){const t=n.hostBindings;n.hostBindings=t?(i,r)=>{e(i,r),t(i,r)}:e}let Vy=null;function hc(){if(!Vy){const n=dn.Symbol;if(n&&n.iterator)Vy=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;ts(ji(_[i.index])):i.index;let w=null;if(!s&&a&&(w=function t9(n,e,t,i){const r=n.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,e,r,i.index)),null!==w)(w.__ngLastListenerFn__||w).__ngNextListenerFn__=o,w.__ngLastListenerFn__=o,h=!1;else{o=PO(i,e,u,o,!1);const _=t.listen(g,r,o);d.push(o,_),c&&c.push(r,v,y,y+1)}}else o=PO(i,e,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const m=p.length;if(m)for(let g=0;g-1?so(n.index,e):e);let l=NO(e,0,i,s),c=o.__ngNextListenerFn__;for(;c;)l=NO(e,0,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function M(n=1){return function lB(n){return(ht.lFrame.contextLView=function cB(n,e){for(;n>0;)e=e[15],n--;return e}(n,ht.lFrame.contextLView))[8]}(n)}function n9(n,e){let t=null;const i=function O8(n){const e=n.attrs;if(null!=e){const t=e.indexOf(5);if(!(1&t))return e[t+1]}return null}(n);for(let r=0;r>17&32767}function BC(n){return 2|n}function pc(n){return(131068&n)>>2}function UC(n,e){return-131069&n|e<<2}function HC(n){return 1|n}function $O(n,e,t,i,r){const o=n[t+1],s=null===e;let a=i?el(o):pc(o),l=!1;for(;0!==a&&(!1===l||s);){const u=n[a+1];l9(n[a],e)&&(l=!0,n[a+1]=i?HC(u):BC(u)),a=i?el(u):pc(u)}l&&(n[t+1]=i?BC(o):HC(o))}function l9(n,e){return null===n||null==e||(Array.isArray(n)?n[1]:n)===e||!(!Array.isArray(n)||"string"!=typeof e)&&id(n,e)>=0}const Di={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function WO(n){return n.substring(Di.key,Di.keyEnd)}function c9(n){return n.substring(Di.value,Di.valueEnd)}function GO(n,e){const t=Di.textEnd;return t===e?-1:(e=Di.keyEnd=function h9(n,e,t){for(;e32;)e++;return e}(n,Di.key=e,t),Cd(n,e,t))}function YO(n,e){const t=Di.textEnd;let i=Di.key=Cd(n,e,t);return t===i?-1:(i=Di.keyEnd=function f9(n,e,t){let i;for(;e=65&&(-33&i)<=90||i>=48&&i<=57);)e++;return e}(n,i,t),i=KO(n,i,t),i=Di.value=Cd(n,i,t),i=Di.valueEnd=function p9(n,e,t){let i=-1,r=-1,o=-1,s=e,a=s;for(;s32&&(a=s),o=r,r=i,i=-33&l}return a}(n,i,t),KO(n,i,t))}function qO(n){Di.key=0,Di.keyEnd=0,Di.value=0,Di.valueEnd=0,Di.textEnd=n.length}function Cd(n,e,t){for(;e=0;t=YO(e,t))XO(n,WO(e),c9(e))}function Dn(n){ns(ao,xs,n,!0)}function xs(n,e){for(let t=function u9(n){return qO(n),GO(n,Cd(n,0,Di.textEnd))}(e);t>=0;t=GO(e,t))ao(n,WO(e),!0)}function ts(n,e,t,i){const r=re(),o=Zt(),s=ga(2);o.firstUpdatePass&&JO(o,n,s,i),e!==ft&&er(r,s,e)&&eA(o,o.data[gr()],r,r[11],n,r[s+1]=function C9(n,e){return null==n||("string"==typeof e?n+=e:"object"==typeof n&&(n=mn(lo(n)))),n}(e,t),i,s)}function ns(n,e,t,i){const r=Zt(),o=ga(2);r.firstUpdatePass&&JO(r,null,o,i);const s=re();if(t!==ft&&er(s,o,t)){const a=r.data[gr()];if(nA(a,i)&&!ZO(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(t=ca(l,t||"")),jC(r,a,s,t,i)}else!function w9(n,e,t,i,r,o,s,a){r===ft&&(r=Ge);let l=0,c=0,u=0=n.expandoStartIndex}function JO(n,e,t,i){const r=n.data;if(null===r[t+1]){const o=r[gr()],s=ZO(n,t);nA(o,i)&&null===e&&!s&&(e=!1),e=function g9(n,e,t,i){const r=function ww(n){const e=ht.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}(n);let o=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(t=zf(t=$C(null,n,e,t,i),e.attrs,i),o=null);else{const s=e.directiveStylingLast;if(-1===s||n[s]!==r)if(t=$C(r,n,e,t,i),null===o){let l=function y9(n,e,t){const i=t?e.classBindings:e.styleBindings;if(0!==pc(i))return n[el(i)]}(n,e,i);void 0!==l&&Array.isArray(l)&&(l=$C(null,n,e,l[1],i),l=zf(l,e.attrs,i),function _9(n,e,t,i){n[el(t?e.classBindings:e.styleBindings)]=i}(n,e,i,l))}else o=function v9(n,e,t){let i;const r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0)&&(c=!0)):u=t,r)if(0!==l){const h=el(n[a+1]);n[i+1]=Hy(h,a),0!==h&&(n[h+1]=UC(n[h+1],i)),n[a+1]=function r9(n,e){return 131071&n|e<<17}(n[a+1],i)}else n[i+1]=Hy(a,0),0!==a&&(n[a+1]=UC(n[a+1],i)),a=i;else n[i+1]=Hy(l,0),0===a?a=i:n[l+1]=UC(n[l+1],i),l=i;c&&(n[i+1]=BC(n[i+1])),$O(n,u,i,!0),$O(n,u,i,!1),function a9(n,e,t,i,r){const o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof e&&id(o,e)>=0&&(t[i+1]=HC(t[i+1]))}(e,u,n,i,o),s=Hy(a,l),o?e.classBindings=s:e.styleBindings=s}(r,o,e,t,s,i)}}function $C(n,e,t,i,r){let o=null;const s=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=t[r+1];h===ft&&(h=d?Ge:void 0);let f=d?Fw(h,i):u===i?h:void 0;if(c&&!$y(f)&&(f=Fw(l,i)),$y(f)&&(a=f,s))return a;const p=n[r+1];r=s?el(p):pc(p)}if(null!==e){let l=o?e.residualClasses:e.residualStyles;null!=l&&(a=Fw(l,i))}return a}function $y(n){return void 0!==n}function nA(n,e){return 0!=(n.flags&(e?8:16))}function Te(n,e=""){const t=re(),i=Zt(),r=n+22,o=i.firstCreatePass?hd(i,r,1,e,null):i.data[r],s=t[r]=function Kw(n,e){return n.createText(e)}(t[11],e);My(i,t,s,o),Cs(o,!1)}function Ot(n){return Vi("",n,""),Ot}function Vi(n,e,t){const i=re(),r=function pd(n,e,t,i){return er(n,Qu(),t)?e+st(t)+i:ft}(i,n,e,t);return r!==ft&&va(i,gr(),r),Vi}function Wy(n,e,t,i,r){const o=re(),s=md(o,n,e,t,i,r);return s!==ft&&va(o,gr(),s),Wy}const Md="en-US";let DA=Md;function YC(n,e,t,i,r){if(n=Ke(n),Array.isArray(n))for(let o=0;o>20;if(uc(n)||!n.multi){const f=new _f(l,r,O),p=KC(a,e,r?u:u+h,d);-1===p?(Nw(my(c,s),o,a),qC(o,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(f),s.push(f)):(t[p]=f,s[p]=f)}else{const f=KC(a,e,u+h,d),p=KC(a,e,u,u+h),g=p>=0&&t[p];if(r&&!g||!r&&!(f>=0&&t[f])){Nw(my(c,s),o,a);const y=function V7(n,e,t,i,r){const o=new _f(n,t,O);return o.multi=[],o.index=e,o.componentProviders=0,qA(o,r,i&&!t),o}(r?z7:j7,t.length,r,i,l);!r&&g&&(t[p].providerFactory=y),qC(o,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(y),s.push(y)}else qC(o,n,f>-1?f:p,qA(t[r?p:f],l,!r&&i));!r&&i&&g&&t[p].componentProviders++}}}function qC(n,e,t,i){const r=uc(e),o=function i8(n){return!!n.useClass}(e);if(r||o){const l=(o?Ke(e.useClass):e).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){const u=c.indexOf(t);-1===u?c.push(t,[i,l]):c[u+1].push(i,l)}else c.push(t,l)}}}function qA(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function KC(n,e,t,i){for(let r=t;r{t.providersResolver=(i,r)=>function F7(n,e,t){const i=Zt();if(i.firstCreatePass){const r=Jo(n);YC(t,i.data,i.blueprint,r,!0),YC(e,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,e)}}class Td{}class KA{}class QA extends Td{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new mO(this);const i=io(e);this._bootstrapComponents=_a(i.bootstrap),this._r3Injector=YI(e,t,[{provide:Td,useValue:this},{provide:dc,useValue:this.componentFactoryResolver}],mn(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class ZC extends KA{constructor(e){super(),this.moduleType=e}create(e){return new QA(this.moduleType,e)}}class U7 extends Td{constructor(e,t,i){super(),this.componentFactoryResolver=new mO(this),this.instance=null;const r=new OI([...e,{provide:Td,useValue:this},{provide:dc,useValue:this.componentFactoryResolver}],t||ky(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function Qy(n,e,t=null){return new U7(n,e,t).injector}let H7=(()=>{class n{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t.id)){const i=SI(0,t.type),r=i.length>0?Qy([i],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t.id,r)}return this.cachedInjectors.get(t.id)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=$({token:n,providedIn:"environment",factory:()=>new n(F(Ts))}),n})();function tl(n){n.getStandaloneInjector=e=>e.get(H7).getOrCreateStandaloneInjector(n)}function uo(n,e,t){const i=mr()+n,r=re();return r[i]===ft?Es(r,i,t?e.call(t):e()):Ff(r,i)}function xt(n,e,t,i){return ok(re(),mr(),n,e,t,i)}function Mi(n,e,t,i,r){return function sk(n,e,t,i,r,o,s){const a=e+t;return fc(n,a,r,o)?Es(n,a+2,s?i.call(s,r,o):i(r,o)):Gf(n,a+2)}(re(),mr(),n,e,t,i,r)}function nl(n,e,t,i,r,o){return function ak(n,e,t,i,r,o,s,a){const l=e+t;return function Uy(n,e,t,i,r){const o=fc(n,e,t,i);return er(n,e+2,r)||o}(n,l,r,o,s)?Es(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):Gf(n,l+3)}(re(),mr(),n,e,t,i,r,o)}function Wf(n,e,t,i,r,o,s){return function lk(n,e,t,i,r,o,s,a,l){const c=e+t;return To(n,c,r,o,s,a)?Es(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):Gf(n,c+4)}(re(),mr(),n,e,t,i,r,o,s)}function rk(n,e,t,i){return function ck(n,e,t,i,r,o){let s=e+t,a=!1;for(let l=0;l=0;t--){const i=e[t];if(n===i.name)return i}}(e,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(r,i.onDestroy)):i=t.data[r];const o=i.factory||(i.factory=ic(i.type)),s=Rr(O);try{const a=py(!1),l=o();return py(a),function JH(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}(t,re(),r,l),l}finally{Rr(s)}}function rs(n,e,t){const i=n+22,r=re(),o=Ku(r,i);return function Yf(n,e){return n[1].data[e].pure}(r,i)?ok(r,mr(),e,o.transform,t,o):o.transform(t)}function XC(n){return e=>{setTimeout(n,void 0,e)}}const ie=class s6 extends ae{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,i){let r=e,o=t||(()=>null),s=i;if(e&&"object"==typeof e){const l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=XC(o),r&&(r=XC(r)),s&&(s=XC(s)));const a=super.subscribe({next:r,error:o,complete:s});return e instanceof oe&&e.add(a),a}};function a6(){return this._results[hc()]()}class qf{get changes(){return this._changes||(this._changes=new ie)}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=hc(),i=qf.prototype;i[t]||(i[t]=a6)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){const i=this;i.dirty=!1;const r=function Mo(n){return n.flat(Number.POSITIVE_INFINITY)}(e);(this._changesDetected=!function EB(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=u6,n})();const l6=Eo,c6=class extends l6{constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}createEmbeddedView(e,t){const i=this._declarationTContainer.tViews,r=Py(this._declarationLView,i,e,16,null,i.declTNode,null,null,null,null,t||null);r[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(r[19]=s.createEmbeddedView(i)),MC(i,r,e),new Lf(r)}};function u6(){return Zy(zi(),re())}function Zy(n,e){return 4&n.type?new c6(e,n,ad(n,e)):null}let Br=(()=>{class n{}return n.__NG_ELEMENT_ID__=d6,n})();function d6(){return hk(zi(),re())}const h6=Br,uk=class extends h6{constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return ad(this._hostTNode,this._hostLView)}get injector(){return new Ju(this._hostTNode,this._hostLView)}get parentInjector(){const e=kw(this._hostTNode,this._hostLView);if(mx(e)){const t=fy(e,this._hostLView),i=hy(e);return new Ju(t[1].data[i+8],t)}return new Ju(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=dk(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=e.createEmbeddedView(t||{},o);return this.insert(s,r),s}createComponent(e,t,i,r,o){const s=e&&!function wf(n){return"function"==typeof n}(e);let a;if(s)a=t;else{const d=t||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?e:new Rf(gn(e)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Ts,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(e,t){const i=e._lView,r=i[1];if(function ZV(n){return Zo(n[3])}(i)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const d=i[3],h=new uk(d,d[6],d[3]);h.detach(h.indexOf(e))}}const o=this._adjustIndex(t),s=this._lContainer;!function mU(n,e,t,i){const r=10+i,o=t.length;i>0&&(t[r-1][4]=e),i0)i.push(s[a/2]);else{const c=o[a+1],u=e[-l];for(let d=10;d{class n{constructor(t){this.appInits=t,this.resolve=Xy,this.reject=Xy,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const t=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});t.push(s)}}Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),0===t.length&&i(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(F(e_,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Qf=new De("AppId",{providedIn:"root",factory:function Rk(){return`${uD()}${uD()}${uD()}`}});function uD(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Fk=new De("Platform Initializer"),n_=new De("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),jk=new De("appBootstrapListener"),zk=new De("AnimationModuleType");let j6=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Is=new De("LocaleId",{providedIn:"root",factory:()=>vt(Is,Ze.Optional|Ze.SkipSelf)||function z6(){return typeof $localize<"u"&&$localize.locale||Md}()});class B6{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}let Vk=(()=>{class n{compileModuleSync(t){return new ZC(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const i=this.compileModuleSync(t),o=_a(io(t).declarations).reduce((s,a)=>{const l=gn(a);return l&&s.push(new Rf(l)),s},[]);return new B6(i,o)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const $6=(()=>Promise.resolve(0))();function dD(n){typeof Zone>"u"?$6.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class Jt{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ie(!1),this.onMicrotaskEmpty=new ie(!1),this.onStable=new ie(!1),this.onError=new ie(!1),typeof Zone>"u")throw new Q(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&t,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function W6(){let n=dn.requestAnimationFrame,e=dn.cancelAnimationFrame;if(typeof Zone<"u"&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function q6(n){const e=()=>{!function Y6(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(dn,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,fD(n),n.isCheckStableRunning=!0,hD(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),fD(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,i,r,o,s,a)=>{try{return Hk(n),t.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&e(),$k(n)}},onInvoke:(t,i,r,o,s,a,l)=>{try{return Hk(n),t.invoke(r,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),$k(n)}},onHasTask:(t,i,r,o)=>{t.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,fD(n),hD(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,i,r,o)=>(t.handleError(r,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Jt.isInAngularZone())throw new Q(909,!1)}static assertNotInAngularZone(){if(Jt.isInAngularZone())throw new Q(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,G6,Xy,Xy);try{return o.runTask(s,t,i)}finally{o.cancelTask(s)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}}const G6={};function hD(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function fD(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function Hk(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function $k(n){n._nesting--,hD(n)}class K6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ie,this.onMicrotaskEmpty=new ie,this.onStable=new ie,this.onError=new ie}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}}const Wk=new De(""),i_=new De("");let gD,pD=(()=>{class n{constructor(t,i,r){this._ngZone=t,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,gD||(function Q6(n){gD=n}(r),r.addToWindow(i)),this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Jt.assertNotInAngularZone(),dD(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())dD(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(t)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),t(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:t,timeoutId:o,updateCb:r})}whenStable(t,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,i,r){return[]}}return n.\u0275fac=function(t){return new(t||n)(F(Jt),F(mD),F(i_))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),mD=(()=>{class n{constructor(){this._applications=new Map}registerApplication(t,i){this._applications.set(t,i)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,i=!0){return gD?.findTestabilityInTree(this,t,i)??null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),il=null;const Gk=new De("AllowMultipleToken"),yD=new De("PlatformDestroyListeners");class Yk{constructor(e,t){this.name=e,this.token=t}}function Kk(n,e,t=[]){const i=`Platform: ${e}`,r=new De(i);return(o=[])=>{let s=_D();if(!s||s.injector.get(Gk,!1)){const a=[...t,...o,{provide:r,useValue:!0}];n?n(a):function X6(n){if(il&&!il.get(Gk,!1))throw new Q(400,!1);il=n;const e=n.get(Zk);(function qk(n){const e=n.get(Fk,null);e&&e.forEach(t=>t())})(n)}(function Qk(n=[],e){return yr.create({name:e,providers:[{provide:hC,useValue:"platform"},{provide:yD,useValue:new Set([()=>il=null])},...n]})}(a,i))}return function t$(n){const e=_D();if(!e)throw new Q(401,!1);return e}()}}function _D(){return il?.get(Zk)??null}let Zk=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,i){const r=function Xk(n,e){let t;return t="noop"===n?new K6:("zone.js"===n?void 0:n)||new Jt(e),t}(i?.ngZone,function Jk(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:Jt,useValue:r}];return r.run(()=>{const s=yr.create({providers:o,parent:this.injector,name:t.moduleType.name}),a=t.create(s),l=a.injector.get(cd,null);if(!l)throw new Q(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{r_(this._modules,a),c.unsubscribe()})}),function eN(n,e,t){try{const i=t();return jf(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(t_);return c.runInitializers(),c.donePromise.then(()=>(function MA(n){Lr(n,"Expected localeId to be defined"),"string"==typeof n&&(DA=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Is,Md)||Md),this._moduleDoBootstrap(a),a))})})}bootstrapModule(t,i=[]){const r=tN({},i);return function Z6(n,e,t){const i=new ZC(t);return Promise.resolve(i)}(0,0,t).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(t){const i=t.injector.get(yc);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new Q(-403,!1);t.instance.ngDoBootstrap(i)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Q(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const t=this._injector.get(yD,null);t&&(t.forEach(i=>i()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(F(yr))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function tN(n,e){return Array.isArray(e)?e.reduce(tN,n):{...n,...e}}let yc=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(t,i,r){this._zone=t,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new Se(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new Se(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{Jt.assertNotInAngularZone(),dD(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{Jt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=ys(o,s.pipe(function Qg(){return n=>Zl()(function Kg(n,e){return function(i){let r;if(r="function"==typeof n?n:function(){return n},"function"==typeof e)return i.lift(new tw(r,e));const o=Object.create(i,ew);return o.source=i,o.subjectFactory=r,o}}(la)(n))}()))}bootstrap(t,i){const r=t instanceof kI;if(!this._injector.get(t_).done)throw!r&&function $u(n){const e=gn(n)||Ki(n)||fr(n);return null!==e&&e.standalone}(t),new Q(405,false);let s;s=r?t:this._injector.get(dc).resolveComponentFactory(t),this.componentTypes.push(s.componentType);const a=function J6(n){return n.isBoundToModule}(s)?void 0:this._injector.get(Td),c=s.create(yr.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(Wk,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),r_(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new Q(101,!1);try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){const i=t;r_(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const i=this._injector.get(jk,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>r_(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new Q(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(t){return new(t||n)(F(Jt),F(Ts),F(cd))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function r_(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}let qn=(()=>{class n{}return n.__NG_ELEMENT_ID__=r$,n})();function r$(n){return function o$(n,e,t){if(gf(n)&&!t){const i=so(n.index,e);return new Lf(i,i)}return 47&n.type?new Lf(e[16],e):null}(zi(),re(),16==(16&n))}class sN{constructor(){}supports(e){return By(e)}create(e){return new d$(e)}}const u$=(n,e)=>e;class d${constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||u$}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,o=null;for(;t||i;){const s=!i||t&&t.currentIndex{s=this._trackByFn(r,a),null!==t&&Object.is(t.trackById,s)?(i&&(t=this._verifyReinsertion(t,a,s,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,s,r),i=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let o;return null===e?o=this._itTail:(o=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,r)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,r)):e=this._addAfter(new h$(t,i),o,r),e}_verifyReinsertion(e,t,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?e=this._reinsertAfter(o,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const r=e._prevRemoved,o=e._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){const r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new aN),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,i=e._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new aN),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class h${constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class f${constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){const t=e._prevDup,i=e._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}}class aN{constructor(){this.map=new Map}put(e){const t=e.trackById;let i=this.map.get(t);i||(i=new f$,this.map.set(t,i)),i.add(e)}get(e,t){const r=this.map.get(e);return r?r.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function lN(n,e,t){const i=n.previousIndex;if(null===i)return i;let r=0;return t&&i{if(t&&t.key===r)this._maybeAddToChanges(t,i),this._appendAfter=t,t=t._next;else{const o=this._getOrCreateRecordForKey(r,i);t=this._insertBeforeOrAppend(t,o)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let i=t;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const r=this._records.get(e);this._maybeAddToChanges(r,t);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new m$(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(i=>t(e[i],i))}}class m${constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function uN(){return new a_([new sN])}let a_=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(null!=i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||uN()),deps:[[n,new Mf,new Df]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(null!=i)return i;throw new Q(901,!1)}}return n.\u0275prov=$({token:n,providedIn:"root",factory:uN}),n})();function dN(){return new Zf([new cN])}let Zf=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||dN()),deps:[[n,new Mf,new Df]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(i)return i;throw new Q(901,!1)}}return n.\u0275prov=$({token:n,providedIn:"root",factory:dN}),n})();const _$=Kk(null,"core",[]);let v$=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(F(yc))},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({}),n})();let DD=null;function Os(){return DD}class D${}const Nn=new De("DocumentToken");let MD=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return function M$(){return F(hN)}()},providedIn:"platform"}),n})();const T$=new De("Location Initialized");let hN=(()=>{class n extends MD{constructor(t){super(),this._doc=t,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Os().getBaseHref(this._doc)}onPopState(t){const i=Os().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){const i=Os().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",t,!1),()=>i.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,i,r){fN()?this._history.pushState(t,i,r):this._location.hash=r}replaceState(t,i,r){fN()?this._history.replaceState(t,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:function(){return function S$(){return new hN(F(Nn))}()},providedIn:"platform"}),n})();function fN(){return!!window.history.pushState}function TD(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function pN(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function wa(n){return n&&"?"!==n[0]?"?"+n:n}let vc=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return vt(gN)},providedIn:"root"}),n})();const mN=new De("appBaseHref");let gN=(()=>{class n extends vc{constructor(t,i){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??vt(Nn).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return TD(this._baseHref,t)}path(t=!1){const i=this._platformLocation.pathname+wa(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${i}${r}`:i}pushState(t,i,r,o){const s=this.prepareExternalUrl(r+wa(o));this._platformLocation.pushState(t,i,s)}replaceState(t,i,r,o){const s=this.prepareExternalUrl(r+wa(o));this._platformLocation.replaceState(t,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}}return n.\u0275fac=function(t){return new(t||n)(F(MD),F(mN,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),E$=(()=>{class n extends vc{constructor(t,i){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(t){const i=TD(this._baseHref,t);return i.length>0?"#"+i:i}pushState(t,i,r,o){let s=this.prepareExternalUrl(r+wa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,i,s)}replaceState(t,i,r,o){let s=this.prepareExternalUrl(r+wa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}}return n.\u0275fac=function(t){return new(t||n)(F(MD),F(mN,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),SD=(()=>{class n{constructor(t){this._subject=new ie,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const i=this._locationStrategy.getBaseHref();this._basePath=function O$(n){if(new RegExp("^(https?:)?//").test(n)){const[,t]=n.split(/\/\/[^\/]+/);return t}return n}(pN(yN(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,i=""){return this.path()==this.normalize(t+wa(i))}normalize(t){return n.stripTrailingSlash(function I$(n,e){return n&&new RegExp(`^${n}([/;?#]|$)`).test(e)?e.substring(n.length):e}(this._basePath,yN(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,i="",r=null){this._locationStrategy.pushState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+wa(i)),r)}replaceState(t,i="",r=null){this._locationStrategy.replaceState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+wa(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",i){this._urlChangeListeners.forEach(r=>r(t,i))}subscribe(t,i,r){return this._subject.subscribe({next:t,error:i,complete:r})}}return n.normalizeQueryParams=wa,n.joinWithSlash=TD,n.stripTrailingSlash=pN,n.\u0275fac=function(t){return new(t||n)(F(vc))},n.\u0275prov=$({token:n,factory:function(){return function x$(){return new SD(F(vc))}()},providedIn:"root"}),n})();function yN(n){return n.replace(/\/index.html$/,"")}function SN(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const i=t.indexOf("="),[r,o]=-1==i?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}const RD=/\s+/,EN=[];let gi=(()=>{class n{constructor(t,i,r,o){this._iterableDiffers=t,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=EN,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(RD):EN}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(RD):t}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const i of t)this._updateState(i,!0);else if(null!=t)for(const i of Object.keys(t))this._updateState(i,Boolean(t[i]));this._applyStateDiff()}_updateState(t,i){const r=this.stateMap.get(t);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(t,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const i=t[0],r=t[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(t,i){(t=t.trim()).length>0&&t.split(RD).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(t){return new(t||n)(O(a_),O(Zf),O(kt),O(Vr))},n.\u0275dir=Me({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class pW{constructor(e,t,i,r){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Hr=(()=>{class n{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,i,r){this._viewContainer=t,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const i=this._viewContainer;t.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new pW(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),ON(a,r)}});for(let r=0,o=i.length;r{ON(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(O(Br),O(Eo),O(a_))},n.\u0275dir=Me({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function ON(n,e){n.context.$implicit=e.item}let nn=(()=>{class n{constructor(t,i){this._viewContainer=t,this._context=new gW,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){AN("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){AN("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(O(Br),O(Eo))},n.\u0275dir=Me({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class gW{constructor(){this.$implicit=null,this.ngIf=null}}function AN(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${mn(e)}'.`)}class FD{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}let Id=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews.push(t)}_matchCase(t){const i=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(t){if(this._defaultViews.length>0&&t!==this._defaultUsed){this._defaultUsed=t;for(const i of this._defaultViews)i.enforceState(t)}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Me({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),y_=(()=>{class n{constructor(t,i,r){this.ngSwitch=r,r._addCase(),this._view=new FD(t,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(t){return new(t||n)(O(Br),O(Eo),O(Id,9))},n.\u0275dir=Me({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),__=(()=>{class n{constructor(t,i,r){r._addDefault(new FD(t,i))}}return n.\u0275fac=function(t){return new(t||n)(O(Br),O(Eo),O(Id,9))},n.\u0275dir=Me({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),wr=(()=>{class n{constructor(t,i,r){this._ngEl=t,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,i){const[r,o]=t.split("."),s=-1===r.indexOf("-")?void 0:jr.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(t){t.forEachRemovedItem(i=>this._setStyle(i.key,null)),t.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),t.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(Zf),O(Vr))},n.\u0275dir=Me({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),Oo=(()=>{class n{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(t.ngTemplateOutlet||t.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&t.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(t){return new(t||n)(O(Br))},n.\u0275dir=Me({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Ji]}),n})();function ls(n,e){return new Q(2100,!1)}class _W{createSubscription(e,t){return e.subscribe({next:t,error:i=>{throw i}})}dispose(e){e.unsubscribe()}}class vW{createSubscription(e,t){return e.then(t,i=>{throw i})}dispose(e){}}const bW=new vW,wW=new _W;let NN=(()=>{class n{constructor(t){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,i=>this._updateLatestValue(t,i))}_selectStrategy(t){if(jf(t))return bW;if(OO(t))return wW;throw ls()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,i){t===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(t){return new(t||n)(O(qn,16))},n.\u0275pipe=Wn({name:"async",type:n,pure:!1,standalone:!0}),n})(),jD=(()=>{class n{transform(t){if(null==t)return null;if("string"!=typeof t)throw ls();return t.toLowerCase()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=Wn({name:"lowercase",type:n,pure:!0,standalone:!0}),n})();const CW=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;let PN=(()=>{class n{transform(t){if(null==t)return null;if("string"!=typeof t)throw ls();return t.replace(CW,i=>i[0].toUpperCase()+i.slice(1).toLowerCase())}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=Wn({name:"titlecase",type:n,pure:!0,standalone:!0}),n})(),zn=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({}),n})();const RN="browser";let BW=(()=>{class n{}return n.\u0275prov=$({token:n,providedIn:"root",factory:()=>new UW(F(Nn),window)}),n})();class UW{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const t=function HW(n,e){const t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,e);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),i=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=FN(this.window.history)||FN(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function FN(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class jN{}class gG extends D${constructor(){super(...arguments),this.supportsDOMEvents=!0}}class HD extends gG{static makeCurrent(){!function C$(n){DD||(DD=n)}(new HD)}onAndCancel(e,t,i){return e.addEventListener(t,i,!1),()=>{e.removeEventListener(t,i,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function yG(){return tp=tp||document.querySelector("base"),tp?tp.getAttribute("href"):null}();return null==t?null:function _G(n){b_=b_||document.createElement("a"),b_.setAttribute("href",n);const e=b_.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){tp=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return SN(document.cookie,e)}}let b_,tp=null;const $N=new De("TRANSITION_ID"),bG=[{provide:e_,useFactory:function vG(n,e,t){return()=>{t.get(t_).donePromise.then(()=>{const i=Os(),r=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const w_=new De("EventManagerPlugins");let C_=(()=>{class n{constructor(t,i){this._zone=i,this._eventNameToPlugin=new Map,t.forEach(r=>r.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,i,r){return this._findPluginFor(i).addEventListener(t,i,r)}addGlobalEventListener(t,i,r){return this._findPluginFor(i).addGlobalEventListener(t,i,r)}getZone(){return this._zone}_findPluginFor(t){const i=this._eventNameToPlugin.get(t);if(i)return i;const r=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(t){const i=new Set;t.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),np=(()=>{class n extends GN{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,i,r){t.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}addHost(t){const i=[];this._addStylesToHost(this._stylesSet,t,i),this._hostNodes.set(t,i)}removeHost(t){const i=this._hostNodes.get(t);i&&i.forEach(YN),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(t,r,i)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(YN))}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function YN(n){Os().remove(n)}const $D={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},WD=/%COMP%/g;function GD(n,e){return e.flat(100).map(t=>t.replace(WD,n))}function QN(n){return e=>{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let D_=(()=>{class n{constructor(t,i,r){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new YD(t)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;switch(i.encapsulation){case te.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new xG(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(t),r}case te.ShadowDom:return new IG(this.eventManager,this.sharedStylesHost,t,i);default:if(!this.rendererByCompId.has(i.id)){const r=GD(i.id,i.styles);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(F(C_),F(np),F(Qf))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class YD{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS($D[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){(JN(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(JN(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let i="string"==typeof e?document.querySelector(e):e;if(!i)throw new Error(`The selector "${e}" did not match any elements`);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;const o=$D[r];o?e.setAttributeNS(o,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){const r=$D[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(jr.DashCase|jr.Important)?e.style.setProperty(t,i,r&jr.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&jr.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e[t]=i}setValue(e,t){e.nodeValue=t}listen(e,t,i){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,QN(i)):this.eventManager.addEventListener(e,t,QN(i))}}function JN(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class xG extends YD{constructor(e,t,i,r){super(e),this.component=i;const o=GD(r+"-"+i.id,i.styles);t.addStyles(o),this.contentAttr=function TG(n){return"_ngcontent-%COMP%".replace(WD,n)}(r+"-"+i.id),this.hostAttr=function SG(n){return"_nghost-%COMP%".replace(WD,n)}(r+"-"+i.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}}class IG extends YD{constructor(e,t,i,r){super(e),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=GD(r.id,r.styles);for(let s=0;s{class n extends WN{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r){return t.addEventListener(i,r,!1),()=>this.removeEventListener(t,i,r)}removeEventListener(t,i,r){return t.removeEventListener(i,r)}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const XN=["alt","control","meta","shift"],AG={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},kG={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let NG=(()=>{class n extends WN{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,i,r){const o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Os().onAndCancel(t,o.domEventName,s))}static parseEventName(t){const i=t.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=n._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),XN.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(t,i){let r=AG[t.key]||t.key,o="";return i.indexOf("code.")>-1&&(r=t.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),XN.forEach(s=>{s!==r&&(0,kG[s])(t)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(t,i,r){return o=>{n.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>i(o))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const tP=[{provide:n_,useValue:RN},{provide:Fk,useValue:function PG(){HD.makeCurrent()},multi:!0},{provide:Nn,useFactory:function RG(){return function xU(n){rC=n}(document),document},deps:[]}],FG=Kk(_$,"browser",tP),nP=new De(""),iP=[{provide:i_,useClass:class wG{addToWindow(e){dn.getAngularTestability=(i,r=!0)=>{const o=e.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},dn.getAllAngularTestabilities=()=>e.getAllTestabilities(),dn.getAllAngularRootElements=()=>e.getAllRootElements(),dn.frameworkStabilizers||(dn.frameworkStabilizers=[]),dn.frameworkStabilizers.push(i=>{const r=dn.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,i){return null==t?null:e.getTestability(t)??(i?Os().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null)}},deps:[]},{provide:Wk,useClass:pD,deps:[Jt,mD,i_]},{provide:pD,useClass:pD,deps:[Jt,mD,i_]}],rP=[{provide:hC,useValue:"root"},{provide:cd,useFactory:function LG(){return new cd},deps:[]},{provide:w_,useClass:OG,multi:!0,deps:[Nn,Jt,n_]},{provide:w_,useClass:NG,multi:!0,deps:[Nn]},{provide:D_,useClass:D_,deps:[C_,np,Qf]},{provide:Nf,useExisting:D_},{provide:GN,useExisting:np},{provide:np,useClass:np,deps:[Nn]},{provide:C_,useClass:C_,deps:[w_,Jt]},{provide:jN,useClass:CG,deps:[]},[]];let oP=(()=>{class n{constructor(t){}static withServerTransition(t){return{ngModule:n,providers:[{provide:Qf,useValue:t.appId},{provide:$N,useExisting:Qf},bG]}}}return n.\u0275fac=function(t){return new(t||n)(F(nP,12))},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({providers:[...rP,...iP],imports:[zn,v$]}),n})(),sP=(()=>{class n{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:function(t){let i=null;return i=t?new t:function zG(){return new sP(F(Nn))}(),i},providedIn:"root"}),n})();typeof window<"u"&&window;let QD=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(t){let i=null;return i=t?new(t||n):F(ZD),i},providedIn:"root"}),n})(),ZD=(()=>{class n extends QD{constructor(t){super(),this._doc=t}sanitize(t,i){if(null==i)return null;switch(t){case kn.NONE:return i;case kn.HTML:return Ms(i,"HTML")?lo(i):bI(this._doc,String(i)).toString();case kn.STYLE:return Ms(i,"Style")?lo(i):i;case kn.SCRIPT:if(Ms(i,"Script"))return lo(i);throw new Error("unsafe value used in a script context");case kn.URL:return Ms(i,"URL")?lo(i):xy(String(i));case kn.RESOURCE_URL:if(Ms(i,"ResourceURL"))return lo(i);throw new Error(`unsafe value used in a resource URL context (see ${Pu})`);default:throw new Error(`Unexpected SecurityContext ${t} (see ${Pu})`)}}bypassSecurityTrustHtml(t){return function LU(n){return new IU(n)}(t)}bypassSecurityTrustStyle(t){return function RU(n){return new OU(n)}(t)}bypassSecurityTrustScript(t){return function FU(n){return new AU(n)}(t)}bypassSecurityTrustUrl(t){return function jU(n){return new kU(n)}(t)}bypassSecurityTrustResourceUrl(t){return function zU(n){return new NU(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:function(t){let i=null;return i=t?new t:function GG(n){return new ZD(n.get(Nn))}(F(yr)),i},providedIn:"root"}),n})();function Re(...n){let e=n[n.length-1];return vi(e)?(n.pop(),Vt(n,e)):Ga(n)}function ol(n,e){return Jn(n,e,1)}function ni(n,e){return function(i){return i.lift(new YG(n,e))}}class YG{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new qG(e,this.predicate,this.thisArg))}}class qG extends ee{constructor(e,t,i){super(e),this.predicate=t,this.thisArg=i,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(i){return void this.destination.error(i)}t&&this.destination.next(e)}}class M_{}class JD{}class Cr{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(t=>{const i=t.indexOf(":");if(i>0){const r=t.slice(0,i),o=r.toLowerCase(),s=t.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(t=>{let i=e[t];const r=t.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(t,r))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof Cr?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){const t=new Cr;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof Cr?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(e.name,t);const r=("a"===e.op?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":const o=e.value;if(o){let s=this.headers.get(t);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class KG{encodeKey(e){return cP(e)}encodeValue(e){return cP(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const ZG=/%(\d[a-f0-9])/gi,JG={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function cP(n){return encodeURIComponent(n).replace(ZG,(e,t)=>JG[t]??e)}function T_(n){return`${n}`}class cs{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new KG,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function QG(n,e){const t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const i=e.fromObject[t],r=Array.isArray(i)?i.map(T_):[T_(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){const t=[];return Object.keys(e).forEach(i=>{const r=e[i];Array.isArray(r)?r.forEach(o=>{t.push({param:i,value:o,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new cs({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(T_(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let i=this.map.get(e.param)||[];const r=i.indexOf(T_(e.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class XG{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function uP(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function dP(n){return typeof Blob<"u"&&n instanceof Blob}function hP(n){return typeof FormData<"u"&&n instanceof FormData}class Da{constructor(e,t,i,r){let o;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function eY(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Cr),this.context||(this.context=new XG),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=t;else{const a=t.indexOf("?");this.urlWithParams=t+(-1===a?"?":ad.set(h,e.setHeaders[h]),l)),e.setParams&&(c=Object.keys(e.setParams).reduce((d,h)=>d.set(h,e.setParams[h]),c)),new Da(t,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var En=(()=>((En=En||{})[En.Sent=0]="Sent",En[En.UploadProgress=1]="UploadProgress",En[En.ResponseHeader=2]="ResponseHeader",En[En.DownloadProgress=3]="DownloadProgress",En[En.Response=4]="Response",En[En.User=5]="User",En))();class XD{constructor(e,t=200,i="OK"){this.headers=e.headers||new Cr,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class eM extends XD{constructor(e={}){super(e),this.type=En.ResponseHeader}clone(e={}){return new eM({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class S_ extends XD{constructor(e={}){super(e),this.type=En.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new S_({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class fP extends XD{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${e.url||"(unknown url)"}`:`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function tM(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let tr=(()=>{class n{constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof Da)o=t;else{let l,c;l=r.headers instanceof Cr?r.headers:new Cr(r.headers),r.params&&(c=r.params instanceof cs?r.params:new cs({fromObject:r.params})),o=new Da(t,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=Re(o).pipe(ol(l=>this.handler.handle(l)));if(t instanceof Da||"events"===r.observe)return s;const a=s.pipe(ni(l=>l instanceof S_));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(ue(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(ue(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(ue(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(ue(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:(new cs).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,tM(r,i))}post(t,i,r={}){return this.request("POST",t,tM(r,i))}put(t,i,r={}){return this.request("PUT",t,tM(r,i))}}return n.\u0275fac=function(t){return new(t||n)(F(M_))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function pP(n,e){return e(n)}function nY(n,e){return(t,i)=>e.intercept(t,{handle:r=>n(r,i)})}const rY=new De("HTTP_INTERCEPTORS"),ip=new De("HTTP_INTERCEPTOR_FNS");function oY(){let n=null;return(e,t)=>(null===n&&(n=(vt(rY,{optional:!0})??[]).reduceRight(nY,pP)),n(e,t))}let mP=(()=>{class n extends M_{constructor(t,i){super(),this.backend=t,this.injector=i,this.chain=null}handle(t){if(null===this.chain){const i=Array.from(new Set(this.injector.get(ip)));this.chain=i.reduceRight((r,o)=>function iY(n,e,t){return(i,r)=>t.runInContext(()=>e(i,o=>n(o,r)))}(r,o,this.injector),pP)}return this.chain(t,i=>this.backend.handle(i))}}return n.\u0275fac=function(t){return new(t||n)(F(JD),F(Ts))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const cY=/^\)\]\}',?\n/;let yP=(()=>{class n{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Se(i=>{const r=this.xhrFactory.build();if(r.open(t.method,t.urlWithParams),t.withCredentials&&(r.withCredentials=!0),t.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),t.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const f=t.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(t.responseType){const f=t.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=t.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Cr(r.getAllResponseHeaders()),m=function uY(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||t.url;return s=new eM({headers:p,status:r.status,statusText:f,url:m}),s},l=()=>{let{headers:f,status:p,statusText:m,url:g}=a(),y=null;204!==p&&(y=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=y?200:0);let v=p>=200&&p<300;if("json"===t.responseType&&"string"==typeof y){const w=y;y=y.replace(cY,"");try{y=""!==y?JSON.parse(y):null}catch(_){y=w,v&&(v=!1,y={error:_,text:y})}}v?(i.next(new S_({body:y,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new fP({error:y,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new fP({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(m)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:En.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===t.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:En.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),t.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:En.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),t.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(t){return new(t||n)(F(jN))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const nM=new De("XSRF_ENABLED"),_P="XSRF-TOKEN",vP=new De("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>_P}),bP="X-XSRF-TOKEN",wP=new De("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>bP});class CP{}let dY=(()=>{class n{constructor(t,i,r){this.doc=t,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=SN(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return n.\u0275fac=function(t){return new(t||n)(F(Nn),F(n_),F(vP))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function hY(n,e){const t=n.url.toLowerCase();if(!vt(nM)||"GET"===n.method||"HEAD"===n.method||t.startsWith("http://")||t.startsWith("https://"))return e(n);const i=vt(CP).getToken(),r=vt(wP);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),e(n)}var li=(()=>((li=li||{})[li.Interceptors=0]="Interceptors",li[li.LegacyInterceptors=1]="LegacyInterceptors",li[li.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",li[li.NoXsrfProtection=3]="NoXsrfProtection",li[li.JsonpSupport=4]="JsonpSupport",li[li.RequestsMadeViaParent=5]="RequestsMadeViaParent",li))();function Od(n,e){return{\u0275kind:n,\u0275providers:e}}function fY(...n){const e=[tr,yP,mP,{provide:M_,useExisting:mP},{provide:JD,useExisting:yP},{provide:ip,useValue:hY,multi:!0},{provide:nM,useValue:!0},{provide:CP,useClass:dY}];for(const t of n)e.push(...t.\u0275providers);return function e8(n){return{\u0275providers:n}}(e)}const DP=new De("LEGACY_INTERCEPTOR_FN");function mY({cookieName:n,headerName:e}){const t=[];return void 0!==n&&t.push({provide:vP,useValue:n}),void 0!==e&&t.push({provide:wP,useValue:e}),Od(li.CustomXsrfConfiguration,t)}let iM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({providers:[fY(Od(li.LegacyInterceptors,[{provide:DP,useFactory:oY},{provide:ip,useExisting:DP,multi:!0}]),mY({cookieName:_P,headerName:bP}))]}),n})();class gY extends oe{constructor(e,t){super()}schedule(e,t=0){return this}}class E_ extends gY{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this}requestAsyncId(e,t,i=0){return setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,t,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(e,t);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let r,i=!1;try{this.work(e)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const e=this.id,t=this.scheduler,i=t.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}let MP=(()=>{class n{constructor(t,i=n.now){this.SchedulerAction=t,this.now=i}schedule(t,i=0,r){return new this.SchedulerAction(this,t).schedule(r,i)}}return n.now=()=>Date.now(),n})();class us extends MP{constructor(e,t=MP.now){super(e,()=>us.delegate&&us.delegate!==this?us.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,i){return us.delegate&&us.delegate!==this?us.delegate.schedule(e,t,i):super.schedule(e,t,i)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let i;this.active=!0;do{if(i=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,i){for(;e=t.shift();)e.unsubscribe();throw i}}}const rM=new class _Y extends us{}(class yY extends E_{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(e,t,i):e.flush(this)}}),vY=rM,sl=new Se(n=>n.complete());function x_(n){return n?function bY(n){return new Se(e=>n.schedule(()=>e.complete()))}(n):sl}function ho(n,e){return new Se(e?t=>e.schedule(wY,0,{error:n,subscriber:t}):t=>t.error(n))}function wY({error:n,subscriber:e}){e.error(n)}class Ao{constructor(e,t,i){this.kind=e,this.value=t,this.error=i,this.hasValue="N"===e}observe(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}do(e,t,i){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return i&&i()}}accept(e,t,i){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,i)}toObservable(){switch(this.kind){case"N":return Re(this.value);case"E":return ho(this.error);case"C":return x_()}throw new Error("unexpected notification kind value")}static createNext(e){return typeof e<"u"?new Ao("N",e):Ao.undefinedValueNotification}static createError(e){return new Ao("E",void 0,e)}static createComplete(){return Ao.completeNotification}}Ao.completeNotification=new Ao("C"),Ao.undefinedValueNotification=new Ao("N",void 0);class DY{constructor(e,t=0){this.scheduler=e,this.delay=t}call(e,t){return t.subscribe(new I_(e,this.scheduler,this.delay))}}class I_ extends ee{constructor(e,t,i=0){super(e),this.scheduler=t,this.delay=i}static dispatch(e){const{notification:t,destination:i}=e;t.observe(i),this.unsubscribe()}scheduleMessage(e){this.destination.add(this.scheduler.schedule(I_.dispatch,this.delay,new MY(e,this.destination)))}_next(e){this.scheduleMessage(Ao.createNext(e))}_error(e){this.scheduleMessage(Ao.createError(e)),this.unsubscribe()}_complete(){this.scheduleMessage(Ao.createComplete()),this.unsubscribe()}}class MY{constructor(e,t){this.notification=e,this.destination=t}}class O_ extends ae{constructor(e=Number.POSITIVE_INFINITY,t=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=e<1?1:e,this._windowTime=t<1?1:t,t===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(e){if(!this.isStopped){const t=this._events;t.push(e),t.length>this._bufferSize&&t.shift()}super.next(e)}nextTimeWindow(e){this.isStopped||(this._events.push(new TY(this._getNow(),e)),this._trimBufferThenGetEvents()),super.next(e)}_subscribe(e){const t=this._infiniteTimeWindow,i=t?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;let s;if(this.closed)throw new ve;if(this.isStopped||this.hasError?s=oe.EMPTY:(this.observers.push(e),s=new qe(this,e)),r&&e.add(e=new I_(e,r)),t)for(let a=0;at&&(s=Math.max(s,o-t)),s>0&&r.splice(0,s),r}}class TY{constructor(e,t){this.time=e,this.value=t}}function yi(n,e){return"function"==typeof e?t=>t.pipe(yi((i,r)=>_t(n(i,r)).pipe(ue((o,s)=>e(i,o,r,s))))):t=>t.lift(new SY(n))}class SY{constructor(e){this.project=e}call(e,t){return t.subscribe(new EY(e,this.project))}}class EY extends Yo{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t;const i=this.index++;try{t=this.project(e,i)}catch(r){return void this.destination.error(r)}this._innerSub(t)}_innerSub(e){const t=this.innerSubscription;t&&t.unsubscribe();const i=new Vn(this),r=this.destination;r.add(i),this.innerSubscription=Ql(e,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;(!e||e.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}}const A_={schedule(n,e){const t=setTimeout(n,e);return()=>clearTimeout(t)},scheduleBeforeRender(n){if(typeof window>"u")return A_.schedule(n,0);if(typeof window.requestAnimationFrame>"u")return A_.schedule(n,16);const e=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(e)}};let oM;function RY(n,e,t){let i=t;return function IY(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&e.some((r,o)=>!("*"===r||!function AY(n,e){if(!oM){const t=Element.prototype;oM=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&oM.call(n,e)}(n,r)||(i=o,0))),i}class jY{constructor(e,t){this.componentFactory=t.get(dc).resolveComponentFactory(e)}create(e){return new zY(this.componentFactory,e)}}class zY{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new O_(1),this.events=this.eventEmitters.pipe(yi(i=>ys(...i))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:i})=>i)),this.ngZone=this.injector.get(Jt),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=A_.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(e){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){this.runInZone(()=>{null!==this.componentRef?function kY(n,e){return n===e||n!=n&&e!=e}(t,this.getInputValue(e))&&(void 0!==t||!this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges()):this.initialInputValues.set(e,t)})}initializeComponent(e){const t=yr.create({providers:[],parent:this.injector}),i=function LY(n,e){const t=n.childNodes,i=e.map(()=>[]);let r=-1;e.some((o,s)=>"*"===o&&(r=s,!0));for(let o=0,s=t.length;o{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e))}),this.initialInputValues.clear()}initializeOutputs(e){const t=this.componentFactory.outputs.map(({propName:i,templateName:r})=>e.instance[i].pipe(ue(s=>({name:r,value:s}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||null===this.inputChanges)return;const t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=A_.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[e];if(i)return void(i.currentValue=t);const r=this.unchangedInputs.has(e),o=r?void 0:this.getInputValue(e);this.inputChanges[e]=new WE(o,t,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}}class VY extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function k_(n,e){return new Se(t=>{const i=n.length;if(0===i)return void t.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>t.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&t.next(e?e.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),t.complete())}}))}})}let TP=(()=>{class n{constructor(t,i){this._renderer=t,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return n.\u0275fac=function(t){return new(t||n)(O(Vr),O(kt))},n.\u0275dir=Me({type:n}),n})(),bc=(()=>{class n extends TP{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Oi(n)))(i||n)}}(),n.\u0275dir=Me({type:n,features:[yn]}),n})();const Dr=new De("NgValueAccessor"),$Y={provide:Dr,useExisting:Bt(()=>al),multi:!0},GY=new De("CompositionEventMode");let al=(()=>{class n extends TP{constructor(t,i,r){super(t,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function WY(){const n=Os()?Os().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return n.\u0275fac=function(t){return new(t||n)(O(Vr),O(kt),O(GY,8))},n.\u0275dir=Me({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,i){1&t&&de("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Nt([$Y]),yn]}),n})();function ll(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function EP(n){return null!=n&&"number"==typeof n.length}const nr=new De("NgValidators"),cl=new De("NgAsyncValidators"),qY=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class wc{static min(e){return function xP(n){return e=>{if(ll(e.value)||ll(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t{if(ll(e.value)||ll(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}(e)}static required(e){return function OP(n){return ll(n.value)?{required:!0}:null}(e)}static requiredTrue(e){return function AP(n){return!0===n.value?null:{required:!0}}(e)}static email(e){return function kP(n){return ll(n.value)||qY.test(n.value)?null:{email:!0}}(e)}static minLength(e){return function NP(n){return e=>ll(e.value)||!EP(e.value)?null:e.value.lengthEP(e.value)&&e.value.length>n?{maxlength:{requiredLength:n,actualLength:e.value.length}}:null}(e)}static pattern(e){return function LP(n){if(!n)return N_;let e,t;return"string"==typeof n?(t="","^"!==n.charAt(0)&&(t+="^"),t+=n,"$"!==n.charAt(n.length-1)&&(t+="$"),e=new RegExp(t)):(t=n.toString(),e=n),i=>{if(ll(i.value))return null;const r=i.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}(e)}static nullValidator(e){return null}static compose(e){return BP(e)}static composeAsync(e){return UP(e)}}function N_(n){return null}function RP(n){return null!=n}function FP(n){return jf(n)?_t(n):n}function jP(n){let e={};return n.forEach(t=>{e=null!=t?{...e,...t}:e}),0===Object.keys(e).length?null:e}function zP(n,e){return e.map(t=>t(n))}function VP(n){return n.map(e=>function KY(n){return!n.validate}(e)?e:t=>e.validate(t))}function BP(n){if(!n)return null;const e=n.filter(RP);return 0==e.length?null:function(t){return jP(zP(t,e))}}function sM(n){return null!=n?BP(VP(n)):null}function UP(n){if(!n)return null;const e=n.filter(RP);return 0==e.length?null:function(t){return function UY(...n){if(1===n.length){const e=n[0];if(R(e))return k_(e,null);if(P(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return k_(t.map(i=>e[i]),t)}}if("function"==typeof n[n.length-1]){const e=n.pop();return k_(n=1===n.length&&R(n[0])?n[0]:n,null).pipe(ue(t=>e(...t)))}return k_(n,null)}(zP(t,e).map(FP)).pipe(ue(jP))}}function aM(n){return null!=n?UP(VP(n)):null}function HP(n,e){return null===n?[e]:Array.isArray(n)?[...n,e]:[n,e]}function $P(n){return n._rawValidators}function WP(n){return n._rawAsyncValidators}function lM(n){return n?Array.isArray(n)?n:[n]:[]}function P_(n,e){return Array.isArray(n)?n.includes(e):n===e}function GP(n,e){const t=lM(e);return lM(n).forEach(r=>{P_(t,r)||t.push(r)}),t}function YP(n,e){return lM(e).filter(t=>!P_(n,t))}class qP{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=sM(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=aM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}class Mr extends qP{get formDirective(){return null}get path(){return null}}class Ma extends qP{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class KP{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Cc=(()=>{class n extends KP{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(O(Ma,2))},n.\u0275dir=Me({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,i){2&t&&es("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[yn]}),n})(),Ad=(()=>{class n extends KP{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(O(Mr,10))},n.\u0275dir=Me({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,i){2&t&&es("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[yn]}),n})();const rp="VALID",R_="INVALID",kd="PENDING",op="DISABLED";function hM(n){return(F_(n)?n.validators:n)||null}function fM(n,e){return(F_(e)?e.asyncValidators:n)||null}function F_(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function ZP(n,e,t){const i=n.controls;if(!(e?Object.keys(i):i).length)throw new Q(1e3,"");if(!i[t])throw new Q(1001,"")}function JP(n,e,t){n._forEachChild((i,r)=>{if(void 0===t[r])throw new Q(1002,"")})}class j_{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===rp}get invalid(){return this.status===R_}get pending(){return this.status==kd}get disabled(){return this.status===op}get enabled(){return this.status!==op}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(GP(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(GP(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(YP(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(YP(e,this._rawAsyncValidators))}hasValidator(e){return P_(this._rawValidators,e)}hasAsyncValidator(e){return P_(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=kd,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=op,this.errors=null,this._forEachChild(i=>{i.disable({...e,onlySelf:!0})}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=rp,this._forEachChild(i=>{i.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===rp||this.status===kd)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?op:rp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=kd,this._hasOwnPendingAsyncValidator=!0;const t=FP(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){let t=e;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){const i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new ie,this.statusChanges=new ie}_calculateStatus(){return this._allControlsDisabled()?op:this.errors?R_:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(kd)?kd:this._anyControlsHaveStatus(R_)?R_:rp}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){F_(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function nq(n){return Array.isArray(n)?sM(n):n||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function iq(n){return Array.isArray(n)?aM(n):n||null}(this._rawAsyncValidators)}}class Nd extends j_{constructor(e,t,i){super(hM(t),fM(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,i={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){JP(this,0,e),Object.keys(e).forEach(i=>{ZP(this,!0,i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(i=>{const r=this.controls[i];r&&r.patchValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,i)=>(e[i]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,i)=>!!i._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const i=this.controls[t];i&&e(i,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[t,i]of Object.entries(this.controls))if(this.contains(t)&&e(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,i,r)=>((i.enabled||this.disabled)&&(t[r]=i.value),t))}_reduceChildren(e,t){let i=e;return this._forEachChild((r,o)=>{i=t(i,r,o)}),i}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class XP extends Nd{}const Pd=new De("CallSetDisabledState",{providedIn:"root",factory:()=>z_}),z_="always";function V_(n,e){return[...e.path,n]}function sp(n,e,t=z_){pM(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||"always"===t)&&e.valueAccessor.setDisabledState?.(n.disabled),function oq(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&e2(n,e)})}(n,e),function aq(n,e){const t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}(n,e),function sq(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&e2(n,e),"submit"!==n.updateOn&&n.markAsTouched()})}(n,e),function rq(n,e){if(e.valueAccessor.setDisabledState){const t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}(n,e)}function B_(n,e,t=!0){const i=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i)),H_(n,e),n&&(e._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function U_(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function pM(n,e){const t=$P(n);null!==e.validator?n.setValidators(HP(t,e.validator)):"function"==typeof t&&n.setValidators([t]);const i=WP(n);null!==e.asyncValidator?n.setAsyncValidators(HP(i,e.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();U_(e._rawValidators,r),U_(e._rawAsyncValidators,r)}function H_(n,e){let t=!1;if(null!==n){if(null!==e.validator){const r=$P(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==e.validator);o.length!==r.length&&(t=!0,n.setValidators(o))}}if(null!==e.asyncValidator){const r=WP(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==e.asyncValidator);o.length!==r.length&&(t=!0,n.setAsyncValidators(o))}}}const i=()=>{};return U_(e._rawValidators,i),U_(e._rawAsyncValidators,i),t}function e2(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function gM(n,e){if(!n.hasOwnProperty("model"))return!1;const t=n.model;return!!t.isFirstChange()||!Object.is(e,t.currentValue)}function yM(n,e){if(!e)return null;let t,i,r;return Array.isArray(e),e.forEach(o=>{o.constructor===al?t=o:function uq(n){return Object.getPrototypeOf(n.constructor)===bc}(o)?i=o:r=o}),r||i||t||null}function r2(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}function o2(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Ld=class extends j_{constructor(e=null,t,i){super(hM(t),fM(i,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),F_(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=o2(e)?e.value:e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){r2(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){r2(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){o2(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},mq={provide:Ma,useExisting:Bt(()=>$_)},l2=(()=>Promise.resolve())();let $_=(()=>{class n extends Ma{constructor(t,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new Ld,this._registered=!1,this.update=new ie,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=yM(0,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),gM(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){sp(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){l2.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const i=t.isDisabled.currentValue,r=0!==i&&function xd(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}(i);l2.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?V_(t,this._parent):[t]}}return n.\u0275fac=function(t){return new(t||n)(O(Mr,9),O(nr,10),O(cl,10),O(Dr,10),O(qn,8),O(Pd,8))},n.\u0275dir=Me({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Nt([mq]),yn,Ji]}),n})(),Rd=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Me({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),u2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({}),n})();const vM=new De("NgModelWithFormControlWarning"),wq={provide:Mr,useExisting:Bt(()=>Ta)};let Ta=(()=>{class n extends Mr{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new ie,this._setValidators(t),this._setAsyncValidators(i)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(H_(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const i=this.form.get(t.path);return sp(i,t,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),i}getControl(t){return this.form.get(t.path)}removeControl(t){B_(t.control||null,t,!1),function dq(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,i){this.form.get(t.path).setValue(i)}onSubmit(t){return this.submitted=!0,function n2(n,e){n._syncPendingControls(),e.forEach(t=>{const i=t.control;"submit"===i.updateOn&&i._pendingChange&&(t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const i=t.control,r=this.form.get(t.path);i!==r&&(B_(i||null,t),(n=>n instanceof Ld)(r)&&(sp(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const i=this.form.get(t.path);(function t2(n,e){pM(n,e)})(i,t),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const i=this.form.get(t.path);i&&function lq(n,e){return H_(n,e)}(i,t)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){pM(this.form,this),this._oldForm&&H_(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(t){return new(t||n)(O(nr,10),O(cl,10),O(Pd,8))},n.\u0275dir=Me({type:n,selectors:[["","formGroup",""]],hostBindings:function(t,i){1&t&&de("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Nt([wq]),yn,Ji]}),n})();const Mq={provide:Ma,useExisting:Bt(()=>Dc)};let Dc=(()=>{class n extends Ma{set isDisabled(t){}constructor(t,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new ie,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=yM(0,o)}ngOnChanges(t){this._added||this._setUpControl(),gM(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return V_(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(t){return new(t||n)(O(Mr,13),O(nr,10),O(cl,10),O(Dr,10),O(vM,8))},n.\u0275dir=Me({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Nt([Mq]),yn,Ji]}),n})(),S2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[u2]}),n})();class E2 extends j_{constructor(e,t,i){super(hM(t),fM(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,i={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,t={}){let i=this._adjustIndex(e);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,i={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){JP(this,0,e),e.forEach((i,r)=>{ZP(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((t,i)=>!!i._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,i)=>{e(t,i)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function x2(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let W_=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new n;return t.useNonNullable=!0,t}group(t,i=null){const r=this._reduceControls(t);let o={};return x2(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Nd(r,o)}record(t,i=null){const r=this._reduceControls(t);return new XP(r,i)}control(t,i,r){let o={};return this.useNonNullable?(x2(i)?o=i:(o.validators=i,o.asyncValidators=r),new Ld(t,{...o,nonNullable:!0})):new Ld(t,i,r)}array(t,i,r){const o=t.map(s=>this._createControl(s));return new E2(o,i,r)}_reduceControls(t){const i={};return Object.keys(t).forEach(r=>{i[r]=this._createControl(t[r])}),i}_createControl(t){return t instanceof Ld||t instanceof j_?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),G_=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Pd,useValue:t.callSetDisabledState??z_}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[S2]}),n})(),Y_=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:vM,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Pd,useValue:t.callSetDisabledState??z_}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[S2]}),n})();class I2{}class zq{}const Sa="*";function TM(n,e){return{type:7,name:n,definitions:e,options:{}}}function lp(n,e=null){return{type:4,styles:e,timings:n}}function O2(n,e=null){return{type:2,steps:n,options:e}}function Bi(n){return{type:6,styles:n,offset:null}}function A2(n,e,t){return{type:0,name:n,styles:e,options:t}}function cp(n,e,t=null){return{type:1,expr:n,animation:e,options:t}}function k2(n,e=null){return{type:8,animation:n,options:e}}function N2(n,e=null){return{type:10,animation:n,options:e}}function P2(n){Promise.resolve().then(n)}class up{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){P2(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class L2{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,i=0,r=0;const o=this.players.length;0==o?P2(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++t==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(r)})}getPosition(){const e=this.players.reduce((t,i)=>null===t||i.totalTime>t.totalTime?i:t,null);return null!=e?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}function R2(n){return new Q(3e3,!1)}function wK(){return typeof window<"u"&&typeof window.document<"u"}function EM(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function ul(n){switch(n.length){case 0:return new up;case 1:return n[0];default:return new L2(n)}}function F2(n,e,t,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,m)=>{let g=m,y=p;if("offset"!==m)switch(g=e.normalizePropertyName(g,s),y){case"!":y=r.get(m);break;case Sa:y=o.get(m);break;default:y=e.normalizeStyleValue(m,g,y,s)}f.set(g,y)}),h||a.push(f),c=f,l=d}),s.length)throw function cK(n){return new Q(3502,!1)}();return a}function xM(n,e,t,i){switch(e){case"start":n.onStart(()=>i(t&&IM(t,"start",n)));break;case"done":n.onDone(()=>i(t&&IM(t,"done",n)));break;case"destroy":n.onDestroy(()=>i(t&&IM(t,"destroy",n)))}}function IM(n,e,t){const o=OM(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,t.totalTime??n.totalTime,!!t.disabled),s=n._data;return null!=s&&(o._data=s),o}function OM(n,e,t,i,r="",o=0,s){return{element:n,triggerName:e,fromState:t,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fo(n,e,t){let i=n.get(e);return i||n.set(e,i=t),i}function j2(n){const e=n.indexOf(":");return[n.substring(1,e),n.slice(e+1)]}let AM=(n,e)=>!1,z2=(n,e,t)=>[],V2=null;function kM(n){const e=n.parentNode||n.host;return e===V2?null:e}(EM()||typeof Element<"u")&&(wK()?(V2=(()=>document.documentElement)(),AM=(n,e)=>{for(;e;){if(e===n)return!0;e=kM(e)}return!1}):AM=(n,e)=>n.contains(e),z2=(n,e,t)=>{if(t)return Array.from(n.querySelectorAll(e));const i=n.querySelector(e);return i?[i]:[]});let Tc=null,B2=!1;const U2=AM,H2=z2;let $2=(()=>{class n{validateStyleProperty(t){return function DK(n){Tc||(Tc=function MK(){return typeof document<"u"?document.body:null}()||{},B2=!!Tc.style&&"WebkitAppearance"in Tc.style);let e=!0;return Tc.style&&!function CK(n){return"ebkit"==n.substring(1,6)}(n)&&(e=n in Tc.style,!e&&B2&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Tc.style)),e}(t)}matchesElement(t,i){return!1}containsElement(t,i){return U2(t,i)}getParentElement(t){return kM(t)}query(t,i,r){return H2(t,i,r)}computeStyle(t,i,r){return r||""}animate(t,i,r,o,s,a=[],l){return new up(r,o)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),NM=(()=>{class n{}return n.NOOP=new $2,n})();const PM="ng-enter",q_="ng-leave",K_="ng-trigger",Q_=".ng-trigger",G2="ng-animating",LM=".ng-animating";function Ea(n){if("number"==typeof n)return n;const e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:RM(parseFloat(e[1]),e[2])}function RM(n,e){return"s"===e?1e3*n:n}function Z_(n,e,t){return n.hasOwnProperty("duration")?n:function EK(n,e,t){let r,o=0,s="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return e.push(R2()),{duration:0,delay:0,easing:""};r=RM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=RM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=n;if(!t){let a=!1,l=e.length;r<0&&(e.push(function Bq(){return new Q(3100,!1)}()),a=!0),o<0&&(e.push(function Uq(){return new Q(3101,!1)}()),a=!0),a&&e.splice(l,0,R2())}return{duration:r,delay:o,easing:s}}(n,e,t)}function dp(n,e={}){return Object.keys(n).forEach(t=>{e[t]=n[t]}),e}function Y2(n){const e=new Map;return Object.keys(n).forEach(t=>{e.set(t,n[t])}),e}function dl(n,e=new Map,t){if(t)for(let[i,r]of t)e.set(i,r);for(let[i,r]of n)e.set(i,r);return e}function K2(n,e,t){return t?e+":"+t+";":""}function Q2(n){let e="";for(let t=0;t{const o=jM(r);t&&!t.has(r)&&t.set(r,n.style[o]),n.style[o]=i}),EM()&&Q2(n))}function Sc(n,e){n.style&&(e.forEach((t,i)=>{const r=jM(i);n.style[r]=""}),EM()&&Q2(n))}function hp(n){return Array.isArray(n)?1==n.length?n[0]:O2(n):n}const FM=new RegExp("{{\\s*(.+?)\\s*}}","g");function Z2(n){let e=[];if("string"==typeof n){let t;for(;t=FM.exec(n);)e.push(t[1]);FM.lastIndex=0}return e}function fp(n,e,t){const i=n.toString(),r=i.replace(FM,(o,s)=>{let a=e[s];return null==a&&(t.push(function $q(n){return new Q(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function J_(n){const e=[];let t=n.next();for(;!t.done;)e.push(t.value),t=n.next();return e}const OK=/-+([a-z0-9])/g;function jM(n){return n.replace(OK,(...e)=>e[1].toUpperCase())}function AK(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function po(n,e,t){switch(e.type){case 7:return n.visitTrigger(e,t);case 0:return n.visitState(e,t);case 1:return n.visitTransition(e,t);case 2:return n.visitSequence(e,t);case 3:return n.visitGroup(e,t);case 4:return n.visitAnimate(e,t);case 5:return n.visitKeyframes(e,t);case 6:return n.visitStyle(e,t);case 8:return n.visitReference(e,t);case 9:return n.visitAnimateChild(e,t);case 10:return n.visitAnimateRef(e,t);case 11:return n.visitQuery(e,t);case 12:return n.visitStagger(e,t);default:throw function Wq(n){return new Q(3004,!1)}()}}function J2(n,e){return window.getComputedStyle(n)[e]}function FK(n,e){const t=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function jK(n,e,t){if(":"==n[0]){const l=function zK(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i) *"}}(n,t);if("function"==typeof l)return void e.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return t.push(function rK(n){return new Q(3015,!1)}()),e;const r=i[1],o=i[2],s=i[3];e.push(X2(r,s));"<"==o[0]&&!("*"==r&&"*"==s)&&e.push(X2(s,r))}(i,t,e)):t.push(n),t}const nv=new Set(["true","1"]),iv=new Set(["false","0"]);function X2(n,e){const t=nv.has(n)||iv.has(n),i=nv.has(e)||iv.has(e);return(r,o)=>{let s="*"==n||n==r,a="*"==e||e==o;return!s&&t&&"boolean"==typeof r&&(s=r?nv.has(n):iv.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?nv.has(e):iv.has(e)),s&&a}}const VK=new RegExp("s*:selfs*,?","g");function zM(n,e,t,i){return new BK(n).build(e,t,i)}class BK{constructor(e){this._driver=e}build(e,t,i){const r=new $K(t);return this._resetContextStyleTimingState(r),po(this,hp(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles=new Map,e.collectedStyles.set("",new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,r=t.depCount=0;const o=[],s=[];return"@"==e.name.charAt(0)&&t.errors.push(function Yq(){return new Q(3006,!1)}()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,t))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,t);i+=l.queryCount,r+=l.depCount,s.push(l)}else t.errors.push(function qq(){return new Q(3007,!1)}())}),{type:7,name:e.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(e,t){const i=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{Z2(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(J_(o.values()),t.errors.push(function Kq(n,e){return new Q(3008,!1)}()))}return{type:0,name:e.name,style:i,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const i=po(this,hp(e.animation),t);return{type:1,matchers:FK(e.expr,t.errors),animation:i,queryCount:t.queryCount,depCount:t.depCount,options:Ec(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(i=>po(this,i,t)),options:Ec(e.options)}}visitGroup(e,t){const i=t.currentTime;let r=0;const o=e.steps.map(s=>{t.currentTime=i;const a=po(this,s,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:3,steps:o,options:Ec(e.options)}}visitAnimate(e,t){const i=function GK(n,e){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return VM(Z_(n,e).duration,0,"");const t=n;if(t.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=VM(0,0,"");return o.dynamic=!0,o.strValue=t,o}const r=Z_(t,e);return VM(r.duration,r.delay,r.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;let r,o=e.styles?e.styles:Bi({});if(5==o.type)r=this.visitKeyframes(o,t);else{let s=e.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Bi(c)}t.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,t);l.isEmptyStep=a,r=l}return t.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(e,t){const i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){const i=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of r)"string"==typeof a?a===Sa?i.push(a):t.errors.push(new Q(3002,!1)):i.push(Y2(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,t){const i=t.currentAnimateTimings;let r=t.currentTime,o=t.currentTime;i&&o>0&&(o-=i.duration+i.delay),e.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=t.collectedStyles.get(t.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(t.errors.push(function Zq(n,e,t,i,r){return new Q(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),t.options&&function IK(n,e,t){const i=e.params||{},r=Z2(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||t.push(function Hq(n){return new Q(3001,!1)}())})}(a,t.options,t.errors)})})}visitKeyframes(e,t){const i={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function Jq(){return new Q(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=e.steps.map(y=>{const v=this._makeStyleAst(y,t);let w=null!=v.offset?v.offset:function WK(n){if("string"==typeof n)return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){const i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}(v.styles),_=0;return null!=w&&(o++,_=v.offset=w),l=l||_<0||_>1,a=a||_0&&o{const w=h>0?v==f?1:h*v:s[v],_=w*g;t.currentTime=p+m.delay+_,m.duration=_,this._validateStyleAst(y,t),y.offset=w,i.styles.push(y)}),i}visitReference(e,t){return{type:8,animation:po(this,hp(e.animation),t),options:Ec(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:Ec(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:Ec(e.options)}}visitQuery(e,t){const i=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;const[o,s]=function UK(n){const e=!!n.split(/\s*,\s*/).find(t=>":self"==t);return e&&(n=n.replace(VK,"")),n=n.replace(/@\*/g,Q_).replace(/@\w+/g,t=>Q_+"-"+t.slice(1)).replace(/:animating/g,LM),[n,e]}(e.selector);t.currentQuerySelector=i.length?i+" "+o:o,fo(t.collectedStyles,t.currentQuerySelector,new Map);const a=po(this,hp(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:Ec(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(function nK(){return new Q(3013,!1)}());const i="full"===e.timings?{duration:0,delay:0,easing:"full"}:Z_(e.timings,t.errors,!0);return{type:12,animation:po(this,hp(e.animation),t),timings:i,options:null}}}class $K{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Ec(n){return n?(n=dp(n)).params&&(n.params=function HK(n){return n?dp(n):null}(n.params)):n={},n}function VM(n,e,t){return{duration:n,delay:e,easing:t}}function BM(n,e,t,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class rv{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const KK=new RegExp(":enter","g"),ZK=new RegExp(":leave","g");function UM(n,e,t,i,r,o=new Map,s=new Map,a,l,c=[]){return(new JK).buildKeyframes(n,e,t,i,r,o,s,a,l,c)}class JK{buildKeyframes(e,t,i,r,o,s,a,l,c,u=[]){c=c||new rv;const d=new HM(e,t,c,r,o,u,[]);d.options=l;const h=l.delay?Ea(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),po(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let m=f.length-1;m>=0;m--){const g=f[m];if(g.element===t){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[BM(t,[],[],[],0,h,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const i=t.subInstructions.get(t.element);if(i){const r=t.createSubContext(e.options),o=t.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){const i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(const r of e){const o=r?.delay;if(o){const s="number"==typeof o?o:Ea(fp(o,r?.params??{},t.errors));i.delayNextStep(s)}}}_visitSubInstructions(e,t,i){let o=t.currentTimeline.currentTime;const s=null!=i.duration?Ea(i.duration):null,a=null!=i.delay?Ea(i.delay):null;return 0!==s&&e.forEach(l=>{const c=t.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(e,t){t.updateOptions(e.options,!0),po(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const i=t.subContextCount;let r=t;const o=e.options;if(o&&(o.params||o.delay)&&(r=t.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=ov);const s=Ea(o.delay);r.delayNextStep(s)}e.steps.length&&(e.steps.forEach(s=>po(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const i=[];let r=t.currentTimeline.currentTime;const o=e.options&&e.options.delay?Ea(e.options.delay):0;e.steps.forEach(s=>{const a=t.createSubContext(e.options);o&&a.delayNextStep(o),po(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>t.currentTimeline.mergeTimelineCollectedStyles(s)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const i=e.strValue;return Z_(t.params?fp(i,t.params,t.errors):i,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const i=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),r.snapshotCurrentStyles());const o=e.style;5==o.type?this.visitKeyframes(o,t):(t.incrementTime(i.duration),this.visitStyle(o,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const i=t.currentTimeline,r=t.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(o):i.setStyles(e.styles,o,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const i=t.currentAnimateTimings,r=t.currentTimeline.duration,o=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+o),t.previousNode=e}visitQuery(e,t){const i=t.currentTimeline.currentTime,r=e.options||{},o=r.delay?Ea(r.delay):0;o&&(6===t.previousNode.type||0==i&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=ov);let s=i;const a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{t.currentQueryIndex=u;const d=t.createSubContext(e.options,c);o&&d.delayNextStep(o),c===t.element&&(l=d.currentTimeline),po(this,e.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const i=t.parentContext,r=t.currentTimeline,o=e.timings,s=Math.abs(o.duration),a=s*(t.currentQueryTotal-1);let l=s*t.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=t.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;po(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const ov={};class HM{constructor(e,t,i,r,o,s,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ov,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new sv(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const i=e;let r=this.options;null!=i.duration&&(r.duration=Ea(i.duration)),null!=i.delay&&(r.delay=Ea(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!t||!s.hasOwnProperty(a))&&(s[a]=fp(o[a],s,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const i=e.params={};Object.keys(t).forEach(r=>{i[r]=t[r]})}}return e}createSubContext(e=null,t,i){const r=t||this.element,o=new HM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=ov,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){const r={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},o=new XK(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,r,o,s){let a=[];if(r&&a.push(this.element),e.length>0){e=(e=e.replace(KK,"."+this._enterClassName)).replace(ZK,"."+this._leaveClassName);let c=this._driver.query(this.element,e,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function iK(n){return new Q(3014,!1)}()),a}}class sv{constructor(e,t,i,r){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new sv(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||Sa),this._currentKeyframe.set(t,Sa);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,r){t&&this._previousKeyframe.set("easing",t);const o=r&&r.params||{},s=function eQ(n,e){const t=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||e.keys();for(let o of i)t.set(o,Sa)}else dl(r,t)}),t}(e,this._globalTimelineStyles);for(let[a,l]of s){const c=fp(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Sa),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{const r=this._styleSummary.get(i);(!r||t.time>r.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=dl(a,new Map,this._backFill);c.forEach((u,d)=>{"!"===u?e.add(d):u===Sa&&t.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=e.size?J_(e.values()):[],s=t.size?J_(t.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return BM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class XK extends sv{constructor(e,t,i,r,o,s,a=!1){super(e,t,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const o=[],s=i+t,a=t/s,l=dl(e[0]);l.set("offset",0),o.push(l);const c=dl(e[0]);c.set("offset",nL(a)),o.push(c);const u=e.length-1;for(let d=1;d<=u;d++){let h=dl(e[d]);const f=h.get("offset");h.set("offset",nL((t+f*i)/s)),o.push(h)}i=s,t=0,r="",e=o}return BM(this.element,e,this.preStyleProps,this.postStyleProps,i,t,r,!0)}}function nL(n,e=3){const t=Math.pow(10,e-1);return Math.round(n*t)/t}class $M{}const tQ=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class nQ extends $M{normalizePropertyName(e,t){return jM(e)}normalizeStyleValue(e,t,i,r){let o="";const s=i.toString().trim();if(tQ.has(t)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function Gq(n,e){return new Q(3005,!1)}())}return s+o}}function iL(n,e,t,i,r,o,s,a,l,c,u,d,h){return{type:0,element:n,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const WM={};class rL{constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,r){return function iQ(n,e,t,i,r){return n.some(o=>o(e,t,i,r))}(this.ast.matchers,e,t,i,r)}buildStyles(e,t,i){let r=this._stateStyles.get("*");return void 0!==e&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(t,i):new Map}build(e,t,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||WM,p=this.buildStyles(i,a&&a.params||WM,d),m=l&&l.params||WM,g=this.buildStyles(r,m,d),y=new Set,v=new Map,w=new Map,_="void"===r,N={params:rQ(m,h),delay:this.ast.options?.delay},T=u?[]:UM(e,t,this.ast.animation,o,s,p,g,N,c,d);let ne=0;if(T.forEach(Ne=>{ne=Math.max(Ne.duration+Ne.delay,ne)}),d.length)return iL(t,this._triggerName,i,r,_,p,g,[],[],v,w,ne,d);T.forEach(Ne=>{const He=Ne.element,pt=fo(v,He,new Set);Ne.preStyleProps.forEach(ot=>pt.add(ot));const at=fo(w,He,new Set);Ne.postStyleProps.forEach(ot=>at.add(ot)),He!==t&&y.add(He)});const K=J_(y.values());return iL(t,this._triggerName,i,r,_,p,g,T,K,v,w,ne)}}function rQ(n,e){const t=dp(e);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(t[i]=n[i]);return t}class oQ{constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){const i=new Map,r=dp(this.defaultParams);return Object.keys(e).forEach(o=>{const s=e[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=fp(s,r,t));const l=this.normalizer.normalizePropertyName(a,t);s=this.normalizer.normalizeStyleValue(a,l,s,t),i.set(a,s)})}),i}}class aQ{constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{this.states.set(r.name,new oQ(r.style,r.options&&r.options.params||{},i))}),oL(this.states,"true","1"),oL(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new rL(e,r,this.states))}),this.fallbackTransition=function lQ(n,e,t){return new rL(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},e)}(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,r){return this.transitionFactories.find(s=>s.match(e,t,i,r))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}}function oL(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}const cQ=new rv;class uQ{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){const i=[],o=zM(this._driver,t,i,[]);if(i.length)throw function uK(n){return new Q(3503,!1)}();this._animations.set(e,o)}_buildPlayer(e,t,i){const r=e.element,o=F2(0,this._normalizer,0,e.keyframes,t,i);return this._driver.animate(r,o,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){const r=[],o=this._animations.get(e);let s;const a=new Map;if(o?(s=UM(this._driver,t,o,PM,q_,new Map,new Map,i,cQ,r),s.forEach(u=>{const d=fo(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function dK(){return new Q(3300,!1)}()),s=[]),r.length)throw function hK(n){return new Q(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,Sa))})});const c=ul(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){const t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);const i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){const t=this._playersById.get(e);if(!t)throw function fK(n){return new Q(3301,!1)}();return t}listen(e,t,i,r){const o=OM(t,"","","");return xM(this._getPlayer(e),i,o,r),()=>{}}command(e,t,i,r){if("register"==i)return void this.register(e,r[0]);if("create"==i)return void this.create(e,t,r[0]||{});const o=this._getPlayer(e);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}}const sL="ng-animate-queued",GM="ng-animate-disabled",mQ=[],aL={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},gQ={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},ko="__ng_removed";class YM{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;const i=e&&e.hasOwnProperty("value");if(this.value=function bQ(n){return n??null}(i?e.value:e),i){const o=dp(e);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){const t=e.params;if(t){const i=this.options.params;Object.keys(t).forEach(r=>{null==i[r]&&(i[r]=t[r])})}}}const pp="void",qM=new YM(pp);class yQ{constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,No(t,this._hostClassName)}listen(e,t,i,r){if(!this._triggers.has(t))throw function pK(n,e){return new Q(3302,!1)}();if(null==i||0==i.length)throw function mK(n){return new Q(3303,!1)}();if(!function wQ(n){return"start"==n||"done"==n}(i))throw function gK(n,e){return new Q(3400,!1)}();const o=fo(this._elementListeners,e,[]),s={name:t,phase:i,callback:r};o.push(s);const a=fo(this._engine.statesByElement,e,new Map);return a.has(t)||(No(e,K_),No(e,K_+"-"+t),a.set(t,qM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return!this._triggers.has(e)&&(this._triggers.set(e,t),!0)}_getTrigger(e){const t=this._triggers.get(e);if(!t)throw function yK(n){return new Q(3401,!1)}();return t}trigger(e,t,i,r=!0){const o=this._getTrigger(t),s=new KM(this.id,t,e);let a=this._engine.statesByElement.get(e);a||(No(e,K_),No(e,K_+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t);const c=new YM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=qM),c.value!==pp&&l.value===c.value){if(!function MQ(n,e){const t=Object.keys(n),i=Object.keys(e);if(t.length!=i.length)return!1;for(let r=0;r{Sc(e,g),As(e,y)})}return}const h=fo(this._engine.playersByElement,e,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==t&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,e,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(No(e,sL),s.onStart(()=>{Fd(e,sL)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(e);if(g){let y=g.indexOf(s);y>=0&&g.splice(y,1)}}),this.players.push(s),h.push(s),s}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const i=this._engine.driver.query(e,Q_,!0);i.forEach(r=>{if(r[ko])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,i,r){const o=this._engine.statesByElement.get(e),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(e,c,pp,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,s),i&&ul(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){const r=new Set;t.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||qM,u=new YM(pp),d=new KM(this.id,s,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(e,t){const i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(e):[];if(o&&o.length)r=!0;else{let s=e;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,t);else{const o=e[ko];(!o||o===aL)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){No(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=OM(o,i.triggerName,i.fromState.value,i.toState.value);l._data=e,xM(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(i)}),this._queue=[],t.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(i=>i.element===e)||t,t}}class _Q{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){const i=new yQ(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(t);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,e),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(e)}else i.push(e);return r.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let r=this._namespaceLookup[e];r&&r.register(t,i)&&this.totalAnimations++}destroy(e,t){if(!e)return;const i=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[e];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,i=this.statesByElement.get(e);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&t.add(o)}return t}trigger(e,t,i,r){if(av(t)){const o=this._fetchNamespace(e);if(o)return o.trigger(t,i,r),!0}return!1}insertNode(e,t,i,r){if(!av(t))return;const o=t[ko];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(t);s>=0&&this.collectedLeaveElements.splice(s,1)}if(e){const s=this._fetchNamespace(e);s&&s.insertNode(t,i)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),No(e,GM)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Fd(e,GM))}removeNode(e,t,i,r){if(av(t)){const o=e?this._fetchNamespace(e):null;if(o?o.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),i){const s=this.namespacesByHostElement.get(t);s&&s.id!==e&&s.removeNode(t,r)}}else this._onRemovalComplete(t,r)}markElementAsRemoved(e,t,i,r,o){this.collectedLeaveElements.push(t),t[ko]={namespaceId:e,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,t,i,r,o){return av(t)?this._fetchNamespace(e).listen(t,i,r,o):()=>{}}_buildInstruction(e,t,i,r,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,r,e.fromState.options,e.toState.options,t,o)}destroyInnerAnimations(e){let t=this.driver.query(e,Q_,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,LM,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return ul(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e[ko];if(t&&t.setForRemoval){if(e[ko]=aL,t.namespaceId){this.destroyInnerAnimations(e);const i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(GM)&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],t.length?ul(t).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(e){throw function _K(n){return new Q(3402,!1)}()}_flushAnimations(e,t){const i=new rv,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(se=>{u.add(se);const fe=this.driver.query(se,".ng-animate-queued",!0);for(let be=0;be{const be=PM+m++;p.set(fe,be),se.forEach(Ue=>No(Ue,be))});const g=[],y=new Set,v=new Set;for(let se=0;sey.add(Ue)):v.add(fe))}const w=new Map,_=uL(h,Array.from(y));_.forEach((se,fe)=>{const be=q_+m++;w.set(fe,be),se.forEach(Ue=>No(Ue,be))}),e.push(()=>{f.forEach((se,fe)=>{const be=p.get(fe);se.forEach(Ue=>Fd(Ue,be))}),_.forEach((se,fe)=>{const be=w.get(fe);se.forEach(Ue=>Fd(Ue,be))}),g.forEach(se=>{this.processLeaveNode(se)})});const N=[],T=[];for(let se=this._namespaceList.length-1;se>=0;se--)this._namespaceList[se].drainQueuedTransitions(t).forEach(be=>{const Ue=be.player,It=be.element;if(N.push(Ue),this.collectedEnterElements.length){const Tn=It[ko];if(Tn&&Tn.setForMove){if(Tn.previousTriggersValues&&Tn.previousTriggersValues.has(be.triggerName)){const Wt=Tn.previousTriggersValues.get(be.triggerName),ct=this.statesByElement.get(be.element);if(ct&&ct.has(be.triggerName)){const Fn=ct.get(be.triggerName);Fn.value=Wt,ct.set(be.triggerName,Fn)}}return void Ue.destroy()}}const ln=!d||!this.driver.containsElement(d,It),zt=w.get(It),Mn=p.get(It),Rt=this._buildInstruction(be,i,Mn,zt,ln);if(Rt.errors&&Rt.errors.length)return void T.push(Rt);if(ln)return Ue.onStart(()=>Sc(It,Rt.fromStyles)),Ue.onDestroy(()=>As(It,Rt.toStyles)),void r.push(Ue);if(be.isFallbackTransition)return Ue.onStart(()=>Sc(It,Rt.fromStyles)),Ue.onDestroy(()=>As(It,Rt.toStyles)),void r.push(Ue);const Yi=[];Rt.timelines.forEach(Tn=>{Tn.stretchStartingKeyframe=!0,this.disabledNodes.has(Tn.element)||Yi.push(Tn)}),Rt.timelines=Yi,i.append(It,Rt.timelines),s.push({instruction:Rt,player:Ue,element:It}),Rt.queriedElements.forEach(Tn=>fo(a,Tn,[]).push(Ue)),Rt.preStyleProps.forEach((Tn,Wt)=>{if(Tn.size){let ct=l.get(Wt);ct||l.set(Wt,ct=new Set),Tn.forEach((Fn,Ar)=>ct.add(Ar))}}),Rt.postStyleProps.forEach((Tn,Wt)=>{let ct=c.get(Wt);ct||c.set(Wt,ct=new Set),Tn.forEach((Fn,Ar)=>ct.add(Ar))})});if(T.length){const se=[];T.forEach(fe=>{se.push(function vK(n,e){return new Q(3505,!1)}())}),N.forEach(fe=>fe.destroy()),this.reportError(se)}const ne=new Map,K=new Map;s.forEach(se=>{const fe=se.element;i.has(fe)&&(K.set(fe,fe),this._beforeAnimationBuild(se.player.namespaceId,se.instruction,ne))}),r.forEach(se=>{const fe=se.element;this._getPreviousPlayers(fe,!1,se.namespaceId,se.triggerName,null).forEach(Ue=>{fo(ne,fe,[]).push(Ue),Ue.destroy()})});const Ne=g.filter(se=>hL(se,l,c)),He=new Map;cL(He,this.driver,v,c,Sa).forEach(se=>{hL(se,l,c)&&Ne.push(se)});const at=new Map;f.forEach((se,fe)=>{cL(at,this.driver,new Set(se),l,"!")}),Ne.forEach(se=>{const fe=He.get(se),be=at.get(se);He.set(se,new Map([...Array.from(fe?.entries()??[]),...Array.from(be?.entries()??[])]))});const ot=[],pn=[],St={};s.forEach(se=>{const{element:fe,player:be,instruction:Ue}=se;if(i.has(fe)){if(u.has(fe))return be.onDestroy(()=>As(fe,Ue.toStyles)),be.disabled=!0,be.overrideTotalTime(Ue.totalTime),void r.push(be);let It=St;if(K.size>1){let zt=fe;const Mn=[];for(;zt=zt.parentNode;){const Rt=K.get(zt);if(Rt){It=Rt;break}Mn.push(zt)}Mn.forEach(Rt=>K.set(Rt,It))}const ln=this._buildAnimation(be.namespaceId,Ue,ne,o,at,He);if(be.setRealPlayer(ln),It===St)ot.push(be);else{const zt=this.playersByElement.get(It);zt&&zt.length&&(be.parentPlayer=ul(zt)),r.push(be)}}else Sc(fe,Ue.fromStyles),be.onDestroy(()=>As(fe,Ue.toStyles)),pn.push(be),u.has(fe)&&r.push(be)}),pn.forEach(se=>{const fe=o.get(se.element);if(fe&&fe.length){const be=ul(fe);se.setRealPlayer(be)}}),r.forEach(se=>{se.parentPlayer?se.syncPlayerEvents(se.parentPlayer):se.destroy()});for(let se=0;se!ln.destroyed);It.length?CQ(this,fe,It):this.processLeaveNode(fe)}return g.length=0,ot.forEach(se=>{this.players.push(se),se.onDone(()=>{se.destroy();const fe=this.players.indexOf(se);this.players.splice(fe,1)}),se.play()}),ot}elementContainsData(e,t){let i=!1;const r=t[ko];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(t)&&(i=!0),this.playersByQueriedElement.has(t)&&(i=!0),this.statesByElement.has(t)&&(i=!0),this._fetchNamespace(e).elementContainsData(t)||i}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,r,o){let s=[];if(t){const a=this.playersByQueriedElement.get(e);a&&(s=a)}else{const a=this.playersByElement.get(e);if(a){const l=!o||o==pp;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(e,t,i){const o=t.element,s=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:t.triggerName;for(const l of t.timelines){const c=l.element,u=c!==o,d=fo(i,c,[]);this._getPreviousPlayers(c,u,s,a,t.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Sc(o,t.fromStyles)}_buildAnimation(e,t,i,r,o,s){const a=t.triggerName,l=t.element,c=[],u=new Set,d=new Set,h=t.timelines.map(p=>{const m=p.element;u.add(m);const g=m[ko];if(g&&g.removedBeforeQueried)return new up(p.duration,p.delay);const y=m!==l,v=function DQ(n){const e=[];return dL(n,e),e}((i.get(m)||mQ).map(ne=>ne.getRealPlayer())).filter(ne=>!!ne.element&&ne.element===m),w=o.get(m),_=s.get(m),N=F2(0,this._normalizer,0,p.keyframes,w,_),T=this._buildPlayer(p,N,v);if(p.subTimeline&&r&&d.add(m),y){const ne=new KM(e,a,m);ne.setRealPlayer(T),c.push(ne)}return T});c.forEach(p=>{fo(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function vQ(n,e,t){let i=n.get(e);if(i){if(i.length){const r=i.indexOf(t);i.splice(r,1)}0==i.length&&n.delete(e)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>No(p,G2));const f=ul(h);return f.onDestroy(()=>{u.forEach(p=>Fd(p,G2)),As(l,t.toStyles)}),d.forEach(p=>{fo(r,p,[]).push(f)}),f}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new up(e.duration,e.delay)}}class KM{constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i,this._player=new up,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(r=>xM(e,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){fo(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function av(n){return n&&1===n.nodeType}function lL(n,e){const t=n.style.display;return n.style.display=e??"none",t}function cL(n,e,t,i,r){const o=[];t.forEach(l=>o.push(lL(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=e.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[ko]=gQ,s.push(c))}),n.set(c,u)});let a=0;return t.forEach(l=>lL(l,o[a++])),s}function uL(n,e){const t=new Map;if(n.forEach(a=>t.set(a,[])),0==e.length)return t;const r=new Set(e),o=new Map;function s(a){if(!a)return 1;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=t.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return e.forEach(a=>{const l=s(a);1!==l&&t.get(l).push(a)}),t}function No(n,e){n.classList?.add(e)}function Fd(n,e){n.classList?.remove(e)}function CQ(n,e,t){ul(t).onDone(()=>n.processLeaveNode(e))}function dL(n,e){for(let t=0;tr.add(o)):e.set(n,i),t.delete(n),!0}class lv{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new _Q(e,t,i),this._timelineEngine=new uQ(e,t,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(e,t,i,r,o){const s=e+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],u=zM(this._driver,o,l,[]);if(l.length)throw function lK(n,e){return new Q(3404,!1)}();a=function sQ(n,e,t){return new aQ(n,e,t)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,r){this._transitionEngine.insertNode(e,t,i,r)}onRemove(e,t,i,r){this._transitionEngine.removeNode(e,t,r||!1,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,r){if("@"==i.charAt(0)){const[o,s]=j2(i);this._timelineEngine.command(o,t,s,r)}else this._transitionEngine.trigger(e,t,i,r)}listen(e,t,i,r,o){if("@"==i.charAt(0)){const[s,a]=j2(i);return this._timelineEngine.listen(s,t,a,o)}return this._transitionEngine.listen(e,t,i,r,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let SQ=(()=>{class n{constructor(t,i,r){this._element=t,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(t);o||n.initialStylesByElement.set(t,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&As(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(As(this._element,this._initialStyles),this._endStyles&&(As(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Sc(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Sc(this._element,this._endStyles),this._endStyles=null),As(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function QM(n){let e=null;return n.forEach((t,i)=>{(function EQ(n){return"display"===n||"position"===n})(i)&&(e=e||new Map,e.set(i,t))}),e}class fL{constructor(e,t,i,r){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){const t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){return e.animate(this._convertKeyframesToObject(t),i)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&e.set(r,this._finished?i:J2(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){const t="start"===e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class xQ{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}matchesElement(e,t){return!1}containsElement(e,t){return U2(e,t)}getParentElement(e){return kM(e)}query(e,t,i){return H2(e,t,i)}computeStyle(e,t,i){return window.getComputedStyle(e)[t]}animate(e,t,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof fL);(function kK(n,e){return 0===n||0===e})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function xK(n){return n.length?n[0]instanceof Map?n:n.map(e=>Y2(e)):[]}(t).map(f=>dl(f));d=function NK(n,e,t){if(t.size&&e.length){let i=e[0],r=[];if(t.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,J2(n,a)))}}return e}(e,d,c);const h=function TQ(n,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=QM(e[0]),e.length>1&&(i=QM(e[e.length-1]))):e instanceof Map&&(t=QM(e)),t||i?new SQ(n,t,i):null}(e,d);return new fL(e,d,l,h)}}let IQ=(()=>{class n extends I2{constructor(t,i){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(i.body,{id:"0",encapsulation:te.None,styles:[],data:{animation:[]}})}build(t){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(t)?O2(t):t;return pL(this._renderer,null,i,"register",[r]),new OQ(i,this._renderer)}}return n.\u0275fac=function(t){return new(t||n)(F(Nf),F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class OQ extends zq{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new AQ(this._id,e,t||{},this._renderer)}}class AQ{constructor(e,t,i,r){this.id=e,this.element=t,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return pL(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(e){this._command("setPosition",e)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function pL(n,e,t,i,r){return n.setProperty(e,`@@${t}:${i}`,r)}const mL="@.disabled";let kQ=(()=>{class n{constructor(t,i,r){this.delegate=t,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(t,i){const o=this.delegate.createRenderer(t,i);if(!(t&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new gL("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,t,u.name,u)};return i.data.animation.forEach(l),new NQ(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,i,r){t>=0&&ti(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(t){return new(t||n)(F(Nf),F(lv),F(Jt))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class gL{constructor(e,t,i,r){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>t.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,r=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,i){this.engine.onRemove(this.namespaceId,t,this.delegate,i)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,r){this.delegate.setAttribute(e,t,i,r)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,r){this.delegate.setStyle(e,t,i,r)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){"@"==t.charAt(0)&&t==mL?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i){return this.delegate.listen(e,t,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class NQ extends gL{constructor(e,t,i,r,o){super(t,i,r,o),this.factory=e,this.namespaceId=t}setProperty(e,t,i){"@"==t.charAt(0)?"."==t.charAt(1)&&t==mL?this.disableAnimations(e,i=void 0===i||!!i):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i){if("@"==t.charAt(0)){const r=function PQ(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(e);let o=t.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function LQ(n){const e=n.indexOf(".");return[n.substring(0,e),n.slice(e+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(e,t,i)}}let RQ=(()=>{class n extends lv{constructor(t,i,r,o){super(t.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(t){return new(t||n)(F(Nn),F(NM),F($M),F(yc))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const yL=[{provide:I2,useClass:IQ},{provide:$M,useFactory:function FQ(){return new nQ}},{provide:lv,useClass:RQ},{provide:Nf,useFactory:function jQ(n,e,t){return new kQ(n,e,t)},deps:[D_,lv,Jt]}],ZM=[{provide:NM,useFactory:()=>new xQ},{provide:zk,useValue:"BrowserAnimations"},...yL],_L=[{provide:NM,useClass:$2},{provide:zk,useValue:"NoopAnimations"},...yL];let zQ=(()=>{class n{static withConfig(t){return{ngModule:n,providers:t.disableAnimations?_L:ZM}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({providers:ZM,imports:[oP]}),n})();class Pt{static equals(e,t,i){return i?this.resolveFieldData(e,i)===this.resolveFieldData(t,i):this.equalsByValue(e,t)}static equalsByValue(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var o,s,a,i=Array.isArray(e),r=Array.isArray(t);if(i&&r){if((s=e.length)!=t.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[o],t[o]))return!1;return!0}if(i!=r)return!1;var l=e instanceof Date,c=t instanceof Date;if(l!=c)return!1;if(l&&c)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var h=Object.keys(e);if((s=h.length)!==Object.keys(t).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,h[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[a=h[o]],t[a]))return!1;return!0}return e!=e&&t!=t}static resolveFieldData(e,t){if(e&&t){if(this.isFunction(t))return t(e);if(-1==t.indexOf("."))return e[t];{let i=t.split("."),r=e;for(let o=0,s=i.length;o=e.length&&(i%=e.length,t%=e.length),e.splice(i,0,e.splice(t,1)[0]))}static insertIntoOrderedArray(e,t,i,r){if(i.length>0){let o=!1;for(let s=0;st){i.splice(s,0,e),o=!0;break}o||i.push(e)}else i.push(e)}static findIndexInList(e,t){let i=-1;if(t)for(let r=0;r-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}static isEmpty(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length}static isNotEmpty(e){return!this.isEmpty(e)}static compare(e,t,i,r=1){let o=-1;const s=this.isEmpty(e),a=this.isEmpty(t);return o=s&&a?0:s?r:a?-r:"string"==typeof e&&"string"==typeof t?e.localeCompare(t,i,{numeric:!0}):et?1:0,o}static sort(e,t,i=1,r,o=1){return(1===o?i:o)*Pt.compare(e,t,r,i)}static merge(e,t){if(null!=e||null!=t)return null!=e&&"object"!=typeof e||null!=t&&"object"!=typeof t?null!=e&&"string"!=typeof e||null!=t&&"string"!=typeof t?t||e:[e||"",t||""].join(" "):{...e||{},...t||{}}}}var vL=0,jd=function BQ(){let n=[];const r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(((o,s)=>{let a=n.length>0?n[n.length-1]:{key:o,value:s},l=a.value+(a.key===o?0:s)+1;return n.push({key:o,value:l}),l})(o,a)))},clear:o=>{o&&((o=>{n=n.filter(s=>s.value!==o)})(r(o)),o.style.zIndex="")},getCurrent:()=>n.length>0?n[n.length-1].value:0}}();const bL=["*"];let wL=(()=>{class n{constructor(){this.requireConfirmationSource=new ae,this.acceptConfirmationSource=new ae,this.requireConfirmation$=this.requireConfirmationSource.asObservable(),this.accept=this.acceptConfirmationSource.asObservable()}confirm(t){return this.requireConfirmationSource.next(t),this}close(){return this.requireConfirmationSource.next(null),this}onAccept(){this.acceptConfirmationSource.next(null)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),ir=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.IN="in",n.LESS_THAN="lt",n.LESS_THAN_OR_EQUAL_TO="lte",n.GREATER_THAN="gt",n.GREATER_THAN_OR_EQUAL_TO="gte",n.BETWEEN="between",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.DATE_IS="dateIs",n.DATE_IS_NOT="dateIsNot",n.DATE_BEFORE="dateBefore",n.DATE_AFTER="dateAfter",n})(),CL=(()=>{class n{constructor(){this.filters={startsWith:(t,i,r)=>{if(null==i||""===i.trim())return!0;if(null==t)return!1;let o=Pt.removeAccents(i.toString()).toLocaleLowerCase(r);return Pt.removeAccents(t.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(t,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==t)return!1;let o=Pt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1!==Pt.removeAccents(t.toString()).toLocaleLowerCase(r).indexOf(o)},notContains:(t,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==t)return!1;let o=Pt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1===Pt.removeAccents(t.toString()).toLocaleLowerCase(r).indexOf(o)},endsWith:(t,i,r)=>{if(null==i||""===i.trim())return!0;if(null==t)return!1;let o=Pt.removeAccents(i.toString()).toLocaleLowerCase(r),s=Pt.removeAccents(t.toString()).toLocaleLowerCase(r);return-1!==s.indexOf(o,s.length-o.length)},equals:(t,i,r)=>null==i||"string"==typeof i&&""===i.trim()||null!=t&&(t.getTime&&i.getTime?t.getTime()===i.getTime():Pt.removeAccents(t.toString()).toLocaleLowerCase(r)==Pt.removeAccents(i.toString()).toLocaleLowerCase(r)),notEquals:(t,i,r)=>!(null==i||"string"==typeof i&&""===i.trim()||null!=t&&(t.getTime&&i.getTime?t.getTime()===i.getTime():Pt.removeAccents(t.toString()).toLocaleLowerCase(r)==Pt.removeAccents(i.toString()).toLocaleLowerCase(r))),in:(t,i)=>{if(null==i||0===i.length)return!0;for(let r=0;rnull==i||null==i[0]||null==i[1]||null!=t&&(t.getTime?i[0].getTime()<=t.getTime()&&t.getTime()<=i[1].getTime():i[0]<=t&&t<=i[1]),lt:(t,i,r)=>null==i||null!=t&&(t.getTime&&i.getTime?t.getTime()null==i||null!=t&&(t.getTime&&i.getTime?t.getTime()<=i.getTime():t<=i),gt:(t,i,r)=>null==i||null!=t&&(t.getTime&&i.getTime?t.getTime()>i.getTime():t>i),gte:(t,i,r)=>null==i||null!=t&&(t.getTime&&i.getTime?t.getTime()>=i.getTime():t>=i),is:(t,i,r)=>this.filters.equals(t,i,r),isNot:(t,i,r)=>this.filters.notEquals(t,i,r),before:(t,i,r)=>this.filters.lt(t,i,r),after:(t,i,r)=>this.filters.gt(t,i,r),dateIs:(t,i)=>null==i||null!=t&&t.toDateString()===i.toDateString(),dateIsNot:(t,i)=>null==i||null!=t&&t.toDateString()!==i.toDateString(),dateBefore:(t,i)=>null==i||null!=t&&t.getTime()null==i||null!=t&&t.getTime()>i.getTime()}}filter(t,i,r,o,s){let a=[];if(t)for(let l of t)for(let c of i){let u=Pt.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}register(t,i){this.filters[t]=i}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),UQ=(()=>{class n{constructor(){this.messageSource=new ae,this.clearSource=new ae,this.messageObserver=this.messageSource.asObservable(),this.clearObserver=this.clearSource.asObservable()}add(t){t&&this.messageSource.next(t)}addAll(t){t&&t.length&&this.messageSource.next(t)}clear(t){this.clearSource.next(t||null)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),HQ=(()=>{class n{constructor(){this.clickSource=new ae,this.clickObservable=this.clickSource.asObservable()}add(t){t&&this.clickSource.next(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),zd=(()=>{class n{constructor(){this.ripple=!1,this.overlayOptions={},this.filterMatchModeOptions={text:[ir.STARTS_WITH,ir.CONTAINS,ir.NOT_CONTAINS,ir.ENDS_WITH,ir.EQUALS,ir.NOT_EQUALS],numeric:[ir.EQUALS,ir.NOT_EQUALS,ir.LESS_THAN,ir.LESS_THAN_OR_EQUAL_TO,ir.GREATER_THAN,ir.GREATER_THAN_OR_EQUAL_TO],date:[ir.DATE_IS,ir.DATE_IS_NOT,ir.DATE_BEFORE,ir.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new ae,this.translationObserver=this.translationSource.asObservable()}getTranslation(t){return this.translation[t]}setTranslation(t){this.translation={...this.translation,...t},this.translationSource.next(this.translation)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),DL=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-header"]],ngContentSelectors:bL,decls:1,vars:0,template:function(t,i){1&t&&(So(),_r(0))},encapsulation:2}),n})(),ML=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-footer"]],ngContentSelectors:bL,decls:1,vars:0,template:function(t,i){1&t&&(So(),_r(0))},encapsulation:2}),n})(),rr=(()=>{class n{constructor(t){this.template=t}getType(){return this.name}}return n.\u0275fac=function(t){return new(t||n)(O(Eo))},n.\u0275dir=Me({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),xa=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})(),xc=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.NO_FILTER="noFilter",n.LT="lt",n.LTE="lte",n.GT="gt",n.GTE="gte",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.CLEAR="clear",n.APPLY="apply",n.MATCH_ALL="matchAll",n.MATCH_ANY="matchAny",n.ADD_RULE="addRule",n.REMOVE_RULE="removeRule",n.ACCEPT="accept",n.REJECT="reject",n.CHOOSE="choose",n.UPLOAD="upload",n.CANCEL="cancel",n.DAY_NAMES="dayNames",n.DAY_NAMES_SHORT="dayNamesShort",n.DAY_NAMES_MIN="dayNamesMin",n.MONTH_NAMES="monthNames",n.MONTH_NAMES_SHORT="monthNamesShort",n.FIRST_DAY_OF_WEEK="firstDayOfWeek",n.TODAY="today",n.WEEK_HEADER="weekHeader",n.WEAK="weak",n.MEDIUM="medium",n.STRONG="strong",n.PASSWORD_PROMPT="passwordPrompt",n.EMPTY_MESSAGE="emptyMessage",n.EMPTY_FILTER_MESSAGE="emptyFilterMessage",n})(),ce=(()=>{class n{static addClass(t,i){t&&i&&(t.classList?t.classList.add(i):t.className+=" "+i)}static addMultipleClasses(t,i){if(t&&i)if(t.classList){let r=i.trim().split(" ");for(let o=0;o{if(m)return"relative"===getComputedStyle(m).getPropertyValue("position")?m:r(m.parentElement)},o=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),s=i.offsetHeight,a=i.getBoundingClientRect(),l=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),u=this.getViewport(),h=r(t)?.getBoundingClientRect()||{top:-1*l,left:-1*c};let f,p;a.top+s+o.height>u.height?(f=a.top-h.top-o.height,t.style.transformOrigin="bottom",a.top+f<0&&(f=-1*a.top)):(f=s+a.top-h.top,t.style.transformOrigin="top"),p=o.width>u.width?-1*(a.left-h.left):a.left-h.left+o.width>u.width?-1*(a.left-h.left+o.width-u.width):a.left-h.left,t.style.top=f+"px",t.style.left=p+"px"}static absolutePosition(t,i){const r=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=r.height,s=r.width,a=i.offsetHeight,l=i.offsetWidth,c=i.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),h=this.getViewport();let f,p;c.top+a+o>h.height?(f=c.top+u-o,t.style.transformOrigin="bottom",f<0&&(f=u)):(f=a+c.top+u,t.style.transformOrigin="top"),p=c.left+s>h.width?Math.max(0,c.left+d+l-s):c.left+d,t.style.top=f+"px",t.style.left=p+"px"}static getParents(t,i=[]){return null===t.parentNode?i:this.getParents(t.parentNode,i.concat([t.parentNode]))}static getScrollableParents(t){let i=[];if(t){let r=this.getParents(t);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of r){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&i.push(d)}}9!==a.nodeType&&s(a)&&i.push(a)}}return i}static getHiddenElementOuterHeight(t){t.style.visibility="hidden",t.style.display="block";let i=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",i}static getHiddenElementOuterWidth(t){t.style.visibility="hidden",t.style.display="block";let i=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",i}static getHiddenElementDimensions(t){let i={};return t.style.visibility="hidden",t.style.display="block",i.width=t.offsetWidth,i.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",i}static scrollInView(t,i){let r=getComputedStyle(t).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(t).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=t.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=t.scrollTop,h=t.clientHeight,f=this.getOuterHeight(i);u<0?t.scrollTop=d+u:u+f>h&&(t.scrollTop=d+u-h+f)}static fadeIn(t,i){t.style.opacity=0;let r=+new Date,o=0,s=function(){o=+t.style.opacity.replace(",",".")+((new Date).getTime()-r)/i,t.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(t,i){var r=1,a=50/i;let l=setInterval(()=>{(r-=a)<=0&&(r=0,clearInterval(l)),t.style.opacity=r},50)}static getWindowScrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static getWindowScrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static matches(t,i){var r=Element.prototype;return(r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(t,i)}static getOuterWidth(t,i){let r=t.offsetWidth;if(i){let o=getComputedStyle(t);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(t){let i=getComputedStyle(t);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(t){let i=getComputedStyle(t);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(t){let i=t.offsetWidth,r=getComputedStyle(t);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(t){let i=t.offsetWidth,r=getComputedStyle(t);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(t){let i=t.offsetHeight,r=getComputedStyle(t);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(t,i){let r=t.offsetHeight;if(i){let o=getComputedStyle(t);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(t){let i=t.offsetHeight,r=getComputedStyle(t);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(t){let i=t.offsetWidth,r=getComputedStyle(t);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let t=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0];return{width:t.innerWidth||r.clientWidth||o.clientWidth,height:t.innerHeight||r.clientHeight||o.clientHeight}}static getOffset(t){var i=t.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(t,i){let r=t.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,t)}static getUserAgent(){return navigator.userAgent}static isIE(){var t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||(t.indexOf("Trident/")>0?(t.indexOf("rv:"),!0):t.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(t,i){if(this.isElement(i))i.appendChild(t);else{if(!i.el||!i.el.nativeElement)throw"Cannot append "+i+" to "+t;i.el.nativeElement.appendChild(t)}}static removeChild(t,i){if(this.isElement(i))i.removeChild(t);else{if(!i.el||!i.el.nativeElement)throw"Cannot remove "+t+" from "+i;i.el.nativeElement.removeChild(t)}}static removeElement(t){"remove"in Element.prototype?t.remove():t.parentNode.removeChild(t)}static isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}static calculateScrollbarWidth(t){if(t){let i=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let r=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let t=document.createElement("div");t.className="p-scrollbar-measure",document.body.appendChild(t);let i=t.offsetHeight-t.clientHeight;return document.body.removeChild(t),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(t,i,r){t[i].apply(t,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(t){return Number.isInteger?Number.isInteger(t):"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}static isHidden(t){return!t||null===t.offsetParent}static isVisible(t){return t&&null!=t.offsetParent}static isExist(t){return null!==t&&typeof t<"u"&&t.nodeName&&t.parentNode}static focus(t,i){t&&document.activeElement!==t&&t.focus(i)}static getFocusableElements(t){let i=n.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),r=[];for(let o of i)(o.offsetWidth||o.offsetHeight||o.getClientRects().length)&&r.push(o);return r}static getNextFocusableElement(t,i=!1){const r=n.getFocusableElements(t);let o=0;if(r&&r.length>0){const s=r.indexOf(r[0].ownerDocument.activeElement);i?o=-1==s||0===s?r.length-1:s-1:-1!=s&&s!==r.length-1&&(o=s+1)}return r[o]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(t,i){if(!t)return null;switch(t){case"document":return document;case"window":return window;case"@next":return i?.nextElementSibling;case"@prev":return i?.previousElementSibling;case"@parent":return i?.parentElement;case"@grandparent":return i?.parentElement.parentElement;default:const r=typeof t;if("string"===r)return document.querySelector(t);if("object"===r&&t.hasOwnProperty("nativeElement"))return this.isExist(t.nativeElement)?t.nativeElement:void 0;const s=(a=t)&&a.constructor&&a.call&&a.apply?t():t;return s&&9===s.nodeType||this.isExist(s)?s:null}var a}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class TL{constructor(e,t=(()=>{})){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=ce.getScrollableParents(this.element);for(let e=0;e{class n{constructor(t,i,r){this.el=t,this.zone=i,this.config=r}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(t){let i=this.getInk();if(!i||"none"===getComputedStyle(i,null).display)return;if(ce.removeClass(i,"p-ink-active"),!ce.getHeight(i)&&!ce.getWidth(i)){let a=Math.max(ce.getOuterWidth(this.el.nativeElement),ce.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=ce.getOffset(this.el.nativeElement),o=t.pageX-r.left+document.body.scrollTop-ce.getWidth(i)/2,s=t.pageY-r.top+document.body.scrollLeft-ce.getHeight(i)/2;i.style.top=s+"px",i.style.left=o+"px",ce.addClass(i,"p-ink-active"),this.timeout=setTimeout(()=>{let a=this.getInk();a&&ce.removeClass(a,"p-ink-active")},401)}getInk(){const t=this.el.nativeElement.children;for(let i=0;i{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();const $Q=["headerchkbox"],WQ=["filter"];function GQ(n,e){1&n&&Dt(0)}function YQ(n,e){if(1&n&&(I(0,"div",7),_r(1),E(2,GQ,1,0,"ng-container",8),A()),2&n){const t=M();C(2),b("ngTemplateOutlet",t.headerTemplate)}}const SL=function(n){return{"p-checkbox-disabled":n}},qQ=function(n,e,t){return{"p-highlight":n,"p-focus":e,"p-disabled":t}},EL=function(n){return{"pi pi-check":n}};function KQ(n,e){if(1&n){const t=Qe();I(0,"div",12)(1,"div",13)(2,"input",14),de("focus",function(){return ge(t),ye(M(2).onHeaderCheckboxFocus())})("blur",function(){return ge(t),ye(M(2).onHeaderCheckboxBlur())})("keydown.space",function(r){return ge(t),ye(M(2).toggleAll(r))}),A()(),I(3,"div",15,16),de("click",function(r){return ge(t),ye(M(2).toggleAll(r))}),_e(5,"span",17),A()()}if(2&n){const t=M(2);b("ngClass",xt(5,SL,t.disabled||t.toggleAllDisabled)),C(2),b("checked",t.allChecked)("disabled",t.disabled||t.toggleAllDisabled),C(1),b("ngClass",nl(7,qQ,t.allChecked,t.headerCheckboxFocus,t.disabled||t.toggleAllDisabled)),C(2),b("ngClass",xt(11,EL,t.allChecked))}}function QQ(n,e){1&n&&Dt(0)}const ZQ=function(n){return{options:n}};function JQ(n,e){if(1&n&&(mt(0),E(1,QQ,1,0,"ng-container",18),gt()),2&n){const t=M(2);C(1),b("ngTemplateOutlet",t.filterTemplate)("ngTemplateOutletContext",xt(2,ZQ,t.filterOptions))}}function XQ(n,e){if(1&n){const t=Qe();I(0,"div",20)(1,"input",21,22),de("input",function(r){return ge(t),ye(M(3).onFilter(r))}),A(),_e(3,"span",23),A()}if(2&n){const t=M(3);C(1),b("value",t.filterValue||"")("disabled",t.disabled),Yt("placeholder",t.filterPlaceHolder)("aria-label",t.ariaFilterLabel)}}function eZ(n,e){1&n&&E(0,XQ,4,4,"div",19),2&n&&b("ngIf",M(2).filter)}function tZ(n,e){if(1&n&&(I(0,"div",7),E(1,KQ,6,13,"div",9),E(2,JQ,2,4,"ng-container",10),E(3,eZ,1,1,"ng-template",null,11,Bn),A()),2&n){const t=Cn(4),i=M();C(1),b("ngIf",i.checkbox&&i.multiple&&i.showToggleAll),C(1),b("ngIf",i.filterTemplate)("ngIfElse",t)}}function nZ(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M().$implicit,i=M(2);C(1),Ot(i.getOptionGroupLabel(t)||"empty")}}function iZ(n,e){1&n&&Dt(0)}function rZ(n,e){1&n&&Dt(0)}const JM=function(n){return{$implicit:n}};function oZ(n,e){if(1&n&&(I(0,"li",25),E(1,nZ,2,1,"span",3),E(2,iZ,1,0,"ng-container",18),A(),E(3,rZ,1,0,"ng-container",18)),2&n){const t=e.$implicit,i=M(2),r=Cn(8);C(1),b("ngIf",!i.groupTemplate),C(1),b("ngTemplateOutlet",i.groupTemplate)("ngTemplateOutletContext",xt(5,JM,t)),C(1),b("ngTemplateOutlet",r)("ngTemplateOutletContext",xt(7,JM,i.getOptionGroupChildren(t)))}}function sZ(n,e){if(1&n&&(mt(0),E(1,oZ,4,9,"ng-template",24),gt()),2&n){const t=M();C(1),b("ngForOf",t.optionsToRender)}}function aZ(n,e){1&n&&Dt(0)}function lZ(n,e){if(1&n&&(mt(0),E(1,aZ,1,0,"ng-container",18),gt()),2&n){const t=M(),i=Cn(8);C(1),b("ngTemplateOutlet",i)("ngTemplateOutletContext",xt(2,JM,t.optionsToRender))}}const cZ=function(n){return{"p-highlight":n}};function uZ(n,e){if(1&n&&(I(0,"div",12)(1,"div",28),_e(2,"span",17),A()()),2&n){const t=M().$implicit,i=M(2);b("ngClass",xt(3,SL,i.disabled||i.isOptionDisabled(t))),C(1),b("ngClass",xt(5,cZ,i.isSelected(t))),C(1),b("ngClass",xt(7,EL,i.isSelected(t)))}}function dZ(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M().$implicit,i=M(2);C(1),Ot(i.getOptionLabel(t))}}function hZ(n,e){1&n&&Dt(0)}const fZ=function(n,e){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":e}},pZ=function(n,e){return{$implicit:n,index:e}};function mZ(n,e){if(1&n){const t=Qe();I(0,"li",27),de("click",function(r){const s=ge(t).$implicit;return ye(M(2).onOptionClick(r,s))})("dblclick",function(r){const s=ge(t).$implicit;return ye(M(2).onOptionDoubleClick(r,s))})("touchend",function(){const o=ge(t).$implicit;return ye(M(2).onOptionTouchEnd(o))})("keydown",function(r){const s=ge(t).$implicit;return ye(M(2).onOptionKeyDown(r,s))}),E(1,uZ,3,9,"div",9),E(2,dZ,2,1,"span",3),E(3,hZ,1,0,"ng-container",18),A()}if(2&n){const t=e.$implicit,i=e.index,r=M(2);b("ngClass",Mi(8,fZ,r.isSelected(t),r.isOptionDisabled(t))),Yt("tabindex",r.disabled||r.isOptionDisabled(t)?null:"0")("aria-label",r.getOptionLabel(t))("aria-selected",r.isSelected(t)),C(1),b("ngIf",r.checkbox&&r.multiple),C(1),b("ngIf",!r.itemTemplate),C(1),b("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",Mi(11,pZ,t,i))}}function gZ(n,e){1&n&&E(0,mZ,4,14,"li",26),2&n&&b("ngForOf",e.$implicit)}function yZ(n,e){if(1&n&&(mt(0),Te(1),gt()),2&n){const t=M(2);C(1),Vi(" ",t.emptyFilterMessageLabel," ")}}function _Z(n,e){1&n&&Dt(0,null,30)}function vZ(n,e){if(1&n&&(I(0,"li",29),E(1,yZ,2,1,"ng-container",10),E(2,_Z,2,0,"ng-container",8),A()),2&n){const t=M();C(1),b("ngIf",!t.emptyFilterTemplate&&!t.emptyTemplate)("ngIfElse",t.emptyFilter),C(1),b("ngTemplateOutlet",t.emptyFilterTemplate||t.emptyTemplate)}}function bZ(n,e){if(1&n&&(mt(0),Te(1),gt()),2&n){const t=M(2);C(1),Vi(" ",t.emptyMessageLabel," ")}}function wZ(n,e){1&n&&Dt(0,null,31)}function CZ(n,e){if(1&n&&(I(0,"li",29),E(1,bZ,2,1,"ng-container",10),E(2,wZ,2,0,"ng-container",8),A()),2&n){const t=M();C(1),b("ngIf",!t.emptyTemplate)("ngIfElse",t.empty),C(1),b("ngTemplateOutlet",t.emptyTemplate)}}function DZ(n,e){1&n&&Dt(0)}function MZ(n,e){if(1&n&&(I(0,"div",32),_r(1,1),E(2,DZ,1,0,"ng-container",8),A()),2&n){const t=M();C(2),b("ngTemplateOutlet",t.footerTemplate)}}const TZ=[[["p-header"]],[["p-footer"]]],SZ=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},EZ=["p-header","p-footer"],xZ={provide:Dr,useExisting:Bt(()=>xL),multi:!0};let xL=(()=>{class n{constructor(t,i,r,o){this.el=t,this.cd=i,this.filterService=r,this.config=o,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new ie,this.onClick=new ie,this.onDblClick=new ie,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(t){this._options=t,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(t){this._filterValue=t,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.filterBy&&(this.filterOptions={filter:t=>this.onFilter(t),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":default:this.itemTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"filter":this.filterTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"emptyfilter":this.emptyFilterTemplate=t.template}})}getOptionLabel(t){return this.optionLabel?Pt.resolveFieldData(t,this.optionLabel):null!=t.label?t.label:t}getOptionGroupChildren(t){return this.optionGroupChildren?Pt.resolveFieldData(t,this.optionGroupChildren):t.items}getOptionGroupLabel(t){return this.optionGroupLabel?Pt.resolveFieldData(t,this.optionGroupLabel):null!=t.label?t.label:t}getOptionValue(t){return this.optionValue?Pt.resolveFieldData(t,this.optionValue):this.optionLabel||void 0===t.value?t:t.value}isOptionDisabled(t){return this.optionDisabled?Pt.resolveFieldData(t,this.optionDisabled):void 0!==t.disabled&&t.disabled}writeValue(t){this.value=t,this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onOptionClick(t,i){this.disabled||this.isOptionDisabled(i)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(t,i):this.onOptionClickMultiple(t,i):this.onOptionClickSingle(t,i),this.onClick.emit({originalEvent:t,option:i,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(t){this.disabled||this.isOptionDisabled(t)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(t,i){this.disabled||this.isOptionDisabled(i)||this.readonly||this.onDblClick.emit({originalEvent:t,option:i,value:this.value})}onOptionClickSingle(t,i){let r=this.isSelected(i),o=!1;!this.optionTouched&&this.metaKeySelection?r?(t.metaKey||t.ctrlKey)&&(this.value=null,o=!0):(this.value=this.getOptionValue(i),o=!0):(this.value=r?null:this.getOptionValue(i),o=!0),o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickMultiple(t,i){let r=this.isSelected(i),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=t.metaKey||t.ctrlKey;r?(a?this.removeOption(i):this.value=[this.getOptionValue(i)],o=!0):(this.value=a&&this.value||[],this.value=[...this.value,this.getOptionValue(i)],o=!0)}else r?this.removeOption(i):this.value=[...this.value||[],this.getOptionValue(i)],o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickCheckbox(t,i){this.disabled||this.readonly||(this.isSelected(i)?this.removeOption(i):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(i)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}removeOption(t){this.value=this.value.filter(i=>!Pt.equals(i,this.getOptionValue(t),this.dataKey))}isSelected(t){let i=!1,r=this.getOptionValue(t);if(this.multiple){if(this.value)for(let o of this.value)if(Pt.equals(o,r,this.dataKey)){i=!0;break}}else i=Pt.equals(this.value,r,this.dataKey);return i}get allChecked(){let t=this.optionsToRender;if(!t||0===t.length)return!1;{let i=0,r=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of t)if(this.group)for(let l of this.getOptionGroupChildren(a)){let c=this.isOptionDisabled(l),u=this.isSelected(l);if(c)u?i++:r++;else{if(!u)return!1;o++}s++}else{let l=this.isOptionDisabled(a),c=this.isSelected(a);if(l)c?i++:r++;else{if(!c)return!1;o++}}return s===i||s===o||o&&s===o+r+i}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(xc.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(xc.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(){return!this.optionsToRender||this.optionsToRender&&0===this.optionsToRender.length}onFilter(t){this._filterValue=t.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let t=(this.filterBy||this.optionLabel||"label").split(","),i=[];for(let r of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(r),t,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&i.push({...r,[this.optionGroupChildren]:o})}this._filteredOptions=i}else this._filteredOptions=this._options.filter(t=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(t),this._filterValue,this.filterLocale));else this._filteredOptions=null}resetFilter(){this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this._filterValue=null,this._filteredOptions=null}get toggleAllDisabled(){let t=this.optionsToRender;if(!t||0===t.length)return!0;for(let i of t)if(!this.isOptionDisabled(i))return!1;return!0}toggleAll(t){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}),t.preventDefault())}checkAll(){let i=[];this.optionsToRender.forEach(r=>{if(this.group){let o=this.getOptionGroupChildren(r);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&i.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(r);(!o||o&&this.isSelected(r))&&i.push(this.getOptionValue(r))}}),this.value=i}uncheckAll(){let i=[];this.optionsToRender.forEach(r=>{this.group?r.items&&r.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&i.push(this.getOptionValue(o))}):this.isOptionDisabled(r)&&this.isSelected(r)&&i.push(this.getOptionValue(r))}),this.value=i}onOptionKeyDown(t,i){if(this.readonly)return;let r=t.currentTarget;switch(t.which){case 40:var o=this.findNextItem(r);o&&o.focus(),t.preventDefault();break;case 38:var s=this.findPrevItem(r);s&&s.focus(),t.preventDefault();break;case 13:this.onOptionClick(t,i),t.preventDefault()}}findNextItem(t){let i=t.nextElementSibling;return i?ce.hasClass(i,"p-disabled")||ce.isHidden(i)||ce.hasClass(i,"p-listbox-item-group")?this.findNextItem(i):i:null}findPrevItem(t){let i=t.previousElementSibling;return i?ce.hasClass(i,"p-disabled")||ce.isHidden(i)||ce.hasClass(i,"p-listbox-item-group")?this.findPrevItem(i):i:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(qn),O(CL),O(zd))},n.\u0275cmp=xe({type:n,selectors:[["p-listbox"]],contentQueries:function(t,i,r){if(1&t&&(fi(r,DL,5),fi(r,ML,5),fi(r,rr,4)),2&t){let o;Xe(o=et())&&(i.headerFacet=o.first),Xe(o=et())&&(i.footerFacet=o.first),Xe(o=et())&&(i.templates=o)}},viewQuery:function(t,i){if(1&t&&(hn($Q,5),hn(WQ,5)),2&t){let r;Xe(r=et())&&(i.headerCheckboxViewChild=r.first),Xe(r=et())&&(i.filterViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterBy:"filterBy",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Nt([xZ])],ngContentSelectors:EZ,decls:12,vars:18,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-empty-message",4,"ngIf"],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],["builtInFilterElement",""],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],["filter",""],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(t,i){1&t&&(So(TZ),I(0,"div",0),E(1,YQ,3,1,"div",1),E(2,tZ,5,3,"div",1),I(3,"div",0)(4,"ul",2),E(5,sZ,2,1,"ng-container",3),E(6,lZ,2,4,"ng-container",3),E(7,gZ,1,1,"ng-template",null,4,Bn),E(9,vZ,3,3,"li",5),E(10,CZ,3,3,"li",5),A()(),E(11,MZ,3,1,"div",6),A()),2&t&&(Dn(i.styleClass),b("ngClass",xt(16,SZ,i.disabled))("ngStyle",i.style),C(1),b("ngIf",i.headerFacet||i.headerTemplate),C(1),b("ngIf",i.checkbox&&i.multiple&&i.showToggleAll||i.filter),C(1),Dn(i.listStyleClass),b("ngClass","p-listbox-list-wrapper")("ngStyle",i.listStyle),C(1),Yt("aria-multiselectable",i.multiple),C(1),b("ngIf",i.group),C(1),b("ngIf",!i.group),C(3),b("ngIf",i.hasFilter()&&i.isEmpty()),C(1),b("ngIf",!i.hasFilter()&&i.isEmpty()),C(1),b("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[gi,Hr,nn,Oo,wr,Vd],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),XM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,xa,Ic,xa]}),n})();function IZ(n,e){1&n&&Dt(0)}const OZ=function(n,e,t,i){return{"p-button-icon":!0,"p-button-icon-left":n,"p-button-icon-right":e,"p-button-icon-top":t,"p-button-icon-bottom":i}};function AZ(n,e){if(1&n&&_e(0,"span",4),2&n){const t=M();Dn(t.loading?"p-button-loading-icon "+t.loadingIcon:t.icon),b("ngClass",Wf(4,OZ,"left"===t.iconPos&&t.label,"right"===t.iconPos&&t.label,"top"===t.iconPos&&t.label,"bottom"===t.iconPos&&t.label)),Yt("aria-hidden",!0)}}function kZ(n,e){if(1&n&&(I(0,"span",5),Te(1),A()),2&n){const t=M();Yt("aria-hidden",t.icon&&!t.label),C(1),Ot(t.label)}}function NZ(n,e){if(1&n&&(I(0,"span",4),Te(1),A()),2&n){const t=M();Dn(t.badgeClass),b("ngClass",t.badgeStyleClass()),C(1),Ot(t.badge)}}const PZ=function(n,e,t,i,r){return{"p-button p-component":!0,"p-button-icon-only":n,"p-button-vertical":e,"p-disabled":t,"p-button-loading":i,"p-button-loading-label-only":r}},LZ=["*"],Oc={button:"p-button",component:"p-component",iconOnly:"p-button-icon-only",disabled:"p-disabled",loading:"p-button-loading",labelOnly:"p-button-loading-label-only"};let ds=(()=>{class n{constructor(t){this.el=t,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1,this._internalClasses=Object.values(Oc)}get label(){return this._label}set label(t){this._label=t,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}get icon(){return this._icon}set icon(t){this._icon=t,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(t){this._loading=t,this.initialized&&(this.updateIcon(),this.setStyleClass())}get htmlElement(){return this.el.nativeElement}ngAfterViewInit(){ce.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){const t=[Oc.button,Oc.component];return this.icon&&!this.label&&Pt.isEmpty(this.htmlElement.textContent)&&t.push(Oc.iconOnly),this.loading&&(t.push(Oc.disabled,Oc.loading),!this.icon&&this.label&&t.push(Oc.labelOnly)),t}setStyleClass(){const t=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...t)}createLabel(){if(this.label){let t=document.createElement("span");this.icon&&!this.label&&t.setAttribute("aria-hidden","true"),t.className="p-button-label",t.appendChild(document.createTextNode(this.label)),this.htmlElement.appendChild(t)}}createIcon(){if(this.icon||this.loading){let t=document.createElement("span");t.className="p-button-icon",t.setAttribute("aria-hidden","true");let i=this.label?"p-button-icon-"+this.iconPos:null;i&&ce.addClass(t,i);let r=this.getIconClass();r&&ce.addMultipleClasses(t,r),this.htmlElement.insertBefore(t,this.htmlElement.firstChild)}}updateLabel(){let t=ce.findSingle(this.htmlElement,".p-button-label");this.label?t?t.textContent=this.label:this.createLabel():t&&this.htmlElement.removeChild(t)}updateIcon(){let t=ce.findSingle(this.htmlElement,".p-button-icon");this.icon||this.loading?t?t.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIcon():t&&this.htmlElement.removeChild(t)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}ngOnDestroy(){this.initialized=!1}}return n.\u0275fac=function(t){return new(t||n)(O(kt))},n.\u0275dir=Me({type:n,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),n})(),eT=(()=>{class n{constructor(){this.type="button",this.iconPos="left",this.loading=!1,this.loadingIcon="pi pi-spinner pi-spin",this.onClick=new ie,this.onFocus=new ie,this.onBlur=new ie}ngAfterContentInit(){this.templates.forEach(t=>{t.getType(),this.contentTemplate=t.template})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&1===String(this.badge).length}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-button"]],contentQueries:function(t,i,r){if(1&t&&fi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:"disabled",loading:"loading",loadingIcon:"loadingIcon",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},ngContentSelectors:LZ,decls:6,vars:17,consts:[["pRipple","",3,"ngStyle","disabled","ngClass","click","focus","blur"],[4,"ngTemplateOutlet"],[3,"ngClass","class",4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass"],[1,"p-button-label"]],template:function(t,i){1&t&&(So(),I(0,"button",0),de("click",function(o){return i.onClick.emit(o)})("focus",function(o){return i.onFocus.emit(o)})("blur",function(o){return i.onBlur.emit(o)}),_r(1),E(2,IZ,1,0,"ng-container",1),E(3,AZ,1,9,"span",2),E(4,kZ,2,2,"span",3),E(5,NZ,2,4,"span",2),A()),2&t&&(Dn(i.styleClass),b("ngStyle",i.style)("disabled",i.disabled||i.loading)("ngClass",function ik(n,e,t,i,r,o,s,a){const l=mr()+n,c=re(),u=To(c,l,t,i,r,o);return er(c,l+4,s)||u?Es(c,l+5,a?e.call(a,t,i,r,o,s):e(t,i,r,o,s)):Ff(c,l+5)}(11,PZ,i.icon&&!i.label,("top"===i.iconPos||"bottom"===i.iconPos)&&i.label,i.disabled||i.loading,i.loading,i.loading&&!i.icon&&i.label)),Yt("type",i.type)("aria-label",i.ariaLabel),C(2),b("ngTemplateOutlet",i.contentTemplate),C(1),b("ngIf",!i.contentTemplate&&(i.icon||i.loading)),C(1),b("ngIf",!i.contentTemplate&&i.label),C(1),b("ngIf",!i.contentTemplate&&i.badge))},dependencies:[gi,nn,Oo,wr,Vd],encapsulation:2,changeDetection:0}),n})(),ks=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,Ic]}),n})();function $r(n){return n instanceof kt?n.nativeElement:n}function uv(n,e,t,i){return k(t)&&(i=t,t=void 0),i?uv(n,e,t).pipe(ue(r=>R(r)?i(...r):i(r))):new Se(r=>{OL(n,e,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,t)})}function OL(n,e,t,i,r){let o;if(function VZ(n){return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener}(n)){const s=n;n.addEventListener(e,t,r),o=()=>s.removeEventListener(e,t,r)}else if(function zZ(n){return n&&"function"==typeof n.on&&"function"==typeof n.off}(n)){const s=n;n.on(e,t),o=()=>s.off(e,t)}else if(function jZ(n){return n&&"function"==typeof n.addListener&&"function"==typeof n.removeListener}(n)){const s=n;n.addListener(e,t),o=()=>s.removeListener(e,t)}else{if(!n||!n.length)throw new TypeError("Invalid event target");for(let s=0,a=n.length;s0?super.requestAsyncId(e,t,i):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(()=>e.flush(null))))}recycleAsyncId(e,t,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(e,t,i);0===e.actions.length&&(cancelAnimationFrame(t),e.scheduled=void 0)}});let HZ=1;const $Z=Promise.resolve(),dv={};function kL(n){return n in dv&&(delete dv[n],!0)}const NL={setImmediate(n){const e=HZ++;return dv[e]=!0,$Z.then(()=>kL(e)&&n()),e},clearImmediate(n){kL(n)}},tT=new class GZ extends us{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let i,r=-1,o=t.length;e=e||t.shift();do{if(i=e.execute(e.state,e.delay))break}while(++r0?super.requestAsyncId(e,t,i):(e.actions.push(this),e.scheduled||(e.scheduled=NL.setImmediate(e.flush.bind(e,null))))}recycleAsyncId(e,t,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(e,t,i);0===e.actions.length&&(NL.clearImmediate(t),e.scheduled=void 0)}}),Bd=new us(E_);class qZ{constructor(e){this.durationSelector=e}call(e,t){return t.subscribe(new KZ(e,this.durationSelector))}}class KZ extends Yo{constructor(e,t){super(e),this.durationSelector=t,this.hasValue=!1}_next(e){if(this.value=e,this.hasValue=!0,!this.throttled){let t;try{const{durationSelector:r}=this;t=r(e)}catch(r){return this.destination.error(r)}const i=Ql(t,new Vn(this));!i||i.closed?this.clearThrottle():this.add(this.throttled=i)}}clearThrottle(){const{value:e,hasValue:t,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function nT(n){return!R(n)&&n-parseFloat(n)+1>=0}function PL(n=0,e,t){let i=-1;return nT(e)?i=Number(e)<1?1:Number(e):vi(e)&&(t=e),vi(t)||(t=Bd),new Se(r=>{const o=nT(n)?n:+n-t.now();return t.schedule(QZ,o,{index:0,period:i,subscriber:r})})}function QZ(n){const{index:e,period:t,subscriber:i}=n;if(i.next(e),!i.closed){if(-1===t)return i.complete();n.index=e+1,this.schedule(n,t)}}let iT;try{iT=typeof Intl<"u"&&Intl.v8BreakIterator}catch{iT=!1}let mp,rT,RL=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function VW(n){return n===RN}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!iT)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(F(n_))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function gp(n){return function ZZ(){if(null==mp&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>mp=!0}))}finally{mp=mp||!1}return mp}()?n:!!n.capture}function jL(n){if(function JZ(){if(null==rT){const n=typeof document<"u"?document.head:null;rT=!(!n||!n.createShadowRoot&&!n.attachShadow)}return rT}()){const e=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function fv(n){return n.composedPath?n.composedPath()[0]:n.target}let nJ=(()=>{class n{constructor(t,i,r){this._platform=t,this._change=new ae,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(t.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,i=this._getWindow(),r=t.documentElement,o=r.getBoundingClientRect();return{top:-o.top||t.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||t.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(function LL(n,e=Bd){return function YZ(n){return function(t){return t.lift(new qZ(n))}}(()=>PL(n,e))}(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(t){return new(t||n)(F(RL),F(Jt),F(Nn,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),iJ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({}),n})();function fl(){}function xn(n,e,t){return function(r){return r.lift(new DJ(n,e,t))}}class DJ{constructor(e,t,i){this.nextOrObserver=e,this.error=t,this.complete=i}call(e,t){return t.subscribe(new MJ(e,this.nextOrObserver,this.error,this.complete))}}class MJ extends ee{constructor(e,t,i,r){super(e),this._tapNext=fl,this._tapError=fl,this._tapComplete=fl,this._tapError=i||fl,this._tapComplete=r||fl,k(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||fl,this._tapError=t.error||fl,this._tapComplete=t.complete||fl)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}function Hd(n,e=Bd){return t=>t.lift(new TJ(n,e))}class TJ{constructor(e,t){this.dueTime=e,this.scheduler=t}call(e,t){return t.subscribe(new SJ(e,this.dueTime,this.scheduler))}}class SJ extends ee{constructor(e,t,i){super(e),this.dueTime=t,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(EJ,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){const e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}function EJ(n){n.debouncedNext()}class OJ{constructor(e){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new ae,this._typeaheadSubscription=oe.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new ae,this.change=new ae,e instanceof qf&&(this._itemChangesSubscription=e.changes.subscribe(t=>{if(this._activeItem){const r=t.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(xn(t=>this._pressedLetters.push(t)),Hd(e),ni(()=>this._pressedLetters.length>0),ue(()=>this._pressedLetters.join(""))).subscribe(t=>{const i=this._getItemsArray();for(let r=1;r!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(on[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){const t=this._getItemsArray(),i="number"==typeof e?e:t.indexOf(e);this._activeItem=t[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){const t=this._getItemsArray();for(let i=1;i<=t.length;i++){const r=(this._activeItemIndex+e*i+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){const i=this._getItemsArray();if(i[e]){for(;this._skipPredicateFn(i[e]);)if(!i[e+=t])return;this.setActiveItem(e)}}_getItemsArray(){return this._items instanceof qf?this._items.toArray():this._items}}class BL extends OJ{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}}function VJ(n){const{subscriber:e,counter:t,period:i}=n;e.next(t),this.schedule({subscriber:e,counter:t+1,period:i},i)}function In(n){return e=>e.lift(new BJ(n))}class BJ{constructor(e){this.notifier=e}call(e,t){const i=new UJ(e),r=Ql(this.notifier,new Vn(i));return r&&!i.seenValue?(i.add(r),t.subscribe(i)):i}}class UJ extends Yo{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function oT(...n){return function HJ(){return Wa(1)}()(Re(...n))}const HL=(()=>{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})();function Tt(n){return e=>0===n?x_():e.lift(new $J(n))}class $J{constructor(e){if(this.total=e,this.total<0)throw new HL}call(e,t){return t.subscribe(new WJ(e,this.total))}}class WJ extends ee{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){const t=this.total,i=++this.count;i<=t&&(this.destination.next(e),i===t&&(this.destination.complete(),this.unsubscribe()))}}function sT(n,e,t){for(let i in e)if(e.hasOwnProperty(i)){const r=e[i];r?n.setProperty(i,r,t?.has(i)?"important":""):n.removeProperty(i)}return n}function $d(n,e){const t=e?"":"none";sT(n.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function WL(n,e,t){sT(n.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function mv(n,e){return e&&"none"!=e?n+" "+e:n}function GL(n){const e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function aT(n,e){return n.getPropertyValue(e).split(",").map(i=>i.trim())}function lT(n){const e=n.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function cT(n,e,t){const{top:i,bottom:r,left:o,right:s}=n;return t>=i&&t<=r&&e>=o&&e<=s}function yp(n,e,t){n.top+=e,n.bottom=n.top+n.height,n.left+=t,n.right=n.left+n.width}function YL(n,e,t,i){const{top:r,right:o,bottom:s,left:a,width:l,height:c}=n,u=l*e,d=c*e;return i>r-d&&ia-u&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:lT(t)})})}handleScroll(e){const t=fv(e),i=this.positions.get(t);if(!i)return null;const r=i.scrollPosition;let o,s;if(t===this._document){const c=this.getViewportScrollPosition();o=c.top,s=c.left}else o=t.scrollTop,s=t.scrollLeft;const a=r.top-o,l=r.left-s;return this.positions.forEach((c,u)=>{c.clientRect&&t!==u&&t.contains(u)&&yp(c.clientRect,a,l)}),r.top=o,r.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function KL(n){const e=n.cloneNode(!0),t=e.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();e.removeAttribute("id");for(let r=0;r$d(i,t)))}constructor(e,t,i,r,o,s){this._config=t,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new ae,this._pointerMoveSubscription=oe.EMPTY,this._pointerUpSubscription=oe.EMPTY,this._scrollSubscription=oe.EMPTY,this._resizeSubscription=oe.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new ae,this.started=new ae,this.released=new ae,this.ended=new ae,this.entered=new ae,this.exited=new ae,this.dropped=new ae,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(l.x-this._pickupPositionOnPage.x)+Math.abs(l.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const f=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),p=this._dropContainer;if(!f)return void this._endDragSequence(a);(!p||!p.isDragging()&&!p.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}a.preventDefault();const c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{const u=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,d=this._activeTransform;d.x=c.x-u.x+this._passiveTransform.x,d.y=c.y-u.y+this._passiveTransform.y,this._applyRootElementTransform(d.x,d.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new qL(i),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>$r(i)),this._handles.forEach(i=>$d(i,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){const t=$r(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,gv),t.addEventListener("touchstart",this._pointerDown,XL),t.addEventListener("dragstart",this._nativeDragStart,gv)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?$r(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),$d(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),$d(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){const e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){const e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){_p(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const i=this._rootElement,r=i.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();r.insertBefore(s,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),WL(i,!1,uT),this._document.body.appendChild(r.replaceChild(o,i)),this._getPreviewInsertionPoint(r,a).appendChild(this._preview),this.started.next({source:this,event:e}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();const i=this.isDragging(),r=_p(t),o=!r&&0!==t.button,s=this._rootElement,a=fv(t),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=r?function FJ(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(t):function RJ(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}(t);if(a&&a.draggable&&"mousedown"===t.type&&t.preventDefault(),i||o||l||c)return;if(this._handles.length){const h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=lT(this._boundaryElement));const u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,e,t);const d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){WL(this._rootElement,!0,uT),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,i=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),o=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,s,o,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,t,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_createPreviewElement(){const e=this._previewTemplate,t=this.previewClass,i=e?e.template:null;let r;if(i&&e){const o=e.matchSize?this._initialClientRect:null,s=e.viewContainer.createEmbeddedView(i,e.context);s.detectChanges(),r=tR(s,this._document),this._previewRef=s,e.matchSize?nR(r,o):r.style.transform=yv(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=KL(this._rootElement),nR(r,this._initialClientRect),this._initialTransform&&(r.style.transform=this._initialTransform);return sT(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},uT),$d(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(o=>r.classList.add(o)):r.classList.add(t)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);const t=function QJ(n){const e=getComputedStyle(n),t=aT(e,"transition-property"),i=t.find(a=>"transform"===a||"all"===a);if(!i)return 0;const r=t.indexOf(i),o=aT(e,"transition-duration"),s=aT(e,"transition-delay");return GL(o[r])+GL(s[r])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const r=s=>{(!s||fv(s)===this._preview&&"transform"===s.propertyName)&&(this._preview?.removeEventListener("transitionend",r),i(),clearTimeout(o))},o=setTimeout(r,1.5*t);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const e=this._placeholderTemplate,t=e?e.template:null;let i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=tR(this._placeholderRef,this._document)):i=KL(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(e,t,i){const r=t===this._rootElement?null:t,o=r?r.getBoundingClientRect():e,s=_p(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:o.left-e.left+(s.pageX-o.left-a.left),y:o.top-e.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(e){const t=this._getViewportScrollPosition(),i=_p(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=i.pageX-t.left,o=i.pageY-t.top;if(this._ownerSVGElement){const s=this._ownerSVGElement.getScreenCTM();if(s){const a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(e){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialClientRect,this._pickupPositionInElement):e;if("x"===this.lockAxis||"x"===t?r=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===t)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:o,y:s}=this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),u=a.top+s,d=a.bottom-(c-s);i=eR(i,a.left+o,a.right-(l-o)),r=eR(r,u,d)}return{x:i,y:r}}_updatePointerDirectionDelta(e){const{x:t,y:i}=e,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-o.x),a=Math.abs(i-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>o.x?1:-1,o.x=t),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>o.y?1:-1,o.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,$d(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,gv),e.removeEventListener("touchstart",this._pointerDown,XL),e.removeEventListener("dragstart",this._nativeDragStart,gv)}_applyRootElementTransform(e,t){const i=yv(e,t),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=mv(i,this._initialTransform)}_applyPreviewTransform(e,t){const i=this._previewTemplate?.template?void 0:this._initialTransform,r=yv(e,t);this._preview.style.transform=mv(r,i)}_getDragDistance(e){const t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(0===e&&0===t||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===i.width&&0===i.height)return;const o=r.left-i.left,s=i.right-r.right,a=r.top-i.top,l=i.bottom-r.bottom;r.width>i.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,r.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){const t=this.dragStartDelay;return"number"==typeof t?t:_p(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){const t=this._parentPositions.handleScroll(e);if(t){const i=fv(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&yp(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=jL(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){const i=this._previewContainer||"global";if("parent"===i)return e;if("global"===i){const r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return $r(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}}function yv(n,e){return`translate3d(${Math.round(n)}px, ${Math.round(e)}px, 0)`}function eR(n,e,t){return Math.max(e,Math.min(t,n))}function _p(n){return"t"===n.type[0]}function tR(n,e){const t=n.rootNodes;if(1===t.length&&t[0].nodeType===e.ELEMENT_NODE)return t[0];const i=e.createElement("div");return t.forEach(r=>i.appendChild(r)),i}function nR(n,e){n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.transform=yv(e.left,e.top)}function vp(n,e){return Math.max(0,Math.min(e,n))}class tX{constructor(e,t){this._element=e,this._dragDropRegistry=t,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(e){this.withItems(e)}sort(e,t,i,r){const o=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,i,r);if(-1===s&&o.length>0)return null;const a="horizontal"===this.orientation,l=o.findIndex(g=>g.drag===e),c=o[s],d=c.clientRect,h=l>s?1:-1,f=this._getItemOffsetPx(o[l].clientRect,d,h),p=this._getSiblingOffsetPx(l,o,h),m=o.slice();return function eX(n,e,t){const i=vp(e,n.length-1),r=vp(t,n.length-1);if(i===r)return;const o=n[i],s=r{if(m[y]===g)return;const v=g.drag===e,w=v?f:p,_=v?e.getPlaceholderElement():g.drag.getRootElement();g.offset+=w,a?(_.style.transform=mv(`translate3d(${Math.round(g.offset)}px, 0, 0)`,g.initialTransform),yp(g.clientRect,0,w)):(_.style.transform=mv(`translate3d(0, ${Math.round(g.offset)}px, 0)`,g.initialTransform),yp(g.clientRect,w,0))}),this._previousSwap.overlaps=cT(d,t,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:s}}enter(e,t,i,r){const o=null==r||r<0?this._getItemIndexFromPointerPosition(e,t,i):r,s=this._activeDraggables,a=s.indexOf(e),l=e.getPlaceholderElement();let c=s[o];if(c===e&&(c=s[o+1]),!c&&(null==o||-1===o||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const u=c.getRootElement();u.parentElement.insertBefore(l,u),s.splice(o,0,e)}else $r(this._element).appendChild(l),s.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables.forEach(e=>{const t=e.getRootElement();if(t){const i=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{yp(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const e="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:lT(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getItemOffsetPx(e,t,i){const r="horizontal"===this.orientation;let o=r?t.left-e.left:t.top-e.top;return-1===i&&(o+=r?t.width-e.width:t.height-e.height),o}_getSiblingOffsetPx(e,t,i){const r="horizontal"===this.orientation,o=t[e].clientRect,s=t[e+-1*i];let a=o[r?"width":"height"]*i;if(s){const l=r?"left":"top",c=r?"right":"bottom";-1===i?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,r="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const s=i[i.length-1].clientRect;return r?e>=s.right:t>=s.bottom}{const s=i[0].clientRect;return r?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,i,r){const o="horizontal"===this.orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>a!==e&&((!r||a!==this._previousSwap.drag||!this._previousSwap.overlaps||(o?r.x:r.y)!==this._previousSwap.delta)&&(o?t>=Math.floor(l.left)&&t=Math.floor(l.top)&&i!0,this.sortPredicate=()=>!0,this.beforeStarted=new ae,this.entered=new ae,this.exited=new ae,this.dropped=new ae,this.sorted=new ae,this.receivingStarted=new ae,this.receivingStopped=new ae,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=oe.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new ae,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function zJ(n=0,e=Bd){return(!nT(n)||n<0)&&(n=0),(!e||"function"!=typeof e.schedule)&&(e=Bd),new Se(t=>(t.add(e.schedule(VJ,n,{subscriber:t,counter:0,period:n})),t))}(0,AL).pipe(In(this._stopScrollTimers)).subscribe(()=>{const s=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?s.scrollBy(0,-a):2===this._verticalScrollDirection&&s.scrollBy(0,a),1===this._horizontalScrollDirection?s.scrollBy(-a,0):2===this._horizontalScrollDirection&&s.scrollBy(a,0)})},this.element=$r(e),this._document=i,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new qL(i),this._sortStrategy=new tX(this.element,t),this._sortStrategy.withSortPredicate((s,a)=>this.sortPredicate(s,a,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,i,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,r,o,s,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:l})}withItems(e){const t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>-1===e.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._sortStrategy.direction=e,this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){return this._sortStrategy.orientation=e,this}withScrollableParents(e){const t=$r(this.element);return this._scrollableElements=-1===e.indexOf(t)?[t,...e]:e.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,r){if(this.sortingDisabled||!this._clientRect||!YL(this._clientRect,.05,t,i))return;const o=this._sortStrategy.sort(e,t,i,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,r=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||i||YL(s.clientRect,.05,e,t)&&([r,o]=function iX(n,e,t,i){const r=oR(e,i),o=sR(e,t);let s=0,a=0;if(r){const l=n.scrollTop;1===r?l>0&&(s=1):n.scrollHeight-l>n.clientHeight&&(s=2)}if(o){const l=n.scrollLeft;1===o?l>0&&(a=1):n.scrollWidth-l>n.clientWidth&&(a=2)}return[s,a]}(a,s.clientRect,e,t),(r||o)&&(i=a))}),!r&&!o){const{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};r=oR(l,t),o=sR(l,e),i=window}i&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=i,(r||o)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const e=$r(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const e=$r(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(e).clientRect}_reset(){this._isDragging=!1;const e=$r(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(e,t){return null!=this._clientRect&&cT(this._clientRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(r=>r._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._clientRect||!cT(this._clientRect,t,i)||!this.enterPredicate(e,this))return!1;const r=this._getShadowRoot().elementFromPoint(t,i);if(!r)return!1;const o=$r(this.element);return r===o||o.contains(r)}_startReceiving(e,t){const i=this._activeSiblings;!i.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const e=jL($r(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}}function oR(n,e){const{top:t,bottom:i,height:r}=n,o=.05*r;return e>=t-o&&e<=t+o?1:e>=i-o&&e<=i+o?2:0}function sR(n,e){const{left:t,right:i,width:r}=n,o=.05*r;return e>=t-o&&e<=t+o?1:e>=i-o&&e<=i+o?2:0}const _v=gp({passive:!1,capture:!0});let rX=(()=>{class n{constructor(t,i){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new ae,this.pointerUp=new ae,this.scroll=new ae,this._preventDefaultWhileDragging=r=>{this._activeDragInstances.length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=i}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,_v)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,_v)}startDragging(t,i){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const r=i.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:_v}),r||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:_v}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(t){const i=this._activeDragInstances.indexOf(t);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}scrolled(t){const i=[this.scroll];return t&&t!==this._document&&i.push(new Se(r=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&r.next(a)};return t.addEventListener("scroll",s,!0),()=>{t.removeEventListener("scroll",s,!0)}}))),ys(...i)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,i)=>{this._document.removeEventListener(i,t.handler,t.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(t){return new(t||n)(F(Jt),F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const oX={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let dT=(()=>{class n{constructor(t,i,r,o){this._document=t,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=o}createDrag(t,i=oX){return new XJ(t,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new nX(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(t){return new(t||n)(F(Nn),F(Jt),F(nJ),F(rX))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),dR=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({providers:[dT],imports:[iJ]}),n})(),mT=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,ks,xa,Ic,dR,xa,dR]}),n})();const xX=["data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjMyODEgMjJWMjEuMDE1Nkw3LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw2LjYzMjgxIDExLjYxNzJWMTAuNjI1SDEwLjcxODhWMTEuNjE3Mkw5LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxNC44ODI4VjExLjgzNTlMMTMuNjA5NCAxMS42MTcyVjEwLjYyNUgxNy42OTUzVjExLjYxNzJMMTYuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTcuNjk1MyAyMS4wMTU2VjIySDEzLjYwOTRWMjEuMDE1NkwxNC44ODI4IDIwLjc5NjlWMTYuOTc2Nkg5LjQ0NTMxVjIwLjc5NjlMMTAuNzE4OCAyMS4wMTU2VjIySDYuNjMyODFaTTE5LjI3MzQgMjJWMjEuMDE1NkwyMS4wMzEyIDIwLjc5NjlWMTIuMjczNEwxOS4yNDIyIDEyLjMwNDdWMTEuMzQzOEwyMi41NzAzIDEwLjYyNVYyMC43OTY5TDI0LjMyMDMgMjEuMDE1NlYyMkgxOS4yNzM0WiIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTE4LjA4NTkgMjJWMjAuOTQ1M0wyMS44MTI1IDE2LjgwNDdDMjIuMjU1MiAxNi4zMDk5IDIyLjYwMTYgMTUuODg4IDIyLjg1MTYgMTUuNTM5MUMyMy4xMDE2IDE1LjE4NDkgMjMuMjc2IDE0Ljg2NDYgMjMuMzc1IDE0LjU3ODFDMjMuNDc0IDE0LjI5MTcgMjMuNTIzNCAxMy45OTQ4IDIzLjUyMzQgMTMuNjg3NUMyMy41MjM0IDEzLjExOTggMjMuMzUxNiAxMi42NDMyIDIzLjAwNzggMTIuMjU3OEMyMi42NjQxIDExLjg2NzIgMjIuMTcxOSAxMS42NzE5IDIxLjUzMTIgMTEuNjcxOUMyMC44NjQ2IDExLjY3MTkgMjAuMzQzOCAxMS44NzI0IDE5Ljk2ODggMTIuMjczNEMxOS41OTkgMTIuNjc0NSAxOS40MTQxIDEzLjI0MjIgMTkuNDE0MSAxMy45NzY2SDE3LjkzNzVMMTcuOTIxOSAxMy45Mjk3QzE3LjkwNjIgMTMuMjczNCAxOC4wNDQzIDEyLjY4NDkgMTguMzM1OSAxMi4xNjQxQzE4LjYyNzYgMTEuNjM4IDE5LjA0OTUgMTEuMjI0IDE5LjYwMTYgMTAuOTIxOUMyMC4xNTg5IDEwLjYxNDYgMjAuODIwMyAxMC40NjA5IDIxLjU4NTkgMTAuNDYwOUMyMi4zMDQ3IDEwLjQ2MDkgMjIuOTIxOSAxMC41OTkgMjMuNDM3NSAxMC44NzVDMjMuOTU4MyAxMS4xNDU4IDI0LjM1OTQgMTEuNTE4MiAyNC42NDA2IDExLjk5MjJDMjQuOTIxOSAxMi40NjYxIDI1LjA2MjUgMTMuMDEwNCAyNS4wNjI1IDEzLjYyNUMyNS4wNjI1IDE0LjI1IDI0Ljg3NzYgMTQuODcyNCAyNC41MDc4IDE1LjQ5MjJDMjQuMTQzMiAxNi4xMTIgMjMuNjI3NiAxNi43ODEyIDIyLjk2MDkgMTcuNUwxOS45Njg4IDIwLjc1NzhMMTkuOTg0NCAyMC43OTY5SDI0LjAyMzRMMjQuMTQ4NCAxOS40OTIySDI1LjQ1MzFWMjJIMTguMDg1OVoiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg==","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTIxLjQ2ODggMjIuMTY0MUMyMC43NzYgMjIuMTY0MSAyMC4xNTg5IDIyLjAzOTEgMTkuNjE3MiAyMS43ODkxQzE5LjA3NTUgMjEuNTMzOSAxOC42NTEgMjEuMTc0NSAxOC4zNDM4IDIwLjcxMDlDMTguMDQxNyAyMC4yNDIyIDE3Ljg5ODQgMTkuNjg3NSAxNy45MTQxIDE5LjA0NjlMMTcuOTM3NSAxOUgxOS40MDYyQzE5LjQwNjIgMTkuNTk5IDE5LjU4ODUgMjAuMDc1NSAxOS45NTMxIDIwLjQyOTdDMjAuMzIyOSAyMC43ODM5IDIwLjgyODEgMjAuOTYwOSAyMS40Njg4IDIwLjk2MDlDMjIuMTE5OCAyMC45NjA5IDIyLjYzMDIgMjAuNzgzOSAyMyAyMC40Mjk3QzIzLjM2OTggMjAuMDc1NSAyMy41NTQ3IDE5LjU1MjEgMjMuNTU0NyAxOC44NTk0QzIzLjU1NDcgMTguMTU2MiAyMy4zOTA2IDE3LjYzOCAyMy4wNjI1IDE3LjMwNDdDMjIuNzM0NCAxNi45NzE0IDIyLjIxNjEgMTYuODA0NyAyMS41MDc4IDE2LjgwNDdIMjAuMTY0MVYxNS42MDE2SDIxLjUwNzhDMjIuMTkwMSAxNS42MDE2IDIyLjY3MTkgMTUuNDMyMyAyMi45NTMxIDE1LjA5MzhDMjMuMjM5NiAxNC43NSAyMy4zODI4IDE0LjI3MzQgMjMuMzgyOCAxMy42NjQxQzIzLjM4MjggMTIuMzM1OSAyMi43NDQ4IDExLjY3MTkgMjEuNDY4OCAxMS42NzE5QzIwLjg2OTggMTEuNjcxOSAyMC4zODggMTEuODQ5IDIwLjAyMzQgMTIuMjAzMUMxOS42NjQxIDEyLjU1MjEgMTkuNDg0NCAxMy4wMTgyIDE5LjQ4NDQgMTMuNjAxNkgxOC4wMDc4TDE3Ljk5MjIgMTMuNTU0N0MxNy45NzY2IDEyLjk4MTggMTguMTEyIDEyLjQ2MDkgMTguMzk4NCAxMS45OTIyQzE4LjY5MDEgMTEuNTIzNCAxOS4wOTkgMTEuMTUxIDE5LjYyNSAxMC44NzVDMjAuMTU2MiAxMC41OTkgMjAuNzcwOCAxMC40NjA5IDIxLjQ2ODggMTAuNDYwOUMyMi41MjA4IDEwLjQ2MDkgMjMuMzU5NCAxMC43NDIyIDIzLjk4NDQgMTEuMzA0N0MyNC42MDk0IDExLjg2MiAyNC45MjE5IDEyLjY1ODkgMjQuOTIxOSAxMy42OTUzQzI0LjkyMTkgMTQuMTY0MSAyNC43Nzg2IDE0LjYzMjggMjQuNDkyMiAxNS4xMDE2QzI0LjIxMDkgMTUuNTY1MSAyMy43ODY1IDE1LjkxOTMgMjMuMjE4OCAxNi4xNjQxQzIzLjkwMSAxNi4zODggMjQuMzgyOCAxNi43Mzk2IDI0LjY2NDEgMTcuMjE4OEMyNC45NTA1IDE3LjY5NzkgMjUuMDkzOCAxOC4yMzQ0IDI1LjA5MzggMTguODI4MUMyNS4wOTM4IDE5LjUyMDggMjQuOTM3NSAyMC4xMTcyIDI0LjYyNSAyMC42MTcyQzI0LjMxNzcgMjEuMTEyIDIzLjg5MDYgMjEuNDk0OCAyMy4zNDM4IDIxLjc2NTZDMjIuNzk2OSAyMi4wMzEyIDIyLjE3MTkgMjIuMTY0MSAyMS40Njg4IDIyLjE2NDFaIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo=","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMiAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE2LjY1NjIgMTZWMTUuMDE1NkwxNy45Mjk3IDE0Ljc5NjlWMTMuMzc1SDEyLjgyMDNWMTIuNTA3OEwxNy44MzU5IDQuNjI1SDE5LjQ2MDlWMTIuMTcxOUgyMS4wMzEyVjEzLjM3NUgxOS40NjA5VjE0Ljc5NjlMMjAuNzM0NCAxNS4wMTU2VjE2SDE2LjY1NjJaTTE0LjQ2MDkgMTIuMTcxOUgxNy45Mjk3VjYuODIwMzFMMTcuODgyOCA2LjgwNDY5TDE3LjcyNjYgNy4yMTg3NUwxNC40NjA5IDEyLjE3MTlaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE2LjQwNjIgMTYuMTY0MUMxNS43NjU2IDE2LjE2NDEgMTUuMTkwMSAxNi4wNDY5IDE0LjY3OTcgMTUuODEyNUMxNC4xNzQ1IDE1LjU3ODEgMTMuNzc4NiAxNS4yMzE4IDEzLjQ5MjIgMTQuNzczNEMxMy4yMDU3IDE0LjMwOTkgMTMuMDcwMyAxMy43MzcgMTMuMDg1OSAxMy4wNTQ3TDEzLjEwMTYgMTMuMDA3OEgxNC40OTIyQzE0LjQ5MjIgMTMuNjIyNCAxNC42NjkzIDE0LjEwMTYgMTUuMDIzNCAxNC40NDUzQzE1LjM4MjggMTQuNzg5MSAxNS44NDM4IDE0Ljk2MDkgMTYuNDA2MiAxNC45NjA5QzE3LjA1NzMgMTQuOTYwOSAxNy41NjI1IDE0LjczMTggMTcuOTIxOSAxNC4yNzM0QzE4LjI4MTIgMTMuODE1MSAxOC40NjA5IDEzLjE4NzUgMTguNDYwOSAxMi4zOTA2QzE4LjQ2MDkgMTEuNjU2MiAxOC4yNzg2IDExLjA1NzMgMTcuOTE0MSAxMC41OTM4QzE3LjU1NDcgMTAuMTI1IDE3LjA1NDcgOS44OTA2MiAxNi40MTQxIDkuODkwNjJDMTUuODA5OSA5Ljg5MDYyIDE1LjM2OTggOS45ODE3NyAxNS4wOTM4IDEwLjE2NDFDMTQuODIyOSAxMC4zNDY0IDE0LjYyNSAxMC42MjUgMTQuNSAxMUwxMy4yMTg4IDEwLjg2NzJMMTMuODc1IDQuNjI1SDE5Ljg4MjhWNi44NzVIMTguNzI2NkwxOC41NzgxIDUuOTkyMTlIMTUuMTc5N0wxNC44MTI1IDkuMTg3NUMxNC45Njg4IDkuMDY3NzEgMTUuMTM4IDguOTYzNTQgMTUuMzIwMyA4Ljg3NUMxNS41MDI2IDguNzgxMjUgMTUuNzAwNSA4LjcwNTczIDE1LjkxNDEgOC42NDg0NEMxNi4xMzI4IDguNTkxMTUgMTYuMzY5OCA4LjU1OTkgMTYuNjI1IDguNTU0NjlDMTcuMzIyOSA4LjU0OTQ4IDE3LjkyNDUgOC43MDMxMiAxOC40Mjk3IDkuMDE1NjJDMTguOTM0OSA5LjMyMjkyIDE5LjMyMjkgOS43NjU2MiAxOS41OTM4IDEwLjM0MzhDMTkuODY0NiAxMC45MTY3IDIwIDExLjU5MzggMjAgMTIuMzc1QzIwIDEzLjEzNTQgMTkuODYyIDEzLjc5OTUgMTkuNTg1OSAxNC4zNjcyQzE5LjMxNTEgMTQuOTM0OSAxOC45MTE1IDE1LjM3NzYgMTguMzc1IDE1LjY5NTNDMTcuODQzOCAxNi4wMDc4IDE3LjE4NzUgMTYuMTY0MSAxNi40MDYyIDE2LjE2NDFaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMSAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE3LjEyNSAxNi4xNjQxQzE2LjM4NTQgMTYuMTY0MSAxNS43MjQgMTUuOTg0NCAxNS4xNDA2IDE1LjYyNUMxNC41NjI1IDE1LjI2MDQgMTQuMTA2OCAxNC43MzE4IDEzLjc3MzQgMTQuMDM5MUMxMy40NDAxIDEzLjM0NjQgMTMuMjczNCAxMi41MDc4IDEzLjI3MzQgMTEuNTIzNFY5Ljk5MjE5QzEzLjI3MzQgOC43ODkwNiAxMy40NTMxIDcuNzc4NjUgMTMuODEyNSA2Ljk2MDk0QzE0LjE3NzEgNi4xMzgwMiAxNC42NzcxIDUuNTE1NjIgMTUuMzEyNSA1LjA5Mzc1QzE1Ljk1MzEgNC42NzE4OCAxNi42ODc1IDQuNDYwOTQgMTcuNTE1NiA0LjQ2MDk0QzE3LjkwMSA0LjQ2MDk0IDE4LjI4MzkgNC41MDUyMSAxOC42NjQxIDQuNTkzNzVDMTkuMDQ5NSA0LjY4MjI5IDE5LjM2NzIgNC43OTQyNyAxOS42MTcyIDQuOTI5NjlMMTkuMzIwMyA2LjA3ODEyQzE5LjA3NTUgNS45NTgzMyAxOC44MDczIDUuODYxOTggMTguNTE1NiA1Ljc4OTA2QzE4LjIyNCA1LjcxMDk0IDE3Ljg5MDYgNS42NzE4OCAxNy41MTU2IDUuNjcxODhDMTYuNzE4OCA1LjY3MTg4IDE2LjA4MzMgNS45NzM5NiAxNS42MDk0IDYuNTc4MTJDMTUuMTQwNiA3LjE3NzA4IDE0Ljg5MDYgOC4wODMzMyAxNC44NTk0IDkuMjk2ODhMMTQuODkwNiA5LjMyODEyQzE1LjE4MjMgOS4wNTcyOSAxNS41MzkxIDguODQzNzUgMTUuOTYwOSA4LjY4NzVDMTYuMzgyOCA4LjUyNjA0IDE2LjgzODUgOC40NDUzMSAxNy4zMjgxIDguNDQ1MzFDMTguMDA1MiA4LjQ0NTMxIDE4LjU5MzggOC42MDY3NyAxOS4wOTM4IDguOTI5NjlDMTkuNTkzOCA5LjI0NzQgMTkuOTc5MiA5LjY4NzUgMjAuMjUgMTAuMjVDMjAuNTI2IDEwLjgxMjUgMjAuNjY0MSAxMS40NTMxIDIwLjY2NDEgMTIuMTcxOUMyMC42NjQxIDEyLjk1ODMgMjAuNTE4MiAxMy42NTEgMjAuMjI2NiAxNC4yNUMxOS45MzQ5IDE0Ljg0OSAxOS41MjM0IDE1LjMxNzcgMTguOTkyMiAxNS42NTYyQzE4LjQ2MDkgMTUuOTk0OCAxNy44Mzg1IDE2LjE2NDEgMTcuMTI1IDE2LjE2NDFaTTE3LjEyNSAxNC45NjA5QzE3LjU0NjkgMTQuOTYwOSAxNy45MDYyIDE0LjgzODUgMTguMjAzMSAxNC41OTM4QzE4LjUgMTQuMzQ5IDE4LjcyNjYgMTQuMDE1NiAxOC44ODI4IDEzLjU5MzhDMTkuMDQ0MyAxMy4xNzE5IDE5LjEyNSAxMi42OTc5IDE5LjEyNSAxMi4xNzE5QzE5LjEyNSAxMS40MjE5IDE4LjkzNDkgMTAuODA0NyAxOC41NTQ3IDEwLjMyMDNDMTguMTc5NyA5LjgzNTk0IDE3LjY1ODkgOS41OTM3NSAxNi45OTIyIDkuNTkzNzVDMTYuNjQzMiA5LjU5Mzc1IDE2LjMyNTUgOS42NDMyMyAxNi4wMzkxIDkuNzQyMTlDMTUuNzU3OCA5LjgzNTk0IDE1LjUxMyA5Ljk3MTM1IDE1LjMwNDcgMTAuMTQ4NEMxNS4xMDE2IDEwLjMyMDMgMTQuOTM0OSAxMC41MjM0IDE0LjgwNDcgMTAuNzU3OFYxMS42NzE5QzE0LjgwNDcgMTIuNzI5MiAxNS4wMjM0IDEzLjU0MTcgMTUuNDYwOSAxNC4xMDk0QzE1LjkwMzYgMTQuNjc3MSAxNi40NTgzIDE0Ljk2MDkgMTcuMTI1IDE0Ljk2MDlaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"],jX=new ZD(document),hR=[...Array(6).keys()].map(n=>{const e=n+1;return{label:`Heading ${e}`,icon:Ns(xX[n]||""),id:`heading${e}`,attributes:{level:e}}}),gT={label:"Paragraph",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"},fR=[{label:"List Ordered",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"}],UX=[{label:"AI Content",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjA4NDEgOC43MjQ5M0wxMi41MjIgOS41MDc0MkMxMi40NTU2IDkuNTI3NjggMTIuMzk3MiA5LjU2OTczIDEyLjM1NTcgOS42MjcyOEMxMi4zMTQyIDkuNjg0ODMgMTIuMjkxOCA5Ljc1NDc4IDEyLjI5MTggOS44MjY2NkMxMi4yOTE4IDkuODk4NTQgMTIuMzE0MiA5Ljk2ODQ5IDEyLjM1NTcgMTAuMDI2QzEyLjM5NzIgMTAuMDgzNiAxMi40NTU2IDEwLjEyNTYgMTIuNTIyIDEwLjE0NTlMMTUuMDg0MSAxMC45Mjg0TDE1LjgzODEgMTMuNTg3M0MxNS44NTc3IDEzLjY1NjIgMTUuODk4MiAxMy43MTY4IDE1Ljk1MzYgMTMuNzU5OEMxNi4wMDkxIDEzLjgwMjkgMTYuMDc2NSAxMy44MjYyIDE2LjE0NTcgMTMuODI2MkMxNi4yMTUgMTMuODI2MiAxNi4yODI0IDEzLjgwMjkgMTYuMzM3OCAxMy43NTk4QzE2LjM5MzMgMTMuNzE2OCAxNi40MzM4IDEzLjY1NjIgMTYuNDUzMyAxMy41ODczTDE3LjIwNzcgMTAuOTI4NEwxOS43Njk3IDEwLjE0NTlDMTkuODM2MiAxMC4xMjU2IDE5Ljg5NDYgMTAuMDgzNiAxOS45MzYxIDEwLjAyNkMxOS45Nzc2IDkuOTY4NDkgMjAgOS44OTg1NCAyMCA5LjgyNjY2QzIwIDkuNzU0NzggMTkuOTc3NiA5LjY4NDgzIDE5LjkzNjEgOS42MjcyOEMxOS44OTQ2IDkuNTY5NzMgMTkuODM2MiA5LjUyNzY4IDE5Ljc2OTcgOS41MDc0MkwxNy4yMDc3IDguNzI0OTNMMTYuNDUzMyA2LjA2NjA0QzE2LjQzMzggNS45OTcwNyAxNi4zOTMzIDUuOTM2NTIgMTYuMzM3OCA1Ljg5MzQ1QzE2LjI4MjQgNS44NTAzNyAxNi4yMTUgNS44MjcwOSAxNi4xNDU3IDUuODI3MDlDMTYuMDc2NSA1LjgyNzA5IDE2LjAwOTEgNS44NTAzNyAxNS45NTM2IDUuODkzNDVDMTUuODk4MiA1LjkzNjUyIDE1Ljg1NzYgNS45OTcwNyAxNS44MzgxIDYuMDY2MDRMMTUuMDg0MSA4LjcyNDkzWiIgZmlsbD0iIzhEOTJBNSIvPgo8cGF0aCBkPSJNMTguMjE4NSAzLjk1MjMzTDE5LjYwODQgMy41Mjc0M0MxOS42NzQ5IDMuNTA3MTYgMTkuNzMzMiAzLjQ2NTExIDE5Ljc3NDcgMy40MDc1N0MxOS44MTYyIDMuMzUwMDIgMTkuODM4NiAzLjI4MDA4IDE5LjgzODYgMy4yMDgyQzE5LjgzODYgMy4xMzYzMyAxOS44MTYyIDMuMDY2MzggMTkuNzc0NyAzLjAwODg0QzE5LjczMzIgMi45NTEyOSAxOS42NzQ5IDIuOTA5MjQgMTkuNjA4NCAyLjg4ODk4TDE4LjIxODUgMi40NjQ0MUwxNy44MDkxIDEuMDIxNjdDMTcuNzg5NiAwLjk1MjY5OCAxNy43NDkxIDAuODkyMTQ0IDE3LjY5MzYgMC44NDkwNjlDMTcuNjM4MiAwLjgwNTk5NSAxNy41NzA3IDAuNzgyNzE1IDE3LjUwMTUgMC43ODI3MTVDMTcuNDMyMiAwLjc4MjcxNSAxNy4zNjQ4IDAuODA1OTk1IDE3LjMwOTQgMC44NDkwNjlDMTcuMjUzOSAwLjg5MjE0NCAxNy4yMTM0IDAuOTUyNjk4IDE3LjE5MzkgMS4wMjE2N0wxNi43ODQ4IDIuNDY0NDFMMTUuMzk0NiAyLjg4ODk4QzE1LjMyODEgMi45MDkyMyAxNS4yNjk4IDIuOTUxMjggMTUuMjI4MyAzLjAwODgzQzE1LjE4NjcgMy4wNjYzNyAxNS4xNjQzIDMuMTM2MzIgMTUuMTY0MyAzLjIwODJDMTUuMTY0MyAzLjI4MDA4IDE1LjE4NjcgMy4zNTAwMyAxNS4yMjgzIDMuNDA3NThDMTUuMjY5OCAzLjQ2NTEyIDE1LjMyODEgMy41MDcxNyAxNS4zOTQ2IDMuNTI3NDNMMTYuNzg0OCAzLjk1MjMzTDE3LjE5MzkgNS4zOTQ3NEMxNy4yMTM0IDUuNDYzNzEgMTcuMjUzOSA1LjUyNDI2IDE3LjMwOTQgNS41NjczM0MxNy4zNjQ4IDUuNjEwNDEgMTcuNDMyMiA1LjYzMzY5IDE3LjUwMTUgNS42MzM2OUMxNy41NzA3IDUuNjMzNjkgMTcuNjM4MiA1LjYxMDQxIDE3LjY5MzYgNS41NjczM0MxNy43NDkxIDUuNTI0MjYgMTcuNzg5NiA1LjQ2MzcxIDE3LjgwOTEgNS4zOTQ3NEwxOC4yMTg1IDMuOTUyMzNaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xMS4xNjcyIDQuNTU2MzVMOS43NjQ3OCA1LjE0OTk2QzkuNzA1NzggNS4xNzQ5NCA5LjY1NTI5IDUuMjE3NiA5LjYxOTc0IDUuMjcyNDlDOS41ODQyIDUuMzI3MzcgOS41NjUyMiA1LjM5MjAxIDkuNTY1MjIgNS40NTgxNEM5LjU2NTIyIDUuNTI0MjYgOS41ODQyIDUuNTg4OSA5LjYxOTc0IDUuNjQzNzhDOS42NTUyOSA1LjY5ODY3IDkuNzA1NzggNS43NDEzMyA5Ljc2NDc4IDUuNzY2MzFMMTEuMTY3MiA2LjM1OTkyTDExLjczOTIgNy44MTUzNEMxMS43NjMzIDcuODc2NTcgMTEuODA0NCA3LjkyODk3IDExLjg1NzMgNy45NjU4NUMxMS45MTAyIDguMDAyNzQgMTEuOTcyNCA4LjAyMjQzIDEyLjAzNjIgOC4wMjI0M0MxMi4wOTk5IDguMDIyNDMgMTIuMTYyMiA4LjAwMjc0IDEyLjIxNSA3Ljk2NTg1QzEyLjI2NzkgNy45Mjg5NyAxMi4zMDkgNy44NzY1NyAxMi4zMzMxIDcuODE1MzRMMTIuOTA1MSA2LjM1OTkyTDE0LjMwNzIgNS43NjYzMUMxNC4zNjYyIDUuNzQxMzIgMTQuNDE2NyA1LjY5ODY3IDE0LjQ1MjMgNS42NDM3OEMxNC40ODc4IDUuNTg4ODkgMTQuNTA2OCA1LjUyNDI2IDE0LjUwNjggNS40NTgxNEMxNC41MDY4IDUuMzkyMDEgMTQuNDg3OCA1LjMyNzM4IDE0LjQ1MjMgNS4yNzI0OUMxNC40MTY3IDUuMjE3NiAxNC4zNjYyIDUuMTc0OTUgMTQuMzA3MiA1LjE0OTk2TDEyLjkwNTEgNC41NTYzNUwxMi4zMzMxIDMuMTAxMjZDMTIuMzA5IDMuMDQwMDMgMTIuMjY3OSAyLjk4NzY0IDEyLjIxNSAyLjk1MDc1QzEyLjE2MjIgMi45MTM4NyAxMi4wOTk5IDIuODk0MTcgMTIuMDM2MiAyLjg5NDE3QzExLjk3MjQgMi44OTQxNyAxMS45MTAyIDIuOTEzODcgMTEuODU3MyAyLjk1MDc1QzExLjgwNDQgMi45ODc2NCAxMS43NjMzIDMuMDQwMDMgMTEuNzM5MiAzLjEwMTI2TDExLjE2NzIgNC41NTYzNVoiIGZpbGw9IiM4RDkyQTUiLz4KPHJlY3QgeT0iNC4yNjEyMyIgd2lkdGg9IjguNjk1NjUiIGhlaWdodD0iMS41NjUyMiIgcng9IjAuNzgyNjA5IiBmaWxsPSIjOEQ5MkE1Ii8+CjxyZWN0IHk9IjguOTU3MDMiIHdpZHRoPSIxMS4zMDQzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8cmVjdCB5PSIxMy42NTIzIiB3aWR0aD0iMTMuOTEzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8L3N2Zz4K"),id:"aiContentPrompt"},{label:"AI Image",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjUxNDI5IDUuNUMxLjg0NzQ2IDUuNSAxLjIwNzk0IDUuNzYxNjkgMC43MzY0MTcgNi4yMjc1MUMwLjI2NDg5NyA2LjY5MzMyIDAgNy4zMjUxMSAwIDcuOTgzODdWMTcuMDE2MUMwIDE3LjY3NDkgMC4yNjQ4OTcgMTguMzA2NyAwLjczNjQxNyAxOC43NzI1QzEuMjA3OTQgMTkuMjM4MyAxLjg0NzQ2IDE5LjUgMi41MTQyOSAxOS41SDEzLjQ4NTdDMTQuMTUyNSAxOS41IDE0Ljc5MjEgMTkuMjM4MyAxNS4yNjM2IDE4Ljc3MjVDMTUuNzM1MSAxOC4zMDY3IDE2IDE3LjY3NDkgMTYgMTcuMDE2MVYxN0wxNiAxNi43TDE0LjYyODYgMTUuMzgxM0wxMi4xNDE3IDEyLjkyNDVDMTIuMDc2NyAxMi44NTU5IDExLjk5NyAxMi44MDI0IDExLjkwODQgMTIuNzY4QzExLjgxOTkgMTIuNzMzNyAxMS43MjQ2IDEyLjcxOTIgMTEuNjI5NyAxMi43MjU4QzExLjUzMzcgMTIuNzMxMyAxMS40Mzk3IDEyLjc1NTcgMTEuMzUzNCAxMi43OTc2QzExLjI2NyAxMi44Mzk1IDExLjE5IDEyLjg5OCAxMS4xMjY5IDEyLjk2OTdMOS45NDc0MyAxNC4zNjk3TDUuNzQxNzEgMTAuMjE0OEM1LjY3OTc0IDEwLjE0OTggNS42MDQ1MSAxMC4wOTg0IDUuNTIwOTkgMTAuMDY0MkM1LjQzNzQ2IDEwLjAyOTkgNS4zNDc1NCAxMC4wMTM1IDUuMjU3MTQgMTAuMDE2MUM1LjE2MTExIDEwLjAyMTYgNS4wNjcxNiAxMC4wNDYxIDQuOTgwODEgMTAuMDg3OUM0Ljg5NDQ2IDEwLjEyOTggNC44MTc0NCAxMC4xODgzIDQuNzU0MjkgMTAuMjZMMS4zNzE0MyAxNC4yNDMyVjcuOTgzODdDMS4zNzE0MyA3LjY4NDQzIDEuNDkxODQgNy4zOTcyNiAxLjcwNjE2IDcuMTg1NTJDMS45MjA0OSA2Ljk3Mzc5IDIuMjExMTggNi44NTQ4NCAyLjUxNDI5IDYuODU0ODRINy4xMDk2OVY2LjE3NzQyVjUuNUgyLjUxNDI5Wk0xLjM3MTQgMTcuMDE2VjE2LjM1NjdMNS4zMDI4MyAxMS42OTZMOS4wNjk2OCAxNS40MTczTDYuNzY1NjkgMTguMTI3SDIuNTE0MjZDMi4yMTQyOSAxOC4xMjcxIDEuOTI2MzQgMTguMDEwNiAxLjcxMjUzIDE3LjgwMjdDMS40OTg3MiAxNy41OTQ5IDEuMzc2MiAxNy4zMTIzIDEuMzcxNCAxNy4wMTZaTTguNTQ4NTQgMTguMTQ1MUwxMS43MDI4IDE0LjQwNTdMMTQuNTgyOCAxNy4yNTA5QzE0LjUzMjMgMTcuNTAyIDE0LjM5NTQgMTcuNzI4MiAxNC4xOTU1IDE3Ljg5MTFDMTMuOTk1NiAxOC4wNTQgMTMuNzQ0OSAxOC4xNDM4IDEzLjQ4NTcgMTguMTQ1MUgxMS4wMTcxSDguNTQ4NTRaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xNC4zNDY3IDkuNjMzNTVMMTEuNDAwMyAxMC41MzM0QzExLjMyMzkgMTAuNTU2NyAxMS4yNTY4IDEwLjYwNTEgMTEuMjA5MSAxMC42NzEyQzExLjE2MTMgMTAuNzM3NCAxMS4xMzU1IDEwLjgxNzkgMTEuMTM1NSAxMC45MDA1QzExLjEzNTUgMTAuOTgzMiAxMS4xNjEzIDExLjA2MzYgMTEuMjA5MSAxMS4xMjk4QzExLjI1NjggMTEuMTk2IDExLjMyMzkgMTEuMjQ0NCAxMS40MDAzIDExLjI2NzdMMTQuMzQ2NyAxMi4xNjc1TDE1LjIxMzggMTUuMjI1M0MxNS4yMzYzIDE1LjMwNDYgMTUuMjgyOSAxNS4zNzQyIDE1LjM0NjcgMTUuNDIzN0MxNS40MTA0IDE1LjQ3MzIgMTUuNDg3OSAxNS41IDE1LjU2NzYgMTUuNUMxNS42NDcyIDE1LjUgMTUuNzI0NyAxNS40NzMyIDE1Ljc4ODUgMTUuNDIzN0MxNS44NTIzIDE1LjM3NDIgMTUuODk4OSAxNS4zMDQ2IDE1LjkyMTMgMTUuMjI1M0wxNi43ODg4IDEyLjE2NzVMMTkuNzM1MiAxMS4yNjc3QzE5LjgxMTYgMTEuMjQ0NCAxOS44Nzg3IDExLjE5NiAxOS45MjY1IDExLjEyOThDMTkuODc4NyAxMC42MDUxIDE5LjgxMTYgMTAuNTU2NyAxOS43MzUyIDEwLjUzMzRMMTYuNzg4OCA5LjYzMzU1TDE1LjkyMTMgNi41NzU4M0MxNS44OTg5IDYuNDk2NTEgMTUuODUyMyA2LjQyNjg4IDE1Ljc4ODUgNi4zNzczNEMxNS43MjQ4IDYuMzI3ODEgMTUuNjQ3MiA2LjMwMTA0IDE1LjU2NzYgNi4zMDEwNEMxNS40ODc5IDYuMzAxMDQgMTUuNDEwNCA2LjMyNzgxIDE1LjM0NjcgNi4zNzczNEMxNS4yODI5IDYuNDI2ODggMTUuMjM2MyA2LjQ5NjUxIDE1LjIxMzggNi41NzU4M0wxNC4zNDY3IDkuNjMzNTVaIiBmaWxsPSIjOEQ5MkE1Ii8+Cjwvc3ZnPg=="),id:"aiImagePrompt"},{label:"Blockquote",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalRule"}];function Ns(n){return jX.bypassSecurityTrustUrl(n)}const vv=[{label:"Image",icon:"image",id:"image"},{label:"Video",icon:"movie",id:"video"},...hR,{label:"Table",icon:"table_view",id:"table"},...fR,...UX,gT],HX=[...hR,gT,...fR],$X=[{name:"flip",options:{fallbackPlacements:["top"]}},{name:"preventOverflow",options:{altAxis:!1,tether:!1}}],GX={horizontalRule:!0,table:!0,image:!0,video:!0},YX=[...vv.filter(n=>!GX[n.id])],pR=function({type:n,editor:e,range:t,suggestionKey:i,ItemsType:r}){const o={to:t.to+i.getState(e.view.state).query?.length,from:n===r.BLOCK?t.from:t.from+1};e.chain().deleteRange(o).run()},mR={duration:[250,0],interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}};class kc{getLine(e,t){let i=null;if(e){const r=e.split("\n");i=r&&r.length>t?r[t]:null}return i}camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,i)=>0===i?t.toLowerCase():t.toUpperCase()).replace(/\s+/g,"")}titleCase(e){return`${e.charAt(0).toLocaleUpperCase()}${e.slice(1)}`}}kc.\u0275fac=function(e){return new(e||kc)},kc.\u0275prov=$({token:kc,factory:kc.\u0275fac});class KX{getQueryParams(){const e=window.location.search.substring(1).split("&"),t=new Map;return e.forEach(i=>{const r=i.split("=");t.set(r[0],r[1])}),t}getQueryStringParam(e){let t=null;const r=new RegExp("[?&]"+e.replace(/[\[\]]/g,"\\$&")+"(=([^&#]*)|&|#|$)").exec(window.location.href);return r&&r[2]&&(t=decodeURIComponent(r[2].replace(/\+/g," "))),t}}class mo{constructor(e){this.stringUtils=e,this.showLogs=!0,this.httpRequestUtils=new KX,this.showLogs=this.shouldShowLogs(),this.showLogs&&console.info("Setting the logger --\x3e Developer mode logger on")}info(e,...t){t&&t.length>0?console.info(this.wrapMessage(e),t):console.info(this.wrapMessage(e))}error(e,...t){t&&t.length>0?console.error(this.wrapMessage(e),t):console.error(this.wrapMessage(e))}warn(e,...t){t&&t.length>0?console.warn(this.wrapMessage(e),t):console.warn(this.wrapMessage(e))}debug(e,...t){t&&t.length>0?console.debug(this.wrapMessage(e),t):console.debug(this.wrapMessage(e))}shouldShowLogs(){this.httpRequestUtils.getQueryStringParam("devMode");return!0}wrapMessage(e){return this.showLogs?e:this.getCaller()+">> "+e}getCaller(){let e="unknown";try{throw new Error}catch(t){e=this.cleanCaller(this.stringUtils.getLine(t.stack,4))}return e}cleanCaller(e){return e?e.trim().substr(3):"unknown"}}mo.\u0275fac=function(e){return new(e||mo)(F(kc))},mo.\u0275prov=$({token:mo,factory:mo.\u0275fac});class Wd{constructor(e,t){this.loggerService=e,this.suppressAlerts=!1,this.locale=t;try{const i=window.location.search.substring(1);this.locale=this.checkQueryForUrl(i)}catch{this.loggerService.error("Could not set locale from URL.")}}checkQueryForUrl(e){let t=this.locale;if(e&&e.length){const i=e,r="locale=",o=i.indexOf(r);if(o>=0){let s=i.indexOf("&",o);s=-1!==s?s:i.indexOf("#",o),s=-1!==s?s:i.length,t=i.substring(o+r.length,s)}}return t}}Wd.\u0275fac=function(e){return new(e||Wd)(F(mo),F(Is))},Wd.\u0275prov=$({token:Wd,factory:Wd.\u0275fac});class Ps{constructor(e,t){this.loggerService=t,this.siteId="48190c8c-42c4-46af-8d1a-0cd5db894797",this.hideFireOn=!1,this.hideRulePushOptions=!1,this.authUser=e;try{let i=document.location.search.substring(1);""===i&&document.location.hash.indexOf("?")>=0&&(i=document.location.hash.substr(document.location.hash.indexOf("?")+1));const r=Ps.parseQueryParam(i,"realmId");r&&(this.siteId=r,this.loggerService.debug("Site Id set to ",this.siteId));const o=Ps.parseQueryParam(i,"hideFireOn");o&&(this.hideFireOn="true"===o||"1"===o,this.loggerService.debug("hideFireOn set to ",this.hideFireOn));const s=Ps.parseQueryParam(i,"hideRulePushOptions");s&&(this.hideRulePushOptions="true"===s||"1"===s,this.loggerService.debug("hideRulePushOptions set to ",this.hideRulePushOptions)),this.configureUser(i,e)}catch(i){this.loggerService.error("Could not set baseUrl automatically.",i)}}static parseQueryParam(e,t){let i=-1,r=null;if(t+="=",e&&e.length&&(i=e.indexOf(t)),i>=0){let o=e.indexOf("&",i);o=-1!==o?o:e.length,r=e.substring(i+t.length,o)}return r}configureUser(e,t){t.suppressAlerts="true"===Ps.parseQueryParam(e,"suppressAlerts")}}Ps.\u0275fac=function(e){return new(e||Ps)(F(Wd),F(mo))},Ps.\u0275prov=$({token:Ps,factory:Ps.\u0275fac});class bp{isIE11(){return"Netscape"===navigator.appName&&-1!==navigator.appVersion.indexOf("Trident")}}function Ai(n){return function(t){const i=new ZX(n),r=t.lift(i);return i.caught=r}}bp.\u0275fac=function(e){return new(e||bp)},bp.\u0275prov=$({token:bp,factory:bp.\u0275fac});class ZX{constructor(e){this.selector=e}call(e,t){return t.subscribe(new JX(e,this.selector,this.caught))}}class JX extends Yo{constructor(e,t,i){super(e),this.selector=t,this.caught=i}error(e){if(!this.isStopped){let t;try{t=this.selector(e,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new Vn(this);this.add(i);const r=Ql(t,i);r!==i&&this.add(r)}}}var Nc=(()=>(function(n){n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.FORBIDDEN=403]="FORBIDDEN",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.NO_CONTENT=204]="NO_CONTENT",n[n.SERVER_ERROR=500]="SERVER_ERROR",n[n.UNAUTHORIZED=401]="UNAUTHORIZED"}(Nc||(Nc={})),Nc))();const tee_1="Could not connect to server.";class yT{constructor(e,t,i,r,o){this.code=e,this.message=t,this.request=i,this.response=r,this.source=o}}class _T{constructor(e){this.resp=e;try{this.bodyJsonObject=e.body,this.headers=e.headers}catch{this.bodyJsonObject=null}}header(e){return this.headers.get(e)}get i18nMessagesMap(){return this.bodyJsonObject.i18nMessagesMap}get contentlets(){return this.bodyJsonObject.contentlets}get entity(){return this.bodyJsonObject.entity}get tempFiles(){return this.bodyJsonObject.tempFiles}get errorsMessages(){let e="";return this.bodyJsonObject.errors?this.bodyJsonObject.errors.forEach(t=>{e+=t.message}):e=this.bodyJsonObject.messages.toString(),e}get status(){return this.resp.status}get response(){return this.resp}existError(e){return this.bodyJsonObject.errors&&this.bodyJsonObject.errors.filter(t=>t.errorCode===e).length>0}}class Wr extends ae{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new ve;return this._value}next(e){super.next(this._value=e)}}const bv=(()=>{function n(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return n.prototype=Object.create(Error.prototype),n})();class yR extends ee{notifyNext(e,t,i,r,o){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}class iee extends ee{constructor(e,t,i){super(),this.parent=e,this.outerValue=t,this.outerIndex=i,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function _R(n,e,t,i,r=new iee(n,t,i)){if(!r.closed)return e instanceof Se?e.subscribe(r):Be(e)(r)}const vR={};function vT(...n){let e,t;return vi(n[n.length-1])&&(t=n.pop()),"function"==typeof n[n.length-1]&&(e=n.pop()),1===n.length&&R(n[0])&&(n=n[0]),Ga(n,t).lift(new ree(e))}class ree{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new oee(e,this.resultSelector))}}class oee extends yR{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(vR),this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(let i=0;i{let t;try{t=n()}catch(r){return void e.error(r)}return(t?_t(t):x_()).subscribe(e)})}function Gd(n=null){return e=>e.lift(new see(n))}class see{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new aee(e,this.defaultValue))}}class aee extends ee{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function wR(n=uee){return e=>e.lift(new lee(n))}class lee{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new cee(e,this.errorFactory))}}class cee extends ee{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function uee(){return new bv}function pl(n,e){const t=arguments.length>=2;return i=>i.pipe(n?ni((r,o)=>n(r,o,i)):z,Tt(1),t?Gd(e):wR(()=>new bv))}function wv(n,e){let t=!1;return arguments.length>=2&&(t=!0),function(r){return r.lift(new dee(n,e,t))}}class dee{constructor(e,t,i=!1){this.accumulator=e,this.seed=t,this.hasSeed=i}call(e,t){return t.subscribe(new hee(e,this.accumulator,this.seed,this.hasSeed))}}class hee extends ee{constructor(e,t,i,r){super(e),this.accumulator=t,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}_tryNext(e){const t=this.index++;let i;try{i=this.accumulator(this.seed,e,t)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function wp(n){return function(t){return 0===n?x_():t.lift(new fee(n))}}class fee{constructor(e){if(this.total=e,this.total<0)throw new HL}call(e,t){return t.subscribe(new pee(e,this.total))}}class pee extends ee{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){const t=this.ring,i=this.total,r=this.count++;t.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(n?ni((r,o)=>n(r,o,i)):z,wp(1),t?Gd(e):wR(()=>new bv))}class gee{constructor(e,t){this.predicate=e,this.inclusive=t}call(e,t){return t.subscribe(new yee(e,this.predicate,this.inclusive))}}class yee extends ee{constructor(e,t,i){super(e),this.predicate=t,this.inclusive=i,this.index=0}_next(e){const t=this.destination;let i;try{i=this.predicate(e,this.index++)}catch(r){return void t.error(r)}this.nextOrComplete(e,i)}nextOrComplete(e,t){const i=this.destination;Boolean(t)?i.next(e):(this.inclusive&&i.next(e),i.complete())}}class vee{constructor(e){this.value=e}call(e,t){return t.subscribe(new bee(e,this.value))}}class bee extends ee{constructor(e,t){super(e),this.value=t}_next(e){this.destination.next(this.value)}}function bT(n){return e=>e.lift(new wee(n))}class wee{constructor(e){this.callback=e}call(e,t){return t.subscribe(new Cee(e,this.callback))}}class Cee extends ee{constructor(e,t){super(e),this.add(new oe(t))}}const At="primary",Cp=Symbol("RouteTitle");class Dee{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function Yd(n){return new Dee(n)}function Mee(n,e,t){const i=t.path.split("/");if(i.length>n.length||"full"===t.pathMatch&&(e.hasChildren()||i.lengthi[o]===r)}return n===e}function MR(n){return Array.prototype.concat.apply([],n)}function TR(n){return n.length>0?n[n.length-1]:null}function Ui(n,e){for(const t in n)n.hasOwnProperty(t)&&e(n[t],t)}function ml(n){return zC(n)?n:jf(n)?_t(Promise.resolve(n)):Re(n)}const Cv=!1,See={exact:function xR(n,e,t){if(!Lc(n.segments,e.segments)||!Dv(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(const i in e.children)if(!n.children[i]||!xR(n.children[i],e.children[i],t))return!1;return!0},subset:IR},SR={exact:function Eee(n,e){return Ls(n,e)},subset:function xee(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>DR(n[t],e[t]))},ignored:()=>!0};function ER(n,e,t){return See[t.paths](n.root,e.root,t.matrixParams)&&SR[t.queryParams](n.queryParams,e.queryParams)&&!("exact"===t.fragment&&n.fragment!==e.fragment)}function IR(n,e,t){return OR(n,e,e.segments,t)}function OR(n,e,t,i){if(n.segments.length>t.length){const r=n.segments.slice(0,t.length);return!(!Lc(r,t)||e.hasChildren()||!Dv(r,t,i))}if(n.segments.length===t.length){if(!Lc(n.segments,t)||!Dv(n.segments,t,i))return!1;for(const r in e.children)if(!n.children[r]||!IR(n.children[r],e.children[r],i))return!1;return!0}{const r=t.slice(0,n.segments.length),o=t.slice(n.segments.length);return!!(Lc(n.segments,r)&&Dv(n.segments,r,i)&&n.children[At])&&OR(n.children[At],e,o,i)}}function Dv(n,e,t){return e.every((i,r)=>SR[t](n[r].parameters,i.parameters))}class Pc{constructor(e=new Lt([],{}),t={},i=null){this.root=e,this.queryParams=t,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yd(this.queryParams)),this._queryParamMap}toString(){return Aee.serialize(this)}}class Lt{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Ui(t,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Mv(this)}}class Dp{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=Yd(this.parameters)),this._parameterMap}toString(){return NR(this)}}function Lc(n,e){return n.length===e.length&&n.every((t,i)=>t.path===e[i].path)}let Mp=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return new wT},providedIn:"root"}),n})();class wT{parse(e){const t=new Vee(e);return new Pc(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){const t=`/${Tp(e.root,!0)}`,i=function Pee(n){const e=Object.keys(n).map(t=>{const i=n[t];return Array.isArray(i)?i.map(r=>`${Tv(t)}=${Tv(r)}`).join("&"):`${Tv(t)}=${Tv(i)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(e.queryParams),r="string"==typeof e.fragment?`#${function kee(n){return encodeURI(n)}(e.fragment)}`:"";return`${t}${i}${r}`}}const Aee=new wT;function Mv(n){return n.segments.map(e=>NR(e)).join("/")}function Tp(n,e){if(!n.hasChildren())return Mv(n);if(e){const t=n.children[At]?Tp(n.children[At],!1):"",i=[];return Ui(n.children,(r,o)=>{o!==At&&i.push(`${o}:${Tp(r,!1)}`)}),i.length>0?`${t}(${i.join("//")})`:t}{const t=function Oee(n,e){let t=[];return Ui(n.children,(i,r)=>{r===At&&(t=t.concat(e(i,r)))}),Ui(n.children,(i,r)=>{r!==At&&(t=t.concat(e(i,r)))}),t}(n,(i,r)=>r===At?[Tp(n.children[At],!1)]:[`${r}:${Tp(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[At]?`${Mv(n)}/${t[0]}`:`${Mv(n)}/(${t.join("//")})`}}function AR(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Tv(n){return AR(n).replace(/%3B/gi,";")}function CT(n){return AR(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Sv(n){return decodeURIComponent(n)}function kR(n){return Sv(n.replace(/\+/g,"%20"))}function NR(n){return`${CT(n.path)}${function Nee(n){return Object.keys(n).map(e=>`;${CT(e)}=${CT(n[e])}`).join("")}(n.parameters)}`}const Lee=/^[^\/()?;=#]+/;function Ev(n){const e=n.match(Lee);return e?e[0]:""}const Ree=/^[^=?&#]+/,jee=/^[^&#]+/;class Vee{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Lt([],{}):new Lt([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(i[At]=new Lt(e,t)),i}parseSegment(){const e=Ev(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Q(4009,Cv);return this.capture(e),new Dp(Sv(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=Ev(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const r=Ev(this.remaining);r&&(i=r,this.capture(i))}e[Sv(t)]=Sv(i)}parseQueryParam(e){const t=function Fee(n){const e=n.match(Ree);return e?e[0]:""}(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const s=function zee(n){const e=n.match(jee);return e?e[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=kR(t),o=kR(i);if(e.hasOwnProperty(r)){let s=e[r];Array.isArray(s)||(s=[s],e[r]=s),s.push(o)}else e[r]=o}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Ev(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Q(4010,Cv);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=At);const s=this.parseChildren();t[o]=1===Object.keys(s).length?s[At]:new Lt([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Q(4011,Cv)}}function DT(n){return n.segments.length>0?new Lt([],{[At]:n}):n}function xv(n){const e={};for(const i of Object.keys(n.children)){const o=xv(n.children[i]);(o.segments.length>0||o.hasChildren())&&(e[i]=o)}return function Bee(n){if(1===n.numberOfChildren&&n.children[At]){const e=n.children[At];return new Lt(n.segments.concat(e.segments),e.children)}return n}(new Lt(n.segments,e))}function Rc(n){return n instanceof Pc}function $ee(n,e,t,i,r){if(0===t.length)return qd(e.root,e.root,e.root,i,r);const o=function RR(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new LR(!0,0,n);let e=0,t=!1;const i=n.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Ui(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?t=!0:".."===a?e++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new LR(t,e,i)}(t);return o.toRoot()?qd(e.root,e.root,new Lt([],{}),i,r):function s(l){const c=function Gee(n,e,t,i){if(n.isAbsolute)return new Kd(e.root,!0,0);if(-1===i)return new Kd(t,t===e.root,0);return function FR(n,e,t){let i=n,r=e,o=t;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Q(4005,!1);r=i.segments.length}return new Kd(i,!1,r-o)}(t,i+(Sp(n.commands[0])?0:1),n.numberOfDoubleDots)}(o,e,n.snapshot?._urlSegment,l),u=c.processChildren?xp(c.segmentGroup,c.index,o.commands):TT(c.segmentGroup,c.index,o.commands);return qd(e.root,c.segmentGroup,u,i,r)}(n.snapshot?._lastPathIndex)}function Sp(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function Ep(n){return"object"==typeof n&&null!=n&&n.outlets}function qd(n,e,t,i,r){let s,o={};i&&Ui(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=n===e?t:PR(n,e,t);const a=DT(xv(s));return new Pc(a,o,r)}function PR(n,e,t){const i={};return Ui(n.children,(r,o)=>{i[o]=r===e?t:PR(r,e,t)}),new Lt(n.segments,i)}class LR{constructor(e,t,i){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=i,e&&i.length>0&&Sp(i[0]))throw new Q(4003,!1);const r=i.find(Ep);if(r&&r!==TR(i))throw new Q(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Kd{constructor(e,t,i){this.segmentGroup=e,this.processChildren=t,this.index=i}}function TT(n,e,t){if(n||(n=new Lt([],{})),0===n.segments.length&&n.hasChildren())return xp(n,e,t);const i=function qee(n,e,t){let i=0,r=e;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return o;const s=n.segments[r],a=t[i];if(Ep(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!zR(l,c,s))return o;i+=2}else{if(!zR(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,e,t),r=t.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=TT(n.children[s],e,o))}),Ui(n.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new Lt(n.segments,r)}}function ST(n,e,t){const i=n.segments.slice(0,e);let r=0;for(;r{"string"==typeof t&&(t=[t]),null!==t&&(e[i]=ST(new Lt([],{}),0,t))}),e}function jR(n){const e={};return Ui(n,(t,i)=>e[i]=`${t}`),e}function zR(n,e,t){return n==t.path&&Ls(e,t.parameters)}const Ip="imperative";class Rs{constructor(e,t){this.id=e,this.url=t}}class ET extends Rs{constructor(e,t,i="imperative",r=null){super(e,t),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Fc extends Rs{constructor(e,t,i){super(e,t),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Iv extends Rs{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class VR extends Rs{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=16}}class BR extends Rs{constructor(e,t,i,r){super(e,t),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Qee extends Rs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Zee extends Rs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Jee extends Rs{constructor(e,t,i,r,o){super(e,t),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Xee extends Rs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ete extends Rs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class tte{constructor(e){this.route=e,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class nte{constructor(e){this.route=e,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class ite{constructor(e){this.snapshot=e,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class rte{constructor(e){this.snapshot=e,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ote{constructor(e){this.snapshot=e,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ste{constructor(e){this.snapshot=e,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class UR{constructor(e,t,i){this.routerEvent=e,this.position=t,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let lte=(()=>{class n{createUrlTree(t,i,r,o,s,a){return $ee(t||i.root,r,o,s,a)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),cte=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(e){return lte.\u0275fac(e)},providedIn:"root"}),n})();class HR{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=xT(e,this._root);return t?t.children.map(i=>i.value):[]}firstChild(e){const t=xT(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=IT(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return IT(e,this._root).map(t=>t.value)}}function xT(n,e){if(n===e.value)return e;for(const t of e.children){const i=xT(n,t);if(i)return i}return null}function IT(n,e){if(n===e.value)return[e];for(const t of e.children){const i=IT(n,t);if(i.length)return i.unshift(e),i}return[]}class Ia{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function Qd(n){const e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}class $R extends HR{constructor(e,t){super(e),this.snapshot=t,OT(this,e)}toString(){return this.snapshot.toString()}}function WR(n,e){const t=function ute(n,e){const s=new Ov([],{},{},"",{},At,e,null,n.root,-1,{});return new YR("",new Ia(s,[]))}(n,e),i=new Wr([new Dp("",{})]),r=new Wr({}),o=new Wr({}),s=new Wr({}),a=new Wr(""),l=new Zd(i,r,s,a,o,At,e,t.root);return l.snapshot=t.root,new $R(new Ia(l,[]),t)}class Zd{constructor(e,t,i,r,o,s,a,l){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(ue(c=>c[Cp]))??Re(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(ue(e=>Yd(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(ue(e=>Yd(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function GR(n,e="emptyOnly"){const t=n.pathFromRoot;let i=0;if("always"!==e)for(i=t.length-1;i>=1;){const r=t[i],o=t[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function dte(n){return n.reduce((e,t)=>({params:{...e.params,...t.params},data:{...e.data,...t.data},resolve:{...t.data,...e.resolve,...t.routeConfig?.data,...t._resolvedData}}),{params:{},data:{},resolve:{}})}(t.slice(i))}class Ov{get title(){return this.data?.[Cp]}constructor(e,t,i,r,o,s,a,l,c,u,d){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Yd(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yd(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class YR extends HR{constructor(e,t){super(t),this.url=e,OT(this,t)}toString(){return qR(this._root)}}function OT(n,e){e.value._routerState=n,e.children.forEach(t=>OT(n,t))}function qR(n){const e=n.children.length>0?` { ${n.children.map(qR).join(", ")} } `:"";return`${n.value}${e}`}function AT(n){if(n.snapshot){const e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,Ls(e.queryParams,t.queryParams)||n.queryParams.next(t.queryParams),e.fragment!==t.fragment&&n.fragment.next(t.fragment),Ls(e.params,t.params)||n.params.next(t.params),function Tee(n,e){if(n.length!==e.length)return!1;for(let t=0;tLs(t.parameters,e[i].parameters))}(n.url,e.url);return t&&!(!n.parent!=!e.parent)&&(!n.parent||kT(n.parent,e.parent))}function Op(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){const i=t.value;i._futureSnapshot=e.value;const r=function fte(n,e,t){return e.children.map(i=>{for(const r of t.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Op(n,i,r);return Op(n,i)})}(n,e,t);return new Ia(i,r)}{if(n.shouldAttach(e.value)){const o=n.retrieve(e.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>Op(n,a)),s}}const i=function pte(n){return new Zd(new Wr(n.url),new Wr(n.params),new Wr(n.queryParams),new Wr(n.fragment),new Wr(n.data),n.outlet,n.component,n)}(e.value),r=e.children.map(o=>Op(n,o));return new Ia(i,r)}}const NT="ngNavigationCancelingError";function KR(n,e){const{redirectTo:t,navigationBehaviorOptions:i}=Rc(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=QR(!1,0,e);return r.url=t,r.navigationBehaviorOptions=i,r}function QR(n,e,t){const i=new Error("NavigationCancelingError: "+(n||""));return i[NT]=!0,i.cancellationCode=e,t&&(i.url=t),i}function ZR(n){return JR(n)&&Rc(n.url)}function JR(n){return n&&n[NT]}class mte{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Ap,this.attachRef=null}}let Ap=(()=>{class n{constructor(){this.contexts=new Map}onChildOutletCreated(t,i){const r=this.getOrCreateContext(t);r.outlet=i,this.contexts.set(t,r)}onChildOutletDestroyed(t){const i=this.getContext(t);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let i=this.getContext(t);return i||(i=new mte,this.contexts.set(t,i)),i}getContext(t){return this.contexts.get(t)||null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Av=!1;let XR=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=At,this.activateEvents=new ie,this.deactivateEvents=new ie,this.attachEvents=new ie,this.detachEvents=new ie,this.parentContexts=vt(Ap),this.location=vt(Br),this.changeDetector=vt(qn),this.environmentInjector=vt(Ts)}ngOnChanges(t){if(t.name){const{firstChange:i,previousValue:r}=t.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Q(4012,Av);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Q(4012,Av);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Q(4012,Av);this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,i){this.activated=t,this._activatedRoute=i,this.location.insert(t.hostView),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,i){if(this.isActivated)throw new Q(4013,Av);this._activatedRoute=t;const r=this.location,s=t.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new gte(t,a,r.injector);if(i&&function yte(n){return!!n.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Me({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Ji]}),n})();class gte{constructor(e,t,i){this.route=e,this.childContexts=t,this.parent=i}get(e,t){return e===Zd?this.route:e===Ap?this.childContexts:this.parent.get(e,t)}}let PT=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["ng-component"]],standalone:!0,features:[tl],decls:1,vars:0,template:function(t,i){1&t&&_e(0,"router-outlet")},dependencies:[XR],encapsulation:2}),n})();function eF(n,e){return n.providers&&!n._injector&&(n._injector=Qy(n.providers,e,`Route: ${n.path}`)),n._injector??e}function RT(n){const e=n.children&&n.children.map(RT),t=e?{...n,children:e}:{...n};return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==At&&(t.component=PT),t}function Po(n){return n.outlet||At}function tF(n,e){const t=n.filter(i=>Po(i)===e);return t.push(...n.filter(i=>Po(i)!==e)),t}function kp(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}class Cte{constructor(e,t,i,r){this.routeReuseStrategy=e,this.futureState=t,this.currState=i,this.forwardEvent=r}activate(e){const t=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,i,e),AT(this.futureState.root),this.activateChildRoutes(t,i,e)}deactivateChildRoutes(e,t,i){const r=Qd(t);e.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Ui(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(e,t,i){const r=e.value,o=t?t.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,i);else o&&this.deactivateRouteAndItsChildren(t,i)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,o=Qd(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,o=Qd(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(e,t,i){const r=Qd(t);e.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new ste(o.value.snapshot))}),e.children.length&&this.forwardEvent(new rte(e.value.snapshot))}activateRoutes(e,t,i){const r=e.value,o=t?t.value:null;if(AT(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),AT(a.route.value),this.activateChildRoutes(e,null,s.children)}else{const a=kp(r.snapshot),l=a?.get(dc)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,i)}}class nF{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class kv{constructor(e,t){this.component=e,this.route=t}}function Dte(n,e,t){const i=n._root;return Np(i,e?e._root:null,t,[i.value])}function Jd(n,e){const t=Symbol(),i=e.get(n,t);return i===t?"function"!=typeof n||function ow(n){return null!==Fu(n)}(n)?e.get(n):n:i}function Np(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Qd(e);return n.children.forEach(s=>{(function Tte(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function Ste(n,e,t){if("function"==typeof t)return t(n,e);switch(t){case"pathParamsChange":return!Lc(n.url,e.url);case"pathParamsOrQueryParamsChange":return!Lc(n.url,e.url)||!Ls(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!kT(n,e)||!Ls(n.queryParams,e.queryParams);default:return!kT(n,e)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new nF(i)):(o.data=s.data,o._resolvedData=s._resolvedData),Np(n,e,o.component?a?a.children:null:t,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new kv(a.outlet.component,s))}else s&&Pp(e,a,r),r.canActivateChecks.push(new nF(i)),Np(n,null,o.component?a?a.children:null:t,i,r)})(s,o[s.value.outlet],t,i.concat([s.value]),r),delete o[s.value.outlet]}),Ui(o,(s,a)=>Pp(s,t.getContext(a),r)),r}function Pp(n,e,t){const i=Qd(n),r=n.value;Ui(i,(o,s)=>{Pp(o,r.component?e?e.children.getContext(s):null:e,t)}),t.canDeactivateChecks.push(new kv(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}function Lp(n){return"function"==typeof n}function FT(n){return n instanceof bv||"EmptyError"===n?.name}const Nv=Symbol("INITIAL_VALUE");function Xd(){return yi(n=>vT(n.map(e=>e.pipe(Tt(1),function pv(...n){const e=n[n.length-1];return vi(e)?(n.pop(),t=>oT(n,t,e)):t=>oT(n,t)}(Nv)))).pipe(ue(e=>{for(const t of e)if(!0!==t){if(t===Nv)return Nv;if(!1===t||t instanceof Pc)return t}return!0}),ni(e=>e!==Nv),Tt(1)))}function iF(n){return he(xn(e=>{if(Rc(e))throw KR(0,e)}),ue(e=>!0===e))}const jT={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function rF(n,e,t,i,r){const o=zT(n,e,t);return o.matched?function Hte(n,e,t,i){const r=e.canMatch;return r&&0!==r.length?Re(r.map(s=>{const a=Jd(s,n);return ml(function kte(n){return n&&Lp(n.canMatch)}(a)?a.canMatch(e,t):n.runInContext(()=>a(e,t)))})).pipe(Xd(),iF()):Re(!0)}(i=eF(e,i),e,t).pipe(ue(s=>!0===s?o:{...jT})):Re(o)}function zT(n,e,t){if(""===e.path)return"full"===e.pathMatch&&(n.hasChildren()||t.length>0)?{...jT}:{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const r=(e.matcher||Mee)(t,n,e);if(!r)return{...jT};const o={};Ui(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Pv(n,e,t,i){if(t.length>0&&function Gte(n,e,t){return t.some(i=>Lv(n,e,i)&&Po(i)!==At)}(n,t,i)){const o=new Lt(e,function Wte(n,e,t,i){const r={};r[At]=i,i._sourceSegment=n,i._segmentIndexShift=e.length;for(const o of t)if(""===o.path&&Po(o)!==At){const s=new Lt([],{});s._sourceSegment=n,s._segmentIndexShift=e.length,r[Po(o)]=s}return r}(n,e,i,new Lt(t,n.children)));return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:[]}}if(0===t.length&&function Yte(n,e,t){return t.some(i=>Lv(n,e,i))}(n,t,i)){const o=new Lt(n.segments,function $te(n,e,t,i,r){const o={};for(const s of i)if(Lv(n,t,s)&&!r[Po(s)]){const a=new Lt([],{});a._sourceSegment=n,a._segmentIndexShift=e.length,o[Po(s)]=a}return{...r,...o}}(n,e,t,i,n.children));return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:t}}const r=new Lt(n.segments,n.children);return r._sourceSegment=n,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:t}}function Lv(n,e,t){return(!(n.hasChildren()||e.length>0)||"full"!==t.pathMatch)&&""===t.path}function oF(n,e,t,i){return!!(Po(n)===i||i!==At&&Lv(e,t,n))&&("**"===n.path||zT(e,n,t).matched)}function sF(n,e,t){return 0===e.length&&!n.children[t]}const Rv=!1;class Fv{constructor(e){this.segmentGroup=e||null}}class aF{constructor(e){this.urlTree=e}}function Rp(n){return ho(new Fv(n))}function lF(n){return ho(new aF(n))}class Zte{constructor(e,t,i,r,o){this.injector=e,this.configLoader=t,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const e=Pv(this.urlTree.root,[],[],this.config).segmentGroup,t=new Lt(e.segments,e.children);return this.expandSegmentGroup(this.injector,this.config,t,At).pipe(ue(o=>this.createUrlTree(xv(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ai(o=>{if(o instanceof aF)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof Fv?this.noMatchError(o):o}))}match(e){return this.expandSegmentGroup(this.injector,this.config,e.root,At).pipe(ue(r=>this.createUrlTree(xv(r),e.queryParams,e.fragment))).pipe(Ai(r=>{throw r instanceof Fv?this.noMatchError(r):r}))}noMatchError(e){return new Q(4002,Rv)}createUrlTree(e,t,i){const r=DT(e);return new Pc(r,t,i)}expandSegmentGroup(e,t,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(e,t,i).pipe(ue(o=>new Lt([],o))):this.expandSegment(e,i,t,i.segments,r,!0)}expandChildren(e,t,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return _t(r).pipe(ol(o=>{const s=i.children[o],a=tF(t,o);return this.expandSegmentGroup(e,a,s,o).pipe(ue(l=>({segment:l,outlet:o})))}),wv((o,s)=>(o[s.outlet]=s.segment,o),{}),CR())}expandSegment(e,t,i,r,o,s){return _t(i).pipe(ol(a=>this.expandSegmentAgainstRoute(e,t,i,a,r,o,s).pipe(Ai(c=>{if(c instanceof Fv)return Re(null);throw c}))),pl(a=>!!a),Ai((a,l)=>{if(FT(a))return sF(t,r,o)?Re(new Lt([],{})):Rp(t);throw a}))}expandSegmentAgainstRoute(e,t,i,r,o,s,a){return oF(r,t,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,i,r,o,s):Rp(t):Rp(t)}expandSegmentAgainstRouteUsingRedirect(e,t,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?lF(o):this.lineralizeSegments(i,o).pipe(Jn(s=>{const a=new Lt(s,{});return this.expandSegment(e,a,t,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=zT(t,r,o);if(!a)return Rp(t);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?lF(d):this.lineralizeSegments(r,d).pipe(Jn(h=>this.expandSegment(e,t,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(e,t,i,r,o){return"**"===i.path?(e=eF(i,e),i.loadChildren?(i._loadedRoutes?Re({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(e,i)).pipe(ue(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new Lt(r,{})))):Re(new Lt(r,{}))):rF(t,i,r,e).pipe(yi(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(e=i._injector??e,i,r).pipe(Jn(u=>{const d=u.injector??e,h=u.routes,{segmentGroup:f,slicedSegments:p}=Pv(t,a,l,h),m=new Lt(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(ue(w=>new Lt(a,w)));if(0===h.length&&0===p.length)return Re(new Lt(a,{}));const g=Po(i)===o;return this.expandSegment(d,m,h,p,g?At:o,!0).pipe(ue(v=>new Lt(a.concat(v.segments),v.children)))})):Rp(t)))}getChildConfig(e,t,i){return t.children?Re({routes:t.children,injector:e}):t.loadChildren?void 0!==t._loadedRoutes?Re({routes:t._loadedRoutes,injector:t._loadedInjector}):function Ute(n,e,t,i){const r=e.canLoad;return void 0===r||0===r.length?Re(!0):Re(r.map(s=>{const a=Jd(s,n);return ml(function xte(n){return n&&Lp(n.canLoad)}(a)?a.canLoad(e,t):n.runInContext(()=>a(e,t)))})).pipe(Xd(),iF())}(e,t,i).pipe(Jn(r=>r?this.configLoader.loadChildren(e,t).pipe(xn(o=>{t._loadedRoutes=o.routes,t._loadedInjector=o.injector})):function Kte(n){return ho(QR(Rv,3))}())):Re({routes:[],injector:e})}lineralizeSegments(e,t){let i=[],r=t.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Re(i);if(r.numberOfChildren>1||!r.children[At])return ho(new Q(4e3,Rv));r=r.children[At]}}applyRedirectCommands(e,t,i){return this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,i)}applyRedirectCreateUrlTree(e,t,i,r){const o=this.createSegmentGroup(e,t.root,i,r);return new Pc(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const i={};return Ui(e,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=t[a]}else i[o]=r}),i}createSegmentGroup(e,t,i,r){const o=this.createSegments(e,t.segments,i,r);let s={};return Ui(t.children,(a,l)=>{s[l]=this.createSegmentGroup(e,a,i,r)}),new Lt(o,s)}createSegments(e,t,i,r){return t.map(o=>o.path.startsWith(":")?this.findPosParam(e,o,r):this.findOrReturn(o,i))}findPosParam(e,t,i){const r=i[t.path.substring(1)];if(!r)throw new Q(4001,Rv);return r}findOrReturn(e,t){let i=0;for(const r of t){if(r.path===e.path)return t.splice(i),r;i++}return e}}class Xte{}class nne{constructor(e,t,i,r,o,s,a){this.injector=e,this.rootComponentType=t,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const e=Pv(this.urlTree.root,[],[],this.config.filter(t=>void 0===t.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,e,At).pipe(ue(t=>{if(null===t)return null;const i=new Ov([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},At,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Ia(i,t),o=new YR(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(e){const t=e.value,i=GR(t,this.paramsInheritanceStrategy);t.params=Object.freeze(i.params),t.data=Object.freeze(i.data),e.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(e,t,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(e,t,i):this.processSegment(e,t,i,i.segments,r)}processChildren(e,t,i){return _t(Object.keys(i.children)).pipe(ol(r=>{const o=i.children[r],s=tF(t,r);return this.processSegmentGroup(e,s,o,r)}),wv((r,o)=>r&&o?(r.push(...o),r):null),function mee(n,e=!1){return t=>t.lift(new gee(n,e))}(r=>null!==r),Gd(null),CR(),ue(r=>{if(null===r)return null;const o=uF(r);return function ine(n){n.sort((e,t)=>e.value.outlet===At?-1:t.value.outlet===At?1:e.value.outlet.localeCompare(t.value.outlet))}(o),o}))}processSegment(e,t,i,r,o){return _t(t).pipe(ol(s=>this.processSegmentAgainstRoute(s._injector??e,s,i,r,o)),pl(s=>!!s),Ai(s=>{if(FT(s))return sF(i,r,o)?Re([]):Re(null);throw s}))}processSegmentAgainstRoute(e,t,i,r,o){if(t.redirectTo||!oF(t,i,r,o))return Re(null);let s;if("**"===t.path){const a=r.length>0?TR(r).parameters:{},l=hF(i)+r.length;s=Re({snapshot:new Ov(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,fF(t),Po(t),t.component??t._loadedComponent??null,t,dF(i),l,pF(t)),consumedSegments:[],remainingSegments:[]})}else s=rF(i,t,r,e).pipe(ue(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=hF(i)+l.length;return{snapshot:new Ov(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,fF(t),Po(t),t.component??t._loadedComponent??null,t,dF(i),d,pF(t)),consumedSegments:l,remainingSegments:c}}));return s.pipe(yi(a=>{if(null===a)return Re(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;e=t._injector??e;const d=t._loadedInjector??e,h=function rne(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(t),{segmentGroup:f,slicedSegments:p}=Pv(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(ue(g=>null===g?null:[new Ia(l,g)]));if(0===h.length&&0===p.length)return Re([new Ia(l,[])]);const m=Po(t)===o;return this.processSegment(d,h,f,p,m?At:o).pipe(ue(g=>null===g?null:[new Ia(l,g)]))}))}}function one(n){const e=n.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function uF(n){const e=[],t=new Set;for(const i of n){if(!one(i)){e.push(i);continue}const r=e.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),t.add(r)):e.push(i)}for(const i of t){const r=uF(i.children);e.push(new Ia(i.value,r))}return e.filter(i=>!t.has(i))}function dF(n){let e=n;for(;e._sourceSegment;)e=e._sourceSegment;return e}function hF(n){let e=n,t=e._segmentIndexShift??0;for(;e._sourceSegment;)e=e._sourceSegment,t+=e._segmentIndexShift??0;return t-1}function fF(n){return n.data||{}}function pF(n){return n.resolve||{}}function mF(n){return"string"==typeof n.title||null===n.title}function VT(n){return yi(e=>{const t=n(e);return t?_t(t).pipe(ue(()=>e)):Re(e)})}const eh=new De("ROUTES");let BT=(()=>{class n{constructor(t,i){this.injector=t,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return Re(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);const i=ml(t.loadComponent()).pipe(ue(yF),xn(o=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=o}),bT(()=>{this.componentLoaders.delete(t)})),r=new Nu(i,()=>new ae).pipe(Zl());return this.componentLoaders.set(t,r),r}loadChildren(t,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Re({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(ue(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(t).injector,c=MR(l.get(eh,[],Ze.Self|Ze.Optional)));return{routes:c.map(RT),injector:l}}),bT(()=>{this.childrenLoaders.delete(i)})),s=new Nu(o,()=>new ae).pipe(Zl());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(t){return ml(t()).pipe(ue(yF),Jn(r=>r instanceof KA||Array.isArray(r)?Re(r):_t(this.compiler.compileModuleAsync(r))))}}return n.\u0275fac=function(t){return new(t||n)(F(yr),F(Vk))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function yF(n){return function pne(n){return n&&"object"==typeof n&&"default"in n}(n)?n.default:n}let zv=(()=>{class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new ae,this.configLoader=vt(BT),this.environmentInjector=vt(Ts),this.urlSerializer=vt(Mp),this.rootContexts=vt(Ap),this.navigationId=0,this.afterPreactivation=()=>Re(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new nte(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new tte(r))}complete(){this.transitions?.complete()}handleNavigationRequest(t){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...t,id:i})}setupNavigations(t){return this.transitions=new Wr({id:0,targetPageId:0,currentUrlTree:t.currentUrlTree,currentRawUrl:t.currentUrlTree,extractedUrl:t.urlHandlingStrategy.extract(t.currentUrlTree),urlAfterRedirects:t.urlHandlingStrategy.extract(t.currentUrlTree),rawUrl:t.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Ip,restoredState:null,currentSnapshot:t.routerState.snapshot,targetSnapshot:null,currentRouterState:t.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ni(i=>0!==i.id),ue(i=>({...i,extractedUrl:t.urlHandlingStrategy.extract(i.rawUrl)})),yi(i=>{let r=!1,o=!1;return Re(i).pipe(xn(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),yi(s=>{const a=t.browserUrlTree.toString(),l=!t.navigated||s.extractedUrl.toString()!==a||a!==t.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??t.onSameUrlNavigation)){const u="";return this.events.next(new VR(s.id,t.serializeUrl(i.rawUrl),u,0)),t.rawUrlTree=s.rawUrl,s.resolve(null),sl}if(t.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return _F(s.source)&&(t.browserUrlTree=s.extractedUrl),Re(s).pipe(yi(u=>{const d=this.transitions?.getValue();return this.events.next(new ET(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?sl:Promise.resolve(u)}),function Jte(n,e,t,i){return yi(r=>function Qte(n,e,t,i,r){return new Zte(n,e,t,i,r).apply()}(n,e,t,r.extractedUrl,i).pipe(ue(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,t.config),xn(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function ane(n,e,t,i,r){return Jn(o=>function tne(n,e,t,i,r,o,s="emptyOnly"){return new nne(n,e,t,i,r,s,o).recognize().pipe(yi(a=>null===a?function ene(n){return new Se(e=>e.error(n))}(new Xte):Re(a)))}(n,e,t,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(ue(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,t.config,this.urlSerializer,t.paramsInheritanceStrategy),xn(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===t.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=t.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);t.setBrowserUrl(h,u)}t.browserUrlTree=u.urlAfterRedirects}const d=new Qee(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&t.urlHandlingStrategy.shouldProcessUrl(t.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new ET(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=WR(d,this.rootComponentType).snapshot;return Re(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new VR(s.id,t.serializeUrl(i.extractedUrl),u,1)),t.rawUrlTree=s.rawUrl,s.resolve(null),sl}}),xn(s=>{const a=new Zee(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),ue(s=>i={...s,guards:Dte(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function Pte(n,e){return Jn(t=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return 0===s.length&&0===o.length?Re({...t,guardsResult:!0}):function Lte(n,e,t,i){return _t(n).pipe(Jn(r=>function Bte(n,e,t,i,r){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return o&&0!==o.length?Re(o.map(a=>{const l=kp(e)??r,c=Jd(a,l);return ml(function Ate(n){return n&&Lp(n.canDeactivate)}(c)?c.canDeactivate(n,e,t,i):l.runInContext(()=>c(n,e,t,i))).pipe(pl())})).pipe(Xd()):Re(!0)}(r.component,r.route,t,e,i)),pl(r=>!0!==r,!0))}(s,i,r,n).pipe(Jn(a=>a&&function Ete(n){return"boolean"==typeof n}(a)?function Rte(n,e,t,i){return _t(e).pipe(ol(r=>oT(function jte(n,e){return null!==n&&e&&e(new ite(n)),Re(!0)}(r.route.parent,i),function Fte(n,e){return null!==n&&e&&e(new ote(n)),Re(!0)}(r.route,i),function Vte(n,e,t){const i=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>function Mte(n){const e=n.routeConfig?n.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:n,guards:e}:null}(s)).filter(s=>null!==s).map(s=>bR(()=>Re(s.guards.map(l=>{const c=kp(s.node)??t,u=Jd(l,c);return ml(function Ote(n){return n&&Lp(n.canActivateChild)}(u)?u.canActivateChild(i,n):c.runInContext(()=>u(i,n))).pipe(pl())})).pipe(Xd())));return Re(o).pipe(Xd())}(n,r.path,t),function zte(n,e,t){const i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return Re(!0);const r=i.map(o=>bR(()=>{const s=kp(e)??t,a=Jd(o,s);return ml(function Ite(n){return n&&Lp(n.canActivate)}(a)?a.canActivate(e,n):s.runInContext(()=>a(e,n))).pipe(pl())}));return Re(r).pipe(Xd())}(n,r.route,t))),pl(r=>!0!==r,!0))}(i,o,n,e):Re(a)),ue(a=>({...t,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),xn(s=>{if(i.guardsResult=s.guardsResult,Rc(s.guardsResult))throw KR(0,s.guardsResult);const a=new Jee(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),ni(s=>!!s.guardsResult||(t.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),VT(s=>{if(s.guards.canActivateChecks.length)return Re(s).pipe(xn(a=>{const l=new Xee(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),yi(a=>{let l=!1;return Re(a).pipe(function lne(n,e){return Jn(t=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=t;if(!r.length)return Re(t);let o=0;return _t(r).pipe(ol(s=>function cne(n,e,t,i){const r=n.routeConfig,o=n._resolve;return void 0!==r?.title&&!mF(r)&&(o[Cp]=r.title),function une(n,e,t,i){const r=function dne(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return Re({});const o={};return _t(r).pipe(Jn(s=>function hne(n,e,t,i){const r=kp(e)??i,o=Jd(n,r);return ml(o.resolve?o.resolve(e,t):r.runInContext(()=>o(e,t)))}(n[s],e,t,i).pipe(pl(),xn(a=>{o[s]=a}))),wp(1),function _ee(n){return e=>e.lift(new vee(n))}(o),Ai(s=>FT(s)?sl:ho(s)))}(o,n,e,i).pipe(ue(s=>(n._resolvedData=s,n.data=GR(n,t).resolve,r&&mF(r)&&(n.data[Cp]=r.title),null)))}(s.route,i,n,e)),xn(()=>o++),wp(1),Jn(s=>o===r.length?Re(t):sl))})}(t.paramsInheritanceStrategy,this.environmentInjector),xn({next:()=>l=!0,complete:()=>{l||(t.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),xn(a=>{const l=new ete(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),VT(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(xn(u=>{l.component=u}),ue(()=>{})));for(const u of l.children)c.push(...a(u));return c};return vT(a(s.targetSnapshot.root)).pipe(Gd(),Tt(1))}),VT(()=>this.afterPreactivation()),ue(s=>{const a=function hte(n,e,t){const i=Op(n,e._root,t?t._root:void 0);return new $R(i,e)}(t.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),xn(s=>{t.currentUrlTree=s.urlAfterRedirects,t.rawUrlTree=t.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),t.routerState=s.targetRouterState,"deferred"===t.urlUpdateStrategy&&(s.extras.skipLocationChange||t.setBrowserUrl(t.rawUrlTree,s),t.browserUrlTree=s.urlAfterRedirects)}),((n,e,t)=>ue(i=>(new Cte(e,i.targetRouterState,i.currentRouterState,t).activate(n),i)))(this.rootContexts,t.routeReuseStrategy,s=>this.events.next(s)),xn({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,t.navigated=!0,this.events.next(new Fc(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(t.currentUrlTree))),t.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),bT(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Ai(s=>{if(o=!0,JR(s)){ZR(s)||(t.navigated=!0,t.restoreHistory(i,!0));const a=new Iv(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),ZR(s)){const l=t.urlHandlingStrategy.merge(s.url,t.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===t.urlUpdateStrategy||_F(i.source)};t.scheduleNavigation(l,Ip,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{t.restoreHistory(i,!0);const a=new BR(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(t.errorHandler(s))}catch(l){i.reject(l)}}return sl}))}))}cancelNavigationTransition(t,i,r){const o=new Iv(t.id,this.urlSerializer.serialize(t.extractedUrl),i,r);this.events.next(o),t.resolve(!1)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function _F(n){return n!==Ip}let vF=(()=>{class n{buildTitle(t){let i,r=t.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===At);return i}getResolvedTitleForRoute(t){return t.data[Cp]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return vt(mne)},providedIn:"root"}),n})(),mne=(()=>{class n extends vF{constructor(t){super(),this.title=t}updateTitle(t){const i=this.buildTitle(t);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(t){return new(t||n)(F(sP))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),gne=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return vt(_ne)},providedIn:"root"}),n})();class yne{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}let _ne=(()=>{class n extends yne{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Oi(n)))(i||n)}}(),n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Vv=new De("",{providedIn:"root",factory:()=>({})});let bne=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return vt(wne)},providedIn:"root"}),n})(),wne=(()=>{class n{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,i){return t}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Cne(n){throw n}function Dne(n,e,t){return e.parse("/")}const Mne={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Tne={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Tr=(()=>{class n{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=vt(j6),this.isNgZoneEnabled=!1,this.options=vt(Vv,{optional:!0})||{},this.errorHandler=this.options.errorHandler||Cne,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||Dne,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=vt(bne),this.routeReuseStrategy=vt(gne),this.urlCreationStrategy=vt(cte),this.titleStrategy=vt(vF),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=MR(vt(eh,{optional:!0})??[]),this.navigationTransitions=vt(zv),this.urlSerializer=vt(Mp),this.location=vt(SD),this.isNgZoneEnabled=vt(Jt)instanceof Jt&&Jt.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Pc,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=WR(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(t=>{this.lastSuccessfulId=t.id,this.currentPageId=t.targetPageId},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const t=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Ip,t)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const i="popstate"===t.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(t.url,i,t.state)},0)}))}navigateToSyncWithBrowser(t,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(t);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(t){this.config=t.map(RT),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,t,u,c??null)}navigateByUrl(t,i={skipLocationChange:!1}){const r=Rc(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Ip,null,i)}navigate(t,i={skipLocationChange:!1}){return function Sne(n){for(let e=0;e{const o=t[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(t,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(t,i){const r=this.urlSerializer.serialize(t),o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",o):this.location.go(r,"",o)}restoreHistory(t,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-t.targetPageId;"popstate"!==t.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,i){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:i}:{navigationId:t}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class wF{}let Ine=(()=>{class n{constructor(t,i,r,o,s){this.router=t,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(ni(t=>t instanceof Fc),ol(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Qy(o.providers,t,`Route: ${o.path}`));const s=o._injector??t,a=o._loadedInjector??s;o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent?r.push(this.preloadConfig(s,o)):(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return _t(r).pipe(Wa())}preloadConfig(t,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(t,i):Re(null);const o=r.pipe(Jn(s=>null===s?Re(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??t,s.routes))));return i.loadComponent&&!i._loadedComponent?_t([o,this.loader.loadComponent(i)]).pipe(Wa()):o})}}return n.\u0275fac=function(t){return new(t||n)(F(Tr),F(Vk),F(Ts),F(wF),F(BT))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const HT=new De("");let CF=(()=>{class n{constructor(t,i,r,o,s={}){this.urlSerializer=t,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof ET?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Fc&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof UR&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new UR(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return n.\u0275fac=function(t){!function eO(){throw new Error("invalid")}()},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function jc(n,e){return{\u0275kind:n,\u0275providers:e}}function MF(){const n=vt(yr);return e=>{const t=n.get(yc);if(e!==t.components[0])return;const i=n.get(Tr),r=n.get(TF);1===n.get(WT)&&i.initialNavigation(),n.get(SF,null,Ze.Optional)?.setUpPreloading(),n.get(HT,null,Ze.Optional)?.init(),i.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const TF=new De("",{factory:()=>new ae}),WT=new De("",{providedIn:"root",factory:()=>1});const SF=new De("");function Pne(n){return jc(0,[{provide:SF,useExisting:Ine},{provide:wF,useExisting:n}])}const EF=new De("ROUTER_FORROOT_GUARD"),Lne=[SD,{provide:Mp,useClass:wT},Tr,Ap,{provide:Zd,useFactory:function DF(n){return n.routerState.root},deps:[Tr]},BT,[]];function Rne(){return new Yk("Router",Tr)}let xF=(()=>{class n{constructor(t){}static forRoot(t,i){return{ngModule:n,providers:[Lne,[],{provide:eh,multi:!0,useValue:t},{provide:EF,useFactory:Vne,deps:[[Tr,new Df,new Mf]]},{provide:Vv,useValue:i||{}},i?.useHash?{provide:vc,useClass:E$}:{provide:vc,useClass:gN},{provide:HT,useFactory:()=>{const n=vt(BW),e=vt(Jt),t=vt(Vv),i=vt(zv),r=vt(Mp);return t.scrollOffset&&n.setOffset(t.scrollOffset),new CF(r,i,n,e,t)}},i?.preloadingStrategy?Pne(i.preloadingStrategy).\u0275providers:[],{provide:Yk,multi:!0,useFactory:Rne},i?.initialNavigation?Bne(i):[],[{provide:IF,useFactory:MF},{provide:jk,multi:!0,useExisting:IF}]]}}static forChild(t){return{ngModule:n,providers:[{provide:eh,multi:!0,useValue:t}]}}}return n.\u0275fac=function(t){return new(t||n)(F(EF,8))},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[PT]}),n})();function Vne(n){return"guarded"}function Bne(n){return["disabled"===n.initialNavigation?jc(3,[{provide:e_,multi:!0,useFactory:()=>{const e=vt(Tr);return()=>{e.setUpLocationChangeListener()}}},{provide:WT,useValue:2}]).\u0275providers:[],"enabledBlocking"===n.initialNavigation?jc(2,[{provide:WT,useValue:0},{provide:e_,multi:!0,deps:[yr],useFactory:e=>{const t=e.get(T$,Promise.resolve());return()=>t.then(()=>new Promise(r=>{const o=e.get(Tr),s=e.get(TF);(function i(r){e.get(Tr).events.pipe(ni(s=>s instanceof Fc||s instanceof Iv||s instanceof BR),ue(s=>s instanceof Fc||s instanceof Iv&&(0===s.code||1===s.code)&&null),ni(s=>null!==s),Tt(1)).subscribe(()=>{r()})})(()=>{r(!0)}),e.get(zv).afterPreactivation=()=>(r(!0),s.closed?Re(void 0):s),o.initialNavigation()}))}}]).\u0275providers:[]]}const IF=new De("");class Ut{constructor(e,t,i){this.loggerService=e,this.router=t,this.http=i,this.httpErrosSubjects=[]}request(e){e.method||(e.method="GET");const t=this.getRequestOpts(e),i=e.body;return this.http.request(t).pipe(ni(r=>r.type===En.Response),ue(r=>{try{return r.body}catch{return r}}),Ai((r,o)=>{if(r){if(this.emitHttpError(r.status),r.status===Nc.SERVER_ERROR||r.status===Nc.FORBIDDEN)throw r.statusText&&r.statusText.indexOf("ECONNREFUSED")>=0?new yT(1,tee_1,t,r,i):new yT(3,r.error.message,t,r,i);if(r.status===Nc.NOT_FOUND)throw this.loggerService.error("Could not execute request: 404 path not valid.",e.url),new yT(2,r.headers.get("error-message"),t,r,i)}return null}))}requestView(e){let t;return e.method||(e.method="GET"),t=this.getRequestOpts(e),this.http.request(t).pipe(ni(i=>i.type===En.Response),ue(i=>i.body&&i.body.errors&&i.body.errors.length>0?this.handleRequestViewErrors(i):new _T(i)),Ai(i=>(this.emitHttpError(i.status),ho(this.handleResponseHttpErrors(i)))))}subscribeToHttpError(e){return this.httpErrosSubjects[e]||(this.httpErrosSubjects[e]=new ae),this.httpErrosSubjects[e].asObservable()}handleRequestViewErrors(e){return 401===e.status&&this.router.navigate(["/public/login"]),new _T(e)}handleResponseHttpErrors(e){return 401===e.status&&this.router.navigate(["/public/login"]),e}emitHttpError(e){this.httpErrosSubjects[e]&&this.httpErrosSubjects[e].next()}getRequestOpts(e){const t=this.getHttpHeaders(e.headers),i=this.getHttpParams(e.params),r=this.getFixedUrl(e.url);return"POST"===e.method||"PUT"===e.method||"PATCH"===e.method||"DELETE"===e.method?new Da(e.method,r,e.body||null,{headers:t,params:i}):new Da(e.method,r,{headers:t,params:i})}getHttpHeaders(e){let t=this.getDefaultRequestHeaders();return e&&Object.keys(e).length&&(Object.keys(e).forEach(i=>{t=t.set(i,e[i])}),"multipart/form-data"===e["Content-Type"]&&(t=t.delete("Content-Type"))),t}getFixedUrl(e){return e?.startsWith("api")?`/${e}`:(e?e.split("/")[0]:"").match(/v[1-9]/g)?`/api/${e}`:e}getHttpParams(e){if(e&&Object.keys(e).length){let t=new cs;return Object.keys(e).forEach(i=>{t=t.set(i,e[i])}),t}return null}getDefaultRequestHeaders(){return(new Cr).set("Accept","*/*").set("Content-Type","application/json")}}Ut.\u0275fac=function(e){return new(e||Ut)(F(mo),F(Tr),F(tr))},Ut.\u0275prov=$({token:Ut,factory:Ut.\u0275fac});class jp{constructor(){this.data=new ae}get showDialog$(){return this.data.asObservable()}open(e){this.data.next(e)}}jp.\u0275fac=function(e){return new(e||jp)},jp.\u0275prov=$({token:jp,factory:jp.\u0275fac,providedIn:"root"});class nh{constructor(e){this.router=e}goToMain(){this.router.navigate(["/c"])}goToLogin(e){this.router.navigate(["/public/login"],e)}goToURL(e){this.router.navigate([e])}isPublicUrl(e){return e.startsWith("/public")}isFromCoreUrl(e){return e.startsWith("/fromCore")}isRootUrl(e){return"/"===e}gotoPortlet(e){this.router.navigate([`c/${e.replace(" ","_")}`])}goToForgotPassword(){this.router.navigate(["/public/forgotPassword"])}goToNotLicensed(){this.router.navigate(["c/notLicensed"])}}function Oe(...n){const e=n.length;if(0===e)throw new Error("list of properties cannot be empty.");return t=>ue(function Hne(n,e){return i=>{let r=i;for(let o=0;o!!e))}loadConfig(){this.loggerService.debug("Loading configuration on: ",this.configUrl),this.coreWebService.requestView({url:this.configUrl}).pipe(Oe("entity")).subscribe(e=>{this.loggerService.debug("Configuration Loaded!",e);const t={colors:e.config.colors,emailRegex:e.config.emailRegex,license:e.config.license,logos:e.config.logos,menu:e.menu,paginatorLinks:e.config["dotcms.paginator.links"],paginatorRows:e.config["dotcms.paginator.rows"],releaseInfo:{buildDate:e.config.releaseInfo?.buildDate,version:e.config.releaseInfo?.version},websocket:{websocketReconnectTime:e.config.websocket["dotcms.websocket.reconnect.time"],disabledWebsockets:e.config.websocket["dotcms.websocket.disable"]}};return this.configParamsSubject.next(t),this.loggerService.debug("this.configParams",t),e})}getTimeZones(){return this.coreWebService.requestView({url:this.configUrl}).pipe(Oe("entity","config","timezones"),ue(e=>e.sort((t,i)=>t.label>i.label?1:t.label{this.connect()},0)}destroy(){this._open.complete(),this._close.complete(),this._message.complete(),this._error.complete()}}var Bv=(()=>(function(n){n[n.NORMAL_CLOSE_CODE=1e3]="NORMAL_CLOSE_CODE",n[n.GO_AWAY_CODE=1001]="GO_AWAY_CODE"}(Bv||(Bv={})),Bv))();class AF extends OF{constructor(e,t){if(super(t),this.url=e,this.dataStream=new ae,!new RegExp("wss?://").test(e))throw new Error("Invalid url provided ["+e+"]")}connect(){this.errorThrown=!1,this.loggerService.debug("Connecting with Web socket",this.url);try{this.socket=new WebSocket(this.url),this.socket.onopen=e=>{this.loggerService.debug("Web socket connected",this.url),this._open.next(e)},this.socket.onmessage=e=>{this._message.next(JSON.parse(e.data))},this.socket.onclose=e=>{this.errorThrown||(e.code===Bv.NORMAL_CLOSE_CODE?(this._close.next(e),this._message.complete()):this._error.next(e))},this.socket.onerror=e=>{this.errorThrown=!0,this._error.next(e)}}catch(e){this.loggerService.debug("Web EventsSocket connection error",e),this._error.next(e)}}close(){this.socket&&3!==this.socket.readyState&&this.socket.close()}}class Kne extends OF{constructor(e,t,i){super(t),this.url=e,this.coreWebService=i,this.isClosed=!1,this.isAlreadyOpen=!1}connect(){this.connectLongPooling()}close(){this.loggerService.info("destroying long polling"),this.isClosed=!0,this.isAlreadyOpen=!1,this._close.next()}getLastCallback(e){return this.lastCallback=e.length>0?e[e.length-1].creationDate+1:this.lastCallback,this.lastCallback}connectLongPooling(e){this.isClosed=!1,this.loggerService.info("Starting long polling connection"),this.coreWebService.requestView({url:this.url,params:e?{lastCallBack:e}:{}}).pipe(Oe("entity"),Tt(1)).subscribe(t=>{this.loggerService.debug("new Events",t),this.triggerOpen(),t instanceof Array?t.forEach(i=>{this._message.next(i)}):this._message.next(t),this.isClosed||this.connectLongPooling(this.getLastCallback(t))},t=>{this.loggerService.info("A error occur connecting through long polling"),this._error.next(t)})}triggerOpen(){this.isAlreadyOpen||(this._open.next(!0),this.isAlreadyOpen=!0)}}class Qne{constructor(e,t){this.url=e,this.useSSL=t}getWebSocketURL(){return`${this.getWebSocketProtocol()}://${this.url}`}getLongPoolingURL(){return`${this.getHttpProtocol()}://${this.url}`}getWebSocketProtocol(){return this.useSSL?"wss":"ws"}getHttpProtocol(){return this.useSSL?"https":"http"}}var Gr=(()=>(function(n){n[n.NONE=0]="NONE",n[n.CONNECTING=1]="CONNECTING",n[n.RECONNECTING=2]="RECONNECTING",n[n.CONNECTED=3]="CONNECTED",n[n.CLOSED=4]="CLOSED"}(Gr||(Gr={})),Gr))();class ih{constructor(e,t,i,r){this.dotEventsSocketURL=e,this.dotcmsConfigService=t,this.loggerService=i,this.coreWebService=r,this.status=Gr.NONE,this._message=new ae,this._open=new ae}connect(){return this.init().pipe(xn(()=>{this.status=Gr.CONNECTING,this.connectProtocol()}))}destroy(){this.protocolImpl&&(this.loggerService.debug("Closing socket"),this.status=Gr.CLOSED,this.protocolImpl.close())}messages(){return this._message.asObservable()}open(){return this._open.asObservable()}isConnected(){return this.status===Gr.CONNECTED}init(){return this.dotcmsConfigService.getConfig().pipe(Oe("websocket"),xn(e=>{this.webSocketConfigParams=e,this.protocolImpl=this.isWebSocketsBrowserSupport()&&!e.disabledWebsockets?this.getWebSocketProtocol():this.getLongPollingProtocol()}))}connectProtocol(){this.protocolImpl.open$().subscribe(()=>{this.status=Gr.CONNECTED,this._open.next(!0)}),this.protocolImpl.error$().subscribe(()=>{this.shouldTryWithLongPooling()?(this.loggerService.info("Error connecting with Websockets, trying again with long polling"),this.protocolImpl.destroy(),this.protocolImpl=this.getLongPollingProtocol(),this.connectProtocol()):setTimeout(()=>{this.status=this.getAfterErrorStatus(),this.protocolImpl.connect()},this.webSocketConfigParams.websocketReconnectTime)}),this.protocolImpl.close$().subscribe(e=>{this.status=Gr.CLOSED}),this.protocolImpl.message$().subscribe(e=>this._message.next(e),e=>this.loggerService.debug("Error in the System Events service: "+e.message),()=>this.loggerService.debug("Completed")),this.protocolImpl.connect()}getAfterErrorStatus(){return this.status===Gr.CONNECTING?Gr.CONNECTING:Gr.RECONNECTING}shouldTryWithLongPooling(){return this.isWebSocketProtocol()&&this.status!==Gr.CONNECTED&&this.status!==Gr.RECONNECTING}getWebSocketProtocol(){return new AF(this.dotEventsSocketURL.getWebSocketURL(),this.loggerService)}getLongPollingProtocol(){return new Kne(this.dotEventsSocketURL.getLongPoolingURL(),this.loggerService,this.coreWebService)}isWebSocketsBrowserSupport(){return"WebSocket"in window||"MozWebSocket"in window}isWebSocketProtocol(){return this.protocolImpl instanceof AF}}ih.\u0275fac=function(e){return new(e||ih)(F(Qne),F(zc),F(mo),F(Ut))},ih.\u0275prov=$({token:ih,factory:ih.\u0275fac});class gl{constructor(e,t){this.dotEventsSocket=e,this.loggerService=t,this.subjects=[]}destroy(){this.dotEventsSocket.destroy(),this.messagesSub.unsubscribe()}start(){this.loggerService.debug("start DotcmsEventsService",this.dotEventsSocket.isConnected()),this.dotEventsSocket.isConnected()||(this.loggerService.debug("Connecting with socket"),this.messagesSub=this.dotEventsSocket.connect().pipe(yi(()=>this.dotEventsSocket.messages())).subscribe(({event:e,payload:t})=>{this.subjects[e]||(this.subjects[e]=new ae),this.subjects[e].next(t.data)},e=>{this.loggerService.debug("Error in the System Events service: "+e.message)},()=>{this.loggerService.debug("Completed")}))}subscribeTo(e){return this.subjects[e]||(this.subjects[e]=new ae),this.subjects[e].asObservable()}subscribeToEvents(e){const t=new ae;return e.forEach(i=>{this.subscribeTo(i).subscribe(r=>{t.next({data:r,name:i})})}),t.asObservable()}open(){return this.dotEventsSocket.open()}}gl.\u0275fac=function(e){return new(e||gl)(F(ih),F(mo))},gl.\u0275prov=$({token:gl,factory:gl.\u0275fac});var zp=(()=>(function(n){n.SHOW_VIDEO_THUMBNAIL="SHOW_VIDEO_THUMBNAIL"}(zp||(zp={})),zp))(),Vp=(()=>(function(n){n.FULFILLED="fulfilled",n.REJECTED="rejected"}(Vp||(Vp={})),Vp))(),Uv=(()=>(function(n){n.EDIT="EDIT_MODE",n.PREVIEW="PREVIEW_MODE",n.LIVE="ADMIN_MODE"}(Uv||(Uv={})),Uv))();class Zne{constructor(e){this._params=e}get params(){return this._params}get layout(){return this._params.layout}get page(){return this._params.page}get containers(){return this._params.containers}get containerMap(){return Object.keys(this.containers).reduce((e,t)=>({...e,[t]:this.containers[t].container}),{})}get site(){return this._params.site}get template(){return this._params.template}get canCreateTemplate(){return this._params.canCreateTemplate}get viewAs(){return this._params.viewAs}get numberContents(){return this._params.numberContents}set numberContents(e){this._params.numberContents=e}}getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-20"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-30"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-50"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-70");const Bp="variantName";class Bc{constructor(e,t){this.coreWebService=e,this.dotcmsEventsService=t,this.country="",this.lang="",this._auth$=new ae,this._logout$=new ae,this._loginAsUsersList$=new ae,this.urls={changePassword:"v1/changePassword",getAuth:"v1/authentication/logInUser",loginAs:"v1/users/loginas",logout:"v1/logout",logoutAs:"v1/users/logoutas",recoverPassword:"v1/forgotpassword",serverInfo:"v1/loginform",userAuth:"v1/authentication",current:"/api/v1/users/current/"},t.subscribeTo("SESSION_DESTROYED").subscribe(()=>{this.logOutUser(),this.clearExperimentPersistence()}),t.subscribeTo("SESSION_LOGOUT").subscribe(()=>{this.clearExperimentPersistence()})}get auth$(){return this._auth$.asObservable()}get logout$(){return this._logout$.asObservable()}get auth(){return this._auth}get loginAsUsersList$(){return this._loginAsUsersList$.asObservable()}get isLogin$(){return this.auth&&this.auth.user?Re(!0):this.loadAuth().pipe(ue(e=>!!e&&!!e.user))}getCurrentUser(){return this.coreWebService.request({url:this.urls.current}).pipe(ue(e=>e))}loadAuth(){return this.coreWebService.requestView({url:this.urls.getAuth}).pipe(Oe("entity"),xn(e=>{e.user&&this.setAuth(e)}),ue(e=>this.getFullAuth(e)))}changePassword(e,t){const i=JSON.stringify({password:e,token:t});return this.coreWebService.requestView({body:i,method:"POST",url:this.urls.changePassword}).pipe(Oe("entity"))}getLoginFormInfo(e,t){return this.setLanguage(e),this.coreWebService.requestView({body:{messagesKey:t,language:this.lang,country:this.country},method:"POST",url:this.urls.serverInfo}).pipe(Oe("bodyJsonObject"))}loginAs(e){return this.coreWebService.requestView({body:{password:e.password,userId:e.user.userId},method:"POST",url:this.urls.loginAs}).pipe(ue(t=>{if(!t.entity.loginAs)throw t.errorsMessages;return this.setAuth({loginAsUser:e.user,user:this._auth.user}),t}),Oe("entity","loginAs"))}loginUser({login:e,password:t,rememberMe:i,language:r,backEndLogin:o}){return this.setLanguage(r),this.coreWebService.requestView({body:{userId:e,password:t,rememberMe:i,language:this.lang,country:this.country,backEndLogin:o},method:"POST",url:this.urls.userAuth}).pipe(ue(s=>(this.setAuth({loginAsUser:null,user:s.entity}),this.coreWebService.subscribeToHttpError(Nc.UNAUTHORIZED).subscribe(()=>{this.logOutUser()}),s.entity)))}logoutAs(){return this.coreWebService.requestView({method:"PUT",url:`${this.urls.logoutAs}`}).pipe(ue(e=>(this.setAuth({loginAsUser:null,user:this._auth.user}),e.entity.logoutAs)))}recoverPassword(e){return this.coreWebService.requestView({body:{userId:e},method:"POST",url:this.urls.recoverPassword}).pipe(Oe("entity"))}watchUser(e){this.auth&&e(this.auth),this.auth$.subscribe(t=>{t.user&&e(t)})}setAuth(e){this._auth=this.getFullAuth(e),this._auth$.next(this.getFullAuth(e)),e.user?this.dotcmsEventsService.start():this._logout$.next()}setLanguage(e){if(void 0!==e&&""!==e){const t=e.split("_");this.lang=t[0],this.country=t[1]}else this.lang="",this.country=""}logOutUser(){window.location.href=`/dotAdmin/logout?r=${(new Date).getTime()}`}getFullAuth(e){const t=!!e.loginAsUser||!!Object.keys(e.loginAsUser||{}).length;return{...e,isLoginAs:t}}clearExperimentPersistence(){sessionStorage.removeItem(Bp)}}Bc.\u0275fac=function(e){return new(e||Bc)(F(Ut),F(gl))},Bc.\u0275prov=$({token:Bc,factory:Bc.\u0275fac});class Up{constructor(e,t,i,r){this.router=t,this.coreWebService=i,this._menusChange$=new ae,this._portletUrlSource$=new ae,this._currentPortlet$=new ae,this.urlMenus="v1/CORE_WEB/menu",this.portlets=new Map,e.watchUser(this.loadMenus.bind(this)),r.subscribeTo("UPDATE_PORTLET_LAYOUTS").subscribe(this.loadMenus.bind(this))}get currentPortletId(){return this._currentPortletId}get currentMenu(){return this.menus}get menusChange$(){return this._menusChange$.asObservable()}get portletUrl$(){return this._portletUrlSource$.asObservable()}get firstPortlet(){const e=this.portlets.entries().next().value;return e?e[0]:null}addPortletURL(e,t){this.portlets.set(e.replace(" ","_"),t)}getPortletURL(e){return this.portlets.get(e)}goToPortlet(e){this.router.gotoPortlet(e),this._currentPortletId=e}isPortlet(e){let t=this.getPortletId(e);return t.indexOf("?")>=0&&(t=t.substr(0,t.indexOf("?"))),this.portlets.has(t)}setCurrentPortlet(e){let t=this.getPortletId(e);t.indexOf("?")>=0&&(t=t.substr(0,t.indexOf("?"))),this._currentPortletId=t,this._currentPortlet$.next(t)}get currentPortlet$(){return this._currentPortlet$}setMenus(e){if(this.menus=e,this.menus.length){this.portlets=new Map;for(let t=0;t{this.setMenus(e.entity)},e=>this._menusChange$.error(e))}getPortletId(e){const t=e.split("/");return t[t.length-1]}}Up.\u0275fac=function(e){return new(e||Up)(F(Bc),F(nh),F(Ut),F(gl))},Up.\u0275prov=$({token:Up,factory:Up.\u0275fac});class Hp{constructor(e,t,i,r){this.coreWebService=i,this.loggerService=r,this.events=["SAVE_SITE","PUBLISH_SITE","UPDATE_SITE_PERMISSIONS","UN_ARCHIVE_SITE","UPDATE_SITE","ARCHIVE_SITE"],this._switchSite$=new ae,this._refreshSites$=new ae,this.urls={currentSiteUrl:"v1/site/currentSite",sitesUrl:"v1/site",switchSiteUrl:"v1/site/switch"},t.subscribeToEvents(["ARCHIVE_SITE","UPDATE_SITE"]).subscribe(o=>this.eventResponse(o)),t.subscribeToEvents(this.events).subscribe(({data:o})=>this.siteEventsHandler(o)),t.subscribeToEvents(["SWITCH_SITE"]).subscribe(({data:o})=>this.setCurrentSite(o)),e.watchUser(()=>this.loadCurrentSite())}eventResponse({name:e,data:t}){this.loggerService.debug("Capturing Site event",e,t),t.identifier===this.selectedSite.identifier&&("ARCHIVE_SITE"===e?this.switchToDefaultSite().pipe(Tt(1),yi(r=>this.switchSite(r))).subscribe():this.loadCurrentSite())}siteEventsHandler(e){this._refreshSites$.next(e)}get refreshSites$(){return this._refreshSites$.asObservable()}get switchSite$(){return this._switchSite$.asObservable()}get currentSite(){return this.selectedSite}switchToDefaultSite(){return this.coreWebService.requestView({method:"PUT",url:"v1/site/switch"}).pipe(Oe("entity"))}getSiteById(e){return this.coreWebService.requestView({url:`/api/content/render/false/query/+contentType:host%20+identifier:${e}`}).pipe(Oe("contentlets"),ue(t=>t[0]))}switchSiteById(e){return this.loggerService.debug("Applying a Site Switch"),this.getSiteById(e).pipe(yi(t=>t?this.switchSite(t):Re(null)),Tt(1))}switchSite(e){return this.loggerService.debug("Applying a Site Switch",e.identifier),this.coreWebService.requestView({method:"PUT",url:`${this.urls.switchSiteUrl}/${e.identifier}`}).pipe(Tt(1),xn(()=>this.setCurrentSite(e)),ue(()=>e))}getCurrentSite(){return ys(this.selectedSite?Re(this.selectedSite):this.requestCurrentSite(),this.switchSite$)}requestCurrentSite(){return this.coreWebService.requestView({url:this.urls.currentSiteUrl}).pipe(Oe("entity"))}setCurrentSite(e){this.selectedSite=e,this._switchSite$.next({...e})}loadCurrentSite(){this.getCurrentSite().pipe(Tt(1)).subscribe(e=>{this.setCurrentSite(e)})}}Hp.\u0275fac=function(e){return new(e||Hp)(F(Bc),F(gl),F(Ut),F(mo))},Hp.\u0275prov=$({token:Hp,factory:Hp.\u0275fac,providedIn:"root"});class Uc{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}Uc.\u0275fac=function(e){return new(e||Uc)},Uc.\u0275prov=$({token:Uc,factory:Uc.\u0275fac});class rh{storeValue(e,t){localStorage.setItem(e,t)}getValue(e){return localStorage.getItem(e)}clearValue(e){localStorage.removeItem(e)}clear(){localStorage.clear()}}rh.\u0275fac=function(e){return new(e||rh)},rh.\u0275prov=$({token:rh,factory:rh.\u0275fac});class $p{}var Wp;$p.\u0275fac=function(e){return new(e||$p)},$p.\u0275mod=rt({type:$p}),$p.\u0275inj=wt({providers:[rh]});let YT=((Wp=class{constructor(e){this.iconPath=e.iconPath}displayErrorMessage(e){this.displayMessage("Error",e,"error")}displaySuccessMessage(e){this.displayMessage("Success",e,"success")}displayInfoMessage(e){this.displayMessage("Info",e,"info")}displayMessage(e,t,i){let r;return r=new Notification(i,{body:t,icon:this.iconPath+"/"+i+".png"}),r}}).\u0275prov=$({token:Wp,factory:Wp.\u0275fac}),Wp);YT=function Xne(n,e,t,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o}([by("config"),function eie(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)}("design:paramtypes",[Uc])],YT);class Gp{}Gp.\u0275fac=function(e){return new(e||Gp)},Gp.\u0275mod=rt({type:Gp}),Gp.\u0275inj=wt({providers:[Uc,YT]});class Yp{constructor(e){this._http=e}request(e){e.method||(e.method="GET");const t={params:new cs};return e.params&&Object.keys(e.params).forEach(i=>{t.params=t.params.set(i,e.params[i])}),this._http.request(new Da(e.method,e.url,e.body,{params:t.params})).pipe(ni(i=>i.type===En.Response),ue(i=>{try{return i.body}catch{return i}}))}requestView(e){e.method||(e.method="GET");const t={headers:new Cr,params:new cs};return e.params&&Object.keys(e.params).forEach(i=>{t.params=t.params.set(i,e.params[i])}),this._http.request(new Da(e.method,e.url,e.body,{params:t.params})).pipe(ni(i=>i.type===En.Response),ue(i=>new _T(i)))}subscribeTo(e){return Re({error:e})}}function or(n){this.content=n}Yp.\u0275fac=function(e){return new(e||Yp)(F(tr))},Yp.\u0275prov=$({token:Yp,factory:Yp.\u0275fac}),or.prototype={constructor:or,find:function(n){for(var e=0;e>1}},or.from=function(n){if(n instanceof or)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new or(e)};const LF=or;function RF(n,e,t){for(let i=0;;i++){if(i==n.childCount||i==e.childCount)return n.childCount==e.childCount?null:t;let r=n.child(i),o=e.child(i);if(r!=o){if(!r.sameMarkup(o))return t;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)t++;return t}if(r.content.size||o.content.size){let s=RF(r.content,o.content,t+1);if(null!=s)return s}t+=r.nodeSize}else t+=r.nodeSize}}function FF(n,e,t,i){for(let r=n.childCount,o=e.childCount;;){if(0==r||0==o)return r==o?null:{a:t,b:i};let s=n.child(--r),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:t,b:i};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ce&&!1!==i(l,r+a,o||null,s)&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),i,r+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,i,r){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{a.isText?(o+=a.text.slice(Math.max(e,l)-l,t-l),s=!i):a.isLeaf?(r?o+="function"==typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),s=!i):!s&&a.isBlock&&(o+=i,s=!0)},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,i=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(i)&&(r[r.length-1]=t.withText(t.text+i.text),o=1);oe)for(let o=0,s=0;se&&((st)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),i.push(a),r+=a.nodeSize),s=l}return new le(i,r)}cutByIndex(e,t){return e==t?le.empty:0==e&&t==this.content.length?this:new le(this.content.slice(e,t))}replaceChild(e,t){let i=this.content[e];if(i==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-i.nodeSize;return r[e]=t,new le(r,o)}addToStart(e){return new le([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new le(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let i=0,r=0;;i++){let s=r+this.child(i).nodeSize;if(s>=e)return s==e||t>0?$v(i+1,s):$v(i,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return le.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new le(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return le.empty;let t,i=0;for(let r=0;r{class n{constructor(t,i){this.type=t,this.attrs=i}addToSet(t){let i,r=!1;for(let o=0;othis.type.rank&&(i||(i=t.slice(0,o)),i.push(this),r=!0),i&&i.push(s)}}return i||(i=t.slice()),r||i.push(this),i}removeFromSet(t){for(let i=0;ir.type.rank-o.type.rank),i}}return n.none=[],n})();class Gv extends Error{}class we{constructor(e,t,i){this.content=e,this.openStart=t,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let i=zF(this.content,e+this.openStart,t);return i&&new we(i,this.openStart,this.openEnd)}removeBetween(e,t){return new we(jF(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return we.empty;let i=t.openStart||0,r=t.openEnd||0;if("number"!=typeof i||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new we(le.fromJSON(e,t.content),i,r)}static maxOpen(e,t=!0){let i=0,r=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new we(e,i,r)}}function jF(n,e,t){let{index:i,offset:r}=n.findIndex(e),o=n.maybeChild(i),{index:s,offset:a}=n.findIndex(t);if(r==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(i!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(i,o.copy(jF(o.content,e-r-1,t-r-1)))}function zF(n,e,t,i){let{index:r,offset:o}=n.findIndex(e),s=n.maybeChild(r);if(o==e||s.isText)return i&&!i.canReplace(r,r,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=zF(s.content,e-o-1,t);return a&&n.replaceChild(r,s.copy(a))}function iie(n,e,t){if(t.openStart>n.depth)throw new Gv("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Gv("Inconsistent open depths");return VF(n,e,t,0)}function VF(n,e,t,i){let r=n.index(i),o=n.node(i);if(r==e.index(i)&&i=0;o--)r=e.node(o).copy(le.from(r));return{start:r.resolveNoCache(n.openStart+t),end:r.resolveNoCache(r.content.size-n.openEnd-t)}}(t,n);return $c(o,UF(n,s,a,e,i))}{let s=n.parent,a=s.content;return $c(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}}return $c(o,Yv(n,e,i))}function BF(n,e){if(!e.type.compatibleContent(n.type))throw new Gv("Cannot join "+e.type.name+" onto "+n.type.name)}function KT(n,e,t){let i=n.node(t);return BF(i,e.node(t)),i}function Hc(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function qp(n,e,t,i){let r=(e||n).node(t),o=0,s=e?e.index(t):r.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(Hc(n.nodeAfter,i),o++));for(let a=o;ar&&KT(n,e,r+1),s=i.depth>r&&KT(t,i,r+1),a=[];return qp(null,n,r,a),o&&s&&e.index(r)==t.index(r)?(BF(o,s),Hc($c(o,UF(n,e,t,i,r+1)),a)):(o&&Hc($c(o,Yv(n,e,r+1)),a),qp(e,t,r,a),s&&Hc($c(s,Yv(t,i,r+1)),a)),qp(i,null,r,a),new le(a)}function Yv(n,e,t){let i=[];return qp(null,n,t,i),n.depth>t&&Hc($c(KT(n,e,t+1),Yv(n,e,t+1)),i),qp(e,null,t,i),new le(i)}we.empty=new we(le.empty,0,0);class Kp{constructor(e,t,i){this.pos=e,this.path=t,this.parentOffset=i,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=e.child(t);return i?e.child(t).cut(i):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let i=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let o=0;o0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;i--)if(e.pos<=this.end(i)&&(!t||t(this.node(i))))return new qv(this,e,i);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let i=[],r=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(i.push(s,a,r+l),!c||(s=s.child(a),s.isText))break;o=c-1,r+=l+1}return new Kp(t,i,o)}static resolveCached(e,t){for(let r=0;re&&this.nodesBetween(e,t,o=>(i.isInSet(o.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),HF(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,i=le.empty,r=0,o=i.childCount){let s=this.contentMatchAt(e).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=r;lt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let i=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,i)}let r=le.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,i)}}js.prototype.text=void 0;class Kv extends js{constructor(e,t,i,r){if(super(e,t,null,r),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):HF(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Kv(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Kv(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function HF(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Wc{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let i=new aie(e,t);if(null==i.next)return Wc.empty;let r=$F(i);i.next&&i.err("Unexpected trailing text");let o=function pie(n){let e=Object.create(null);return function t(i){let r=[];i.forEach(s=>{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||r.push([a,c=[]]),-1==c.indexOf(u)&&c.push(u)})})});let o=e[i.join(",")]=new Wc(i.indexOf(n.length-1)>-1);for(let s=0;sl.concat(o(c,a)),[]);if("seq"!=s.type){if("star"==s.type){let l=t();return i(a,l),r(o(s.expr,l),l),[i(l)]}if("plus"==s.type){let l=t();return r(o(s.expr,a),l),r(o(s.expr,l),l),[i(l)]}if("opt"==s.type)return[i(a)].concat(o(s.expr,a));if("range"==s.type){let l=a;for(let c=0;cl.to=a)}}(r));return function mie(n,e){for(let t=0,i=[n];tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(i){e.push(i);for(let r=0;r{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s"+e.indexOf(i.next[s].next);return o}).join("\n")}}Wc.empty=new Wc(!0);class aie{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function $F(n){let e=[];do{e.push(lie(n))}while(n.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function lie(n){let e=[];do{e.push(cie(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function cie(n){let e=function hie(n){if(n.eat("(")){let e=$F(n);return n.eat(")")||n.err("Missing closing paren"),e}if(!/\W/.test(n.next)){let e=function die(n,e){let t=n.nodeTypes,i=t[e];if(i)return[i];let r=[];for(let o in t){let s=t[o];s.groups.indexOf(e)>-1&&r.push(s)}return 0==r.length&&n.err("No node type or group '"+e+"' found"),r}(n,n.next).map(t=>(null==n.inline?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}n.err("Unexpected token '"+n.next+"'")}(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else{if(!n.eat("{"))break;e=uie(n,e)}return e}function WF(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function uie(n,e){let t=WF(n),i=t;return n.eat(",")&&(i="}"!=n.next?WF(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:i,expr:e}}function GF(n,e){return e-n}function YF(n,e){let t=[];return function i(r){let o=n[r];if(1==o.length&&!o[0].term)return i(o[0].to);t.push(r);for(let s=0;s-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;ti[o]=new Qv(o,t,s));let r=t.spec.topNode||"doc";if(!i[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}}class gie{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Zv{constructor(e,t,i,r){this.name=e,this.rank=t,this.schema=i,this.spec=r,this.attrs=QF(r.attrs),this.excluded=null;let o=qF(this.attrs);this.instance=o?new On(this,o):null}create(e=null){return!e&&this.instance?this.instance:new On(this,KF(this.attrs,e))}static compile(e,t){let i=Object.create(null),r=0;return e.forEach((o,s)=>i[o]=new Zv(o,r++,t,s)),i}removeFromSet(e){for(var t=0;t-1}}class yie{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=LF.from(e.nodes),t.marks=LF.from(e.marks||{}),this.nodes=Qv.compile(this.spec.nodes,this),this.marks=Zv.compile(this.spec.marks,this);let i=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let o=this.nodes[r],s=o.spec.content||"",a=o.spec.marks;o.contentMatch=i[s]||(i[s]=Wc.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?ZF(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(let r in this.marks){let o=this.marks[r],s=o.spec.excludes;o.excluded=null==s?[o]:""==s?[]:ZF(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,i,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Qv))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,i,r)}text(e,t){let i=this.nodes.text;return new Kv(i,i.defaultAttrs,e,On.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return js.fromJSON(this,e)}markFromJSON(e){return On.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function ZF(n,e){let t=[];for(let i=0;i-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[i]+"'")}return t}class oh{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(i=>{i.tag?this.tags.push(i):i.style&&this.styles.push(i)}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let r=e.nodes[i.node];return r.contentMatch.matchType(r)})}parse(e,t={}){let i=new tj(this,t,!1);return i.addAll(e,t.from,t.to),i.finish()}parseSlice(e,t={}){let i=new tj(this,t,!0);return i.addAll(e,t.from,t.to),we.maxOpen(i.finish())}matchTag(e,t,i){for(let r=i?this.tags.indexOf(i)+1:0;re.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(s.getAttrs){let l=s.getAttrs(t);if(!1===l)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let t=[];function i(r){let o=null==r.priority?50:r.priority,s=0;for(;s{i(s=nj(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in e.nodes){let o=e.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=nj(s)),s.node||s.ignore||s.mark||(s.node=r)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new oh(e,oh.schemaRules(e)))}}const JF={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},_ie={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},XF={ol:!0,ul:!0};function ej(n,e,t){return null!=e?(e?1:0)|("full"===e?2:0):n&&"pre"==n.whitespace?3:-5&t}class eb{constructor(e,t,i,r,o,s,a){this.type=e,this.attrs=t,this.marks=i,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=On.none,this.stashMarks=[],this.match=s||(4&a?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(le.from(e));if(!t){let r,i=this.type.contentMatch;return(r=i.findWrapping(e.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let t=le.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(le.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,i=this.pendingMarks;t{s.clearMark(a)&&(i=a.addToSet(i))}):t=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(t),!1!==s.consuming)break;o=s}return[t,i]}addElementByRule(e,t,i){let r,o,s;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace)):(s=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=e;"string"==typeof t.contentElement?l=e.querySelector(t.contentElement):"function"==typeof t.contentElement?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l)}r&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(e,t,i){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,s=null==i?null:e.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,i;for(let r=this.open;r>=0;r--){let o=this.nodes[r],s=o.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,i=o,!s.length)||o.solid)break}if(!t)return!1;this.sync(i);for(let r=0;rthis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let i=this.nodes[t].content;for(let r=i.length-1;r>=0;r--)e+=i[r].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let i=0;i-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),i=this.options.context,r=!(this.isOpen||i&&i.parent.type!=this.nodes[0].type),o=(r?0:1)-(i?i.depth+1:0),s=(a,l)=>{for(;a>=0;a--){let c=t[a];if(""==c){if(a==t.length-1||0==a)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let u=l>0||0==l&&r?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!u||u.name!=c&&-1==u.groups.indexOf(c))return!1;l--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let t in this.parser.schema.nodes){let i=this.parser.schema.nodes[t];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(e){let t=function Die(n,e){for(let t=0;t=0;i--){let r=this.nodes[i];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let s=r.popFromStashMark(e);s&&r.type&&r.type.allowsMarkType(s.type)&&(r.activeMarks=s.addToSet(r.activeMarks))}if(r==t)break}}}function bie(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function nj(n){let e={};for(let t in n)e[t]=n[t];return e}function Cie(n,e){let t=e.schema.nodes;for(let i in t){let r=t[i];if(!r.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l{if(o.length||s.marks.length){let a=0,l=0;for(;a=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(e,t,i={}){let r=this.marks[e.type.name];return r&&zs.renderSpec(JT(i),r(e,t))}static renderSpec(e,t,i=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r=t[0],o=r.indexOf(" ");o>0&&(i=r.slice(0,o),r=r.slice(o+1));let s,a=i?e.createElementNS(i,r):e.createElement(r),l=t[1],c=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)){c=2;for(let u in l)if(null!=l[u]){let d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:h,contentDOM:f}=zs.renderSpec(e,d,i);if(a.appendChild(h),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:a,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new zs(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=ij(e.nodes);return t.text||(t.text=i=>i.text),t}static marksFromSchema(e){return ij(e.marks)}}function ij(n){let e={};for(let t in n){let i=n[t].spec.toDOM;i&&(e[t]=i)}return e}function JT(n){return n.document||window.document}const oj=Math.pow(2,16);function Mie(n,e){return n+e*oj}function sj(n){return 65535&n}class XT{constructor(e,t,i){this.pos=e,this.delInfo=t,this.recover=i}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class Lo{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Lo.empty)return Lo.empty}recover(e){let t=0,i=sj(e);if(!this.inverted)for(let r=0;re)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){let f=l+r+((c?e==l?-1:e==d?1:t:t)<0?0:u);if(i)return f;let p=e==(t<0?l:d)?null:Mie(a/3,e-l),m=e==l?2:e==d?1:4;return(t<0?e!=l:e!=d)&&(m|=8),new XT(f,m,p)}r+=u-c}return i?e+r:new XT(e+r,0,null)}touches(e,t){let i=0,r=sj(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;ae)break;let c=this.ranges[a+o];if(e<=l+c&&a==3*r)return!0;i+=this.ranges[a+s]-c}return!1}forEach(e){let t=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?i-r-1:void 0)}}invert(){let e=new sh;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let i=this.from;io&&ls.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,r),t.openStart,t.openEnd);return ci.fromReplace(e,this.from,this.to,o)}invert(){return new Vs(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return t.deleted&&i.deleted||t.pos>=i.pos?null:new yl(t.pos,i.pos,this.mark)}merge(e){return e instanceof yl&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new yl(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new yl(t.from,t.to,e.markFromJSON(t.mark))}}ki.jsonID("addMark",yl);class Vs extends ki{constructor(e,t,i){super(),this.from=e,this.to=t,this.mark=i}apply(e){let t=e.slice(this.from,this.to),i=new we(t1(t.content,r=>r.mark(this.mark.removeFromSet(r.marks)),e),t.openStart,t.openEnd);return ci.fromReplace(e,this.from,this.to,i)}invert(){return new yl(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return t.deleted&&i.deleted||t.pos>=i.pos?null:new Vs(t.pos,i.pos,this.mark)}merge(e){return e instanceof Vs&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Vs(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Vs(t.from,t.to,e.markFromJSON(t.mark))}}ki.jsonID("removeMark",Vs);class _l extends ki{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ci.fail("No node at mark step's position");let i=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ci.fromReplace(e,this.pos,this.pos+1,new we(le.from(i),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let i=this.mark.addToSet(t.marks);if(i.length==t.marks.length){for(let r=0;ri.pos?null:new Ni(t.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ni(t.from,t.to,t.gapFrom,t.gapTo,we.fromJSON(e,t.slice),t.insert,!!t.structure)}}function n1(n,e,t){let i=n.resolve(e),r=t-e,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let s=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function Iie(n,e,t){return(0==e||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function lh(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let i=n.depth;;--i){let r=n.$from.node(i),o=n.$from.index(i),s=n.$to.indexAfter(i);if(io;c--,u--){let d=r.node(c),h=r.index(c);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=i&&i[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=i&&i[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(f))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function vl(n,e){let t=n.resolve(e),i=t.index();return dj(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(i,i+1)}function dj(n,e){return!(!n||!e||n.isLeaf||!n.canAppend(e))}function hj(n,e,t=-1){let i=n.resolve(e);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):t>0?(o=i.node(r+1),a++,s=i.node(r).maybeChild(a)):(o=i.node(r).maybeChild(a-1),s=i.node(r+1)),o&&!o.isTextblock&&dj(o,s)&&i.node(r).canReplace(a,a+1))return e;if(0==r)break;e=t<0?i.before(r):i.after(r)}}function fj(n,e,t){let i=n.resolve(e);if(!t.content.size)return e;let r=t.content;for(let o=0;o=0;s--){let a=s==i.depth?0:i.pos<=(i.start(s+1)+i.end(s+1))/2?-1:1,l=i.index(s)+(a>0?1:0),c=i.node(s),u=!1;if(1==o)u=c.canReplace(l,l,r);else{let d=c.contentMatchAt(l).findWrapping(r.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return 0==a?i.pos:a<0?i.before(s+1):i.after(s+1)}return null}function o1(n,e,t=e,i=we.empty){if(e==t&&!i.size)return null;let r=n.resolve(e),o=n.resolve(t);return pj(r,o,i)?new sr(e,t,i):new Vie(r,o,i).fit()}function pj(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}ki.jsonID("replaceAround",Ni);class Vie{constructor(e,t,i){this.$from=e,this.$to=t,this.unplaced=i,this.frontier=[],this.placed=le.empty;for(let r=0;r<=e.depth;r++){let o=e.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=le.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(e<0?this.$to:i.doc.resolve(e));if(!r)return null;let o=this.placed,s=i.depth,a=r.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new we(o,s,a);return e>-1?new Ni(i.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||i.pos!=this.$to.pos?new sr(i.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,i=0,r=this.unplaced.openEnd;i1&&(r=0),o.type.spec.isolating&&r<=i){e=i;break}t=o.content}for(let t=1;t<=2;t++)for(let i=1==t?e:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=s1(this.unplaced.content,i-1).firstChild,r=o.content):r=this.unplaced.content;let s=r.firstChild;for(let a=this.depth;a>=0;a--){let u,{type:l,match:c}=this.frontier[a],d=null;if(1==t&&(s?c.matchType(s.type)||(d=c.fillBefore(le.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(2==t&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:i}=this.unplaced,r=s1(e,t);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new we(e,t+1,Math.max(i,r.size+t>=e.size-i?t+1:0)),0))}dropNode(){let{content:e,openStart:t,openEnd:i}=this.unplaced,r=s1(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new we(Zp(e,t-1,1),t-1,o?t-1:i)}else this.unplaced=new we(Zp(e,t,1),t,i)}placeNodes({sliceDepth:e,frontierDepth:t,parent:i,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let m=0;m1||0==l||m.content.size)&&(d=g,u.push(mj(m.mark(h.allowedMarks(m.marks)),1==c?l:0,c==a.childCount?f:-1)))}let p=c==a.childCount;p||(f=-1),this.placed=Jp(this.placed,t,le.from(u)),this.frontier[t].match=d,p&&f<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=a;m1&&r==this.$to.end(--i);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:i,type:r}=this.frontier[t],o=t=0;a--){let{match:l,type:c}=this.frontier[a],u=a1(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Jp(this.placed,t.depth,t.fit)),e=t.move;for(let i=t.depth+1;i<=e.depth;i++){let r=e.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(i));this.openFrontierNode(r.type,r.attrs,o)}return e}openFrontierNode(e,t=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Jp(this.placed,this.depth,le.from(e.create(t,i))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(le.empty,!0);t.childCount&&(this.placed=Jp(this.placed,this.frontier.length,t))}}function Zp(n,e,t){return 0==e?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Zp(n.firstChild.content,e-1,t)))}function Jp(n,e,t){return 0==e?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Jp(n.lastChild.content,e-1,t)))}function s1(n,e){for(let t=0;t1&&(i=i.replaceChild(0,mj(i.firstChild,e-1,1==i.childCount?t-1:0))),e>0&&(i=n.type.contentMatch.fillBefore(i).append(i),t<=0&&(i=i.append(n.type.contentMatch.matchFragment(i).fillBefore(le.empty,!0)))),n.copy(i)}function a1(n,e,t,i,r){let o=n.node(e),s=r?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!function Bie(n,e,t){for(let i=t;ii){let o=r.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(le.empty,!0))}return n}function yj(n,e){let t=[];for(let r=Math.min(n.depth,e.depth);r>=0;r--){let o=n.start(r);if(oe.pos+(e.depth-r)||n.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==n.depth&&r==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&t.push(r)}return t}class ch extends ki{constructor(e,t,i){super(),this.pos=e,this.attr=t,this.value=i}apply(e){let t=e.nodeAt(this.pos);if(!t)return ci.fail("No node at attribute step's position");let i=Object.create(null);for(let o in t.attrs)i[o]=t.attrs[o];i[this.attr]=this.value;let r=t.type.create(i,null,t.marks);return ci.fromReplace(e,this.pos,this.pos+1,new we(le.from(r),0,t.isLeaf?0:1))}getMap(){return Lo.empty}invert(e){return new ch(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ch(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new ch(t.pos,t.attr,t.value)}}ki.jsonID("attr",ch);let uh=class extends Error{};uh=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},(uh.prototype=Object.create(Error.prototype)).constructor=uh,uh.prototype.name="TransformError";class l1{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new sh}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new uh(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,i=we.empty){let r=o1(this.doc,e,t,i);return r&&this.step(r),this}replaceWith(e,t,i){return this.replace(e,t,new we(le.from(i),0,0))}delete(e,t){return this.replace(e,t,we.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,i){return function Hie(n,e,t,i){if(!i.size)return n.deleteRange(e,t);let r=n.doc.resolve(e),o=n.doc.resolve(t);if(pj(r,o,i))return n.step(new sr(e,t,i));let s=yj(r,n.doc.resolve(t));0==s[s.length-1]&&s.pop();let a=-(r.depth+1);s.unshift(a);for(let h=r.depth,f=r.pos-1;h>0;h--,f--){let p=r.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(h)>-1?a=h:r.before(h)==f&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=i.openStart;for(let h=i.content,f=0;;f++){let p=h.firstChild;if(c.push(p),f==i.openStart)break;h=p.content}for(let h=u-1;h>=0;h--){let f=c[h].type,p=Uie(f);if(p&&r.node(l).type!=f)u=h;else if(p||!f.isTextblock)break}for(let h=i.openStart;h>=0;h--){let f=(h+u+1)%(i.openStart+1),p=c[f];if(p)for(let m=0;m=0&&(n.replace(e,t,i),!(n.steps.length>d));h--){let f=s[h];f<0||(e=r.before(f),t=o.after(f))}}(this,e,t,i),this}replaceRangeWith(e,t,i){return function $ie(n,e,t,i){if(!i.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let r=function zie(n,e,t){let i=n.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),t))return e;if(0==i.parentOffset)for(let r=i.depth-1;r>=0;r--){let o=i.index(r);if(i.node(r).canReplaceWith(o,o,t))return i.before(r+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let r=i.depth-1;r>=0;r--){let o=i.indexAfter(r);if(i.node(r).canReplaceWith(o,o,t))return i.after(r+1);if(o0&&(l||i.node(a-1).canReplace(i.index(a-1),r.indexAfter(a-1))))return n.delete(i.before(a),r.after(a))}for(let s=1;s<=i.depth&&s<=r.depth;s++)if(e-i.start(s)==i.depth-s&&t>i.end(s)&&r.end(s)-t!=r.depth-s)return n.delete(i.before(s),t);n.delete(e,t)}(this,e,t),this}lift(e,t){return function Oie(n,e,t){let{$from:i,$to:r,depth:o}=e,s=i.before(o+1),a=r.after(o+1),l=s,c=a,u=le.empty,d=0;for(let p=o,m=!1;p>t;p--)m||i.index(p)>0?(m=!0,u=le.from(i.node(p).copy(u)),d++):l--;let h=le.empty,f=0;for(let p=o,m=!1;p>t;p--)m||r.after(p+1)=0;s--){if(i.size){let a=t[s].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=le.from(t[s].type.create(t[s].attrs,i))}let r=e.start,o=e.end;n.step(new Ni(r,o,r,o,new we(i,0,0),t.length,!0))}(this,e,t),this}setBlockType(e,t=e,i,r=null){return function Pie(n,e,t,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(i,r)&&function Lie(n,e,t){let i=n.resolve(e),r=i.index();return i.parent.canReplaceWith(r,r+1,t)}(n.doc,n.mapping.slice(o).map(a),i)){n.clearIncompatible(n.mapping.slice(o).map(a,1),i);let l=n.mapping.slice(o),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return n.step(new Ni(c,u,c+1,u-1,new we(le.from(i.create(r,null,s.marks)),0,0),1,!0)),!1}})}(this,e,t,i,r),this}setNodeMarkup(e,t,i=null,r){return function Rie(n,e,t,i,r){let o=n.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);let s=t.create(i,null,r||o.marks);if(o.isLeaf)return n.replaceWith(e,e+o.nodeSize,s);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new Ni(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new we(le.from(s),0,0),1,!0))}(this,e,t,i,r),this}setNodeAttribute(e,t,i){return this.step(new ch(e,t,i)),this}addNodeMark(e,t){return this.step(new _l(e,t)),this}removeNodeMark(e,t){if(!(t instanceof On)){let i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(i.marks)))return this}return this.step(new ah(e,t)),this}split(e,t=1,i){return function Fie(n,e,t=1,i){let r=n.doc.resolve(e),o=le.empty,s=le.empty;for(let a=r.depth,l=r.depth-t,c=t-1;a>l;a--,c--){o=le.from(r.node(a).copy(o));let u=i&&i[c];s=le.from(u?u.type.create(u.attrs,s):r.node(a).copy(s))}n.step(new sr(e,e,new we(o.append(s),t,t),!0))}(this,e,t,i),this}addMark(e,t,i){return function Sie(n,e,t,i){let s,a,r=[],o=[];n.doc.nodesBetween(e,t,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&u.type.allowsMarkType(i.type)){let h=Math.max(c,e),f=Math.min(c+l.nodeSize,t),p=i.addToSet(d);for(let m=0;mn.step(l)),o.forEach(l=>n.step(l))}(this,e,t,i),this}removeMark(e,t,i){return function Eie(n,e,t,i){let r=[],o=0;n.doc.nodesBetween(e,t,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof Zv){let u,c=s.marks;for(;u=i.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else i?i.isInSet(s.marks)&&(l=[i]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,t);for(let u=0;un.step(new Vs(s.from,s.to,s.style)))}(this,e,t,i),this}clearIncompatible(e,t,i){return function xie(n,e,t,i=t.contentMatch){let r=n.doc.nodeAt(e),o=[],s=e+1;for(let a=0;a=0;a--)n.step(o[a])}(this,e,t,i),this}}const c1=Object.create(null);class nt{constructor(e,t,i){this.$anchor=e,this.$head=t,this.ranges=i||[new _j(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;o--){let s=t<0?dh(e.node(0),e.node(o),e.before(o+1),e.index(o),t,i):dh(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,i);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new yo(e.node(0))}static atStart(e){return dh(e,e,0,0,1)||new yo(e)}static atEnd(e){return dh(e,e,e.content.size,e.childCount,-1)||new yo(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=c1[t.type];if(!i)throw new RangeError(`No selection type ${t.type} defined`);return i.fromJSON(e,t)}static jsonID(e,t){if(e in c1)throw new RangeError("Duplicate use of selection JSON ID "+e);return c1[e]=t,t.prototype.jsonID=e,t}getBookmark(){return it.between(this.$anchor,this.$head).getBookmark()}}nt.prototype.visible=!0;class _j{constructor(e,t){this.$from=e,this.$to=t}}let vj=!1;function bj(n){!vj&&!n.parent.inlineContent&&(vj=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class it extends nt{constructor(e,t=e){bj(e),bj(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let i=e.resolve(t.map(this.head));if(!i.parent.inlineContent)return nt.near(i);let r=e.resolve(t.map(this.anchor));return new it(r.parent.inlineContent?r:i,i)}replace(e,t=we.empty){if(super.replace(e,t),t==we.empty){let i=this.$from.marksAcross(this.$to);i&&e.ensureMarks(i)}}eq(e){return e instanceof it&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new nb(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new it(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,i=t){let r=e.resolve(t);return new this(r,i==t?r:e.resolve(i))}static between(e,t,i){let r=e.pos-t.pos;if((!i||r)&&(i=r>=0?1:-1),!t.parent.inlineContent){let o=nt.findFrom(t,i,!0)||nt.findFrom(t,-i,!0);if(!o)return nt.near(t,i);t=o.$head}return e.parent.inlineContent||(0==r||(e=(nt.findFrom(e,-i,!0)||nt.findFrom(e,i,!0)).$anchor).posnew yo(n)};function dh(n,e,t,i,r,o=!1){if(e.inlineContent)return it.create(n,t);for(let s=i-(r>0?0:1);r>0?s=0;s+=r){let a=e.child(s);if(a.isAtom){if(!o&&Ye.isSelectable(a))return Ye.create(n,t-(r<0?a.nodeSize:0))}else{let l=dh(n,a,t+r,r<0?a.childCount:0,r,o);if(l)return l}t+=a.nodeSize*r}return null}function wj(n,e,t){let i=n.steps.length-1;if(i{null==s&&(s=u)}),n.setSelection(nt.near(n.doc.resolve(s),t)))}class Yie extends l1{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return On.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let i=this.selection;return t&&(e=e.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||On.none))),i.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,i){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==i&&(i=t),i=i??t,!e)return this.deleteRange(t,i);let o=this.storedMarks;if(!o){let s=this.doc.resolve(t);o=i==t?s.marks():s.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(t,i,r.text(e,o)),this.selection.empty||this.setSelection(nt.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Mj(n,e){return e&&n?n.bind(e):n}class Xp{constructor(e,t,i){this.name=e,this.init=Mj(t.init,i),this.apply=Mj(t.apply,i)}}const qie=[new Xp("doc",{init:n=>n.doc||n.schema.topNodeType.createAndFill(),apply:n=>n.doc}),new Xp("selection",{init:(n,e)=>n.selection||nt.atStart(e.doc),apply:n=>n.selection}),new Xp("storedMarks",{init:n=>n.storedMarks||null,apply:(n,e,t,i)=>i.selection.$cursor?n.storedMarks:null}),new Xp("scrollToSelection",{init:()=>0,apply:(n,e)=>n.scrolledIntoView?e+1:e})];class d1{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=qie.slice(),t&&t.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new Xp(i.key,i.spec.state,i))})}}class hh{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let i=0;ii.toJSON())),e&&"object"==typeof e)for(let i in e){if("doc"==i||"selection"==i)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[i],o=r.spec.state;o&&o.toJSON&&(t[i]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,i){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new d1(e.schema,e.plugins),o=new hh(r);return r.fields.forEach(s=>{if("doc"==s.name)o.doc=js.fromJSON(e.schema,t.doc);else if("selection"==s.name)o.selection=nt.fromJSON(o.doc,t.selection);else if("storedMarks"==s.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,a))return void(o[s.name]=c.fromJSON.call(l,e,t[a],o))}o[s.name]=s.init(e,o)}}),o}}function Tj(n,e,t){for(let i in n){let r=n[i];r instanceof Function?r=r.bind(e):"handleDOMEvents"==i&&(r=Tj(r,e,{})),t[i]=r}return t}class $t{constructor(e){this.spec=e,this.props={},e.props&&Tj(e.props,this,this.props),this.key=e.key?e.key.key:Sj("plugin")}getState(e){return e[this.key]}}const h1=Object.create(null);function Sj(n){return n in h1?n+"$"+ ++h1[n]:(h1[n]=0,n+"$")}class rn{constructor(e="key"){this.key=Sj(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}function _o(n){if(null==n)return window;if("[object Window]"!==n.toString()){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Gc(n){return n instanceof _o(n).Element||n instanceof Element}function Ro(n){return n instanceof _o(n).HTMLElement||n instanceof HTMLElement}function f1(n){return!(typeof ShadowRoot>"u")&&(n instanceof _o(n).ShadowRoot||n instanceof ShadowRoot)}var Yc=Math.max,rb=Math.min,fh=Math.round;function p1(){var n=navigator.userAgentData;return null!=n&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Ej(){return!/^((?!chrome|android).)*safari/i.test(p1())}function ph(n,e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var i=n.getBoundingClientRect(),r=1,o=1;e&&Ro(n)&&(r=n.offsetWidth>0&&fh(i.width)/n.offsetWidth||1,o=n.offsetHeight>0&&fh(i.height)/n.offsetHeight||1);var a=(Gc(n)?_o(n):window).visualViewport,l=!Ej()&&t,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,h=i.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function m1(n){var e=_o(n);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Bs(n){return n?(n.nodeName||"").toLowerCase():null}function bl(n){return((Gc(n)?n.ownerDocument:n.document)||window.document).documentElement}function g1(n){return ph(bl(n)).left+m1(n).scrollLeft}function Na(n){return _o(n).getComputedStyle(n)}function y1(n){var e=Na(n);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function Jie(n,e,t){void 0===t&&(t=!1);var i=Ro(e),r=Ro(e)&&function Zie(n){var e=n.getBoundingClientRect(),t=fh(e.width)/n.offsetWidth||1,i=fh(e.height)/n.offsetHeight||1;return 1!==t||1!==i}(e),o=bl(e),s=ph(n,r,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&(("body"!==Bs(e)||y1(o))&&(a=function Qie(n){return n!==_o(n)&&Ro(n)?function Kie(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):m1(n)}(e)),Ro(e)?((l=ph(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=g1(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function _1(n){var e=ph(n),t=n.offsetWidth,i=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:i}}function ob(n){return"html"===Bs(n)?n:n.assignedSlot||n.parentNode||(f1(n)?n.host:null)||bl(n)}function xj(n){return["html","body","#document"].indexOf(Bs(n))>=0?n.ownerDocument.body:Ro(n)&&y1(n)?n:xj(ob(n))}function em(n,e){var t;void 0===e&&(e=[]);var i=xj(n),r=i===(null==(t=n.ownerDocument)?void 0:t.body),o=_o(i),s=r?[o].concat(o.visualViewport||[],y1(i)?i:[]):i,a=e.concat(s);return r?a:a.concat(em(ob(s)))}function Xie(n){return["table","td","th"].indexOf(Bs(n))>=0}function Ij(n){return Ro(n)&&"fixed"!==Na(n).position?n.offsetParent:null}function tm(n){for(var e=_o(n),t=Ij(n);t&&Xie(t)&&"static"===Na(t).position;)t=Ij(t);return t&&("html"===Bs(t)||"body"===Bs(t)&&"static"===Na(t).position)?e:t||function ere(n){var e=/firefox/i.test(p1());if(/Trident/i.test(p1())&&Ro(n)&&"fixed"===Na(n).position)return null;var r=ob(n);for(f1(r)&&(r=r.host);Ro(r)&&["html","body"].indexOf(Bs(r))<0;){var o=Na(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(n)||e}var Yr="top",Fo="bottom",jo="right",qr="left",v1="auto",nm=[Yr,Fo,jo,qr],mh="start",im="end",Oj="viewport",rm="popper",Aj=nm.reduce(function(n,e){return n.concat([e+"-"+mh,e+"-"+im])},[]),kj=[].concat(nm,[v1]).reduce(function(n,e){return n.concat([e,e+"-"+mh,e+"-"+im])},[]),hre=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function fre(n){var e=new Map,t=new Set,i=[];function r(o){t.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&r(l)}}),i.push(o)}return n.forEach(function(o){e.set(o.name,o)}),n.forEach(function(o){t.has(o.name)||r(o)}),i}function mre(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}var Nj={placement:"bottom",modifiers:[],strategy:"absolute"};function Pj(){for(var n=arguments.length,e=new Array(n),t=0;t=0?"x":"y"}function Lj(n){var l,e=n.reference,t=n.element,i=n.placement,r=i?Us(i):null,o=i?gh(i):null,s=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2;switch(r){case Yr:l={x:s,y:e.y-t.height};break;case Fo:l={x:s,y:e.y+e.height};break;case jo:l={x:e.x+e.width,y:a};break;case qr:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=r?b1(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case mh:l[c]=l[c]-(e[u]/2-t[u]/2);break;case im:l[c]=l[c]+(e[u]/2-t[u]/2)}}return l}const wre={name:"popperOffsets",enabled:!0,phase:"read",fn:function bre(n){var e=n.state;e.modifiersData[n.name]=Lj({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var Cre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Rj(n){var e,t=n.popper,i=n.popperRect,r=n.placement,o=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,h=s.x,f=void 0===h?0:h,p=s.y,m=void 0===p?0:p,g="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),w=qr,_=Yr,N=window;if(c){var T=tm(t),ne="clientHeight",K="clientWidth";T===_o(t)&&"static"!==Na(T=bl(t)).position&&"absolute"===a&&(ne="scrollHeight",K="scrollWidth"),(r===Yr||(r===qr||r===jo)&&o===im)&&(_=Fo,m-=(d&&T===N&&N.visualViewport?N.visualViewport.height:T[ne])-i.height,m*=l?1:-1),r!==qr&&(r!==Yr&&r!==Fo||o!==im)||(w=jo,f-=(d&&T===N&&N.visualViewport?N.visualViewport.width:T[K])-i.width,f*=l?1:-1)}var ot,pt=Object.assign({position:a},c&&Cre),at=!0===u?function Dre(n,e){var i=n.y,r=e.devicePixelRatio||1;return{x:fh(n.x*r)/r||0,y:fh(i*r)/r||0}}({x:f,y:m},_o(t)):{x:f,y:m};return f=at.x,m=at.y,Object.assign({},pt,l?((ot={})[_]=v?"0":"",ot[w]=y?"0":"",ot.transform=(N.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",ot):((e={})[_]=v?m+"px":"",e[w]=y?f+"px":"",e.transform="",e))}const Tre={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function Mre(n){var e=n.state,t=n.options,i=t.gpuAcceleration,r=void 0===i||i,o=t.adaptive,s=void 0===o||o,a=t.roundOffsets,l=void 0===a||a,c={placement:Us(e.placement),variation:gh(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Rj(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Rj(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Fj={name:"applyStyles",enabled:!0,phase:"write",fn:function Sre(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},r=e.attributes[t]||{},o=e.elements[t];!Ro(o)||!Bs(o)||(Object.assign(o.style,i),Object.keys(r).forEach(function(s){var a=r[s];!1===a?o.removeAttribute(s):o.setAttribute(s,!0===a?"":a)}))})},effect:function Ere(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var r=e.elements[i],o=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]).reduce(function(l,c){return l[c]="",l},{});!Ro(r)||!Bs(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}},requires:["computeStyles"]},Ore={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function Ire(n){var e=n.state,i=n.name,r=n.options.offset,o=void 0===r?[0,0]:r,s=kj.reduce(function(u,d){return u[d]=function xre(n,e,t){var i=Us(n),r=[qr,Yr].indexOf(i)>=0?-1:1,o="function"==typeof t?t(Object.assign({},e,{placement:n})):t,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[qr,jo].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,e.rects,o),u},{}),a=s[e.placement],c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a.x,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=s}};var Are={left:"right",right:"left",bottom:"top",top:"bottom"};function ab(n){return n.replace(/left|right|bottom|top/g,function(e){return Are[e]})}var kre={start:"end",end:"start"};function jj(n){return n.replace(/start|end/g,function(e){return kre[e]})}function zj(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&f1(t)){var i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function w1(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Vj(n,e,t){return e===Oj?w1(function Nre(n,e){var t=_o(n),i=bl(n),r=t.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=Ej();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+g1(n),y:l}}(n,t)):Gc(e)?function Lre(n,e){var t=ph(n,!1,"fixed"===e);return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}(e,t):w1(function Pre(n){var e,t=bl(n),i=m1(n),r=null==(e=n.ownerDocument)?void 0:e.body,o=Yc(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Yc(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+g1(n),l=-i.scrollTop;return"rtl"===Na(r||t).direction&&(a+=Yc(t.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(bl(n)))}function Uj(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function Hj(n,e){return e.reduce(function(t,i){return t[i]=n,t},{})}function om(n,e){void 0===e&&(e={});var i=e.placement,r=void 0===i?n.placement:i,o=e.strategy,s=void 0===o?n.strategy:o,a=e.boundary,l=void 0===a?"clippingParents":a,c=e.rootBoundary,u=void 0===c?Oj:c,d=e.elementContext,h=void 0===d?rm:d,f=e.altBoundary,p=void 0!==f&&f,m=e.padding,g=void 0===m?0:m,y=Uj("number"!=typeof g?g:Hj(g,nm)),w=n.rects.popper,_=n.elements[p?h===rm?"reference":rm:h],N=function Fre(n,e,t,i){var r="clippingParents"===e?function Rre(n){var e=em(ob(n)),i=["absolute","fixed"].indexOf(Na(n).position)>=0&&Ro(n)?tm(n):n;return Gc(i)?e.filter(function(r){return Gc(r)&&zj(r,i)&&"body"!==Bs(r)}):[]}(n):[].concat(e),o=[].concat(r,[t]),a=o.reduce(function(l,c){var u=Vj(n,c,i);return l.top=Yc(u.top,l.top),l.right=rb(u.right,l.right),l.bottom=rb(u.bottom,l.bottom),l.left=Yc(u.left,l.left),l},Vj(n,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(Gc(_)?_:_.contextElement||bl(n.elements.popper),l,u,s),T=ph(n.elements.reference),ne=Lj({reference:T,element:w,strategy:"absolute",placement:r}),K=w1(Object.assign({},w,ne)),Ne=h===rm?K:T,He={top:N.top-Ne.top+y.top,bottom:Ne.bottom-N.bottom+y.bottom,left:N.left-Ne.left+y.left,right:Ne.right-N.right+y.right},pt=n.modifiersData.offset;if(h===rm&&pt){var at=pt[r];Object.keys(He).forEach(function(ot){var pn=[jo,Fo].indexOf(ot)>=0?1:-1,St=[Yr,Fo].indexOf(ot)>=0?"y":"x";He[ot]+=at[St]*pn})}return He}const Bre={name:"flip",enabled:!0,phase:"main",fn:function Vre(n){var e=n.state,t=n.options,i=n.name;if(!e.modifiersData[i]._skip){for(var r=t.mainAxis,o=void 0===r||r,s=t.altAxis,a=void 0===s||s,l=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,h=t.altBoundary,f=t.flipVariations,p=void 0===f||f,m=t.allowedAutoPlacements,g=e.options.placement,y=Us(g),w=l||(y!==g&&p?function zre(n){if(Us(n)===v1)return[];var e=ab(n);return[jj(n),e,jj(e)]}(g):[ab(g)]),_=[g].concat(w).reduce(function(Rt,Yi){return Rt.concat(Us(Yi)===v1?function jre(n,e){void 0===e&&(e={});var r=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,c=void 0===l?kj:l,u=gh(e.placement),d=u?a?Aj:Aj.filter(function(p){return gh(p)===u}):nm,h=d.filter(function(p){return c.indexOf(p)>=0});0===h.length&&(h=d);var f=h.reduce(function(p,m){return p[m]=om(n,{placement:m,boundary:r,rootBoundary:o,padding:s})[Us(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}(e,{placement:Yi,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):Yi)},[]),N=e.rects.reference,T=e.rects.popper,ne=new Map,K=!0,Ne=_[0],He=0;He<_.length;He++){var pt=_[He],at=Us(pt),ot=gh(pt)===mh,pn=[Yr,Fo].indexOf(at)>=0,St=pn?"width":"height",se=om(e,{placement:pt,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),fe=pn?ot?jo:qr:ot?Fo:Yr;N[St]>T[St]&&(fe=ab(fe));var be=ab(fe),Ue=[];if(o&&Ue.push(se[at]<=0),a&&Ue.push(se[fe]<=0,se[be]<=0),Ue.every(function(Rt){return Rt})){Ne=pt,K=!1;break}ne.set(pt,Ue)}if(K)for(var ln=function(Yi){var eo=_.find(function(Tn){var Wt=ne.get(Tn);if(Wt)return Wt.slice(0,Yi).every(function(ct){return ct})});if(eo)return Ne=eo,"break"},zt=p?3:1;zt>0&&"break"!==ln(zt);zt--);e.placement!==Ne&&(e.modifiersData[i]._skip=!0,e.placement=Ne,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function sm(n,e,t){return Yc(n,rb(e,t))}const Wre={name:"preventOverflow",enabled:!0,phase:"main",fn:function $re(n){var e=n.state,t=n.options,i=n.name,r=t.mainAxis,o=void 0===r||r,s=t.altAxis,a=void 0!==s&&s,h=t.tether,f=void 0===h||h,p=t.tetherOffset,m=void 0===p?0:p,g=om(e,{boundary:t.boundary,rootBoundary:t.rootBoundary,padding:t.padding,altBoundary:t.altBoundary}),y=Us(e.placement),v=gh(e.placement),w=!v,_=b1(y),N=function Ure(n){return"x"===n?"y":"x"}(_),T=e.modifiersData.popperOffsets,ne=e.rects.reference,K=e.rects.popper,Ne="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,He="number"==typeof Ne?{mainAxis:Ne,altAxis:Ne}:Object.assign({mainAxis:0,altAxis:0},Ne),pt=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,at={x:0,y:0};if(T){if(o){var ot,pn="y"===_?Yr:qr,St="y"===_?Fo:jo,se="y"===_?"height":"width",fe=T[_],be=fe+g[pn],Ue=fe-g[St],It=f?-K[se]/2:0,ln=v===mh?ne[se]:K[se],zt=v===mh?-K[se]:-ne[se],Mn=e.elements.arrow,Rt=f&&Mn?_1(Mn):{width:0,height:0},Yi=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},eo=Yi[pn],Tn=Yi[St],Wt=sm(0,ne[se],Rt[se]),ct=w?ne[se]/2-It-Wt-eo-He.mainAxis:ln-Wt-eo-He.mainAxis,Fn=w?-ne[se]/2+It+Wt+Tn+He.mainAxis:zt+Wt+Tn+He.mainAxis,Ar=e.elements.arrow&&tm(e.elements.arrow),Yl=null!=(ot=pt?.[_])?ot:0,Ou=fe+Fn-Yl,Ug=sm(f?rb(be,fe+ct-Yl-(Ar?"y"===_?Ar.clientTop||0:Ar.clientLeft||0:0)):be,fe,f?Yc(Ue,Ou):Ue);T[_]=Ug,at[_]=Ug-fe}if(a){var Hg,Ha=T[N],Kl="y"===N?"height":"width",$g=Ha+g["x"===_?Yr:qr],Au=Ha-g["x"===_?Fo:jo],Wg=-1!==[Yr,qr].indexOf(y),G0=null!=(Hg=pt?.[N])?Hg:0,Y0=Wg?$g:Ha-ne[Kl]-K[Kl]-G0+He.altAxis,q0=Wg?Ha+ne[Kl]+K[Kl]-G0-He.altAxis:Au,K0=f&&Wg?function Hre(n,e,t){var i=sm(n,e,t);return i>t?t:i}(Y0,Ha,q0):sm(f?Y0:$g,Ha,f?q0:Au);T[N]=K0,at[N]=K0-Ha}e.modifiersData[i]=at}},requiresIfExists:["offset"]},Kre={name:"arrow",enabled:!0,phase:"main",fn:function Yre(n){var e,t=n.state,i=n.name,r=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,a=Us(t.placement),l=b1(a),u=[qr,jo].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(e,t){return Uj("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Hj(e,nm))}(r.padding,t),h=_1(o),f="y"===l?Yr:qr,p="y"===l?Fo:jo,m=t.rects.reference[u]+t.rects.reference[l]-s[l]-t.rects.popper[u],g=s[l]-t.rects.reference[l],y=tm(o),v=y?"y"===l?y.clientHeight||0:y.clientWidth||0:0,T=v/2-h[u]/2+(m/2-g/2),ne=sm(d[f],T,v-h[u]-d[p]);t.modifiersData[i]=((e={})[l]=ne,e.centerOffset=ne-T,e)}},effect:function qre(n){var e=n.state,i=n.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=e.elements.popper.querySelector(r))||zj(e.elements.popper,r)&&(e.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $j(n,e,t){return void 0===t&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function Wj(n){return[Yr,jo,Fo,qr].some(function(e){return n[e]>=0})}var Zre=[vre,wre,Tre,Fj,Ore,Bre,Wre,Kre,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function Qre(n){var e=n.state,t=n.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=om(e,{elementContext:"reference"}),a=om(e,{altBoundary:!0}),l=$j(s,i),c=$j(a,r,o),u=Wj(l),d=Wj(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],Jre=yre({defaultModifiers:Zre}),Gj="tippy-content",qj="tippy-arrow",Kj="tippy-svg-arrow",wl={passive:!0,capture:!0},Qj=function(){return document.body};function C1(n,e,t){return Array.isArray(n)?n[e]??(Array.isArray(t)?t[e]:t):n}function D1(n,e){var t={}.toString.call(n);return 0===t.indexOf("[object")&&t.indexOf(e+"]")>-1}function Zj(n,e){return"function"==typeof n?n.apply(void 0,e):n}function Jj(n,e){return 0===e?n:function(i){clearTimeout(t),t=setTimeout(function(){n(i)},e)};var t}function Cl(n){return[].concat(n)}function Xj(n,e){-1===n.indexOf(e)&&n.push(e)}function yh(n){return[].slice.call(n)}function t3(n){return Object.keys(n).reduce(function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e},{})}function qc(){return document.createElement("div")}function lb(n){return["Element","Fragment"].some(function(e){return D1(n,e)})}function S1(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function am(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function E1(n,e,t){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){n[i](r,t)})}function o3(n,e){for(var t=e;t;){var i;if(n.contains(t))return!0;t=null==t.getRootNode||null==(i=t.getRootNode())?void 0:i.host}return!1}var Hs={isTouch:!1},s3=0;function soe(){Hs.isTouch||(Hs.isTouch=!0,window.performance&&document.addEventListener("mousemove",a3))}function a3(){var n=performance.now();n-s3<20&&(Hs.isTouch=!1,document.removeEventListener("mousemove",a3)),s3=n}function aoe(){var n=document.activeElement;(function n3(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var uoe=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,Kr=Object.assign({appendTo:Qj,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),poe=Object.keys(Kr);function h3(n){var t=(n.plugins||[]).reduce(function(i,r){var a,o=r.name;return o&&(i[o]=void 0!==n[o]?n[o]:null!=(a=Kr[o])?a:r.defaultValue),i},{});return Object.assign({},n,t)}function f3(n,e){var t=Object.assign({},e,{content:Zj(e.content,[n])},e.ignoreAttributes?{}:function goe(n,e){return(e?Object.keys(h3(Object.assign({},Kr,{plugins:e}))):poe).reduce(function(r,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return r;if("content"===o)r[o]=s;else try{r[o]=JSON.parse(s)}catch{r[o]=s}return r},{})}(n,e.plugins));return t.aria=Object.assign({},Kr.aria,t.aria),t.aria={expanded:"auto"===t.aria.expanded?e.interactive:t.aria.expanded,content:"auto"===t.aria.content?e.interactive?null:"describedby":t.aria.content},t}function x1(n,e){n.innerHTML=e}function p3(n){var e=qc();return!0===n?e.className=qj:(e.className=Kj,lb(n)?e.appendChild(n):x1(e,n)),e}function m3(n,e){lb(e.content)?(x1(n,""),n.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?x1(n,e.content):n.textContent=e.content)}function cb(n){var e=n.firstElementChild,t=yh(e.children);return{box:e,content:t.find(function(i){return i.classList.contains(Gj)}),arrow:t.find(function(i){return i.classList.contains(qj)||i.classList.contains(Kj)}),backdrop:t.find(function(i){return i.classList.contains("tippy-backdrop")})}}function g3(n){var e=qc(),t=qc();t.className="tippy-box",t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var i=qc();function r(o,s){var a=cb(e),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),"string"==typeof s.animation?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&m3(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(p3(s.arrow))):l.appendChild(p3(s.arrow)):u&&l.removeChild(u)}return i.className=Gj,i.setAttribute("data-state","hidden"),m3(i,n.props),e.appendChild(t),t.appendChild(i),r(n.props,n.props),{popper:e,onUpdate:r}}g3.$$tippy=!0;var _oe=1,ub=[],db=[];function voe(n,e){var i,r,o,u,d,h,m,t=f3(n,Object.assign({},Kr,h3(t3(e)))),s=!1,a=!1,l=!1,c=!1,f=[],p=Jj(ql,t.interactiveDebounce),g=_oe++,v=function noe(n){return n.filter(function(e,t){return n.indexOf(e)===t})}(t.plugins),_={id:g,reference:n,popper:qc(),popperInstance:null,props:t,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function Y0(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function q0(J){if(!_.state.isDestroyed){be("onBeforeUpdate",[_,J]),Iu();var $e=_.props,ut=f3(n,Object.assign({},$e,t3(J),{ignoreAttributes:!0}));_.props=ut,Ar(),$e.interactiveDebounce!==ut.interactiveDebounce&&(ln(),p=Jj(ql,ut.interactiveDebounce)),$e.triggerTarget&&!ut.triggerTarget?Cl($e.triggerTarget).forEach(function(wn){wn.removeAttribute("aria-expanded")}):ut.triggerTarget&&n.removeAttribute("aria-expanded"),It(),fe(),ne&&ne($e,ut),_.popperInstance&&($0(),Kl().forEach(function(wn){requestAnimationFrame(wn._tippy.popperInstance.forceUpdate)})),be("onAfterUpdate",[_,J])}},setContent:function K0(J){_.setProps({content:J})},show:function J0e(){var J=_.state.isVisible,$e=_.state.isDestroyed,ut=!_.state.isEnabled,wn=Hs.isTouch&&!_.props.touch,cn=C1(_.props.duration,0,Kr.duration);if(!(J||$e||ut||wn||ot().hasAttribute("disabled")||(be("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,at()&&(T.style.visibility="visible"),fe(),Yi(),_.state.isMounted||(T.style.transition="none"),at()){var kr=St();S1([kr.box,kr.content],0)}h=function(){var ku;if(_.state.isVisible&&!c){if(c=!0,T.style.transition=_.props.moveTransition,at()&&_.props.animation){var DE=St(),Q0=DE.box,nf=DE.content;S1([Q0,nf],cn),am([Q0,nf],"visible")}Ue(),It(),Xj(db,_),null==(ku=_.popperInstance)||ku.forceUpdate(),be("onMount",[_]),_.props.animation&&at()&&function Wt(J,$e){ct(J,$e)}(cn,function(){_.state.isShown=!0,be("onShown",[_])})}},function Ha(){var $e,J=_.props.appendTo,ut=ot();($e=_.props.interactive&&J===Qj||"parent"===J?ut.parentNode:Zj(J,[ut])).contains(T)||$e.appendChild(T),_.state.isMounted=!0,$0()}()}},hide:function X0e(){var J=!_.state.isVisible,$e=_.state.isDestroyed,ut=!_.state.isEnabled,wn=C1(_.props.duration,1,Kr.duration);if(!(J||$e||ut)&&(be("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,c=!1,s=!1,at()&&(T.style.visibility="hidden"),ln(),eo(),fe(!0),at()){var cn=St(),kr=cn.box,Go=cn.content;_.props.animation&&(S1([kr,Go],wn),am([kr,Go],"hidden"))}Ue(),It(),_.props.animation?at()&&function Tn(J,$e){ct(J,function(){!_.state.isVisible&&T.parentNode&&T.parentNode.contains(T)&&$e()})}(wn,_.unmount):_.unmount()}},hideWithInteractivity:function ewe(J){pn().addEventListener("mousemove",p),Xj(ub,p),p(J)},enable:function Wg(){_.state.isEnabled=!0},disable:function G0(){_.hide(),_.state.isEnabled=!1},unmount:function twe(){_.state.isVisible&&_.hide(),_.state.isMounted&&(W0(),Kl().forEach(function(J){J._tippy.unmount()}),T.parentNode&&T.parentNode.removeChild(T),db=db.filter(function(J){return J!==_}),_.state.isMounted=!1,be("onHidden",[_]))},destroy:function nwe(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),Iu(),delete n._tippy,_.state.isDestroyed=!0,be("onDestroy",[_]))}};if(!t.render)return _;var N=t.render(_),T=N.popper,ne=N.onUpdate;T.setAttribute("data-tippy-root",""),T.id="tippy-"+_.id,_.popper=T,n._tippy=_,T._tippy=_;var K=v.map(function(J){return J.fn(_)}),Ne=n.hasAttribute("aria-expanded");return Ar(),It(),fe(),be("onCreate",[_]),t.showOnCreate&&$g(),T.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),T.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&pn().addEventListener("mousemove",p)}),_;function He(){var J=_.props.touch;return Array.isArray(J)?J:[J,0]}function pt(){return"hold"===He()[0]}function at(){var J;return!(null==(J=_.props.render)||!J.$$tippy)}function ot(){return m||n}function pn(){var J=ot().parentNode;return J?function r3(n){var e,i=Cl(n)[0];return null!=i&&null!=(e=i.ownerDocument)&&e.body?i.ownerDocument:document}(J):document}function St(){return cb(T)}function se(J){return _.state.isMounted&&!_.state.isVisible||Hs.isTouch||u&&"focus"===u.type?0:C1(_.props.delay,J?0:1,Kr.delay)}function fe(J){void 0===J&&(J=!1),T.style.pointerEvents=_.props.interactive&&!J?"":"none",T.style.zIndex=""+_.props.zIndex}function be(J,$e,ut){var wn;void 0===ut&&(ut=!0),K.forEach(function(cn){cn[J]&&cn[J].apply(cn,$e)}),ut&&(wn=_.props)[J].apply(wn,$e)}function Ue(){var J=_.props.aria;if(J.content){var $e="aria-"+J.content,ut=T.id;Cl(_.props.triggerTarget||n).forEach(function(cn){var kr=cn.getAttribute($e);if(_.state.isVisible)cn.setAttribute($e,kr?kr+" "+ut:ut);else{var Go=kr&&kr.replace(ut,"").trim();Go?cn.setAttribute($e,Go):cn.removeAttribute($e)}})}}function It(){!Ne&&_.props.aria.expanded&&Cl(_.props.triggerTarget||n).forEach(function($e){_.props.interactive?$e.setAttribute("aria-expanded",_.state.isVisible&&$e===ot()?"true":"false"):$e.removeAttribute("aria-expanded")})}function ln(){pn().removeEventListener("mousemove",p),ub=ub.filter(function(J){return J!==p})}function zt(J){if(!Hs.isTouch||!l&&"mousedown"!==J.type){var $e=J.composedPath&&J.composedPath()[0]||J.target;if(!_.props.interactive||!o3(T,$e)){if(Cl(_.props.triggerTarget||n).some(function(ut){return o3(ut,$e)})){if(Hs.isTouch||_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else be("onClickOutside",[_,J]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),a=!0,setTimeout(function(){a=!1}),_.state.isMounted||eo())}}}function Mn(){l=!0}function Rt(){l=!1}function Yi(){var J=pn();J.addEventListener("mousedown",zt,!0),J.addEventListener("touchend",zt,wl),J.addEventListener("touchstart",Rt,wl),J.addEventListener("touchmove",Mn,wl)}function eo(){var J=pn();J.removeEventListener("mousedown",zt,!0),J.removeEventListener("touchend",zt,wl),J.removeEventListener("touchstart",Rt,wl),J.removeEventListener("touchmove",Mn,wl)}function ct(J,$e){var ut=St().box;function wn(cn){cn.target===ut&&(E1(ut,"remove",wn),$e())}if(0===J)return $e();E1(ut,"remove",d),E1(ut,"add",wn),d=wn}function Fn(J,$e,ut){void 0===ut&&(ut=!1),Cl(_.props.triggerTarget||n).forEach(function(cn){cn.addEventListener(J,$e,ut),f.push({node:cn,eventType:J,handler:$e,options:ut})})}function Ar(){pt()&&(Fn("touchstart",Yl,{passive:!0}),Fn("touchend",Ou,{passive:!0})),function toe(n){return n.split(/\s+/).filter(Boolean)}(_.props.trigger).forEach(function(J){if("manual"!==J)switch(Fn(J,Yl),J){case"mouseenter":Fn("mouseleave",Ou);break;case"focus":Fn(uoe?"focusout":"blur",Ug);break;case"focusin":Fn("focusout",Ug)}})}function Iu(){f.forEach(function(J){J.node.removeEventListener(J.eventType,J.handler,J.options)}),f=[]}function Yl(J){var $e,ut=!1;if(_.state.isEnabled&&!Hg(J)&&!a){var wn="focus"===(null==($e=u)?void 0:$e.type);u=J,m=J.currentTarget,It(),!_.state.isVisible&&function T1(n){return D1(n,"MouseEvent")}(J)&&ub.forEach(function(cn){return cn(J)}),"click"===J.type&&(_.props.trigger.indexOf("mouseenter")<0||s)&&!1!==_.props.hideOnClick&&_.state.isVisible?ut=!0:$g(J),"click"===J.type&&(s=!ut),ut&&!wn&&Au(J)}}function ql(J){var $e=J.target,ut=ot().contains($e)||T.contains($e);"mousemove"===J.type&&ut||function ooe(n,e){var t=e.clientX,i=e.clientY;return n.every(function(r){var o=r.popperRect,s=r.popperState,l=r.props.interactiveBorder,c=function e3(n){return n.split("-")[0]}(s.placement),u=s.modifiersData.offset;return!u||o.top-i+("bottom"===c?u.top.y:0)>l||i-o.bottom-("top"===c?u.bottom.y:0)>l||o.left-t+("right"===c?u.left.x:0)>l||t-o.right-("left"===c?u.right.x:0)>l})}(Kl().concat(T).map(function(cn){var kr,tf=null==(kr=cn._tippy.popperInstance)?void 0:kr.state;return tf?{popperRect:cn.getBoundingClientRect(),popperState:tf,props:t}:null}).filter(Boolean),J)&&(ln(),Au(J))}function Ou(J){if(!(Hg(J)||_.props.trigger.indexOf("click")>=0&&s)){if(_.props.interactive)return void _.hideWithInteractivity(J);Au(J)}}function Ug(J){_.props.trigger.indexOf("focusin")<0&&J.target!==ot()||_.props.interactive&&J.relatedTarget&&T.contains(J.relatedTarget)||Au(J)}function Hg(J){return!!Hs.isTouch&&pt()!==J.type.indexOf("touch")>=0}function $0(){W0();var J=_.props,$e=J.popperOptions,ut=J.placement,wn=J.offset,cn=J.getReferenceClientRect,kr=J.moveTransition,Go=at()?cb(T).arrow:null,tf=cn?{getBoundingClientRect:cn,contextElement:cn.contextElement||ot()}:n,ku=[{name:"offset",options:{offset:wn}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!kr}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Q0){var nf=Q0.state;if(at()){var ME=St().box;["placement","reference-hidden","escaped"].forEach(function(Z0){"placement"===Z0?ME.setAttribute("data-placement",nf.placement):nf.attributes.popper["data-popper-"+Z0]?ME.setAttribute("data-"+Z0,""):ME.removeAttribute("data-"+Z0)}),nf.attributes.popper={}}}}];at()&&Go&&ku.push({name:"arrow",options:{element:Go,padding:3}}),ku.push.apply(ku,$e?.modifiers||[]),_.popperInstance=Jre(tf,T,Object.assign({},$e,{placement:ut,onFirstUpdate:h,modifiers:ku}))}function W0(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function Kl(){return yh(T.querySelectorAll("[data-tippy-root]"))}function $g(J){_.clearDelayTimeouts(),J&&be("onTrigger",[_,J]),Yi();var $e=se(!0),ut=He(),cn=ut[1];Hs.isTouch&&"hold"===ut[0]&&cn&&($e=cn),$e?i=setTimeout(function(){_.show()},$e):_.show()}function Au(J){if(_.clearDelayTimeouts(),be("onUntrigger",[_,J]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(J.type)>=0&&s)){var $e=se(!1);$e?r=setTimeout(function(){_.state.isVisible&&_.hide()},$e):o=requestAnimationFrame(function(){_.hide()})}}else eo()}}function Dl(n,e){void 0===e&&(e={});var t=Kr.plugins.concat(e.plugins||[]);!function loe(){document.addEventListener("touchstart",soe,wl),window.addEventListener("blur",aoe)}();var i=Object.assign({},e,{plugins:t}),a=function roe(n){return lb(n)?[n]:function ioe(n){return D1(n,"NodeList")}(n)?yh(n):Array.isArray(n)?n:yh(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&voe(c,i);return u&&l.push(u),l},[]);return lb(n)?a[0]:a}Dl.defaultProps=Kr,Dl.setDefaultProps=function(e){Object.keys(e).forEach(function(i){Kr[i]=e[i]})},Dl.currentInput=Hs,Object.assign({},Fj,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}}),Dl.setDefaultProps({render:g3});const zo=Dl,Vo=function(n){for(var e=0;;e++)if(!(n=n.previousSibling))return e},cm=function(n){let e=n.assignedSlot||n.parentNode;return e&&11==e.nodeType?e.host:e};let v3=null;const Pa=function(n,e,t){let i=v3||(v3=document.createRange());return i.setEnd(n,t??n.nodeValue.length),i.setStart(n,e||0),i},Kc=function(n,e,t,i){return t&&(b3(n,e,t,i,-1)||b3(n,e,t,i,1))},Eoe=/^(img|br|input|textarea|hr)$/i;function b3(n,e,t,i,r){for(;;){if(n==t&&e==i)return!0;if(e==(r<0?0:$s(n))){let o=n.parentNode;if(!o||1!=o.nodeType||Ioe(n)||Eoe.test(n.nodeName)||"false"==n.contentEditable)return!1;e=Vo(n)+(r<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[e+(r<0?-1:0)]).contentEditable)return!1;e=r<0?$s(n):0}}}function $s(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function Ioe(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const fb=function(n){return n.focusNode&&Kc(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Qc(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}const Ws=typeof navigator<"u"?navigator:null,w3=typeof document<"u"?document:null,Ml=Ws&&Ws.userAgent||"",O1=/Edge\/(\d+)/.exec(Ml),C3=/MSIE \d/.exec(Ml),A1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ml),Qr=!!(C3||A1||O1),Tl=C3?document.documentMode:A1?+A1[1]:O1?+O1[1]:0,hs=!Qr&&/gecko\/(\d+)/i.test(Ml);hs&&/Firefox\/(\d+)/.exec(Ml);const k1=!Qr&&/Chrome\/(\d+)/.exec(Ml),ar=!!k1,koe=k1?+k1[1]:0,Er=!Qr&&!!Ws&&/Apple Computer/.test(Ws.vendor),_h=Er&&(/Mobile\/\w+/.test(Ml)||!!Ws&&Ws.maxTouchPoints>2),Bo=_h||!!Ws&&/Mac/.test(Ws.platform),Noe=!!Ws&&/Win/.test(Ws.platform),fs=/Android \d/.test(Ml),pb=!!w3&&"webkitFontSmoothing"in w3.documentElement.style,Poe=pb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Loe(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Sl(n,e){return"number"==typeof n?n:n[e]}function Roe(n){let e=n.getBoundingClientRect();return{left:e.left,right:e.left+n.clientWidth*(e.width/n.offsetWidth||1),top:e.top,bottom:e.top+n.clientHeight*(e.height/n.offsetHeight||1)}}function D3(n,e,t){let i=n.someProp("scrollThreshold")||0,r=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=t||n.dom;s;s=cm(s)){if(1!=s.nodeType)continue;let a=s,l=a==o.body,c=l?Loe(o):Roe(a),u=0,d=0;if(e.topc.bottom-Sl(i,"bottom")&&(d=e.bottom-c.bottom+Sl(r,"bottom")),e.leftc.right-Sl(i,"right")&&(u=e.right-c.right+Sl(r,"right")),u||d)if(l)o.defaultView.scrollBy(u,d);else{let h=a.scrollLeft,f=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let p=a.scrollLeft-h,m=a.scrollTop-f;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(l)break}}function M3(n){let e=[],t=n.ownerDocument;for(let i=n;i&&(e.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),n!=t);i=cm(i));return e}function T3(n,e){for(let t=0;t=a){s=Math.max(p.bottom,s),a=Math.min(p.top,a);let m=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(o=d+1)}}return!t&&l&&(t=l,r=c,i=0),t&&3==t.nodeType?function Voe(n,e){let t=n.nodeValue.length,i=document.createRange();for(let r=0;r=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}(t,r):!t||i&&1==t.nodeType?{node:n,offset:o}:S3(t,r)}function N1(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function E3(n,e,t){let i=n.childNodes.length;if(i&&t.tope.top&&r++}i==n.dom&&r==i.childNodes.length-1&&1==i.lastChild.nodeType&&e.top>i.lastChild.getBoundingClientRect().bottom?a=n.state.doc.content.size:(0==r||1!=i.nodeType||"BR"!=i.childNodes[r-1].nodeName)&&(a=function Hoe(n,e,t,i){let r=-1;for(let o=e,s=!1;o!=n.dom;){let a=n.docView.nearestDesc(o,!0);if(!a)return null;if(1==a.dom.nodeType&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,l.left>i.left||l.top>i.top?r=a.posBefore:(l.right-1?r:n.docView.posFromDOM(e,t,-1)}(n,i,r,e))}null==a&&(a=function Uoe(n,e,t){let{node:i,offset:r}=S3(e,t),o=-1;if(1==i.nodeType&&!i.firstChild){let s=i.getBoundingClientRect();o=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(i,r,o)}(n,s,e));let l=n.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function x3(n){return n.top=0&&r==i.nodeValue.length?(l--,u=1):t<0?l--:c++,um(El(Pa(i,l,c),u),u<0)}{let l=El(Pa(i,r,r),t);if(hs&&r&&/\s/.test(i.nodeValue[r-1])&&r=0)}if(null==o&&r&&(t<0||r==$s(i))){let l=i.childNodes[r-1],c=3==l.nodeType?Pa(l,$s(l)-(s?0:1)):1!=l.nodeType||"BR"==l.nodeName&&l.nextSibling?null:l;if(c)return um(El(c,1),!1)}if(null==o&&r<$s(i)){let l=i.childNodes[r];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?3==l.nodeType?Pa(l,0,s?0:1):1==l.nodeType?l:null:null;if(c)return um(El(c,-1),!0)}return um(El(3==i.nodeType?Pa(i):i,-t),t>=0)}function um(n,e){if(0==n.width)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function P1(n,e){if(0==n.height)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function O3(n,e,t){let i=n.state,r=n.root.activeElement;i!=e&&n.updateState(e),r!=n.dom&&n.focus();try{return t()}finally{i!=e&&n.updateState(i),r!=n.dom&&r&&r.focus()}}const Yoe=/[\u0590-\u08ac]/;let A3=null,k3=null,N3=!1;class dm{constructor(e,t,i,r){this.parent=e,this.children=t,this.dom=i,this.contentDOM=r,this.dirty=0,i.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,i){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tVo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let o=e;;o=o.parentNode){if(o==this.dom){r=!1;break}if(o.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){r=!0;break}if(o.nextSibling)break}}return r??i>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let i=!0,r=e;r;r=r.parentNode){let s,o=this.getDesc(r);if(o&&(!t||o.node)){if(!i||!(s=o.nodeDOM)||(1==s.nodeType?s.contains(1==e.nodeType?e:e.parentNode):s==e))return o;i=!1}}}getDesc(e){let t=e.pmViewDesc;for(let i=t;i;i=i.parent)if(i==this)return t}posFromDOM(e,t,i){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,i)}return-1}descAt(e){for(let t=0,i=0;te||s instanceof F3){r=e-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,t);for(;i&&!(o=this.children[i-1]).size&&o instanceof L3&&o.side>=0;i--);if(t<=0){let o,s=!0;for(;o=i?this.children[i-1]:null,o&&o.dom.parentNode!=this.contentDOM;i--,s=!1);return o&&t&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,t):{node:this.contentDOM,offset:o?Vo(o.dom)+1:0}}{let o,s=!0;for(;o=i=u&&t<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,u);e=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){r=Vo(h.dom)+1;break}e-=h.size}-1==r&&(r=0)}if(r>-1&&(c>t||a==this.children.length-1)){t=c;for(let u=a+1;uf&&st){let f=a;a=l,l=f}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let i=0,r=0;r=i:ei){let a=i+o.border,l=s-o.border;if(e>=a&&t<=l)return this.dirty=e==i||t==s?2:1,void(e!=a||t!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}i=s}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let i=1==e?2:1;t.dirtyo?o.parent?o.parent.posBeforeChild(o):void 0:r)),!t.type.spec.raw){if(1!=s.nodeType){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Qoe extends dm{constructor(e,t,i,r){super(e,[],t,null),this.textDOM=i,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class Jc extends dm{constructor(e,t,i,r){super(e,[],i,r),this.mark=t}static create(e,t,i,r){let o=r.nodeViews[t.type.name],s=o&&o(t,r,i);return(!s||!s.dom)&&(s=zs.renderSpec(document,t.type.spec.toDOM(t,i))),new Jc(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty0&&(o=F1(o,0,e,i));for(let a=0;al?l.parent?l.parent.posBeforeChild(l):void 0:s,i,r),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(t.text);else u||({dom:u,contentDOM:d}=zs.renderSpec(document,t.type.spec.toDOM(t)));!d&&!t.isText&&"BR"!=u.nodeName&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let h=u;return u=V3(u,i,t),c?l=new Zoe(e,t,i,r,u,d||null,h,c,o,s+1):t.isText?new mb(e,t,i,r,u,h,o):new xl(e,t,i,r,u,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let i=this.children[t];if(this.dom.contains(i.dom.parentNode)){e.contentElement=i.dom.parentNode;break}}e.contentElement||(e.getContent=()=>le.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,i){return 0==this.dirty&&e.eq(this.node)&&R1(t,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let i=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new Xoe(this,s&&s.node,e);(function nse(n,e,t,i){let r=e.locals(n),o=0;if(0==r.length){for(let c=0;co;)a.push(r[s++]);let h=o+u.nodeSize;if(u.isText){let p=h;s!p.inline):a.slice(),e.forChild(o,u),d),o=h}})(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,i,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?On.none:this.node.child(u).marks,i,e),l.placeWidget(c,e,r)},(c,u,d,h)=>{let f;l.syncToMarks(c.marks,i,e),l.findNodeMatch(c,u,d,h)||a&&e.state.selection.from>r&&e.state.selection.to-1&&l.updateNodeAt(c,u,d,f,e)||l.updateNextNode(c,u,d,e,h,r)||l.addNode(c,u,d,e,r),r+=c.nodeSize}),l.syncToMarks([],i,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),j3(this.contentDOM,this.children,e),_h&&function ise(n){if("UL"==n.nodeName||"OL"==n.nodeName){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n),n.style.cssText=e}}(this.dom))}localCompositionInfo(e,t){let{from:i,to:r}=e.state.selection;if(!(e.state.selection instanceof it)||it+this.node.content.size)return null;let o=e.domSelectionRange(),s=function rse(n,e){for(;;){if(3==n.nodeType)return n;if(1==n.nodeType&&e>0){if(n.childNodes.length>e&&3==n.childNodes[e].nodeType)return n.childNodes[e];e=$s(n=n.childNodes[e-1])}else{if(!(1==n.nodeType&&e=t){let c=a=0&&c+e.length+a>=t)return a+c;if(t==i&&l.length>=i+e.length-a&&l.slice(i-a,i-a+e.length)==e)return i}}return-1}(this.node.content,a,i-t,r-t);return l<0?null:{node:s,pos:l,text:a}}return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:i,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new Qoe(this,o,t,r);e.input.compositionNodes.push(s),this.children=F1(this.children,i,i+r.length,e,s)}update(e,t,i,r){return!(3==this.dirty||!e.sameMarkup(this.node)||(this.updateInner(e,t,i,r),0))}updateInner(e,t,i,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=i,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(R1(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,i=this.dom;this.dom=z3(this.dom,this.nodeDOM,L1(this.outerDeco,this.node,t),L1(e,this.node,t)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function R3(n,e,t,i,r){V3(i,e,n);let o=new xl(void 0,n,e,t,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}class mb extends xl{constructor(e,t,i,r,o,s,a){super(e,t,i,r,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,i,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node)||(this.updateOuterDeco(t),(0!=this.dirty||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,0))}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,i){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,i)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,i){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new mb(this.parent,r,this.outerDeco,this.innerDeco,o,o,i)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(0==e||t==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}}class F3 extends dm{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Zoe extends xl{constructor(e,t,i,r,o,s,a,l,c,u){super(e,t,i,r,o,s,a,c,u),this.spec=l}update(e,t,i,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,i);return o&&this.updateInner(e,t,i,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,i,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,i,r){this.spec.setSelection?this.spec.setSelection(e,t,i):super.setSelection(e,t,i,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function j3(n,e,t){let i=n.firstChild,r=!1;for(let o=0;o0;){let a;for(;;)if(i){let c=t.children[i-1];if(!(c instanceof Jc)){a=c,i--;break}t=c,i=c.children.length}else{if(t==e)break e;i=t.parent.children.indexOf(t),t=t.parent}let l=a.node;if(l){if(l!=n.child(r-1))break;--r,o.set(a,r),s.push(a)}}return{index:r,matched:o,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let i=e;i>1,s=Math.min(o,e.length);for(;r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Jc.create(this.top,e[o],t,i);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,i,r){let s,o=-1;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,i))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a=t||u<=e?o.push(l):(ct&&o.push(l.slice(t-c,l.size,i)))}return o}function j1(n,e=null){let t=n.domSelectionRange(),i=n.state.doc;if(!t.focusNode)return null;let r=n.docView.nearestDesc(t.focusNode),o=r&&0==r.size,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let l,c,a=i.resolve(s);if(fb(t)){for(l=a;r&&!r.node;)r=r.parent;let u=r.node;if(r&&u.isAtom&&Ye.isSelectable(u)&&r.parent&&(!u.isInline||!function xoe(n,e,t){for(let i=0==e,r=e==$s(n);i||r;){if(n==t)return!0;let o=Vo(n);if(!(n=n.parentNode))return!1;i=i&&0==o,r=r&&o==$s(n)}}(t.focusNode,t.focusOffset,r.dom))){let d=r.posBefore;c=new Ye(s==d?a:i.resolve(d))}}else{let u=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}return c||(c=V1(n,l,a,"pointer"==e||n.state.selection.head{(t.anchorNode!=i||t.anchorOffset!=r)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!U3(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const H3=Er||ar&&koe<63;function $3(n,e){let{node:t,offset:i}=n.docView.domFromPos(e,0),r=ir(n,e,t))||it.between(e,t,i)}function q3(n){return!(n.editable&&!n.hasFocus())&&K3(n)}function K3(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function B1(n,e){let{$anchor:t,$head:i}=n.selection,r=e>0?t.max(i):t.min(i),o=r.parent.inlineContent?r.depth?n.doc.resolve(e>0?r.after():r.before()):null:r;return o&&nt.findFrom(o,e)}function eu(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Q3(n,e,t){let i=n.state.selection;if(!(i instanceof it)){if(i instanceof Ye&&i.node.isInline)return eu(n,new it(e>0?i.$to:i.$from));{let r=B1(n.state,e);return!!r&&eu(n,r)}}if(!i.empty||t.indexOf("s")>-1)return!1;if(n.endOfTextblock(e>0?"forward":"backward")){let r=B1(n.state,e);return!!(r&&r instanceof Ye)&&eu(n,r)}if(!(Bo&&t.indexOf("m")>-1)){let s,r=i.$head,o=r.textOffset?null:e<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText)return!1;let a=e<0?r.pos-o.nodeSize:r.pos;return!!(o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM)&&(Ye.isSelectable(o)?eu(n,new Ye(e<0?n.state.doc.resolve(r.pos-o.nodeSize):r)):!!pb&&eu(n,new it(n.state.doc.resolve(e<0?a:a+o.nodeSize))))}}function gb(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function fm(n){let e=n.pmViewDesc;return e&&0==e.size&&(n.nextSibling||"BR"!=n.nodeName)}function pm(n,e){return e<0?function cse(n){let e=n.domSelectionRange(),t=e.focusNode,i=e.focusOffset;if(!t)return;let r,o,s=!1;for(hs&&1==t.nodeType&&i0){if(1!=t.nodeType)break;{let a=t.childNodes[i-1];if(fm(a))r=t,o=--i;else{if(3!=a.nodeType)break;t=a,i=t.nodeValue.length}}}else{if(J3(t))break;{let a=t.previousSibling;for(;a&&fm(a);)r=t.parentNode,o=Vo(a),a=a.previousSibling;if(a)t=a,i=gb(t);else{if(t=t.parentNode,t==n.dom)break;i=0}}}s?U1(n,t,i):r&&U1(n,r,o)}(n):Z3(n)}function Z3(n){let e=n.domSelectionRange(),t=e.focusNode,i=e.focusOffset;if(!t)return;let o,s,r=gb(t);for(;;)if(i{n.state==r&&La(n)},50)}function X3(n,e){let t=n.state.doc.resolve(e);if(!ar&&!Noe&&t.parent.inlineContent){let r=n.coordsAtPos(e);if(e>t.start()){let o=n.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>r.top&&s1)return o.leftr.top&&s1)return o.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(n.dom).direction?"rtl":"ltr"}function e4(n,e,t){let i=n.state.selection;if(i instanceof it&&!i.empty||t.indexOf("s")>-1||Bo&&t.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=B1(n.state,e);if(s&&s instanceof Ye)return eu(n,s)}if(!r.parent.inlineContent){let s=e<0?r:o,a=i instanceof yo?nt.near(s,e):nt.findFrom(s,e);return!!a&&eu(n,a)}return!1}function t4(n,e){if(!(n.state.selection instanceof it))return!0;let{$head:t,$anchor:i,empty:r}=n.state.selection;if(!t.sameParent(i))return!0;if(!r)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return e<0?s.delete(t.pos-o.nodeSize,t.pos):s.delete(t.pos,t.pos+o.nodeSize),n.dispatch(s),!0}return!1}function n4(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function r4(n,e){n.someProp("transformCopied",f=>{e=f(e,n)});let t=[],{content:i,openStart:r,openEnd:o}=e;for(;r>1&&o>1&&1==i.childCount&&1==i.firstChild.childCount;){r--,o--;let f=i.firstChild;t.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),i=f.content}let s=n.someProp("clipboardSerializer")||zs.fromSchema(n.state.schema),a=h4(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u,c=l.firstChild,d=0;for(;c&&1==c.nodeType&&(u=u4[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${r} ${o}${d?` -${d}`:""} ${JSON.stringify(t)}`),{dom:l,text:n.someProp("clipboardTextSerializer",f=>f(e,n))||e.content.textBetween(0,e.content.size,"\n\n")}}function o4(n,e,t,i,r){let s,a,o=r.parent.type.spec.code;if(!t&&!e)return null;let l=e&&(i||o||!t);if(l){if(n.someProp("transformPastedText",h=>{e=h(e,o||i,n)}),o)return e?new we(le.from(n.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):we.empty;let d=n.someProp("clipboardTextParser",h=>h(e,r,i,n));if(d)a=d;else{let h=r.marks(),{schema:f}=n.state,p=zs.fromSchema(f);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(f.text(m,h)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),s=function mse(n){let e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let r,t=h4().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(n);if((r=i&&u4[i[1].toLowerCase()])&&(n=r.map(o=>"<"+o+">").join("")+n+r.map(o=>"").reverse().join("")),t.innerHTML=n,r)for(let o=0;o0;d--){let h=s.firstChild;for(;h&&1!=h.nodeType;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||oh.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!(!l&&!u),context:r,ruleFromNode:h=>"BR"!=h.nodeName||h.nextSibling||!h.parentNode||fse.test(h.parentNode.nodeName)?null:{ignore:!0}})),u)a=function yse(n,e){if(!n.size)return n;let i,t=n.content.firstChild.type.schema;try{i=JSON.parse(e)}catch{return n}let{content:r,openStart:o,openEnd:s}=n;for(let a=i.length-2;a>=0;a-=2){let l=t.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=le.from(l.create(i[a+1],r)),o++,s++}return new we(r,o,s)}(c4(a,+u[1],+u[2]),u[4]);else if(a=we.maxOpen(function pse(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let o,r=e.node(t).contentMatchAt(e.index(t)),s=[];if(n.forEach(a=>{if(!s)return;let c,l=r.findWrapping(a.type);if(!l)return s=null;if(c=s.length&&o.length&&a4(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=l4(s[s.length-1],o.length));let u=s4(a,l);s.push(u),r=r.matchType(u.type),o=l}}),s)return le.from(s)}return n}(a.content,r),!0),a.openStart||a.openEnd){let d=0,h=0;for(let f=a.content.firstChild;d{a=d(a,n)}),a}const fse=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function s4(n,e,t=0){for(let i=e.length-1;i>=t;i--)n=e[i].create(null,le.from(n));return n}function a4(n,e,t,i,r){if(r1&&(o=0),r=t&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(le.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(a))}function c4(n,e,t){return e{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=i=>W1(n,i))})}function W1(n,e){return n.someProp("handleDOMEvents",t=>{let i=t[e.type];return!!i&&(i(n,e)||e.defaultPrevented)})}function Cse(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||11==t.nodeType||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function yb(n){return{left:n.clientX,top:n.clientY}}function G1(n,e,t,i,r){if(-1==i)return!1;let o=n.state.doc.resolve(i);for(let s=o.depth+1;s>0;s--)if(n.someProp(e,a=>s>o.depth?a(n,t,o.nodeAfter,o.before(s),r,!0):a(n,t,o.node(s),o.before(s),r,!1)))return!0;return!1}function bh(n,e,t){n.focused||n.focus();let i=n.state.tr.setSelection(e);"pointer"==t&&i.setMeta("pointer",!0),n.dispatch(i)}function xse(n,e,t,i){return G1(n,"handleDoubleClickOn",e,t,i)||n.someProp("handleDoubleClick",r=>r(n,e,i))}function Ise(n,e,t,i){return G1(n,"handleTripleClickOn",e,t,i)||n.someProp("handleTripleClick",r=>r(n,e,i))||function Ose(n,e,t){if(0!=t.button)return!1;let i=n.state.doc;if(-1==e)return!!i.inlineContent&&(bh(n,it.create(i,0,i.content.size),"pointer"),!0);let r=i.resolve(e);for(let o=r.depth+1;o>0;o--){let s=o>r.depth?r.nodeAfter:r.node(o),a=r.before(o);if(s.inlineContent)bh(n,it.create(i,a+1,a+1+s.content.size),"pointer");else{if(!Ye.isSelectable(s))continue;bh(n,Ye.create(i,a),"pointer")}return!0}}(n,t,i)}function Y1(n){return _b(n)}Ir.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=16==t.keyCode||t.shiftKey,!p4(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!fs||!ar||13!=t.keyCode))if(229!=t.keyCode&&n.domObserver.forceFlush(),!_h||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)n.someProp("handleKeyDown",i=>i(n,t))||function hse(n,e){let t=e.keyCode,i=function dse(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}(e);if(8==t||Bo&&72==t&&"c"==i)return t4(n,-1)||pm(n,-1);if(46==t||Bo&&68==t&&"c"==i)return t4(n,1)||pm(n,1);if(13==t||27==t)return!0;if(37==t||Bo&&66==t&&"c"==i){let r=37==t?"ltr"==X3(n,n.state.selection.from)?-1:1:-1;return Q3(n,r,i)||pm(n,r)}if(39==t||Bo&&70==t&&"c"==i){let r=39==t?"ltr"==X3(n,n.state.selection.from)?1:-1:1;return Q3(n,r,i)||pm(n,r)}return 38==t||Bo&&80==t&&"c"==i?e4(n,-1,i)||pm(n,-1):40==t||Bo&&78==t&&"c"==i?function use(n){if(!Er||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&1==e.nodeType&&0==t&&e.firstChild&&"false"==e.firstChild.contentEditable){let i=e.firstChild;n4(n,i,"true"),setTimeout(()=>n4(n,i,"false"),20)}return!1}(n)||e4(n,1,i)||Z3(n):i==(Bo?"m":"c")&&(66==t||73==t||89==t||90==t)}(n,t)?t.preventDefault():Il(n,"key");else{let i=Date.now();n.input.lastIOSEnter=i,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==i&&(n.someProp("handleKeyDown",r=>r(n,Qc(13,"Enter"))),n.input.lastIOSEnter=0)},200)}},Ir.keyup=(n,e)=>{16==e.keyCode&&(n.input.shiftKey=!1)},Ir.keypress=(n,e)=>{let t=e;if(p4(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Bo&&t.metaKey)return;if(n.someProp("handleKeyPress",r=>r(n,t)))return void t.preventDefault();let i=n.state.selection;if(!(i instanceof it&&i.$from.sameParent(i.$to))){let r=String.fromCharCode(t.charCode);!/[\r\n]/.test(r)&&!n.someProp("handleTextInput",o=>o(n,i.$from.pos,i.$to.pos,r))&&n.dispatch(n.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}};const f4=Bo?"metaKey":"ctrlKey";xr.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let i=Y1(n),r=Date.now(),o="singleClick";r-n.input.lastClick.time<500&&function Mse(n,e){let t=e.x-n.clientX,i=e.y-n.clientY;return t*t+i*i<100}(t,n.input.lastClick)&&!t[f4]&&("singleClick"==n.input.lastClick.type?o="doubleClick":"doubleClick"==n.input.lastClick.type&&(o="tripleClick")),n.input.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};let s=n.posAtCoords(yb(t));s&&("singleClick"==o?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Ase(n,s,t,!!i)):("doubleClick"==o?xse:Ise)(n,s.pos,s.inside,t)?t.preventDefault():Il(n,"pointer"))};class Ase{constructor(e,t,i,r){let o,s;if(this.view=e,this.pos=t,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!i[f4],this.allowDefault=i.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let u=e.state.doc.resolve(t.pos);o=u.parent,s=u.depth?u.before():0}const a=r?null:i.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=e.state;(0==i.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof Ye&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!hs||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Il(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>La(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(yb(e))),this.updateAllowDefault(e),this.allowDefault||!t?Il(this.view,"pointer"):function Ese(n,e,t,i,r){return G1(n,"handleClickOn",e,t,i)||n.someProp("handleClick",o=>o(n,e,i))||(r?function Sse(n,e){if(-1==e)return!1;let i,r,t=n.state.selection;t instanceof Ye&&(i=t.node);let o=n.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(Ye.isSelectable(a)){r=i&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?o.before(t.$from.depth):o.before(s);break}}return null!=r&&(bh(n,Ye.create(n.state.doc,r),"pointer"),!0)}(n,t):function Tse(n,e){if(-1==e)return!1;let t=n.state.doc.resolve(e),i=t.nodeAfter;return!!(i&&i.isAtom&&Ye.isSelectable(i))&&(bh(n,new Ye(t),"pointer"),!0)}(n,t))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Er&&this.mightDrag&&!this.mightDrag.node.isAtom||ar&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(bh(this.view,nt.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Il(this.view,"pointer")}move(e){this.updateAllowDefault(e),Il(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function p4(n,e){return!!n.composing||!!(Er&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500)&&(n.input.compositionEndedAt=-2e8,!0)}xr.touchstart=n=>{n.input.lastTouch=Date.now(),Y1(n),Il(n,"pointer")},xr.touchmove=n=>{n.input.lastTouch=Date.now(),Il(n,"pointer")},xr.contextmenu=n=>Y1(n);const kse=fs?5e3:-1;function m4(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>_b(n),e))}function g4(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=function Nse(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function _b(n,e=!1){if(!(fs&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),g4(n),e||n.docView&&n.docView.dirty){let t=j1(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}Ir.compositionstart=Ir.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(i=>!1===i.type.spec.inclusive)))n.markCursor=n.state.storedMarks||t.marks(),_b(n,!0),n.markCursor=null;else if(_b(n),hs&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let i=n.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&1==r.nodeType&&0!=o;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(3==s.nodeType){n.domSelection().collapse(s,s.nodeValue.length);break}r=s,o=-1}}n.input.composing=!0}m4(n,kse)},Ir.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionID++,m4(n,20))};const wh=Qr&&Tl<15||_h&&Poe<604;function mm(n,e,t,i,r){let o=o4(n,e,t,i,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,r,o||we.empty)))return!0;if(!o)return!1;let s=function Lse(n){return 0==n.openStart&&0==n.openEnd&&1==n.content.childCount?n.content.firstChild:null}(o),a=s?n.state.tr.replaceSelectionWith(s,n.input.shiftKey):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}xr.copy=Ir.cut=(n,e)=>{let t=e,i=n.state.selection,r="cut"==t.type;if(i.empty)return;let o=wh?null:t.clipboardData,s=i.content(),{dom:a,text:l}=r4(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function Pse(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(e),n.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Ir.paste=(n,e)=>{let t=e;if(n.composing&&!fs)return;let i=wh?null:t.clipboardData;i&&mm(n,i.getData("text/plain"),i.getData("text/html"),n.input.shiftKey,t)?t.preventDefault():function Rse(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,i=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{n.focus(),i.parentNode&&i.parentNode.removeChild(i),t?mm(n,i.value,null,n.input.shiftKey,e):mm(n,i.textContent,i.innerHTML,n.input.shiftKey,e)},50)}(n,t)};class Fse{constructor(e,t){this.slice=e,this.move=t}}const y4=Bo?"altKey":"ctrlKey";xr.dragstart=(n,e)=>{let t=e,i=n.input.mouseDown;if(i&&i.done(),!t.dataTransfer)return;let r=n.state.selection,o=r.empty?null:n.posAtCoords(yb(t));if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof Ye?r.to-1:r.to)))if(i&&i.mightDrag)n.dispatch(n.state.tr.setSelection(Ye.create(n.state.doc,i.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){let c=n.docView.nearestDesc(t.target,!0);c&&c.node.type.spec.draggable&&c!=n.docView&&n.dispatch(n.state.tr.setSelection(Ye.create(n.state.doc,c.posBefore)))}let s=n.state.selection.content(),{dom:a,text:l}=r4(n,s);t.dataTransfer.clearData(),t.dataTransfer.setData(wh?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",wh||t.dataTransfer.setData("text/plain",l),n.dragging=new Fse(s,!t[y4])},xr.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)},Ir.dragover=Ir.dragenter=(n,e)=>e.preventDefault(),Ir.drop=(n,e)=>{let t=e,i=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let r=n.posAtCoords(yb(t));if(!r)return;let o=n.state.doc.resolve(r.pos),s=i&&i.slice;s?n.someProp("transformPasted",p=>{s=p(s,n)}):s=o4(n,t.dataTransfer.getData(wh?"Text":"text/plain"),wh?null:t.dataTransfer.getData("text/html"),!1,o);let a=!(!i||t[y4]);if(n.someProp("handleDrop",p=>p(n,t,s||we.empty,a)))return void t.preventDefault();if(!s)return;t.preventDefault();let l=s?fj(n.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=n.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,h=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let f=c.doc.resolve(u);if(d&&Ye.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Ye(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,g,y,v)=>p=v),c.setSelection(V1(n,f,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},xr.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&La(n)},20))},xr.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},xr.beforeinput=(n,e)=>{if(ar&&fs&&"deleteContentBackward"==e.inputType){n.domObserver.flushSoon();let{domChangeCount:i}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=i||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,Qc(8,"Backspace")))))return;let{$cursor:r}=n.state.selection;r&&r.pos>0&&n.dispatch(n.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let n in Ir)xr[n]=Ir[n];function gm(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class q1{constructor(e,t){this.toDOM=e,this.spec=t||tu,this.side=this.spec.side||0}map(e,t,i,r){let{pos:o,deleted:s}=e.mapResult(t.from+r,this.side<0?-1:1);return s?null:new Ei(o-i,o-i,this)}valid(){return!0}eq(e){return this==e||e instanceof q1&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&gm(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ol{constructor(e,t){this.attrs=e,this.spec=t||tu}map(e,t,i,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-i,s=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new Ei(o,s,this)}valid(e,t){return t.from=e&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;se){let a=this.children[s]+1;this.children[s+2].findInner(e-a,t-a,i,r+a,o)}}map(e,t,i){return this==lr||0==e.maps.length?this:this.mapInner(e,t,0,0,i||tu)}mapInner(e,t,i,r,o){let s;for(let a=0;a{let g=m-p-(f-h);for(let y=0;yv+u-d)continue;let w=a[y]+u-d;f>=w?a[y+1]=h<=w?-2:-1:p>=r&&g&&(a[y]+=g,a[y+1]+=g)}d+=g}),u=t.maps[c].map(u,-1)}let l=!1;for(let c=0;c=i.content.size){l=!0;continue}let f=t.map(n[c+1]+o,-1)-r,{index:p,offset:m}=i.content.findIndex(d),g=i.maybeChild(p);if(g&&m==d&&m+g.nodeSize==f){let y=a[c+2].mapInner(t,g,u+1,n[c]+o+1,s);y!=lr?(a[c]=d,a[c+1]=f,a[c+2]=y):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=function zse(n,e,t,i,r,o,s){function a(l,c){for(let u=0;u{let u,c=l+i;if(u=v4(t,a,c)){for(r||(r=this.children.slice());oa&&d.to=e){this.children[a]==e&&(i=this.children[a+2]);break}let o=e+1,s=o+t.content.size;for(let a=0;ao&&l.type instanceof Ol){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;cr.map(e,t,tu));return Al.from(i)}forChild(e,t){if(t.isLeaf)return Ln.empty;let i=[];for(let r=0;rt instanceof Ln)?e:e.reduce((t,i)=>t.concat(i instanceof Ln?i:i.members),[]))}}}function _4(n,e){if(!e||!n.length)return n;let t=[];for(let i=0;it&&s.to{let c=v4(n,a,l+t);if(c){o=!0;let u=vb(c,a,t+l+1,i);u!=lr&&r.push(l,l+a.nodeSize,u)}});let s=_4(o?b4(n):n,-t).sort(nu);for(let a=0;a0;)e++;n.splice(e,0,t)}function Z1(n){let e=[];return n.someProp("decorations",t=>{let i=t(n.state);i&&i!=lr&&e.push(i)}),n.cursorWrapper&&e.push(Ln.create(n.state.doc,[n.cursorWrapper.deco])),Al.from(e)}const Vse={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Bse=Qr&&Tl<=11;class Use{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Hse{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Use,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let r=0;r"childList"==r.type&&r.removedNodes.length||"characterData"==r.type&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),Bse&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Vse)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(q3(this.view)){if(this.suppressingSelectionUpdates)return La(this.view);if(Qr&&Tl<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Kc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let i,t=new Set;for(let o=e.focusNode;o;o=cm(o))t.add(o);for(let o=e.anchorNode;o;o=cm(o))if(t.has(o)){i=o;break}let r=i&&this.view.docView.nearestDesc(i);return r&&r.ignoreMutation({type:"selection",target:3==i.nodeType?i.parentNode:i})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let i=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&q3(e)&&!this.ignoreSelectionChange(i),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let u=0;u1){let u=l.filter(d=>"BR"==d.nodeName);if(2==u.length){let d=u[0],h=u[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let c=null;o<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||r)&&(o>-1&&(e.docView.markDirty(o,s),function $se(n){if(!C4.has(n)&&(C4.set(n,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace))){if(n.requiresGeckoHackNode=hs,D4)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),D4=!0}}(e)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(i)||La(e),this.currentSelection.set(i))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let i=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(i==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!i||i.ignoreMutation(e))return null;if("childList"==e.type){for(let u=0;ue.content.size?null:V1(n,e.resolve(t.anchor),e.resolve(t.head))}function J1(n,e,t){let i=n.depth,r=e?n.end():n.pos;for(;i>0&&(e||n.indexAfter(i)==n.node(i).childCount);)i--,r++,e=!1;if(t){let o=n.node(i).maybeChild(n.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,r++}return r}class Xse{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new vse,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(I4),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=E4(this),S4(this),this.nodeViews=x4(this),this.docView=R3(this.state.doc,T4(this),Z1(this),this.dom,this),this.domObserver=new Hse(this,(i,r,o,s)=>function Kse(n,e,t,i,r){if(e<0){let K=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,Ne=j1(n,K);if(Ne&&!n.state.selection.eq(Ne)){if(ar&&fs&&13===n.input.lastKeyCode&&Date.now()-100pt(n,Qc(13,"Enter"))))return;let He=n.state.tr.setSelection(Ne);"pointer"==K?He.setMeta("pointer",!0):"key"==K&&He.scrollIntoView(),n.composing&&He.setMeta("composition",n.input.compositionID),n.dispatch(He)}return}let o=n.state.doc.resolve(e),s=o.sharedDepth(t);e=o.before(s+1),t=n.state.doc.resolve(t).after(s+1);let d,h,a=n.state.selection,l=function Gse(n,e,t){let c,{node:i,fromOffset:r,toOffset:o,from:s,to:a}=n.docView.parseRange(e,t),l=n.domSelectionRange(),u=l.anchorNode;if(u&&n.dom.contains(1==u.nodeType?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],fb(l)||c.push({node:l.focusNode,offset:l.focusOffset})),ar&&8===n.input.lastKeyCode)for(let g=o;g>r;g--){let y=i.childNodes[g-1],v=y.pmViewDesc;if("BR"==y.nodeName&&!v){o=g;break}if(!v||v.size)break}let d=n.state.doc,h=n.someProp("domParser")||oh.fromSchema(n.state.schema),f=d.resolve(s),p=null,m=h.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:r,to:o,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:c,ruleFromNode:Yse,context:f});if(c&&null!=c[0].pos){let g=c[0].pos,y=c[1]&&c[1].pos;null==y&&(y=g),p={anchor:g+s,head:y+s}}return{doc:m,sel:p,from:s,to:a}}(n,e,t),c=n.state.doc,u=c.slice(l.from,l.to);8===n.input.lastKeyCode&&Date.now()-100=s?o-i:0,a=o+(a-s),s=o):a=a?o-i:0,s=o+(s-a),a=o),{start:o,endA:s,endB:a}}(u.content,l.doc.content,l.from,d,h);if((_h&&n.input.lastIOSEnter>Date.now()-225||fs)&&r.some(K=>1==K.nodeType&&!qse.test(K.nodeName))&&(!f||f.endA>=f.endB)&&n.someProp("handleKeyDown",K=>K(n,Qc(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(!f){if(!(i&&a instanceof it&&!a.empty&&a.$head.sameParent(a.$anchor))||n.composing||l.sel&&l.sel.anchor!=l.sel.head){if(l.sel){let K=M4(n,n.state.doc,l.sel);if(K&&!K.eq(n.state.selection)){let Ne=n.state.tr.setSelection(K);n.composing&&Ne.setMeta("composition",n.input.compositionID),n.dispatch(Ne)}}return}f={start:a.from,endA:a.to,endB:a.to}}if(ar&&n.cursorWrapper&&l.sel&&l.sel.anchor==n.cursorWrapper.deco.from&&l.sel.head==l.sel.anchor){let K=f.endB-f.start;l.sel={anchor:l.sel.anchor+K,head:l.sel.anchor+K}}n.input.domChangeCount++,n.state.selection.fromn.state.selection.from&&f.start<=n.state.selection.from+2&&n.state.selection.from>=l.from?f.start=n.state.selection.from:f.endA=n.state.selection.to-2&&n.state.selection.to<=l.to&&(f.endB+=n.state.selection.to-f.endA,f.endA=n.state.selection.to)),Qr&&Tl<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>l.from&&" \xa0"==l.doc.textBetween(f.start-l.from-1,f.start-l.from+1)&&(f.start--,f.endA--,f.endB--);let v,p=l.doc.resolveNoCache(f.start-l.from),m=l.doc.resolveNoCache(f.endB-l.from),g=c.resolve(f.start),y=p.sameParent(m)&&p.parent.inlineContent&&g.end()>=f.endA;if((_h&&n.input.lastIOSEnter>Date.now()-225&&(!y||r.some(K=>"DIV"==K.nodeName||"P"==K.nodeName))||!y&&p.posK(n,Qc(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(n.state.selection.anchor>f.start&&function Zse(n,e,t,i,r){if(!i.parent.isTextblock||t-e<=r.pos-i.pos||J1(i,!0,!1)t||J1(s,!0,!1)K(n,Qc(8,"Backspace"))))return void(fs&&ar&&n.domObserver.suppressSelectionUpdates());ar&&fs&&f.endB==f.start&&(n.input.lastAndroidDelete=Date.now()),fs&&!y&&p.start()!=m.start()&&0==m.parentOffset&&p.depth==m.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==f.endA&&(f.endB-=2,m=l.doc.resolveNoCache(f.endB-l.from),setTimeout(()=>{n.someProp("handleKeyDown",function(K){return K(n,Qc(13,"Enter"))})},20));let N,T,ne,w=f.start,_=f.endA;if(y)if(p.pos==m.pos)Qr&&Tl<=11&&0==p.parentOffset&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>La(n),20)),N=n.state.tr.delete(w,_),T=c.resolve(f.start).marksAcross(c.resolve(f.endA));else if(f.endA==f.endB&&(ne=function Qse(n,e){let s,a,l,t=n.firstChild.marks,i=e.firstChild.marks,r=t,o=i;for(let u=0;uu.mark(a.addToSet(u.marks));else{if(0!=r.length||1!=o.length)return null;a=o[0],s="remove",l=u=>u.mark(a.removeFromSet(u.marks))}let c=[];for(let u=0;uNe(n,w,_,K)))return;N=n.state.tr.insertText(K,w,_)}if(N||(N=n.state.tr.replace(w,_,l.doc.slice(f.start-l.from,f.endB-l.from))),l.sel){let K=M4(n,N.doc,l.sel);K&&!(ar&&fs&&n.composing&&K.empty&&(f.start!=f.endB||n.input.lastAndroidDelete{Cse(n,i)&&!W1(n,i)&&(n.editable||!(i.type in Ir))&&t(n,i)},_se[e]?{passive:!0}:void 0)}Er&&n.dom.addEventListener("input",()=>null),$1(n)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&$1(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(I4),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let i in this._props)t[i]=this._props[i];t.state=this.state;for(let i in e)t[i]=e[i];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let i=this.state,r=!1,o=!1;e.storedMarks&&this.composing&&(g4(this),o=!0),this.state=e;let s=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(s||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=x4(this);(function tae(n,e){let t=0,i=0;for(let r in n){if(n[r]!=e[r])return!0;t++}for(let r in e)i++;return t!=i})(h,this.nodeViews)&&(this.nodeViews=h,r=!0)}(s||t.handleDOMEvents!=this._props.handleDOMEvents)&&$1(this),this.editable=E4(this),S4(this);let a=Z1(this),l=T4(this),c=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",u=r||!this.docView.matchesNode(e.doc,l,a);(u||!e.selection.eq(i.selection))&&(o=!0);let d="preserve"==c&&o&&null==this.dom.style.overflowAnchor&&function Foe(n){let i,r,e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top);for(let o=(e.left+e.right)/2,s=t+1;s=t-20){i=a,r=l.top;break}}return{refDOM:i,refTop:r,stack:M3(n.dom)}}(this);if(o){this.domObserver.stop();let h=u&&(Qr||ar)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&function eae(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}(i.selection,e.selection);if(u){let f=ar?this.trackWrites=this.domSelectionRange().focusNode:null;(r||!this.docView.update(e.doc,l,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=R3(e.doc,l,a,this.dom,this)),f&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function lse(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Kc(e.node,e.offset,t.anchorNode,t.anchorOffset)}(this))?La(this,h):(G3(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():d&&function joe({refDOM:n,refTop:e,stack:t}){let i=n?n.getBoundingClientRect().top:0;T3(t,0==i?0:i-e)}(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Ye){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&D3(this,t.getBoundingClientRect(),e)}else D3(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;tt.ownerDocument.getSelection()),this._root=t;return e||document}posAtCoords(e){return $oe(this,e)}coordsAtPos(e,t=1){return I3(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,i=-1){let r=this.docView.posFromDOM(e,t,i);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function Koe(n,e,t){return A3==e&&k3==t?N3:(A3=e,k3=t,N3="up"==t||"down"==t?function Goe(n,e,t){let i=e.selection,r="up"==t?i.$from:i.$to;return O3(n,e,()=>{let{node:o}=n.docView.domFromPos(r.pos,"up"==t?-1:1);for(;;){let a=n.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=I3(n,r.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(1==a.nodeType)l=a.getClientRects();else{if(3!=a.nodeType)continue;l=Pa(a,0,a.nodeValue.length).getClientRects()}for(let c=0;cu.top+1&&("up"==t?s.top-u.top>2*(u.bottom-s.top):u.bottom-s.bottom>2*(s.bottom-u.top)))return!1}}return!0})}(n,e,t):function qoe(n,e,t){let{$head:i}=e.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=!r,s=r==i.parent.content.size,a=n.domSelection();return Yoe.test(i.parent.textContent)&&a.modify?O3(n,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",t,"character");let f=i.depth?n.docView.domAfterPos(i.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),g=p&&!f.contains(1==p.nodeType?p:p.parentNode)||l==p&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return null!=h&&(a.caretBidiLevel=h),g}):"left"==t||"backward"==t?o:s}(n,e,t))}(this,t||this.state,e)}pasteHTML(e,t){return mm(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return mm(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(function wse(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Z1(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function Dse(n,e){!W1(n,e)&&xr[e.type]&&(n.editable||!(e.type in Ir))&&xr[e.type](n,e)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return Er&&11===this.root.nodeType&&function Ooe(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom?function Wse(n){let e;function t(l){l.preventDefault(),l.stopImmediatePropagation(),e=l.getTargetRanges()[0]}n.dom.addEventListener("beforeinput",t,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",t,!0);let i=e.startContainer,r=e.startOffset,o=e.endContainer,s=e.endOffset,a=n.domAtPos(n.state.selection.anchor);return Kc(a.node,a.offset,o,s)&&([i,r,o,s]=[o,s,i,r]),{anchorNode:i,anchorOffset:r,focusNode:o,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function T4(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if("function"==typeof t&&(t=t(n.state)),t)for(let i in t)"class"==i?e.class+=" "+t[i]:"style"==i?e.style=(e.style?e.style+";":"")+t[i]:!e[i]&&"contenteditable"!=i&&"nodeName"!=i&&(e[i]=String(t[i]))}),e.translate||(e.translate="no"),[Ei.node(0,n.state.doc.content.size,e)]}function S4(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:Ei.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function E4(n){return!n.someProp("editable",e=>!1===e(n.state))}function x4(n){let e=Object.create(null);function t(i){for(let r in i)Object.prototype.hasOwnProperty.call(e,r)||(e[r]=i[r])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function I4(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var kl={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},bb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},nae=typeof navigator<"u"&&/Mac/.test(navigator.platform),iae=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Hi=0;Hi<10;Hi++)kl[48+Hi]=kl[96+Hi]=String(Hi);for(Hi=1;Hi<=24;Hi++)kl[Hi+111]="F"+Hi;for(Hi=65;Hi<=90;Hi++)kl[Hi]=String.fromCharCode(Hi+32),bb[Hi]=String.fromCharCode(Hi);for(var X1 in kl)bb.hasOwnProperty(X1)||(bb[X1]=kl[X1]);const oae=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function sae(n){let i,r,o,s,e=n.split(/-(?!$)/),t=e[e.length-1];"Space"==t&&(t=" ");for(let a=0;a127)&&(o=kl[i.keyCode])&&o!=r){let a=e[eS(o,i)];if(a&&a(t.state,t.dispatch,t))return!0}}return!1}}const nS=(n,e)=>!n.selection.empty&&(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);const A4=(n,e,t)=>{let i=function O4(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}(n,t);if(!i)return!1;let r=iS(i);if(!r){let s=i.blockRange(),a=s&&lh(s);return null!=a&&(e&&e(n.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(!o.type.spec.isolating&&U4(n,r,e))return!0;if(0==i.parent.content.size&&(Dh(o,"end")||Ye.isSelectable(o))){let s=o1(n.doc,i.before(),i.after(),we.empty);if(s&&s.slice.size{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):i.parentOffset>0)return!1;o=iS(i)}let s=o&&o.nodeBefore;return!(!s||!Ye.isSelectable(s)||(e&&e(n.tr.setSelection(Ye.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),0))};function iS(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}const L4=(n,e,t)=>{let i=function P4(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):i.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let{$head:t,$anchor:i}=n.selection;return!(!t.parent.type.spec.code||!t.sameParent(i)||(e&&e(n.tr.insertText("\n").scrollIntoView()),0))};function oS(n){for(let e=0;e{let{$head:t,$anchor:i}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(i))return!1;let r=t.node(-1),o=t.indexAfter(-1),s=oS(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(e){let a=t.after(),l=n.tr.replaceWith(a,a,s.createAndFill());l.setSelection(nt.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},z4=(n,e)=>{let t=n.selection,{$from:i,$to:r}=t;if(t instanceof yo||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=oS(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!i.parentOffset&&r.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let o=t.before();if(ka(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let i=t.blockRange(),r=i&&lh(i);return null!=r&&(e&&e(n.tr.lift(i,r).scrollIntoView()),!0)},B4=function hae(n){return(e,t)=>{let{$from:i,$to:r}=e.selection;if(e.selection instanceof Ye&&e.selection.node.isBlock)return!(!i.parentOffset||!ka(e.doc,i.pos)||(t&&t(e.tr.split(i.pos).scrollIntoView()),0));if(!i.parent.isBlock)return!1;if(t){let o=r.parentOffset==r.parent.content.size,s=e.tr;(e.selection instanceof it||e.selection instanceof yo)&&s.deleteSelection();let a=0==i.depth?null:oS(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=n&&n(r.parent,o),c=l?[l]:o&&a?[{type:a}]:void 0,u=ka(s.doc,s.mapping.map(i.pos),1,c);if(!c&&!u&&ka(s.doc,s.mapping.map(i.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(i.pos),1,c),!o&&!i.parentOffset&&i.parent.type!=a)){let d=s.mapping.map(i.before()),h=s.doc.resolve(d);a&&i.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&s.setNodeMarkup(s.mapping.map(i.before()),a)}t(s.scrollIntoView())}return!0}}();function U4(n,e,t){let o,s,i=e.nodeBefore,r=e.nodeAfter;if(i.type.spec.isolating||r.type.spec.isolating)return!1;if(function mae(n,e,t){let i=e.nodeBefore,r=e.nodeAfter,o=e.index();return!(!(i&&r&&i.type.compatibleContent(r.type))||(!i.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-i.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(o,o+1)||!r.isTextblock&&!vl(n.doc,e.pos)||(t&&t(n.tr.clearIncompatible(e.pos,i.type,i.contentMatchAt(i.childCount)).join(e.pos).scrollIntoView()),0)))}(n,e,t))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(r.type))&&s.matchType(o[0]||r.type).validEnd){if(t){let d=e.pos+r.nodeSize,h=le.empty;for(let m=o.length-1;m>=0;m--)h=le.from(o[m].create(null,h));h=le.from(i.copy(h));let f=n.tr.step(new Ni(e.pos-1,d,e.pos,d,new we(h,1,0),o.length,!0)),p=d+2*o.length;vl(f.doc,p)&&f.join(p),t(f.scrollIntoView())}return!0}let l=nt.findFrom(e,1),c=l&&l.$from.blockRange(l.$to),u=c&&lh(c);if(null!=u&&u>=e.depth)return t&&t(n.tr.lift(c,u).scrollIntoView()),!0;if(a&&Dh(r,"start",!0)&&Dh(i,"end")){let d=i,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let f=r,p=1;for(;!f.isTextblock;f=f.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,f.content)){if(t){let m=le.empty;for(let y=h.length-1;y>=0;y--)m=le.from(h[y].copy(m));t(n.tr.step(new Ni(e.pos-h.length,e.pos+r.nodeSize,e.pos+p,e.pos+r.nodeSize-p,new we(m,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function H4(n){return function(e,t){let i=e.selection,r=n<0?i.$from:i.$to,o=r.depth;for(;r.node(o).isInline;){if(!o)return!1;o--}return!!r.node(o).isTextblock&&(t&&t(e.tr.setSelection(it.create(e.doc,n<0?r.start(o):r.end(o)))),!0)}}const $4=H4(-1),W4=H4(1);function G4(n,e=null){return function(t,i){let r=!1;for(let o=0;o{if(r)return!1;if(l.isTextblock&&!l.hasMarkup(n,e))if(l.type==n)r=!0;else{let u=t.doc.resolve(c),d=u.index();r=u.parent.canReplaceWith(d,d+1,n)}})}if(!r)return!1;if(i){let o=t.tr;for(let s=0;s(e&&e(n.tr.setSelection(new yo(n.doc))),!0)},vae={"Ctrl-h":Nl.Backspace,"Alt-Backspace":Nl["Mod-Backspace"],"Ctrl-d":Nl.Delete,"Ctrl-Alt-Backspace":Nl["Mod-Delete"],"Alt-Delete":Nl["Mod-Delete"],"Alt-d":Nl["Mod-Delete"],"Ctrl-a":$4,"Ctrl-e":W4};for(let n in Nl)vae[n]=Nl[n];function wb(n){const{state:e,transaction:t}=n;let{selection:i}=t,{doc:r}=t,{storedMarks:o}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),filterTransaction:e.filterTransaction,plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=t.selection,r=t.doc,o=t.storedMarks,t}}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform();class Cb{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:i}=this,{view:r}=t,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>{const d=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!e,c=e||o.tr,d={...Object.fromEntries(Object.entries(i).map(([h,f])=>[h,(...m)=>{const g=this.buildProps(c,t),y=f(...m)(g);return a.push(y),d}])),run:()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(h=>!0===h))};return d}createCan(e){const{rawCommands:t,state:i}=this,o=e||i.tr,s=this.buildProps(o,!1);return{...Object.fromEntries(Object.entries(t).map(([l,c])=>[l,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,!1)}}buildProps(e,t=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r;o.storedMarks&&e.setStoredMarks(o.storedMarks);const a={tr:e,editor:r,view:s,state:wb({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(i).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class kae{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const i=this.callbacks[e];return i&&i.forEach(r=>r.apply(this,t)),this}off(e,t){const i=this.callbacks[e];return i&&(t?this.callbacks[e]=i.filter(r=>r!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function Ve(n,e,t){return void 0===n.config[e]&&n.parent?Ve(n.parent,e,t):"function"==typeof n.config[e]?n.config[e].bind({...t,parent:n.parent?Ve(n.parent,e,t):null}):n.config[e]}function Db(n){return{baseExtensions:n.filter(r=>"extension"===r.type),nodeExtensions:n.filter(r=>"node"===r.type),markExtensions:n.filter(r=>"mark"===r.type)}}function q4(n){const e=[],{nodeExtensions:t,markExtensions:i}=Db(n),r=[...t,...i],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(s=>{const l=Ve(s,"addGlobalAttributes",{name:s.name,options:s.options,storage:s.storage});l&&l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([h,f])=>{e.push({type:d,name:h,attribute:{...o,...f}})})})})}),r.forEach(s=>{const l=Ve(s,"addAttributes",{name:s.name,options:s.options,storage:s.storage});if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const h={...o,...d};"function"==typeof h?.default&&(h.default=h.default()),h?.isRequired&&void 0===h?.default&&delete h.default,e.push({type:s.name,name:u,attribute:h})})}),e}function Pi(n,e){if("string"==typeof n){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function Xt(...n){return n.filter(e=>!!e).reduce((e,t)=>{const i={...e};return Object.entries(t).forEach(([r,o])=>{i[r]=i[r]?"class"===r?[i[r],o].join(" "):"style"===r?[i[r],o].join("; "):o:o}),i},{})}function cS(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,i)=>Xt(t,i),{})}function K4(n){return"function"==typeof n}function bt(n,e,...t){return K4(n)?e?n.bind(e)(...t):n(...t):n}function Q4(n,e){return n.style?n:{...n,getAttrs:t=>{const i=n.getAttrs?n.getAttrs(t):n.attrs;if(!1===i)return!1;const r=e.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(t):function Pae(n){return"string"!=typeof n?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):"true"===n||"false"!==n&&n}(t.getAttribute(s.name));return null==a?o:{...o,[s.name]:a}},{});return{...i,...r}}}}function Z4(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>("attrs"!==e||!function Nae(n={}){return 0===Object.keys(n).length&&n.constructor===Object}(t))&&null!=t))}function uS(n,e){return e.nodes[n]||e.marks[n]||null}function X4(n,e){return Array.isArray(e)?e.some(t=>("string"==typeof t?t:t.name)===n.name):e}function dS(n){return"[object RegExp]"===Object.prototype.toString.call(n)}class ym{constructor(e){this.find=e.find,this.handler=e.handler}}function hS(n){var e;const{editor:t,from:i,to:r,text:o,rules:s,plugin:a}=n,{view:l}=t;if(l.composing)return!1;const c=l.state.doc.resolve(i);if(c.parent.type.spec.code||null!==(e=c.nodeBefore||c.nodeAfter)&&void 0!==e&&e.marks.find(h=>h.type.spec.code))return!1;let u=!1;const d=((n,e=500)=>{let t="";const i=n.parentOffset;return n.parent.nodesBetween(Math.max(0,i-e),i,(r,o,s,a)=>{var l,c;const u=(null===(c=(l=r.type.spec).toText)||void 0===c?void 0:c.call(l,{node:r,pos:o,parent:s,index:a}))||r.textContent||"%leaf%";t+=u.slice(0,Math.max(0,i-o))}),t})(c)+o;return s.forEach(h=>{if(u)return;const f=((n,e)=>{if(dS(e))return e.exec(n);const t=e(n);if(!t)return null;const i=[t.text];return i.index=t.index,i.input=n,i.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(t.replaceWith)),i})(d,h.find);if(!f)return;const p=l.state.tr,m=wb({state:l.state,transaction:p}),g={from:i-(f[0].length-o.length),to:r},{commands:y,chain:v,can:w}=new Cb({editor:t,state:m});null===h.handler({state:m,range:g,match:f,commands:y,chain:v,can:w})||!p.steps.length||(p.setMeta(a,{transform:p,from:i,to:r,text:o}),l.dispatch(p),u=!0)}),u}function Fae(n){const{editor:e,rules:t}=n,i=new $t({state:{init:()=>null,apply:(r,o)=>r.getMeta(i)||(r.selectionSet||r.docChanged?null:o)},props:{handleTextInput:(r,o,s,a)=>hS({editor:e,from:o,to:s,text:a,rules:t,plugin:i}),handleDOMEvents:{compositionend:r=>(setTimeout(()=>{const{$cursor:o}=r.state.selection;o&&hS({editor:e,from:o.pos,to:o.pos,text:"",rules:t,plugin:i})}),!1)},handleKeyDown(r,o){if("Enter"!==o.key)return!1;const{$cursor:s}=r.state.selection;return!!s&&hS({editor:e,from:s.pos,to:s.pos,text:"\n",rules:t,plugin:i})}},isInputRules:!0});return i}class fS{constructor(e){this.find=e.find,this.handler=e.handler}}function Bae(n){const{editor:e,rules:t}=n;let i=null,r=!1,o=!1;return t.map(a=>new $t({view(l){const c=u=>{var d;i=null!==(d=l.dom.parentElement)&&void 0!==d&&d.contains(u.target)?l.dom.parentElement:null};return window.addEventListener("dragstart",c),{destroy(){window.removeEventListener("dragstart",c)}}},props:{handleDOMEvents:{drop:l=>(o=i===l.dom.parentElement,!1),paste:(l,c)=>{var u;const d=null===(u=c.clipboardData)||void 0===u?void 0:u.getData("text/html");return r=!!d?.includes("data-pm-slice"),!1}}},appendTransaction:(l,c,u)=>{const d=l[0],h="paste"===d.getMeta("uiEvent")&&!r,f="drop"===d.getMeta("uiEvent")&&!o;if(!h&&!f)return;const p=c.doc.content.findDiffStart(u.doc.content),m=c.doc.content.findDiffEnd(u.doc.content);if(!function jae(n){return"number"==typeof n}(p)||!m||p===m.b)return;const g=u.tr,y=wb({state:u,transaction:g});return function Vae(n){const{editor:e,state:t,from:i,to:r,rule:o}=n,{commands:s,chain:a,can:l}=new Cb({editor:e,state:t}),c=[];return t.doc.nodesBetween(i,r,(d,h)=>{if(!d.isTextblock||d.type.spec.code)return;const f=Math.max(i,h),p=Math.min(r,h+d.content.size);((n,e)=>{if(dS(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(i=>{const r=[i.text];return r.index=i.index,r.input=n,r.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),r.push(i.replaceWith)),r}):[]})(d.textBetween(f-h,p-h,void 0,"\ufffc"),o.find).forEach(y=>{if(void 0===y.index)return;const v=f+y.index+1,w=v+y[0].length,_={from:t.tr.mapping.map(v),to:t.tr.mapping.map(w)},N=o.handler({state:t,range:_,match:y,commands:s,chain:a,can:l});c.push(N)})}),c.every(d=>null!==d)}({editor:e,state:y,from:Math.max(p-1,0),to:m.b-1,rule:a})&&g.steps.length?g:void 0}}))}class iu{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=iu.resolve(e),this.schema=function J4(n,e){var t;const i=q4(n),{nodeExtensions:r,markExtensions:o}=Db(n),s=null===(t=r.find(c=>Ve(c,"topNode")))||void 0===t?void 0:t.name,a=Object.fromEntries(r.map(c=>{const u=i.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=Z4({...n.reduce((y,v)=>{const w=Ve(v,"extendNodeSchema",d);return{...y,...w?w(c):{}}},{}),content:bt(Ve(c,"content",d)),marks:bt(Ve(c,"marks",d)),group:bt(Ve(c,"group",d)),inline:bt(Ve(c,"inline",d)),atom:bt(Ve(c,"atom",d)),selectable:bt(Ve(c,"selectable",d)),draggable:bt(Ve(c,"draggable",d)),code:bt(Ve(c,"code",d)),defining:bt(Ve(c,"defining",d)),isolating:bt(Ve(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var v;return[y.name,{default:null===(v=y?.attribute)||void 0===v?void 0:v.default}]}))}),p=bt(Ve(c,"parseHTML",d));p&&(f.parseDOM=p.map(y=>Q4(y,u)));const m=Ve(c,"renderHTML",d);m&&(f.toDOM=y=>m({node:y,HTMLAttributes:cS(y,u)}));const g=Ve(c,"renderText",d);return g&&(f.toText=g),[c.name,f]})),l=Object.fromEntries(o.map(c=>{const u=i.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=Z4({...n.reduce((g,y)=>{const v=Ve(y,"extendMarkSchema",d);return{...g,...v?v(c):{}}},{}),inclusive:bt(Ve(c,"inclusive",d)),excludes:bt(Ve(c,"excludes",d)),group:bt(Ve(c,"group",d)),spanning:bt(Ve(c,"spanning",d)),code:bt(Ve(c,"code",d)),attrs:Object.fromEntries(u.map(g=>{var y;return[g.name,{default:null===(y=g?.attribute)||void 0===y?void 0:y.default}]}))}),p=bt(Ve(c,"parseHTML",d));p&&(f.parseDOM=p.map(g=>Q4(g,u)));const m=Ve(c,"renderHTML",d);return m&&(f.toDOM=g=>m({mark:g,HTMLAttributes:cS(g,u)})),[c.name,f]}));return new yie({topNode:s,nodes:a,marks:l})}(this.extensions,t),this.extensions.forEach(i=>{var r;this.editor.extensionStorage[i.name]=i.storage;const o={name:i.name,options:i.options,storage:i.storage,editor:this.editor,type:uS(i.name,this.schema)};"mark"===i.type&&(null===(r=bt(Ve(i,"keepOnSplit",o)))||void 0===r||r)&&this.splittableMarks.push(i.name);const s=Ve(i,"onBeforeCreate",o);s&&this.editor.on("beforeCreate",s);const a=Ve(i,"onCreate",o);a&&this.editor.on("create",a);const l=Ve(i,"onUpdate",o);l&&this.editor.on("update",l);const c=Ve(i,"onSelectionUpdate",o);c&&this.editor.on("selectionUpdate",c);const u=Ve(i,"onTransaction",o);u&&this.editor.on("transaction",u);const d=Ve(i,"onFocus",o);d&&this.editor.on("focus",d);const h=Ve(i,"onBlur",o);h&&this.editor.on("blur",h);const f=Ve(i,"onDestroy",o);f&&this.editor.on("destroy",f)})}static resolve(e){const t=iu.sort(iu.flatten(e)),i=function Uae(n){const e=n.filter((t,i)=>n.indexOf(t)!==i);return[...new Set(e)]}(t.map(r=>r.name));return i.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${i.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r=Ve(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return r?[t,...this.flatten(r())]:t}).flat(10)}static sort(e){return e.sort((i,r)=>{const o=Ve(i,"priority")||100,s=Ve(r,"priority")||100;return o>s?-1:o{const r=Ve(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:uS(t.name,this.schema)});return r?{...e,...r()}:e},{})}get plugins(){const{editor:e}=this,t=iu.sort([...this.extensions].reverse()),i=[],r=[],o=t.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:uS(s.name,this.schema)},l=[],c=Ve(s,"addKeyboardShortcuts",a);let u={};if("mark"===s.type&&s.config.exitable&&(u.ArrowRight=()=>Or.handleExit({editor:e,mark:s})),c){const m=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:e})]));u={...u,...m}}const d=function lae(n){return new $t({props:{handleKeyDown:tS(n)}})}(u);l.push(d);const h=Ve(s,"addInputRules",a);X4(s,e.options.enableInputRules)&&h&&i.push(...h());const f=Ve(s,"addPasteRules",a);X4(s,e.options.enablePasteRules)&&f&&r.push(...f());const p=Ve(s,"addProseMirrorPlugins",a);if(p){const m=p();l.push(...m)}return l}).flat();return[Fae({editor:e,rules:i}),...Bae({editor:e,rules:r}),...o]}get attributes(){return q4(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Db(this.extensions);return Object.fromEntries(t.filter(i=>!!Ve(i,"addNodeView")).map(i=>{const r=this.attributes.filter(l=>l.type===i.name),o={name:i.name,options:i.options,storage:i.storage,editor:e,type:Pi(i.name,this.schema)},s=Ve(i,"addNodeView",o);return s?[i.name,(l,c,u,d)=>{const h=cS(l,r);return s()({editor:e,node:l,getPos:u,decorations:d,HTMLAttributes:h,extension:i})}]:[]}))}}function pS(n){return"Object"===function Hae(n){return Object.prototype.toString.call(n).slice(8,-1)}(n)&&n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Mb(n,e){const t={...n};return pS(n)&&pS(e)&&Object.keys(e).forEach(i=>{pS(e[i])?i in n?t[i]=Mb(n[i],e[i]):Object.assign(t,{[i]:e[i]}):Object.assign(t,{[i]:e[i]})}),t}class vn{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=bt(Ve(this,"addOptions",{name:this.name}))),this.storage=bt(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new vn(e)}configure(e={}){const t=this.extend();return t.options=Mb(this.options,e),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new vn(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=bt(Ve(t,"addOptions",{name:t.name})),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}}function e5(n,e,t){const{from:i,to:r}=e,{blockSeparator:o="\n\n",textSerializers:s={}}=t||{};let a="",l=!0;return n.nodesBetween(i,r,(c,u,d,h)=>{var f;const p=s?.[c.type.name];p?(c.isBlock&&!l&&(a+=o,l=!0),d&&(a+=p({node:c,pos:u,parent:d,index:h,range:e}))):c.isText?(a+=null===(f=c?.text)||void 0===f?void 0:f.slice(Math.max(i,u)-u,r-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}function mS(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const $ae=vn.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new $t({key:new rn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:i,selection:r}=e,{ranges:o}=r;return e5(i,{from:Math.min(...o.map(u=>u.$from.pos)),to:Math.max(...o.map(u=>u.$to.pos))},{textSerializers:mS(t)})}}})]}});function Tb(n,e,t={strict:!0}){const i=Object.keys(e);return!i.length||i.every(r=>t.strict?e[r]===n[r]:dS(e[r])?e[r].test(n[r]):e[r]===n[r])}function gS(n,e,t={}){return n.find(i=>i.type===e&&Tb(i.attrs,t))}function nle(n,e,t={}){return!!gS(n,e,t)}function yS(n,e,t={}){if(!n||!e)return;let i=n.parent.childAfter(n.parentOffset);if(n.parentOffset===i.offset&&0!==i.offset&&(i=n.parent.childBefore(n.parentOffset)),!i.node)return;const r=gS([...i.node.marks],e,t);if(!r)return;let o=i.index,s=n.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(gS([...i.node.marks],e,t);o>0&&r.isInSet(n.parent.child(o-1).marks);)o-=1,s-=n.parent.child(o).nodeSize;for(;a${n}`;return(new window.DOMParser).parseFromString(e,"text/html").body}function xb(n,e,t){if(t={slice:!0,parseOptions:{},...t},"object"==typeof n&&null!==n)try{return Array.isArray(n)&&n.length>0?le.fromArray(n.map(i=>e.nodeFromJSON(i))):e.nodeFromJSON(n)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),xb("",e,t)}if("string"==typeof n){const i=oh.fromSchema(e);return t.slice?i.parseSlice(_S(n),t.parseOptions).content:i.parse(_S(n),t.parseOptions)}return xb("",e,t)}function n5(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)}function _m(n,e,t={}){const{from:i,to:r,empty:o}=n.selection,s=e?Pi(e,n.schema):null,a=[];n.doc.nodesBetween(i,r,(d,h)=>{if(d.isText)return;const f=Math.max(i,h),p=Math.min(r,h+d.nodeSize);a.push({node:d,from:f,to:p})});const l=r-i,c=a.filter(d=>!s||s.name===d.node.type.name).filter(d=>Tb(d.node.attrs,t,{strict:!1}));return o?!!c.length:c.reduce((d,h)=>d+h.to-h.from,0)>=l}function Ib(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function r5(n,e){const t="string"==typeof e?[e]:e;return Object.keys(n).reduce((i,r)=>(t.includes(r)||(i[r]=n[r]),i),{})}function o5(n,e,t={}){return xb(n,e,{slice:!1,parseOptions:t})}function s5(n,e){for(let t=n.depth;t>0;t-=1){const i=n.node(t);if(e(i))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:i}}}function vS(n){return e=>s5(e.$from,n)}function Ob(n,e){const t=Pl(e,n.schema),{from:i,to:r,empty:o}=n.selection,s=[];o?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(i,r,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===t.name);return a?{...a.attrs}:{}}function c5(n,e){const t=Ib("string"==typeof e?e:e.name,n.schema);return"node"===t?function Nle(n,e){const t=Pi(e,n.schema),{from:i,to:r}=n.selection,o=[];n.doc.nodesBetween(i,r,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===t.name);return s?{...s.attrs}:{}}(n,e):"mark"===t?Ob(n,e):{}}function Ab(n,e,t){const i=[];return n===e?t.resolve(n).marks().forEach(r=>{const s=yS(t.resolve(n-1),r.type);s&&i.push({mark:r,...s})}):t.nodesBetween(n,e,(r,o)=>{i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}function kb(n,e,t){return Object.fromEntries(Object.entries(t).filter(([i])=>{const r=n.find(o=>o.type===e&&o.name===i);return!!r&&r.attribute.keepOnSplit}))}function wS(n,e,t={}){const{empty:i,ranges:r}=n.selection,o=e?Pl(e,n.schema):null;if(i)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>!o||o.name===d.type.name).find(d=>Tb(d.attrs,t,{strict:!1}));let s=0;const a=[];if(r.forEach(({$from:d,$to:h})=>{const f=d.pos,p=h.pos;n.doc.nodesBetween(f,p,(m,g)=>{if(!m.isText&&!m.marks.length)return;const y=Math.max(f,g),v=Math.min(p,g+m.nodeSize);s+=v-y,a.push(...m.marks.map(_=>({mark:_,from:y,to:v})))})}),0===s)return!1;const l=a.filter(d=>!o||o.name===d.mark.type.name).filter(d=>Tb(d.mark.attrs,t,{strict:!1})).reduce((d,h)=>d+h.to-h.from,0),c=a.filter(d=>!o||d.mark.type!==o&&d.mark.type.excludes(o)).reduce((d,h)=>d+h.to-h.from,0);return(l>0?l+c:l)>=s}function u5(n,e){const{nodeExtensions:t}=Db(e),i=t.find(s=>s.name===n);if(!i)return!1;const o=bt(Ve(i,"group",{name:i.name,options:i.options,storage:i.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function ru(n,e,t){const r=n.state.doc.content.size,o=Ra(e,0,r),s=Ra(t,0,r),a=n.coordsAtPos(o),l=n.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),h=Math.max(a.right,l.right),y={top:c,bottom:u,left:d,right:h,width:h-d,height:u-c,x:d,y:c};return{...y,toJSON:()=>y}}function d5(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const i=t.filter(r=>e?.includes(r.type.name));n.tr.ensureMarks(i)}}const CS=(n,e)=>{const t=vS(s=>s.type===e)(n.selection);if(!t)return!0;const i=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return t.node.type===r?.type&&vl(n.doc,t.pos)&&n.join(t.pos),!0},DS=(n,e)=>{const t=vS(s=>s.type===e)(n.selection);if(!t)return!0;const i=n.doc.resolve(t.start).after(t.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return t.node.type===r?.type&&vl(n.doc,i)&&n.join(i),!0};var Qle=Object.freeze({__proto__:null,blur:()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),null===(t=window?.getSelection())||void 0===t||t.removeAllRanges())}),!0),clearContent:(n=!1)=>({commands:e})=>e.setContent("",n),clearNodes:()=>({state:n,tr:e,dispatch:t})=>{const{selection:i}=e,{ranges:r}=i;return t&&r.forEach(({$from:o,$to:s})=>{n.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),f=d.blockRange(h);if(!f)return;const p=lh(f);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(f.start,m)}(p||0===p)&&e.lift(f,p)})}),!0},command:n=>e=>n(e),createParagraphNear:()=>({state:n,dispatch:e})=>z4(n,e),deleteCurrentNode:()=>({tr:n,dispatch:e})=>{const{selection:t}=n,i=t.$anchor.node();if(i.content.size>0)return!1;const r=n.selection.$anchor;for(let o=r.depth;o>0;o-=1)if(r.node(o).type===i.type){if(e){const a=r.before(o),l=r.after(o);n.delete(a,l).scrollIntoView()}return!0}return!1},deleteNode:n=>({tr:e,state:t,dispatch:i})=>{const r=Pi(n,t.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r){if(i){const l=o.before(s),c=o.after(s);e.delete(l,c).scrollIntoView()}return!0}return!1},deleteRange:n=>({tr:e,dispatch:t})=>{const{from:i,to:r}=n;return t&&e.delete(i,r),!0},deleteSelection:()=>({state:n,dispatch:e})=>nS(n,e),enter:()=>({commands:n})=>n.keyboardShortcut("Enter"),exitCode:()=>({state:n,dispatch:e})=>j4(n,e),extendMarkRange:(n,e={})=>({tr:t,state:i,dispatch:r})=>{const o=Pl(n,i.schema),{doc:s,selection:a}=t,{$from:l,from:c,to:u}=a;if(r){const d=yS(l,o,e);if(d&&d.from<=c&&d.to>=u){const h=it.create(s,d.from,d.to);t.setSelection(h)}}return!0},first:n=>e=>{const t="function"==typeof n?n(e):n;for(let i=0;i({editor:t,view:i,tr:r,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{Eb()&&i.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(i.focus(),e?.scrollIntoView&&t.commands.scrollIntoView())})};if(i.hasFocus()&&null===n||!1===n)return!0;if(o&&null===n&&!Sb(t.state.selection))return s(),!0;const a=t5(r.doc,n)||t.state.selection,l=t.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},forEach:(n,e)=>t=>n.every((i,r)=>e(i,{...t,index:r})),insertContent:(n,e)=>({tr:t,commands:i})=>i.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),insertContentAt:(n,e,t)=>({tr:i,dispatch:r,editor:o})=>{if(r){t={parseOptions:{},updateSelection:!0,...t};const s=xb(e,o.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions}});if("<>"===s.toString())return!0;let{from:a,to:l}="number"==typeof n?{from:n,to:n}:n,c=!0,u=!0;if(((n=>n.toString().startsWith("<"))(s)?s:[s]).forEach(h=>{h.check(),c=!!c&&h.isText&&0===h.marks.length,u=!!u&&h.isBlock}),a===l&&u){const{parent:h}=i.doc.resolve(a);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(a-=1,l+=1)}c?Array.isArray(e)?i.insertText(e.map(h=>h.text||"").join(""),a,l):i.insertText("object"==typeof e&&e&&e.text?e.text:e,a,l):i.replaceWith(a,l,s),t.updateSelection&&function lle(n,e,t){const i=n.steps.length-1;if(i{0===s&&(s=u)}),n.setSelection(nt.near(n.doc.resolve(s),t))}(i,i.steps.length-1,-1)}return!0},joinUp:()=>({state:n,dispatch:e})=>((n,e)=>{let r,t=n.selection,i=t instanceof Ye;if(i){if(t.node.isTextblock||!vl(n.doc,t.from))return!1;r=t.from}else if(r=hj(n.doc,t.from,-1),null==r)return!1;if(e){let o=n.tr.join(r);i&&o.setSelection(Ye.create(o.doc,r-n.doc.resolve(r).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0})(n,e),joinDown:()=>({state:n,dispatch:e})=>((n,e)=>{let i,t=n.selection;if(t instanceof Ye){if(t.node.isTextblock||!vl(n.doc,t.to))return!1;i=t.to}else if(i=hj(n.doc,t.to,1),null==i)return!1;return e&&e(n.tr.join(i).scrollIntoView()),!0})(n,e),joinBackward:()=>({state:n,dispatch:e})=>A4(n,e),joinForward:()=>({state:n,dispatch:e})=>L4(n,e),keyboardShortcut:n=>({editor:e,view:t,tr:i,dispatch:r})=>{const o=function mle(n){const e=n.split(/-(?!$)/);let i,r,o,s,t=e[e.length-1];"Space"===t&&(t=" ");for(let a=0;a!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0});return e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,a))})?.steps.forEach(c=>{const u=c.map(i.mapping);u&&r&&i.maybeStep(u)}),!0},lift:(n,e={})=>({state:t,dispatch:i})=>!!_m(t,Pi(n,t.schema),e)&&((n,e)=>{let{$from:t,$to:i}=n.selection,r=t.blockRange(i),o=r&&lh(r);return null!=o&&(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)})(t,i),liftEmptyBlock:()=>({state:n,dispatch:e})=>V4(n,e),liftListItem:n=>({state:e,dispatch:t})=>function xae(n){return function(e,t){let{$from:i,$to:r}=e.selection,o=i.blockRange(r,s=>s.childCount>0&&s.firstChild.type==n);return!!o&&(!t||(i.node(o.depth-1).type==n?function Iae(n,e,t,i){let r=n.tr,o=i.end,s=i.$to.end(i.depth);om;p--)f-=r.child(p).nodeSize,i.delete(f-1,f+1);let o=i.doc.resolve(t.start),s=o.nodeAfter;if(i.mapping.map(t.end)!=t.start+o.nodeAfter.nodeSize)return!1;let a=0==t.startIndex,l=t.endIndex==r.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?le.empty:le.from(r))))return!1;let d=o.pos,h=d+s.nodeSize;return i.step(new Ni(d-(a?1:0),h+(l?1:0),d+1,h-1,new we((a?le.empty:le.from(r.copy(le.empty))).append(l?le.empty:le.from(r.copy(le.empty))),a?0:1,l?0:1),a?0:1)),e(i.scrollIntoView()),!0}(e,t,o)))}}(Pi(n,e.schema))(e,t),newlineInCode:()=>({state:n,dispatch:e})=>F4(n,e),resetAttributes:(n,e)=>({tr:t,state:i,dispatch:r})=>{let o=null,s=null;const a=Ib("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=Pi(n,i.schema)),"mark"===a&&(s=Pl(n,i.schema)),r&&t.selection.ranges.forEach(l=>{i.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&t.setNodeMarkup(u,void 0,r5(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(r5(d.attrs,e)))})})}),!0)},scrollIntoView:()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),selectAll:()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),selectNodeBackward:()=>({state:n,dispatch:e})=>N4(n,e),selectNodeForward:()=>({state:n,dispatch:e})=>R4(n,e),selectParentNode:()=>({state:n,dispatch:e})=>((n,e)=>{let r,{$from:t,to:i}=n.selection,o=t.sharedDepth(i);return 0!=o&&(r=t.before(o),e&&e(n.tr.setSelection(Ye.create(n.doc,r))),!0)})(n,e),selectTextblockEnd:()=>({state:n,dispatch:e})=>W4(n,e),selectTextblockStart:()=>({state:n,dispatch:e})=>$4(n,e),setContent:(n,e=!1,t={})=>({tr:i,editor:r,dispatch:o})=>{const{doc:s}=i,a=o5(n,r.schema,t);return o&&i.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!e),!0},setMark:(n,e={})=>({tr:t,state:i,dispatch:r})=>{const{selection:o}=t,{empty:s,ranges:a}=o,l=Pl(n,i.schema);if(r)if(s){const c=Ob(i,l);t.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;i.doc.nodesBetween(u,d,(h,f)=>{const p=Math.max(f,u),m=Math.min(f+h.nodeSize,d);h.marks.find(y=>y.type===l)?h.marks.forEach(y=>{l===y.type&&t.addMark(p,m,l.create({...y.attrs,...e}))}):t.addMark(p,m,l.create(e))})});return function Ble(n,e,t){var i;const{selection:r}=e;let o=null;if(Sb(r)&&(o=r.$cursor),o){const a=null!==(i=n.storedMarks)&&void 0!==i?i:o.marks();return!!t.isInSet(a)||!a.some(l=>l.type.excludes(t))}const{ranges:s}=r;return s.some(({$from:a,$to:l})=>{let c=0===a.depth&&n.doc.inlineContent&&n.doc.type.allowsMarkType(t);return n.doc.nodesBetween(a.pos,l.pos,(u,d,h)=>{if(c)return!1;if(u.isInline){const f=!h||h.type.allowsMarkType(t),p=!!t.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(t));c=f&&p}return!c}),c})}(i,t,l)},setMeta:(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),setNode:(n,e={})=>({state:t,dispatch:i,chain:r})=>{const o=Pi(n,t.schema);return o.isTextblock?r().command(({commands:s})=>!!G4(o,e)(t)||s.clearNodes()).command(({state:s})=>G4(o,e)(s,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:i}=e,r=Ra(n,0,i.content.size),o=Ye.create(i,r);e.setSelection(o)}return!0},setTextSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:i}=e,{from:r,to:o}="number"==typeof n?{from:n,to:n}:n,s=it.atStart(i).from,a=it.atEnd(i).to,l=Ra(r,s,a),c=Ra(o,s,a),u=it.create(i,l,c);e.setSelection(u)}return!0},sinkListItem:n=>({state:e,dispatch:t})=>function Aae(n){return function(e,t){let{$from:i,$to:r}=e.selection,o=i.blockRange(r,c=>c.childCount>0&&c.firstChild.type==n);if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=n)return!1;if(t){let c=l.lastChild&&l.lastChild.type==a.type,u=le.from(c?n.create():null),d=new we(le.from(n.create(null,le.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;t(e.tr.step(new Ni(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}(Pi(n,e.schema))(e,t),splitBlock:({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:i,editor:r})=>{const{selection:o,doc:s}=e,{$from:a,$to:l}=o,u=kb(r.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof Ye&&o.node.isBlock)return!(!a.parentOffset||!ka(s,a.pos)||(i&&(n&&d5(t,r.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(i){const d=l.parentOffset===l.parent.content.size;o instanceof it&&e.deleteSelection();const h=0===a.depth?void 0:function Ale(n){for(let e=0;e({tr:e,state:t,dispatch:i,editor:r})=>{var o;const s=Pi(n,t.schema),{$from:a,$to:l}=t.selection,c=t.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=r.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let g=le.empty;const y=a.index(-1)?1:a.index(-2)?2:3;for(let ne=a.depth-y;ne>=a.depth-3;ne-=1)g=le.from(a.node(ne).copy(g));const v=a.indexAfter(-1){if(T>-1)return!1;ne.isTextblock&&0===ne.content.size&&(T=K+1)}),T>-1&&e.setSelection(it.near(e.doc.resolve(T))),e.scrollIntoView()}return!0}const h=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,f=kb(d,u.type.name,u.attrs),p=kb(d,a.node().type.name,a.node().attrs);e.delete(a.pos,l.pos);const m=h?[{type:s,attrs:f},{type:h,attrs:p}]:[{type:s,attrs:f}];if(!ka(e.doc,a.pos,2))return!1;if(i){const{selection:g,storedMarks:y}=t,{splittableMarks:v}=r.extensionManager,w=y||g.$to.parentOffset&&g.$from.marks();if(e.split(a.pos,2,m).scrollIntoView(),!w||!i)return!0;const _=w.filter(N=>v.includes(N.type.name));e.ensureMarks(_)}return!0},toggleList:(n,e,t,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:h}=r.extensionManager,f=Pi(n,s.schema),p=Pi(e,s.schema),{selection:m,storedMarks:g}=s,{$from:y,$to:v}=m,w=y.blockRange(v),_=g||m.$to.parentOffset&&m.$from.marks();if(!w)return!1;const N=vS(T=>u5(T.type.name,d))(m);if(w.depth>=1&&N&&w.depth-N.depth<=1){if(N.node.type===f)return c.liftListItem(p);if(u5(N.node.type.name,d)&&f.validContent(N.node.content)&&a)return l().command(()=>(o.setNodeMarkup(N.pos,f),!0)).command(()=>CS(o,f)).command(()=>DS(o,f)).run()}return t&&_&&a?l().command(()=>{const T=u().wrapInList(f,i),ne=_.filter(K=>h.includes(K.type.name));return o.ensureMarks(ne),!!T||c.clearNodes()}).wrapInList(f,i).command(()=>CS(o,f)).command(()=>DS(o,f)).run():l().command(()=>!!u().wrapInList(f,i)||c.clearNodes()).wrapInList(f,i).command(()=>CS(o,f)).command(()=>DS(o,f)).run()},toggleMark:(n,e={},t={})=>({state:i,commands:r})=>{const{extendEmptyMarkRange:o=!1}=t,s=Pl(n,i.schema);return wS(i,s,e)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,e)},toggleNode:(n,e,t={})=>({state:i,commands:r})=>{const o=Pi(n,i.schema),s=Pi(e,i.schema);return _m(i,o,t)?r.setNode(s):r.setNode(o,t)},toggleWrap:(n,e={})=>({state:t,commands:i})=>{const r=Pi(n,t.schema);return _m(t,r,e)?i.lift(r):i.wrapIn(r,e)},undoInputRule:()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let i=0;i=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:i,ranges:r}=t;return i||e&&r.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0},unsetMark:(n,e={})=>({tr:t,state:i,dispatch:r})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=t,l=Pl(n,i.schema),{$from:c,empty:u,ranges:d}=a;if(!r)return!0;if(u&&s){let{from:h,to:f}=a;const p=null===(o=c.marks().find(g=>g.type===l))||void 0===o?void 0:o.attrs,m=yS(c,l,p);m&&(h=m.from,f=m.to),t.removeMark(h,f,l)}else d.forEach(h=>{t.removeMark(h.$from.pos,h.$to.pos,l)});return t.removeStoredMark(l),!0},updateAttributes:(n,e={})=>({tr:t,state:i,dispatch:r})=>{let o=null,s=null;const a=Ib("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=Pi(n,i.schema)),"mark"===a&&(s=Pl(n,i.schema)),r&&t.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;i.doc.nodesBetween(c,u,(d,h)=>{o&&o===d.type&&t.setNodeMarkup(h,void 0,{...d.attrs,...e}),s&&d.marks.length&&d.marks.forEach(f=>{if(s===f.type){const p=Math.max(h,c),m=Math.min(h+d.nodeSize,u);t.addMark(p,m,s.create({...f.attrs,...e}))}})})}),!0)},wrapIn:(n,e={})=>({state:t,dispatch:i})=>function gae(n,e=null){return function(t,i){let{$from:r,$to:o}=t.selection,s=r.blockRange(o),a=s&&r1(s,n,e);return!!a&&(i&&i(t.tr.wrap(s,a).scrollIntoView()),!0)}}(Pi(n,t.schema),e)(t,i),wrapInList:(n,e={})=>({state:t,dispatch:i})=>function Sae(n,e=null){return function(t,i){let{$from:r,$to:o}=t.selection,s=r.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&r.node(s.depth-1).type.compatibleContent(n)&&0==s.startIndex){if(0==r.index(s.depth-1))return!1;let u=t.doc.resolve(s.start-2);l=new qv(u,u,s.depth),s.endIndex=0;u--)o=le.from(t[u].type.create(t[u].attrs,o));n.step(new Ni(e.start-(i?2:0),e.end,e.start,e.end,new we(o,0,0),t.length,!0));let s=0;for(let u=0;u({...Qle})}),Jle=vn.create({name:"editable",addProseMirrorPlugins(){return[new $t({key:new rn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Xle=vn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new $t({key:new rn("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const i=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(i),!1},blur:(e,t)=>{n.isFocused=!1;const i=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(i),!1}}}})]}}),ece=vn.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:h,parent:f}=d,p=nt.atStart(c).from===h;return!(!(u&&p&&f.type.isTextblock)||f.textContent.length)&&s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),i={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},r={...i},o={...i,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Eb()||n5()?o:r},addProseMirrorPlugins(){return[new $t({key:new rn("clearDocument"),appendTransaction:(n,e,t)=>{if(!n.some(p=>p.docChanged)||e.doc.eq(t.doc))return;const{empty:r,from:o,to:s}=e.selection,a=nt.atStart(e.doc).from,l=nt.atEnd(e.doc).to;if(r||o!==a||s!==l||0!==t.doc.textBetween(0,t.doc.content.size," "," ").length)return;const d=t.tr,h=wb({state:t,transaction:d}),{commands:f}=new Cb({editor:this.editor,state:h});return f.clearNodes(),d.steps.length?d:void 0}})]}}),tce=vn.create({name:"tabindex",addProseMirrorPlugins(){return[new $t({key:new rn("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var nce=Object.freeze({__proto__:null,ClipboardTextSerializer:$ae,Commands:Zle,Editable:Jle,FocusEvents:Xle,Keymap:ece,Tabindex:tce});class oce extends kae{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function rce(n,e){const t=document.querySelector("style[data-tiptap-style]");if(null!==t)return t;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(i),i}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const i=K4(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:i});this.view.updateState(r)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,i=this.state.reconfigure({plugins:this.state.plugins.filter(r=>!r.key.startsWith(t))});this.view.updateState(i)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(nce):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new iu(t,this)}createCommandManager(){this.commandManager=new Cb({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=o5(this.options.content,this.schema,this.options.parseOptions),t=t5(e,this.options.autofocus);this.view=new Xse(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:hh.create({doc:e,selection:t||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach(s=>{var a;return null===(a=this.capturedTransaction)||void 0===a?void 0:a.step(s)}):void(this.capturedTransaction=e);const t=this.state.apply(e),i=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),i&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),o=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return c5(this.state,e)}isActive(e,t){return function jle(n,e,t={}){if(!e)return _m(n,null,t)||wS(n,null,t);const i=Ib(e,n.schema);return"node"===i?_m(n,e,t):"mark"===i&&wS(n,e,t)}(this.state,"string"==typeof e?e:null,"string"==typeof e?t:e)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function a5(n,e){const t=zs.fromSchema(e).serializeFragment(n),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(t),r.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:i={}}=e||{};return function l5(n,e){return e5(n,{from:0,to:n.content.size},e)}(this.state.doc,{blockSeparator:t,textSerializers:{...mS(this.schema),...i}})}get isEmpty(){return function zle(n){var e;const t=null===(e=n.type.createAndFill())||void 0===e?void 0:e.toJSON(),i=n.toJSON();return JSON.stringify(t)===JSON.stringify(i)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null!==(e=this.view)&&void 0!==e&&e.docView)}}function ou(n){return new ym({find:n.find,handler:({state:e,range:t,match:i})=>{const r=bt(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=e,s=i[i.length-1],a=i[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(Ab(t.from,t.to,e.doc).filter(f=>f.mark.type.excluded.find(m=>m===n.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function h5(n){return new ym({find:n.find,handler:({state:e,range:t,match:i})=>{const r=bt(n.getAttributes,void 0,i)||{},{tr:o}=e,s=t.from;let a=t.to;if(i[1]){let c=s+i[0].lastIndexOf(i[1]);c>a?c=a:a=c+i[1].length,o.insertText(i[0][i[0].length-1],s+i[0].length-1),o.replaceWith(c,a,n.type.create(r))}else i[0]&&o.replaceWith(s,a,n.type.create(r))}})}function MS(n){return new ym({find:n.find,handler:({state:e,range:t,match:i})=>{const r=e.doc.resolve(t.from),o=bt(n.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,o)}})}function vm(n){return new ym({find:n.find,handler:({state:e,range:t,match:i,chain:r})=>{const o=bt(n.getAttributes,void 0,i)||{},s=e.tr.delete(t.from,t.to),l=s.doc.resolve(t.from).blockRange(),c=l&&r1(l,n.type,o);if(!c)return null;if(s.wrap(l,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:h}=e,{splittableMarks:f}=n.editor.extensionManager,p=h||d.$to.parentOffset&&d.$from.marks();if(p){const m=p.filter(g=>f.includes(g.type.name));s.ensureMarks(m)}}if(n.keepAttributes){const d="bulletList"===n.type.name||"orderedList"===n.type.name?"listItem":"taskList";r().updateAttributes(d,o).run()}const u=s.doc.resolve(t.from-1).nodeBefore;u&&u.type===n.type&&vl(s.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(i,u))&&s.join(t.from-1)}})}class Or{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=bt(Ve(this,"addOptions",{name:this.name}))),this.storage=bt(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Or(e)}configure(e={}){const t=this.extend();return t.options=Mb(this.options,e),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Or(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=bt(Ve(t,"addOptions",{name:t.name})),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:i}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const s=r.marks();if(!s.find(c=>c?.type.name===t.name))return!1;const l=s.find(c=>c?.type.name===t.name);return l&&i.removeStoredMark(l),i.insertText(" ",r.pos),e.view.dispatch(i),!0}return!1}}class Rn{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=bt(Ve(this,"addOptions",{name:this.name}))),this.storage=bt(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Rn(e)}configure(e={}){const t=this.extend();return t.options=Mb(this.options,e),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Rn(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=bt(Ve(t,"addOptions",{name:t.name})),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}}class sce{constructor(e,t,i){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...i},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,i,r,o,s,a,l;const{view:c}=this.editor,u=e.target,d=3===u.nodeType?null===(t=u.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||null!==(i=this.contentDOM)&&void 0!==i&&i.contains(u)||!d)return;let h=0,f=0;if(this.dom!==d){const g=this.dom.getBoundingClientRect(),y=d.getBoundingClientRect(),v=null!==(r=e.offsetX)&&void 0!==r?r:null===(o=e.nativeEvent)||void 0===o?void 0:o.offsetX,w=null!==(s=e.offsetY)&&void 0!==s?s:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;h=y.x-g.x+v,f=y.y-g.y+w}null===(l=e.dataTransfer)||void 0===l||l.setDragImage(this.dom,h,f);const p=Ye.create(c.state.doc,this.getPos()),m=c.state.tr.setSelection(p);c.dispatch(m)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const i=e.target;if(!this.dom.contains(i)||null!==(t=this.contentDOM)&&void 0!==t&&t.contains(i))return!1;const o=e.type.startsWith("drag"),s="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(i.tagName)||i.isContentEditable)&&!s&&!o)return!0;const{isEditable:l}=this.editor,{isDragging:c}=this,u=!!this.node.type.spec.draggable,d=Ye.isSelectable(this.node),h="copy"===e.type,f="paste"===e.type,p="cut"===e.type,m="mousedown"===e.type;if(!u&&d&&o&&e.preventDefault(),u&&o&&!c)return e.preventDefault(),!1;if(u&&l&&!c&&m){const g=i.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||s||h||f||p||m&&d)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!(!this.node.isLeaf&&!this.node.isAtom&&("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&Eb()&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(i=>i.isContentEditable)||(this.contentDOM!==e.target||"attributes"!==e.type)&&this.contentDOM.contains(e.target))))}updateAttributes(e){this.editor.commands.command(({tr:t})=>{const i=this.getPos();return t.setNodeMarkup(i,void 0,{...this.node.attrs,...e}),!0})}deleteNode(){const e=this.getPos();this.editor.commands.deleteRange({from:e,to:e+this.node.nodeSize})}}function Ll(n){return new fS({find:n.find,handler:({state:e,range:t,match:i})=>{const r=bt(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=e,s=i[i.length-1],a=i[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(Ab(t.from,t.to,e.doc).filter(f=>f.mark.type.excluded.find(m=>m===n.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function lce(n){return new fS({find:n.find,handler({match:e,chain:t,range:i}){const r=bt(n.getAttributes,void 0,e);if(!1===r||null===r)return null;e.input&&t().deleteRange(i).insertContentAt(i.from,{type:n.type.name,attrs:r})}})}function f5(n,e,t,i,r,o,s){try{var a=n[o](s),l=a.value}catch(c){return void t(c)}a.done?e(l):Promise.resolve(l).then(i,r)}function su(n){return function(){var e=this,t=arguments;return new Promise(function(i,r){var o=n.apply(e,t);function s(l){f5(o,i,r,s,a,"next",l)}function a(l){f5(o,i,r,s,a,"throw",l)}s(void 0)})}}const uce=new rn("suggestion");function dce({pluginKey:n=uce,editor:e,char:t="@",allowSpaces:i=!1,allowedPrefixes:r=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:d=(()=>!0)}){let h;const f=u?.(),p=new $t({key:n,view(){var g,m=this;return{update:(g=su(function*(y,v){var w,_,N,T,ne,K,Ne;const He=null===(w=m.key)||void 0===w?void 0:w.getState(v),pt=null===(_=m.key)||void 0===_?void 0:_.getState(y.state),at=He.active&&pt.active&&He.range.from!==pt.range.from,ot=!He.active&&pt.active,pn=He.active&&!pt.active,se=ot||at,fe=!ot&&!pn&&He.query!==pt.query&&!at,be=pn||at;if(!se&&!fe&&!be)return;const Ue=be&&!se?He:pt,It=y.dom.querySelector(`[data-decoration-id="${Ue.decorationId}"]`);h={editor:e,range:Ue.range,query:Ue.query,text:Ue.text,items:[],command:ln=>{l({editor:e,range:Ue.range,props:ln})},decorationNode:It,clientRect:It?()=>{var ln;const{decorationId:zt}=null===(ln=m.key)||void 0===ln?void 0:ln.getState(e.state);return y.dom.querySelector(`[data-decoration-id="${zt}"]`)?.getBoundingClientRect()||null}:null},se&&(null===(N=f?.onBeforeStart)||void 0===N||N.call(f,h)),fe&&(null===(T=f?.onBeforeUpdate)||void 0===T||T.call(f,h)),(fe||se)&&(h.items=yield c({editor:e,query:Ue.query})),be&&(null===(ne=f?.onExit)||void 0===ne||ne.call(f,h)),fe&&(null===(K=f?.onUpdate)||void 0===K||K.call(f,h)),se&&(null===(Ne=f?.onStart)||void 0===Ne||Ne.call(f,h))}),function(v,w){return g.apply(this,arguments)}),destroy:()=>{var g;h&&(null===(g=f?.onExit)||void 0===g||g.call(f,h))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(m,g,y,v){const{isEditable:w}=e,{composing:_}=e.view,{selection:N}=m,{empty:T,from:ne}=N,K={...g};if(K.composing=_,w&&(T||e.view.composing)){(neg.range.to)&&!_&&!g.composing&&(K.active=!1);const Ne=function cce(n){var e;const{char:t,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:s}=n,a=function ace(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}(t),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=i?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),d=(null===(e=s.nodeBefore)||void 0===e?void 0:e.isText)&&s.nodeBefore.text;if(!d)return null;const h=s.pos-d.length,f=Array.from(d.matchAll(u)).pop();if(!f||void 0===f.input||void 0===f.index)return null;const p=f.input.slice(Math.max(0,f.index-1),f.index),m=new RegExp(`^[${r?.join("")}\0]?$`).test(p);if(null!==r&&!m)return null;const g=h+f.index;let y=g+f[0].length;return i&&l.test(d.slice(y-1,y+1))&&(f[0]+=" ",y+=1),g=s.pos?{range:{from:g,to:y},query:f[0].slice(t.length),text:f[0]}:null}({char:t,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:N.$from}),He=`id_${Math.floor(4294967295*Math.random())}`;Ne&&d({editor:e,state:v,range:Ne.range})?(K.active=!0,K.decorationId=g.decorationId?g.decorationId:He,K.range=Ne.range,K.query=Ne.query,K.text=Ne.text):K.active=!1}else K.active=!1;return K.active||(K.decorationId=null,K.range={from:0,to:0},K.query=null,K.text=null),K}},props:{handleKeyDown(m,g){var y;const{active:v,range:w}=p.getState(m.state);return v&&(null===(y=f?.onKeyDown)||void 0===y?void 0:y.call(f,{view:m,event:g,range:w}))||!1},decorations(m){const{active:g,range:y,decorationId:v}=p.getState(m);return g?Ln.create(m.doc,[Ei.inline(y.from,y.to,{nodeName:s,class:a,"data-decoration-id":v})]):null}}});return p}const hce=function(){return{padding:".75rem 2rem",borderRadius:"2px"}};function fce(n,e){if(1&n){const t=Qe();I(0,"button",2),de("mousedown",function(){return ge(t),ye(M().back.emit())}),A()}2&n&&Yn(uo(2,hce))}class Mh{constructor(){this.title="No Results",this.showBackBtn=!1,this.back=new ie}}function pce(n,e){if(1&n&&(I(0,"i",7),Te(1),A()),2&n){const t=M();C(1),Ot(t.url)}}function mce(n,e){1&n&&_e(0,"dot-contentlet-thumbnail",9),2&n&&b("contentlet",M(2).data.contentlet)("width",42)("height",42)("iconSize","42px")}function gce(n,e){if(1&n&&E(0,mce,1,4,"dot-contentlet-thumbnail",8),2&n){const t=M(),i=Cn(10);b("ngIf",null==t.data?null:t.data.contentlet)("ngIfElse",i)}}function yce(n,e){if(1&n&&(I(0,"span",10),Te(1),A()),2&n){const t=M();C(1),Ot(t.data.contentlet.url)}}function _ce(n,e){if(1&n&&(I(0,"div",11),_e(1,"dot-state-icon",12),I(2,"dot-badge",13),Te(3),is(4,"lowercase"),A()()),2&n){const t=M();C(1),b("state",t.data.contentlet),C(2),Ot(rs(4,2,t.data.contentlet.language))}}function vce(n,e){1&n&&_e(0,"img",14),2&n&&b("src",M().url,Xa)}Mh.\u0275fac=function(e){return new(e||Mh)},Mh.\u0275cmp=xe({type:Mh,selectors:[["dot-empty-message"]],inputs:{title:"title",showBackBtn:"showBackBtn"},outputs:{back:"back"},decls:2,vars:2,consts:[[3,"innerHTML"],["pButton","","class","p-button-outlined","label","Back","type","submit",3,"style","mousedown",4,"ngIf"],["pButton","","label","Back","type","submit",1,"p-button-outlined",3,"mousedown"]],template:function(e,t){1&e&&(_e(0,"p",0),E(1,fce,1,3,"button",1)),2&e&&(b("innerHTML",t.title,Af),C(1),b("ngIf",t.showBackBtn))},dependencies:[nn,ds],styles:["[_nghost-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:16px;height:240px}"]});class au{constructor(e){this.element=e,this.role="list-item",this.tabindex="-1",this.disabled=!1,this.label="",this.url="",this.page=!1,this.data=null,this.icon=!1}onMouseDown(e){e.preventDefault(),this.disabled||this.command()}ngOnInit(){this.icon=this.icon="string"==typeof this.url&&!(this.url.split("/").length>1)}getLabel(){return this.element.nativeElement.innerText}focus(){this.element.nativeElement.style="background: #eee"}unfocus(){this.element.nativeElement.style=""}scrollIntoView(){if(!this.isIntoView()){const e=this.element.nativeElement,t=e.parentElement,{top:i,top:r,height:o}=t.getBoundingClientRect(),{top:s,bottom:a}=e.getBoundingClientRect(),l=s-i,c=a-r;t.scrollTop+=this.alignToTop()?l:c-o}}isIntoView(){const{bottom:e,top:t}=this.element.nativeElement.getBoundingClientRect(),i=this.element.nativeElement.parentElement.getBoundingClientRect();return t>=i.top&&e<=i.bottom}alignToTop(){const{top:e}=this.element.nativeElement.getBoundingClientRect(),{top:t}=this.element.nativeElement.parentElement.getBoundingClientRect();return e span[_ngcontent-%COMP%]{overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;margin-bottom:4px}.data-wrapper[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{color:#afb3c0;font-size:14.4px}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:8px;display:flex;align-items:flex-end}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] dot-state-icon[_ngcontent-%COMP%]{margin-right:8px}"]});class Th{constructor(){this.id="editor-suggestion-list",this.suggestionItems=[],this.destroy$=new ae,this.mouseMove=!0}onMouseMove(){this.mouseMove=!0}onMouseOver(e){const t=e.target,i=t.dataset?.index;if(isNaN(i)||!this.mouseMove)return;const r=Number(t?.dataset.index);t.getAttribute("disabled")?this.keyManager.activeItem?.unfocus():this.updateActiveItem(r)}onMouseDownHandler(e){e.preventDefault()}ngAfterViewInit(){this.keyManager=new BL(this.items).withWrap(),requestAnimationFrame(()=>this.setFirstItemActive()),this.items.changes.pipe(In(this.destroy$)).subscribe(()=>requestAnimationFrame(()=>this.setFirstItemActive()))}ngOnDestroy(){this.destroy$.next(!0)}updateSelection(e){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(e),this.keyManager.activeItem?.scrollIntoView(),this.mouseMove=!1}execCommand(){this.keyManager.activeItem.command()}setFirstItemActive(){this.keyManager.activeItem?.unfocus(),this.keyManager.setFirstItemActive(),this.keyManager.activeItem?.focus()}resetKeyManager(){this.keyManager.activeItem?.unfocus(),this.keyManager=new BL(this.items).withWrap(),this.setFirstItemActive()}updateActiveItem(e){this.keyManager.activeItem?.unfocus(),this.keyManager.setActiveItem(e)}}function wce(n,e){1&n&&(I(0,"div",1),_e(1,"div",2),I(2,"div",3)(3,"div",4)(4,"div"),_e(5,"span",5)(6,"span",6),A(),I(7,"div",7),_e(8,"span",8)(9,"span",9),A()()()())}Th.\u0275fac=function(e){return new(e||Th)},Th.\u0275cmp=xe({type:Th,selectors:[["dot-suggestion-list"]],contentQueries:function(e,t,i){if(1&e&&fi(i,au,4),2&e){let r;Xe(r=et())&&(t.items=r)}},hostVars:1,hostBindings:function(e,t){1&e&&de("mousemove",function(r){return t.onMouseMove(r)})("mouseover",function(r){return t.onMouseOver(r)})("mousedown",function(r){return t.onMouseDownHandler(r)}),2&e&&Yt("id",t.id)},inputs:{suggestionItems:"suggestionItems"},ngContentSelectors:["*"],decls:1,vars:0,template:function(e,t){1&e&&(So(),_r(0))},styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}"]});class bm{constructor(){this.items=Array(4).fill(0)}}bm.\u0275fac=function(e){return new(e||bm)},bm.\u0275cmp=xe({type:bm,selectors:[["dot-suggestion-loading-list"]],decls:1,vars:1,consts:[["class","card",4,"ngFor","ngForOf"],[1,"card"],[1,"image","skeleton"],[1,"body"],[1,"data-wrapper"],[1,"title","skeleton"],[1,"subtitle","skeleton"],[1,"state"],[1,"circle","skeleton"],[1,"meta","skeleton"]],template:function(e,t){1&e&&E(0,wce,10,0,"div",0),2&e&&b("ngForOf",t.items)},dependencies:[Hr],styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.skeleton[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_skeleton-loading 1s linear infinite alternate}.card[_ngcontent-%COMP%]{width:100%;max-height:80px;box-sizing:border-box;display:flex;gap:1rem;padding:8px;background-color:#fff;cursor:pointer}.image[_ngcontent-%COMP%]{min-width:64px;min-height:64px;background:#14151a}.body[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%]{overflow:hidden;height:100%;display:flex;flex-direction:column;justify-content:space-between}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:80%;overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;background-color:#14151a;height:12px;border-radius:5px;margin-bottom:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:85%;height:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;align-items:center}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]{width:16px;height:16px;background:#000;border-radius:100%;margin-right:.5rem}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{width:30px;height:10px;background:#000;border-radius:4px}@keyframes _ngcontent-%COMP%_skeleton-loading{0%{background-color:#ccc}to{background-color:#f2f2f2}}"]});class Rl{constructor(e){this.http=e}get defaultHeaders(){const e=new Cr;return e.set("Accept","*/*").set("Content-Type","application/json"),e}getLanguages(){return this.languages?Re(this.languages):this.http.get("/api/v2/languages",{headers:this.defaultHeaders}).pipe(Oe("entity"),ue(e=>{const t=this.getDotLanguageObject(e);return this.languages=t,t}))}getDotLanguageObject(e){return e.reduce((t,i)=>Object.assign(t,{[i.id]:i}),{})}}Rl.\u0275fac=function(e){return new(e||Rl)(F(tr))},Rl.\u0275prov=$({token:Rl,factory:Rl.\u0275fac,providedIn:"root"});const Cce={SHOW_VIDEO_THUMBNAIL:!0};class lu{constructor(){this.config=Cce}get configObject(){return this.config}setProperty(e,t){this.config={...this.config,[e]:t}}getProperty(e){return this.config[e]||!1}}function p5(n,e){return n.replace(/{(\d+)}/g,(t,i)=>typeof e[i]<"u"?e[i]:t)}lu.\u0275fac=function(e){return new(e||lu)},lu.\u0275prov=$({token:lu,factory:lu.\u0275fac,providedIn:"root"});class wm{constructor(){this.display=!1}show(){this.display=!0}hide(){this.display=!1}}wm.\u0275fac=function(e){return new(e||wm)},wm.\u0275prov=$({token:wm,factory:wm.\u0275fac,providedIn:"root"});class Sh{constructor(e){this.coreWebService=e,this.currentUsersUrl="v1/users/current/",this.userPermissionsUrl="v1/permissions/_bypermissiontype?userid={0}",this.porletAccessUrl="v1/portlet/{0}/_doesuserhaveaccess"}getCurrentUser(){return this.coreWebService.request({url:this.currentUsersUrl}).pipe(ue(e=>e))}getUserPermissions(e,t=[],i=[]){let r=t.length?`${this.userPermissionsUrl}&permission={1}`:this.userPermissionsUrl;r=i.length?`${r}&permissiontype={2}`:r;const o=p5(r,[e,t.join(","),i.join(",")]);return this.coreWebService.requestView({url:o}).pipe(Tt(1),Oe("entity"))}hasAccessToPortlet(e){return this.coreWebService.requestView({url:this.porletAccessUrl.replace("{0}",e)}).pipe(Tt(1),Oe("entity","response"))}}Sh.\u0275fac=function(e){return new(e||Sh)(F(Ut))},Sh.\u0275prov=$({token:Sh,factory:Sh.\u0275fac});class Cm{constructor(e,t){this.coreWebService=e,this.currentUser=t,this.bundleUrl="api/bundle/getunsendbundles/userid",this.addToBundleUrl="/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle"}getBundles(){return this.currentUser.getCurrentUser().pipe(Jn(e=>this.coreWebService.requestView({url:`${this.bundleUrl}/${e.userId}`}).pipe(Oe("bodyJsonObject","items"))))}addToBundle(e,t){return this.coreWebService.request({body:`assetIdentifier=${e}&bundleName=${t.name}&bundleSelect=${t.id}`,headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"POST",url:this.addToBundleUrl}).pipe(ue(i=>i))}}Cm.\u0275fac=function(e){return new(e||Cm)(F(Ut),F(Sh))},Cm.\u0275prov=$({token:Cm,factory:Cm.\u0275fac});const g5=n=>{const e=parseInt(n,0);if(e)return e;try{return JSON.parse(n)}catch{return n}};class Eh{setItem(e,t){let i;i="object"==typeof t?JSON.stringify(t):t,localStorage.setItem(e,i)}getItem(e){const t=localStorage.getItem(e);return g5(t)}removeItem(e){localStorage.removeItem(e)}clear(){localStorage.clear()}listen(e){return uv(window,"storage").pipe(ni(({key:t})=>t===e),ue(t=>g5(t.newValue)))}}Eh.\u0275fac=function(e){return new(e||Eh)},Eh.\u0275prov=$({token:Eh,factory:Eh.\u0275fac,providedIn:"root"});class ps{constructor(e,t){this.http=e,this.dotLocalstorageService=t,this.messageMap={},this.MESSAGES_LOCALSTORAGE_KEY="dotMessagesKeys",this.BUILDATE_LOCALSTORAGE_KEY="buildDate"}init(e){if(e&&(this.dotLocalstorageService.getItem(this.BUILDATE_LOCALSTORAGE_KEY)!==e?.buildDate||e.language))this.getAll(e.language||"default"),e.buildDate&&this.dotLocalstorageService.setItem(this.BUILDATE_LOCALSTORAGE_KEY,e.buildDate);else{const t=this.dotLocalstorageService.getItem(this.MESSAGES_LOCALSTORAGE_KEY);t?this.messageMap=t:this.getAll(e?.language||"default")}}get(e,...t){return this.messageMap[e]?t.length?p5(this.messageMap[e],t):this.messageMap[e]:e}getAll(e){this.http.get(this.geti18nURL(e)).pipe(Tt(1),Oe("entity")).subscribe(t=>{this.messageMap=t,this.dotLocalstorageService.setItem(this.MESSAGES_LOCALSTORAGE_KEY,this.messageMap)})}geti18nURL(e){return`/api/v2/languages/${e||"default"}/keys`}}ps.\u0275fac=function(e){return new(e||ps)(F(tr),F(Eh))},ps.\u0275prov=$({token:ps,factory:ps.\u0275fac,providedIn:"root"});class Dm{constructor(e,t){this.confirmationService=e,this.dotMessageService=t,this.alertModel=null,this.confirmModel=null,this._confirmDialogOpened$=new ae}get confirmDialogOpened$(){return this._confirmDialogOpened$.asObservable()}confirm(e){e.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),reject:this.dotMessageService.get("dot.common.dialog.reject"),...e.footerLabel},this.confirmModel=e,setTimeout(()=>{this.confirmationService.confirm(e),this._confirmDialogOpened$.next(!0)},0)}alert(e){e.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),...e.footerLabel},this.alertModel=e,setTimeout(()=>{this._confirmDialogOpened$.next(!0)},0)}alertAccept(e){this.alertModel.accept&&this.alertModel.accept(e),this.alertModel=null}alertReject(e){this.alertModel.reject&&this.alertModel.reject(e),this.alertModel=null}clearConfirm(){this.confirmModel=null}}Dm.\u0275fac=function(e){return new(e||Dm)(F(wL),F(ps))},Dm.\u0275prov=$({token:Dm,factory:Dm.\u0275fac});class xh{constructor(e){this.http=e}getFiltered(e,t,i=!1){return this.http.get(`/api/v1/containers/?filter=${e}&perPage=${t}&system=${i}`).pipe(Oe("entity"))}}function Ece(n,e,t){return 0===t?[e]:(n.push(e),n)}xh.\u0275fac=function(e){return new(e||xh)(F(tr))},xh.\u0275prov=$({token:xh,factory:xh.\u0275fac});class Mm{constructor(e){this.coreWebService=e}getContentType(e){return this.coreWebService.requestView({url:`v1/contenttype/id/${e}`}).pipe(Tt(1),Oe("entity"))}getContentTypes({filter:e="",page:t=40,type:i=""}){return this.coreWebService.requestView({url:`/api/v1/contenttype?filter=${e}&orderby=name&direction=ASC&per_page=${t}${i?`&type=${i}`:""}`}).pipe(Oe("entity"))}getAllContentTypes(){return this.getBaseTypes().pipe(rf(e=>e),ni(e=>!this.isRecentContentType(e))).pipe(function xce(){return function Sce(n,e){return arguments.length>=2?function(i){return he(wv(n,e),wp(1),Gd(e))(i)}:function(i){return he(wv((r,o,s)=>n(r,o,s+1)),wp(1))(i)}}(Ece,[])}())}filterContentTypes(e="",t=""){return this.coreWebService.requestView({body:{filter:{types:t,query:e},orderBy:"name",direction:"ASC",perPage:40},method:"POST",url:"/api/v1/contenttype/_filter"}).pipe(Oe("entity"))}getUrlById(e){return this.getBaseTypes().pipe(rf(t=>t),Oe("types"),rf(t=>t),ni(t=>t.variable.toLocaleLowerCase()===e),Oe("action"))}isContentTypeInMenu(e){return this.getUrlById(e).pipe(ue(t=>!!t),Gd(!1))}saveCopyContentType(e,t){return this.coreWebService.requestView({body:{...t},method:"POST",url:`/api/v1/contenttype/${e}/_copy`}).pipe(Oe("entity"))}isRecentContentType(e){return e.name.startsWith("RECENT")}getBaseTypes(){return this.coreWebService.requestView({url:"v1/contenttype/basetypes"}).pipe(Oe("entity"))}}Mm.\u0275fac=function(e){return new(e||Mm)(F(Ut))},Mm.\u0275prov=$({token:Mm,factory:Mm.\u0275fac});class Tm{constructor(){this.contentTypeInfoCollection=[{clazz:"com.dotcms.contenttype.model.type.ImmutableSimpleContentType",icon:"event_note",label:"content"},{clazz:"com.dotcms.contenttype.model.type.ImmutableWidgetContentType",icon:"settings",label:"widget"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFileAssetContentType",icon:"insert_drive_file",label:"fileasset"},{clazz:"com.dotcms.contenttype.model.type.ImmutableDotAssetContentType",icon:"file_copy",label:"dotasset"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePageContentType",icon:"description",label:"htmlpage"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePersonaContentType",icon:"person",label:"persona"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFormContentType",icon:"format_list_bulleted",label:"form"},{clazz:"com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType",icon:"format_strikethrough",label:"vanity_url"},{clazz:"com.dotcms.contenttype.model.type.ImmutableKeyValueContentType",icon:"public",label:"key_value"},{clazz:"com.dotcms.contenttype.model.type.ImmutableSimpleContentType",icon:"fa fa-newspaper-o",label:"content_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableWidgetContentType",icon:"fa fa-cog",label:"widget_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFileAssetContentType",icon:"fa fa-file-o",label:"fileasset_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableDotAssetContentType",icon:"fa fa-files-o",label:"dotasset_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePageContentType",icon:"fa fa-file-text-o",label:"htmlpage_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePersonaContentType",icon:"fa fa-user",label:"persona_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFormContentType",icon:"fa fa-list",label:"form_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType",icon:"fa fa-map-signs",label:"vanity_url_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableKeyValueContentType",icon:"fa fa-globe",label:"key_value_old"}]}getIcon(e){return this.getItem(e,"icon")}getClazz(e){return this.getItem(e,"clazz")}getLabel(e){return this.getItem(e,"label")}getItem(e,t){let i,r=!1;if(e.indexOf("_old")>0&&(r=!0,e=e.replace("_old","")),e){e=this.getTypeName(e);for(let o=0;or.lift(function Ice({bufferSize:n=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:t,scheduler:i}){let r,s,o=0,a=!1,l=!1;return function(u){let d;o++,!r||a?(a=!1,r=new O_(n,e,i),d=r.subscribe(this),s=u.subscribe({next(h){r.next(h)},error(h){a=!0,r.error(h)},complete(){l=!0,s=void 0,r.complete()}}),l&&(s=void 0)):d=r.subscribe(this),this.add(()=>{o--,d.unsubscribe(),d=void 0,s&&!l&&t&&0===o&&(s.unsubscribe(),s=void 0,r=void 0)})}}(i))}Em.\u0275fac=function(e){return new(e||Em)(F(Ut))},Em.\u0275prov=$({token:Em,factory:Em.\u0275fac});class xm{constructor(e){this.http=e}copyInPage(e){const t={...e,personalization:e?.personalization||"dot:default"};return this.http.put("/api/v1/page/copyContent",t).pipe(y5(),Oe("entity"))}}xm.\u0275fac=function(e){return new(e||xm)(F(tr))},xm.\u0275prov=$({token:xm,factory:xm.\u0275fac,providedIn:"root"});class Im{constructor(e){this.coreWebService=e}postData(e,t){return this.coreWebService.requestView({body:t,method:"POST",url:`${e}`}).pipe(Oe("entity"))}putData(e,t){return this.coreWebService.requestView({body:t,method:"PUT",url:`${e}`}).pipe(Oe("entity"))}getDataById(e,t,i="entity"){return this.coreWebService.requestView({url:`${e}/id/${t}`}).pipe(Oe(i))}delete(e,t){return this.coreWebService.requestView({method:"DELETE",url:`${e}/${t}`}).pipe(Oe("entity"))}}Im.\u0275fac=function(e){return new(e||Im)(F(Ut))},Im.\u0275prov=$({token:Im,factory:Im.\u0275fac});class Om{constructor(e){this.coreWebService=e}get(){return this.coreWebService.requestView({url:["api","content","respectFrontendRoles/false","render/false","query/+contentType:previewDevice +live:true +deleted:false +working:true","limit/40/orderby/title"].join("/")}).pipe(Oe("contentlets"))}}Om.\u0275fac=function(e){return new(e||Om)(F(Ut))},Om.\u0275prov=$({token:Om,factory:Om.\u0275fac});class Fa{setVariationId(e){sessionStorage.setItem(Bp,e)}getVariationId(){return sessionStorage.getItem(Bp)||"DEFAULT"}removeVariantId(){sessionStorage.removeItem(Bp)}}Fa.\u0275fac=function(e){return new(e||Fa)},Fa.\u0275prov=$({token:Fa,factory:Fa.\u0275fac});class Am{constructor(e,t){this.coreWebService=e,this.dotSessionStorageService=t}save(e,t){const i={method:"POST",body:t,url:`v1/page/${e}/content`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Oe("entity"))}whatChange(e,t){return this.coreWebService.requestView({url:`v1/page/${e}/render/versions?langId=${t}`}).pipe(Oe("entity"))}}Am.\u0275fac=function(e){return new(e||Am)(F(Ut),F(Fa))},Am.\u0275prov=$({token:Am,factory:Am.\u0275fac});var Nb=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(Nb||(Nb={})),Nb))();class km{constructor(e){this.coreWebService=e,this._paginationPerPage=40,this._offset="0",this._url="/api/content/_search",this._defaultQueryParams={"+languageId":"1","+deleted":"false","+working":"true"},this._sortField="modDate",this._sortOrder=Nb.DESC,this._extraParams=new Map(Object.entries(this._defaultQueryParams))}get(e){this.setBaseParams(e);const t=this.getESQuery(e,this.getObjectFromMap(this._extraParams));return this.coreWebService.requestView({body:JSON.stringify(t),method:"POST",url:this._url}).pipe(Oe("entity"),Tt(1))}setExtraParams(e,t){null!=t&&this._extraParams.set(e,t.toString())}getESQuery(e,t){return{query:`${e.query} ${JSON.stringify(t).replace(/["{},]/g," ")}`,sort:`${this._sortField||""} ${this._sortOrder||""}`,limit:this._paginationPerPage,offset:this._offset}}setBaseParams(e){this._extraParams.clear(),this._paginationPerPage=e.itemsPerPage||this._paginationPerPage,this._sortField=e.sortField||this._sortField,this._sortOrder=e.sortOrder||this._sortOrder,this._offset=e.offset||this._offset,e.lang&&this.setExtraParams("+languageId",e.lang);let t=e.filter||"";t&&t.indexOf(" ")>0&&(t=`'${t.replace(/'/g,"\\'")}'`),t&&this.setExtraParams("+title",`${t}*`)}getObjectFromMap(e){return Array.from(e).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}}km.\u0275fac=function(e){return new(e||km)(F(Ut))},km.\u0275prov=$({token:km,factory:km.\u0275fac});class Ih{constructor(){this.subject=new ae}listen(e){return this.subject.asObservable().pipe(ni(t=>t.name===e))}notify(e,t){this.subject.next({name:e,data:t})}}Ih.\u0275fac=function(e){return new(e||Ih)},Ih.\u0275prov=$({token:Ih,factory:Ih.\u0275fac});class Nm{constructor(){this.data=new ae}get showDialog$(){return this.data.asObservable()}open(e){this.data.next(e)}}Nm.\u0275fac=function(e){return new(e||Nm)},Nm.\u0275prov=$({token:Nm,factory:Nm.\u0275fac});class Pm{constructor(e){this.coreWebService=e}get(e){return this.coreWebService.requestView({url:e?`v2/languages?contentInode=${e}`:"v2/languages"}).pipe(Oe("entity"))}}Pm.\u0275fac=function(e){return new(e||Pm)(F(Ut))},Pm.\u0275prov=$({token:Pm,factory:Pm.\u0275fac});const kce=[{icon:"tune",titleKey:"com.dotcms.repackage.javax.portlet.title.rules",url:"/rules"},{icon:"cloud_upload",titleKey:"com.dotcms.repackage.javax.portlet.title.publishing-queue",url:"/c/publishing-queue"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.site-search",url:"/c/site-search"},{icon:"person",titleKey:"com.dotcms.repackage.javax.portlet.title.personas",url:"/c/c_Personas"},{icon:"update",titleKey:"com.dotcms.repackage.javax.portlet.title.time-machine",url:"/c/time-machine"},{icon:"device_hub",titleKey:"com.dotcms.repackage.javax.portlet.title.workflow-schemes",url:"/c/workflow-schemes"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.es-search",url:"/c/es-search"},{icon:"business",titleKey:"Forms-and-Form-Builder",url:"/forms"},{icon:"apps",titleKey:"com.dotcms.repackage.javax.portlet.title.apps",url:"/apps"},{icon:"integration_instructions",titleKey:"com.dotcms.repackage.javax.portlet.title.velocity",url:"/c/velocity_playground"}];class Lm{constructor(e){this.coreWebService=e,this.unlicenseData=new Wr({icon:"",titleKey:"",url:""}),this.licenseURL="v1/appconfiguration"}isEnterprise(){return this.getLicense().pipe(ue(e=>e.level>=200))}canAccessEnterprisePortlet(e){return this.isEnterprise().pipe(Tt(1),ue(t=>{const i=this.checksIfEnterpriseUrl(e);return!i||i&&t}))}checksIfEnterpriseUrl(e){const t=kce.filter(i=>0===e.indexOf(i.url));return t.length&&this.unlicenseData.next(...t),!!t.length}getLicense(){return this.license?Re(this.license):this.coreWebService.requestView({url:this.licenseURL}).pipe(Oe("entity","config","license"),xn(e=>{this.setLicense(e)}))}updateLicense(){this.coreWebService.requestView({url:this.licenseURL}).pipe(Oe("entity","config","license")).subscribe(e=>{this.setLicense(e)})}setLicense(e){this.license={...e}}}Lm.\u0275fac=function(e){return new(e||Lm)(F(Ut))},Lm.\u0275prov=$({token:Lm,factory:Lm.\u0275fac});class Rm{constructor(e,t){this.coreWebService=e,this.dotSessionStorageService=t}save(e,t){const i={body:t,method:"POST",url:`v1/page/${e}/layout`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Oe("entity"),ue(o=>new Zne(o)))}}Rm.\u0275fac=function(e){return new(e||Rm)(F(Ut),F(Fa))},Rm.\u0275prov=$({token:Rm,factory:Rm.\u0275fac});class Fm{constructor(e,t){this.coreWebService=e,this.dotSessionStorageService=t}checkPermission(e){return this.coreWebService.requestView({body:{...e},method:"POST",url:"v1/page/_check-permission"}).pipe(Oe("entity"))}get({viewAs:e,mode:t,url:i},r){const o=this.getOptionalViewAsParams(e,t);return this.coreWebService.requestView({url:`v1/page/render/${i?.replace(/^\//,"")}`,params:{...r,...o}}).pipe(Oe("entity"))}getOptionalViewAsParams(e={},t=Uv.PREVIEW){return{...this.getPersonaParam(e.persona),...this.getDeviceParam(e.device),...this.getLanguageParam(e.language),...this.getModeParam(t),variantName:this.dotSessionStorageService.getVariationId()}}getModeParam(e){return e?{mode:e}:{}}getPersonaParam(e){return e?{"com.dotmarketing.persona.id":e.identifier||""}:{}}getDeviceParam(e){return e?{device_inode:e.inode}:{}}getLanguageParam(e){return e?{language_id:e.toString()}:{}}}Fm.\u0275fac=function(e){return new(e||Fm)(F(Ut),F(Fa))},Fm.\u0275prov=$({token:Fm,factory:Fm.\u0275fac});class jm{constructor(e){this.coreWebService=e}getPages(e=""){return this.coreWebService.requestView({url:`/api/v1/page/types?filter=${e}`}).pipe(Tt(1),Oe("entity"))}}jm.\u0275fac=function(e){return new(e||jm)(F(Ut))},jm.\u0275prov=$({token:jm,factory:jm.\u0275fac});class zm{constructor(e){this.http=e}getByUrl(e){return this.http.post("/api/v1/page/actions",{host_id:e.host_id,language_id:e.language_id,url:e.url,renderMode:e.renderMode}).pipe(Oe("entity"))}}zm.\u0275fac=function(e){return new(e||zm)(F(tr))},zm.\u0275prov=$({token:zm,factory:zm.\u0275fac});class Vm{constructor(e,t){this.coreWebService=e,this.dotSessionStorageService=t}personalized(e,t){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"POST",url:"/api/v1/personalization/pagepersonas",params:{variantName:i},body:{pageId:e,personaTag:t}}).pipe(Oe("entity"))}despersonalized(e,t){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"DELETE",url:`/api/v1/personalization/pagepersonas/page/${e}/personalization/${t}`,params:{variantName:i}}).pipe(Oe("entity"))}}Vm.\u0275fac=function(e){return new(e||Vm)(F(Ut),F(Fa))},Vm.\u0275prov=$({token:Vm,factory:Vm.\u0275fac});class Bm{constructor(e){this.coreWebService=e}get(){return this.coreWebService.requestView({url:"content/respectFrontendRoles/false/render/false/query/+contentType:persona +live:true +deleted:false +working:true"}).pipe(Oe("contentlets"))}}Bm.\u0275fac=function(e){return new(e||Bm)(F(Ut))},Bm.\u0275prov=$({token:Bm,factory:Bm.\u0275fac});class Um{constructor(e){this.http=e}getKey(e){return this.http.get("/api/v1/configuration/config",{params:{keys:e}}).pipe(Tt(1),Oe("entity",e))}getKeys(e){return this.http.get("/api/v1/configuration/config",{params:{keys:e.join()}}).pipe(Tt(1),Oe("entity"))}getKeyAsList(e){return this.http.get("/api/v1/configuration/config",{params:{keys:`list:${e}`}}).pipe(Tt(1),Oe("entity",e))}getFeatureFlag(e){return this.getKey(e).pipe(ue(t=>"true"===t))}getFeatureFlags(e){return this.getKeys(e).pipe(ue(t=>Object.keys(t).reduce((i,r)=>(i[r]="true"===t[r],i),{})))}}Um.\u0275fac=function(e){return new(e||Um)(F(tr))},Um.\u0275prov=$({token:Um,factory:Um.\u0275fac,providedIn:"root"});class Hm{constructor(e){this.coreWebService=e}get(){return this.coreWebService.requestView({url:"/api/v1/pushpublish/filters/"}).pipe(Oe("entity"))}}Hm.\u0275fac=function(e){return new(e||Hm)(F(Ut))},Hm.\u0275prov=$({token:Hm,factory:Hm.\u0275fac});class $m{constructor(e,t){this.dotMessageService=e,this.coreWebService=t}get(e,t){return this.coreWebService.requestView({url:`/api/v1/roles/${e}/rolehierarchyanduserroles?roleHierarchyForAssign=${t}`}).pipe(Oe("entity"),ue(this.processRolesResponse.bind(this)))}search(){return this.coreWebService.requestView({url:"/api/v1/roles/_search"}).pipe(Oe("entity"),ue(this.processRolesResponse.bind(this)))}processRolesResponse(e){return e.filter(t=>"anonymous"!==t.roleKey).map(t=>("CMS Anonymous"===t.roleKey?t.name=this.dotMessageService.get("current-user"):t.user&&(t.name=`${t.name}`),t))}}$m.\u0275fac=function(e){return new(e||$m)(F(ps),F(Ut))},$m.\u0275prov=$({token:$m,factory:$m.\u0275fac});class Oh{constructor(e){this.http=e,this.BASE_SITE_URL="/api/v1/site",this.params={archived:!1,live:!0,system:!0},this.defaultPerpage=10}set searchParam(e){this.params=e}getSites(e="*",t){return this.http.get(this.siteURL(e,t)).pipe(Oe("entity"))}siteURL(e,t){const r=`filter=${e}&perPage=${t||this.defaultPerpage}&${this.getQueryParams()}`;return`${this.BASE_SITE_URL}?${r}`}getQueryParams(){return Object.keys(this.params).map(e=>`${e}=${this.params[e]}`).join("&")}}Oh.\u0275fac=function(e){return new(e||Oh)(F(tr))},Oh.\u0275prov=$({token:Oh,factory:Oh.\u0275fac,providedIn:"root"});class Wm{constructor(e){this.coreWebService=e}setSelectedFolder(e){return this.coreWebService.requestView({body:{path:e},method:"PUT",url:"/api/v1/browser/selectedfolder"}).pipe(Tt(1))}}Wm.\u0275fac=function(e){return new(e||Wm)(F(Ut))},Wm.\u0275prov=$({token:Wm,factory:Wm.\u0275fac});class Gm{constructor(e){this.coreWebService=e}getSuggestions(e){return this.coreWebService.requestView({url:"v1/tags"+(e?`?name=${e}`:"")}).pipe(Oe("bodyJsonObject"),ue(t=>Object.entries(t).map(([i,r])=>r)))}}Gm.\u0275fac=function(e){return new(e||Gm)(F(Ut))},Gm.\u0275prov=$({token:Gm,factory:Gm.\u0275fac});class Ym{constructor(e){this.coreWebService=e}get(e){return this.coreWebService.requestView({url:"v1/themes/id/"+e}).pipe(Oe("entity"))}}Ym.\u0275fac=function(e){return new(e||Ym)(F(Ut))},Ym.\u0275prov=$({token:Ym,factory:Ym.\u0275fac});const Pce={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"};class Ah{uploadFile({file:e,maxSize:t,signal:i}){return"string"==typeof e?this.uploadFileByURL(e,i):this.uploadBinaryFile({file:e,maxSize:t,signal:i})}uploadFileByURL(e,t){return fetch("/api/v1/temp/byUrl",{method:"POST",signal:t,headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:e})}).then(function(){var r=su(function*(o){if(200===o.status)return(yield o.json()).tempFiles[0];throw{message:(yield o.json()).message,status:o.status}});return function(o){return r.apply(this,arguments)}}()).catch(r=>{const{message:o,response:s}=r,a="string"==typeof s?JSON.parse(s):s;throw this.errorHandler(a||{message:o},r.status)})}uploadBinaryFile({file:e,maxSize:t,signal:i}){let r="/api/v1/temp";r+=t?`?maxFileLength=${t}`:"";const o=new FormData;return o.append("file",e),fetch(r,{method:"POST",signal:i,headers:{Origin:window.location.hostname},body:o}).then(function(){var s=su(function*(a){if(200===a.status)return(yield a.json()).tempFiles[0];throw{message:(yield a.json()).message,status:a.status}});return function(a){return s.apply(this,arguments)}}()).catch(s=>{throw this.errorHandler(JSON.parse(s.response),s.status)})}errorHandler(e,t){let i="";try{i=e.message||e.errors[0].message}catch{i=Pce[t||500]}return{message:i,status:500|t}}}Ah.\u0275fac=function(e){return new(e||Ah)},Ah.\u0275prov=$({token:Ah,factory:Ah.\u0275fac,providedIn:"root"});class qm{constructor(e){this.coreWebService=e}bringBack(e){return this.coreWebService.requestView({method:"PUT",url:`/api/v1/versionables/${e}/_bringback`}).pipe(Oe("entity"))}}qm.\u0275fac=function(e){return new(e||qm)(F(Ut))},qm.\u0275prov=$({token:qm,factory:qm.\u0275fac});var cu=(()=>(function(n){n.NEW="NEW",n.DESTROY="DESTROY",n.PUBLISH="PUBLISH",n.EDIT="EDIT"}(cu||(cu={})),cu))();class Km{constructor(e){this.coreWebService=e}fireTo(e,t,i){return this.coreWebService.requestView({body:i,method:"PUT",url:`v1/workflow/actions/${t}/fire?inode=${e}&indexPolicy=WAIT_FOR`}).pipe(Oe("entity"))}bulkFire(e){return this.coreWebService.requestView({body:e,method:"PUT",url:"/api/v1/workflow/contentlet/actions/bulk/fire"}).pipe(Oe("entity"))}newContentlet(e,t){return this.request({contentType:e,data:t,action:cu.NEW})}publishContentlet(e,t,i){return this.request({contentType:e,data:t,action:cu.PUBLISH,individualPermissions:i})}saveContentlet(e){return this.request({data:e,action:cu.EDIT})}deleteContentlet(e){return this.request({data:e,action:cu.DESTROY})}publishContentletAndWaitForIndex(e,t,i){return this.publishContentlet(e,{...t,indexPolicy:"WAIT_FOR"},i)}request({contentType:e,data:t,action:i,individualPermissions:r}){const o=e?{contentType:e,...t}:t;return this.coreWebService.requestView({method:"PUT",url:`v1/workflow/actions/default/fire/${i}${t.inode?`?inode=${t.inode}`:""}`,body:r?{contentlet:o,individualPermissions:r}:{contentlet:o}}).pipe(Tt(1),Oe("entity"))}}Km.\u0275fac=function(e){return new(e||Km)(F(Ut))},Km.\u0275prov=$({token:Km,factory:Km.\u0275fac});class Qm{constructor(e){this.coreWebService=e}get(){return this.coreWebService.requestView({url:"v1/workflow/schemes"}).pipe(Oe("entity"))}getSystem(){return this.get().pipe(yi(e=>e.filter(t=>t.system)),Tt(1))}}Qm.\u0275fac=function(e){return new(e||Qm)(F(Ut))},Qm.\u0275prov=$({token:Qm,factory:Qm.\u0275fac});class Zm{constructor(e){this.coreWebService=e}getByWorkflows(e=[]){return this.coreWebService.requestView({method:"POST",url:"/api/v1/workflow/schemes/actions/NEW",body:{schemes:e.map(this.getWorkFlowId)}}).pipe(Oe("entity"))}getByInode(e,t){return this.coreWebService.requestView({url:`v1/workflow/contentlet/${e}/actions${t?`?renderMode=${t}`:""}`}).pipe(Oe("entity"))}getWorkFlowId(e){return e&&e.id}}Zm.\u0275fac=function(e){return new(e||Zm)(F(Ut))},Zm.\u0275prov=$({token:Zm,factory:Zm.\u0275fac});var Pb=(()=>(function(n){n[n.ASC=1]="ASC",n[n.DESC=-1]="DESC"}(Pb||(Pb={})),Pb))();class $i{constructor(e){this.coreWebService=e,this.links={},this.paginationPerPage=40,this._extraParams=new Map}get url(){return this._url}set url(e){this._url!==e&&(this.links={},this._url=e)}get filter(){return this._filter}set filter(e){this._filter!==e&&(this.links={},this._filter=e)}set searchParam(e){this._searchParam!==e&&(this.links=e.length>0?{}:this.links,this._searchParam=e)}get searchParam(){return this._searchParam}setExtraParams(e,t){null!=t&&(this.extraParams.set(e,t.toString()),this.links={})}deleteExtraParams(e){this.extraParams.delete(e)}resetExtraParams(){this.extraParams.clear()}get extraParams(){return this._extraParams}get sortField(){return this._sortField}set sortField(e){this._sortField!==e&&(this.links={},this._sortField=e)}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder!==e&&(this.links={},this._sortOrder=e)}get(e){const t={...this.getParams(),...this.getObjectFromMap(this.extraParams)},i=this.sanitizeQueryParams(e,t);return this.coreWebService.requestView({params:t,url:i||this.url}).pipe(ue(r=>(this.setLinks(r.header($i.LINK_HEADER_NAME)),this.paginationPerPage=parseInt(r.header($i.PAGINATION_PER_PAGE_HEADER_NAME),10),this.currentPage=parseInt(r.header($i.PAGINATION_CURRENT_PAGE_HEADER_NAME),10),this.maxLinksPage=parseInt(r.header($i.PAGINATION_MAX_LINK_PAGES_HEADER_NAME),10),this.totalRecords=parseInt(r.header($i.PAGINATION_TOTAL_ENTRIES_HEADER_NAME),10),r.entity)),Tt(1))}getLastPage(){return this.get(this.links.last)}getFirstPage(){return this.get(this.links.first)}getPage(e=1){const t=this.links["x-page"]?this.links["x-page"].replace("pageValue",String(e)):void 0;return this.get(t)}getCurrentPage(){return this.getPage(this.currentPage)}getNextPage(){return this.get(this.links.next)}getPrevPage(){return this.get(this.links.prev)}getWithOffset(e){const t=this.getPageFromOffset(e);return this.getPage(t)}getPageFromOffset(e){return parseInt(String(e/this.paginationPerPage),10)+1}setLinks(e){(e?.split(",")||[]).forEach(i=>{const r=i.split(";"),o=r[0].substring(1,r[0].length-1),s=r[1].split("="),a=s[1].substring(1,s[1].length-1);this.links[a]=o.trim()})}getParams(){const e=new Map;return this.filter&&e.set("filter",this.filter),this.searchParam&&e.set("searchParam",this.searchParam),this.sortField&&e.set("orderby",this.sortField),this.sortOrder&&e.set("direction",Pb[this.sortOrder]),this.paginationPerPage&&e.set("per_page",String(this.paginationPerPage)),this.getObjectFromMap(e)}getObjectFromMap(e){return Array.from(e).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}sanitizeQueryParams(e="",t){const i=e?.split("?"),r=i[0],o=i[1];if(!o)return e;const s=new URLSearchParams(o);for(const a in t)s.delete(a);return s.toString()?`${r}?${s.toString()}`:r}}$i.LINK_HEADER_NAME="Link",$i.PAGINATION_PER_PAGE_HEADER_NAME="X-Pagination-Per-Page",$i.PAGINATION_CURRENT_PAGE_HEADER_NAME="X-Pagination-Current-Page",$i.PAGINATION_MAX_LINK_PAGES_HEADER_NAME="X-Pagination-Link-Pages",$i.PAGINATION_TOTAL_ENTRIES_HEADER_NAME="X-Pagination-Total-Entries",$i.\u0275fac=function(e){return new(e||$i)(F(Ut))},$i.\u0275prov=$({token:$i,factory:$i.\u0275fac});class Jm{constructor(e){this.http=e,this.seoToolsUrl="assets/seo/page-tools.json"}get(){return this.http.get(this.seoToolsUrl).pipe(Oe("pageTools"))}}Jm.\u0275fac=function(e){return new(e||Jm)(F(tr))},Jm.\u0275prov=$({token:Jm,factory:Jm.\u0275fac});var Fl=(()=>(function(n){n.DOWNLOAD="DOWNLOADING",n.IMPORT="IMPORTING",n.COMPLETED="COMPLETED",n.ERROR="ERROR"}(Fl||(Fl={})),Fl))();class Ys{constructor(e,t){this.http=e,this.dotUploadService=t}publishContent({data:e,maxSize:t,statusCallback:i=(o=>{}),signal:r}){return i(Fl.DOWNLOAD),this.setTempResource({data:e,maxSize:t,signal:r}).pipe(yi(o=>{const s=Array.isArray(o)?o:[o],a=[];return s.forEach(l=>{a.push({baseType:"dotAsset",asset:l.id,hostFolder:"",indexPolicy:"WAIT_FOR"})}),i(Fl.IMPORT),this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:a}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(Oe("entity","results"))}),Ai(o=>ho(o)))}setTempResource({data:e,maxSize:t,signal:i}){return _t(this.dotUploadService.uploadFile({file:e,maxSize:t,signal:i}))}}Ys.\u0275fac=function(e){return new(e||Ys)(F(tr),F(Ah))},Ys.\u0275prov=$({token:Ys,factory:Ys.\u0275fac});var Lb=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(Lb||(Lb={})),Lb))();class kh{constructor(e){this.http=e}get({query:e,limit:t=0,offset:i=0}){return this.http.post("/api/content/_search",{query:e,sort:"score,modDate desc",limit:t,offset:i}).pipe(Oe("entity"))}}kh.\u0275fac=function(e){return new(e||kh)(F(tr))},kh.\u0275prov=$({token:kh,factory:kh.\u0275fac,providedIn:"root"});class jl{constructor(e){this.http=e}get defaultHeaders(){const e=new Cr;return e.set("Accept","*/*").set("Content-Type","application/json"),e}getContentTypes(e="",t=""){return this.http.post("/api/v1/contenttype/_filter",{filter:{types:t,query:e},orderBy:"name",direction:"ASC",perPage:40}).pipe(Oe("entity"))}getContentlets({contentType:e,filter:t,currentLanguage:i,contentletIdentifier:r}){const o=r?`-identifier:${r}`:"",s=t.includes("-")?t:`*${t}*`;return this.http.post("/api/content/_search",{query:`+contentType:${e} ${o} +languageId:${i} +deleted:false +working:true +catchall:${s} title:'${t}'^15`,sort:"modDate desc",offset:0,limit:40}).pipe(Oe("entity","jsonObjectView","contentlets"))}getContentletsByLink({link:e,currentLanguage:t=tg}){return this.http.post("/api/content/_search",{query:`+languageId:${t} +deleted:false +working:true +(urlmap:*${e}* OR (contentType:(dotAsset OR htmlpageasset OR fileAsset) AND +path:*${e}*))`,sort:"modDate desc",offset:0,limit:40}).pipe(Oe("entity","jsonObjectView","contentlets"))}}jl.\u0275fac=function(e){return new(e||jl)(F(tr))},jl.\u0275prov=$({token:jl,factory:jl.\u0275fac});class ja{constructor(e){this.http=e,this.lastUsedPrompt=null,this.lastImagePrompt=null,this.lastContentResponse=null}getLastUsedPrompt(){return this.lastUsedPrompt}getLastContentResponse(){return this.lastContentResponse}generateContent(e){this.lastUsedPrompt=e;const i=JSON.stringify({prompt:e}),r=new Cr({"Content-Type":"application/json"});return this.http.post("/api/v1/ai/text/generate",i,{headers:r}).pipe(Ai(()=>ho("Error fetching AI content")),ue(({response:o})=>(this.lastContentResponse=o,o)))}generateImage(e){const i=JSON.stringify({prompt:e}),r=new Cr({"Content-Type":"application/json"});return this.http.post("/api/v1/ai/image/generate",i,{headers:r}).pipe(Ai(()=>ho("Error fetching AI content")),ue(({response:o})=>(this.lastContentResponse=o,o)))}getLatestContent(){return this.lastContentResponse}getNewContent(e){return"aiContent"===e?this.generateContent(this.lastUsedPrompt):"dotImage"===e?this.generateImage(this.lastImagePrompt):void 0}createAndPublishContentlet(e){return this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:[{contentType:"dotAsset",asset:e,hostFolder:"",indexPolicy:"WAIT_FOR"}]}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(Oe("entity","results"),Ai(i=>ho(i)))}}ja.\u0275fac=function(e){return new(e||ja)(F(tr))},ja.\u0275prov=$({token:ja,factory:ja.\u0275fac});const Lce=["list"];function Rce(n,e){if(1&n&&(I(0,"h3"),Te(1),A()),2&n){const t=M(2);C(1),Ot(t.title)}}function Fce(n,e){if(1&n&&_e(0,"dot-suggestions-list-item",7),2&n){const t=M(),i=t.$implicit,r=t.index;b("command",i.command)("index",i.tabindex||r)("label",i.label)("url",i.icon)("data",i.data)("disabled",i.disabled)}}function jce(n,e){1&n&&_e(0,"div",8)}function zce(n,e){if(1&n&&(mt(0),E(1,Fce,1,6,"dot-suggestions-list-item",5),E(2,jce,1,0,"ng-template",null,6,Bn),gt()),2&n){const t=e.$implicit,i=Cn(3);C(1),b("ngIf","divider"!==t.id)("ngIfElse",i)}}function Vce(n,e){if(1&n&&(I(0,"div"),E(1,Rce,2,1,"h3",2),I(2,"dot-suggestion-list",null,3),E(4,zce,4,2,"ng-container",4),A()()),2&n){const t=M();C(1),b("ngIf",!!t.title),C(3),b("ngForOf",t.items)}}function Bce(n,e){if(1&n){const t=Qe();I(0,"dot-empty-message",9),de("back",function(){return ge(t),ye(M().handleBackButton())}),A()}if(2&n){const t=M();b("title",t.noResultsMessage)("showBackBtn",!t.isFilterActive)}}var cr=(()=>(function(n){n.BLOCK="block",n.CONTENTTYPE="contentType",n.CONTENT="content"}(cr||(cr={})),cr))();class zl{constructor(e,t,i){this.suggestionsService=e,this.dotLanguageService=t,this.cd=i,this.items=[],this.title="Select a block",this.noResultsMessage="No Results",this.currentLanguage=tg,this.allowedContentTypes="",this.contentletIdentifier="",this.isFilterActive=!1}onMouseDownHandler(e){e.preventDefault()}ngOnInit(){this.initialItems=this.items,this.itemsLoaded=cr.BLOCK,this.dotLanguageService.getLanguages().pipe(Tt(1)).subscribe(e=>this.dotLangs=e)}addContentletItem(){this.items=[{label:"Contentlets",icon:"receipt",command:()=>this.loadContentTypes()},...this.items],this.initialItems=this.items}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(e){this.list.updateSelection(e)}handleBackButton(){return this.itemsLoaded=this.itemsLoaded===cr.CONTENT?cr.CONTENTTYPE:cr.BLOCK,this.filterItems(),!1}filterItems(e=""){switch(this.itemsLoaded){case cr.BLOCK:this.items=this.initialItems.filter(t=>t.label.toLowerCase().includes(e.trim().toLowerCase()));break;case cr.CONTENTTYPE:this.loadContentTypes(e);break;case cr.CONTENT:this.loadContentlets(this.selectedContentType,e)}this.isFilterActive=!!e.length}loadContentTypes(e=""){this.suggestionsService.getContentTypes(e,this.allowedContentTypes).pipe(ue(t=>t.map(i=>({label:i.name,icon:i.icon,command:()=>{this.selectedContentType=i,this.itemsLoaded=cr.CONTENT,this.loadContentlets(i)}}))),Tt(1)).subscribe(t=>{this.items=t,this.itemsLoaded=cr.CONTENTTYPE,this.items.length?this.title="Select a content type":this.noResultsMessage="No results",this.cd.detectChanges()})}loadContentlets(e,t=""){this.suggestionsService.getContentlets({contentType:e.variable,filter:t,currentLanguage:this.currentLanguage,contentletIdentifier:this.contentletIdentifier}).pipe(Tt(1)).subscribe(i=>{this.items=i.map(r=>{const{languageId:o}=r;return r.language=this.getContentletLanguage(o),{label:r.title,icon:"contentlet/image",data:{contentlet:r},command:()=>{this.onSelectContentlet({payload:r,type:{name:"dotContent"}})}}}),this.items.length?this.title="Select a contentlet":this.noResultsMessage=`No results for ${e.name}`,this.cd.detectChanges()})}getContentletLanguage(e){const{languageCode:t,countryCode:i}=this.dotLangs[e];return t&&i?`${t}-${i}`:""}}zl.\u0275fac=function(e){return new(e||zl)(O(jl),O(Rl),O(qn))},zl.\u0275cmp=xe({type:zl,selectors:[["dot-suggestions"]],viewQuery:function(e,t){if(1&e&&hn(Lce,5),2&e){let i;Xe(i=et())&&(t.list=i.first)}},hostBindings:function(e,t){1&e&&de("mousedown",function(r){return t.onMouseDownHandler(r)})},inputs:{onSelectContentlet:"onSelectContentlet",items:"items",title:"title",noResultsMessage:"noResultsMessage",currentLanguage:"currentLanguage",allowedContentTypes:"allowedContentTypes",contentletIdentifier:"contentletIdentifier"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["emptyBlock",""],[4,"ngIf"],["list",""],[4,"ngFor","ngForOf"],[3,"command","index","label","url","data","disabled",4,"ngIf","ngIfElse"],["divider",""],[3,"command","index","label","url","data","disabled"],[1,"divider"],[3,"title","showBackBtn","back"]],template:function(e,t){if(1&e&&(E(0,Vce,5,2,"div",0),E(1,Bce,1,2,"ng-template",null,1,Bn)),2&e){const i=Cn(2);b("ngIf",t.items.length)("ngIfElse",i)}},styles:['[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#ffffff;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-size:16px;margin:8px 16px;color:#999}.suggestion-list-container[_ngcontent-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.material-icons[_ngcontent-%COMP%]{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.divider[_ngcontent-%COMP%]{border-top:#afb3c0 solid 1px;margin:.5rem 0}']});class TS{constructor({editor:e,element:t,view:i,tippyOptions:r={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:c,to:u})=>{const{doc:d,selection:h}=l,{empty:f}=h,p=!d.textBetween(c,u).length&&Sb(l.selection),m=this.element.contains(document.activeElement);return!(!a.hasFocus()&&!m||f||p||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;this.preventHide?this.preventHide=!1:a?.relatedTarget&&null!==(l=this.element.parentNode)&&void 0!==l&&l.contains(a.relatedTarget)||this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const c=!l?.selection.eq(a.state.selection),u=!l?.doc.eq(a.state.doc);!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,c,u,l)},this.updateDelay))},this.updateHandler=(a,l,c,u)=>{var d,h,f;const{state:p,composing:m}=a,{selection:g}=p;if(m||!l&&!c)return;this.createTooltip();const{ranges:v}=g,w=Math.min(...v.map(T=>T.$from.pos)),_=Math.max(...v.map(T=>T.$to.pos));(null===(d=this.shouldShow)||void 0===d?void 0:d.call(this,{editor:this.editor,view:a,state:p,oldState:u,from:w,to:_}))?(null===(h=this.tippy)||void 0===h||h.setProps({getReferenceClientRect:(null===(f=this.tippyOptions)||void 0===f?void 0:f.getReferenceClientRect)||(()=>{if(function Vle(n){return n instanceof Ye}(p.selection)){let T=a.nodeDOM(w);const ne=T.dataset.nodeViewWrapper?T:T.querySelector("[data-node-view-wrapper]");if(ne&&(T=ne.firstChild),T)return T.getBoundingClientRect()}return ru(a,w,_)})}),this.show()):this.hide()},this.editor=e,this.element=t,this.view=i,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=zo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:i}=e;if(this.updateDelay>0&&i.selection.$from.pos!==i.selection.$to.pos)return void this.handleDebouncedUpdate(e,t);const o=!t?.selection.eq(e.state.selection),s=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,s,t)}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;!(null===(e=this.tippy)||void 0===e)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const _5=n=>new $t({key:"string"==typeof n.pluginKey?new rn(n.pluginKey):n.pluginKey,view:e=>new TS({view:e,...n})}),SS=vn.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[_5({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class Rb{constructor(e){this._el=e,this.pluginKey="NgxTiptapBubbleMenu",this.tippyOptions={},this.shouldShow=null}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");this.editor.registerPlugin(_5({pluginKey:this.pluginKey,editor:this.editor,element:this._el.nativeElement,tippyOptions:this.tippyOptions,shouldShow:this.shouldShow}))}ngOnDestroy(){this.editor.unregisterPlugin(this.pluginKey)}}Rb.\u0275fac=function(e){return new(e||Rb)(O(kt))},Rb.\u0275dir=Me({type:Rb,selectors:[["tiptap-bubble-menu","editor",""],["","tiptapBubbleMenu","","editor",""]],inputs:{pluginKey:"pluginKey",editor:"editor",tippyOptions:"tippyOptions",shouldShow:"shouldShow"}});class Fb{constructor(){this.draggable=!0,this.handle=""}}Fb.\u0275fac=function(e){return new(e||Fb)},Fb.\u0275dir=Me({type:Fb,selectors:[["","tiptapDraggable",""]],hostVars:2,hostBindings:function(e,t){2&e&&Yt("draggable",t.draggable)("data-drag-handle",t.handle)}});class Nh{constructor(e,t){this.el=e,this._renderer=t,this.onChange=()=>{},this.onTouched=()=>{},this.handleChange=({transaction:i})=>{i.docChanged&&this.onChange(this.editor.getJSON())}}writeValue(e){e&&this.editor.chain().setContent(e,!0).run()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.editor.setEditable(!e),this._renderer.setProperty(this.el.nativeElement,"disabled",e)}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");const e=this.el.nativeElement.innerHTML;this.el.nativeElement.innerHTML="",this.el.nativeElement.appendChild(this.editor.options.element.firstChild),this.editor.setOptions({element:this.el.nativeElement}),e&&this.editor.chain().setContent(e,!1).run(),this.editor.on("blur",()=>{this.onTouched()}),this.editor.on("transaction",this.handleChange)}ngOnDestroy(){this.editor.destroy()}}Nh.\u0275fac=function(e){return new(e||Nh)(O(kt),O(Vr))},Nh.\u0275dir=Me({type:Nh,selectors:[["tiptap","editor",""],["","tiptap","","editor",""],["tiptap-editor","editor",""],["","tiptapEditor","","editor",""]],inputs:{editor:"editor"},features:[Nt([{provide:Dr,useExisting:Bt(()=>Nh),multi:!0}])]});class Uce{constructor({editor:e,element:t,view:i,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a})=>{const{selection:l}=a,{$anchor:c,empty:u}=l,d=1===c.depth,h=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!!(s.hasFocus()&&u&&d&&h&&this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;this.preventHide?this.preventHide=!1:s?.relatedTarget&&null!==(a=this.element.parentNode)&&void 0!==a&&a.contains(s.relatedTarget)||this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=e,this.element=t,this.view=i,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=zo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var i,r,o;const{state:s}=e,{doc:a,selection:l}=s,{from:c,to:u}=l;t&&t.doc.eq(a)&&t.selection.eq(l)||(this.createTooltip(),(null===(i=this.shouldShow)||void 0===i?void 0:i.call(this,{editor:this.editor,view:e,state:s,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>ru(e,c,u))}),this.show()):this.hide())}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;!(null===(e=this.tippy)||void 0===e)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const v5=n=>new $t({key:"string"==typeof n.pluginKey?new rn(n.pluginKey):n.pluginKey,view:e=>new Uce({view:e,...n})});vn.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[v5({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class jb{constructor(e){this._el=e,this.pluginKey="NgxTiptapFloatingMenu",this.tippyOptions={},this.shouldShow=null}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");this.editor.registerPlugin(v5({pluginKey:this.pluginKey,editor:this.editor,element:this._el.nativeElement,tippyOptions:this.tippyOptions,shouldShow:this.shouldShow}))}ngOnDestroy(){this.editor.unregisterPlugin(this.pluginKey)}}jb.\u0275fac=function(e){return new(e||jb)(O(kt))},jb.\u0275dir=Me({type:jb,selectors:[["tiptap-floating-menu","editor",""],["","tiptapFloatingMenu","","editor",""]],inputs:{pluginKey:"pluginKey",editor:"editor",tippyOptions:"tippyOptions",shouldShow:"shouldShow"}});class zb{constructor(){this.handle=""}}zb.\u0275fac=function(e){return new(e||zb)},zb.\u0275dir=Me({type:zb,selectors:[["","tiptapNodeViewContent",""]],hostVars:1,hostBindings:function(e,t){2&e&&Yt("data-node-view-content",t.handle)}});const b5={inode:"14dd5ad9-55ae-42a8-a5a7-e259b6d0901a",variantId:"DEFAULT",locked:!1,stInode:"d5ea385d-32ee-4f35-8172-d37f58d9cd7a",contentType:"Image",height:4e3,identifier:"93ca45e0-06d2-4eef-be1d-79bd6bf0fc99",hasTitleImage:!0,sortOrder:0,hostName:"demo.dotcms.com",extension:"jpg",isContent:!0,baseType:"FILEASSETS",archived:!1,working:!0,live:!0,isContentlet:!0,languageId:1,titleImage:"fileAsset",hasLiveVersion:!0,deleted:!1,folder:"",host:"",modDate:"",modUser:"",modUserName:"",owner:"",title:"",url:"",contentTypeIcon:"assessment",__icon__:"Icon"};class eg{transform({live:e,working:t,deleted:i,hasLiveVersion:r}){return{live:e,working:t,deleted:i,hasLiveVersion:r}}}eg.\u0275fac=function(e){return new(e||eg)},eg.\u0275pipe=Wn({name:"contentletState",type:eg,pure:!0});const ES="menuFloating";class Wce{constructor({editor:e,view:t,render:i,command:r,key:o}){this.invalidNodes=["codeBlock","blockquote"],this.editor=e,this.view=t,this.editor.on("focus",()=>{this.update(this.editor.view)}),this.render=i,this.command=r,this.key=o}update(e,t){const i=this.key?.getState(e.state),r=t?this.key?.getState(t):null;if(i.open){const{from:o,to:s}=this.editor.state.selection,a=ru(this.view,o,s);this.render().onStart({clientRect:()=>a,range:{from:o,to:s},editor:this.editor,command:this.command})}else r&&r.open&&this.render().onExit(null)}}const w5=new rn(ES),Gce=n=>new $t({key:w5,view:e=>new Wce({key:w5,view:e,...n}),state:{init:()=>({open:!1}),apply(e){const t=e.getMeta(ES);return t?.open?{open:t?.open}:{open:!1}}},props:{handleKeyDown(e,t){const{open:i,range:r}=this.getState(e.state);return!!i&&n.render().onKeyDown({event:t,range:r,view:e})}}}),Jce={paragrah:!0,text:!0,doc:!0},C5={image:{image:!0,dotImage:!0},table:{table:!0,tableRow:!0,tableHeader:!0,tableCell:!0},orderedList:{orderedList:!0,listItem:!0},bulletList:{bulletList:!0,listItem:!0},video:{dotVideo:!0,youtube:!0}},Xce=(n,e)=>{const{type:t,attrs:i}=n;return"heading"===t&&e[t+i.level]},D5=(n,e)=>{if(!n?.length)return n;const t=[];for(const i in n){const r=n[i];(e[r.type]||Xce(r,e))&&t.push({...r,content:D5(r.content,e)})}return t},nue=new RegExp(/]*)>(\s|\n|]*src="[^"]*"[^>]*>)*?<\/a>/gm),xS=new RegExp(/]*src="[^"]*"[^>]*>/gm),uu=(n,e)=>{let i,t=n.depth;do{if(i=n.node(t),i){if(Array.isArray(e)&&e.includes(i.type.name))break;t--}}while(t>0&&i);return i},Vb=n=>{const e=n.match(xS)||[];return(new DOMParser).parseFromString(n,"text/html").documentElement.textContent.trim().length>0?n.replace(xS,"")+e.join(""):e.join("")},M5=n=>{const{state:e}=n,{doc:t}=e.tr,i=e.selection.to,r=it.create(t,i,i);n.dispatch(e.tr.setSelection(r))},T5=n=>/^https?:\/\/.+\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(n);class du extends ki{constructor(e,t){super(),this.STEP_TYPE="setDocAttr",this.key=e,this.value=t}get stepType(){return this.STEP_TYPE}static fromJSON(e,t){return new du(t.key,t.value)}static register(){try{ki.jsonID(this.prototype.STEP_TYPE,du)}catch(e){if(e.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw e}return!0}apply(e){return this.prevValue=e.attrs[this.key],e.attrs===e.type.defaultAttrs&&(e.attrs=Object.assign({},e.attrs)),e.attrs[this.key]=this.value,ci.ok(e)}invert(){return new du(this.key,this.prevValue)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}}class Bb extends ki{constructor(){super(),this.STEP_TYPE="restoreDefaultDOMAttrs"}get stepType(){return this.STEP_TYPE}static register(){try{ki.jsonID(this.prototype.STEP_TYPE,Bb)}catch(e){if(e.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw e}return!0}apply(e){return e.attrs=Object.assign({},e.type.defaultAttrs),ci.ok(e)}invert(){return new Bb}map(){return this}toJSON(){return{stepType:this.stepType}}}const tg=1;var Wi=(()=>(function(n){n.DOT_IMAGE="dotImage",n.LIST_ITEM="listItem",n.BULLET_LIST="bulletList",n.ORDERED_LIST="orderedList",n.BLOCKQUOTE="blockquote",n.CODE_BLOCK="codeBlock",n.DOC="doc",n.DOT_CONTENT="dotContent",n.PARAGRAPH="paragraph",n.HARD_BREAK="hardBreak",n.HEADING="heading",n.HORIZONTAL_RULE="horizontalRule",n.TEXT="text",n.TABLE_CELL="tableCell"}(Wi||(Wi={})),Wi))();const hue=[Wi.DOT_IMAGE,Wi.DOT_CONTENT];function S5({editor:n,range:e,props:t,customBlocks:i}){const{type:r,payload:o}=t,s={dotContent:()=>{n.chain().addContentletBlock({range:e,payload:o}).addNextLine().run()},heading:()=>{n.chain().addHeading({range:e,type:r}).run()},table:()=>{n.commands.openForm([{key:"rows",label:"Rows",required:!0,value:"3",controlType:"number",type:"number",min:1},{key:"columns",label:"Columns",required:!0,value:"3",controlType:"number",type:"number",min:1},{key:"header",label:"Add Row Header",required:!1,value:!0,controlType:"text",type:"checkbox"}],{customClass:"dotTableForm"}).pipe(Tt(1),ni(a=>!!a)).subscribe(a=>{requestAnimationFrame(()=>{n.chain().insertTable({rows:a.rows,cols:a.columns,withHeaderRow:!!a.header}).focus().run()})})},orderedList:()=>{n.chain().deleteRange(e).toggleOrderedList().focus().run()},bulletList:()=>{n.chain().deleteRange(e).toggleBulletList().focus().run()},blockquote:()=>{n.chain().deleteRange(e).setBlockquote().focus().run()},codeBlock:()=>{n.chain().deleteRange(e).setCodeBlock().focus().run()},horizontalRule:()=>{n.chain().deleteRange(e).setHorizontalRule().focus().run()},image:()=>n.commands.openAssetForm({type:"image"}),subscript:()=>n.chain().setSubscript().focus().run(),superscript:()=>n.chain().setSuperscript().focus().run(),video:()=>n.commands.openAssetForm({type:"video"}),aiContentPrompt:()=>n.commands.openAIPrompt(),aiContent:()=>n.commands.insertAINode(),aiImagePrompt:()=>n.commands.openImagePrompt()};E5(i).forEach(a=>{s[a.id]=()=>{try{n.commands[a.commandKey]()}catch{console.warn(`Custom command ${a.commandKey} does not exists.`)}}}),s[r.name]?s[r.name]():n.chain().setTextSelection(e).focus().run()}function E5(n){return n.extensions.map(e=>function pue(n){return n.map(e=>({icon:e.icon,label:e.menuLabel,commandKey:e.command,id:`${e.command}-id`}))}(e.actions||[])).flat()}const mue=(n,e)=>{let t,i;const r=new rn("suggestionPlugin"),o=new ae;let s=!0;function a({editor:g,range:y,clientRect:v}){s&&(function c(g,y){const{allowedBlocks:v,allowedContentTypes:w,lang:_,contentletIdentifier:N}=g.storage.dotConfig,ne=function u({allowedBlocks:g=[],editor:y,range:v}){const _=[...g.length?vv.filter(N=>g.includes(N.id)):vv,...E5(e)];return _.forEach(N=>N.command=()=>function d({item:g,editor:y,range:v}){const{id:w,attributes:_}=g,N={type:{name:w.includes("heading")?"heading":w,..._}};pR({type:cr.BLOCK,editor:y,range:v,suggestionKey:r,ItemsType:cr}),h({editor:y,range:v,props:N})}({item:N,editor:y,range:v})),_}({allowedBlocks:v.length>1?v:[],editor:g,range:y});i=n.createComponent(zl),i.instance.items=ne,i.instance.currentLanguage=_,i.instance.allowedContentTypes=w,i.instance.contentletIdentifier=N,i.instance.onSelectContentlet=K=>{pR({type:cr.CONTENT,editor:g,range:y,suggestionKey:r,ItemsType:cr}),h({editor:g,range:y,props:K})},i.changeDetectorRef.detectChanges(),(v.length<=1||v.includes("dotContent"))&&i.instance.addContentletItem()}(g,y),t=function fue({element:n,content:e,rect:t,onHide:i}){return zo(n,{content:e,placement:"bottom",popperOptions:{modifiers:$X},getReferenceClientRect:t,showOnCreate:!0,interactive:!0,offset:[120,10],trigger:"manual",maxWidth:"none",onHide:i})}({element:g.options.element.parentElement,content:i.location.nativeElement,rect:v,onHide:()=>{g.commands.focus();const w=f({editor:g,range:y});"/"===g.state.doc.textBetween(w.from,w.to," ")&&g.commands.deleteRange(w);const N=g.state.tr.setMeta(ES,{open:!1});g.view.dispatch(N),g.commands.freezeScroll(!1)}}))}function l({editor:g}){g.commands.freezeScroll(!0);const y=uu(g.view.state.selection.$from,[Wi.TABLE_CELL])?.type.name===Wi.TABLE_CELL,v=uu(g.view.state.selection.$from,[Wi.CODE_BLOCK])?.type.name===Wi.CODE_BLOCK;s=!y&&!v}function h({editor:g,range:y,props:v}){S5({editor:g,range:f({editor:g,range:y}),props:v,customBlocks:e})}function f({editor:g,range:y}){const v=r.getState(g.view.state).query?.length||0;return y.to=y.to+v,y}function p({event:g}){const{key:y}=g;return"Escape"===y?(g.stopImmediatePropagation(),t.hide(),!0):"Enter"===y?(i.instance.execCommand(),!0):("ArrowDown"===y||"ArrowUp"===y)&&(i.instance.updateSelection(g),!0)}function m({editor:g}){t?.destroy(),g.commands.freezeScroll(!1),i?.destroy(),i=null,o.next(!0),o.complete()}return vn.create({name:"actionsMenu",addOptions:()=>({pluginKey:"actionsMenu",element:null,suggestion:{char:"/",pluginKey:r,allowSpaces:!0,startOfLine:!0,render:()=>({onBeforeStart:l,onStart:a,onKeyDown:p,onExit:m}),items:({query:g})=>(i&&i.instance.filterItems(g),[])}}),addCommands:()=>({addHeading:({range:g,type:y})=>({chain:v})=>v().focus().deleteRange(g).toggleHeading({level:y.level}).focus().run(),addContentletBlock:({range:g,payload:y})=>({chain:v})=>v().deleteRange(g).command(w=>{const _=w.editor.schema.nodes.dotContent.create({data:y});return w.tr.replaceSelectionWith(_),!0}).run(),addNextLine:()=>({chain:g})=>g().command(y=>{const{selection:v}=y.state;return y.commands.insertContentAt(v.head,{type:"paragraph"}),!0}).focus().run()}),addProseMirrorPlugins(){return[Gce({command:S5,editor:this.editor,render:()=>({onStart:a,onKeyDown:p,onExit:m})}),dce({editor:this.editor,...this.options.suggestion})]}})};function gue(n,e){if(1&n){const t=Qe();I(0,"div",5)(1,"dot-asset-search",6),de("addAsset",function(r){return ge(t),ye(M().onSelectAsset(r))}),A()()}if(2&n){const t=M();C(1),b("type",t.type)("languageId",t.languageId)}}function yue(n,e){if(1&n){const t=Qe();I(0,"div",5)(1,"dot-upload-asset",7),de("uploadedFile",function(r){return ge(t),ye(M().onSelectAsset(r))})("preventClose",function(r){return ge(t),ye(M().onPreventClose(r))})("hide",function(r){return ge(t),ye(M().onHide(r))}),A()()}if(2&n){const t=M();C(1),b("type",t.type)}}function _ue(n,e){if(1&n){const t=Qe();I(0,"div",5)(1,"dot-external-asset",8),de("addAsset",function(r){return ge(t),ye(M().onSelectAsset(r))}),A()()}if(2&n){const t=M();C(1),b("type",t.type)}}class Ph{constructor(){this.languageId=tg,this.disableTabs=!1}onPreventClose(e){this.preventClose(e),this.disableTabs=e}}Ph.\u0275fac=function(e){return new(e||Ph)},Ph.\u0275cmp=xe({type:Ph,selectors:[["dot-asset-form"]],inputs:{languageId:"languageId",type:"type",onSelectAsset:"onSelectAsset",preventClose:"preventClose",onHide:"onHide"},decls:8,vars:8,consts:[[1,"tabview-container"],["header","Library","leftIcon","pi pi-images",3,"cache","disabled"],["pTemplate","content"],["leftIcon","pi pi-folder",3,"cache","header","disabled"],["leftIcon","pi pi-link",3,"cache","header","disabled"],[1,"wrapper"],[3,"type","languageId","addAsset"],[3,"type","uploadedFile","preventClose","hide"],[3,"type","addAsset"]],template:function(e,t){1&e&&(I(0,"div",0)(1,"p-tabView")(2,"p-tabPanel",1),E(3,gue,2,2,"ng-template",2),A(),I(4,"p-tabPanel",3),E(5,yue,2,1,"ng-template",2),A(),I(6,"p-tabPanel",4),E(7,_ue,2,1,"ng-template",2),A()()()),2&e&&(C(2),b("cache",!1)("disabled",t.disableTabs),C(2),b("cache",!1)("header","Upload "+t.type)("disabled",t.disableTabs),C(2),b("cache",!1)("header",t.type+" URL")("disabled",t.disableTabs))},styles:["[_nghost-%COMP%]{border:1px solid #afb3c0;display:block}.tabview-container[_ngcontent-%COMP%]{width:720px;background:#ffffff}.wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .p-tabview-nav{padding:0 2rem}[_nghost-%COMP%] .p-tabview-panel{height:25rem}"],changeDetection:0});class vue{constructor({editor:e,view:t,pluginKey:i,render:r}){this.editor=e,this.view=t,this.pluginKey=i,this.render=r,this.editor.on("focus",()=>this.render().onHide(this.editor))}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1},{state:o}=e,{selection:s}=o;i?.open!==r?.open&&(i?.open?this.render().onStart({editor:this.editor,type:i.type,getPosition:()=>{const{from:a,to:l}=s;return ru(e,a,l)}}):this.render().onHide(this.editor))}destroy(){this.render().onDestroy()}}const bue=n=>new $t({key:n.pluginKey,view:e=>new vue({view:e,...n}),state:{init:()=>({open:!1,type:null}),apply(e,t,i){const{open:r,type:o}=e.getMeta(n.pluginKey)||{},s=n.pluginKey?.getState(i);return"boolean"==typeof r?{open:r,type:o}:s||t}}}),Ub=new rn("bubble-image-form"),wue={interactive:!0,duration:0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},Cue=n=>{let e,t,i,r=!1;function o({editor:d,type:h,getPosition:f}){(function l(d){const{element:h}=d.options;e||!!!h.parentElement||(e=zo(h.parentElement,wue))})(d),function c(d,h){t=n.createComponent(Ph),t.instance.languageId=d.storage.dotConfig.lang,t.instance.type=h,t.instance.onSelectAsset=f=>{u(d,!1),d.chain().insertAsset({type:h,payload:f}).addNextLine().closeAssetForm().run()},t.instance.preventClose=f=>u(d,f),t.instance.onHide=()=>{u(d,!1),s(d)},i=t.location.nativeElement,t.changeDetectorRef.detectChanges()}(d,h),e.setProps({content:i,getReferenceClientRect:f,onClickOutside:()=>s(d)}),e.show()}function s(d){r||(d.commands.closeAssetForm(),e?.hide(),t?.destroy())}function a(){e?.destroy(),t?.destroy()}function u(d,h){r=h,d.setOptions({editable:!h})}return SS.extend({name:"bubbleAssetForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Ub}),addCommands:()=>({openAssetForm:({type:d})=>({chain:h})=>h().command(({tr:f})=>(f.setMeta(Ub,{open:!0,type:d}),!0)).freezeScroll(!0).run(),closeAssetForm:()=>({chain:d})=>d().command(({tr:h})=>(h.setMeta(Ub,{open:!1}),!0)).freezeScroll(!1).run(),insertAsset:({type:d,payload:h,position:f})=>({chain:p})=>{switch(d){case"video":return"string"==typeof h&&p().setYoutubeVideo({src:h}).run()||p().insertVideo(h,f).run();case"image":return p().insertImage(h,f).run()}}}),addProseMirrorPlugins(){return[bue({pluginKey:Ub,editor:this.editor,render:()=>({onStart:o,onHide:s,onDestroy:a})})]}})};class ng{}ng.\u0275fac=function(e){return new(e||ng)},ng.\u0275mod=rt({type:ng}),ng.\u0275inj=wt({imports:[zn]});class hu{}hu.\u0275fac=function(e){return new(e||hu)},hu.\u0275mod=rt({type:hu}),hu.\u0275inj=wt({imports:[zn]});const Due=function(n,e,t){return{"border-width":n,width:e,height:t}};class Lh{constructor(){this.borderSize="",this.size=""}}Lh.\u0275fac=function(e){return new(e||Lh)},Lh.\u0275cmp=xe({type:Lh,selectors:[["dot-spinner"]],inputs:{borderSize:"borderSize",size:"size"},decls:1,vars:5,consts:[[3,"ngStyle"]],template:function(e,t){1&e&&_e(0,"div",0),2&e&&b("ngStyle",nl(1,Due,t.borderSize,t.size,t.size))},dependencies:[wr],styles:["div[_ngcontent-%COMP%]{border-radius:50%;width:2.5rem;height:2.5rem;display:inline-block;vertical-align:middle;font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid var(--color-palette-primary-op-20);border-left-color:var(--color-palette-primary-500);transform:translateZ(0);animation:_ngcontent-%COMP%_load8 1.1s infinite linear;overflow:hidden}.edit-page-variant-mode [_nghost-%COMP%] div[_ngcontent-%COMP%]{border:.5rem solid var(--color-palette-white-op-20);border-left-color:var(--color-palette-white-op-90)}@keyframes _ngcontent-%COMP%_load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]});class Hb{constructor(){this.fileDropped=new ie,this.fileDragEnter=new ie,this.fileDragOver=new ie,this.fileDragLeave=new ie,this._accept=[],this._validity={fileTypeMismatch:!1,maxFileSizeExceeded:!1,multipleFilesDropped:!1,valid:!0}}set accept(e){this._accept=e?.filter(t=>"*/*"!==t).map(t=>t.toLowerCase().replace(/\*/g,""))}get validity(){return this._validity}onDrop(e){e.stopPropagation(),e.preventDefault();const{dataTransfer:t}=e,i=this.getFiles(t),r=1===i?.length?i[0]:null;0!==i.length&&(this.setValidity(i),t.items?.clear(),t.clearData(),this.fileDropped.emit({file:r,validity:this._validity}))}onDragEnter(e){e.stopPropagation(),e.preventDefault(),this.fileDragEnter.emit(!0)}onDragOver(e){e.stopPropagation(),e.preventDefault(),this.fileDragOver.emit(!0)}onDragLeave(e){e.stopPropagation(),e.preventDefault(),this.fileDragLeave.emit(!0)}typeMatch(e){if(!this._accept.length)return!0;const t=e.name.split(".").pop().toLowerCase(),i=e.type.toLowerCase();return this._accept.some(o=>i.includes(o)||o.includes(`.${t}`))}getFiles(e){const{items:t,files:i}=e;return t?Array.from(t).filter(r=>"file"===r.kind).map(r=>r.getAsFile()):Array.from(i)||[]}isFileTooLong(e){return!!this.maxFileSize&&e.size>this.maxFileSize}setValidity(e){const t=e[0],i=e.length>1,r=!this.typeMatch(t),o=this.isFileTooLong(t);this._validity={...this._validity,multipleFilesDropped:i,fileTypeMismatch:r,maxFileSizeExceeded:o,valid:!r&&!o&&!i}}}Hb.\u0275fac=function(e){return new(e||Hb)},Hb.\u0275cmp=xe({type:Hb,selectors:[["dot-drop-zone"]],hostBindings:function(e,t){1&e&&de("drop",function(r){return t.onDrop(r)})("dragenter",function(r){return t.onDragEnter(r)})("dragover",function(r){return t.onDragOver(r)})("dragleave",function(r){return t.onDragLeave(r)})},inputs:{maxFileSize:"maxFileSize",accept:"accept"},outputs:{fileDropped:"fileDropped",fileDragEnter:"fileDragEnter",fileDragOver:"fileDragOver",fileDragLeave:"fileDragLeave"},standalone:!0,features:[tl],ngContentSelectors:["*"],decls:1,vars:0,template:function(e,t){1&e&&(So(),_r(0))},dependencies:[zn],changeDetection:0});class $b{}$b.\u0275fac=function(e){return new(e||$b)},$b.\u0275cmp=xe({type:$b,selectors:[["dot-icon"]],inputs:{name:"name",size:"size"},decls:2,vars:3,consts:[[1,"material-icons"]],template:function(e,t){1&e&&(I(0,"i",0),Te(1),A()),2&e&&(mc("font-size",t.size,"px"),C(1),Ot(t.name))},styles:["[_nghost-%COMP%]{display:inline-flex}[tiny][_nghost-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}[big][_nghost-%COMP%] i[_ngcontent-%COMP%]{font-size:24px}[inverted][_nghost-%COMP%] i[_ngcontent-%COMP%]{color:#fff}[_nghost-%COMP%] i[_ngcontent-%COMP%]{font-size:1.571428571rem;-webkit-user-select:none;user-select:none}"]});class fu{constructor(e){this.dotMessageService=e}transform(e,t=[]){return e?this.dotMessageService.get(e,...t):""}}fu.\u0275fac=function(e){return new(e||fu)(O(ps,16))},fu.\u0275pipe=Wn({name:"dm",type:fu,pure:!0,standalone:!0});const Tue=function(n){return[n]};function Sue(n,e){if(1&n&&_e(0,"i",6),2&n){const t=M();b("ngClass",xt(1,Tue,t.configuration.icon))}}function Eue(n,e){if(1&n&&(I(0,"h2",7),Te(1),A()),2&n){const t=M();C(1),Vi(" ",null==t.configuration?null:t.configuration.subtitle," ")}}function xue(n,e){if(1&n){const t=Qe();I(0,"p-button",10),de("onClick",function(){return ge(t),ye(M(2).buttonAction.emit())}),A()}2&n&&b("label",M(2).buttonLabel)}function Iue(n,e){1&n&&(I(0,"span"),Te(1),is(2,"dm"),A()),2&n&&(C(1),Ot(rs(2,1,"dot.common.or.text")))}function Oue(n,e){if(1&n&&(mt(0),E(1,Iue,3,3,"span",5),I(2,"a",11),Te(3),is(4,"dm"),A(),gt()),2&n){const t=M(2);C(1),b("ngIf",!t.hideContactUsLink&&t.buttonLabel),C(2),Ot(rs(4,2,"Contact-Us-for-more-Information"))}}function Aue(n,e){if(1&n&&(mt(0),I(1,"div",8),E(2,xue,1,1,"p-button",9),E(3,Oue,5,4,"ng-container",5),A(),gt()),2&n){const t=M();C(2),b("ngIf",t.buttonLabel),C(1),b("ngIf",!t.hideContactUsLink)}}class Wb{constructor(){this.hideContactUsLink=!1,this.buttonAction=new ie}}Wb.\u0275fac=function(e){return new(e||Wb)},Wb.\u0275cmp=xe({type:Wb,selectors:[["dot-empty-container"]],inputs:{configuration:"configuration",buttonLabel:"buttonLabel",hideContactUsLink:"hideContactUsLink"},outputs:{buttonAction:"buttonAction"},standalone:!0,features:[tl],decls:7,vars:4,consts:[[1,"message__wrapper","flex","gap-4","flex-column","w-30rem"],["data-Testid","message-principal",1,"message__principal-wrapper","flex","align-items-center","flex-column","gap-2"],["class","message__icon pi","data-Testid","message-icon",3,"ngClass",4,"ngIf"],["data-Testid","message-title",1,"message__title"],["class","message__subtitle","data-Testid","message-subtitle",4,"ngIf"],[4,"ngIf"],["data-Testid","message-icon",1,"message__icon","pi",3,"ngClass"],["data-Testid","message-subtitle",1,"message__subtitle"],["data-Testid","message-extra",1,"message__extra-wrapper","flex","align-items-center","flex-column","gap-2"],["data-Testid","message-button",3,"label","onClick",4,"ngIf"],["data-Testid","message-button",3,"label","onClick"],["data-Testid","message-contact-link","href","https://dotcms.com/contact-us/","target","_blank",1,"message__external-link"]],template:function(e,t){1&e&&(I(0,"div",0)(1,"div",1),E(2,Sue,1,3,"i",2),I(3,"h1",3),Te(4),A(),E(5,Eue,2,1,"h2",4),A(),E(6,Aue,4,2,"ng-container",5),A()),2&e&&(C(2),b("ngIf",null==t.configuration?null:t.configuration.icon),C(2),Ot(null==t.configuration?null:t.configuration.title),C(1),b("ngIf",null==t.configuration?null:t.configuration.subtitle),C(1),b("ngIf",!t.hideContactUsLink||t.buttonLabel))},dependencies:[ks,eT,nn,gi,fu],styles:["[_nghost-%COMP%]{height:100%;display:flex;justify-content:center;align-content:center;flex-wrap:wrap}.message__title[_ngcontent-%COMP%], .message__subtitle[_ngcontent-%COMP%]{margin:0;text-align:center;line-height:140%}.message__title[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:700;color:#14151a}.message__subtitle[_ngcontent-%COMP%]{font-size:1rem;font-weight:400;color:#6c7389}.message__icon[_ngcontent-%COMP%]{font-size:3rem;padding:.75rem;color:#6c7389}.message__external-link[_ngcontent-%COMP%]{color:#14151a;text-align:center;font-size:1rem;font-weight:400}"],changeDetection:0});let ig=(()=>{class n{constructor(t,i,r,o,s){this.el=t,this.zone=i,this.config=r,this.renderer=o,this.changeDetector=s,this.escape=!0,this.autoHide=!0,this.fitContent=!0,this._tooltipOptions={tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",tooltipZIndex:"auto",escape:!0,positionTop:0,positionLeft:0,autoHide:!0}}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this.deactivate()}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{if("hover"===this.getOption("tooltipEvent"))this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener);else if("focus"===this.getOption("tooltipEvent")){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let t=this.getTarget(this.el.nativeElement);t.addEventListener("focus",this.focusListener),t.addEventListener("blur",this.blurListener)}})}ngOnChanges(t){t.tooltipPosition&&this.setOption({tooltipPosition:t.tooltipPosition.currentValue}),t.tooltipEvent&&this.setOption({tooltipEvent:t.tooltipEvent.currentValue}),t.appendTo&&this.setOption({appendTo:t.appendTo.currentValue}),t.positionStyle&&this.setOption({positionStyle:t.positionStyle.currentValue}),t.tooltipStyleClass&&this.setOption({tooltipStyleClass:t.tooltipStyleClass.currentValue}),t.tooltipZIndex&&this.setOption({tooltipZIndex:t.tooltipZIndex.currentValue}),t.escape&&this.setOption({escape:t.escape.currentValue}),t.showDelay&&this.setOption({showDelay:t.showDelay.currentValue}),t.hideDelay&&this.setOption({hideDelay:t.hideDelay.currentValue}),t.life&&this.setOption({life:t.life.currentValue}),t.positionTop&&this.setOption({positionTop:t.positionTop.currentValue}),t.positionLeft&&this.setOption({positionLeft:t.positionLeft.currentValue}),t.disabled&&this.setOption({disabled:t.disabled.currentValue}),t.text&&(this.setOption({tooltipLabel:t.text.currentValue}),this.active&&(t.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),t.autoHide&&this.setOption({autoHide:t.autoHide.currentValue}),t.tooltipOptions&&(this._tooltipOptions={...this._tooltipOptions,...t.tooltipOptions.currentValue},this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(t){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(t){(this.isAutoHide()||!(ce.hasClass(t.toElement,"p-tooltip")||ce.hasClass(t.toElement,"p-tooltip-arrow")||ce.hasClass(t.toElement,"p-tooltip-text")||ce.hasClass(t.relatedTarget,"p-tooltip")))&&this.deactivate()}onFocus(t){this.activate()}onBlur(t){this.deactivate()}onInputClick(t){this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let t=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},t)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div");let t=document.createElement("div");t.className="p-tooltip-arrow",this.container.appendChild(t),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),"body"===this.getOption("appendTo")?document.body.appendChild(this.container):"target"===this.getOption("appendTo")?ce.appendChild(this.container,this.el.nativeElement):ce.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()||this.bindContainerMouseleaveListener()}bindContainerMouseleaveListener(){this.containerMouseleaveListener||(this.containerMouseleaveListener=this.renderer.listen(this.container??this.container.nativeElement,"mouseleave",i=>{this.deactivate()}))}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),ce.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?jd.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&&jd.clear(this.container),this.remove()}updateText(){this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(this.getOption("tooltipLabel")))):this.tooltipText.innerHTML=this.getOption("tooltipLabel")}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()))}}getHostOffset(){if("body"===this.getOption("appendTo")||"target"===this.getOption("appendTo")){let t=this.el.nativeElement.getBoundingClientRect();return{left:t.left+ce.getWindowScrollLeft(),top:t.top+ce.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let t=this.getHostOffset(),i=t.left+ce.getOuterWidth(this.el.nativeElement),r=t.top+(ce.getOuterHeight(this.el.nativeElement)-ce.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let t=this.getHostOffset(),i=t.left-ce.getOuterWidth(this.container),r=t.top+(ce.getOuterHeight(this.el.nativeElement)-ce.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let t=this.getHostOffset(),i=t.left+(ce.getOuterWidth(this.el.nativeElement)-ce.getOuterWidth(this.container))/2,r=t.top-ce.getOuterHeight(this.container);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let t=this.getHostOffset(),i=t.left+(ce.getOuterWidth(this.el.nativeElement)-ce.getOuterWidth(this.container))/2,r=t.top+ce.getOuterHeight(this.el.nativeElement);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(t){this._tooltipOptions={...this._tooltipOptions,...t}}getOption(t){return this._tooltipOptions[t]}getTarget(t){return ce.hasClass(t,"p-inputwrapper")?ce.findSingle(t,"input"):t}preAlign(t){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+t;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let t=this.container.getBoundingClientRect(),i=t.top,r=t.left,o=ce.getOuterWidth(this.container),s=ce.getOuterHeight(this.container),a=ce.getViewport();return r+o>a.width||r<0||i<0||i+s>a.height}onWindowResize(t){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new TL(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){if("hover"===this.getOption("tooltipEvent"))this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener);else if("focus"===this.getOption("tooltipEvent")){let t=this.getTarget(this.el.nativeElement);t.removeEventListener("focus",this.focusListener),t.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&("body"===this.getOption("appendTo")?document.body.removeChild(this.container):"target"===this.getOption("appendTo")?this.el.nativeElement.removeChild(this.container):ce.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&jd.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(Jt),O(zd),O(Vr),O(qn))},n.\u0275dir=Me({type:n,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",autoHide:"autoHide",fitContent:"fitContent",text:["pTooltip","text"],disabled:["tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[Ji]}),n})(),rg=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();const kue=function(n){return{"dot-tab-dropdown--active":n}};function Nue(n,e){if(1&n){const t=Qe();I(0,"button",7),de("click",function(r){ge(t);const o=M().$implicit;return ye(M().onClickDropdown(r,o.value.id))}),_e(1,"i",8),A()}if(2&n){const t=M().$implicit,i=M();b("disabled",t.disabled)("aria-disabled",t.disabled)("ngClass",xt(5,kue,i.activeId===t.value.id)),C(1),Dn(t.value.toggle?i.dropDownOpenIcon:i.dropDownCloseIcon)}}function Pue(n,e){1&n&&_e(0,"div",9)}const Lue=function(n,e){return{"dot-tab--active":n,"dot-tab__button--right":e}};function Rue(n,e){if(1&n){const t=Qe();I(0,"div",2)(1,"div",3)(2,"button",4),de("click",function(r){const s=ge(t).$implicit;return ye(M().onClickOption(r,s.value.id))}),is(3,"dm"),Te(4),A(),E(5,Nue,2,7,"button",5),A(),E(6,Pue,1,0,"div",6),A()}if(2&n){const t=e.$implicit,i=M();C(2),b("ngClass",Mi(10,Lue,i.activeId===t.value.id,t.value.showDropdownButton))("value",t.value.id)("disabled",t.disabled)("item.disabled",t.disabled)("pTooltip",rs(3,8,"editpage.toolbar."+t.label.toLowerCase()+".page.clipboard")),C(2),Vi(" ",t.label," "),C(1),b("ngIf",t.value.showDropdownButton),C(1),b("ngIf",i.activeId===t.value.id)}}class Gb{constructor(){this.openMenu=new ie,this.clickOption=new ie,this.dropdownClick=new ie,this._options=[],this.dropDownOpenIcon="pi pi-angle-up",this.dropDownCloseIcon="pi pi-angle-down"}ngOnChanges(e){e.options&&(this._options=this.options.map(t=>({...t,value:{...t.value,toggle:!t.value.showDropdownButton&&void 0}})))}onClickOption(e,t){t!==this.activeId&&this.clickOption.emit({event:e,optionId:t})}onClickDropdown(e,t){if(!this.shouldOpenMenu(t))return;this._options=this._options.map(o=>(t.includes(o.value.id)&&(o.value.toggle=!o.value.toggle),o));const r=e?.target?.closest(".dot-tab");this.openMenu.emit({event:e,menuId:t,target:r})}resetDropdowns(){this._options=this._options.map(e=>(e.value.toggle=!1,e))}resetDropdownById(e){this._options=this._options.map(t=>(t.value.id===e&&(t.value.toggle=!1),t))}shouldOpenMenu(e){return Boolean(this._options.find(t=>t.value.id===e&&t.value.showDropdownButton))}}function Fue(n,e){if(1&n&&(I(0,"small",1),Te(1),is(2,"dm"),A()),2&n){const t=M();C(1),Vi(" ",rs(2,1,t.errorMsg),"\n")}}Gb.\u0275fac=function(e){return new(e||Gb)},Gb.\u0275cmp=xe({type:Gb,selectors:[["dot-tab-buttons"]],inputs:{activeId:"activeId",options:"options"},outputs:{openMenu:"openMenu",clickOption:"clickOption",dropdownClick:"dropdownClick"},standalone:!0,features:[Ji,tl],decls:2,vars:1,consts:[[1,"dot-tab-buttons"],["class","dot-tab-buttons__container",4,"ngFor","ngForOf"],[1,"dot-tab-buttons__container"],["data-testId","dot-tab-container",1,"dot-tab"],["data-testId","dot-tab-button-text","tooltipPosition","bottom",1,"dot-tab__button",3,"ngClass","value","disabled","item.disabled","pTooltip","click"],["class","dot-tab__dropdown","data-testId","dot-tab-button-dropdown",3,"disabled","aria-disabled","ngClass","click",4,"ngIf"],["class","dot-tab-indicator","data-testId","dot-tab-button",4,"ngIf"],["data-testId","dot-tab-button-dropdown",1,"dot-tab__dropdown",3,"disabled","aria-disabled","ngClass","click"],["data-testId","dot-tab-icon",1,"dot-tab-dropdown__icon","pi"],["data-testId","dot-tab-button",1,"dot-tab-indicator"]],template:function(e,t){1&e&&(I(0,"div",0),E(1,Rue,7,13,"div",1),A()),2&e&&(C(1),b("ngForOf",t._options))},dependencies:[Hr,ks,nn,gi,rg,ig,fu],styles:[".dot-tab-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;margin-right:2rem;font-size:1rem}.dot-tab-buttons__container[_ngcontent-%COMP%]{position:relative}.dot-tab[_ngcontent-%COMP%]{display:flex;position:relative}.dot-tab[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1rem;cursor:pointer}.dot-tab__button[_ngcontent-%COMP%]{border:1.5px solid #f3f3f4;color:var(--color-palette-primary-500);background-color:transparent;padding:.5rem 1rem;border-radius:.375rem;height:2.5rem;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}.dot-tab__button[_ngcontent-%COMP%]:hover{background:var(--color-palette-primary-100)}.dot-tab__button[_ngcontent-%COMP%]:disabled{cursor:not-allowed;background-color:#fafafb;color:#afb3c0}.dot-tab__button--right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0;border-right:0}.dot-tab__dropdown[_ngcontent-%COMP%]{background-color:transparent;border:1.5px solid #f3f3f4;height:2.5rem;border-top-right-radius:.375rem;border-bottom-right-radius:.375rem;border-left:0;padding:.5rem;color:var(--color-palette-primary-500)}.dot-tab__dropdown[_ngcontent-%COMP%]:hover{background:var(--color-palette-primary-200)}.dot-tab__dropdown[_ngcontent-%COMP%]:disabled{cursor:not-allowed;background-color:#fafafb;color:#afb3c0}.dot-tab-indicator[_ngcontent-%COMP%]{height:.25rem;border-radius:1rem;width:auto;background-color:var(--color-palette-primary-500);left:0;right:0;bottom:-.6rem;position:absolute}.dot-tab--active[_ngcontent-%COMP%]{background:var(--color-palette-primary-100);border-radius:.375rem;border-color:#fff}.dot-tab--active.dot-tab__button--right[_ngcontent-%COMP%]{border-color:#fff;border-top-right-radius:0;border-bottom-right-radius:0}.dot-tab-dropdown--active[_ngcontent-%COMP%]{background:var(--color-palette-primary-200);border-color:#fff}.dot-tab-dropdown__icon[_ngcontent-%COMP%]{width:1.5rem;display:flex;align-items:center;justify-content:center}"]});const Yb={maxlength:"error.form.validator.maxlength",required:"error.form.validator.required",pattern:"error.form.validator.pattern"};class qb{constructor(e,t){this.cd=e,this.dotMessageService=t,this.errorMsg="",this.destroy$=new ae}set message(e){this.defaultMessage=e,this.cd.markForCheck()}set field(e){e&&(this._field=e,e.statusChanges.pipe(In(this.destroy$)).subscribe(()=>{this.errorMsg=this.getErrors(e.errors),this.cd.detectChanges()}))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getErrors(e){let t=[];return e&&(t=[...this.getMsgDefaultValidators(e),...this.getMsgCustomsValidators(e)]),this.defaultMessage?this.defaultMessage:t.slice(0,1)[0]}getMsgDefaultValidators(e){let t=[];return Object.entries(e).forEach(([i,r])=>{if(i in Yb){let o="";const{requiredLength:s,requiredPattern:a}=r;switch(i){case"maxlength":o=this.dotMessageService.get(Yb[i],s);break;case"pattern":o=this.dotMessageService.get(this.patternErrorMessage||Yb[i],a);break;default:o=Yb[i]}t=[...t,o]}}),t}getMsgCustomsValidators(e){let t=[];return Object.entries(e).forEach(([,i])=>{"string"==typeof i&&(t=[...t,i])}),t}}qb.\u0275fac=function(e){return new(e||qb)(O(qn),O(ps))},qb.\u0275cmp=xe({type:qb,selectors:[["dot-field-validation-message"]],inputs:{patternErrorMessage:"patternErrorMessage",message:"message",field:"field"},standalone:!0,features:[tl],decls:1,vars:1,consts:[["class","p-invalid","data-testId","error-msg",4,"ngIf"],["data-testId","error-msg",1,"p-invalid"]],template:function(e,t){1&e&&E(0,Fue,3,3,"small",0),2&e&&b("ngIf",t._field&&t._field.enabled&&t._field.dirty&&!t._field.valid)},dependencies:[nn,fu],encapsulation:2,changeDetection:0});class pu{copy(e){const t=document.createElement("textarea");let i;return t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.opacity="0",t.value=e,document.body.appendChild(t),t.select(),new Promise((r,o)=>{try{i=document.execCommand("copy"),r(i)}catch{o(i)}document.body.removeChild(t)})}}function jue(n,e){if(1&n&&(I(0,"span",3),Te(1),A()),2&n){const t=M();C(1),Ot(t.label)}}pu.\u0275fac=function(e){return new(e||pu)},pu.\u0275prov=$({token:pu,factory:pu.\u0275fac});class Kb{constructor(e,t){this.dotClipboardUtil=e,this.dotMessageService=t,this.copy=""}ngOnInit(){this.tooltipText=this.tooltipText||this.dotMessageService.get("Copy")}copyUrlToClipboard(e){e.stopPropagation(),this.dotClipboardUtil.copy(this.copy).then(()=>{const t=this.tooltipText;this.tooltipText=this.dotMessageService.get("Copied"),setTimeout(()=>{this.tooltipText=t},1e3)}).catch(()=>{this.tooltipText="Error"})}}Kb.\u0275fac=function(e){return new(e||Kb)(O(pu),O(ps))},Kb.\u0275cmp=xe({type:Kb,selectors:[["dot-copy-button"]],inputs:{copy:"copy",label:"label",tooltipText:"tooltipText"},standalone:!0,features:[Nt([pu]),tl],decls:3,vars:2,consts:[["pButton","","type","button","appendTo","body","hideDelay","800","tooltipPosition","bottom",1,"p-button-sm","p-button-text",3,"pTooltip","click"],[1,"pi","pi-copy"],["class","p-button-label",4,"ngIf"],[1,"p-button-label"]],template:function(e,t){1&e&&(I(0,"button",0),de("click",function(r){return t.copyUrlToClipboard(r)}),_e(1,"i",1),E(2,jue,2,1,"span",2),A()),2&e&&(b("pTooltip",t.tooltipText),C(2),b("ngIf",!!t.label))},dependencies:[rg,ig,ks,ds,nn],changeDetection:0});class og{constructor(e,t,i){this.el=e,this.renderer=t,this.formGroupDirective=i,t.addClass(this.el.nativeElement,"p-label-input-required")}set checkIsRequiredControl(e){this.isRequiredControl(e)||this.renderer.removeClass(this.el.nativeElement,"p-label-input-required")}isRequiredControl(e){const t=this.formGroupDirective.control?.get(e);return!(!t||!t.hasValidator(wc.required))}}og.\u0275fac=function(e){return new(e||og)(O(kt),O(Vr),O(Ta))},og.\u0275dir=Me({type:og,selectors:[["","dotFieldRequired",""]],inputs:{checkIsRequiredControl:"checkIsRequiredControl"},standalone:!0});class Qb{constructor(){this.confirmationService=vt(wL)}onPressEscape(){this.confirmationService.close()}}Qb.\u0275fac=function(e){return new(e||Qb)},Qb.\u0275dir=Me({type:Qb,selectors:[["p-confirmPopup","dotRemoveConfirmPopupWithEscape",""]],hostBindings:function(e,t){1&e&&de("keydown.escape",function(r){return t.onPressEscape(r)},0,LI)},standalone:!0});let zue=(()=>{class n{constructor(t){this.host=t,this.focused=!1}ngAfterViewChecked(){if(!this.focused&&this.autofocus){const t=ce.getFocusableElements(this.host.nativeElement);0===t.length&&this.host.nativeElement.focus(),t.length>0&&t[0].focus(),this.focused=!0}}}return n.\u0275fac=function(t){return new(t||n)(O(kt))},n.\u0275dir=Me({type:n,selectors:[["","pAutoFocus",""]],hostAttrs:[1,"p-element"],inputs:{autofocus:"autofocus"}}),n})();const Vue=["overlay"],Bue=["content"];function Uue(n,e){1&n&&Dt(0)}const Hue=function(n,e,t){return{showTransitionParams:n,hideTransitionParams:e,transform:t}},$ue=function(n){return{value:"visible",params:n}},Wue=function(n){return{mode:n}},Gue=function(n){return{$implicit:n}};function Yue(n,e){if(1&n){const t=Qe();I(0,"div",1,3),de("click",function(r){return ge(t),ye(M(2).onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){return ge(t),ye(M(2).onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){return ge(t),ye(M(2).onOverlayContentAnimationDone(r))}),_r(2),E(3,Uue,1,0,"ng-container",4),A()}if(2&n){const t=M(2);Dn(t.contentStyleClass),b("ngStyle",t.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",xt(11,$ue,nl(7,Hue,t.showTransitionOptions,t.hideTransitionOptions,t.transformOptions[t.modal?t.overlayResponsiveDirection:"default"]))),C(3),b("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",xt(15,Gue,xt(13,Wue,t.overlayMode)))}}const que=function(n,e,t,i,r,o,s,a,l,c,u,d,h,f){return{"p-overlay p-component":!0,"p-overlay-modal p-component-overlay p-component-overlay-enter":n,"p-overlay-center":e,"p-overlay-top":t,"p-overlay-top-start":i,"p-overlay-top-end":r,"p-overlay-bottom":o,"p-overlay-bottom-start":s,"p-overlay-bottom-end":a,"p-overlay-left":l,"p-overlay-left-start":c,"p-overlay-left-end":u,"p-overlay-right":d,"p-overlay-right-start":h,"p-overlay-right-end":f}};function Kue(n,e){if(1&n){const t=Qe();I(0,"div",1,2),de("click",function(r){return ge(t),ye(M().onOverlayClick(r))}),E(2,Yue,4,17,"div",0),A()}if(2&n){const t=M();Dn(t.styleClass),b("ngStyle",t.style)("ngClass",rk(5,que,[t.modal,t.modal&&"center"===t.overlayResponsiveDirection,t.modal&&"top"===t.overlayResponsiveDirection,t.modal&&"top-start"===t.overlayResponsiveDirection,t.modal&&"top-end"===t.overlayResponsiveDirection,t.modal&&"bottom"===t.overlayResponsiveDirection,t.modal&&"bottom-start"===t.overlayResponsiveDirection,t.modal&&"bottom-end"===t.overlayResponsiveDirection,t.modal&&"left"===t.overlayResponsiveDirection,t.modal&&"left-start"===t.overlayResponsiveDirection,t.modal&&"left-end"===t.overlayResponsiveDirection,t.modal&&"right"===t.overlayResponsiveDirection,t.modal&&"right-start"===t.overlayResponsiveDirection,t.modal&&"right-end"===t.overlayResponsiveDirection])),C(2),b("ngIf",t.visible)}}const Que=["*"],Zue={provide:Dr,useExisting:Bt(()=>x5),multi:!0},Jue=k2([Bi({transform:"{{transform}}",opacity:0}),lp("{{showTransitionParams}}")]),Xue=k2([lp("{{hideTransitionParams}}",Bi({transform:"{{transform}}",opacity:0}))]);let x5=(()=>{class n{constructor(t,i,r,o,s,a){this.document=t,this.el=i,this.renderer=r,this.config=o,this.overlayService=s,this.zone=a,this.visibleChange=new ie,this.onBeforeShow=new ie,this.onShow=new ie,this.onBeforeHide=new ie,this.onHide=new ie,this.onAnimationStart=new ie,this.onAnimationDone=new ie,this._visible=!1,this.modalVisible=!1,this.isOverlayClicked=!1,this.isOverlayContentClicked=!1,this.transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"},this.window=this.document.defaultView}get visible(){return this._visible}set visible(t){this._visible=t,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(t){this._mode=t}get style(){return Pt.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(t){this._style=t}get styleClass(){return Pt.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(t){this._styleClass=t}get contentStyle(){return Pt.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(t){this._contentStyle=t}get contentStyleClass(){return Pt.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(t){this._contentStyleClass=t}get target(){const t=this._target||this.overlayOptions?.target;return void 0===t?"@prev":t}set target(t){this._target=t}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(t){this._appendTo=t}get autoZIndex(){const t=this._autoZIndex||this.overlayOptions?.autoZIndex;return void 0===t||t}set autoZIndex(t){this._autoZIndex=t}get baseZIndex(){const t=this._baseZIndex||this.overlayOptions?.baseZIndex;return void 0===t?0:t}set baseZIndex(t){this._baseZIndex=t}get showTransitionOptions(){const t=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return void 0===t?".12s cubic-bezier(0, 0, 0.2, 1)":t}set showTransitionOptions(t){this._showTransitionOptions=t}get hideTransitionOptions(){const t=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return void 0===t?".1s linear":t}set hideTransitionOptions(t){this._hideTransitionOptions=t}get listener(){return this._listener||this.overlayOptions?.listener}set listener(t){this._listener=t}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(t){this._responsive=t}get options(){return this._options}set options(t){this._options=t}get modal(){return"modal"===this.mode||this.overlayResponsiveOptions&&this.window?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return{...this.config?.overlayOptions,...this.options}}get overlayResponsiveOptions(){return{...this.overlayOptions?.responsive,...this.responsive}}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return ce.getTargetElement(this.target,this.el?.nativeElement)}ngAfterContentInit(){this.templates?.forEach(t=>{t.getType(),this.contentTemplate=t.template})}show(t,i=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&ce.focus(this.targetEl),this.modal&&ce.addClass(this.document?.body,"p-overflow-hidden")}hide(t,i=!1){this.visible&&(this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&ce.focus(this.targetEl),this.modal&&ce.removeClass(this.document?.body,"p-overflow-hidden"))}alignOverlay(){!this.modal&&ce.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(t){this._visible=t,this.visibleChange.emit(t)}onOverlayClick(t){this.isOverlayClicked=!0}onOverlayContentClick(t){this.overlayService.add({originalEvent:t,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(t){switch(t.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&jd.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),ce.appendOverlay(this.overlayEl,"body"===this.appendTo?this.document.body:this.appendTo,this.appendTo),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&ce.addClass(this.overlayEl,"p-component-overlay-leave")}this.handleEvents("onAnimationStart",t)}onOverlayContentAnimationDone(t){const i=this.overlayEl||t.element.parentElement;switch(t.toState){case"visible":this.show(i,!0),this.bindListeners();break;case"void":this.hide(i,!0),this.unbindListeners(),ce.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),jd.clear(i),this.modalVisible=!1}this.handleEvents("onAnimationDone",t)}handleEvents(t,i){this[t].emit(i),this.options&&this.options[t]&&this.options[t](i),this.config?.overlayOptions&&this.config?.overlayOptions[t]&&this.config?.overlayOptions[t](i)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new TL(this.targetEl,t=>{(!this.listener||this.listener(t,{type:"scroll",mode:this.overlayMode,valid:!0}))&&this.hide(t,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",t=>{const r=!(this.targetEl&&(this.targetEl.isSameNode(t.target)||!this.isOverlayClicked&&this.targetEl.contains(t.target))||this.isOverlayContentClicked);(this.listener?this.listener(t,{type:"outside",mode:this.overlayMode,valid:3!==t.which&&r}):r)&&this.hide(t),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",t=>{(this.listener?this.listener(t,{type:"resize",mode:this.overlayMode,valid:!ce.isTouchDevice()}):!ce.isTouchDevice())&&this.hide(t,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.window,"keydown",t=>{this.overlayOptions.hideOnEscape&&27===t.keyCode&&(this.listener?this.listener(t,{type:"keydown",mode:this.overlayMode,valid:!ce.isTouchDevice()}):!ce.isTouchDevice())&&this.zone.run(()=>{this.hide(t,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(ce.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),jd.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners()}}return n.\u0275fac=function(t){return new(t||n)(O(Nn),O(kt),O(Vr),O(zd),O(HQ),O(Jt))},n.\u0275cmp=xe({type:n,selectors:[["p-overlay"]],contentQueries:function(t,i,r){if(1&t&&fi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},viewQuery:function(t,i){if(1&t&&(hn(Vue,5),hn(Bue,5)),2&t){let r;Xe(r=et())&&(i.overlayViewChild=r.first),Xe(r=et())&&(i.contentViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options"},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[Nt([Zue])],ngContentSelectors:Que,decls:1,vars:1,consts:[[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"ngStyle","ngClass","click"],["overlay",""],["content",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,i){1&t&&(So(),E(0,Kue,3,20,"div",0)),2&t&&b("ngIf",i.modalVisible)},dependencies:[gi,nn,Oo,wr],styles:[".p-overlay{position:absolute;top:0;left:0}.p-overlay-modal{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%}.p-overlay-content{transform-origin:inherit}.p-overlay-modal>.p-overlay-content{z-index:1;width:90%}.p-overlay-top{align-items:flex-start}.p-overlay-top-start{align-items:flex-start;justify-content:flex-start}.p-overlay-top-end{align-items:flex-start;justify-content:flex-end}.p-overlay-bottom{align-items:flex-end}.p-overlay-bottom-start{align-items:flex-end;justify-content:flex-start}.p-overlay-bottom-end{align-items:flex-end;justify-content:flex-end}.p-overlay-left{justify-content:flex-start}.p-overlay-left-start{justify-content:flex-start;align-items:flex-start}.p-overlay-left-end{justify-content:flex-start;align-items:flex-end}.p-overlay-right{justify-content:flex-end}.p-overlay-right-start{justify-content:flex-end;align-items:flex-start}.p-overlay-right-end{justify-content:flex-end;align-items:flex-end}\n"],encapsulation:2,data:{animation:[TM("overlayContentAnimation",[cp(":enter",[N2(Jue)]),cp(":leave",[N2(Xue)])])]},changeDetection:0}),n})();const ede=["element"],tde=["content"];function nde(n,e){1&n&&Dt(0)}const IS=function(n,e){return{$implicit:n,options:e}};function ide(n,e){if(1&n&&(mt(0),E(1,nde,1,0,"ng-container",7),gt()),2&n){const t=M(2);C(1),b("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",Mi(2,IS,t.loadedItems,t.getContentOptions()))}}function rde(n,e){1&n&&Dt(0)}function ode(n,e){if(1&n&&(mt(0),E(1,rde,1,0,"ng-container",7),gt()),2&n){const t=e.$implicit,i=e.index,r=M(3);C(1),b("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",Mi(2,IS,t,r.getOptions(i)))}}const sde=function(n){return{"p-scroller-loading":n}};function ade(n,e){if(1&n&&(I(0,"div",8,9),E(2,ode,2,5,"ng-container",10),A()),2&n){const t=M(2);b("ngClass",xt(4,sde,t.d_loading))("ngStyle",t.contentStyle),C(2),b("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy||t.index)}}function lde(n,e){1&n&&_e(0,"div",11),2&n&&b("ngStyle",M(2).spacerStyle)}function cde(n,e){1&n&&Dt(0)}const ude=function(n){return{numCols:n}},I5=function(n){return{options:n}};function dde(n,e){if(1&n&&(mt(0),E(1,cde,1,0,"ng-container",7),gt()),2&n){const t=e.index,i=M(4);C(1),b("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",xt(4,I5,i.getLoaderOptions(t,i.both&&xt(2,ude,i._numItemsInViewport.cols))))}}function hde(n,e){if(1&n&&(mt(0),E(1,dde,2,6,"ng-container",14),gt()),2&n){const t=M(3);C(1),b("ngForOf",t.loaderArr)}}function fde(n,e){1&n&&Dt(0)}const pde=function(){return{styleClass:"p-scroller-loading-icon"}};function mde(n,e){if(1&n&&(mt(0),E(1,fde,1,0,"ng-container",7),gt()),2&n){const t=M(4);C(1),b("ngTemplateOutlet",t.loaderIconTemplate)("ngTemplateOutletContext",xt(3,I5,uo(2,pde)))}}function gde(n,e){1&n&&_e(0,"i",16)}function yde(n,e){if(1&n&&(E(0,mde,2,5,"ng-container",0),E(1,gde,1,0,"ng-template",null,15,Bn)),2&n){const t=Cn(2);b("ngIf",M(3).loaderIconTemplate)("ngIfElse",t)}}const _de=function(n){return{"p-component-overlay":n}};function vde(n,e){if(1&n&&(I(0,"div",12),E(1,hde,2,1,"ng-container",0),E(2,yde,3,2,"ng-template",null,13,Bn),A()),2&n){const t=Cn(3),i=M(2);b("ngClass",xt(3,_de,!i.loaderTemplate)),C(1),b("ngIf",i.loaderTemplate)("ngIfElse",t)}}const bde=function(n,e,t){return{"p-scroller":!0,"p-scroller-inline":n,"p-both-scroll":e,"p-horizontal-scroll":t}};function wde(n,e){if(1&n){const t=Qe();mt(0),I(1,"div",2,3),de("scroll",function(r){return ge(t),ye(M().onContainerScroll(r))}),E(3,ide,2,5,"ng-container",0),E(4,ade,3,6,"ng-template",null,4,Bn),E(6,lde,1,1,"div",5),E(7,vde,4,5,"div",6),A(),gt()}if(2&n){const t=Cn(5),i=M();C(1),Dn(i._styleClass),b("ngStyle",i._style)("ngClass",nl(10,bde,i.inline,i.both,i.horizontal)),Yt("id",i._id)("tabindex",i.tabindex),C(2),b("ngIf",i.contentTemplate)("ngIfElse",t),C(3),b("ngIf",i._showSpacer),C(1),b("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function Cde(n,e){1&n&&Dt(0)}const Dde=function(n,e){return{rows:n,columns:e}};function Mde(n,e){if(1&n&&(mt(0),E(1,Cde,1,0,"ng-container",7),gt()),2&n){const t=M(2);C(1),b("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",Mi(5,IS,t.items,Mi(2,Dde,t._items,t.loadedColumns)))}}function Tde(n,e){if(1&n&&(_r(0),E(1,Mde,2,8,"ng-container",17)),2&n){const t=M();C(1),b("ngIf",t.contentTemplate)}}const Sde=["*"];let O5=(()=>{class n{constructor(t,i){this.cd=t,this.zone=i,this.onLazyLoad=new ie,this.onScroll=new ie,this.onScrollIndexChange=new ie,this._tabindex=0,this._itemSize=0,this._orientation="vertical",this._step=0,this._delay=0,this._resizeDelay=10,this._appendOnly=!1,this._inline=!1,this._lazy=!1,this._disabled=!1,this._loaderDisabled=!1,this._showSpacer=!0,this._showLoader=!1,this._autoSize=!1,this.d_loading=!1,this.first=0,this.last=0,this.page=0,this.isRangeChanged=!1,this.numItemsInViewport=0,this.lastScrollPos=0,this.lazyLoadState={},this.loaderArr=[],this.spacerStyle={},this.contentStyle={},this.initialized=!1}get id(){return this._id}set id(t){this._id=t}get style(){return this._style}set style(t){this._style=t}get styleClass(){return this._styleClass}set styleClass(t){this._styleClass=t}get tabindex(){return this._tabindex}set tabindex(t){this._tabindex=t}get items(){return this._items}set items(t){this._items=t}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=t}get scrollHeight(){return this._scrollHeight}set scrollHeight(t){this._scrollHeight=t}get scrollWidth(){return this._scrollWidth}set scrollWidth(t){this._scrollWidth=t}get orientation(){return this._orientation}set orientation(t){this._orientation=t}get step(){return this._step}set step(t){this._step=t}get delay(){return this._delay}set delay(t){this._delay=t}get resizeDelay(){return this._resizeDelay}set resizeDelay(t){this._resizeDelay=t}get appendOnly(){return this._appendOnly}set appendOnly(t){this._appendOnly=t}get inline(){return this._inline}set inline(t){this._inline=t}get lazy(){return this._lazy}set lazy(t){this._lazy=t}get disabled(){return this._disabled}set disabled(t){this._disabled=t}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(t){this._loaderDisabled=t}get columns(){return this._columns}set columns(t){this._columns=t}get showSpacer(){return this._showSpacer}set showSpacer(t){this._showSpacer=t}get showLoader(){return this._showLoader}set showLoader(t){this._showLoader=t}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(t){this._numToleratedItems=t}get loading(){return this._loading}set loading(t){this._loading=t}get autoSize(){return this._autoSize}set autoSize(t){this._autoSize=t}get trackBy(){return this._trackBy}set trackBy(t){this._trackBy=t}get options(){return this._options}set options(t){this._options=t,t&&"object"==typeof t&&Object.entries(t).forEach(([i,r])=>this[`_${i}`]!==r&&(this[`_${i}`]=r))}get vertical(){return"vertical"===this._orientation}get horizontal(){return"horizontal"===this._orientation}get both(){return"both"===this._orientation}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(t=>this._columns?t:t.slice(this._appendOnly?0:this.first.cols,this.last.cols)):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}get isPageChanged(){return!this._step||this.page!==this.getPageByFirst()}ngOnInit(){this.setInitialState()}ngOnChanges(t){let i=!1;if(t.loading){const{previousValue:r,currentValue:o}=t.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,i=!0)}if(t.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),t.numToleratedItems){const{previousValue:r,currentValue:o}=t.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(t.options){const{previousValue:r,currentValue:o}=t.options;this.lazy&&r?.loading!==o?.loading&&o?.loading!==this.d_loading&&(this.d_loading=o.loading,i=!0),r?.numToleratedItems!==o?.numToleratedItems&&o?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=o.numToleratedItems)}this.initialized&&!i&&(t.items?.previousValue?.length!==t.items?.currentValue?.length||t.itemSize||t.scrollHeight||t.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"content":this.contentTemplate=t.template;break;case"item":default:this.itemTemplate=t.template;break;case"loader":this.loaderTemplate=t.template;break;case"loadericon":this.loaderIconTemplate=t.template}})}ngAfterViewInit(){this.viewInit()}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1}viewInit(){ce.isVisible(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=ce.getWidth(this.elementViewChild.nativeElement),this.defaultHeight=ce.getHeight(this.elementViewChild.nativeElement),this.defaultContentWidth=ce.getWidth(this.contentEl),this.defaultContentHeight=ce.getHeight(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(t){this.contentEl=t||this.contentViewChild?.nativeElement||ce.findSingle(this.elementViewChild?.nativeElement,".p-scroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,this.d_loading=this._loading||!1,this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=[],this.spacerStyle={},this.contentStyle={}}getElementRef(){return this.elementViewChild}getPageByFirst(){return Math.floor((this.first+4*this.d_numToleratedItems)/(this._step||1))}scrollTo(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.elementViewChild?.nativeElement?.scrollTo(t)}scrollToIndex(t,i="auto"){const{numToleratedItems:r}=this.calculateNumItems(),o=this.getContentPosition(),s=(u=0,d)=>u<=d?0:u,a=(u,d,h)=>u*d+h,l=(u=0,d=0)=>this.scrollTo({left:u,top:d,behavior:i});let c=0;this.both?(c={rows:s(t[0],r[0]),cols:s(t[1],r[1])},l(a(c.cols,this._itemSize[1],o.left),a(c.rows,this._itemSize[0],o.top))):(c=s(t,r),this.horizontal?l(a(c,this._itemSize,o.left),0):l(0,a(c,this._itemSize,o.top))),this.isRangeChanged=this.first!==c,this.first=c}scrollInView(t,i,r="auto"){if(i){const{first:o,viewport:s}=this.getRenderedRange(),a=(u=0,d=0)=>this.scrollTo({left:u,top:d,behavior:r}),c="to-end"===i;if("to-start"===i){if(this.both)s.first.rows-o.rows>t[0]?a(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-o.cols>t[1]&&a((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-o>t){const u=(s.first-1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else if(c)if(this.both)s.last.rows-o.rows<=t[0]+1?a(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-o.cols<=t[1]+1&&a((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-o<=t+1){const u=(s.first+1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else this.scrollToIndex(t,r)}getRenderedRange(){const t=(o,s)=>Math.floor(o/(s||o));let i=this.first,r=0;if(this.elementViewChild?.nativeElement){const{scrollTop:o,scrollLeft:s}=this.elementViewChild.nativeElement;this.both?(i={rows:t(o,this._itemSize[0]),cols:t(s,this._itemSize[1])},r={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols}):(i=t(this.horizontal?s:o,this._itemSize),r=i+this.numItemsInViewport)}return{first:this.first,last:this.last,viewport:{first:i,last:r}}}calculateNumItems(){const t=this.getContentPosition(),i=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-t.left:0,r=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-t.top:0,o=(c,u)=>Math.ceil(c/(u||c)),s=c=>Math.ceil(c/2),a=this.both?{rows:o(r,this._itemSize[0]),cols:o(i,this._itemSize[1])}:o(this.horizontal?i:r,this._itemSize);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(this.both?[s(a.rows),s(a.cols)]:s(a))}}calculateOptions(){const{numItemsInViewport:t,numToleratedItems:i}=this.calculateNumItems(),r=(a,l,c,u=!1)=>this.getLast(a+l+(aArray.from({length:t.cols})):Array.from({length:t})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:o.cols}:0:o,last:Math.min(this._step?this._step:this.last,this.items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";const[t,i]=[ce.getWidth(this.contentEl),ce.getHeight(this.contentEl)];t!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");const[r,o]=[ce.getWidth(this.elementViewChild.nativeElement),ce.getHeight(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=rthis.elementViewChild.nativeElement.style[s]=a;this.both||this.horizontal?(o("height",r),o("width",i)):o("height",r)}}setSpacerSize(){if(this._items){const t=this.getContentPosition(),i=(r,o,s,a=0)=>this.spacerStyle={...this.spacerStyle,[`${r}`]:(o||[]).length*s+a+"px"};this.both?(i("height",this._items,this._itemSize[0],t.y),i("width",this._columns||this._items[1],this._itemSize[1],t.x)):this.horizontal?i("width",this._columns||this._items,this._itemSize,t.x):i("height",this._items,this._itemSize,t.y)}}setContentPosition(t){if(this.contentEl&&!this._appendOnly){const i=t?t.first:this.first,r=(s,a)=>s*a,o=(s=0,a=0)=>this.contentStyle={...this.contentStyle,transform:`translate3d(${s}px, ${a}px, 0)`};if(this.both)o(r(i.cols,this._itemSize[1]),r(i.rows,this._itemSize[0]));else{const s=r(i,this._itemSize);this.horizontal?o(s,0):o(0,s)}}}onScrollPositionChange(t){const i=t.target,r=this.getContentPosition(),o=(g,y)=>g?g>y?g-y:g:0,s=(g,y)=>Math.floor(g/(y||g)),a=(g,y,v,w,_,N)=>g<=_?_:N?v-w-_:y+_-1,l=(g,y,v,w,_,N,T)=>g<=N?0:Math.max(0,T?gy?v:g-2*N),c=(g,y,v,w,_,N=!1)=>{let T=y+w+2*_;return g>=_&&(T+=_+1),this.getLast(T,N)},u=o(i.scrollTop,r.top),d=o(i.scrollLeft,r.left);let h=this.both?{rows:0,cols:0}:0,f=this.last,p=!1,m=this.lastScrollPos;if(this.both){const g=this.lastScrollPos.top<=u,y=this.lastScrollPos.left<=d;if(!this._appendOnly||this._appendOnly&&(g||y)){const v={rows:s(u,this._itemSize[0]),cols:s(d,this._itemSize[1])},w={rows:a(v.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],g),cols:a(v.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],y)};h={rows:l(v.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],g),cols:l(v.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],y)},f={rows:c(v.rows,h.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(v.cols,h.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=h.rows!==this.first.rows||f.rows!==this.last.rows||h.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,m={top:u,left:d}}}else{const g=this.horizontal?d:u,y=this.lastScrollPos<=g;if(!this._appendOnly||this._appendOnly&&y){const v=s(g,this._itemSize);h=l(v,a(v,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,y),this.first,0,0,this.d_numToleratedItems,y),f=c(v,h,0,this.numItemsInViewport,this.d_numToleratedItems),p=h!==this.first||f!==this.last||this.isRangeChanged,m=g}}return{first:h,last:f,isRangeChanged:p,scrollPos:m}}onScrollChange(t){const{first:i,last:r,isRangeChanged:o,scrollPos:s}=this.onScrollPositionChange(t);if(o){const a={first:i,last:r};if(this.setContentPosition(a),this.first=i,this.last=r,this.lastScrollPos=s,this.handleEvents("onScrollIndexChange",a),this._lazy&&this.isPageChanged){const l={first:this._step?Math.min(this.getPageByFirst()*this._step,this.items.length-this._step):i,last:Math.min(this._step?(this.getPageByFirst()+1)*this._step:r,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.handleEvents("onLazyLoad",l),this.lazyLoadState=l}}}onContainerScroll(t){if(this.handleEvents("onScroll",{originalEvent:t}),this._delay&&this.isPageChanged){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:i}=this.onScrollPositionChange(t);(i||this._step&&this.isPageChanged)&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&(!this._lazy||void 0===this._loading)&&(this.d_loading=!1,this.page=this.getPageByFirst(),this.cd.detectChanges())},this._delay)}else!this.d_loading&&this.onScrollChange(t)}bindResizeListener(){this.windowResizeListener||this.zone.runOutsideAngular(()=>{this.windowResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.windowResizeListener),window.addEventListener("orientationchange",this.windowResizeListener)})}unbindResizeListener(){this.windowResizeListener&&(window.removeEventListener("resize",this.windowResizeListener),window.removeEventListener("orientationchange",this.windowResizeListener),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(ce.isVisible(this.elementViewChild?.nativeElement)){const[t,i]=[ce.getWidth(this.elementViewChild.nativeElement),ce.getHeight(this.elementViewChild.nativeElement)],[r,o]=[t!==this.defaultWidth,i!==this.defaultHeight];(this.both?r||o:this.horizontal?r:this.vertical&&o)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=t,this.defaultHeight=i,this.defaultContentWidth=ce.getWidth(this.contentEl),this.defaultContentHeight=ce.getHeight(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(t,i){return this.options&&this.options[t]?this.options[t](i):this[t].emit(i)}getContentOptions(){return{contentStyleClass:"p-scroller-content "+(this.d_loading?"p-scroller-loading":""),items:this.loadedItems,getItemOptions:t=>this.getOptions(t),loading:this.d_loading,getLoaderOptions:(t,i)=>this.getLoaderOptions(t,i),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both}}getOptions(t){const i=(this._items||[]).length,r=this.both?this.first.rows+t:this.first+t;return{index:r,count:i,first:0===r,last:r===i-1,even:r%2==0,odd:r%2!=0}}getLoaderOptions(t,i){const r=this.loaderArr.length;return{index:t,count:r,first:0===t,last:t===r-1,even:t%2==0,odd:t%2!=0,...i}}}return n.\u0275fac=function(t){return new(t||n)(O(qn),O(Jt))},n.\u0275cmp=xe({type:n,selectors:[["p-scroller"]],contentQueries:function(t,i,r){if(1&t&&fi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},viewQuery:function(t,i){if(1&t&&(hn(ede,5),hn(tde,5)),2&t){let r;Xe(r=et())&&(i.elementViewChild=r.first),Xe(r=et())&&(i.contentViewChild=r.first)}},hostAttrs:[1,"p-scroller-viewport","p-element"],inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[Ji],ngContentSelectors:Sde,decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["disabledContainer",""],[3,"ngStyle","ngClass","scroll"],["element",""],["buildInContent",""],["class","p-scroller-spacer",3,"ngStyle",4,"ngIf"],["class","p-scroller-loader",3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-scroller-content",3,"ngClass","ngStyle"],["content",""],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"p-scroller-spacer",3,"ngStyle"],[1,"p-scroller-loader",3,"ngClass"],["buildInLoader",""],[4,"ngFor","ngForOf"],["buildInLoaderIcon",""],[1,"p-scroller-loading-icon","pi","pi-spinner","pi-spin"],[4,"ngIf"]],template:function(t,i){if(1&t&&(So(),E(0,wde,8,14,"ng-container",0),E(1,Tde,2,1,"ng-template",null,1,Bn)),2&t){const r=Cn(2);b("ngIf",!i._disabled)("ngIfElse",r)}},dependencies:[gi,Hr,nn,Oo,wr],styles:["p-scroller{flex:1;outline:0 none}.p-scroller{position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;outline:0 none}.p-scroller-content{position:absolute;top:0;left:0;min-height:100%;min-width:100%;will-change:transform}.p-scroller-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;pointer-events:none}.p-scroller-loader{position:sticky;top:0;left:0;width:100%;height:100%}.p-scroller-loader.p-component-overlay{display:flex;align-items:center;justify-content:center}.p-scroller-loading-icon{font-size:2rem}.p-scroller-inline .p-scroller-content{position:static}\n"],encapsulation:2}),n})(),A5=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();function Ede(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M();let i;C(1),Ot(null!==(i=t.label)&&void 0!==i?i:"empty")}}function xde(n,e){1&n&&Dt(0)}const sg=function(n){return{height:n}},Ide=function(n,e){return{"p-dropdown-item":!0,"p-highlight":n,"p-disabled":e}},OS=function(n){return{$implicit:n}},Ode=["container"],Ade=["filter"],kde=["in"],Nde=["editableInput"],Pde=["items"],Lde=["scroller"],Rde=["overlay"];function Fde(n,e){if(1&n&&(mt(0),Te(1),gt()),2&n){const t=M(2);C(1),Ot(t.label||"empty")}}function jde(n,e){1&n&&Dt(0)}const zde=function(n){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":n}};function Vde(n,e){if(1&n&&(I(0,"span",14),E(1,Fde,2,1,"ng-container",15),E(2,jde,1,0,"ng-container",16),A()),2&n){const t=M();b("ngClass",xt(9,zde,null==t.label||0===t.label.length))("pTooltip",t.tooltip)("tooltipPosition",t.tooltipPosition)("positionStyle",t.tooltipPositionStyle)("tooltipStyleClass",t.tooltipStyleClass),Yt("id",t.labelId),C(1),b("ngIf",!t.selectedItemTemplate),C(1),b("ngTemplateOutlet",t.selectedItemTemplate)("ngTemplateOutletContext",xt(11,OS,t.selectedOption))}}const Bde=function(n){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":n}};function Ude(n,e){if(1&n&&(I(0,"span",17),Te(1),A()),2&n){const t=M();b("ngClass",xt(2,Bde,null==t.placeholder||0===t.placeholder.length)),C(1),Ot(t.placeholder||"empty")}}function Hde(n,e){if(1&n){const t=Qe();I(0,"input",18,19),de("input",function(r){return ge(t),ye(M().onEditableInputChange(r))})("focus",function(r){return ge(t),ye(M().onEditableInputFocus(r))})("blur",function(r){return ge(t),ye(M().onInputBlur(r))}),A()}if(2&n){const t=M();b("disabled",t.disabled),Yt("maxlength",t.maxlength)("placeholder",t.placeholder)("aria-expanded",t.overlayVisible)}}function $de(n,e){if(1&n){const t=Qe();I(0,"i",20),de("click",function(r){return ge(t),ye(M().clear(r))}),A()}}function Wde(n,e){1&n&&Dt(0)}function Gde(n,e){1&n&&Dt(0)}const k5=function(n){return{options:n}};function Yde(n,e){if(1&n&&(mt(0),E(1,Gde,1,0,"ng-container",16),gt()),2&n){const t=M(3);C(1),b("ngTemplateOutlet",t.filterTemplate)("ngTemplateOutletContext",xt(2,k5,t.filterOptions))}}function qde(n,e){if(1&n){const t=Qe();I(0,"div",30)(1,"input",31,32),de("keydown.enter",function(r){return r.preventDefault()})("keydown",function(r){return ge(t),ye(M(3).onKeydown(r,!1))})("input",function(r){return ge(t),ye(M(3).onFilterInputChange(r))}),A(),_e(3,"span",33),A()}if(2&n){const t=M(3);C(1),b("value",t.filterValue||""),Yt("placeholder",t.filterPlaceholder)("aria-label",t.ariaFilterLabel)("aria-activedescendant",t.overlayVisible?"p-highlighted-option":t.labelId)}}function Kde(n,e){if(1&n&&(I(0,"div",27),de("click",function(i){return i.stopPropagation()}),E(1,Yde,2,4,"ng-container",28),E(2,qde,4,4,"ng-template",null,29,Bn),A()),2&n){const t=Cn(3),i=M(2);C(1),b("ngIf",i.filterTemplate)("ngIfElse",t)}}function Qde(n,e){1&n&&Dt(0)}const N5=function(n,e){return{$implicit:n,options:e}};function Zde(n,e){if(1&n&&E(0,Qde,1,0,"ng-container",16),2&n){const t=e.$implicit,i=e.options;M(2),b("ngTemplateOutlet",Cn(7))("ngTemplateOutletContext",Mi(2,N5,t,i))}}function Jde(n,e){1&n&&Dt(0)}function Xde(n,e){if(1&n&&E(0,Jde,1,0,"ng-container",16),2&n){const t=e.options;b("ngTemplateOutlet",M(4).loaderTemplate)("ngTemplateOutletContext",xt(2,k5,t))}}function ehe(n,e){1&n&&(mt(0),E(1,Xde,1,4,"ng-template",36),gt())}function the(n,e){if(1&n){const t=Qe();I(0,"p-scroller",34,35),de("onLazyLoad",function(r){return ge(t),ye(M(2).onLazyLoad.emit(r))}),E(2,Zde,1,5,"ng-template",13),E(3,ehe,2,0,"ng-container",15),A()}if(2&n){const t=M(2);Yn(xt(8,sg,t.scrollHeight)),b("items",t.optionsToDisplay)("itemSize",t.virtualScrollItemSize||t._itemSize)("autoSize",!0)("lazy",t.lazy)("options",t.virtualScrollOptions),C(3),b("ngIf",t.loaderTemplate)}}function nhe(n,e){1&n&&Dt(0)}const ihe=function(){return{}};function rhe(n,e){if(1&n&&(mt(0),E(1,nhe,1,0,"ng-container",16),gt()),2&n){M();const t=Cn(7),i=M();C(1),b("ngTemplateOutlet",t)("ngTemplateOutletContext",Mi(3,N5,i.optionsToDisplay,uo(2,ihe)))}}function ohe(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M().$implicit,i=M(4);C(1),Ot(i.getOptionGroupLabel(t)||"empty")}}function she(n,e){1&n&&Dt(0)}function ahe(n,e){1&n&&Dt(0)}const P5=function(n,e){return{$implicit:n,selectedOption:e}};function lhe(n,e){if(1&n&&(I(0,"li",42),E(1,ohe,2,1,"span",15),E(2,she,1,0,"ng-container",16),A(),E(3,ahe,1,0,"ng-container",16)),2&n){const t=e.$implicit,i=M(2).options,r=Cn(5),o=M(2);b("ngStyle",xt(6,sg,i.itemSize+"px")),C(1),b("ngIf",!o.groupTemplate),C(1),b("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",xt(8,OS,t)),C(1),b("ngTemplateOutlet",r)("ngTemplateOutletContext",Mi(10,P5,o.getOptionGroupChildren(t),o.selectedOption))}}function che(n,e){if(1&n&&(mt(0),E(1,lhe,4,13,"ng-template",41),gt()),2&n){const t=M().$implicit;C(1),b("ngForOf",t)}}function uhe(n,e){1&n&&Dt(0)}function dhe(n,e){if(1&n&&(mt(0),E(1,uhe,1,0,"ng-container",16),gt()),2&n){const t=M().$implicit,i=Cn(5),r=M(2);C(1),b("ngTemplateOutlet",i)("ngTemplateOutletContext",Mi(2,P5,t,r.selectedOption))}}function hhe(n,e){if(1&n){const t=Qe();I(0,"p-dropdownItem",43),de("onClick",function(r){return ge(t),ye(M(4).onItemClick(r))}),A()}if(2&n){const t=e.$implicit,i=M().selectedOption,r=M(3);b("option",t)("selected",i==t)("label",r.getOptionLabel(t))("disabled",r.isOptionDisabled(t))("template",r.itemTemplate)}}function fhe(n,e){1&n&&E(0,hhe,1,5,"ng-template",41),2&n&&b("ngForOf",e.$implicit)}function phe(n,e){if(1&n&&(mt(0),Te(1),gt()),2&n){const t=M(4);C(1),Vi(" ",t.emptyFilterMessageLabel," ")}}function mhe(n,e){1&n&&Dt(0,null,45)}function ghe(n,e){if(1&n&&(I(0,"li",44),E(1,phe,2,1,"ng-container",28),E(2,mhe,2,0,"ng-container",22),A()),2&n){const t=M().options,i=M(2);b("ngStyle",xt(4,sg,t.itemSize+"px")),C(1),b("ngIf",!i.emptyFilterTemplate&&!i.emptyTemplate)("ngIfElse",i.emptyFilter),C(1),b("ngTemplateOutlet",i.emptyFilterTemplate||i.emptyTemplate)}}function yhe(n,e){if(1&n&&(mt(0),Te(1),gt()),2&n){const t=M(4);C(1),Vi(" ",t.emptyMessageLabel," ")}}function _he(n,e){1&n&&Dt(0,null,46)}function vhe(n,e){if(1&n&&(I(0,"li",44),E(1,yhe,2,1,"ng-container",28),E(2,_he,2,0,"ng-container",22),A()),2&n){const t=M().options,i=M(2);b("ngStyle",xt(4,sg,t.itemSize+"px")),C(1),b("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),C(1),b("ngTemplateOutlet",i.emptyTemplate)}}function bhe(n,e){if(1&n&&(I(0,"ul",37,38),E(2,che,2,1,"ng-container",15),E(3,dhe,2,5,"ng-container",15),E(4,fhe,1,1,"ng-template",null,39,Bn),E(6,ghe,3,6,"li",40),E(7,vhe,3,6,"li",40),A()),2&n){const t=e.options,i=M(2);Yn(t.contentStyle),b("ngClass",t.contentStyleClass),Yt("id",i.listId),C(2),b("ngIf",i.group),C(1),b("ngIf",!i.group),C(3),b("ngIf",i.filterValue&&i.isEmpty()),C(1),b("ngIf",!i.filterValue&&i.isEmpty())}}function whe(n,e){1&n&&Dt(0)}function Che(n,e){if(1&n&&(I(0,"div",21),E(1,Wde,1,0,"ng-container",22),E(2,Kde,4,2,"div",23),I(3,"div",24),E(4,the,4,10,"p-scroller",25),E(5,rhe,2,6,"ng-container",15),E(6,bhe,8,8,"ng-template",null,26,Bn),A(),E(8,whe,1,0,"ng-container",22),A()),2&n){const t=M();Dn(t.panelStyleClass),b("ngClass","p-dropdown-panel p-component")("ngStyle",t.panelStyle),C(1),b("ngTemplateOutlet",t.headerTemplate),C(1),b("ngIf",t.filter),C(1),mc("max-height",t.virtualScroll?"auto":t.scrollHeight||"auto"),C(1),b("ngIf",t.virtualScroll),C(1),b("ngIf",!t.virtualScroll),C(3),b("ngTemplateOutlet",t.footerTemplate)}}const Dhe=function(n,e,t,i){return{"p-dropdown p-component":!0,"p-disabled":n,"p-dropdown-open":e,"p-focus":t,"p-dropdown-clearable":i}},Mhe={provide:Dr,useExisting:Bt(()=>AS),multi:!0};let The=(()=>{class n{constructor(){this.onClick=new ie}onOptionClick(t){this.onClick.emit({originalEvent:t,option:this.option})}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick"},decls:3,vars:15,consts:[["role","option","pRipple","",3,"ngStyle","id","ngClass","click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,i){1&t&&(I(0,"li",0),de("click",function(o){return i.onOptionClick(o)}),E(1,Ede,2,1,"span",1),E(2,xde,1,0,"ng-container",2),A()),2&t&&(b("ngStyle",xt(8,sg,i.itemSize+"px"))("id",i.selected?"p-highlighted-option":"")("ngClass",Mi(10,Ide,i.selected,i.disabled)),Yt("aria-label",i.label)("aria-selected",i.selected),C(1),b("ngIf",!i.template),C(1),b("ngTemplateOutlet",i.template)("ngTemplateOutletContext",xt(13,OS,i.option)))},dependencies:[gi,nn,Oo,wr,Vd],encapsulation:2}),n})(),AS=(()=>{class n{constructor(t,i,r,o,s,a){this.el=t,this.renderer=i,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.scrollHeight="200px",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.autoDisplayFirst=!0,this.emptyFilterMessage="",this.emptyMessage="",this.lazy=!1,this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.overlayDirection="end",this.onChange=new ie,this.onFilter=new ie,this.onFocus=new ie,this.onBlur=new ie,this.onClick=new ie,this.onShow=new ie,this.onHide=new ie,this.onClear=new ie,this.onLazyLoad=new ie,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.id=function VQ(){return"pr_id_"+ ++vL}()}get disabled(){return this._disabled}set disabled(t){t&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=t,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=t,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get autoZIndex(){return this._autoZIndex}set autoZIndex(t){this._autoZIndex=t,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(t){this._baseZIndex=t,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(t){this._showTransitionOptions=t,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(t){this._hideTransitionOptions=t,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":default:this.itemTemplate=t.template;break;case"selectedItem":this.selectedItemTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"filter":this.filterTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"emptyfilter":this.emptyFilterTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"loader":this.loaderTemplate=t.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list",this.filterBy&&(this.filterOptions={filter:t=>this.onFilterInputChange(t),reset:()=>this.resetFilter()})}get options(){return this._options}set options(t){this._options=t,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.selectedOption=this.findOption(this.value,this.optionsToDisplay),!this.selectedOption&&Pt.isNotEmpty(this.value)&&!this.editable&&(this.value=null,this.onModelChange(this.value)),this.optionsChanged=!0,this._filterValue&&this._filterValue.length&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(t){this._filterValue=t,this.activateFilter()}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}get label(){return"number"==typeof this.selectedOption&&(this.selectedOption=this.selectedOption.toString()),this.selectedOption?this.getOptionLabel(this.selectedOption):null}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(xc.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(xc.EMPTY_FILTER_MESSAGE)}get filled(){return"string"==typeof this.value?!!this.value:this.value||null!=this.value||null!=this.value}get isVisibleClearIcon(){return null!=this.value&&""!==this.value&&this.showClear&&!this.disabled}updateEditableLabel(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.getOptionLabel(this.selectedOption):this.value||"")}getOptionLabel(t){return this.optionLabel?Pt.resolveFieldData(t,this.optionLabel):t&&void 0!==t.label?t.label:t}getOptionValue(t){return this.optionValue?Pt.resolveFieldData(t,this.optionValue):!this.optionLabel&&t&&void 0!==t.value?t.value:t}isOptionDisabled(t){return this.optionDisabled?Pt.resolveFieldData(t,this.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}getOptionGroupLabel(t){return this.optionGroupLabel?Pt.resolveFieldData(t,this.optionGroupLabel):t&&void 0!==t.label?t.label:t}getOptionGroupChildren(t){return this.optionGroupChildren?Pt.resolveFieldData(t,this.optionGroupChildren):t.items}onItemClick(t){const i=t.option;this.isOptionDisabled(i)||(this.selectItem(t.originalEvent,i),this.accessibleViewChild.nativeElement.focus({preventScroll:!0})),setTimeout(()=>{this.hide()},1)}selectItem(t,i){this.selectedOption!=i&&(this.selectedOption=i,this.value=this.getOptionValue(i),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:t,value:this.value}))}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let t=ce.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,"li.p-highlight");t&&ce.scrollInView(this.itemsWrapper,t),this.selectedOptionUpdated=!1}}writeValue(t){this.filter&&this.resetFilter(),this.value=t,this.updateSelectedOption(t),this.updateEditableLabel(),this.cd.markForCheck()}resetFilter(){this._filterValue=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this.optionsToDisplay=this.options}updateSelectedOption(t){this.selectedOption=this.findOption(t,this.optionsToDisplay),this.autoDisplayFirst&&!this.placeholder&&!this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&!this.editable&&(this.selectedOption=this.group?this.optionsToDisplay[0].items[0]:this.optionsToDisplay[0],this.value=this.getOptionValue(this.selectedOption),this.onModelChange(this.value)),this.selectedOptionUpdated=!0}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onMouseclick(t){this.disabled||this.readonly||this.isInputClick(t)||(this.onClick.emit(t),this.accessibleViewChild.nativeElement.focus({preventScroll:!0}),this.overlayVisible?this.hide():this.show(),this.cd.detectChanges())}isInputClick(t){return ce.hasClass(t.target,"p-dropdown-clear-icon")||t.target.isSameNode(this.accessibleViewChild.nativeElement)||this.editableInputViewChild&&t.target.isSameNode(this.editableInputViewChild.nativeElement)}isEmpty(){return!this.optionsToDisplay||this.optionsToDisplay&&0===this.optionsToDisplay.length}onEditableInputFocus(t){this.focused=!0,this.hide(),this.onFocus.emit(t)}onEditableInputChange(t){this.value=t.target.value,this.updateSelectedOption(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value})}show(){this.overlayVisible=!0,this.cd.markForCheck()}onOverlayAnimationStart(t){if("visible"===t.toState){if(this.itemsWrapper=ce.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,this.virtualScroll?".p-scroller":".p-dropdown-items-wrapper"),this.virtualScroll&&this.scroller.setContentEl(this.itemsViewChild.nativeElement),this.options&&this.options.length)if(this.virtualScroll){const i=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;-1!==i&&this.scroller.scrollToIndex(i)}else{let i=ce.findSingle(this.itemsWrapper,".p-dropdown-item.p-highlight");i&&i.scrollIntoView({block:"nearest",inline:"center"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(t)}"void"===t.toState&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(t))}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.cd.markForCheck()}onInputFocus(t){this.focused=!0,this.onFocus.emit(t)}onInputBlur(t){this.focused=!1,this.onBlur.emit(t),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(t){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=t-1;0<=r;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}if(!i)for(let r=this.optionsToDisplay.length-1;r>=t;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}}return i}findNextEnabledOption(t){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=t+1;r0&&this.selectItem(t,this.getOptionGroupChildren(this.optionsToDisplay[0])[0])}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findNextEnabledOption(r);o&&(this.selectItem(t,o),this.selectedOptionUpdated=!0)}t.preventDefault();break;case 38:if(this.group){let r=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==r){let o=r.itemIndex-1;if(o>=0)this.selectItem(t,this.getOptionGroupChildren(this.optionsToDisplay[r.groupIndex])[o]),this.selectedOptionUpdated=!0;else if(o<0){let s=this.optionsToDisplay[r.groupIndex-1];s&&(this.selectItem(t,this.getOptionGroupChildren(s)[this.getOptionGroupChildren(s).length-1]),this.selectedOptionUpdated=!0)}}}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findPrevEnabledOption(r);o&&(this.selectItem(t,o),this.selectedOptionUpdated=!0)}t.preventDefault();break;case 32:i&&(this.overlayVisible?this.hide():this.show(),t.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),t.preventDefault();break;case 27:case 9:this.hide();break;default:i&&!t.metaKey&&17!==t.which&&this.search(t)}}search(t){this.searchTimeout&&clearTimeout(this.searchTimeout);const i=t.key;let r;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=i,this.searchValue=this.previousSearchChar===this.currentSearchChar?this.currentSearchChar:this.searchValue?this.searchValue+i:i,this.group){let o=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):{groupIndex:0,itemIndex:0};r=this.searchOptionWithinGroup(o)}else{let o=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;r=this.searchOption(++o)}r&&!this.isOptionDisabled(r)&&(this.selectItem(t,r),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(t){let i;return this.searchValue&&(i=this.searchOptionInRange(t,this.optionsToDisplay.length),i||(i=this.searchOptionInRange(0,t))),i}searchOptionInRange(t,i){for(let r=t;r{this.getSitesList(o.filter)}):console.warn("ContainerOptionsDirective is for use with PrimeNg Dropdown")}ngOnInit(){this.getSitesList(),this.dotEvents.forEach(e=>{this.dotEventsService.listen(e).pipe(In(this.destroy$)).subscribe(()=>this.getSitesList())})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}setOptions(e){this.primeDropdown.options=[...e],this.cd.detectChanges()}getSitesList(e=""){this.dotSiteService.getSites(e,this.pageSize).pipe(Tt(1)).subscribe(t=>this.setOptions(t))}}Zb.\u0275fac=function(e){return new(e||Zb)(O(AS,10),O(Ih),O(Oh),O(qn))},Zb.\u0275dir=Me({type:Zb,selectors:[["","dotSiteSelector",""]],inputs:{archive:"archive",live:"live",system:"system",pageSize:"pageSize"},standalone:!0,features:[Nt([$i])]});class Jb{constructor(e){this.el=e}ngOnInit(){this.el.nativeElement.disabled||setTimeout(()=>{this.el.nativeElement.focus()},100)}}Jb.\u0275fac=function(e){return new(e||Jb)(O(kt))},Jb.\u0275dir=Me({type:Jb,selectors:[["","dotAutofocus",""]],standalone:!0});class Xb{constructor(e,t){this.ngControl=e,this.el=t}onBlur(){this.ngControl.control.setValue(this.ngControl.value.trim())}ngAfterViewInit(){"input"!==this.el.nativeElement.tagName.toLowerCase()&&console.warn("DotTrimInputDirective is for use with Inputs")}}Xb.\u0275fac=function(e){return new(e||Xb)(O(Ma,10),O(kt))},Xb.\u0275dir=Me({type:Xb,selectors:[["","dotTrimInput",""]],hostBindings:function(e,t){1&e&&de("blur",function(){return t.onBlur()})},standalone:!0});class e0{constructor(e,t,i,r){this.primeDropdown=e,this.dotContainersService=t,this.dotMessageService=i,this.changeDetectorRef=r,this.maxOptions=10,this.destroy$=new ae,this.control=this.primeDropdown,this.loadErrorMessage=this.dotMessageService.get("dot.template.builder.box.containers.error"),this.control?(this.control.group=!0,this.control.optionLabel="label",this.control.optionValue="value",this.control.optionDisabled="inactive",this.control.filterBy="value.friendlyName,value.title"):console.warn("ContainerOptionsDirective is for use with PrimeNg Dropdown")}ngOnInit(){this.fetchContainerOptions().subscribe(e=>{this.control.options=this.control.options||e}),this.control.onFilter.pipe(In(this.destroy$),Hd(500),yi(e=>this.fetchContainerOptions(e.filter))).subscribe(e=>this.setOptions(e))}fetchContainerOptions(e=""){return this.dotContainersService.getFiltered(e,this.maxOptions,!0).pipe(ue(t=>{const i=t.map(r=>({label:r.title,value:r,inactive:!1})).sort((r,o)=>r.label.localeCompare(o.label));return this.getOptionsGroupedByHost(i)}),Ai(()=>this.handleContainersLoadError()))}handleContainersLoadError(){return this.control.disabled=!0,Re([])}setOptions(e){this.control.options=[...e],this.changeDetectorRef.detectChanges()}getOptionsGroupedByHost(e){const t=this.getContainerGroupedByHost(e);return Object.keys(t).map(i=>({label:i,items:t[i].items}))}getContainerGroupedByHost(e){return e.reduce((t,i)=>{const{hostname:r}=i.value.parentPermissionable;return t[r]||(t[r]={items:[]}),t[r].items.push(i),t},{})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}function za(n){return(za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(n)}function Hn(n,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function xhe(n){return Hn(1,arguments),n instanceof Date||"object"===za(n)&&"[object Date]"===Object.prototype.toString.call(n)}function Qn(n){Hn(1,arguments);var e=Object.prototype.toString.call(n);return n instanceof Date||"object"===za(n)&&"[object Date]"===e?new Date(n.getTime()):"number"==typeof n||"[object Number]"===e?new Date(n):(("string"==typeof n||"[object String]"===e)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function L5(n){if(Hn(1,arguments),!xhe(n)&&"number"!=typeof n)return!1;var e=Qn(n);return!isNaN(Number(e))}function R5(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(c){throw c},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){t=t.call(n)},n:function(){var c=t.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&null!=t.return&&t.return()}finally{if(s)throw a}}}}e0.\u0275fac=function(e){return new(e||e0)(O(AS,10),O(xh),O(ps),O(qn))},e0.\u0275dir=Me({type:e0,selectors:[["p-dropdown","dotContainerOptions",""]],standalone:!0});const kS=x(61348).default;function Zr(n){if(null===n||!0===n||!1===n)return NaN;var e=Number(n);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Ahe(n,e){Hn(2,arguments);var t=Qn(n).getTime(),i=Zr(e);return new Date(t+i)}function j5(n,e){Hn(2,arguments);var t=Zr(e);return Ahe(n,-t)}function NS(n,e){if(null==n)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}var z5=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},V5=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const PS={p:V5,P:function(e,t){var s,i=e.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return z5(e,t);switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"})}return s.replace("{{date}}",z5(r,t)).replace("{{time}}",V5(o,t))}};function Rh(n){var e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),n.getTime()-e.getTime()}var Phe=["D","DD"],Lhe=["YY","YYYY"];function B5(n){return-1!==Phe.indexOf(n)}function U5(n){return-1!==Lhe.indexOf(n)}function t0(n,e,t){if("YYYY"===n)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===n)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===n)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===n)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}function Fe(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function LS(n,e){return(LS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i})(n,e)}function on(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&LS(n,e)}function n0(n){return(n0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}function Fhe(n,e){if(e&&("object"===za(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Fe(n)}function sn(n){var e=function Rhe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,i=n0(n);if(e){var o=n0(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Fhe(this,r)}}function qt(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function H5(n){var e=function jhe(n,e){if("object"!==za(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var i=t.call(n,e||"default");if("object"!==za(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===za(e)?e:String(e)}function $5(n,e){for(var t=0;t0,i=t?e:1-e;if(i<=50)r=n||100;else{var o=i+50;r=n+100*Math.floor(o/100)-(n>=o%100?100:0)}return t?r:1-r}function K5(n){return n%400==0||n%4==0&&n%100!=0}var Zhe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s0}},{key:"set",value:function(r,o,s){var a=r.getUTCFullYear();if(s.isTwoDigitYear){var l=q5(s.year,a);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}return r.setUTCFullYear("era"in o&&1!==o.era?1-s.year:s.year,0,1),r.setUTCHours(0,0,0,0),r}}]),t}(fn),Q5={};function mu(){return Q5}function gu(n,e){var t,i,r,o,s,a,l,c;Hn(1,arguments);var u=mu(),d=Zr(null!==(t=null!==(i=null!==(r=null!==(o=e?.weekStartsOn)&&void 0!==o?o:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:u.weekStartsOn)&&void 0!==i?i:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==t?t:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Qn(n),f=h.getUTCDay(),p=(f=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var m=gu(p,e),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var y=gu(g,e);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}var Jhe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s0}},{key:"set",value:function(r,o,s,a){var l=FS(r,a);if(s.isTwoDigitYear){var c=q5(s.year,l);return r.setUTCFullYear(c,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),gu(r,a)}return r.setUTCFullYear("era"in o&&1!==o.era?1-s.year:s.year,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),gu(r,a)}}]),t}(fn);function Fh(n){Hn(1,arguments);var e=1,t=Qn(n),i=t.getUTCDay(),r=(i=1&&o<=4}},{key:"set",value:function(r,o,s){return r.setUTCMonth(3*(s-1),1),r.setUTCHours(0,0,0,0),r}}]),t}(fn),nfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=4}},{key:"set",value:function(r,o,s){return r.setUTCMonth(3*(s-1),1),r.setUTCHours(0,0,0,0),r}}]),t}(fn),ife=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=11}},{key:"set",value:function(r,o,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),t}(fn),rfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=11}},{key:"set",value:function(r,o,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),t}(fn);function ofe(n,e){var t,i,r,o,s,a,l,c;Hn(1,arguments);var u=mu(),d=Zr(null!==(t=null!==(i=null!==(r=null!==(o=e?.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==i?i:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==t?t:1),h=FS(n,e),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=gu(f,e);return p}function Z5(n,e){Hn(1,arguments);var t=Qn(n),i=gu(t,e).getTime()-ofe(t,e).getTime();return Math.round(i/6048e5)+1}var lfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=53}},{key:"set",value:function(r,o,s,a){return gu(function afe(n,e,t){Hn(2,arguments);var i=Qn(n),r=Zr(e),o=Z5(i,t)-r;return i.setUTCDate(i.getUTCDate()-7*o),i}(r,s,a),a)}}]),t}(fn);function J5(n){Hn(1,arguments);var e=Qn(n),t=e.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(t+1,0,4),i.setUTCHours(0,0,0,0);var r=Fh(i),o=new Date(0);o.setUTCFullYear(t,0,4),o.setUTCHours(0,0,0,0);var s=Fh(o);return e.getTime()>=r.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function cfe(n){Hn(1,arguments);var e=J5(n),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var i=Fh(t);return i}function X5(n){Hn(1,arguments);var e=Qn(n),t=Fh(e).getTime()-cfe(e).getTime();return Math.round(t/6048e5)+1}var hfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=53}},{key:"set",value:function(r,o,s){return Fh(function dfe(n,e){Hn(2,arguments);var t=Qn(n),i=Zr(e),r=X5(t)-i;return t.setUTCDate(t.getUTCDate()-7*r),t}(r,s))}}]),t}(fn),ffe=[31,28,31,30,31,30,31,31,30,31,30,31],pfe=[31,29,31,30,31,30,31,31,30,31,30,31],mfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=pfe[l]:o>=1&&o<=ffe[l]}},{key:"set",value:function(r,o,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),t}(fn),gfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(r,o,s){return r.setUTCMonth(0,s),r.setUTCHours(0,0,0,0),r}}]),t}(fn);function jS(n,e,t){var i,r,o,s,a,l,c,u;Hn(2,arguments);var d=mu(),h=Zr(null!==(i=null!==(r=null!==(o=null!==(s=t?.weekStartsOn)&&void 0!==s?s:null==t||null===(a=t.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:d.weekStartsOn)&&void 0!==r?r:null===(c=d.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Qn(n),p=Zr(e),m=f.getUTCDay(),g=p%7,y=(g+7)%7,v=(y=0&&o<=6}},{key:"set",value:function(r,o,s,a){return(r=jS(r,s,a)).setUTCHours(0,0,0,0),r}}]),t}(fn),_fe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=6}},{key:"set",value:function(r,o,s,a){return(r=jS(r,s,a)).setUTCHours(0,0,0,0),r}}]),t}(fn),vfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=6}},{key:"set",value:function(r,o,s,a){return(r=jS(r,s,a)).setUTCHours(0,0,0,0),r}}]),t}(fn),wfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=7}},{key:"set",value:function(r,o,s){return r=function bfe(n,e){Hn(2,arguments);var t=Zr(e);t%7==0&&(t-=7);var i=1,r=Qn(n),o=r.getUTCDay(),s=t%7,a=(s+7)%7,l=(a=1&&o<=12}},{key:"set",value:function(r,o,s){var a=r.getUTCHours()>=12;return r.setUTCHours(a&&s<12?s+12:a||12!==s?s:0,0,0,0),r}}]),t}(fn),Sfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=23}},{key:"set",value:function(r,o,s){return r.setUTCHours(s,0,0,0),r}}]),t}(fn),Efe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=11}},{key:"set",value:function(r,o,s){var a=r.getUTCHours()>=12;return r.setUTCHours(a&&s<12?s+12:s,0,0,0),r}}]),t}(fn),xfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=24}},{key:"set",value:function(r,o,s){return r.setUTCHours(s<=24?s%24:s,0,0,0),r}}]),t}(fn),Ife=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=59}},{key:"set",value:function(r,o,s){return r.setUTCMinutes(s,0,0),r}}]),t}(fn),Ofe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=59}},{key:"set",value:function(r,o,s){return r.setUTCSeconds(s,0),r}}]),t}(fn),Afe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s0?i:1-i;return bn("yy"===t?r%100:r,t.length)},Vl_M=function(e,t){var i=e.getUTCMonth();return"M"===t?String(i+1):bn(i+1,2)},Vl_d=function(e,t){return bn(e.getUTCDate(),t.length)},Vl_h=function(e,t){return bn(e.getUTCHours()%12||12,t.length)},Vl_H=function(e,t){return bn(e.getUTCHours(),t.length)},Vl_m=function(e,t){return bn(e.getUTCMinutes(),t.length)},Vl_s=function(e,t){return bn(e.getUTCSeconds(),t.length)},Vl_S=function(e,t){var i=t.length,r=e.getUTCMilliseconds();return bn(Math.floor(r*Math.pow(10,i-3)),t.length)};var Qfe={G:function(e,t,i){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});default:return i.era(r,{width:"wide"})}},y:function(e,t,i){if("yo"===t){var r=e.getUTCFullYear();return i.ordinalNumber(r>0?r:1-r,{unit:"year"})}return Vl_y(e,t)},Y:function(e,t,i,r){var o=FS(e,r),s=o>0?o:1-o;return"YY"===t?bn(s%100,2):"Yo"===t?i.ordinalNumber(s,{unit:"year"}):bn(s,t.length)},R:function(e,t){return bn(J5(e),t.length)},u:function(e,t){return bn(e.getUTCFullYear(),t.length)},Q:function(e,t,i){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return bn(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,i){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return bn(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,i){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Vl_M(e,t);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,i){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return bn(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,i,r){var o=Z5(e,r);return"wo"===t?i.ordinalNumber(o,{unit:"week"}):bn(o,t.length)},I:function(e,t,i){var r=X5(e);return"Io"===t?i.ordinalNumber(r,{unit:"week"}):bn(r,t.length)},d:function(e,t,i){return"do"===t?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):Vl_d(e,t)},D:function(e,t,i){var r=function qfe(n){Hn(1,arguments);var e=Qn(n),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime(),r=t-i;return Math.floor(r/864e5)+1}(e);return"Do"===t?i.ordinalNumber(r,{unit:"dayOfYear"}):bn(r,t.length)},E:function(e,t,i){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,i,r){var o=e.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return bn(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,i,r){var o=e.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return bn(s,t.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,i){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return bn(o,t.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,i){var o=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,i){var o,r=e.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,i){var o,r=e.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,i){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return Vl_h(e,t)},H:function(e,t,i){return"Ho"===t?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Vl_H(e,t)},K:function(e,t,i){var r=e.getUTCHours()%12;return"Ko"===t?i.ordinalNumber(r,{unit:"hour"}):bn(r,t.length)},k:function(e,t,i){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?i.ordinalNumber(r,{unit:"hour"}):bn(r,t.length)},m:function(e,t,i){return"mo"===t?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Vl_m(e,t)},s:function(e,t,i){return"so"===t?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Vl_s(e,t)},S:function(e,t){return Vl_S(e,t)},X:function(e,t,i,r){var s=(r._originalDate||e).getTimezoneOffset();if(0===s)return"Z";switch(t){case"X":return nz(s);case"XXXX":case"XX":return yu(s);default:return yu(s,":")}},x:function(e,t,i,r){var s=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return nz(s);case"xxxx":case"xx":return yu(s);default:return yu(s,":")}},O:function(e,t,i,r){var s=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tz(s,":");default:return"GMT"+yu(s,":")}},z:function(e,t,i,r){var s=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tz(s,":");default:return"GMT"+yu(s,":")}},t:function(e,t,i,r){return bn(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,i,r){return bn((r._originalDate||e).getTime(),t.length)}};function tz(n,e){var t=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),o=i%60;if(0===o)return t+String(r);var s=e||"";return t+String(r)+s+bn(o,2)}function nz(n,e){return n%60==0?(n>0?"-":"+")+bn(Math.abs(n)/60,2):yu(n,e)}function yu(n,e){var t=e||"",i=n>0?"-":"+",r=Math.abs(n);return i+bn(Math.floor(r/60),2)+t+bn(r%60,2)}const Zfe=Qfe;var Jfe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xfe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,epe=/^'([^]*?)'?$/,tpe=/''/g,npe=/[a-zA-Z]/;function rpe(n){var e=n.match(epe);return e?e[1].replace(tpe,"'"):n}function ope(n,e){Hn(2,arguments);var t=Qn(n),i=Qn(e),r=t.getTime()-i.getTime();return r<0?-1:r>0?1:r}function spe(n){return NS({},n)}var iz=6e4,rz=43200,oz=525600,sz=x(30298);class zh{constructor(e){e.getSystemTimeZone().subscribe(t=>this._systemTimeZone=t)}get localeOptions(){return this._localeOptions}set localeOptions(e){this._localeOptions=e}setLang(e){var t=this;return su(function*(){let o,[i,r]=e.replace("_","-").split("-");i=i?.toLowerCase()||"en",r=r?.toLocaleUpperCase()||"US";try{o=yield x(13131)(`./${i}-${r}/index.js`)}catch{try{o=yield x(71213)(`./${i}/index.js`)}catch{o=yield Promise.resolve().then(x.bind(x,61348))}}t.localeOptions={locale:o.default}})()}differenceInCalendarDays(e,t){return function Gfe(n,e){Hn(2,arguments);var t=ez(n),i=ez(e),r=t.getTime()-Rh(t),o=i.getTime()-Rh(i);return Math.round((r-o)/864e5)}(e,t)}isValid(e,t){return function lpe(n,e){return L5(function Hfe(n,e,t,i){var r,o,s,a,l,c,u,d,h,f,p,m,g,y,v,w,_,N;Hn(3,arguments);var T=String(n),ne=String(e),K=mu(),Ne=null!==(r=null!==(o=i?.locale)&&void 0!==o?o:K.locale)&&void 0!==r?r:kS;if(!Ne.match)throw new RangeError("locale must contain match property");var He=Zr(null!==(s=null!==(a=null!==(l=null!==(c=i?.firstWeekContainsDate)&&void 0!==c?c:null==i||null===(u=i.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==l?l:K.firstWeekContainsDate)&&void 0!==a?a:null===(h=K.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==s?s:1);if(!(He>=1&&He<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var pt=Zr(null!==(p=null!==(m=null!==(g=null!==(y=i?.weekStartsOn)&&void 0!==y?y:null==i||null===(v=i.locale)||void 0===v||null===(w=v.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==g?g:K.weekStartsOn)&&void 0!==m?m:null===(_=K.locale)||void 0===_||null===(N=_.options)||void 0===N?void 0:N.weekStartsOn)&&void 0!==p?p:0);if(!(pt>=0&&pt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===ne)return""===T?Qn(t):new Date(NaN);var fe,at={firstWeekContainsDate:He,weekStartsOn:pt,locale:Ne},ot=[new Bhe],pn=ne.match(jfe).map(function(Wt){var ct=Wt[0];return ct in PS?(0,PS[ct])(Wt,Ne.formatLong):Wt}).join("").match(Ffe),St=[],se=F5(pn);try{var be=function(){var ct=fe.value;!(null!=i&&i.useAdditionalWeekYearTokens)&&U5(ct)&&t0(ct,ne,n),(null==i||!i.useAdditionalDayOfYearTokens)&&B5(ct)&&t0(ct,ne,n);var Fn=ct[0],Ar=Rfe[Fn];if(Ar){var Iu=Ar.incompatibleTokens;if(Array.isArray(Iu)){var Yl=St.find(function(Ou){return Iu.includes(Ou.token)||Ou.token===Fn});if(Yl)throw new RangeError("The format string mustn't contain `".concat(Yl.fullToken,"` and `").concat(ct,"` at the same time"))}else if("*"===Ar.incompatibleTokens&&St.length>0)throw new RangeError("The format string mustn't contain `".concat(ct,"` and any other token at the same time"));St.push({token:Fn,fullToken:ct});var ql=Ar.run(T,ct,Ne.match,at);if(!ql)return{v:new Date(NaN)};ot.push(ql.setter),T=ql.rest}else{if(Fn.match(Ufe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Fn+"`");if("''"===ct?ct="'":"'"===Fn&&(ct=$fe(ct)),0!==T.indexOf(ct))return{v:new Date(NaN)};T=T.slice(ct.length)}};for(se.s();!(fe=se.n()).done;){var Ue=be();if("object"===za(Ue))return Ue.v}}catch(Wt){se.e(Wt)}finally{se.f()}if(T.length>0&&Bfe.test(T))return new Date(NaN);var It=ot.map(function(Wt){return Wt.priority}).sort(function(Wt,ct){return ct-Wt}).filter(function(Wt,ct,Fn){return Fn.indexOf(Wt)===ct}).map(function(Wt){return ot.filter(function(ct){return ct.priority===Wt}).sort(function(ct,Fn){return Fn.subPriority-ct.subPriority})}).map(function(Wt){return Wt[0]}),ln=Qn(t);if(isNaN(ln.getTime()))return new Date(NaN);var Yi,zt=j5(ln,Rh(ln)),Mn={},Rt=F5(It);try{for(Rt.s();!(Yi=Rt.n()).done;){var eo=Yi.value;if(!eo.validate(zt,at))return new Date(NaN);var Tn=eo.set(zt,Mn,at);Array.isArray(Tn)?(zt=Tn[0],NS(Mn,Tn[1])):zt=Tn}}catch(Wt){Rt.e(Wt)}finally{Rt.f()}return zt}(n,e,new Date))}(e,t)}format(e,t){return function ipe(n,e,t){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,y,v,w,_;Hn(2,arguments);var N=String(e),T=mu(),ne=null!==(i=null!==(r=t?.locale)&&void 0!==r?r:T.locale)&&void 0!==i?i:kS,K=Zr(null!==(o=null!==(s=null!==(a=null!==(l=t?.firstWeekContainsDate)&&void 0!==l?l:null==t||null===(c=t.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:T.firstWeekContainsDate)&&void 0!==s?s:null===(d=T.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==o?o:1);if(!(K>=1&&K<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Ne=Zr(null!==(f=null!==(p=null!==(m=null!==(g=t?.weekStartsOn)&&void 0!==g?g:null==t||null===(y=t.locale)||void 0===y||null===(v=y.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:T.weekStartsOn)&&void 0!==p?p:null===(w=T.locale)||void 0===w||null===(_=w.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==f?f:0);if(!(Ne>=0&&Ne<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!ne.localize)throw new RangeError("locale must contain localize property");if(!ne.formatLong)throw new RangeError("locale must contain formatLong property");var He=Qn(n);if(!L5(He))throw new RangeError("Invalid time value");var pt=Rh(He),at=j5(He,pt),ot={firstWeekContainsDate:K,weekStartsOn:Ne,locale:ne,_originalDate:He},pn=N.match(Xfe).map(function(St){var se=St[0];return"p"===se||"P"===se?(0,PS[se])(St,ne.formatLong):St}).join("").match(Jfe).map(function(St){if("''"===St)return"'";var se=St[0];if("'"===se)return rpe(St);var fe=Zfe[se];if(fe)return!(null!=t&&t.useAdditionalWeekYearTokens)&&U5(St)&&t0(St,e,String(n)),!(null!=t&&t.useAdditionalDayOfYearTokens)&&B5(St)&&t0(St,e,String(n)),fe(at,St,ne.localize,ot);if(se.match(npe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+se+"`");return St}).join("");return pn}(e,t,{...this.localeOptions})}formatTZ(e,t){const i=(0,sz.utcToZonedTime)(e,this._systemTimeZone.id);return(0,sz.format)(i,t,{timeZone:this._systemTimeZone.id})}getRelative(e,t=this.getUTC()){return function ape(n,e,t){var i,r,o;Hn(2,arguments);var s=mu(),a=null!==(i=null!==(r=t?.locale)&&void 0!==r?r:s.locale)&&void 0!==i?i:kS;if(!a.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var l=ope(n,e);if(isNaN(l))throw new RangeError("Invalid time value");var u,d,c=NS(spe(t),{addSuffix:Boolean(t?.addSuffix),comparison:l});l>0?(u=Qn(e),d=Qn(n)):(u=Qn(n),d=Qn(e));var f,h=String(null!==(o=t?.roundingMethod)&&void 0!==o?o:"round");if("floor"===h)f=Math.floor;else if("ceil"===h)f=Math.ceil;else{if("round"!==h)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");f=Math.round}var w,p=d.getTime()-u.getTime(),m=p/iz,g=Rh(d)-Rh(u),y=(p-g)/iz,v=t?.unit;if("second"===(w=v?String(v):m<1?"second":m<60?"minute":m<1440?"hour":yi?this.dotFormatDateService.format(s,t):this.dotFormatDateService.getRelative(s)}}s0.\u0275fac=function(e){return new(e||s0)(O(zh,16))},s0.\u0275pipe=Wn({name:"dotRelativeDate",type:s0,pure:!0,standalone:!0});class a0{transform(e,t){return t.forEach((i,r)=>{e=e.replace(`{${r}}`,i)}),e}}function cpe(n,e){if(1&n){const t=Qe();I(0,"div",3)(1,"div",4),_e(2,"video",5),A(),I(3,"div",6)(4,"div"),_e(5,"dot-spinner",7),Te(6," Uploading video, wait until finished. "),A(),I(7,"button",8),de("click",function(){return ge(t),ye(M().cancel.emit(!0))}),A()()()}}function upe(n,e){1&n&&(I(0,"span",9),Te(1,"Uploading..."),A())}a0.\u0275fac=function(e){return new(e||a0)},a0.\u0275pipe=Wn({name:"dotStringFormat",type:a0,pure:!0,standalone:!0});class Vh{constructor(){this.cancel=new ie}}Vh.\u0275fac=function(e){return new(e||Vh)},Vh.\u0275cmp=xe({type:Vh,selectors:[["dot-upload-placeholder"]],inputs:{type:"type"},outputs:{cancel:"cancel"},standalone:!0,features:[tl],decls:3,vars:2,consts:[[3,"ngSwitch"],["class","placeholder-container",4,"ngSwitchCase"],["class","default-message",4,"ngSwitchDefault"],[1,"placeholder-container"],[1,"preview-container__video"],["src","","controls","",1,"video"],[1,"preview-container__loading"],["size","30px"],["pButton","","label","Cancel",1,"p-button-md","p-button-outlined",3,"click"],[1,"default-message"]],template:function(e,t){1&e&&(mt(0,0),E(1,cpe,8,0,"div",1),E(2,upe,2,0,"span",2),gt()),2&e&&(b("ngSwitch",t.type),C(1),b("ngSwitchCase","video"))},dependencies:[zn,Id,y_,__,ks,ds,hu,Lh],styles:[".placeholder-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;width:-moz-fit-content;width:fit-content;padding:0}.preview-container__video[_ngcontent-%COMP%]{aspect-ratio:16/9;height:300px}.preview-container__video[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%}.preview-container__loading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:1rem 0}.default-message[_ngcontent-%COMP%]{background-color:#f3f3f4;display:block;padding:16px;font-size:1.25rem;width:100%}"],changeDetection:0});const zS=new $t({state:{init:()=>Ln.empty,apply(n,e){e=e.map(n.mapping,n.doc);const t=n.getMeta(this);if(t&&t.add){const r=Ei.widget(t.add.pos,t.add.element,{key:t.add.id});e=e.add(n.doc,[r])}else t&&t.remove&&(e=e.remove(e.find(null,null,i=>i.key==t.remove.id)));return e}},props:{decorations(n){return this.getState(n)}}});class dpe{constructor(e,t,i){this.applicationRef=t.get(yc),this.componentRef=function w$(n,e){const t=gn(n),i=e.elementInjector||ky();return new Rf(t).create(i,e.projectableNodes,e.hostElement,e.environmentInjector)}(e,{environmentInjector:this.applicationRef.injector}),this.updateProps(i),this.applicationRef.attachView(this.componentRef.hostView)}get instance(){return this.componentRef.instance}get elementRef(){return this.componentRef.injector.get(kt)}get dom(){return this.elementRef.nativeElement}updateProps(e){Object.entries(e).forEach(([t,i])=>{this.instance[t]=i})}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy(),this.applicationRef.detachView(this.componentRef.hostView)}}class ag{}ag.\u0275fac=function(e){return new(e||ag)},ag.\u0275cmp=xe({type:ag,selectors:[["ng-component"]],inputs:{editor:"editor",node:"node",decorations:"decorations",selected:"selected",extension:"extension",getPos:"getPos",updateAttributes:"updateAttributes",deleteNode:"deleteNode"},decls:0,vars:0,template:function(e,t){},encapsulation:2});class hpe extends sce{mount(){this.renderer=new dpe(this.component,this.options.injector,{editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(i={})=>this.updateAttributes(i),deleteNode:()=>this.deleteNode()}),this.extension.config.draggable&&(this.renderer.elementRef.nativeElement.ondragstart=i=>{this.onDragStart(i)}),this.contentDOMElement=this.node.isLeaf?null:document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit",this.renderer.detectChanges())}get dom(){return this.renderer.dom}get contentDOM(){return this.node.isLeaf?null:(this.maybeMoveContentDOM(),this.contentDOMElement)}maybeMoveContentDOM(){const e=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&e&&!e.contains(this.contentDOMElement)&&e.appendChild(this.contentDOMElement)}update(e,t){return this.options.update?this.options.update(e,t):e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.renderer.updateProps({node:e,decorations:t}),this.maybeMoveContentDOM()),!0)}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy()}}function ppe(n,e){1&n&&Dt(0)}function mpe(n,e){if(1&n&&(I(0,"div",8),_r(1,1),E(2,ppe,1,0,"ng-container",6),A()),2&n){const t=M();C(2),b("ngTemplateOutlet",t.headerTemplate)}}function gpe(n,e){1&n&&Dt(0)}function ype(n,e){if(1&n&&(I(0,"div",9),Te(1),E(2,gpe,1,0,"ng-container",6),A()),2&n){const t=M();C(1),Vi(" ",t.header," "),C(1),b("ngTemplateOutlet",t.titleTemplate)}}function _pe(n,e){1&n&&Dt(0)}function vpe(n,e){if(1&n&&(I(0,"div",10),Te(1),E(2,_pe,1,0,"ng-container",6),A()),2&n){const t=M();C(1),Vi(" ",t.subheader," "),C(1),b("ngTemplateOutlet",t.subtitleTemplate)}}function bpe(n,e){1&n&&Dt(0)}function wpe(n,e){1&n&&Dt(0)}function Cpe(n,e){if(1&n&&(I(0,"div",11),_r(1,2),E(2,wpe,1,0,"ng-container",6),A()),2&n){const t=M();C(2),b("ngTemplateOutlet",t.footerTemplate)}}const Dpe=["*",[["p-header"]],[["p-footer"]]],Mpe=["*","p-header","p-footer"];let VS=(()=>{class n{constructor(t){this.el=t}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"title":this.titleTemplate=t.template;break;case"subtitle":this.subtitleTemplate=t.template;break;case"content":default:this.contentTemplate=t.template;break;case"footer":this.footerTemplate=t.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return n.\u0275fac=function(t){return new(t||n)(O(kt))},n.\u0275cmp=xe({type:n,selectors:[["p-card"]],contentQueries:function(t,i,r){if(1&t&&(fi(r,DL,5),fi(r,ML,5),fi(r,rr,4)),2&t){let o;Xe(o=et())&&(i.headerFacet=o.first),Xe(o=et())&&(i.footerFacet=o.first),Xe(o=et())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:Mpe,decls:9,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(t,i){1&t&&(So(Dpe),I(0,"div",0),E(1,mpe,3,1,"div",1),I(2,"div",2),E(3,ype,3,2,"div",3),E(4,vpe,3,2,"div",4),I(5,"div",5),_r(6),E(7,bpe,1,0,"ng-container",6),A(),E(8,Cpe,3,1,"div",7),A()()),2&t&&(Dn(i.styleClass),b("ngClass","p-card p-component")("ngStyle",i.style),C(1),b("ngIf",i.headerFacet||i.headerTemplate),C(2),b("ngIf",i.header||i.titleTemplate),C(1),b("ngIf",i.subheader||i.subtitleTemplate),C(3),b("ngTemplateOutlet",i.contentTemplate),C(1),b("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[gi,nn,Oo,wr],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),az=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,xa]}),n})();function Tpe(n,e){if(1&n&&_e(0,"dot-contentlet-thumbnail",4),2&n){const t=M();b("width",94)("height",94)("iconSize","72px")("contentlet",t.data)}}function Spe(n,e){if(1&n&&(I(0,"h3",5),Te(1),A()),2&n){const t=M();C(1),Ot(t.data.title)}}function Epe(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M();C(1),Ot(t.data.contentType)}}function xpe(n,e){if(1&n&&(I(0,"div",6),_e(1,"dot-state-icon",7),is(2,"contentletState"),I(3,"dot-badge",8),Te(4),is(5,"lowercase"),A()()),2&n){const t=M();C(1),b("state",rs(2,3,t.data)),C(2),b("bordered",!0),C(1),Ot(rs(5,5,t.data.language))}}class Bh extends ag{ngOnInit(){this.data=this.node.attrs.data}}Bh.\u0275fac=function(){let n;return function(t){return(n||(n=Oi(Bh)))(t||Bh)}}(),Bh.\u0275cmp=xe({type:Bh,selectors:[["dot-contentlet-block"]],features:[yn],decls:5,vars:2,consts:[["pTemplate","header"],["class","title",4,"pTemplate"],[4,"pTemplate"],["pTemplate","footer"],[3,"width","height","iconSize","contentlet"],[1,"title"],[1,"state"],["size","16px",3,"state"],[3,"bordered"]],template:function(e,t){1&e&&(I(0,"p-card"),E(1,Tpe,1,4,"ng-template",0),E(2,Spe,2,1,"h3",1),E(3,Epe,2,1,"span",2),E(4,xpe,6,7,"ng-template",3),A()),2&e&&(C(2),b("pTemplate","title"),C(1),b("pTemplate","subtitle"))},dependencies:[VS,rr,jD,eg],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;box-sizing:border-box;margin-bottom:1rem}[_nghost-%COMP%] .p-card{background:#ffffff;border:1px solid #afb3c0;color:#14151a;display:flex}[_nghost-%COMP%] .p-card .p-card-header{box-sizing:border-box;padding:1rem;padding-right:0}[_nghost-%COMP%] .p-card .p-card-body{box-sizing:border-box;min-width:100px;padding:1rem 1.5rem 1rem 1rem;flex:1}[_nghost-%COMP%] .p-card .p-card-body .p-card-content{padding:0}[_nghost-%COMP%] .p-card .p-card-body .p-card-subtitle{color:#6c7389;font-size:.813rem;font-weight:regular;margin-bottom:.75rem}[_nghost-%COMP%] .p-card .p-card-body .p-card-title{overflow:hidden;width:100%;margin:0}[_nghost-%COMP%] .p-card .p-card-body .p-card-title h3{font-weight:700;margin-bottom:.5rem;margin:0;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap;font-size:1.5rem}[_nghost-%COMP%] dot-contentlet-thumbnail[_ngcontent-%COMP%]{align-items:center;display:block;position:relative;width:94px;height:94px}[_nghost-%COMP%] .state[_ngcontent-%COMP%]{align-items:center;display:flex}[_nghost-%COMP%] .state[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:.5rem}[_nghost-%COMP%] .state[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{margin-right:0}"]});const Ipe=n=>Rn.create({name:"dotContent",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:e=>({data:e.getAttribute("data")}),renderHTML:e=>({data:e.data})}}),parseHTML:()=>[{tag:"dotcms-contentlet-block"}],renderHTML({HTMLAttributes:e}){let t=["span",{}];return e.data.hasTitleImage&&(t=["img",{src:e.data.image}]),["div",["h3",{class:e.data.title},e.data.title],["div",e.data.identifier],t,["div",{},e.data.language]]},addNodeView:()=>((n,e)=>t=>new hpe(n,t,e))(Bh,{injector:n})}),Ope=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ape=Rn.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",Xt(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[h5({find:Ope,type:this.type,getAttributes:n=>{const[,,e,t,i]=n;return{src:t,alt:e,title:i}}})]}}),lz="language_id",kpe=(n,e)=>{const{href:t=null,target:i}=e;return["a",{href:t,target:i},cz(n,e)]},cz=(n,e)=>["img",Xt(n,e)],uz=(n,e)=>n.includes(lz)?n:`${n}?${lz}=${e}`,Npe=n=>{if("string"==typeof n)return{src:n,data:"null"};const{fileAsset:e,asset:t,title:i,languageId:r}=n;return{data:n,src:uz(e||t,r),title:i,alt:i}},Jr=Ape.extend({name:"dotImage",addOptions:()=>({inline:!1,allowBase64:!0,HTMLAttributes:{}}),addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:uz(n.src||n.data?.asset,n.data?.languageId)})},alt:{default:null,parseHTML:n=>n.getAttribute("alt"),renderHTML:n=>({alt:n.alt||n.data?.title})},title:{default:null,parseHTML:n=>n.getAttribute("title"),renderHTML:n=>({title:n.title||n.data?.title})},href:{default:null,parseHTML:n=>n.getAttribute("href"),renderHTML:n=>({href:n.href})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})},target:{default:null,parseHTML:n=>n.getAttribute("target"),renderHTML:n=>({target:n.target})}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},addCommands(){return{...this.parent?.(),setImageLink:n=>({commands:e})=>e.updateAttributes(this.name,n),unsetImageLink:()=>({commands:n})=>n.updateAttributes(this.name,{href:""}),insertImage:(n,e)=>({chain:t,state:i})=>{const{selection:r}=i,{head:o}=r,s={attrs:Npe(n),type:Jr.name};return t().insertContentAt(e??o,s).run()}}},renderHTML({HTMLAttributes:n}){const{href:e=null,style:t}=n||{};return["div",{class:"image-container",style:t},e?kpe(this.options.HTMLAttributes,n):cz(this.options.HTMLAttributes,n)]}}),Ppe=Rn.create({name:"dotVideo",addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:n.src})},mimeType:{default:null,parseHTML:n=>n.getAttribute("mimeType"),renderHTML:n=>({mimeType:n.mimeType})},width:{default:null,parseHTML:n=>n.getAttribute("width"),renderHTML:n=>({width:n.width})},height:{default:null,parseHTML:n=>n.getAttribute("height"),renderHTML:n=>({height:n.height})},orientation:{default:null,parseHTML:n=>n.getAttribute("orientation"),renderHTML:({height:n,width:e})=>({orientation:n>e?"vertical":"horizontal"})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})}}),parseHTML:()=>[{tag:"video"}],addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group:()=>"block",draggable:!0,addCommands(){return{...this.parent?.(),insertVideo:(n,e)=>({commands:t,state:i})=>{const{selection:r}=i,{head:o}=r;return t.insertContentAt(e??o,{type:this.name,attrs:Lpe(n)})}}},renderHTML:({HTMLAttributes:n})=>["div",{class:"video-container"},["video",Xt(n,{controls:!0})]]}),Lpe=n=>{if("string"==typeof n)return{src:n};const{assetMetaData:e,asset:t,mimeType:i,fileAsset:r}=n,{width:o="auto",height:s="auto",contentType:a}=e||{},l=s>o?"vertical":"horizontal";return{src:r||t,data:{...n},width:o,height:s,mimeType:i||a,orientation:l}},Rpe=Rn.create({name:"aiContent",addAttributes:()=>({content:{default:""}}),parseHTML:()=>[{tag:"div[ai-content]"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertAINode:n=>({commands:e})=>e.insertContent({type:this.name,attrs:{content:n}})}},renderHTML:()=>["div[ai-content]"],addNodeView:()=>({node:n})=>{const e=document.createElement("div"),t=document.createElement("div");return t.innerHTML=n.attrs.content||"",e.contentEditable="true",e.classList.add("ai-content-container"),e.append(t),{dom:e}}}),Fpe=Rn.create({name:"loader",addAttributes:()=>({isLoading:{default:!0}}),parseHTML:()=>[{tag:"div.p-d-flex.p-jc-center"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertLoaderNode:n=>({commands:e})=>e.insertContent({type:this.name,attrs:{isLoading:n}})}},renderHTML:()=>["div",{class:"p-d-flex p-jc-center"}],addNodeView:()=>({node:n})=>{const e=document.createElement("div");if(e.classList.add("loader-style"),n.attrs.isLoading){const t=document.createElement("div");t.classList.add("p-progress-spinner"),e.append(t)}return{dom:e}}}),jpe={video:"dotVideo",image:"dotImage"},zpe=(n,e)=>vn.create({name:"assetUploader",addProseMirrorPlugins(){const t=n.get(Ys),i=this.editor;let r,o;function s(m){return m?.type.split("/")[0]||""}function a(m){alert(`Can drop just one ${m} at a time`)}function c(m){const{view:g}=i,{state:y}=g;g.dispatch(y.tr.setMeta(zS,{remove:{id:m}})),M5(g)}function u({view:m,file:g,position:y}){const v=s(g),w=g.name;(function l({view:m,position:g,id:y,type:v}){const w=e.createComponent(Vh),_=m.state.tr;w.instance.type=v,w.instance.cancel.subscribe(()=>{c(y),o.abort(),r.unsubscribe()}),w.changeDetectorRef.detectChanges(),_.setMeta(zS,{add:{id:y,pos:g,element:w.location.nativeElement}}),m.dispatch(_)})({view:m,position:y,id:w,type:v}),o=new AbortController;const{signal:_}=o;r=t.publishContent({data:g,signal:_}).pipe(Tt(1)).subscribe(N=>{const T=N[0][Object.keys(N[0])[0]];i.commands.insertAsset({type:v,payload:T,position:y})},N=>alert(N.message),()=>c(w))}function d(m){return i.commands.isNodeRegistered(jpe[m])}return[zS,new $t({key:new rn("assetUploader"),props:{handleDOMEvents:{click(m,g){!function h(m,g){const{doc:y,selection:v}=m.state,{ranges:w}=v,_=Math.min(...w.map(ne=>ne.$from.pos)),N=y.nodeAt(_);if(g.target?.closest("a")&&N.type.name===Jr.name)g.preventDefault(),g.stopPropagation()}(m,g)},paste(m,g){!function f(m,g){const{clipboardData:y}=g,{files:v}=y,w=y.getData("Text")||"",_=s(v[0]),N=d(_);if(_&&!N)return void a(_);if(w&&!T5(w))return;const{from:T}=(n=>{const{state:e}=n,{selection:t}=e,{ranges:i}=t;return{from:Math.min(...i.map(s=>s.$from.pos)),to:Math.max(...i.map(s=>s.$to.pos))}})(m);T5(w)&&d("image")?i.chain().insertImage(w,T).addNextLine().run():u({view:m,file:v[0],position:T}),g.preventDefault(),g.stopPropagation()}(m,g)},drop(m,g){!function p(m,g){const{files:y}=g.dataTransfer,{length:v}=y,w=y[0],_=s(w);if(!d(_))return;if(v>1)return void a(_);g.preventDefault(),g.stopPropagation();const{clientX:N,clientY:T}=g,{pos:ne}=m.posAtCoords({left:N,top:T});u({view:m,file:w,position:ne})}(m,g)}}}})]}}),Vpe=["cb"],Bpe=function(n,e,t){return{"p-checkbox-label":!0,"p-checkbox-label-active":n,"p-disabled":e,"p-checkbox-label-focus":t}};function Upe(n,e){if(1&n){const t=Qe();I(0,"label",7),de("click",function(r){ge(t);const o=M(),s=Cn(3);return ye(o.onClick(r,s,!0))}),Te(1),A()}if(2&n){const t=M();Dn(t.labelStyleClass),b("ngClass",nl(5,Bpe,t.checked(),t.disabled,t.focused)),Yt("for",t.inputId),C(1),Ot(t.label)}}const Hpe=function(n,e,t){return{"p-checkbox p-component":!0,"p-checkbox-checked":n,"p-checkbox-disabled":e,"p-checkbox-focused":t}},$pe=function(n,e,t){return{"p-highlight":n,"p-disabled":e,"p-focus":t}},Wpe={provide:Dr,useExisting:Bt(()=>BS),multi:!0};let BS=(()=>{class n{constructor(t){this.cd=t,this.checkboxIcon="pi pi-check",this.trueValue=!0,this.falseValue=!1,this.onChange=new ie,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.focused=!1}onClick(t,i,r){t.preventDefault(),!this.disabled&&!this.readonly&&(this.updateModel(t),r&&i.focus())}updateModel(t){let i;this.binary?(i=this.checked()?this.falseValue:this.trueValue,this.model=i,this.onModelChange(i)):(i=this.checked()?this.model.filter(r=>!Pt.equals(r,this.value)):this.model?[...this.model,this.value]:[this.value],this.onModelChange(i),this.model=i,this.formControl&&this.formControl.setValue(i)),this.onChange.emit({checked:i,originalEvent:t})}handleChange(t){this.readonly||this.updateModel(t)}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(t){this.model=t,this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:Pt.contains(this.value,this.model)}}return n.\u0275fac=function(t){return new(t||n)(O(qn))},n.\u0275cmp=xe({type:n,selectors:[["p-checkbox"]],viewQuery:function(t,i){if(1&t&&hn(Vpe,5),2&t){let r;Xe(r=et())&&(i.inputViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",name:"name",disabled:"disabled",binary:"binary",label:"label",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:"readonly",required:"required",trueValue:"trueValue",falseValue:"falseValue"},outputs:{onChange:"onChange"},features:[Nt([Wpe])],decls:7,vars:26,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","checkbox",3,"readonly","value","checked","disabled","focus","blur","change"],["cb",""],[1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[3,"class","ngClass","click",4,"ngIf"],[3,"ngClass","click"]],template:function(t,i){if(1&t){const r=Qe();I(0,"div",0)(1,"div",1)(2,"input",2,3),de("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("change",function(s){return i.handleChange(s)}),A()(),I(4,"div",4),de("click",function(s){ge(r);const a=Cn(3);return ye(i.onClick(s,a,!0))}),_e(5,"span",5),A()(),E(6,Upe,2,9,"label",6)}2&t&&(Dn(i.styleClass),b("ngStyle",i.style)("ngClass",nl(18,Hpe,i.checked(),i.disabled,i.focused)),C(2),b("readonly",i.readonly)("value",i.value)("checked",i.checked())("disabled",i.disabled),Yt("id",i.inputId)("name",i.name)("tabindex",i.tabindex)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel)("aria-checked",i.checked())("required",i.required),C(2),b("ngClass",nl(22,$pe,i.checked(),i.disabled,i.focused)),C(1),b("ngClass",i.checked()?i.checkboxIcon:null),C(1),b("ngIf",i.label))},dependencies:[gi,nn,wr],styles:[".p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative}.p-checkbox-disabled{cursor:default!important;pointer-events:none}.p-checkbox-box{display:flex;justify-content:center;align-items:center}p-checkbox{display:inline-flex;vertical-align:bottom;align-items:center}.p-checkbox-label{line-height:1}\n"],encapsulation:2,changeDetection:0}),n})(),dz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})(),lg=(()=>{class n{constructor(t,i,r){this.el=t,this.ngModel=i,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(t){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O($_,8),O(qn))},n.\u0275dir=Me({type:n,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(t,i){1&t&&de("input",function(o){return i.onInput(o)}),2&t&&es("p-filled",i.filled)}}),n})(),hz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();const Gpe=["group"];function Ype(n,e){if(1&n&&(mt(0),_e(1,"p-checkbox",11),I(2,"label",12),Te(3),is(4,"titlecase"),A(),gt()),2&n){const t=M().$implicit;C(1),b("formControlName",t.key)("binary",!0)("id",t.key),C(1),b("checkIsRequiredControl",t.key)("for",t.key),C(1),Ot(rs(4,6,t.label))}}const qpe=function(){return{width:"100%",fontSize:"14px",height:"40px"}};function Kpe(n,e){if(1&n&&_e(0,"input",15,16),2&n){const t=M(2).$implicit;Yn(uo(6,qpe)),b("formControlName",t.key)("id",t.key)("type",t.type)("min",t.min)}}const Qpe=function(n){return{"p-label-input-required":n}};function Zpe(n,e){if(1&n&&(mt(0),I(1,"label",13),Te(2),is(3,"titlecase"),A(),E(4,Kpe,2,7,"input",14),gt()),2&n){const t=M().$implicit;C(1),b("ngClass",xt(5,Qpe,t.required))("for",t.key),C(1),Ot(rs(3,3,t.label))}}function Jpe(n,e){1&n&&(I(0,"span",17),Te(1,"This field is required"),A())}function Xpe(n,e){if(1&n&&(I(0,"div",6),mt(1,7),E(2,Ype,5,8,"ng-container",8),E(3,Zpe,5,7,"ng-container",9),gt(),E(4,Jpe,2,0,"span",10),A()),2&n){const t=e.$implicit,i=M(2);b("ngClass",t.type),C(1),b("ngSwitch",t.type),C(1),b("ngSwitchCase","checkbox"),C(2),b("ngIf",i.form.controls[t.key].invalid&&i.form.controls[t.key].dirty)}}const eme=function(){return{width:"120px"}},tme=function(){return{padding:"11.5px 24px"}};function nme(n,e){if(1&n){const t=Qe();I(0,"form",1),de("ngSubmit",function(){return ge(t),ye(M().onSubmit())}),E(1,Xpe,5,4,"div",2),I(2,"div",3)(3,"button",4),de("click",function(){return ge(t),ye(M().hide.emit(!0))}),A(),_e(4,"button",5),A()()}if(2&n){const t=M();b("ngClass",null==t.options?null:t.options.customClass)("formGroup",t.form),C(1),b("ngForOf",t.dynamicControls),C(2),Yn(uo(8,eme)),C(1),Yn(uo(9,tme)),b("disabled",t.form.invalid)}}class cg{constructor(e){this.fb=e,this.formValues=new ie,this.hide=new ie,this.options=null,this.dynamicControls=[]}onSubmit(){this.formValues.emit({...this.form.value})}setFormValues(e){this.form.setValue(e)}buildForm(e){this.dynamicControls=e,this.form=this.fb.group({}),this.dynamicControls.forEach(t=>{this.form.addControl(t.key,this.fb.control(t.value||null,t.required?wc.required:[]))})}cleanForm(){this.form=null}}cg.\u0275fac=function(e){return new(e||cg)(O(W_))},cg.\u0275cmp=xe({type:cg,selectors:[["dot-bubble-form"]],viewQuery:function(e,t){if(1&e&&hn(Gpe,5),2&e){let i;Xe(i=et())&&(t.inputs=i)}},outputs:{formValues:"formValues",hide:"hide"},decls:1,vars:1,consts:[[3,"ngClass","formGroup","ngSubmit",4,"ngIf"],[3,"ngClass","formGroup","ngSubmit"],["class","field form-row",3,"ngClass",4,"ngFor","ngForOf"],[1,"form-action"],["pButton","","type","button","label","CANCEL",1,"p-button-outlined",3,"click"],["pButton","","type","submit","label","APPLY",1,"p-button",3,"disabled"],[1,"field","form-row",3,"ngClass"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","error-message",4,"ngIf"],[3,"formControlName","binary","id"],["dotFieldRequired","",3,"checkIsRequiredControl","for"],[3,"ngClass","for"],["pInputText","","type","control.type",3,"formControlName","id","type","min","style",4,"ngSwitchDefault"],["pInputText","","type","control.type",3,"formControlName","id","type","min"],["group",""],[1,"error-message"]],template:function(e,t){1&e&&E(0,nme,5,10,"form",0),2&e&&b("ngIf",t.form)},dependencies:[gi,Hr,nn,Id,y_,__,Rd,al,Cc,Ad,Ta,Dc,BS,ds,lg,og,PN],styles:["[_nghost-%COMP%]{background:#ffffff;border-radius:.125rem;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;padding:16px}form[_ngcontent-%COMP%]{width:400px;display:flex;flex-direction:column;gap:16px}form.dotTableForm[_ngcontent-%COMP%]{width:200px}form.dotTableForm[_ngcontent-%COMP%] .p-button-outlined[_ngcontent-%COMP%]{display:none}.form-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.form-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:12px}.form-row.checkbox[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.form-action[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-top:16px;width:100%;gap:10px}.error-message[_ngcontent-%COMP%]{color:#d82b2e;font-size:.625rem;text-align:left}"]});const ime=["list"];function rme(n,e){if(1&n&&_e(0,"dot-suggestions-list-item",5),2&n){const t=e.$implicit,i=e.index;b("command",t.command)("index",i)("label",t.label)("url",t.icon)("data",t.data)("page",!0)}}function ome(n,e){if(1&n&&(I(0,"div")(1,"dot-suggestion-list",null,3),E(3,rme,1,6,"dot-suggestions-list-item",4),A()()),2&n){const t=M();C(3),b("ngForOf",t.items)}}function sme(n,e){1&n&&_e(0,"dot-suggestion-loading-list")}function ame(n,e){if(1&n){const t=Qe();I(0,"dot-empty-message",6),de("back",function(){return ge(t),ye(M().handleBackButton())}),A()}2&n&&b("title",M().title)("showBackBtn",!0)}class Uh{constructor(){this.items=[],this.loading=!1,this.back=new ie}handleBackButton(){return this.back.emit(!0),!1}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(e){this.list.updateSelection(e)}}Uh.\u0275fac=function(e){return new(e||Uh)},Uh.\u0275cmp=xe({type:Uh,selectors:[["dot-suggestion-page"]],viewQuery:function(e,t){if(1&e&&hn(ime,5),2&e){let i;Xe(i=et())&&(t.list=i.first)}},inputs:{items:"items",loading:"loading",title:"title"},outputs:{back:"back"},decls:5,vars:2,consts:[[4,"ngIf","ngIfElse"],["loadingBlock",""],["emptyBlock",""],["list",""],[3,"command","index","label","url","data","page",4,"ngFor","ngForOf"],[3,"command","index","label","url","data","page"],[3,"title","showBackBtn","back"]],template:function(e,t){if(1&e&&(E(0,ome,4,1,"div",0),E(1,sme,1,0,"ng-template",null,1,Bn),E(3,ame,1,2,"ng-template",null,2,Bn)),2&e){const i=Cn(2),r=Cn(4);b("ngIf",t.items.length)("ngIfElse",t.loading?i:r)}},styles:["[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#ffffff}[_nghost-%COMP%] {width:100%;box-shadow:none;padding:0}[_nghost-%COMP%] dotcms-suggestions-list-item{padding:8px}"]});const lme=["input"],cme=["suggestions"];function ume(n,e){1&n&&_e(0,"hr",11)}const dme=function(){return{fontSize:"32px"}};function hme(n,e){if(1&n&&(I(0,"div",12)(1,"a",13)(2,"span",14),Te(3,"language"),A(),I(4,"span",15),Te(5),A()(),I(6,"div",16)(7,"div",17),_e(8,"p-checkbox",18),A(),I(9,"label",19),Te(10,"Open link in new window"),A()()()),2&n){const t=M();C(1),b("href",t.currentLink,Xa),C(1),Yn(uo(5,dme)),C(3),Ot(t.currentLink),C(3),b("binary",!0)}}function fme(n,e){if(1&n){const t=Qe();I(0,"dot-suggestion-page",20,21),de("back",function(){return ge(t),ye(M().resetForm())}),A()}if(2&n){const t=M();b("items",t.items)("loading",t.loading)("title",t.noResultsTitle)}}function pme(n,e){if(1&n){const t=Qe();I(0,"dot-form-actions",22),de("hide",function(r){return ge(t),ye(M().hide.emit(r))})("remove",function(r){return ge(t),ye(M().removeLink.emit(r))}),A()}2&n&&b("link",M().currentLink)}const mme=function(){return{width:"5rem",padding:".75rem 1rem",borderRadius:"0 2px 2px 0"}};class Hh{constructor(e,t,i){this.fb=e,this.suggestionsService=t,this.dotLanguageService=i,this.hide=new ie(!1),this.removeLink=new ie(!1),this.isSuggestionOpen=new ie(!1),this.setNodeProps=new ie,this.showSuggestions=!1,this.languageId=tg,this.initialValues={link:"",blank:!0},this.minChars=3,this.loading=!1,this.items=[]}onMouseDownHandler(e){const{target:t}=e;t!==this.input.nativeElement&&e.preventDefault()}get noResultsTitle(){return`No results for ${this.newLink}`}get currentLink(){return this.initialValues.link}get newLink(){return this.form.get("link").value}ngOnInit(){this.form=this.fb.group({...this.initialValues}),this.form.get("link").valueChanges.pipe(Hd(500)).subscribe(e=>{e.lengththis.setNodeProps.emit({link:this.currentLink,blank:e})),this.dotLanguageService.getLanguages().pipe(Tt(1)).subscribe(e=>this.dotLangs=e)}submitForm(){this.setNodeProps.emit(this.form.value),this.hide.emit(!0)}setLoading(){const e=this.newLink.length>=this.minChars&&!l0(this.newLink);this.items=e?this.items:[],this.showSuggestions=e,this.loading=e,e&&requestAnimationFrame(()=>this.isSuggestionOpen.emit(!0))}setFormValue({link:e="",blank:t=!0}){this.form.setValue({link:e,blank:t},{emitEvent:!1})}focusInput(){this.input.nativeElement.focus()}onKeyDownEvent(e){const t=this.suggestionsComponent?.items;if(e.stopImmediatePropagation(),"Escape"===e.key)return this.hide.emit(!0),!0;if(!this.showSuggestions||!t?.length)return!0;switch(e.key){case"Enter":return this.suggestionsComponent?.execCommand(),!1;case"ArrowUp":case"ArrowDown":this.suggestionsComponent?.updateSelection(e)}}resetForm(){this.showSuggestions=!1,this.setFormValue({...this.initialValues})}onSelection({payload:{url:e}}){this.setFormValue({...this.form.value,link:e}),this.submitForm()}searchContentlets({link:e=""}){this.loading=!0,this.suggestionsService.getContentletsByLink({link:e,currentLanguage:this.languageId}).pipe(Tt(1)).subscribe(t=>{this.items=t.map(i=>{const{languageId:r}=i;return i.language=this.getContentletLanguage(r),{label:i.title,icon:"contentlet/image",data:{contentlet:i},command:()=>{this.onSelection({payload:i,type:{name:"dotContent"}})}}}),this.loading=!1})}getContentletLanguage(e){const{languageCode:t,countryCode:i}=this.dotLangs[e];return t&&i?`${t}-${i}`:""}}Hh.\u0275fac=function(e){return new(e||Hh)(O(W_),O(jl),O(Rl))},Hh.\u0275cmp=xe({type:Hh,selectors:[["dot-bubble-link-form"]],viewQuery:function(e,t){if(1&e&&(hn(lme,5),hn(cme,5)),2&e){let i;Xe(i=et())&&(t.input=i.first),Xe(i=et())&&(t.suggestionsComponent=i.first)}},hostBindings:function(e,t){1&e&&de("mousedown",function(r){return t.onMouseDownHandler(r)})},inputs:{showSuggestions:"showSuggestions",languageId:"languageId",initialValues:"initialValues"},outputs:{hide:"hide",removeLink:"removeLink",isSuggestionOpen:"isSuggestionOpen",setNodeProps:"setNodeProps"},decls:11,vars:8,consts:[[1,"form-container"],["autocomplete","off",3,"formGroup","keydown","ngSubmit"],[1,"p-inputgroup","search-container"],[1,"p-inputgroup"],["id","editor-input-link","pInputText","","type","text","placeholder","Paste link or search for pages","formControlName","link",3,"input"],["input",""],["pButton","","type","submit","label","ADD",1,"p-button"],["class","divider",4,"ngIf"],["class","info-container",4,"ngIf"],[3,"items","loading","title","back",4,"ngIf"],[3,"link","hide","remove",4,"ngIf"],[1,"divider"],[1,"info-container"],["target","_blank",1,"url-container",3,"href"],[1,"material-icons"],[1,"truncate"],[1,"field-checkbox"],[1,"checkbox-container"],["id","editor-input-checkbox","formControlName","blank",3,"binary"],["for","editor-input-checkbox"],[3,"items","loading","title","back"],["suggestions",""],[3,"link","hide","remove"]],template:function(e,t){1&e&&(I(0,"div",0)(1,"form",1),de("keydown",function(r){return t.onKeyDownEvent(r)})("ngSubmit",function(){return t.submitForm()}),I(2,"div",2)(3,"div",3)(4,"input",4,5),de("input",function(){return t.setLoading()}),A(),_e(6,"button",6),A()(),E(7,ume,1,0,"hr",7),E(8,hme,11,6,"div",8),A(),E(9,fme,2,3,"dot-suggestion-page",9),E(10,pme,1,1,"dot-form-actions",10),A()),2&e&&(C(1),b("formGroup",t.form),C(5),Yn(uo(7,mme)),C(1),b("ngIf",t.showSuggestions||t.currentLink),C(1),b("ngIf",t.currentLink&&!t.showSuggestions),C(1),b("ngIf",t.showSuggestions),C(1),b("ngIf",!t.showSuggestions&&t.currentLink))},styles:[".form-container[_ngcontent-%COMP%]{background:#ffffff;border-radius:.125rem;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;width:400px}.form-container[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;max-width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%]{padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{background:#ffffff;border:1px solid #afb3c0}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .url-container[_ngcontent-%COMP%]{cursor:pointer;white-space:nowrap;font-size:16px;width:100%;word-wrap:normal;display:flex;align-items:center;text-decoration:none;gap:8px;color:#14151a}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%]{display:flex;gap:3.2px;min-width:100%;font-size:16px}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%]{cursor:pointer;width:32px;display:flex;align-items:center;justify-content:center}.divider[_ngcontent-%COMP%]{border:0;border-top:1px solid #ebecef;width:100%;margin:0}.truncate[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]});var gme=x(88222),yme=x.n(gme);const fz=({editor:n,view:e,pos:t})=>{const i=e.state.doc?.resolve(t),r=((n,e)=>{const t=e-n?.textOffset;return{to:t,from:n.index(){const{state:l}=this.editor,{to:c}=l.selection,{openOnClick:u}=Va.getState(l);this.pluginKey.getState(l).isOpen&&(u?(this.editor.commands.closeLinkForm(),requestAnimationFrame(()=>this.editor.commands.setTextSelection(c))):this.editor.commands.closeLinkForm())},this.editor=e,this.element=t,this.view=i,this.languageId=a,this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible",this.pluginKey=o,this.component=s,this.editor.on("focus",this.focusHandler),this.setComponentEvents(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){const i=this.pluginKey.getState(e.state),r=this.pluginKey.getState(t);i.isOpen!==r.isOpen?(this.createTooltip(),i.isOpen?this.show():this.hide(),this.detectLinkFormChanges()):this.detectLinkFormChanges()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=zo(e.parentElement,{...this.tippyOptions,...mR,getReferenceClientRect:()=>this.setTippyPosition(),content:this.element,onHide:()=>{this.editor.commands.closeLinkForm()}}))}show(){this.tippy?.show(),this.component.instance.showSuggestions=!1,this.setInputValues(),this.component.instance.focusInput()}hide(){this.tippy?.hide(),this.editor.view.focus()}setTippyPosition(){const{view:e}=this.editor,{state:t}=e,{doc:i,selection:r}=t,{ranges:o}=r,s=Math.min(...o.map(m=>m.$from.pos)),l=ru(e,s,Math.max(...o.map(m=>m.$to.pos))),{element:c}=this.editor.options,u=c.parentElement.getBoundingClientRect(),d=document.querySelector("#bubble-menu")?.getBoundingClientRect()||l,h=u.bottomthis.hide()),this.component.instance.removeLink.pipe(In(this.$destroy)).subscribe(()=>this.removeLink()),this.component.instance.isSuggestionOpen.pipe(In(this.$destroy)).subscribe(()=>this.tippy.popperInstance.update()),this.component.instance.setNodeProps.pipe(In(this.$destroy)).subscribe(e=>this.setLinkValues(e))}detectLinkFormChanges(){this.component.changeDetectorRef.detectChanges(),requestAnimationFrame(()=>this.tippy?.popperInstance?.forceUpdate())}getLinkProps(){const{href:e="",target:t="_top"}=this.editor.isActive("link")?this.editor.getAttributes("link"):this.editor.getAttributes(Jr.name);return{link:e,blank:"_blank"===t}}getLinkSelect(){const{state:e}=this.editor,{from:t,to:i}=e.selection,r=e.doc.textBetween(t,i," ");return l0(r)?r:""}isImageNode(){const{type:e}=this.editor.state.doc.nodeAt(this.editor.state.selection.from)||{};return e?.name===Jr.name}destroy(){this.tippy?.destroy(),this.editor.off("focus",this.focusHandler),this.$destroy.next(!0),this.component.destroy()}hanlderScroll(e){if(!this.tippy?.state.isMounted)return;const t=e.target,i=t?.parentElement?.parentElement;this.scrollElementMap[t.id]||this.scrollElementMap[i.id]||this.hide()}}const vme=n=>{let e;return new $t({key:n.pluginKey,view:t=>new _me({view:t,...n}),state:{init:()=>({isOpen:!1,openOnClick:!1}),apply(t,i,r){const{isOpen:o,openOnClick:s}=t.getMeta(Va)||{},a=Va.getState(r);return"boolean"==typeof o?{isOpen:o,openOnClick:s}:a||i}},props:{handleDOMEvents:{mousedown(t,i){const r=n.editor,o=((n,e)=>{const{clientX:t,clientY:i}=e,{pos:r}=n.posAtCoords({left:t,top:i});return r})(t,i),{isOpen:s,openOnClick:a}=Va.getState(r.state);s&&a&&r.chain().unsetHighlight().setTextSelection(o).run()}},handleClickOn(t,i,r){const o=n.editor;if(o.isActive("link")&&i){if(!yme()(e,r))return fz({editor:o,view:t,pos:i}),e=r,!0;o.chain().setTextSelection(i).closeLinkForm().run()}else e=r},handleDoubleClickOn(t,i){const r=n.editor;if(r.isActive("link"))return fz({editor:r,view:t,pos:i}),!0}}})},Va=new rn("addLink"),bme=(n,e)=>vn.create({name:"bubbleLinkForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Va}),addCommands:()=>({openLinkForm:({openOnClick:t})=>({chain:i})=>i().setMeta("preventAutolink",!0).setHighlight().command(({tr:r})=>(r.setMeta(Va,{isOpen:!0,openOnClick:t}),!0)).freezeScroll(!0).run(),closeLinkForm:()=>({chain:t})=>t().setMeta("preventAutolink",!0).unsetHighlight().command(({tr:i})=>(i.setMeta(Va,{isOpen:!1,openOnClick:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const t=n.createComponent(Hh);return t.changeDetectorRef.detectChanges(),[vme({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,component:t,languageId:e})]}}),pz={tableCell:!0,table:!0,youtube:!0,dotVideo:!0,aiContent:!0,loader:!0},wme=({editor:n,state:e,from:t,to:i})=>{const{doc:r,selection:o}=e,{view:s}=n,{empty:a}=o,{isOpen:l,openOnClick:c}=Va.getState(e),u=n.state.doc.nodeAt(n.state.selection.from),d=uu(n.state.selection.$from),h=!r.textBetween(t,i).length&&Sb(e.selection);return"text"===u?.type.name&&"table"===d?.type.name&&!h||!(!l&&(!s.hasFocus()||a||h||pz[d?.type.name]||pz[u?.type.name])||l&&c)},l0=n=>!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(n),mz=(n,e)=>e===Jr.name&&n?.firstElementChild?n.firstElementChild.getBoundingClientRect():n.getBoundingClientRect(),gz=n=>n.isActive("bulletList")||n.isActive("orderedList"),yz=[{icon:"format_bold",markAction:"bold",active:!1},{icon:"format_underlined",markAction:"underline",active:!1},{icon:"format_italic",markAction:"italic",active:!1},{icon:"strikethrough_s",markAction:"strike",active:!1},{icon:"superscript",markAction:"superscript",active:!1},{icon:"subscript",markAction:"subscript",active:!1,divider:!0}],US=[{icon:"format_align_left",markAction:"left",active:!1},{icon:"format_align_center",markAction:"center",active:!1},{icon:"format_align_right",markAction:"right",active:!1,divider:!0}],Mme=[...yz,...US,{icon:"format_list_bulleted",markAction:"bulletList",active:!1},{icon:"format_list_numbered",markAction:"orderedList",active:!1},{icon:"format_indent_decrease",markAction:"outdent",active:!1},{icon:"format_indent_increase",markAction:"indent",active:!1,divider:!0},{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],Tme=[...US,{icon:"link",markAction:"link",active:!1,divider:!0},{text:"Properties",markAction:"properties",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],Sme=[...yz,...US,{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],Eme=[{icon:"delete",markAction:"deleteNode",active:!1}],_z=[{name:"offset",options:{offset:[0,5]}},{name:"flip",options:{fallbackPlacements:["bottom-start","top-start"]}},{name:"preventOverflow",options:{altAxis:!0,tether:!0}}],Ime=[{key:"src",label:"path",required:!0,controlType:"text",type:"text"},{key:"alt",label:"alt",controlType:"text",type:"text"},{key:"title",label:"caption",controlType:"text",type:"text"}];class Ome extends TS{constructor(e){const{editor:t,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=e;super(e),this.$destroy=new ae,this.focusHandler=()=>{this.editor.commands.closeForm(),setTimeout(()=>this.update(this.editor.view))},this.editor=t,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible",this.pluginKey=s,this.component=a,this.component.instance.buildForm(Ime),this.component.instance.formValues.pipe(In(this.$destroy)).subscribe(l=>{this.editor.commands.updateValue(l)}),this.component.instance.hide.pipe(In(this.$destroy)).subscribe(()=>{this.editor.commands.closeForm()}),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1},{state:o}=e,{doc:s,selection:a}=o,{ranges:l}=a,c=Math.min(...l.map(d=>d.$from.pos)),u=Math.max(...l.map(d=>d.$to.pos));i?.open!==r?.open?(i.open&&i.form?(this.component.instance.buildForm(i.form),this.component.instance.options=i.options):this.component.instance.cleanForm(),this.createTooltip(),this.tippy?.setProps({getReferenceClientRect:()=>{if(a instanceof Ye){const d=e.nodeDOM(c);if(d)return this.node=s.nodeAt(c),this.tippyRect(d,this.node.type.name)}return ru(e,c,u)}}),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=zo(e.parentElement,{...this.tippyOptions,...mR,content:this.element,onShow:()=>{requestAnimationFrame(()=>{this.component.instance.inputs.first.nativeElement.focus()})}}))}show(){this.tippy?.show()}destroy(){this.tippy?.destroy(),this.editor.off("focus",this.focusHandler),this.$destroy.next(!0),this.component.destroy(),this.component.instance.formValues.unsubscribe()}hanlderScroll(e){if(!this.shouldHideOnScroll(e.target))return!0;setTimeout(()=>this.update(this.editor.view))}tippyRect(e,t){return document.querySelector("#bubble-menu")?.getBoundingClientRect()||((n,e)=>e===Jr.name&&n.getElementsByTagName("img")[0]?.getBoundingClientRect()||n.getBoundingClientRect())(e,t)}shouldHideOnScroll(e){return this.tippy?.state.isMounted&&this.tippy?.popper.contains(e)}}const Ame=n=>new $t({key:n.pluginKey,view:e=>new Ome({view:e,...n}),state:{init:()=>({open:!1,form:[],options:null}),apply(e,t,i){const{open:r,form:o,options:s}=e.getMeta(_u)||{},a=_u?.getState(i);return"boolean"==typeof r?{open:r,form:o,options:s}:a||t}}}),_u=new rn("bubble-form"),kme={interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},Nme=n=>{const e=new ae;return SS.extend({name:"bubbleForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:_u,shouldShow:()=>!0}),addCommands:()=>({openForm:(t,i)=>({chain:r})=>(r().command(({tr:o})=>(o.setMeta(_u,{form:t,options:i,open:!0}),!0)).freezeScroll(!0).run(),e),closeForm:()=>({chain:t})=>(e.next(null),t().command(({tr:i})=>(i.setMeta(_u,{open:!1}),!0)).freezeScroll(!1).run()),updateValue:t=>({editor:i})=>{e.next(t),i.commands.closeForm()}}),addProseMirrorPlugins(){const t=n.createComponent(cg),i=t.location.nativeElement;return t.changeDetectorRef.detectChanges(),[Ame({pluginKey:_u,editor:this.editor,element:i,tippyOptions:kme,component:t,form$:e})]}})},vz=function(){return{width:"50%"}};function Pme(n,e){if(1&n){const t=Qe();I(0,"div")(1,"div",1)(2,"button",2),de("click",function(){return ge(t),ye(M().copy())}),A(),I(3,"button",3),de("click",function(){return ge(t),ye(M().remove.emit(!0))}),A()()()}2&n&&(C(2),Yn(uo(4,vz)),C(1),Yn(uo(5,vz)))}class ug{constructor(){this.remove=new ie(!1),this.hide=new ie(!1),this.link=""}copy(){navigator.clipboard.writeText(this.link).then(()=>this.hide.emit(!0)).catch(()=>alert("Could not copy link"))}}function Lme(n,e){if(1&n){const t=Qe();mt(0),I(1,"button",3),de("click",function(){return ge(t),ye(M().toggleChangeTo.emit())}),Te(2),A(),_e(3,"div",4),gt()}if(2&n){const t=M();C(2),Ot(t.selected)}}function Rme(n,e){1&n&&_e(0,"div",4)}function Fme(n,e){if(1&n){const t=Qe();mt(0),I(1,"dot-bubble-menu-button",5),de("click",function(){const o=ge(t).$implicit;return ye(M().command.emit(o))}),A(),E(2,Rme,1,0,"div",6),gt()}if(2&n){const t=e.$implicit;C(1),b("active",t.active)("item",t),C(1),b("ngIf",t.divider)}}ug.\u0275fac=function(e){return new(e||ug)},ug.\u0275cmp=xe({type:ug,selectors:[["dot-form-actions"]],inputs:{link:"link"},outputs:{remove:"remove",hide:"hide"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"form-actions"],["pButton","","type","button","label","COPY LINK",1,"p-button-outlined",3,"click"],["pButton","","type","button","label","REMOVE LINK",1,"p-button-outlined","p-button-danger",3,"click"]],template:function(e,t){1&e&&E(0,Pme,4,6,"div",0),2&e&&b("ngIf",t.link.length)},dependencies:[nn,ds],styles:[".form-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;padding:1rem;gap:.5rem}"]});class $h{constructor(){this.items=[],this.command=new ie,this.toggleChangeTo=new ie}preventDeSelection(e){e.preventDefault()}}$h.\u0275fac=function(e){return new(e||$h)},$h.\u0275cmp=xe({type:$h,selectors:[["dot-bubble-menu"]],inputs:{items:"items",selected:"selected"},outputs:{command:"command",toggleChangeTo:"toggleChangeTo"},decls:3,vars:2,consts:[["id","bubble-menu",1,"bubble-menu",3,"mousedown"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"btn-dropdown",3,"click"],[1,"divider"],[3,"active","item","click"],["class","divider",4,"ngIf"]],template:function(e,t){1&e&&(I(0,"div",0),de("mousedown",function(r){return t.preventDeSelection(r)}),E(1,Lme,4,1,"ng-container",1),E(2,Fme,3,3,"ng-container",2),A()),2&e&&(C(1),b("ngIf",t.selected),C(1),b("ngForOf",t.items))},styles:['[_nghost-%COMP%]{height:100%;width:100%}.bubble-menu[_ngcontent-%COMP%]{box-sizing:border-box;align-items:center;background:#ffffff;border-radius:.125rem;box-shadow:0 10px 24px 0 var(--color-palette-black-op-20);display:flex;justify-content:center;padding:5.6px;height:40px}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]{background:none;border:none;outline:none;padding:4px;cursor:pointer}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:hover{background:#f3f3f4}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:after{content:"";border:solid #14151a;border-width:0 2px 2px 0;display:inline-block;padding:3.2px;transform:rotate(45deg);margin-left:12px}.bubble-menu[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #f3f3f4;height:100%;margin:0 8px}']});const jme=function(n,e){return{"btn-bubble-menu":!0,"btn-icon":n,"btn-active":e}},zme=function(n){return{"material-icons":n}};class dg{constructor(){this.active=!1}}dg.\u0275fac=function(e){return new(e||dg)},dg.\u0275cmp=xe({type:dg,selectors:[["dot-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:8,consts:[[3,"ngClass"]],template:function(e,t){1&e&&(I(0,"button",0)(1,"span",0),Te(2),A()()),2&e&&(b("ngClass",Mi(3,jme,t.item.icon,t.active)),C(1),b("ngClass",xt(6,zme,t.item.icon)),C(1),Ot(t.item.icon||t.item.text))},dependencies:[gi],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}.btn-bubble-menu[_ngcontent-%COMP%]{background:#ffffff;border:none;color:#14151a;display:flex;justify-content:center;align-items:center;cursor:pointer;max-width:auto;width:100%;height:32px;border-radius:.125rem}.btn-bubble-menu[_ngcontent-%COMP%]:hover{background:#f3f3f4}.btn-bubble-menu.btn-active[_ngcontent-%COMP%]{background:#f3f3f4;color:#14151a;border:1px solid #afb3c0}.btn-icon[_ngcontent-%COMP%]{width:32px}"]});const Vme=n=>{const e=n.component.instance,t=n.changeToComponent.instance;return new $t({key:n.pluginKey,view:i=>new Bme({view:i,...n}),props:{handleKeyDown(i,r){const{key:o}=r,{changeToIsOpen:s}=n.editor?.storage.bubbleMenu||{};if(s){if("Escape"===o)return e.toggleChangeTo.emit(),!0;if("Enter"===o)return t.execCommand(),!0;if("ArrowDown"===o||"ArrowUp"===o)return t.updateSelection(r),!0}return!1}}})};class Bme extends TS{constructor(e){super(e),this.shouldShowProp=!1,this.updateActiveItems=(r=[],o)=>r.map(s=>(s.active=o.includes(s.markAction),s)),this.enabledMarks=()=>[...Object.keys(this.editor.schema.marks),...Object.keys(this.editor.schema.nodes)],this.getActiveMarks=(r=[])=>[...this.enabledMarks().filter(o=>this.editor.isActive(o)),...r.filter(o=>this.editor.isActive({textAlign:o}))];const{component:t,changeToComponent:i}=e;this.component=t,this.changeTo=i,this.changeToElement=this.changeTo.location.nativeElement,this.component.instance.command.subscribe(this.exeCommand.bind(this)),this.component.instance.toggleChangeTo.subscribe(this.toggleChangeTo.bind(this)),this.changeTo.instance.items=this.changeToItems(),this.changeTo.instance.title="Change To",this.changeToElement.remove(),this.changeTo.changeDetectorRef.detectChanges(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0),document.body.addEventListener("mouseup",this.showMenu.bind(this),!0),document.body.addEventListener("keyup",this.showMenu.bind(this),!0),this.editor.off("blur",this.blurHandler)}showMenu(){this.shouldShowProp&&(this.tippyChangeTo?.setProps({getReferenceClientRect:()=>this.tippy?.popper.getBoundingClientRect()}),this.show())}update(e,t){const{state:i,composing:r}=e,{doc:o,selection:s}=i,a=t&&t.doc.eq(o)&&t.selection.eq(s);if(r||a)return;this.createTooltip(),this.createChangeToTooltip();const{ranges:l}=s;this.selectionRange=l[0],this.selectionNodesCount=0,o.nodesBetween(this.selectionRange.$from.pos,this.selectionRange.$to.pos,d=>{d.isBlock&&this.selectionNodesCount++});const c=Math.min(...l.map(d=>d.$from.pos)),u=Math.max(...l.map(d=>d.$to.pos));if(this.shouldShowProp=this.shouldShow?.({editor:this.editor,view:e,state:i,oldState:t,from:c,to:u}),!this.shouldShowProp)return this.hide(),void this.tippyChangeTo?.hide();this.tippy?.setProps({getReferenceClientRect:()=>{const d=e.nodeDOM(c),h=o.nodeAt(c)?.type.name;return(({viewCoords:n,nodeCoords:e,padding:t})=>{const{top:i,bottom:r}=e,{top:o,bottom:s}=n,a=Math.ceil(i-o){this.changeTo.instance.list.updateActiveItem(e),this.changeTo.changeDetectorRef.detectChanges()})}setMenuItems(e,t){const i=e.nodeAt(t),o="table"===uu(this.editor.state.selection.$from).type.name?"table":i?.type.name;this.selectionNode=i,this.component.instance.items=((n="")=>{switch(n){case"dotImage":return Tme;case"dotContent":return Eme;case"table":return Sme;default:return Mme}})(o)}openImageProperties(){const{open:e}=_u.getState(this.editor.state),{alt:t,src:i,title:r,data:o}=this.editor.getAttributes(Jr.name),{title:s="",asset:a}=o||{};e?this.editor.commands.closeForm():this.editor.commands.openForm([{value:i||a,key:"src",label:"path",required:!0,controlType:"text",type:"text"},{value:t||s,key:"alt",label:"alt",controlType:"text",type:"text"},{value:r||s,key:"title",label:"caption",controlType:"text",type:"text"}]).pipe(Tt(1),ni(l=>null!=l)).subscribe(l=>{requestAnimationFrame(()=>{this.editor.commands.updateAttributes(Jr.name,{...l}),this.editor.commands.closeForm()})})}exeCommand(e){const{markAction:t,active:i}=e;switch(t){case"bold":this.editor.commands.toggleBold();break;case"italic":this.editor.commands.toggleItalic();break;case"strike":this.editor.commands.toggleStrike();break;case"underline":this.editor.commands.toggleUnderline();break;case"left":case"center":case"right":this.toggleTextAlign(t,i);break;case"bulletList":this.editor.commands.toggleBulletList();break;case"orderedList":this.editor.commands.toggleOrderedList();break;case"indent":gz(this.editor)&&this.editor.commands.sinkListItem("listItem");break;case"outdent":gz(this.editor)&&this.editor.commands.liftListItem("listItem");break;case"link":const{isOpen:r}=Va.getState(this.editor.state);r?this.editor.view.focus():this.editor.commands.openLinkForm({openOnClick:!1});break;case"properties":this.openImageProperties();break;case"deleteNode":this.selectionNodesCount>1?((n,e)=>{const t=e.$from.pos,i=e.$to.pos+1;this.editor.chain().deleteRange({from:t,to:i}).blur().run()})(0,this.selectionRange):(({editor:n,nodeType:e,selectionRange:t})=>{hue.includes(e)?((n,e)=>{const t=e.$from.pos,i=t+1;n.chain().deleteRange({from:t,to:i}).blur().run()})(n,t):((n,e)=>{const t=uu(e.$from),i=t.type.name,r=uu(e.$from,[Wi.ORDERED_LIST,Wi.BULLET_LIST]),{childCount:o}=r;switch(i){case Wi.ORDERED_LIST:case Wi.BULLET_LIST:o>1?n.chain().deleteNode(Wi.LIST_ITEM).blur().run():n.chain().deleteNode(r.type).blur().run();break;default:n.chain().deleteNode(t.type).blur().run()}})(n,t)})({editor:this.editor,nodeType:this.selectionNode.type.name,selectionRange:this.selectionRange});break;case"clearAll":this.editor.commands.unsetAllMarks(),this.editor.commands.clearNodes();break;case"superscript":this.editor.commands.toggleSuperscript();break;case"subscript":this.editor.commands.toggleSubscript()}}toggleTextAlign(e,t){t?this.editor.commands.unsetTextAlign():this.editor.commands.setTextAlign(e)}changeToItems(){const e=this.editor.storage.dotConfig.allowedBlocks;let i="table"===uu(this.editor.state.selection.$from).type.name?HX:YX;e.length>1&&(i=i.filter(o=>e.includes(o.id)));const r={heading1:()=>{this.editor.chain().focus().clearNodes().setHeading({level:1}).run()},heading2:()=>{this.editor.chain().focus().clearNodes().setHeading({level:2}).run()},heading3:()=>{this.editor.chain().focus().clearNodes().setHeading({level:3}).run()},heading4:()=>{this.editor.chain().focus().clearNodes().setHeading({level:4}).run()},heading5:()=>{this.editor.chain().focus().clearNodes().setHeading({level:5}).run()},heading6:()=>{this.editor.chain().focus().clearNodes().setHeading({level:6}).run()},paragraph:()=>{this.editor.chain().focus().clearNodes().run()},orderedList:()=>{this.editor.chain().focus().clearNodes().toggleOrderedList().run()},bulletList:()=>{this.editor.chain().focus().clearNodes().toggleBulletList().run()},blockquote:()=>{this.editor.chain().focus().clearNodes().toggleBlockquote().run()},codeBlock:()=>{this.editor.chain().focus().clearNodes().toggleCodeBlock().run()}};return i.forEach(o=>{o.isActive=()=>o.id.includes("heading")?this.editor.isActive("heading",o.attributes):this.editor.isActive(o.id),o.command=()=>{r[o.id](),this.tippyChangeTo.hide(),this.getActiveNode()}}),i}getActiveNode(){const e=this.changeToItems(),t=e.filter(o=>o?.isActive()),i=t.length>1?t[1]:t[0],r=e.findIndex(o=>o===i);return{activeItem:i,index:r}}createChangeToTooltip(){const{element:e}=this.editor.options;this.tippyChangeTo||(this.tippyChangeTo=zo(e,{...this.tippyOptions,appendTo:document.body,getReferenceClientRect:null,content:this.changeToElement,placement:"bottom-start",duration:0,hideOnClick:!1,popperOptions:{modifiers:_z},onHide:()=>{this.editor.storage.bubbleMenu.changeToIsOpen=!1,this.changeTo.instance.items=[],this.changeTo.changeDetectorRef.detectChanges(),this.editor.commands.freezeScroll(!1)},onShow:()=>{this.editor.storage.bubbleMenu.changeToIsOpen=!0,this.editor.commands.freezeScroll(!0),this.updateChangeTo()}}))}toggleChangeTo(){const{changeToIsOpen:e}=this.editor?.storage.bubbleMenu||{};e?this.tippyChangeTo?.hide():this.tippyChangeTo?.show()}hanlderScroll(){this.tippyChangeTo?.state.isVisible&&this.tippyChangeTo?.hide()}}const Ume={duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0},Hme=new rn("bubble-menu");function $me(n){const e=n.createComponent($h),t=e.location.nativeElement,i=n.createComponent(zl),r=i.location.nativeElement;return SS.extend({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:Ume,pluginKey:"bubbleMenu",shouldShow:wme}),addStorage:()=>({changeToIsOpen:!1}),addProseMirrorPlugins(){return t?[Vme({...this.options,component:e,changeToComponent:i,pluginKey:Hme,editor:this.editor,element:t,changeToElement:r})]:[]}})}const Wme=vn.create({name:"dotComands",addCommands:()=>({isNodeRegistered:n=>({view:e})=>{const{schema:t}=e.state,{nodes:i}=t;return Boolean(i[n])}})}),Gme=n=>vn.create({name:"dotConfig",addStorage:()=>({...n})}),Yme=Rn.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:n}){return["td",Xt(this.options.HTMLAttributes,n),0]}});class Kme{constructor(e,t){this.tippy=t}init(){}update(){}destroy(){this.tippy.destroy()}}const Qme=n=>{let e;function t(s){return Ei.node(s.$to.before(3),s.$to.after(3),{class:"focus"})}function i(s){s.preventDefault(),s.stopPropagation(),e?.setProps({getReferenceClientRect:()=>s.target.getBoundingClientRect()}),e.show()}function o(s){return"tableCell"===s?.type.name||"tableHeader"===s?.type.name||"tableRow"===s?.type.name}return new $t({key:new rn("dotTableCell"),state:{apply:()=>{},init:()=>{const{editor:s,viewContainerRef:a}=n,l=a.createComponent(zl),c=l.location.nativeElement;l.instance.currentLanguage=s.storage.dotConfig.lang;const{element:d}=s.options;e=zo(d,{duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0,appendTo:document.body,getReferenceClientRect:null,content:c,placement:"bottom-start",duration:0,hideOnClick:!0,popperOptions:{modifiers:_z},onShow:()=>{s.commands.freezeScroll(!0);const h=l.instance.items.find(p=>"mergeCells"==p.id),f=l.instance.items.find(p=>"splitCells"==p.id);h.disabled=!s.can().mergeCells(),f.disabled=!s.can().splitCell(),setTimeout(()=>{l.changeDetectorRef.detectChanges()})},onHide:()=>s.commands.freezeScroll(!1)}),l.instance.items=((n,e)=>[{label:"Toggle row Header",icon:"check",id:"toggleRowHeader",command:()=>{n.commands.toggleHeaderRow(),e.hide()},tabindex:"0"},{label:"Toggle column Header",icon:"check",id:"toggleColumnHeader",command:()=>{n.commands.toggleHeaderColumn(),e.hide()},tabindex:"1"},{id:"divider"},{label:"Merge Cells",icon:"call_merge",id:"mergeCells",command:()=>{n.commands.mergeCells(),e.hide()},disabled:!0,tabindex:"2"},{label:"Split Cells",icon:"call_split",id:"splitCells",command:()=>{n.commands.splitCell(),e.hide()},disabled:!0,tabindex:"3"},{id:"divider"},{label:"Insert row above",icon:"arrow_upward",id:"insertAbove",command:()=>{n.commands.addRowBefore(),e.hide()},tabindex:"4"},{label:"Insert row below",icon:"arrow_downward",id:"insertBellow",command:()=>{n.commands.addRowAfter(),e.hide()},tabindex:"5"},{label:"Insert column left",icon:"arrow_back",id:"insertLeft",command:()=>{n.commands.addColumnBefore(),e.hide()},tabindex:"6"},{label:"Insert column right",icon:"arrow_forward",id:"insertRight",command:()=>{n.commands.addColumnAfter(),e.hide()},tabindex:"7"},{id:"divider"},{label:"Delete row",icon:"delete",id:"deleteRow",command:()=>{n.commands.deleteRow(),e.hide()},tabindex:"8"},{label:"Delete Column",icon:"delete",id:"deleteColumn",command:()=>{n.commands.deleteColumn(),e.hide()},tabindex:"9"},{label:"Delete Table",icon:"delete",id:"deleteTable",command:()=>{n.commands.deleteTable(),e.hide()},tabindex:"10"}])(n.editor,e),l.instance.title="",l.changeDetectorRef.detectChanges()}},view:s=>new Kme(s,e),props:{decorations(s){const a=s.selection.$from.depth>3?s.selection.$from.node(3):null;return"tableCell"==a?.type?.name||"tableHeader"==a?.type?.name?Ln.create(s.doc,[t(s.selection)]):null},handleDOMEvents:{contextmenu:(s,a)=>{o(s.state.selection.$from.node(s.state.selection.$from.depth-1))&&i(a)},mousedown:(s,a)=>{const l=s.state.selection.$from.node(s.state.selection.$from.depth-1);!function r(s){return s?.classList.contains("dot-cell-arrow")}(a.target)?2===a.button&&o(l)&&a.preventDefault():i(a)}}}})};function Zme(n){return Yme.extend({renderHTML({HTMLAttributes:e}){return["td",Xt(this.options.HTMLAttributes,e),["button",{class:"dot-cell-arrow"}],["p",0]]},addProseMirrorPlugins(){return[Qme({editor:this.editor,viewContainerRef:n})]}})}const Jme=Rn.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:n}){return["th",Xt(this.options.HTMLAttributes,n),0]}});var HS,$S;if(typeof WeakMap<"u"){let n=new WeakMap;HS=e=>n.get(e),$S=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;HS=i=>{for(let r=0;r(10==t&&(t=0),n[t++]=i,n[t++]=r)}var $n=class{constructor(n,e,t,i){this.width=n,this.height=e,this.map=t,this.problems=i}findCell(n){for(let e=0;ei&&(o+=c.attrs.colspan)}}for(let s=0;s1&&(t=!0)}-1==e?e=o:e!=o&&(e=Math.max(e,o))}return e}(n),t=n.childCount,i=[];let r=0,o=null;const s=[];for(let c=0,u=e*t;c=t){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:y-w});break}const _=r+w*e;for(let N=0;N0;e--)if("row"==n.node(e).type.spec.tableRole)return n.node(0).resolve(n.before(e+1));return null}function ms(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return!0;return!1}function c0(n){const e=n.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;const t=Wh(e.$head)||function oge(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const i=e.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const i=e.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(t-e.nodeSize)}}(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function WS(n){return"row"==n.parent.type.spec.tableRole&&!!n.nodeAfter}function GS(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function Cz(n,e,t){const i=n.node(-1),r=$n.get(i),o=n.start(-1),s=r.nextCell(n.pos-o,e,t);return null==s?null:n.node(0).resolve(o+s)}function vu(n,e,t=1){const i={...n,colspan:n.colspan-t};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(e,t),i.colwidth.some(r=>r>0)||(i.colwidth=null)),i}function Dz(n,e,t=1){const i={...n,colspan:n.colspan+t};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let r=0;rc!=e.pos-r);a.unshift(e.pos-r);const l=a.map(c=>{const u=t.nodeAt(c);if(!u)throw RangeError(`No cell with offset ${c} found`);const d=r+c+1;return new _j(s.resolve(d),s.resolve(d+u.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=n,this.$headCell=e}map(n,e){const t=n.resolve(e.map(this.$anchorCell.pos)),i=n.resolve(e.map(this.$headCell.pos));if(WS(t)&&WS(i)&&GS(t,i)){const r=this.$anchorCell.node(-1)!=t.node(-1);return r&&this.isRowSelection()?en.rowSelection(t,i):r&&this.isColSelection()?en.colSelection(t,i):new en(t,i)}return it.between(t,i)}content(){const n=this.$anchorCell.node(-1),e=$n.get(n),t=this.$anchorCell.start(-1),i=e.rectBetween(this.$anchorCell.pos-t,this.$headCell.pos-t),r={},o=[];for(let a=i.top;a0||m>0){let g=f.attrs;if(p>0&&(g=vu(g,0,p)),m>0&&(g=vu(g,g.colspan-m,m)),h.lefti.bottom){const g={...f.attrs,rowspan:Math.min(h.bottom,i.bottom)-Math.max(h.top,i.top)};f=h.top0)&&Math.max(n+this.$anchorCell.nodeAfter.attrs.rowspan,e+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(n,e=n){const t=n.node(-1),i=$n.get(t),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(e.pos-r),a=n.node(0);return o.top<=s.top?(o.top>0&&(n=a.resolve(r+i.map[o.left])),s.bottom0&&(e=a.resolve(r+i.map[s.left])),o.bottom0)&&Math.max(i+this.$anchorCell.nodeAfter.attrs.colspan,r+this.$headCell.nodeAfter.attrs.colspan)==e.width}eq(n){return n instanceof en&&n.$anchorCell.pos==this.$anchorCell.pos&&n.$headCell.pos==this.$headCell.pos}static rowSelection(n,e=n){const t=n.node(-1),i=$n.get(t),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(e.pos-r),a=n.node(0);return o.left<=s.left?(o.left>0&&(n=a.resolve(r+i.map[o.top*i.width])),s.right0&&(e=a.resolve(r+i.map[s.top*i.width])),o.right{e.push(Ei.node(i,i+t.nodeSize,{class:"selectedCell"}))}),Ln.create(n.doc,e)}var hge=new rn("fix-tables");function Tz(n,e,t,i){const r=n.childCount,o=e.childCount;e:for(let s=0,a=0;s{"table"==r.type.spec.tableRole&&(t=function fge(n,e,t,i){const r=$n.get(e);if(!r.problems)return i;i||(i=n.tr);const o=[];for(let l=0;l0){let f="cell";u.firstChild&&(f=u.firstChild.type.spec.tableRole);const p=[];for(let g=0;ge.width)for(let d=0,h=0;de.height){const d=[];for(let p=0,m=(e.height-1)*e.width;p=e.width)&&t.nodeAt(e.map[m+p]).type==l.header_cell;d.push(g?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,le.from(d)),f=[];for(let p=e.height;p{if(!r)return!1;const o=t.selection;if(o instanceof en)return u0(t,i,nt.near(o.$headCell,e));if("horiz"!=n&&!o.empty)return!1;const s=Oz(r,n,e);if(null==s)return!1;if("horiz"==n)return u0(t,i,nt.near(t.doc.resolve(o.head+e),e));{const a=t.doc.resolve(s),l=Cz(a,n,e);let c;return c=l?nt.near(l,1):e<0?nt.near(t.doc.resolve(a.before(-1)),-1):nt.near(t.doc.resolve(a.after(-1)),1),u0(t,i,c)}}}function h0(n,e){return(t,i,r)=>{if(!r)return!1;const o=t.selection;let s;if(o instanceof en)s=o;else{const l=Oz(r,n,e);if(null==l)return!1;s=new en(t.doc.resolve(l))}const a=Cz(s.$headCell,n,e);return!!a&&u0(t,i,new en(s.$anchorCell,a))}}function f0(n,e){const t=n.selection;if(!(t instanceof en))return!1;if(e){const i=n.tr,r=ur(n.schema).cell.createAndFill().content;t.forEachCell((o,s)=>{o.content.eq(r)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new we(r,0,0))}),i.docChanged&&e(i)}return!0}function vge(n,e){const i=Wh(n.state.doc.resolve(e));return!!i&&(n.dispatch(n.state.tr.setSelection(new en(i))),!0)}function bge(n,e,t){if(!ms(n.state))return!1;let i=function pge(n){if(!n.size)return null;let{content:e,openStart:t,openEnd:i}=n;for(;1==e.childCount&&(t>0&&i>0||"table"==e.child(0).type.spec.tableRole);)t--,i--,e=e.child(0).content;const r=e.child(0),o=r.type.spec.tableRole,s=r.type.schema,a=[];if("row"==o)for(let l=0;l=0;s--){const{rowspan:a,colspan:l}=o.child(s).attrs;for(let c=r;c=e.length&&e.push(le.empty),t[r]i&&(h=h.type.createChecked(vu(h.attrs,h.attrs.colspan,u+h.attrs.colspan-i),h.content)),c.push(h),u+=h.attrs.colspan;for(let f=1;fr&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,r-d.attrs.rowspan)},d.content)),l.push(d)}o.push(le.from(l))}t=o,e=r}return{width:n,height:e,rows:t}}(i,a.right-a.left,a.bottom-a.top),Iz(n.state,n.dispatch,s,a,i),!0}if(i){const o=c0(n.state),s=o.start(-1);return Iz(n.state,n.dispatch,s,$n.get(o.node(-1)).findCell(o.pos-s),i),!0}return!1}function wge(n,e){var t;if(e.ctrlKey||e.metaKey)return;const i=Az(n,e.target);let r;if(e.shiftKey&&n.state.selection instanceof en)o(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&i&&null!=(r=Wh(n.state.selection.$anchor))&&(null==(t=qS(n,e))?void 0:t.pos)!=r.pos)o(r,e),e.preventDefault();else if(!i)return;function o(l,c){let u=qS(n,c);const d=null==Bl.getState(n.state);if(!u||!GS(l,u)){if(!d)return;u=l}const h=new en(l,u);if(d||!n.state.selection.eq(h)){const f=n.state.tr.setSelection(h);d&&f.setMeta(Bl,l.pos),n.dispatch(f)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",a),null!=Bl.getState(n.state)&&n.dispatch(n.state.tr.setMeta(Bl,-1))}function a(l){const c=l,u=Bl.getState(n.state);let d;if(null!=u)d=n.state.doc.resolve(u);else if(Az(n,c.target)!=i&&(d=qS(n,e),!d))return s();d&&o(d,c)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",a)}function Oz(n,e,t){if(!(n.state.selection instanceof it))return null;const{$head:i}=n.state.selection;for(let r=i.depth-1;r>=0;r--){const o=i.node(r);if((t<0?i.index(r):i.indexAfter(r))!=(t<0?0:o.childCount))return null;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){const a=i.before(r);return n.endOfTextblock("vert"==e?t>0?"down":"up":t>0?"right":"left")?a:null}}return null}function Az(n,e){for(;e&&e!=n.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function qS(n,e){const t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?Wh(n.state.doc.resolve(t.pos)):null}var Cge=class{constructor(n,e){this.node=n,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),KS(n,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type==this.node.type&&(this.node=n,KS(n,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(n){return"attributes"==n.type&&(n.target==this.table||this.colgroup.contains(n.target))}};function KS(n,e,t,i,r,o){var s;let a=0,l=!0,c=e.firstChild;const u=n.firstChild;if(u){for(let d=0,h=0;d(r.spec.props.nodeViews[ur(s.schema).table.name]=(a,l)=>new t(a,e,l),new p0(-1,!1)),apply:(o,s)=>s.apply(o)},props:{attributes:o=>{const s=Ho.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{!function Mge(n,e,t,i,r){const o=Ho.getState(n.state);if(o&&!o.dragging){const s=function xge(n){for(;n&&"TD"!=n.nodeName&&"TH"!=n.nodeName;)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}(e.target);let a=-1;if(s){const{left:l,right:c}=s.getBoundingClientRect();e.clientX-l<=t?a=kz(n,e,"left"):c-e.clientX<=t&&(a=kz(n,e,"right"))}if(a!=o.activeHandle){if(!r&&-1!==a){const l=n.state.doc.resolve(a),c=l.node(-1),u=$n.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}Pz(n,a)}}}(o,s,n,0,i)},mouseleave:o=>{!function Tge(n){const e=Ho.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&Pz(n,-1)}(o)},mousedown:(o,s)=>{!function Sge(n,e,t){const i=Ho.getState(n.state);if(!i||-1==i.activeHandle||i.dragging)return!1;const r=n.state.doc.nodeAt(i.activeHandle),o=function Ege(n,e,{colspan:t,colwidth:i}){const r=i&&i[i.length-1];if(r)return r;const o=n.domAtPos(e);let a=o.node.childNodes[o.offset].offsetWidth,l=t;if(i)for(let c=0;c{const s=Ho.getState(o);if(s&&s.activeHandle>-1)return function kge(n,e){const t=[],i=n.doc.resolve(e),r=i.node(-1);if(!r)return Ln.empty;const o=$n.get(r),s=i.start(-1),a=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan;for(let l=0;l-1&&n.docChanged){let i=n.mapping.map(e.activeHandle,-1);return WS(n.doc.resolve(i))||(i=-1),new p0(i,e.dragging)}return e}};function kz(n,e,t){const i=n.posAtCoords({left:e.clientX,top:e.clientY});if(!i)return-1;const{pos:r}=i,o=Wh(n.state.doc.resolve(r));if(!o)return-1;if("right"==t)return o.pos;const s=$n.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function Nz(n,e,t){return Math.max(t,n.startWidth+(e.clientX-n.startX))}function Pz(n,e){n.dispatch(n.state.tr.setMeta(Ho,{setHandle:e}))}function Age(n){return Array(n).fill(0)}function Qs(n){const e=n.selection,t=c0(n),i=t.node(-1),r=t.start(-1),o=$n.get(i);return{...e instanceof en?o.rectBetween(e.$anchorCell.pos-r,e.$headCell.pos-r):o.findCell(t.pos-r),tableStart:r,map:o,table:i}}function Lz(n,{map:e,tableStart:t,table:i},r){let o=r>0?-1:0;(function age(n,e,t){const i=ur(e.type.schema).header_cell;for(let r=0;r0&&r0&&e.map[a-1]==l||r0?-1:0;(function Fge(n,e,t){var i;const r=ur(e.type.schema).header_cell;for(let o=0;o0&&r0&&u==e.map[c-e.width]){const d=t.nodeAt(u).attrs;n.setNodeMarkup(n.mapping.slice(a).map(u+i),null,{...d,rowspan:d.rowspan-1}),l+=d.colspan-1}else if(r0&&t[o]==t[o-1]||i.right0&&t[r]==t[r-n]||i.bottom{var i;const r=e.selection;let o,s;if(r instanceof en){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{if(o=function rge(n){for(let e=n.depth;e>0;e--){const t=n.node(e).type.spec.tableRole;if("cell"===t||"header_cell"===t)return n.node(e)}return null}(r.$from),!o)return!1;s=null==(i=Wh(r.$from))?void 0:i.pos}if(null==o||null==s||1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(t){let a=o.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const u=Qs(e),d=e.tr;for(let f=0;ft[i.type.spec.tableRole])(n,e)}function Vz(n,e,t){const i=e.map.cellsInRect({left:0,top:0,right:"row"==n?e.map.width:1,bottom:"column"==n?e.map.height:1});for(let r=0;rr.table.nodeAt(l));for(let l=0;l{const p=f+o.tableStart,m=s.doc.nodeAt(p);m&&s.setNodeMarkup(p,h,m.attrs)}),i(s)}return!0}}hg("row",{useDeprecatedLogic:!0}),hg("column",{useDeprecatedLogic:!0});var Gge=hg("cell",{useDeprecatedLogic:!0});function Bz(n){return function(e,t){if(!ms(e))return!1;const i=function Yge(n,e){if(e<0){const t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let i=n.index(-1)-1,r=n.before();i>=0;i--){const o=n.node(-1).child(i),s=o.lastChild;if(s)return r-1-s.nodeSize;r-=o.nodeSize}}else{if(n.index()null,apply(e,t){const i=e.getMeta(Bl);if(null!=i)return-1==i?null:i;if(null==t||!e.docChanged)return t;const{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:lge,handleDOMEvents:{mousedown:wge},createSelectionBetween:e=>null!=Bl.getState(e.state)?e.state.selection:null,handleTripleClick:vge,handleKeyDown:_ge,handlePaste:bge},appendTransaction:(e,t,i)=>function dge(n,e,t){const i=(e||n).selection,r=(e||n).doc;let o,s;if(i instanceof Ye&&(s=i.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)o=en.create(r,i.from);else if("row"==s){const a=r.resolve(i.from+1);o=en.rowSelection(a,a)}else if(!t){const a=$n.get(i.node),l=i.from+1;o=en.create(r,l+1,l+a.map[a.width*a.height-1])}}else i instanceof it&&function cge({$from:n,$to:e}){if(n.pos==e.pos||n.pos=0&&!(n.after(r+1)=0&&!(e.before(o+1)>e.start(o));o--,i--);return t==i&&/row|table/.test(n.node(r).type.spec.tableRole)}(i)?o=it.create(r,i.from):i instanceof it&&function uge({$from:n,$to:e}){let t,i;for(let r=n.depth;r>0;r--){const o=n.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){t=o;break}}for(let r=e.depth;r>0;r--){const o=e.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){i=o;break}}return t!==i&&0===e.parentOffset}(i)&&(o=it.create(r,i.$from.start(),i.$from.end()));return o&&(e||(e=n.tr)).setSelection(o),e}(i,Sz(i,t),n)})}function Uz(n,e,t,i,r,o){let s=0,a=!0,l=e.firstChild;const c=n.firstChild;for(let u=0,d=0;u{const{selection:e}=n.state;if(!function Xge(n){return n instanceof en}(e))return!1;let t=0;return s5(e.ranges[0].$from,o=>"table"===o.type.name)?.node.descendants(o=>{if("table"===o.type.name)return!1;["tableCell","tableHeader"].includes(o.type.name)&&(t+=1)}),t===e.ranges.length&&(n.commands.deleteTable(),!0)},eye=Rn.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Qge,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:n}){return["table",Xt(this.options.HTMLAttributes,n),["tbody",0]]},addCommands:()=>({insertTable:({rows:n=3,cols:e=3,withHeaderRow:t=!0}={})=>({tr:i,dispatch:r,editor:o})=>{const s=function Jge(n,e,t,i,r){const o=function Zge(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const e={};return Object.keys(n.nodes).forEach(t=>{const i=n.nodes[t];i.spec.tableRole&&(e[i.spec.tableRole]=i)}),n.cached.tableNodeTypes=e,e}(n),s=[],a=[];for(let c=0;c({state:n,dispatch:e})=>function Nge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n);e(Lz(n.tr,t,t.left))}return!0}(n,e),addColumnAfter:()=>({state:n,dispatch:e})=>function Pge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n);e(Lz(n.tr,t,t.right))}return!0}(n,e),deleteColumn:()=>({state:n,dispatch:e})=>function Rge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n),i=n.tr;if(0==t.left&&t.right==t.map.width)return!1;for(let r=t.right-1;Lge(i,t,r),r!=t.left;r--){const o=t.tableStart?i.doc.nodeAt(t.tableStart-1):i.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=$n.get(o)}e(i)}return!0}(n,e),addRowBefore:()=>({state:n,dispatch:e})=>function jge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n);e(Rz(n.tr,t,t.top))}return!0}(n,e),addRowAfter:()=>({state:n,dispatch:e})=>function zge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n);e(Rz(n.tr,t,t.bottom))}return!0}(n,e),deleteRow:()=>({state:n,dispatch:e})=>function Bge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n),i=n.tr;if(0==t.top&&t.bottom==t.map.height)return!1;for(let r=t.bottom-1;Vge(i,t,r),r!=t.top;r--){const o=t.tableStart?i.doc.nodeAt(t.tableStart-1):i.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=$n.get(t.table)}e(i)}return!0}(n,e),deleteTable:()=>({state:n,dispatch:e})=>function qge(n,e){const t=n.selection.$anchor;for(let i=t.depth;i>0;i--)if("table"==t.node(i).type.spec.tableRole)return e&&e(n.tr.delete(t.before(i),t.after(i)).scrollIntoView()),!0;return!1}(n,e),mergeCells:()=>({state:n,dispatch:e})=>jz(n,e),splitCell:()=>({state:n,dispatch:e})=>zz(n,e),toggleHeaderColumn:()=>({state:n,dispatch:e})=>hg("column")(n,e),toggleHeaderRow:()=>({state:n,dispatch:e})=>hg("row")(n,e),toggleHeaderCell:()=>({state:n,dispatch:e})=>Gge(n,e),mergeOrSplit:()=>({state:n,dispatch:e})=>!!jz(n,e)||zz(n,e),setCellAttribute:(n,e)=>({state:t,dispatch:i})=>function $ge(n,e){return function(t,i){if(!ms(t))return!1;const r=c0(t);if(r.nodeAfter.attrs[n]===e)return!1;if(i){const o=t.tr;t.selection instanceof en?t.selection.forEachCell((s,a)=>{s.attrs[n]!==e&&o.setNodeMarkup(a,null,{...s.attrs,[n]:e})}):o.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[n]:e}),i(o)}return!0}}(n,e)(t,i),goToNextCell:()=>({state:n,dispatch:e})=>Bz(1)(n,e),goToPreviousCell:()=>({state:n,dispatch:e})=>Bz(-1)(n,e),fixTables:()=>({state:n,dispatch:e})=>(e&&Sz(n),!0),setCellSelection:n=>({tr:e,dispatch:t})=>{if(t){const i=en.create(e.doc,n.anchorCell,n.headCell);e.setSelection(i)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:m0,"Mod-Backspace":m0,Delete:m0,"Mod-Delete":m0}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Dge({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Kge({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema:n=>({tableRole:bt(Ve(n,"tableRole",{name:n.name,options:n.options,storage:n.storage}))})});class fg{}fg.\u0275fac=function(e){return new(e||fg)},fg.\u0275cmp=xe({type:fg,selectors:[["dot-drag-handler"]],decls:2,vars:0,consts:[[1,"material-icons"]],template:function(e,t){1&e&&(I(0,"i",0),Te(1,"drag_indicator"),A())},styles:["[_nghost-%COMP%]{position:absolute;cursor:grab;z-index:1;opacity:0;color:var(--color-palette-primary-800);transition:opacity .25s,top .15s;pointer-events:none}.visible[_nghost-%COMP%]{opacity:1;pointer-events:auto}"]});const nye=n=>vn.create({name:"dragHandler",addProseMirrorPlugins(){let e=null;const r=n.createComponent(fg).location.nativeElement;function s(m){m&&m.parentNode&&m.parentNode.removeChild(m)}function c(m){for(;m&&m.parentNode&&!m.classList?.contains("ProseMirror")&&!m.parentNode.classList?.contains("ProseMirror");)m=m.parentNode;return m}function h(){r.classList.remove("visible")}return[new $t({key:new rn("dragHandler"),view:m=>(requestAnimationFrame(()=>function d(m){r.setAttribute("draggable","true"),r.addEventListener("dragstart",g=>function l(m,g){if(!m.dataTransfer)return;const v=function a(m,g){const y=g.posAtCoords(m);if(y){const v=c(g.nodeDOM(y.inside));if(v&&1===v.nodeType){const w=g.docView.nearestDesc(v,!0);if(w&&w!==g.docView)return w.posBefore}}return null}({left:m.clientX+50,top:m.clientY},g);if(null!=v){g.dispatch(g.state.tr.setSelection(Ye.create(g.state.doc,v)));const w=g.state.selection.content();m.dataTransfer.clearData(),m?.dataTransfer?.setDragImage(e,10,10),g.dragging={slice:w,move:!0}}}(g,m)),r.classList.remove("visible"),m.dom.parentElement.appendChild(r)}(m)),document.body.addEventListener("scroll",h,!0),{destroy(){s(r),document.body.removeEventListener("scroll",h,!0)}}),props:{handleDOMEvents:{drop:(m,g)=>"TABLE"===c(g.target).nodeName||(requestAnimationFrame(()=>{(function p(){document.querySelector(".ProseMirror-hideselection")?.classList.remove("ProseMirror-hideselection"),r.classList.remove("visible")})(),M5(m),"TABLE"===e.nodeName&&s(e)}),!1),mousemove(m,g){const v=m.posAtCoords({left:g.clientX+50,top:g.clientY});if(v&&function u(m,g){const y=m.nodeDOM(g);return!(!y?.hasChildNodes()||1===y.childNodes.length&&"BR"==y.childNodes[0].nodeName)}(m,v.inside))if(e=c(m.nodeDOM(v.inside)),function f(m){return m&&!m.classList?.contains("ProseMirror")&&!m.innerText.startsWith("/")}(e)){const{top:w,left:_}=function o(m,g){return{top:g.getBoundingClientRect().top-m.getBoundingClientRect().top,left:g.getBoundingClientRect().left-m.getBoundingClientRect().left}}(m.dom.parentElement,e);r.style.left=_-25+"px",r.style.top=w<0?0:w+"px",r.classList.add("visible")}else r.classList.remove("visible");else e=null,r.classList.remove("visible");return!1}}}})]}}),iye=function(n){return{completed:n}};function rye(n,e){if(1&n){const t=Qe();I(0,"button",2),de("click",function(){return ge(t),ye(M().byClick.emit())}),A()}if(2&n){const t=M();b("disabled",t.isCompleted||t.isLoading)("icon",t.isCompleted?"pi pi-check":null)("label",t.title)("loading",t.isLoading)("ngClass",xt(5,iye,t.isCompleted))}}function oye(n,e){1&n&&(I(0,"div",3),_e(1,"i",4),I(2,"span"),Te(3,"Something went wrong, please try again later or "),I(4,"a",5),Te(5," contact support "),A()()())}class pg{constructor(){this.label="",this.isLoading=!1,this.byClick=new ie,this.status=Fl}get title(){return this.label?this.label[0].toUpperCase()+this.label?.substring(1).toLowerCase():""}get isCompleted(){return this.label===this.status.COMPLETED}}pg.\u0275fac=function(e){return new(e||pg)},pg.\u0275cmp=xe({type:pg,selectors:[["dot-floating-button"]],inputs:{label:"label",isLoading:"isLoading"},outputs:{byClick:"byClick"},decls:3,vars:2,consts:[["pButton","","iconPos","left",3,"disabled","icon","label","loading","ngClass","click",4,"ngIf","ngIfElse"],["error",""],["pButton","","iconPos","left",3,"disabled","icon","label","loading","ngClass","click"],[1,"alert"],[1,"pi","pi-exclamation-circle"],["href","https://www.dotcms.com/contact-us/"]],template:function(e,t){if(1&e&&(E(0,rye,1,7,"button",0),E(1,oye,6,0,"ng-template",null,1,Bn)),2&e){const i=Cn(2);b("ngIf",t.label!==t.status.ERROR)("ngIfElse",i)}},dependencies:[gi,nn,ds],styles:["[_nghost-%COMP%] .p-button-label{text-transform:unset}[_nghost-%COMP%] .p-button{display:inline-block}[_nghost-%COMP%] .p-button:enabled:hover, [_nghost-%COMP%] .p-button:enabled:active, [_nghost-%COMP%] .p-button:enabled:focus{background:var(--color-palette-primary-500)}[_nghost-%COMP%] .p-button:disabled{background-color:#000!important;color:#fff!important;opacity:1}[_nghost-%COMP%] .p-button.completed{background:var(--color-palette-primary-500)!important}.alert[_ngcontent-%COMP%]{background:#ffffff;color:#d82b2e;border:1px solid #d82b2e;border-radius:.125rem;padding:10px;display:flex;align-items:center;justify-content:center;gap:5px}.alert[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#d82b2e}"]});const aye=n=>new $t({key:n.pluginKey,view:e=>new lye({view:e,...n})});class lye{constructor({dotUploadFileService:e,editor:t,component:i,element:r,view:o}){this.preventHide=!1,this.$destroy=new ae,this.initialLabel="Import to dotCMS",this.offset=10,this.editor=t,this.element=r,this.view=o,this.component=i,this.dotUploadFileService=e,this.component.instance.byClick.pipe(In(this.$destroy)).subscribe(()=>this.uploadImagedotCMS()),this.element.remove(),this.element.style.visibility="visible"}update(e,t){const{state:i,composing:r}=e,{doc:o,selection:s}=i,{empty:a,ranges:l}=s,c=t&&t.doc.eq(o)&&t.selection.eq(s);if(r||c||this.preventHide)return void(this.preventHide=!1);const u=Math.min(...l.map(g=>g.$from.pos)),d=o.nodeAt(u)?.type.name,h=this.editor.getAttributes(Jr.name);if(a||d!==Jr.name||h?.data)return void this.hide();const p=e.nodeDOM(u),m=p.querySelector("img");this.imageUrl=h?.src,this.updateButtonLabel(this.initialLabel),this.createTooltip(),this.tippy?.setProps({maxWidth:m?.width-this.offset||250,getReferenceClientRect:()=>(({viewCoords:n,nodeCoords:e})=>{const{bottom:i,left:r,top:o}=e,{bottom:s}=n,l=Math.ceil(s-i)<0?s:o-65,c=othis.updateButtonLabel(e)}).pipe(Tt(1),xn(()=>this.updateButtonLoading(!1))).subscribe(e=>{const t=e[0];this.updateButtonLabel(Fl.COMPLETED),this.updateImageNode(t[Object.keys(t)[0]])},()=>{this.updateButtonLoading(!1),this.updateButtonLabel(Fl.ERROR),this.setPreventHide()})}updateButtonLabel(e){this.component.instance.label=e,this.component.changeDetectorRef.detectChanges()}updateButtonLoading(e){this.component.instance.isLoading=e,this.component.changeDetectorRef.detectChanges()}}const cye=new rn("floating-button");function uye(n,e){const t=e.createComponent(pg),i=t.location.nativeElement,r=n.get(Ys);return vn.create({addProseMirrorPlugins(){return i?[aye({...this.options,dotUploadFileService:r,component:t,pluginKey:cye,editor:this.editor,element:i})]:[]}})}const mg=new rn("freeze-scroll"),dye=vn.create({name:"freezeScroll",addCommands:()=>({freezeScroll:n=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(mg,{freezeScroll:n}),!0)).run()}),addProseMirrorPlugins:()=>[hye]}),hye=new $t({key:mg,state:{init:()=>({freezeScroll:!1}),apply(n,e,t){const{freezeScroll:i}=n.getMeta(mg)||{},r=mg?.getState(t);return"boolean"==typeof i?{freezeScroll:i}:r||e}}}),fye=["input"];function pye(n,e){1&n&&(mt(0),I(1,"span",7),Te(2,"Pending"),A(),gt())}function mye(n,e){1&n&&_e(0,"button",8)}function gye(n,e){if(1&n){const t=Qe();I(0,"form",1),de("ngSubmit",function(){return ge(t),ye(M().onSubmit())}),I(1,"span",2),_e(2,"input",3,4),E(4,pye,3,0,"ng-container",5),E(5,mye,1,0,"ng-template",null,6,Bn),A()()}if(2&n){const t=Cn(6),i=M();b("formGroup",i.form),C(4),b("ngIf",i.isFormSubmitting)("ngIfElse",t)}}class gg{constructor(e){this.aiContentService=e,this.isFormSubmitting=!1,this.formSubmission=new ie,this.aiResponse=new ie,this.form=new Nd({textPrompt:new Ld("",wc.required)})}onSubmit(){this.isFormSubmitting=!0;const e=this.form.value.textPrompt;e&&this.aiContentService.generateContent(e).pipe(Ai(()=>Re(null))).subscribe(t=>{this.isFormSubmitting=!1,this.formSubmission.emit(!0),this.aiResponse.emit(t)})}cleanForm(){this.form.reset()}focusField(){this.input.nativeElement.focus()}}gg.\u0275fac=function(e){return new(e||gg)(O(ja))},gg.\u0275cmp=xe({type:gg,selectors:[["dot-ai-content-prompt"]],viewQuery:function(e,t){if(1&e&&hn(fye,5),2&e){let i;Xe(i=et())&&(t.input=i.first)}},outputs:{formSubmission:"formSubmission",aiResponse:"aiResponse"},decls:1,vars:1,consts:[["id","ai-text-prompt","autocomplete","off",3,"formGroup","ngSubmit",4,"ngIf"],["id","ai-text-prompt","autocomplete","off",3,"formGroup","ngSubmit"],[1,"p-input-icon-right"],["formControlName","textPrompt","type","text","pInputText","","placeholder","Ask AI to write something"],["input",""],[4,"ngIf","ngIfElse"],["submitButton",""],[1,"pending-label"],["pButton","","type","submit","icon","pi pi-send",1,"p-button-rounded","p-button-text"]],template:function(e,t){1&e&&E(0,gye,7,3,"form",0),2&e&&b("ngIf",t.form)},dependencies:[nn,Rd,al,Cc,Ad,Ta,Dc,ds,lg],styles:["form[_ngcontent-%COMP%]{margin:1.5rem}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%]{width:100%;position:relative}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] button[_ngcontent-%COMP%], form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] .pending-label[_ngcontent-%COMP%]{position:absolute;right:0;top:0;bottom:0;margin:auto 0;background:none}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] .pending-label[_ngcontent-%COMP%]{height:-moz-fit-content;height:fit-content;font-size:.625rem;margin-right:.5rem}"]});const yye={duration:[500,0],interactive:!0,maxWidth:"100%",trigger:"manual",hideOnClick:!0,placement:"top",popperOptions:{modifiers:[{name:"flip",enabled:!1},{name:"preventOverflow",options:{altAxis:!0}}]}};class _ye{constructor(e){this.destroy$=new ae;const{editor:t,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=e;this.editor=t,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.component.instance.formSubmission.pipe(In(this.destroy$)).subscribe(()=>{this.editor.commands.closeAIPrompt()}),this.component.instance.aiResponse.pipe(In(this.destroy$)).subscribe(l=>{this.editor.commands.insertAINode(l),this.editor.commands.openAIContentActions()})}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1};i?.open!==r?.open?(i.open||this.component.instance.cleanForm(),this.createTooltip(),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=zo(e,{...yye,...this.tippyOptions,content:this.element,onHide:()=>{this.editor.commands.closeAIPrompt()},onShow:i=>{i.popper.style.width="100%"}}))}show(){this.tippy?.show(),this.component.instance.focusField()}hide(){this.tippy?.hide(),this.editor.view.focus()}destroy(){this.tippy?.destroy(),this.destroy$.next(!0),this.destroy$.complete()}}const vye=n=>new $t({key:n.pluginKey,view:e=>new _ye({view:e,...n}),state:{init:()=>({open:!1,form:[]}),apply(e,t,i){const{open:r,form:o}=e.getMeta(yg)||{},s=yg.getState(i);return"boolean"==typeof r?{open:r,form:o}:s||t}}}),yg=new rn("aiContentPrompt-form"),bye=n=>vn.create({name:"aiContentPrompt",addOptions:()=>({element:null,tippyOptions:{},pluginKey:yg}),addCommands:()=>({openAIPrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(yg,{open:!0}),!0)).freezeScroll(!0).run(),closeAIPrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(yg,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const e=n.createComponent(gg);return e.changeDetectorRef.detectChanges(),[vye({pluginKey:this.options.pluginKey,editor:this.editor,element:e.location.nativeElement,tippyOptions:this.options.tippyOptions,component:e})]}});function wye(n,e){if(1&n&&(I(0,"div",2),_e(1,"i"),Te(2),A()),2&n){const t=e.$implicit;C(1),Dn(t.icon),C(1),Vi(" ",t.label," ")}}var Ba=(()=>(function(n){n.ACCEPT="ACCEPT",n.DELETE="DELETE",n.REGENERATE="REGENERATE"}(Ba||(Ba={})),Ba))();class _g{constructor(e){this.aiContentService=e,this.actionEmitter=new ie,this.tooltipContent="Describe the size, color palette, style, mood, etc."}ngOnInit(){this.actionOptions=[{label:"Accept",icon:"pi pi-check",callback:()=>this.emitAction(Ba.ACCEPT),selectedOption:!0},{label:"Regenerate",icon:"pi pi-sync",callback:()=>this.emitAction(Ba.REGENERATE),selectedOption:!1},{label:"Delete",icon:"pi pi-trash",callback:()=>this.emitAction(Ba.DELETE),selectedOption:!1}]}emitAction(e){this.actionEmitter.emit(e)}getLatestContent(){return this.aiContentService.getLatestContent()}getNewContent(e){return this.aiContentService.getNewContent(e)}}_g.\u0275fac=function(e){return new(e||_g)(O(ja))},_g.\u0275cmp=xe({type:_g,selectors:[["dot-ai-content-actions"]],outputs:{actionEmitter:"actionEmitter"},decls:2,vars:1,consts:[[3,"options","onClick"],["pTemplate","item"],[1,"action-content"]],template:function(e,t){1&e&&(I(0,"p-listbox",0),de("onClick",function(r){return r.value.callback()}),E(1,wye,3,3,"ng-template",1),A()),2&e&&b("options",t.actionOptions)},dependencies:[rr,xL],styles:["[_nghost-%COMP%] .p-listbox{display:block;width:12.5rem;padding:.5rem;margin-left:4rem}[_nghost-%COMP%] .p-listbox li{padding:.75rem 1rem}[_nghost-%COMP%] .p-listbox li:first-child{background-color:var(--color-palette-primary-200)}[_nghost-%COMP%] .p-listbox li:nth-child(2){padding:1rem;background-color:#fff!important}[_nghost-%COMP%] .p-listbox li:last-child{border-top:1px solid #ebecef;background-color:#fff!important}[_nghost-%COMP%] .p-listbox li:hover{background-color:var(--color-palette-primary-100)}.action-content[_ngcontent-%COMP%]{display:flex;align-items:center;color:#14151a}.action-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:.25rem;color:#8d92a5}"]});const Cye={duration:[500,0],interactive:!0,maxWidth:200,trigger:"manual",hideOnClick:!1,placement:"bottom-start",popperOptions:{modifiers:[{name:"preventOverflow",options:{altAxis:!0}}]}};class Dye{constructor(e){this.destroy$=new ae;const{editor:t,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=e;this.editor=t,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.component.instance.actionEmitter.pipe(In(this.destroy$)).subscribe(l=>{switch(l){case Ba.ACCEPT:this.acceptContent();break;case Ba.REGENERATE:this.generateContent();break;case Ba.DELETE:this.deleteContent()}}),this.view.dom.addEventListener("keydown",this.handleKeyDown.bind(this))}acceptContent(){this.editor.commands.closeAIContentActions();const e=this.component.instance.getLatestContent();this.editor.commands.insertContent(e)}generateContent(){const e=this.getNodeType();this.editor.commands.closeAIContentActions(),this.component.instance.getNewContent(e).subscribe(t=>{t&&(this.editor.commands.deleteSelection(),this.editor.commands.insertAINode(t),this.editor.commands.openAIContentActions())})}getNodeType(){const{state:e}=this.editor.view,{doc:t,selection:i}=e,{ranges:r}=i,o=Math.min(...r.map(a=>a.$from.pos));return t?.nodeAt(o).type.name}deleteContent(){this.editor.commands.closeAIContentActions(),this.editor.commands.deleteSelection()}handleKeyDown(e){"Backspace"===e.key&&this.editor.commands.closeAIContentActions()}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1};i?.open!==r?.open?(this.createTooltip(),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=zo(e.parentElement,{...Cye,...this.tippyOptions,content:this.element}))}show(){this.tippy?.show()}hide(){this.tippy?.hide(),this.editor.view.focus()}destroy(){this.tippy?.destroy(),this.destroy$.next(!0),this.destroy$.complete(),this.view.dom.removeEventListener("keydown",this.handleKeyDown)}}const Mye=n=>new $t({key:n.pluginKey,view:e=>new Dye({view:e,...n}),state:{init:()=>({open:!1}),apply(e,t,i){const{open:r}=e.getMeta(vg)||{},o=vg?.getState(i);return"boolean"==typeof r?{open:r}:o||t}}}),vg=new rn("aiContentActions-form"),Tye=n=>vn.create({name:"aiContentActions",addOptions:()=>({element:null,tippyOptions:{},pluginKey:vg}),addCommands:()=>({openAIContentActions:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(vg,{open:!0}),!0)).freezeScroll(!0).run(),closeAIContentActions:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(vg,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const e=n.createComponent(_g);return e.changeDetectorRef.detectChanges(),[Mye({pluginKey:this.options.pluginKey,editor:this.editor,element:e.location.nativeElement,tippyOptions:this.options.tippyOptions,component:e})]}});function Sye(n,e){if(1&n){const t=Qe();I(0,"form",17),de("ngSubmit",function(){return ge(t),ye(M().onSubmit())}),I(1,"div",18),_e(2,"textarea",19),A(),I(3,"div",20),_e(4,"p-button",21),A()()}2&n&&b("formGroup",M().form)}function Eye(n,e){if(1&n){const t=Qe();I(0,"form",17),de("ngSubmit",function(){return ge(t),ye(M().onSubmit())}),I(1,"div",18),_e(2,"textarea",22),A(),I(3,"div",20),_e(4,"p-button",23),A()()}2&n&&b("formGroup",M().form)}const $z=function(){return{"background-color":"white",color:"#426BF0",height:"unset",width:"unset",padding:"0",margin:"0",outline:"none"}};class bg{constructor(e,t){this.fb=e,this.aiContentService=t,this.form=this.fb.group({promptGenerate:["",wc.required],promptAutoGenerate:["",wc.required]}),this.isFormSubmitting=!1,this.showFormOne=!0,this.showFormTwo=!1,this.formSubmission=new ie,this.aiResponse=new ie}onSubmit(){this.isFormSubmitting=!0;const i=`${this.form.value.promptGenerate} ${this.form.value.promptAutoGenerate}`;this.isFormSubmitting=!1,this.formSubmission.emit(!0),prompt&&this.aiContentService.generateImage(i).pipe(Ai(()=>Re(null)),yi(r=>r?this.aiContentService.createAndPublishContentlet(r):Re(null))).subscribe(r=>{this.aiResponse.emit(r)})}openFormOne(){this.showFormOne=!0,this.showFormTwo=!1}openFormTwo(){this.showFormTwo=!0,this.showFormOne=!1}cleanForm(){this.form.reset(),this.showFormOne=!0,this.showFormTwo=!1}}bg.\u0275fac=function(e){return new(e||bg)(O(W_),O(ja))},bg.\u0275cmp=xe({type:bg,selectors:[["dot-ai-image-prompt"]],outputs:{formSubmission:"formSubmission",aiResponse:"aiResponse"},decls:30,vars:8,consts:[[1,"ai-image-dialog"],[1,"title"],[1,"choice-div-container"],[1,"choice-div",3,"click"],[1,"icon-wrapper"],["width","40","height","40","viewBox","0 0 40 40","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.02857 11C3.69491 11 2.41587 11.5234 1.47283 12.455C0.529794 13.3866 0 14.6502 0 15.9677V34.0323C0 35.3498 0.529794 36.6133 1.47283 37.545C2.41587 38.4766 3.69491 39 5.02857 39H26.9714C28.3051 39 29.5841 38.4766 30.5272 37.545C31.4702 36.6133 32 35.3498 32 34.0323V34L32 33.4L29.2571 30.7626L24.2834 25.849C24.1534 25.7117 23.994 25.6048 23.8169 25.5361C23.6397 25.4673 23.4493 25.4385 23.2594 25.4516C23.0674 25.4627 22.8795 25.5115 22.7068 25.5952C22.5341 25.679 22.38 25.796 22.2537 25.9394L19.8949 28.7394L11.4834 20.4297C11.3595 20.2996 11.209 20.1969 11.042 20.1284C10.8749 20.0598 10.6951 20.0271 10.5143 20.0323C10.3222 20.0433 10.1343 20.0921 9.96162 20.1759C9.78891 20.2596 9.63488 20.3766 9.50857 20.52L2.74286 28.4865V15.9677C2.74286 15.3689 2.98367 14.7945 3.41233 14.371C3.84098 13.9476 4.42236 13.7097 5.02857 13.7097H14.2194V12.3548V11H5.02857ZM2.74316 34.0326V32.7139L10.606 23.3926L18.1397 30.8352L13.5317 36.2545H5.02888C4.42895 36.2546 3.85305 36.0217 3.42543 35.606C2.99781 35.1903 2.75276 34.6252 2.74316 34.0326ZM17.0975 36.2906L23.406 28.8119L29.166 34.5023C29.0649 35.0045 28.7913 35.4568 28.3914 35.7827C27.9916 36.1086 27.4901 36.288 26.9717 36.2906H22.0346H17.0975Z","fill","#8D92A5"],["d","M28.6935 19.2671L22.8007 21.0668C22.6478 21.1134 22.5136 21.2101 22.4181 21.3425C22.3227 21.4749 22.2711 21.6357 22.2711 21.8011C22.2711 21.9664 22.3227 22.1273 22.4181 22.2597C22.5136 22.392 22.6478 22.4887 22.8007 22.5353L28.6935 24.3351L30.4277 30.4505C30.4726 30.6091 30.5658 30.7484 30.6933 30.8474C30.8209 30.9465 30.9759 31 31.1352 31C31.2945 31 31.4495 30.9465 31.577 30.8474C31.7045 30.7484 31.7977 30.6091 31.8427 30.4505L33.5776 24.3351L39.4704 22.5353C39.6233 22.4887 39.7575 22.392 39.8529 22.2597C39.9484 22.1273 40 21.9664 40 21.8011C40 21.6357 39.9484 21.4749 39.8529 21.3425C39.7575 21.2101 39.6233 21.1134 39.4704 21.0668L33.5776 19.2671L31.8427 13.1517C31.7978 12.993 31.7046 12.8538 31.577 12.7547C31.4495 12.6556 31.2945 12.6021 31.1352 12.6021C30.9759 12.6021 30.8208 12.6556 30.6933 12.7547C30.5658 12.8538 30.4726 12.993 30.4277 13.1517L28.6935 19.2671Z","fill","#7042F0"],["d","M35.9026 8.29011L39.0994 7.31284C39.2522 7.26623 39.3864 7.16951 39.4819 7.03716C39.5773 6.9048 39.6289 6.74394 39.6289 6.57862C39.6289 6.41331 39.5773 6.25244 39.4819 6.12008C39.3864 5.98773 39.2522 5.89101 39.0994 5.8444L35.9026 4.8679L34.9609 1.54959C34.916 1.39096 34.8228 1.25169 34.6953 1.15262C34.5677 1.05354 34.4127 1 34.2534 1C34.0941 1 33.9391 1.05354 33.8115 1.15262C33.684 1.25169 33.5908 1.39096 33.5459 1.54959L32.6049 4.8679L29.4075 5.8444C29.2546 5.891 29.1204 5.98771 29.025 6.12006C28.9295 6.25241 28.8779 6.41329 28.8779 6.57862C28.8779 6.74395 28.9295 6.90483 29.025 7.03718C29.1204 7.16953 29.2546 7.26624 29.4075 7.31284L32.6049 8.29011L33.5459 11.6076C33.5908 11.7663 33.684 11.9056 33.8115 12.0046C33.9391 12.1037 34.0941 12.1572 34.2534 12.1572C34.4127 12.1572 34.5677 12.1037 34.6953 12.0046C34.8228 11.9056 34.916 11.7663 34.9609 11.6076L35.9026 8.29011Z","fill","#7042F0"],["d","M19.6845 9.67937L16.459 11.0447C16.3233 11.1021 16.2072 11.2002 16.1254 11.3265C16.0437 11.4527 16 11.6014 16 11.7535C16 11.9056 16.0437 12.0542 16.1254 12.1805C16.2072 12.3067 16.3233 12.4048 16.459 12.4623L19.6845 13.8276L21.0001 17.175C21.0555 17.3159 21.1501 17.4364 21.2717 17.5212C21.3934 17.606 21.5366 17.6514 21.6832 17.6514C21.8297 17.6514 21.973 17.606 22.0946 17.5212C22.2163 17.4364 22.3108 17.3159 22.3662 17.175L23.6818 13.8276L26.9067 12.4623C27.0424 12.4048 27.1585 12.3067 27.2402 12.1805C27.322 12.0542 27.3656 11.9056 27.3656 11.7535C27.3656 11.6014 27.322 11.4527 27.2402 11.3265C27.1585 11.2002 27.0424 11.1021 26.9067 11.0447L23.6818 9.67937L22.3662 6.33266C22.3108 6.19183 22.2163 6.07132 22.0946 5.98648C21.973 5.90165 21.8297 5.85635 21.6832 5.85635C21.5366 5.85635 21.3934 5.90165 21.2717 5.98648C21.1501 6.07132 21.0555 6.19183 21.0001 6.33266L19.6845 9.67937Z","fill","#7042F0"],["pTooltip","Describe the type of image you want to generate.","tooltipPosition","top","icon","pi pi-info-circle","tooltipZIndex","999999"],["autocomplete","off",3,"formGroup","ngSubmit",4,"ngIf"],["width","34","height","42","viewBox","0 0 34 42","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M17.9594 25.5195L9.80768 28.0091C9.59623 28.0736 9.41058 28.2074 9.27852 28.3905C9.14646 28.5736 9.07509 28.7961 9.07509 29.0248C9.07509 29.2535 9.14646 29.4761 9.27852 29.6592C9.41058 29.8423 9.59623 29.9761 9.80768 30.0405L17.9594 32.5302L20.3584 40.9899C20.4205 41.2093 20.5494 41.4019 20.7259 41.5389C20.9023 41.6759 21.1167 41.75 21.3371 41.75C21.5574 41.75 21.7719 41.6759 21.9483 41.5389C22.1247 41.4019 22.2536 41.2093 22.3158 40.9899L24.7158 32.5302L32.8675 30.0405C33.079 29.9761 33.2646 29.8423 33.3967 29.6592C33.5287 29.4761 33.6001 29.2535 33.6001 29.0248C33.6001 28.7961 33.5287 28.5736 33.3967 28.3905C33.2646 28.2074 33.079 28.0736 32.8675 28.0091L24.7158 25.5195L22.3158 17.0598C22.2537 16.8404 22.1248 16.6477 21.9483 16.5107C21.7719 16.3736 21.5575 16.2995 21.3371 16.2995C21.1167 16.2995 20.9023 16.3736 20.7258 16.5107C20.5494 16.6477 20.4205 16.8404 20.3584 17.0598L17.9594 25.5195Z","fill","#7042F0"],["d","M27.9321 10.3346L32.3543 8.98276C32.5657 8.91828 32.7513 8.78449 32.8833 8.6014C33.0154 8.41831 33.0867 8.19578 33.0867 7.96709C33.0867 7.73841 33.0154 7.51587 32.8833 7.33278C32.7513 7.1497 32.5657 7.0159 32.3543 6.95143L27.9321 5.60059L26.6294 1.01027C26.5673 0.790829 26.4383 0.598168 26.2619 0.461118C26.0855 0.324068 25.871 0.25 25.6506 0.25C25.4303 0.25 25.2158 0.324068 25.0394 0.461118C24.8629 0.598168 24.734 0.790829 24.6719 1.01027L23.3702 5.60059L18.9471 6.95143C18.7357 7.01588 18.55 7.14966 18.418 7.33275C18.2859 7.51584 18.2146 7.73839 18.2146 7.96709C18.2146 8.19579 18.2859 8.41834 18.418 8.60143C18.55 8.78452 18.7357 8.91831 18.9471 8.98276L23.3702 10.3346L24.6719 14.9239C24.734 15.1434 24.8629 15.336 25.0394 15.4731C25.2158 15.6101 25.4303 15.6842 25.6506 15.6842C25.871 15.6842 26.0855 15.6101 26.2619 15.4731C26.4383 15.336 26.5673 15.1434 26.6294 14.9239L27.9321 10.3346Z","fill","#7042F0"],["d","M5.49703 12.2565L1.03503 14.1451C0.847305 14.2246 0.686661 14.3603 0.573578 14.535C0.460491 14.7096 0.400097 14.9152 0.400097 15.1256C0.400097 15.336 0.460491 15.5417 0.573578 15.7163C0.686661 15.8909 0.847305 16.0267 1.03503 16.1061L5.49703 17.9948L7.31694 22.6255C7.39355 22.8203 7.52433 22.987 7.69262 23.1043C7.8609 23.2217 8.05905 23.2844 8.2618 23.2844C8.46454 23.2844 8.66269 23.2217 8.83098 23.1043C8.99926 22.987 9.13005 22.8203 9.20666 22.6255L11.0266 17.9948L15.4876 16.1061C15.6754 16.0266 15.836 15.8909 15.9491 15.7163C16.0622 15.5417 16.1225 15.336 16.1225 15.1256C16.1225 14.9152 16.0622 14.7096 15.9491 14.535C15.836 14.3603 15.6754 14.2246 15.4876 14.1451L11.0266 12.2565L9.20666 7.62684C9.13005 7.43204 8.99926 7.26532 8.83098 7.14797C8.66269 7.03062 8.46454 6.96795 8.2618 6.96795C8.05905 6.96795 7.8609 7.03062 7.69262 7.14797C7.52433 7.26532 7.39355 7.43204 7.31694 7.62684L5.49703 12.2565Z","fill","#7042F0"],["tooltipZIndex","999999","icon","pi pi-info-circle","pTooltip","Describe the size, color palette, style, mood, etc.","tooltipPosition","top"],["autocomplete","off",3,"formGroup","ngSubmit"],[1,"input-field-wrapper"],["placeholder","Create a realistic image of a cow in the snow.","formControlName","promptGenerate",1,"input-field"],[1,"submit-btn-container"],["icon","pi pi-send","type","submit","label","Generate"],["placeholder","E.g. 1200x800px, vibrant colors, impressionistic, adventurous.","formControlName","promptAutoGenerate",1,"input-field"],["icon","pi pi-send","type","submit","label","Auto Generate"]],template:function(e,t){1&e&&(I(0,"div",0)(1,"p",1),Te(2,"Generate AI Image"),A(),I(3,"div",2)(4,"div",3),de("click",function(){return t.openFormOne()}),I(5,"div",4),Tw(),I(6,"svg",5),_e(7,"path",6)(8,"path",7)(9,"path",8)(10,"path",9),A()(),Sw(),I(11,"span")(12,"span")(13,"strong"),Te(14,"Generate"),A(),Te(15," an AI image based on your input and requests. "),A(),_e(16,"p-button",10),A(),E(17,Sye,5,1,"form",11),A(),I(18,"div",3),de("click",function(){return t.openFormTwo()}),I(19,"div",4),Tw(),I(20,"svg",12),_e(21,"path",13)(22,"path",14)(23,"path",15),A()(),Sw(),I(24,"span")(25,"strong"),Te(26,"Auto-Generate"),A(),Te(27," an Image based on the content created within the block editor. "),_e(28,"p-button",16),A(),E(29,Eye,5,1,"form",11),A()()()),2&e&&(C(16),Yn(uo(6,$z)),C(1),b("ngIf",t.showFormOne),C(11),Yn(uo(7,$z)),C(1),b("ngIf",t.showFormTwo))},dependencies:[nn,Rd,al,Cc,Ad,Ta,Dc,ig,eT],styles:[".ai-image-dialog[_ngcontent-%COMP%]{position:fixed;top:0%;left:0%;transform:translate(-55%,-5%);width:90vw;height:75vh;padding:1.5rem;margin:2rem;border:2px solid #d1d4db;box-shadow:0 8px 16px #14151a14;border-radius:.5rem;z-index:9999;background:#ffffff}.title[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:500;margin-bottom:1rem 0}form[_ngcontent-%COMP%]{width:100%}.input-field-wrapper[_ngcontent-%COMP%]{width:100%;height:7rem;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:1rem 0}.input-field-wrapper[_ngcontent-%COMP%] .input-field[_ngcontent-%COMP%]{width:100%;height:100%;padding:.5rem;line-height:normal;background-color:#fff;border:1px solid #ccc;border-radius:.25rem;color:#6c7389}.choice-div-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;height:80%;margin-bottom:.5rem}.choice-div[_ngcontent-%COMP%]{height:100%;width:48%;padding:.75rem;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:.5rem;border:2px solid #d1d4db;cursor:pointer}.choice-div[_ngcontent-%COMP%]:hover{border:2px solid #c6b3f9}.choice-div[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%], .submit-btn-container[_ngcontent-%COMP%]{margin-bottom:1rem;display:flex;justify-content:center;align-items:center}span[_ngcontent-%COMP%]{text-align:center}.icon-wrapper[_ngcontent-%COMP%]{background-color:#fff}"]});const xye={duration:[500,0],interactive:!0,maxWidth:"100%",trigger:"manual",hideOnClick:!0,placement:"top",popperOptions:{modifiers:[{name:"preventOverflow",options:{altAxis:!0}}]}};class Iye{constructor(e){this.destroy$=new ae;const{editor:t,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=e;this.editor=t,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.view.dom.addEventListener("keydown",this.handleKeyDown.bind(this)),this.component.instance.formSubmission.pipe(In(this.destroy$)).subscribe(()=>{this.editor.commands.closeImagePrompt(),this.editor.commands.insertLoaderNode()}),this.component.instance.aiResponse.pipe(In(this.destroy$)).subscribe(l=>{this.editor.commands.deleteSelection();const c=Object.values(l[0])[0];c&&(this.editor.commands.insertImage(c),this.editor.commands.openAIContentActions())})}handleKeyDown(e){"Backspace"===e.key&&this.editor.commands.closeAIContentActions()}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1};i?.open!==r?.open?(i.open||this.component.instance.cleanForm(),this.createTooltip(),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=zo(document.body,{...xye,...this.tippyOptions,content:this.element,onHide:()=>{this.editor.commands.closeImagePrompt()}}))}show(){this.tippy?.show()}hide(){this.tippy?.hide(),this.editor.view.focus()}destroy(){this.tippy?.destroy(),this.destroy$.next(!0),this.destroy$.complete()}}const Oye=n=>new $t({key:n.pluginKey,view:e=>new Iye({view:e,...n}),state:{init:()=>({open:!1,form:[]}),apply(e,t,i){const{open:r,form:o}=e.getMeta(wg)||{},s=wg.getState(i);return"boolean"==typeof r?{open:r,form:o}:s||t}}}),wg=new rn("aiImagePrompt-form"),Aye=n=>vn.create({name:"aiImagePrompt",addOptions:()=>({element:null,tippyOptions:{},pluginKey:wg}),addCommands:()=>({openImagePrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(wg,{open:!0}),!0)).freezeScroll(!0).run(),closeImagePrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(wg,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const e=n.createComponent(bg);return e.changeDetectorRef.detectChanges(),[Oye({pluginKey:this.options.pluginKey,editor:this.editor,element:e.location.nativeElement,tippyOptions:this.options.tippyOptions,component:e})]}});class Nye{constructor(e){this.total=e}call(e,t){return t.subscribe(new Pye(e,this.total))}}class Pye extends ee{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){++this.count>this.total&&this.destination.next(e)}}const Wz={leading:!0,trailing:!1};class jye{constructor(e,t,i,r){this.duration=e,this.scheduler=t,this.leading=i,this.trailing=r}call(e,t){return t.subscribe(new zye(e,this.duration,this.scheduler,this.leading,this.trailing))}}class zye extends ee{constructor(e,t,i,r,o){super(e),this.duration=t,this.scheduler=i,this.leading=r,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}_next(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Vye,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)}}function Vye(n){const{subscriber:e}=n;e.clearThrottle()}function Gz(n){return!!n&&(n instanceof Se||"function"==typeof n.lift&&"function"==typeof n.subscribe)}function QS(...n){return e=>{let t;return"function"==typeof n[n.length-1]&&(t=n.pop()),e.lift(new Bye(n,t))}}class Bye{constructor(e,t){this.observables=e,this.project=t}call(e,t){return t.subscribe(new Uye(e,this.observables,this.project))}}class Uye extends yR{constructor(e,t,i){super(e),this.observables=t,this.project=i,this.toRespond=[];const r=t.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(e){if(0===this.toRespond.length){const t=[e,...this.values];this.project?this._tryProject(t):this.destination.next(t)}}_tryProject(e){let t;try{t=this.project.apply(this,e)}catch(i){return void this.destination.error(i)}this.destination.next(t)}}class $ye{constructor(e,t){this.compare=e,this.keySelector=t}call(e,t){return t.subscribe(new Wye(e,this.compare,this.keySelector))}}class Wye extends ee{constructor(e,t,i){super(e),this.keySelector=i,this.hasKey=!1,"function"==typeof t&&(this.compare=t)}compare(e,t){return e===t}_next(e){let t;try{const{keySelector:r}=this;t=r?r(e):e}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,t)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=t,this.destination.next(e))}}const Yye=new De("@ngrx/component-store Initial State");let qye=(()=>{class n{constructor(t){this.destroySubject$=new O_(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new O_(1),this.isInitialized=!1,this.state$=this.select(i=>i),this.\u0275hasProvider=!1,t&&this.initState(t),this.checkProviderForHooks()}ngOnDestroy(){this.stateSubject$.complete(),this.destroySubject$.next()}updater(t){return i=>{let o,r=!0;const a=(Gz(i)?i:Re(i)).pipe(function CY(n,e=0){return function(i){return i.lift(new DY(n,e))}}(rM),xn(()=>this.assertStateIsInitialized()),QS(this.stateSubject$),ue(([l,c])=>t(c,l)),xn(l=>this.stateSubject$.next(l)),Ai(l=>r?(o=l,sl):ho(()=>l)),In(this.destroy$)).subscribe();if(o)throw o;return r=!1,a}}initState(t){Pr([t],rM).subscribe(i=>{this.isInitialized=!0,this.stateSubject$.next(i)})}setState(t){"function"!=typeof t?this.initState(t):this.updater(t)()}patchState(t){const i="function"==typeof t?t(this.get()):t;this.updater((r,o)=>({...r,...o}))(i)}get(t){let i;return this.assertStateIsInitialized(),this.stateSubject$.pipe(Tt(1)).subscribe(r=>{i=t?t(r):r}),i}select(...t){const{observablesOrSelectorsObject:i,projector:r,config:o}=function Kye(n){const e=Array.from(n);let t={debounce:!1};if(function Qye(n){return typeof n.debounce<"u"}(e[e.length-1])&&(t={...t,...e.pop()}),1===e.length&&"function"!=typeof e[0])return{observablesOrSelectorsObject:e[0],projector:void 0,config:t};const i=e.pop();return{observablesOrSelectorsObject:e,projector:i,config:t}}(t);return(function Zye(n,e){return Array.isArray(n)&&0===n.length&&e}(i,r)?this.stateSubject$:vT(i)).pipe(o.debounce?function Gye(){return n=>new Se(e=>{let t,i;const r=new oe;return r.add(n.subscribe({complete:()=>{t&&e.next(i),e.complete()},error:o=>{e.error(o)},next:o=>{i=o,t||(t=tT.schedule(()=>{e.next(i),t=void 0}),r.add(t))}})),r})}():n=>n,r?ue(a=>i.length>0&&Array.isArray(a)?r(...a):r(a)):n=>n,function Hye(n,e){return t=>t.lift(new $ye(n,e))}(),y5({refCount:!0,bufferSize:1}),In(this.destroy$))}effect(t){const i=new ae;return t(i).pipe(In(this.destroy$)).subscribe(),r=>(Gz(r)?r:Re(r)).pipe(In(this.destroy$)).subscribe(s=>{i.next(s)})}checkProviderForHooks(){tT.schedule(()=>{})}assertStateIsInitialized(){if(!this.isInitialized)throw new Error(`${this.constructor.name} has not been initialized yet. Please make sure it is initialized before updating/getting.`)}}return n.\u0275fac=function(t){return new(t||n)(F(Yye,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const Jye={loading:!0,preventScroll:!1,contentlets:[],languageId:1,search:"",assetType:null};class bu extends qye{constructor(e,t){super(Jye),this.searchService=e,this.dotLanguageService=t,this.vm$=this.select(({contentlets:i,loading:r,preventScroll:o})=>({contentlets:i,loading:r,preventScroll:o})),this.updateContentlets=this.updater((i,r)=>({...i,contentlets:r})),this.updateAssetType=this.updater((i,r)=>({...i,assetType:r})),this.updatelanguageId=this.updater((i,r)=>({...i,languageId:r})),this.updateLoading=this.updater((i,r)=>({...i,loading:r})),this.updatePreventScroll=this.updater((i,r)=>({...i,preventScroll:r})),this.updateSearch=this.updater((i,r)=>({...i,search:r})),this.searchContentlet=this.effect(i=>i.pipe(xn(r=>{this.updateLoading(!0),this.updateSearch(r)}),QS(this.state$),ue(([r,o])=>({...o,search:r})),Jn(r=>this.searchContentletsRequest(this.params({...r}),[])))),this.nextBatch=this.effect(i=>i.pipe(QS(this.state$),ue(([r,o])=>({...o,offset:r})),Jn(({contentlets:r,...o})=>this.searchContentletsRequest(this.params(o),r)))),this.dotLanguageService.getLanguages().subscribe(i=>{this.languages=i})}searchContentletsRequest(e,t){return this.searchService.get(e).pipe(ue(({jsonObjectView:{contentlets:i}})=>{const r=this.setContentletLanguage(i);return this.updateLoading(!1),this.updatePreventScroll(!i?.length),this.updateContentlets([...t,...r])}))}params({search:e,assetType:t,offset:i=0,languageId:r}){return{query:`+catchall:${e.includes("-")?e:`${e}*`} title:'${e}'^15 +languageId:${r} +baseType:(4 OR 9) +metadata.contenttype:${t||""}/* +deleted:false +working:true`,sortOrder:Lb.ASC,limit:20,offset:i}}setContentletLanguage(e){return e.map(t=>({...t,language:this.getLanguage(t.languageId)}))}getLanguage(e){const{languageCode:t,countryCode:i}=this.languages[e];return t&&i?`${t}-${i}`:""}}function Xye(n,e){if(1&n&&(I(0,"div",3),_e(1,"dot-contentlet-thumbnail",4),A()),2&n){const t=M();C(1),b("contentlet",t.contentlet)("cover",!1)("iconSize","72px")("showVideoThumbnail",t.showVideoThumbnail)}}function e_e(n,e){if(1&n&&(I(0,"h2",5),Te(1),A()),2&n){const t=M();C(1),Ot((null==t.contentlet?null:t.contentlet.fileName)||(null==t.contentlet?null:t.contentlet.title))}}function t_e(n,e){if(1&n&&(I(0,"div",6)(1,"span",7),Te(2),A(),_e(3,"dot-state-icon",8),A()),2&n){const t=M();C(2),Ot(t.contentlet.language),C(1),b("state",t.contentlet)}}bu.\u0275fac=function(e){return new(e||bu)(F(kh),F(Rl))},bu.\u0275prov=$({token:bu,factory:bu.\u0275fac});class Cg{constructor(e){this.dotMarketingConfigService=e,this.showVideoThumbnail=!0}ngOnInit(){this.showVideoThumbnail=this.dotMarketingConfigService.getProperty(zp.SHOW_VIDEO_THUMBNAIL)}getImage(e){return`/dA/${e}/500w/50q`}getContentletIcon(){return"FILEASSET"!==this.contentlet?.baseType?this.contentlet?.contentTypeIcon:this.contentlet?.__icon__}}Cg.\u0275fac=function(e){return new(e||Cg)(O(lu))},Cg.\u0275cmp=xe({type:Cg,selectors:[["dot-asset-card"]],inputs:{contentlet:"contentlet"},decls:4,vars:1,consts:[["pTemplate","header"],["class","title",4,"pTemplate"],["pTemplate","footer"],[1,"thumbnail-container"],[3,"contentlet","cover","iconSize","showVideoThumbnail"],[1,"title"],[1,"state"],[1,"badge"],["size","16px",3,"state"]],template:function(e,t){1&e&&(I(0,"p-card"),E(1,Xye,2,4,"ng-template",0),E(2,e_e,2,1,"h2",1),E(3,t_e,4,2,"ng-template",2),A()),2&e&&(C(2),b("pTemplate","title"))},dependencies:[VS,rr],styles:["[_nghost-%COMP%] .p-card{border:none;box-shadow:0 1px 3px var(--color-palette-black-op-10),0 1px 2px var(--color-palette-black-op-20);cursor:pointer;display:flex;gap:1rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0;height:94px;width:94px;min-height:94px;min-width:94px;border-radius:.25rem 0 0 .25rem}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container{padding:10px;width:100%;height:100%;background:#f3f3f4}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail{width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail img{object-fit:contain;width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-body{flex-grow:1;display:flex;flex-direction:column;overflow:hidden;padding:.75rem .75rem .75rem 0}[_nghost-%COMP%] .p-card .p-card-body .p-card-title{flex-grow:1}[_nghost-%COMP%] .p-card .p-card-body .p-card-title h2{font-size:16px;line-height:140%;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}[_nghost-%COMP%] .badge{background:var(--color-palette-primary-100);border-radius:.125rem;color:#14151a;font-size:12px;line-height:140%;padding:.2rem .5rem;display:flex;align-items:center}"],changeDetection:0});let n_e=(()=>{class n{constructor(){this.shape="rectangle",this.animation="wave",this.borderRadius=null,this.size=null,this.width="100%",this.height="1rem"}containerClass(){return{"p-skeleton p-component":!0,"p-skeleton-circle":"circle"===this.shape,"p-skeleton-none":"none"===this.animation}}containerStyle(){return this.size?{...this.style,width:this.size,height:this.size,borderRadius:this.borderRadius}:{...this.style,width:this.width,height:this.height,borderRadius:this.borderRadius}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-skeleton"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},decls:1,vars:4,consts:[[3,"ngClass","ngStyle"]],template:function(t,i){1&t&&_e(0,"div",0),2&t&&(Dn(i.styleClass),b("ngClass",i.containerClass())("ngStyle",i.containerStyle()))},dependencies:[gi,wr],styles:['.p-skeleton{position:relative;overflow:hidden}.p-skeleton:after{content:"";animation:p-skeleton-animation 1.2s infinite;height:100%;left:0;position:absolute;right:0;top:0;transform:translate(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}@keyframes p-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n'],encapsulation:2,changeDetection:0}),n})(),qz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();function i_e(n,e){1&n&&_e(0,"p-skeleton",3)}function r_e(n,e){1&n&&(I(0,"div",4),_e(1,"p-skeleton",5)(2,"p-skeleton",6),A())}class Dg{}function o_e(n,e){if(1&n){const t=Qe();I(0,"dot-asset-card",7),de("click",function(){ge(t);const r=M().$implicit;return ye(M(2).selectedItem.emit(r[0]))}),A()}2&n&&b("contentlet",M().$implicit[0])}function s_e(n,e){if(1&n){const t=Qe();I(0,"dot-asset-card",7),de("click",function(){ge(t);const r=M().$implicit;return ye(M(2).selectedItem.emit(r[1]))}),A()}2&n&&b("contentlet",M().$implicit[1])}function a_e(n,e){if(1&n&&(I(0,"div",5),E(1,o_e,1,1,"dot-asset-card",6),E(2,s_e,1,1,"dot-asset-card",6),A()),2&n){const t=e.$implicit;C(1),b("ngIf",t[0]),C(1),b("ngIf",t[1])}}function l_e(n,e){if(1&n){const t=Qe();I(0,"p-scroller",3),de("onScrollIndexChange",function(r){return ge(t),ye(M().onScrollIndexChange(r))}),E(1,a_e,3,2,"ng-template",4),A()}if(2&n){const t=M();b("itemSize",110)("items",t.rows)("lazy",!0)}}function c_e(n,e){1&n&&(I(0,"div",5),_e(1,"dot-asset-card-skeleton")(2,"dot-asset-card-skeleton"),A())}function u_e(n,e){if(1&n&&(I(0,"div",8),E(1,c_e,3,0,"div",9),A()),2&n){const t=M();C(1),b("ngForOf",t.loadingItems)}}function d_e(n,e){if(1&n&&(I(0,"div",10),_e(1,"img",11),I(2,"p"),Te(3,"No results found, try searching again"),A()()),2&n){const t=M();C(1),b("src",t.icon,Xa)}}Dg.\u0275fac=function(e){return new(e||Dg)},Dg.\u0275cmp=xe({type:Dg,selectors:[["dot-asset-card-skeleton"]],decls:4,vars:0,consts:[["pTemplate","header"],["height","1rem"],["pTemplate","footer"],["shape","square","size","94px"],[1,"state"],["width","2rem","height","1rem"],["shape","circle","size","16px"]],template:function(e,t){1&e&&(I(0,"p-card"),E(1,i_e,1,0,"ng-template",0),_e(2,"p-skeleton",1),E(3,r_e,3,0,"ng-template",2),A())},dependencies:[VS,rr,n_e],styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%] .p-card{border:none;box-shadow:0 1px 3px var(--color-palette-black-op-10),0 1px 2px var(--color-palette-black-op-20);cursor:pointer;display:flex;gap:.5rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0}[_nghost-%COMP%] .p-card .p-card-body{flex:1;overflow:hidden;padding:.75rem .5rem .75rem 0;display:flex;flex-direction:column}[_nghost-%COMP%] .p-card .p-card-body .p-card-content{flex-grow:1}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}"],changeDetection:0});class Mg{constructor(){this.nextBatch=new ie,this.selectedItem=new ie,this.done=!1,this.loading=!0,this.loadingItems=[null,null,null],this.icon=Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDEiIHZpZXdCb3g9IjAgMCA0MCA0MSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuMDc2MTcgOC41NTcxMkgwLjA5NTIxNDhWMzYuNDIzOEMwLjA5NTIxNDggMzguNjEzMyAxLjg4NjY0IDQwLjQwNDcgNC4wNzYxNyA0MC40MDQ3SDMxLjk0MjhWMzYuNDIzOEg0LjA3NjE3VjguNTU3MTJaTTM1LjkyMzggMC41OTUyMTVIMTIuMDM4MUM5Ljg0ODU1IDAuNTk1MjE1IDguMDU3MTIgMi4zODY2NCA4LjA1NzEyIDQuNTc2MTdWMjguNDYxOUM4LjA1NzEyIDMwLjY1MTQgOS44NDg1NSAzMi40NDI4IDEyLjAzODEgMzIuNDQyOEgzNS45MjM4QzM4LjExMzMgMzIuNDQyOCAzOS45MDQ3IDMwLjY1MTQgMzkuOTA0NyAyOC40NjE5VjQuNTc2MTdDMzkuOTA0NyAyLjM4NjY0IDM4LjExMzMgMC41OTUyMTUgMzUuOTIzOCAwLjU5NTIxNVpNMzUuOTIzOCAyOC40NjE5SDEyLjAzODFWNC41NzYxN0gzNS45MjM4VjI4LjQ2MTlaTTIxLjk5MDUgMjQuNDgwOUgyNS45NzE0VjE4LjUwOTVIMzEuOTQyOFYxNC41Mjg1SDI1Ljk3MTRWOC41NTcxMkgyMS45OTA1VjE0LjUyODVIMTYuMDE5VjE4LjUwOTVIMjEuOTkwNVYyNC40ODA5WiIgZmlsbD0iIzU3NkJFOCIvPgo8L3N2Zz4K"),this._itemRows=[],this._offset=0}set contentlets(e){this._offset=e?.length||0,this._itemRows=this.createRowItem(e)}get rows(){return[...this._itemRows]}onScrollIndexChange(e){this.done||e.last===this.rows.length&&this.nextBatch.emit(this._offset)}createRowItem(e=[]){const t=[];return e.forEach(i=>{const r=t.length-1;t[r]?.length<2?t[r].push(i):t.push([i])}),t}}Mg.\u0275fac=function(e){return new(e||Mg)},Mg.\u0275cmp=xe({type:Mg,selectors:[["dot-asset-card-list"]],inputs:{done:"done",loading:"loading",contentlets:"contentlets"},outputs:{nextBatch:"nextBatch",selectedItem:"selectedItem"},decls:5,vars:2,consts:[["scrollHeight","20rem",3,"itemSize","items","lazy","onScrollIndexChange",4,"ngIf","ngIfElse"],["loadingBlock",""],["emptyBlock",""],["scrollHeight","20rem",3,"itemSize","items","lazy","onScrollIndexChange"],["pTemplate","item"],[1,"card-list-row"],[3,"contentlet","click",4,"ngIf"],[3,"contentlet","click"],[1,"wrapper","justify-start"],["class","card-list-row",4,"ngFor","ngForOf"],[1,"wrapper"],["width","42px","alt","No results found",3,"src"]],template:function(e,t){if(1&e&&(E(0,l_e,2,3,"p-scroller",0),E(1,u_e,2,1,"ng-template",null,1,Bn),E(3,d_e,4,1,"ng-template",null,2,Bn)),2&e){const i=Cn(2),r=Cn(4);b("ngIf",(null==t.rows?null:t.rows.length)&&!t.loading)("ngIfElse",t.loading?i:r)}},dependencies:[Hr,nn,rr,O5,Cg,Dg],styles:["[_nghost-%COMP%]{display:flex;width:100%;height:20rem;flex-direction:column}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%]{padding:0 2rem;display:flex;align-items:center;justify-content:center;flex-direction:column;flex-grow:1;height:250px;gap:0 1rem;overflow:hidden}[_nghost-%COMP%] .justify-start[_ngcontent-%COMP%]{justify-content:flex-start}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:1rem 0;font-size:18px}[_nghost-%COMP%] dot-asset-card, [_nghost-%COMP%] dot-asset-card-skeleton{width:calc(50% - .5rem)}[_nghost-%COMP%] .p-scroller-content{padding:0 2rem;max-width:100%}[_nghost-%COMP%] .card-list-row{display:flex;justify-content:space-between;width:100%;min-height:110px;gap:1rem}"],changeDetection:0});const h_e=["input"];function f_e(n,e){if(1&n){const t=Qe();mt(0),I(1,"dot-asset-card-list",6),de("selectedItem",function(r){return ge(t),ye(M().addAsset.emit(r))})("nextBatch",function(r){return ge(t),ye(M().offset$.next(r))}),A(),gt()}if(2&n){const t=e.ngIf;C(1),b("contentlets",t.contentlets)("done",t.preventScroll)("loading",t.loading)}}class Tg{constructor(e){this.store=e,this.addAsset=new ie,this.vm$=this.store.vm$,this.offset$=new Wr(0),this.destroy$=new ae}set languageId(e){this.store.updatelanguageId(e)}set type(e){this.store.updateAssetType(e)}ngOnInit(){this.store.searchContentlet(""),this.offset$.pipe(In(this.destroy$),function kye(n){return e=>e.lift(new Nye(n))}(1),function Fye(n,e=Bd,t=Wz){return i=>i.lift(new jye(n,e,t.leading,t.trailing))}(450)).subscribe(this.store.nextBatch),requestAnimationFrame(()=>this.input.nativeElement.focus())}ngAfterViewInit(){uv(this.input.nativeElement,"input").pipe(In(this.destroy$),Hd(450)).subscribe(({target:e})=>{this.store.searchContentlet(e.value)})}ngOnDestroy(){this.destroy$.next(!0)}}Tg.\u0275fac=function(e){return new(e||Tg)(O(bu))},Tg.\u0275cmp=xe({type:Tg,selectors:[["dot-asset-search"]],viewQuery:function(e,t){if(1&e&&hn(h_e,5),2&e){let i;Xe(i=et())&&(t.input=i.first)}},inputs:{languageId:"languageId",type:"type"},outputs:{addAsset:"addAsset"},features:[Nt([bu])],decls:8,vars:3,consts:[[1,"search-box"],[1,"p-input-icon-right"],["autofocus","","type","text","pInputText","","placeholder","Search",1,"search"],["input",""],[1,"pi","pi-search"],[4,"ngIf"],[3,"contentlets","done","loading","selectedItem","nextBatch"]],template:function(e,t){1&e&&(mt(0),I(1,"div",0)(2,"span",1),_e(3,"input",2,3)(5,"i",4),A()(),gt(),E(6,f_e,2,3,"ng-container",5),is(7,"async")),2&e&&(C(6),b("ngIf",rs(7,1,t.vm$)))},dependencies:[nn,lg,Mg,NN],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.search-box[_ngcontent-%COMP%]{padding:0 2rem;flex-grow:1;display:flex;align-items:center}.search-box[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{width:100%}"],changeDetection:0});const p_e=n=>{switch(n.target.error.code){case n.target.error.MEDIA_ERR_ABORTED:return"You aborted the video playback.";case n.target.error.MEDIA_ERR_NETWORK:return"A network error caused the video download to fail part-way.";case n.target.error.MEDIA_ERR_DECODE:return'Video playback aborted due to browser compatibility issues. Try a different browser or visit MDN Video Support for more information.';case n.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:return'Invalid URL. Please provide a URL to a .mp4, .webm, .ogv video file, or a YouTube video link. For more info on supported video formats and containers, visit MDN Video Format Support.';default:return'An unknown error occurred. Please contact support'}},m_e=["input"],y_e=/(youtube\.com\/watch\?v=.*)|(youtu\.be\/.*)/;class Sg{constructor(e,t){this.fb=e,this.cd=t,this.addAsset=new ie,this.disableAction=!1,this.form=this.fb.group({url:["",[wc.required,wc.pattern("^((http|https)://)[-a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)$")]]}),this.form.valueChanges.subscribe(({url:i})=>{this.disableAction=!1,"video"===this.type&&!this.isInvalid&&!i.match(y_e)&&this.tryToPlayVideo(i)}),requestAnimationFrame(()=>this.input.nativeElement.focus())}get placerHolder(){return"https://example.com/"+("video"===this.type?"video.mp4":"image.jpg")}get error(){return this.form.controls.url?.errors?.message||""}get isInvalid(){return this.form.controls.url?.invalid}onSubmit({url:e}){this.addAsset.emit(e)}tryToPlayVideo(e){const t=document.createElement("video");this.disableAction=!0,t.addEventListener("error",i=>{this.form.controls.url.setErrors({message:p_e(i)}),this.cd.detectChanges()}),t.addEventListener("canplay",()=>{this.form.controls.url.setErrors(null),this.disableAction=!1,this.cd.detectChanges()}),t.src=`${e}#t=0.1`}}Sg.\u0275fac=function(e){return new(e||Sg)(O(W_),O(qn))},Sg.\u0275cmp=xe({type:Sg,selectors:[["dot-external-asset"]],viewQuery:function(e,t){if(1&e&&hn(m_e,5),2&e){let i;Xe(i=et())&&(t.input=i.first)}},inputs:{type:"type"},outputs:{addAsset:"addAsset"},decls:10,vars:7,consts:[[1,"wrapper",3,"formGroup","ngSubmit"],[1,"form-control"],["dotFieldRequired","","for","url"],["id","url","formControlName","url","autocomplete","off","type","text","pInputText","",3,"placeholder"],["input",""],[1,"footer"],[1,"error-message",3,"innerHTML"],["type","submit","pButton","",3,"disabled"]],template:function(e,t){1&e&&(I(0,"form",0),de("ngSubmit",function(){return t.onSubmit(t.form.value)}),I(1,"div",1)(2,"label",2),Te(3),A(),_e(4,"input",3,4),A(),I(6,"div",5),_e(7,"span",6),I(8,"button",7),Te(9,"Insert"),A()()()),2&e&&(b("formGroup",t.form),C(3),Vi("Insert ",t.type," URL"),C(1),b("placeholder",t.placerHolder),C(3),es("hide",!t.isInvalid||t.form.pristine),b("innerHTML",t.error||"Enter a valid url",Af),C(1),b("disabled",t.form.invalid||t.disableAction))},dependencies:[Rd,al,Cc,Ad,Ta,Dc,ds,lg],styles:["[_nghost-%COMP%]{width:100%}.wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-end;flex-direction:column;padding:2rem;gap:1rem}.form-control[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.75rem}.footer[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}.error-message[_ngcontent-%COMP%]{color:#d82b2e;font-size:.813rem;text-align:left;max-width:30rem}.hide[_ngcontent-%COMP%]{visibility:hidden}"],changeDetection:0});const __e=TM("shakeit",[A2("shakestart",Bi({transform:"scale(1.1)"})),A2("shakeend",Bi({transform:"scale(1)"})),cp("shakestart => shakeend",lp("1000ms ease-in",function Vq(n){return{type:5,steps:n}}([Bi({transform:"translate3d(-2px, 0, 0)",offset:.1}),Bi({transform:"translate3d(4px, 0, 0)",offset:.2}),Bi({transform:"translate3d(-4px, 0, 0)",offset:.3}),Bi({transform:"translate3d(4px, 0, 0)",offset:.4}),Bi({transform:"translate3d(-4px, 0, 0)",offset:.5}),Bi({transform:"translate3d(4px, 0, 0)",offset:.6}),Bi({transform:"translate3d(-4px, 0, 0)",offset:.7}),Bi({transform:"translate3d(4px, 0, 0)",offset:.8}),Bi({transform:"translate3d(-2px, 0, 0)",offset:.9})])))]);function v_e(n,e){1&n&&_e(0,"span",11),2&n&&b("innerHTML",M(2).$implicit.summary,Af)}function b_e(n,e){1&n&&_e(0,"span",12),2&n&&b("innerHTML",M(2).$implicit.detail,Af)}function w_e(n,e){if(1&n&&(mt(0),E(1,v_e,1,1,"span",9),E(2,b_e,1,1,"span",10),gt()),2&n){const t=M().$implicit;C(1),b("ngIf",t.summary),C(1),b("ngIf",t.detail)}}function C_e(n,e){if(1&n&&(I(0,"span",15),Te(1),A()),2&n){const t=M(2).$implicit;C(1),Ot(t.summary)}}function D_e(n,e){if(1&n&&(I(0,"span",16),Te(1),A()),2&n){const t=M(2).$implicit;C(1),Ot(t.detail)}}function M_e(n,e){if(1&n&&(E(0,C_e,2,1,"span",13),E(1,D_e,2,1,"span",14)),2&n){const t=M().$implicit;b("ngIf",t.summary),C(1),b("ngIf",t.detail)}}function T_e(n,e){if(1&n){const t=Qe();I(0,"button",17),de("click",function(){ge(t);const r=M().index;return ye(M(2).removeMessage(r))}),_e(1,"i",18),A()}}const S_e=function(n,e){return{showTransitionParams:n,hideTransitionParams:e}},E_e=function(n){return{value:"visible",params:n}},x_e=function(n,e,t,i){return{"pi-info-circle":n,"pi-check":e,"pi-exclamation-triangle":t,"pi-times-circle":i}};function I_e(n,e){if(1&n&&(I(0,"div",4)(1,"div",5),_e(2,"span",6),E(3,w_e,3,2,"ng-container",1),E(4,M_e,2,2,"ng-template",null,7,Bn),E(6,T_e,2,0,"button",8),A()()),2&n){const t=e.$implicit,i=Cn(5),r=M(2);Dn("p-message p-message-"+t.severity),b("@messageAnimation",xt(12,E_e,Mi(9,S_e,r.showTransitionOptions,r.hideTransitionOptions))),C(2),Dn("p-message-icon pi"+(t.icon?" "+t.icon:"")),b("ngClass",Wf(14,x_e,"info"===t.severity,"success"===t.severity,"warn"===t.severity,"error"===t.severity)),C(1),b("ngIf",!r.escape)("ngIfElse",i),C(3),b("ngIf",r.closable)}}function O_e(n,e){if(1&n&&(mt(0),E(1,I_e,7,19,"div",3),gt()),2&n){const t=M();C(1),b("ngForOf",t.messages)}}function A_e(n,e){1&n&&Dt(0)}function k_e(n,e){if(1&n&&(I(0,"div",19)(1,"div",5),E(2,A_e,1,0,"ng-container",20),A()()),2&n){const t=M();b("ngClass","p-message p-message-"+t.severity),C(2),b("ngTemplateOutlet",t.contentTemplate)}}let N_e=(()=>{class n{constructor(t,i,r){this.messageService=t,this.el=i,this.cd=r,this.closable=!0,this.enableService=!0,this.escape=!0,this.showTransitionOptions="300ms ease-out",this.hideTransitionOptions="200ms cubic-bezier(0.86, 0, 0.07, 1)",this.valueChange=new ie,this.timerSubscriptions=[]}set value(t){this.messages=t,this.startMessageLifes(this.messages)}ngAfterContentInit(){this.templates.forEach(t=>{t.getType(),this.contentTemplate=t.template}),this.messageService&&this.enableService&&!this.contentTemplate&&(this.messageSubscription=this.messageService.messageObserver.subscribe(t=>{if(t){t instanceof Array||(t=[t]);const i=t.filter(r=>this.key===r.key);this.messages=this.messages?[...this.messages,...i]:[...i],this.startMessageLifes(i),this.cd.markForCheck()}}),this.clearSubscription=this.messageService.clearObserver.subscribe(t=>{t?this.key===t&&(this.messages=null):this.messages=null,this.cd.markForCheck()}))}hasMessages(){let t=this.el.nativeElement.parentElement;return!(!t||!t.offsetParent)&&(null!=this.contentTemplate||this.messages&&this.messages.length>0)}clear(){this.messages=[],this.valueChange.emit(this.messages)}removeMessage(t){this.messages=this.messages.filter((i,r)=>r!==t),this.valueChange.emit(this.messages)}get icon(){const t=this.severity||(this.hasMessages()?this.messages[0].severity:null);if(this.hasMessages())switch(t){case"success":return"pi-check";case"info":default:return"pi-info-circle";case"error":return"pi-times";case"warn":return"pi-exclamation-triangle"}return null}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.timerSubscriptions?.forEach(t=>t.unsubscribe())}startMessageLifes(t){t?.forEach(i=>i.life&&this.startMessageLife(i))}startMessageLife(t){const i=PL(t.life).subscribe(()=>{this.messages=this.messages?.filter(r=>r!==t),this.timerSubscriptions=this.timerSubscriptions?.filter(r=>r!==i),this.valueChange.emit(this.messages),this.cd.markForCheck()});this.timerSubscriptions.push(i)}}return n.\u0275fac=function(t){return new(t||n)(O(UQ,8),O(kt),O(qn))},n.\u0275cmp=xe({type:n,selectors:[["p-messages"]],contentQueries:function(t,i,r){if(1&t&&fi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{value:"value",closable:"closable",style:"style",styleClass:"styleClass",enableService:"enableService",key:"key",escape:"escape",severity:"severity",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{valueChange:"valueChange"},decls:4,vars:5,consts:[["role","alert",1,"p-messages","p-component",3,"ngStyle"],[4,"ngIf","ngIfElse"],["staticMessage",""],["role","alert",3,"class",4,"ngFor","ngForOf"],["role","alert"],[1,"p-message-wrapper"],[3,"ngClass"],["escapeOut",""],["class","p-message-close p-link","type","button","pRipple","",3,"click",4,"ngIf"],["class","p-message-summary",3,"innerHTML",4,"ngIf"],["class","p-message-detail",3,"innerHTML",4,"ngIf"],[1,"p-message-summary",3,"innerHTML"],[1,"p-message-detail",3,"innerHTML"],["class","p-message-summary",4,"ngIf"],["class","p-message-detail",4,"ngIf"],[1,"p-message-summary"],[1,"p-message-detail"],["type","button","pRipple","",1,"p-message-close","p-link",3,"click"],[1,"p-message-close-icon","pi","pi-times"],["role","alert",3,"ngClass"],[4,"ngTemplateOutlet"]],template:function(t,i){if(1&t&&(I(0,"div",0),E(1,O_e,2,1,"ng-container",1),E(2,k_e,3,2,"ng-template",null,2,Bn),A()),2&t){const r=Cn(3);Dn(i.styleClass),b("ngStyle",i.style),C(1),b("ngIf",!i.contentTemplate)("ngIfElse",r)}},dependencies:[gi,Hr,nn,Oo,wr,Vd],styles:[".p-message-wrapper{display:flex;align-items:center}.p-message-close{display:flex;align-items:center;justify-content:center}.p-message-close.p-link{margin-left:auto;overflow:hidden;position:relative}.p-messages .p-message.ng-animating{overflow:hidden}\n"],encapsulation:2,data:{animation:[TM("messageAnimation",[cp(":enter",[Bi({opacity:0,transform:"translateY(-25%)"}),lp("{{showTransitionParams}}")]),cp(":leave",[lp("{{hideTransitionParams}}",Bi({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0}),n})(),Kz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,Ic]}),n})();function P_e(n,e){if(1&n&&(I(0,"div",5),Te(1),A()),2&n){const t=M(2);mc("display",null!=t.value&&0!==t.value?"flex":"none"),C(1),Wy("",t.value,"",t.unit,"")}}function L_e(n,e){if(1&n&&(I(0,"div",3),E(1,P_e,2,4,"div",4),A()),2&n){const t=M();mc("width",t.value+"%")("background",t.color),C(1),b("ngIf",t.showValue)}}function R_e(n,e){if(1&n&&(I(0,"div",6),_e(1,"div",7),A()),2&n){const t=M();C(1),mc("background",t.color)}}const F_e=function(n,e){return{"p-progressbar p-component":!0,"p-progressbar-determinate":n,"p-progressbar-indeterminate":e}};let j_e=(()=>{class n{constructor(){this.showValue=!0,this.unit="%",this.mode="determinate"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-progressBar"]],hostAttrs:[1,"p-element"],inputs:{value:"value",showValue:"showValue",style:"style",styleClass:"styleClass",unit:"unit",mode:"mode",color:"color"},decls:3,vars:10,consts:[["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle","ngClass"],["class","p-progressbar-value p-progressbar-value-animate","style","display:flex",3,"width","background",4,"ngIf"],["class","p-progressbar-indeterminate-container",4,"ngIf"],[1,"p-progressbar-value","p-progressbar-value-animate",2,"display","flex"],["class","p-progressbar-label",3,"display",4,"ngIf"],[1,"p-progressbar-label"],[1,"p-progressbar-indeterminate-container"],[1,"p-progressbar-value","p-progressbar-value-animate"]],template:function(t,i){1&t&&(I(0,"div",0),E(1,L_e,2,5,"div",1),E(2,R_e,2,2,"div",2),A()),2&t&&(Dn(i.styleClass),b("ngStyle",i.style)("ngClass",Mi(7,F_e,"determinate"===i.mode,"indeterminate"===i.mode)),Yt("aria-valuenow",i.value),C(1),b("ngIf","determinate"===i.mode),C(1),b("ngIf","indeterminate"===i.mode))},dependencies:[gi,nn,wr],styles:['.p-progressbar{position:relative;overflow:hidden}.p-progressbar-determinate .p-progressbar-value{height:100%;width:0%;position:absolute;display:none;border:0 none;display:flex;align-items:center;justify-content:center;overflow:hidden}.p-progressbar-determinate .p-progressbar-label{display:inline-flex}.p-progressbar-determinate .p-progressbar-value-animate{transition:width 1s ease-in-out}.p-progressbar-indeterminate .p-progressbar-value:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.p-progressbar-indeterminate .p-progressbar-value:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}\n'],encapsulation:2,changeDetection:0}),n})(),Qz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();const z_e=["advancedfileinput"],V_e=["basicfileinput"],B_e=["content"];function U_e(n,e){if(1&n){const t=Qe();I(0,"p-button",17),de("onClick",function(){return ge(t),ye(M(2).upload())}),A()}if(2&n){const t=M(2);b("label",t.uploadButtonLabel)("icon",t.uploadIcon)("disabled",!t.hasFiles()||t.isFileLimitExceeded())("styleClass",t.uploadStyleClass)}}function H_e(n,e){if(1&n){const t=Qe();I(0,"p-button",17),de("onClick",function(){return ge(t),ye(M(2).clear())}),A()}if(2&n){const t=M(2);b("label",t.cancelButtonLabel)("icon",t.cancelIcon)("disabled",!t.hasFiles()||t.uploading)("styleClass",t.cancelStyleClass)}}function $_e(n,e){1&n&&Dt(0)}function W_e(n,e){1&n&&_e(0,"p-progressBar",18),2&n&&b("value",M(2).progress)("showValue",!1)}function G_e(n,e){if(1&n){const t=Qe();I(0,"img",26),de("error",function(r){return ge(t),ye(M(5).imageError(r))}),A()}if(2&n){const t=M().$implicit,i=M(4);b("src",t.objectURL,Xa)("width",i.previewWidth)}}function Y_e(n,e){if(1&n){const t=Qe();I(0,"div",22)(1,"div"),E(2,G_e,1,2,"img",23),A(),I(3,"div",24),Te(4),A(),I(5,"div"),Te(6),A(),I(7,"div")(8,"button",25),de("click",function(r){const s=ge(t).index;return ye(M(4).remove(r,s))}),A()()()}if(2&n){const t=e.$implicit,i=M(4);C(2),b("ngIf",i.isImage(t)),C(2),Ot(t.name),C(2),Ot(i.formatSize(t.size)),C(2),Dn(i.removeStyleClass),b("disabled",i.uploading)}}function q_e(n,e){if(1&n&&(I(0,"div"),E(1,Y_e,9,6,"div",21),A()),2&n){const t=M(3);C(1),b("ngForOf",t.files)}}function K_e(n,e){}function Q_e(n,e){if(1&n&&(I(0,"div"),E(1,K_e,0,0,"ng-template",27),A()),2&n){const t=M(3);C(1),b("ngForOf",t.files)("ngForTemplate",t.fileTemplate)}}function Z_e(n,e){if(1&n&&(I(0,"div",19),E(1,q_e,2,1,"div",20),E(2,Q_e,2,2,"div",20),A()),2&n){const t=M(2);C(1),b("ngIf",!t.fileTemplate),C(1),b("ngIf",t.fileTemplate)}}function J_e(n,e){1&n&&Dt(0)}const X_e=function(n,e){return{"p-focus":n,"p-disabled":e}},eve=function(n){return{$implicit:n}};function tve(n,e){if(1&n){const t=Qe();I(0,"div",2)(1,"div",3)(2,"span",4),de("focus",function(){return ge(t),ye(M().onFocus())})("blur",function(){return ge(t),ye(M().onBlur())})("click",function(){return ge(t),ye(M().choose())})("keydown.enter",function(){return ge(t),ye(M().choose())}),I(3,"input",5,6),de("change",function(r){return ge(t),ye(M().onFileSelect(r))}),A(),_e(5,"span",7),I(6,"span",8),Te(7),A()(),E(8,U_e,1,4,"p-button",9),E(9,H_e,1,4,"p-button",9),E(10,$_e,1,0,"ng-container",10),A(),I(11,"div",11,12),de("dragenter",function(r){return ge(t),ye(M().onDragEnter(r))})("dragleave",function(r){return ge(t),ye(M().onDragLeave(r))})("drop",function(r){return ge(t),ye(M().onDrop(r))}),E(13,W_e,1,2,"p-progressBar",13),_e(14,"p-messages",14),E(15,Z_e,3,2,"div",15),E(16,J_e,1,0,"ng-container",16),A()()}if(2&n){const t=M();Dn(t.styleClass),b("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",t.style),C(2),Dn(t.chooseStyleClass),b("ngClass",Mi(24,X_e,t.focus,t.disabled||t.isChooseDisabled())),C(1),b("multiple",t.multiple)("accept",t.accept)("disabled",t.disabled||t.isChooseDisabled()),Yt("title",""),C(2),Dn(t.chooseIcon),b("ngClass","p-button-icon p-button-icon-left"),C(2),Ot(t.chooseButtonLabel),C(1),b("ngIf",!t.auto&&t.showUploadButton),C(1),b("ngIf",!t.auto&&t.showCancelButton),C(1),b("ngTemplateOutlet",t.toolbarTemplate),C(3),b("ngIf",t.hasFiles()),C(1),b("value",t.msgs)("enableService",!1),C(1),b("ngIf",t.hasFiles()),C(1),b("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",xt(27,eve,t.files))}}function nve(n,e){if(1&n&&(I(0,"span",8),Te(1),A()),2&n){const t=M(2);C(1),Ot(t.basicButtonLabel)}}function ive(n,e){if(1&n){const t=Qe();I(0,"input",33,34),de("change",function(r){return ge(t),ye(M(2).onFileSelect(r))})("focus",function(){return ge(t),ye(M(2).onFocus())})("blur",function(){return ge(t),ye(M(2).onBlur())}),A()}if(2&n){const t=M(2);b("accept",t.accept)("multiple",t.multiple)("disabled",t.disabled)}}const rve=function(n,e,t,i){return{"p-button p-component p-fileupload-choose":!0,"p-button-icon-only":n,"p-fileupload-choose-selected":e,"p-focus":t,"p-disabled":i}};function ove(n,e){if(1&n){const t=Qe();I(0,"div",28),_e(1,"p-messages",14),I(2,"span",29),de("mouseup",function(){return ge(t),ye(M().onBasicUploaderClick())})("keydown",function(r){return ge(t),ye(M().onBasicKeydown(r))}),_e(3,"span",30),E(4,nve,2,1,"span",31),E(5,ive,2,3,"input",32),A()()}if(2&n){const t=M();C(1),b("value",t.msgs)("enableService",!1),C(1),Dn(t.styleClass),b("ngClass",Wf(9,rve,!t.basicButtonLabel,t.hasFiles(),t.focus,t.disabled))("ngStyle",t.style),C(1),b("ngClass",t.hasFiles()&&!t.auto?t.uploadIcon:t.chooseIcon),C(1),b("ngIf",t.basicButtonLabel),C(1),b("ngIf",!t.hasFiles())}}let sve=(()=>{class n{constructor(t,i,r,o,s,a){this.el=t,this.sanitizer=i,this.zone=r,this.http=o,this.cd=s,this.config=a,this.method="post",this.invalidFileSizeMessageSummary="{0}: Invalid file size, ",this.invalidFileSizeMessageDetail="maximum upload size is {0}.",this.invalidFileTypeMessageSummary="{0}: Invalid file type, ",this.invalidFileTypeMessageDetail="allowed file types: {0}.",this.invalidFileLimitMessageDetail="limit is {0} at most.",this.invalidFileLimitMessageSummary="Maximum number of files exceeded, ",this.previewWidth=50,this.chooseIcon="pi pi-plus",this.uploadIcon="pi pi-upload",this.cancelIcon="pi pi-times",this.showUploadButton=!0,this.showCancelButton=!0,this.mode="advanced",this.onBeforeUpload=new ie,this.onSend=new ie,this.onUpload=new ie,this.onError=new ie,this.onClear=new ie,this.onRemove=new ie,this.onSelect=new ie,this.onProgress=new ie,this.uploadHandler=new ie,this.onImageError=new ie,this._files=[],this.progress=0,this.uploadedFileCount=0}set files(t){this._files=[];for(let i=0;i{switch(t.getType()){case"file":default:this.fileTemplate=t.template;break;case"content":this.contentTemplate=t.template;break;case"toolbar":this.toolbarTemplate=t.template}})}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterViewInit(){"advanced"===this.mode&&this.zone.runOutsideAngular(()=>{this.content&&this.content.nativeElement.addEventListener("dragover",this.onDragOver.bind(this))})}choose(){this.advancedFileInput.nativeElement.click()}onFileSelect(t){if("drop"!==t.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.msgs=[],this.multiple||(this.files=[]);let i=t.dataTransfer?t.dataTransfer.files:t.target.files;for(let r=0;rthis.maxFileSize&&(this.msgs.push({severity:"error",summary:this.invalidFileSizeMessageSummary.replace("{0}",t.name),detail:this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}),1))}isFileTypeValid(t){let i=this.accept.split(",").map(r=>r.trim());for(let r of i)if(this.isWildcard(r)?this.getTypeClass(t.type)===this.getTypeClass(r):t.type==r||this.getFileExtension(t).toLowerCase()===r.toLowerCase())return!0;return!1}getTypeClass(t){return t.substring(0,t.indexOf("/"))}isWildcard(t){return-1!==t.indexOf("*")}getFileExtension(t){return"."+t.name.split(".").pop()}isImage(t){return/^image\//.test(t.type)}onImageLoad(t){window.URL.revokeObjectURL(t.src)}upload(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let t=new FormData;this.onBeforeUpload.emit({formData:t});for(let i=0;i{switch(i.type){case En.Sent:this.onSend.emit({originalEvent:i,formData:t});break;case En.Response:this.uploading=!1,this.progress=0,i.status>=200&&i.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:i,files:this.files})):this.onError.emit({files:this.files}),this.clear();break;case En.UploadProgress:i.loaded&&(this.progress=Math.round(100*i.loaded/i.total)),this.onProgress.emit({originalEvent:i,progress:this.progress})}this.cd.markForCheck()},i=>{this.uploading=!1,this.onError.emit({files:this.files,error:i})})}}clear(){this.files=[],this.onClear.emit(),this.clearInputElement(),this.cd.markForCheck()}remove(t,i){this.clearInputElement(),this.onRemove.emit({originalEvent:t,file:this.files[i]}),this.files.splice(i,1),this.checkFileLimit()}isFileLimitExceeded(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit0}onDragEnter(t){this.disabled||(t.stopPropagation(),t.preventDefault())}onDragOver(t){this.disabled||(ce.addClass(this.content.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,t.stopPropagation(),t.preventDefault())}onDragLeave(t){this.disabled||ce.removeClass(this.content.nativeElement,"p-fileupload-highlight")}onDrop(t){if(!this.disabled){ce.removeClass(this.content.nativeElement,"p-fileupload-highlight"),t.stopPropagation(),t.preventDefault();let i=t.dataTransfer?t.dataTransfer.files:t.target.files;(this.multiple||i&&1===i.length)&&this.onFileSelect(t)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(t){if(0==t)return"0 B";let s=Math.floor(Math.log(t)/Math.log(1e3));return parseFloat((t/Math.pow(1e3,s)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][s]}onBasicUploaderClick(){this.hasFiles()?this.upload():this.basicFileInput.nativeElement.click()}onBasicKeydown(t){switch(t.code){case"Space":case"Enter":this.onBasicUploaderClick(),t.preventDefault()}}imageError(t){this.onImageError.emit(t)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(xc.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(xc.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(xc.CANCEL)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.content.nativeElement.removeEventListener("dragover",this.onDragOver),this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(QD),O(Jt),O(tr),O(qn),O(zd))},n.\u0275cmp=xe({type:n,selectors:[["p-fileUpload"]],contentQueries:function(t,i,r){if(1&t&&fi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},viewQuery:function(t,i){if(1&t&&(hn(z_e,5),hn(V_e,5),hn(B_e,5)),2&t){let r;Xe(r=et())&&(i.advancedFileInput=r.first),Xe(r=et())&&(i.basicFileInput=r.first),Xe(r=et())&&(i.content=r.first)}},hostAttrs:[1,"p-element"],inputs:{name:"name",url:"url",method:"method",multiple:"multiple",accept:"accept",disabled:"disabled",auto:"auto",withCredentials:"withCredentials",maxFileSize:"maxFileSize",invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:"previewWidth",chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:"showUploadButton",showCancelButton:"showCancelButton",mode:"mode",headers:"headers",customUpload:"customUpload",fileLimit:"fileLimit",uploadStyleClass:"uploadStyleClass",cancelStyleClass:"cancelStyleClass",removeStyleClass:"removeStyleClass",chooseStyleClass:"chooseStyleClass",files:"files"},outputs:{onBeforeUpload:"onBeforeUpload",onSend:"onSend",onUpload:"onUpload",onError:"onError",onClear:"onClear",onRemove:"onRemove",onSelect:"onSelect",onProgress:"onProgress",uploadHandler:"uploadHandler",onImageError:"onImageError"},decls:2,vars:2,consts:[[3,"ngClass","ngStyle","class",4,"ngIf"],["class","p-fileupload p-fileupload-basic p-component",4,"ngIf"],[3,"ngClass","ngStyle"],[1,"p-fileupload-buttonbar"],["pRipple","","tabindex","0",1,"p-button","p-component","p-fileupload-choose",3,"ngClass","focus","blur","click","keydown.enter"],["type","file",3,"multiple","accept","disabled","change"],["advancedfileinput",""],[3,"ngClass"],[1,"p-button-label"],["type","button",3,"label","icon","disabled","styleClass","onClick",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"p-fileupload-content",3,"dragenter","dragleave","drop"],["content",""],[3,"value","showValue",4,"ngIf"],[3,"value","enableService"],["class","p-fileupload-files",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"label","icon","disabled","styleClass","onClick"],[3,"value","showValue"],[1,"p-fileupload-files"],[4,"ngIf"],["class","p-fileupload-row",4,"ngFor","ngForOf"],[1,"p-fileupload-row"],[3,"src","width","error",4,"ngIf"],[1,"p-fileupload-filename"],["type","button","icon","pi pi-times","pButton","",3,"disabled","click"],[3,"src","width","error"],["ngFor","",3,"ngForOf","ngForTemplate"],[1,"p-fileupload","p-fileupload-basic","p-component"],["tabindex","0","pRipple","",3,"ngClass","ngStyle","mouseup","keydown"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"],["class","p-button-label",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur"],["basicfileinput",""]],template:function(t,i){1&t&&(E(0,tve,17,29,"div",0),E(1,ove,6,14,"div",1)),2&t&&(b("ngIf","advanced"===i.mode),C(1),b("ngIf","basic"===i.mode))},dependencies:[gi,Hr,nn,Oo,wr,ds,eT,j_e,N_e,Vd],styles:[".p-fileupload-content{position:relative}.p-fileupload-row{display:flex;align-items:center}.p-fileupload-row>div{flex:1 1 auto;width:25%}.p-fileupload-row>div:last-child{text-align:right}.p-fileupload-content .p-progressbar{width:100%;position:absolute;top:0;left:0}.p-button.p-fileupload-choose{position:relative;overflow:hidden}.p-button.p-fileupload-choose input[type=file],.p-fileupload-choose.p-fileupload-choose-selected input[type=file]{display:none}.p-fluid .p-fileupload .p-button{width:auto}.p-fileupload-filename{word-break:break-all}\n"],encapsulation:2,changeDetection:0}),n})(),Zz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,xa,ks,Qz,Kz,Ic,xa,ks,Qz,Kz]}),n})();function ave(n,e){if(1&n&&(mt(0),_e(1,"img",3),gt()),2&n){const t=M();C(1),b("src",t.src||t.file.objectURL,Xa)("alt",t.file.name)}}function lve(n,e){if(1&n&&(mt(0),I(1,"video",4),_e(2,"source",5),A(),gt()),2&n){const t=M();C(2),b("src",t.src||t.file.objectURL,Xa)}}function cve(n,e){1&n&&(I(0,"p"),Te(1,"Select an accepted asset type"),A())}class Eg{}function uve(n,e){if(1&n){const t=Qe();I(0,"p-fileUpload",2),de("onSelect",function(r){return ge(t),ye(M().onSelectFile(r.files))}),A()}2&n&&b("accept",M().type+"/*")("customUpload",!0)}function dve(n,e){if(1&n&&_e(0,"dot-asset-preview",11),2&n){const t=M(2);b("type",t.type)("file",t.file)("src",t.src)}}function hve(n,e){if(1&n&&(I(0,"span",13),Te(1),A()),2&n){const t=M(3);C(1),Ot(t.error)}}function fve(n,e){1&n&&E(0,hve,2,1,"ng-template",null,12,Bn)}function pve(n,e){if(1&n){const t=Qe();I(0,"div",3),E(1,dve,1,3,"dot-asset-preview",4),E(2,fve,2,0,null,5),A(),I(3,"div",6)(4,"div",7),_e(5,"dot-spinner",8),I(6,"span",9),de("@shakeit.done",function(r){return ge(t),ye(M().shakeEnd(r))}),Te(7),A()(),I(8,"button",10),de("click",function(){return ge(t),ye(M().cancelAction())}),Te(9," Cancel "),A()()}if(2&n){const t=M();C(1),b("ngIf","UPLOAD"===t.status),C(1),b("ngIf","ERROR"===t.status),C(3),b("size","30px"),C(1),b("@shakeit",t.animation),C(1),Vi(" ",t.errorMessage," ")}}Eg.\u0275fac=function(e){return new(e||Eg)},Eg.\u0275cmp=xe({type:Eg,selectors:[["dot-asset-preview"]],inputs:{type:"type",file:"file",src:"src"},decls:4,vars:3,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"src","alt"],["controls","","preload","metadata"],[3,"src"]],template:function(e,t){1&e&&(mt(0,0),E(1,ave,2,2,"ng-container",1),E(2,lve,3,1,"ng-container",1),E(3,cve,2,0,"p",2),gt()),2&e&&(b("ngSwitch",t.type),C(1),b("ngSwitchCase","image"),C(1),b("ngSwitchCase","video"))},dependencies:[Id,y_,__],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;align-items:center}[_nghost-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;max-height:100%;max-width:100%;object-fit:contain}"],changeDetection:0});var Zs=(()=>(function(n){n.SELECT="SELECT",n.PREVIEW="PREVIEW",n.UPLOAD="UPLOAD",n.ERROR="ERROR"}(Zs||(Zs={})),Zs))();class xg{constructor(e,t,i,r){this.sanitizer=e,this.dotUploadFileService=t,this.cd=i,this.el=r,this.uploadedFile=new ie,this.preventClose=new ie,this.hide=new ie,this.status=Zs.SELECT,this.animation="shakeend"}get errorMessage(){return` Don't close this window while the ${this.type} uploads`}onClick(e){const t=!this.el.nativeElement.contains(e);this.status===Zs.UPLOAD&&t&&this.shakeMe()}ngOnDestroy(){this.preventClose.emit(!1)}onSelectFile(e){const t=e[0],i=new FileReader;this.preventClose.emit(!0),i.onload=r=>this.setFile(t,r.target.result),i.readAsArrayBuffer(t)}cancelAction(){this.file=null,this.status=Zs.SELECT,this.cancelUploading(),this.hide.emit(!0)}shakeEnd(){this.animation="shakeend"}shakeMe(){"shakestart"!==this.animation&&(this.animation="shakestart")}uploadFile(){this.controller=new AbortController,this.status=Zs.UPLOAD,this.$uploadRequestSubs=this.dotUploadFileService.publishContent({data:this.file,signal:this.controller.signal}).pipe(Tt(1),Ai(e=>this.handleError(e))).subscribe(e=>{const t=e[0];this.uploadedFile.emit(t[Object.keys(t)[0]]),this.status=Zs.SELECT})}setFile(e,t){const i=new Blob([new Uint8Array(t)],{type:"video/mp4"});this.src=this.sanitizer.bypassSecurityTrustResourceUrl(URL.createObjectURL(i)),this.file=e,this.status=Zs.UPLOAD,this.uploadFile(),this.cd.markForCheck()}handleError(e){return this.status=Zs.ERROR,this.preventClose.emit(!1),this.error=e?.error?.errors[0]||e.error,console.error(e),ho(e)}cancelUploading(){this.$uploadRequestSubs.unsubscribe(),this.controller?.abort()}}xg.\u0275fac=function(e){return new(e||xg)(O(QD),O(Ys),O(qn),O(kt))},xg.\u0275cmp=xe({type:xg,selectors:[["dot-upload-asset"]],hostBindings:function(e,t){1&e&&de("click",function(r){return t.onClick(r.target)},0,PI)},inputs:{type:"type"},outputs:{uploadedFile:"uploadedFile",preventClose:"preventClose",hide:"hide"},decls:3,vars:2,consts:[["chooseLabel","browse files","mode","basic",3,"accept","customUpload","onSelect",4,"ngIf","ngIfElse"],["preview",""],["chooseLabel","browse files","mode","basic",3,"accept","customUpload","onSelect"],[1,"preview-container"],[3,"type","file","src",4,"ngIf"],[4,"ngIf"],[1,"action-container"],[1,"loading-message"],[3,"size"],[1,"warning"],["data-test-id","back-btn","pButton","",1,"p-button-outlined",3,"click"],[3,"type","file","src"],["errorTemplate",""],[1,"error"]],template:function(e,t){if(1&e&&(E(0,uve,1,2,"p-fileUpload",0),E(1,pve,10,5,"ng-template",null,1,Bn)),2&e){const i=Cn(2);b("ngIf","SELECT"===t.status)("ngIfElse",i)}},dependencies:[nn,Lh,ds,sve,Eg],styles:["[_nghost-%COMP%]{height:100%;width:100%;padding:1rem;gap:1rem;display:flex;justify-content:center;align-items:center;flex-direction:column}[_nghost-%COMP%] .error[_ngcontent-%COMP%]{color:#d82b2e;font-size:1.25rem;max-width:100%;white-space:pre-wrap}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-grow:1;justify-content:center;overflow:hidden;width:100%;flex-direction:column}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] .action-container[_ngcontent-%COMP%]{display:flex;height:-moz-fit-content;height:fit-content;justify-content:space-between;width:100%}[_nghost-%COMP%] .loading-message[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:1rem}[_nghost-%COMP%] .warning[_ngcontent-%COMP%]{display:block;font-style:normal;text-align:center;color:#14151a}"],data:{animation:[__e]},changeDetection:0});let Xz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,xF,Ic,rg,xF,rg]}),n})();function Bve(n,e){1&n&&Dt(0)}function Uve(n,e){if(1&n&&(mt(0),E(1,Bve,1,0,"ng-container",3),gt()),2&n){const t=M(2);C(1),b("ngTemplateOutlet",t.contentTemplate)}}function Hve(n,e){if(1&n&&(I(0,"div",1),_r(1),E(2,Uve,2,1,"ng-container",2),A()),2&n){const t=M();b("hidden",!t.selected),Yt("id",t.id)("aria-hidden",!t.selected)("aria-labelledby",t.id+"-label"),C(2),b("ngIf",t.contentTemplate&&(t.cache?t.loaded:t.selected))}}const eV=["*"],$ve=["content"],Wve=["navbar"],Gve=["prevBtn"],Yve=["nextBtn"],qve=["inkbar"];function Kve(n,e){if(1&n){const t=Qe();I(0,"button",12,13),de("click",function(){return ge(t),ye(M().navBackward())}),_e(2,"span",14),A()}}function Qve(n,e){1&n&&_e(0,"span",24),2&n&&b("ngClass",M(3).$implicit.leftIcon)}function Zve(n,e){1&n&&_e(0,"span",25),2&n&&b("ngClass",M(3).$implicit.rightIcon)}function Jve(n,e){if(1&n&&(mt(0),E(1,Qve,1,1,"span",21),I(2,"span",22),Te(3),A(),E(4,Zve,1,1,"span",23),gt()),2&n){const t=M(2).$implicit;C(1),b("ngIf",t.leftIcon),C(2),Ot(t.header),C(1),b("ngIf",t.rightIcon)}}function Xve(n,e){1&n&&Dt(0)}function ebe(n,e){if(1&n){const t=Qe();I(0,"span",26),de("click",function(r){ge(t);const o=M(2).$implicit;return ye(M().close(r,o))}),A()}}const tbe=function(n,e){return{"p-highlight":n,"p-disabled":e}};function nbe(n,e){if(1&n){const t=Qe();I(0,"li",16)(1,"a",17),de("click",function(r){ge(t);const o=M().$implicit;return ye(M().open(r,o))})("keydown.enter",function(r){ge(t);const o=M().$implicit;return ye(M().open(r,o))}),E(2,Jve,5,3,"ng-container",18),E(3,Xve,1,0,"ng-container",19),E(4,ebe,1,0,"span",20),A()()}if(2&n){const t=M().$implicit;Dn(t.headerStyleClass),b("ngClass",Mi(16,tbe,t.selected,t.disabled))("ngStyle",t.headerStyle),C(1),b("pTooltip",t.tooltip)("tooltipPosition",t.tooltipPosition)("positionStyle",t.tooltipPositionStyle)("tooltipStyleClass",t.tooltipStyleClass),Yt("id",t.id+"-label")("aria-selected",t.selected)("aria-controls",t.id)("aria-selected",t.selected)("tabindex",t.disabled?null:"0"),C(1),b("ngIf",!t.headerTemplate),C(1),b("ngTemplateOutlet",t.headerTemplate),C(1),b("ngIf",t.closable)}}function ibe(n,e){1&n&&E(0,nbe,5,19,"li",15),2&n&&b("ngIf",!e.$implicit.closed)}function rbe(n,e){if(1&n){const t=Qe();I(0,"button",27,28),de("click",function(){return ge(t),ye(M().navForward())}),_e(2,"span",29),A()}}const obe=function(n){return{"p-tabview p-component":!0,"p-tabview-scrollable":n}};let sbe=0,tV=(()=>{class n{constructor(t,i,r){this.viewContainer=i,this.cd=r,this.cache=!0,this.tooltipPosition="top",this.tooltipPositionStyle="absolute",this.id="p-tabpanel-"+sbe++,this.tabView=t}ngAfterContentInit(){this.templates.forEach(t=>{"header"===t.getType()?this.headerTemplate=t.template:this.contentTemplate=t.template})}get selected(){return this._selected}set selected(t){this._selected=t,this.loaded||this.cd.detectChanges(),t&&(this.loaded=!0)}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this.tabView.cd.markForCheck()}get header(){return this._header}set header(t){this._header=t,Promise.resolve().then(()=>{this.tabView.updateInkBar(),this.tabView.cd.markForCheck()})}get leftIcon(){return this._leftIcon}set leftIcon(t){this._leftIcon=t,this.tabView.cd.markForCheck()}get rightIcon(){return this._rightIcon}set rightIcon(t){this._rightIcon=t,this.tabView.cd.markForCheck()}ngOnDestroy(){this.view=null}}return n.\u0275fac=function(t){return new(t||n)(O(Bt(()=>nV)),O(Br),O(qn))},n.\u0275cmp=xe({type:n,selectors:[["p-tabPanel"]],contentQueries:function(t,i,r){if(1&t&&fi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{closable:"closable",headerStyle:"headerStyle",headerStyleClass:"headerStyleClass",cache:"cache",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",selected:"selected",disabled:"disabled",header:"header",leftIcon:"leftIcon",rightIcon:"rightIcon"},ngContentSelectors:eV,decls:1,vars:1,consts:[["class","p-tabview-panel","role","tabpanel",3,"hidden",4,"ngIf"],["role","tabpanel",1,"p-tabview-panel",3,"hidden"],[4,"ngIf"],[4,"ngTemplateOutlet"]],template:function(t,i){1&t&&(So(),E(0,Hve,3,5,"div",0)),2&t&&b("ngIf",!i.closed)},dependencies:[nn,Oo],encapsulation:2}),n})(),nV=(()=>{class n{constructor(t,i){this.el=t,this.cd=i,this.orientation="top",this.onChange=new ie,this.onClose=new ie,this.activeIndexChange=new ie,this.backwardIsDisabled=!0,this.forwardIsDisabled=!1}ngAfterContentInit(){this.initTabs(),this.tabChangesSubscription=this.tabPanels.changes.subscribe(t=>{this.initTabs()})}ngAfterViewChecked(){this.tabChanged&&(this.updateInkBar(),this.tabChanged=!1)}ngOnDestroy(){this.tabChangesSubscription&&this.tabChangesSubscription.unsubscribe()}initTabs(){this.tabs=this.tabPanels.toArray(),!this.findSelectedTab()&&this.tabs.length&&(null!=this.activeIndex&&this.tabs.length>this.activeIndex?this.tabs[this.activeIndex].selected=!0:this.tabs[0].selected=!0,this.tabChanged=!0),this.cd.markForCheck()}open(t,i){if(i.disabled)t&&t.preventDefault();else{if(!i.selected){let r=this.findSelectedTab();r&&(r.selected=!1),this.tabChanged=!0,i.selected=!0;let o=this.findTabIndex(i);this.preventActiveIndexPropagation=!0,this.activeIndexChange.emit(o),this.onChange.emit({originalEvent:t,index:o}),this.updateScrollBar(o)}t&&t.preventDefault()}}close(t,i){this.controlClose?this.onClose.emit({originalEvent:t,index:this.findTabIndex(i),close:()=>{this.closeTab(i)}}):(this.closeTab(i),this.onClose.emit({originalEvent:t,index:this.findTabIndex(i)})),t.stopPropagation()}closeTab(t){if(!t.disabled){if(t.selected){this.tabChanged=!0,t.selected=!1;for(let i=0;ithis._activeIndex&&(this.findSelectedTab().selected=!1,this.tabs[this._activeIndex].selected=!0,this.tabChanged=!0,this.updateScrollBar(t))}updateInkBar(){if(this.navbar){const t=ce.findSingle(this.navbar.nativeElement,"li.p-highlight");if(!t)return;this.inkbar.nativeElement.style.width=ce.getWidth(t)+"px",this.inkbar.nativeElement.style.left=ce.getOffset(t).left-ce.getOffset(this.navbar.nativeElement).left+"px"}}updateScrollBar(t){this.navbar.nativeElement.children[t].scrollIntoView({block:"nearest"})}updateButtonState(){const t=this.content.nativeElement,{scrollLeft:i,scrollWidth:r}=t,o=ce.getWidth(t);this.backwardIsDisabled=0===i,this.forwardIsDisabled=parseInt(i)===r-o}onScroll(t){this.scrollable&&this.updateButtonState(),t.preventDefault()}getVisibleButtonWidths(){return[this.prevBtn?.nativeElement,this.nextBtn?.nativeElement].reduce((t,i)=>i?t+ce.getWidth(i):t,0)}navBackward(){const t=this.content.nativeElement,i=ce.getWidth(t)-this.getVisibleButtonWidths(),r=t.scrollLeft-i;t.scrollLeft=r<=0?0:r}navForward(){const t=this.content.nativeElement,i=ce.getWidth(t)-this.getVisibleButtonWidths(),r=t.scrollLeft+i,o=t.scrollWidth-i;t.scrollLeft=r>=o?o:r}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(qn))},n.\u0275cmp=xe({type:n,selectors:[["p-tabView"]],contentQueries:function(t,i,r){if(1&t&&fi(r,tV,4),2&t){let o;Xe(o=et())&&(i.tabPanels=o)}},viewQuery:function(t,i){if(1&t&&(hn($ve,5),hn(Wve,5),hn(Gve,5),hn(Yve,5),hn(qve,5)),2&t){let r;Xe(r=et())&&(i.content=r.first),Xe(r=et())&&(i.navbar=r.first),Xe(r=et())&&(i.prevBtn=r.first),Xe(r=et())&&(i.nextBtn=r.first),Xe(r=et())&&(i.inkbar=r.first)}},hostAttrs:[1,"p-element"],inputs:{orientation:"orientation",style:"style",styleClass:"styleClass",controlClose:"controlClose",scrollable:"scrollable",activeIndex:"activeIndex"},outputs:{onChange:"onChange",onClose:"onClose",activeIndexChange:"activeIndexChange"},ngContentSelectors:eV,decls:13,vars:9,consts:[[3,"ngClass","ngStyle"],[1,"p-tabview-nav-container"],["class","p-tabview-nav-prev p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-nav-content",3,"scroll"],["content",""],["role","tablist",1,"p-tabview-nav"],["navbar",""],["ngFor","",3,"ngForOf"],[1,"p-tabview-ink-bar"],["inkbar",""],["class","p-tabview-nav-next p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-panels"],["type","button","pRipple","",1,"p-tabview-nav-prev","p-tabview-nav-btn","p-link",3,"click"],["prevBtn",""],[1,"pi","pi-chevron-left"],["role","presentation",3,"ngClass","ngStyle","class",4,"ngIf"],["role","presentation",3,"ngClass","ngStyle"],["role","tab","pRipple","",1,"p-tabview-nav-link",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","click","keydown.enter"],[4,"ngIf"],[4,"ngTemplateOutlet"],["class","p-tabview-close pi pi-times",3,"click",4,"ngIf"],["class","p-tabview-left-icon",3,"ngClass",4,"ngIf"],[1,"p-tabview-title"],["class","p-tabview-right-icon",3,"ngClass",4,"ngIf"],[1,"p-tabview-left-icon",3,"ngClass"],[1,"p-tabview-right-icon",3,"ngClass"],[1,"p-tabview-close","pi","pi-times",3,"click"],["type","button","pRipple","",1,"p-tabview-nav-next","p-tabview-nav-btn","p-link",3,"click"],["nextBtn",""],[1,"pi","pi-chevron-right"]],template:function(t,i){1&t&&(So(),I(0,"div",0)(1,"div",1),E(2,Kve,3,0,"button",2),I(3,"div",3,4),de("scroll",function(o){return i.onScroll(o)}),I(5,"ul",5,6),E(7,ibe,1,1,"ng-template",7),_e(8,"li",8,9),A()(),E(10,rbe,3,0,"button",10),A(),I(11,"div",11),_r(12),A()()),2&t&&(Dn(i.styleClass),b("ngClass",xt(7,obe,i.scrollable))("ngStyle",i.style),C(2),b("ngIf",i.scrollable&&!i.backwardIsDisabled),C(5),b("ngForOf",i.tabs),C(3),b("ngIf",i.scrollable&&!i.forwardIsDisabled))},dependencies:[gi,Hr,nn,Oo,wr,ig,Vd],styles:[".p-tabview-nav-container{position:relative}.p-tabview-scrollable .p-tabview-nav-container{overflow:hidden}.p-tabview-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior:contain auto}.p-tabview-nav{display:flex;margin:0;padding:0;list-style-type:none;flex:1 1 auto}.p-tabview-nav-link{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabview-ink-bar{display:none;z-index:1}.p-tabview-nav-link:focus{z-index:1}.p-tabview-title{line-height:1;white-space:nowrap}.p-tabview-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabview-nav-prev{left:0}.p-tabview-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabview-close{z-index:1}\n"],encapsulation:2,changeDetection:0}),n})(),iV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,xa,rg,Ic,xa]}),n})();class wu{}wu.\u0275fac=function(e){return new(e||wu)},wu.\u0275mod=rt({type:wu}),wu.\u0275inj=wt({imports:[Xz,dz,ks,hz,az,mT,XM,iV,qz,A5,Zz,iM,Xz,dz,ks,hz,az,mT,XM,iV,qz,A5,Zz,iM]});class Gh{}Gh.\u0275fac=function(e){return new(e||Gh)},Gh.\u0275mod=rt({type:Gh}),Gh.\u0275inj=wt({providers:[Ys],imports:[zn,G_,Y_,hu,wu]}),wi(Ph,[rr,nV,tV,Sg,Tg,xg],[]);class Cu{}Cu.\u0275fac=function(e){return new(e||Cu)},Cu.\u0275mod=rt({type:Cu}),Cu.\u0275inj=wt({providers:[jl],imports:[zn,G_,Y_,ks]}),wi(zl,[Hr,nn,Th,au,Mh],[]);class Yh{}Yh.\u0275fac=function(e){return new(e||Yh)},Yh.\u0275mod=rt({type:Yh}),Yh.\u0275inj=wt({providers:[Ys,mo,kc,ja],imports:[zn,G_,Y_,Cu,wu,Gh,Vh,Y_,Cu]}),wi($h,[Hr,nn,dg],[]),wi(Hh,[nn,Rd,al,Cc,Ad,Ta,Dc,BS,ds,lg,ug,Uh],[]),wi(Uh,[Hr,nn,Th,au,bm,Mh],[]);class abe extends TypeError{constructor(e,t){let i;const{message:r,explanation:o,...s}=e,{path:a}=e,l=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(o??l),null!=o&&(this.cause=l),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>i??(i=[e,...t()])}}function $o(n){return"object"==typeof n&&null!=n}function xi(n){return"symbol"==typeof n?n.toString():"string"==typeof n?JSON.stringify(n):`${n}`}function ube(n,e,t,i){if(!0===n)return;!1===n?n={}:"string"==typeof n&&(n={message:n});const{path:r,branch:o}=e,{type:s}=t,{refinement:a,message:l=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${xi(i)}\``}=n;return{value:i,type:s,refinement:a,key:r[r.length-1],path:r,branch:o,...n,message:l}}function*XS(n,e,t,i){(function lbe(n){return $o(n)&&"function"==typeof n[Symbol.iterator]})(n)||(n=[n]);for(const r of n){const o=ube(r,e,t,i);o&&(yield o)}}function*eE(n,e,t={}){const{path:i=[],branch:r=[n],coerce:o=!1,mask:s=!1}=t,a={path:i,branch:r};if(o&&(n=e.coercer(n,a),s&&"type"!==e.type&&$o(e.schema)&&$o(n)&&!Array.isArray(n)))for(const c in n)void 0===e.schema[c]&&delete n[c];let l="valid";for(const c of e.validator(n,a))c.explanation=t.message,l="not_valid",yield[c,void 0];for(let[c,u,d]of e.entries(n,a)){const h=eE(u,d,{path:void 0===c?i:[...i,c],branch:void 0===c?r:[...r,u],coerce:o,mask:s,message:t.message});for(const f of h)f[0]?(l=null!=f[0].refinement?"not_refined":"not_valid",yield[f[0],void 0]):o&&(u=f[1],void 0===c?n=u:n instanceof Map?n.set(c,u):n instanceof Set?n.add(u):$o(n)&&(void 0!==u||c in n)&&(n[c]=u))}if("not_valid"!==l)for(const c of e.refiner(n,a))c.explanation=t.message,l="not_refined",yield[c,void 0];"valid"===l&&(yield[void 0,n])}class _i{constructor(e){const{type:t,schema:i,validator:r,refiner:o,coercer:s=(l=>l),entries:a=function*(){}}=e;this.type=t,this.schema=i,this.entries=a,this.coercer=s,this.validator=r?(l,c)=>XS(r(l,c),c,this,l):()=>[],this.refiner=o?(l,c)=>XS(o(l,c),c,this,l):()=>[]}assert(e,t){return oV(e,this,t)}create(e,t){return function dbe(n,e,t){const i=Og(n,e,{coerce:!0,message:t});if(i[0])throw i[0];return i[1]}(e,this,t)}is(e){return function sV(n,e){return!Og(n,e)[0]}(e,this)}mask(e,t){return function hbe(n,e,t){const i=Og(n,e,{coerce:!0,mask:!0,message:t});if(i[0])throw i[0];return i[1]}(e,this,t)}validate(e,t={}){return Og(e,this,t)}}function oV(n,e,t){const i=Og(n,e,{message:t});if(i[0])throw i[0]}function Og(n,e,t={}){const i=eE(n,e,t),r=function cbe(n){const{done:e,value:t}=n.next();return e?void 0:t}(i);return r[0]?[new abe(r[0],function*(){for(const s of i)s[0]&&(yield s[0])}),void 0]:[void 0,r[1]]}function vo(n,e){return new _i({type:n,schema:null,validator:e})}function aV(n){return new _i({type:"array",schema:n,*entries(e){if(n&&Array.isArray(e))for(const[t,i]of e.entries())yield[t,i,n]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${xi(e)}`})}function Du(n){const e=n?Object.keys(n):[],t=function lV(){return vo("never",()=>!1)}();return new _i({type:"object",schema:n||null,*entries(i){if(n&&$o(i)){const r=new Set(Object.keys(i));for(const o of e)r.delete(o),yield[o,i[o],n[o]];for(const o of r)yield[o,i[o],t]}},validator:i=>$o(i)||`Expected an object, but received: ${xi(i)}`,coercer:i=>$o(i)?{...i}:i})}function cV(n){return new _i({...n,validator:(e,t)=>void 0===e||n.validator(e,t),refiner:(e,t)=>void 0===e||n.refiner(e,t)})}function Ag(){return vo("string",n=>"string"==typeof n||`Expected a string, but received: ${xi(n)}`)}const pbe=vn.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=n=>{const e=n?.node||this.editor.state.doc;return"textSize"===(n?.mode||this.options.mode)?e.textBetween(0,e.content.size,void 0," ").length:e.nodeSize},this.storage.words=n=>{const e=n?.node||this.editor.state.doc;return e.textBetween(0,e.content.size," "," ").split(" ").filter(r=>""!==r).length}},addProseMirrorPlugins(){return[new $t({key:new rn("characterCount"),filterTransaction:(n,e)=>{const t=this.options.limit;if(!n.docChanged||0===t||null==t)return!0;const i=this.storage.characters({node:e.doc}),r=this.storage.characters({node:n.doc});if(r<=t||i>t&&r>t&&r<=i)return!0;if(i>t&&r>t&&r>i||!n.getMeta("paste"))return!1;const s=n.selection.$head.pos;return n.deleteRange(s-(r-t),s),!(this.storage.characters({node:n.doc})>t)}})]}}),mbe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,gbe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,ybe=Or.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:n}){return["mark",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[ou({find:mbe,type:this.type})]},addPasteRules(){return[Ll({find:gbe,type:this.type})]}}),Mu=(n,e)=>{for(const t in e)n[t]=e[t];return n},tE="numeric",nE="ascii",iE="alpha",g0="asciinumeric",y0="alphanumeric",rE="domain",pV="whitespace";function Cbe(n,e){return n in e||(e[n]=[]),e[n]}function Tu(n,e,t){e[tE]&&(e[g0]=!0,e[y0]=!0),e[nE]&&(e[g0]=!0,e[iE]=!0),e[g0]&&(e[y0]=!0),e[iE]&&(e[y0]=!0),e[y0]&&(e[rE]=!0),e.emoji&&(e[rE]=!0);for(const i in e){const r=Cbe(i,t);r.indexOf(n)<0&&r.push(n)}}function Xr(n){void 0===n&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}Xr.groups={},Xr.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let i=0;i=0&&(t[i]=!0);return t}(s.t,i),t);Tu(o,l,i)}else t&&Tu(o,t,i);s.t=o}return r.j[n]=s,s}};const We=(n,e,t,i,r)=>n.ta(e,t,i,r),Wo=(n,e,t,i,r)=>n.tr(e,t,i,r),mV=(n,e,t,i,r)=>n.ts(e,t,i,r),pe=(n,e,t,i,r)=>n.tt(e,t,i,r),Ua="WORD",oE="UWORD",kg="LOCALHOST",aE="UTLD",_0="SCHEME",Kh="SLASH_SCHEME",Qh="OPENBRACE",Ng="OPENBRACKET",Pg="OPENANGLEBRACKET",Lg="OPENPAREN",Su="CLOSEBRACE",Zh="CLOSEBRACKET",Jh="CLOSEANGLEBRACKET",Eu="CLOSEPAREN",v0="AMPERSAND",b0="APOSTROPHE",w0="ASTERISK",Ul="AT",C0="BACKSLASH",D0="BACKTICK",M0="CARET",Hl="COLON",uE="COMMA",T0="DOLLAR",Js="DOT",S0="EQUALS",dE="EXCLAMATION",Xs="HYPHEN",E0="PERCENT",x0="PIPE",I0="PLUS",O0="POUND",A0="QUERY",hE="QUOTE",fE="SEMI",ea="SLASH",Rg="TILDE",k0="UNDERSCORE",N0="SYM";var _V=Object.freeze({__proto__:null,WORD:Ua,UWORD:oE,LOCALHOST:kg,TLD:"TLD",UTLD:aE,SCHEME:_0,SLASH_SCHEME:Kh,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:Qh,OPENBRACKET:Ng,OPENANGLEBRACKET:Pg,OPENPAREN:Lg,CLOSEBRACE:Su,CLOSEBRACKET:Zh,CLOSEANGLEBRACKET:Jh,CLOSEPAREN:Eu,AMPERSAND:v0,APOSTROPHE:b0,ASTERISK:w0,AT:Ul,BACKSLASH:C0,BACKTICK:D0,CARET:M0,COLON:Hl,COMMA:uE,DOLLAR:T0,DOT:Js,EQUALS:S0,EXCLAMATION:dE,HYPHEN:Xs,PERCENT:E0,PIPE:x0,PLUS:I0,POUND:O0,QUERY:A0,QUOTE:hE,SEMI:fE,SLASH:ea,TILDE:Rg,UNDERSCORE:k0,EMOJI:"EMOJI",SYM:N0});const xu=/[a-z]/,P0=/\p{L}/u,L0=/\p{Emoji}/u,R0=/\d/,pE=/\s/;let F0=null,j0=null;function $l(n,e,t,i,r){let o;const s=e.length;for(let a=0;a=0;)o++;if(o>0){e.push(t.join(""));for(let s=parseInt(n.substring(i,i+o),10);s>0;s--)t.pop();i+=o}else t.push(n[i]),i++}return e}const Xh={defaultProtocol:"http",events:null,format:wV,formatHref:wV,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function z0(n,e){void 0===e&&(e=null);let t=Mu({},Xh);n&&(t=Mu(t,n instanceof z0?n.o:n));const i=t.ignoreTags,r=[];for(let o=0;on,check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const i=null!=e;let r=this.o[n];return r&&("object"==typeof r?(r=t.t in r?r[t.t]:Xh[n],"function"==typeof r&&i&&(r=r(e,t))):"function"==typeof r&&i&&(r=r(e,t.t,t)),r)},getObj(n,e,t){let i=this.o[n];return"function"==typeof i&&null!=e&&(i=i(e,t.t,t)),i},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}},V0.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),i=n.get("format",e,this);return t&&i.length>t?i.substring(0,t)+"\u2026":i},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return void 0===n&&(n=Xh.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),i=n.get("formatHref",t,this),r=n.get("tagName",t,e),o=this.toFormattedString(n),s={},a=n.get("className",t,e),l=n.get("target",t,e),c=n.get("rel",t,e),u=n.getObj("attributes",t,e),d=n.getObj("events",t,e);return s.href=i,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&Mu(s,u),{tagName:r,attributes:s,content:o,eventListeners:d}}};const mE=Fg("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),gE=Fg("text"),CV=Fg("nl"),Wl=Fg("url",{isLink:!0,toHref(n){return void 0===n&&(n=Xh.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==kg&&n[1].t===Hl}}),Li=n=>new Xr(n);function yE(n,e,t){return new n(e.slice(t[0].s,t[t.length-1].e),t)}const jg=typeof console<"u"&&console&&console.warn||(()=>{}),an={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function DV(n,e){if(void 0===e&&(e=!1),an.initialized&&jg(`linkifyjs: already initialized - will not register custom scheme "${n}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error('linkifyjs: incorrect scheme format.\n 1. Must only contain digits, lowercase ASCII letters or "-"\n 2. Cannot start or end with "-"\n 3. "-" cannot repeat');an.customSchemes.push([n,e])}function MV(n){return an.initialized||function Nbe(){an.scanner=function Ebe(n){void 0===n&&(n=[]);const e={};Xr.groups=e;const t=new Xr;null==F0&&(F0=bV("aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==j0&&(j0=bV("\u03b5\u03bb1\u03c52\u0431\u04331\u0435\u043b3\u0434\u0435\u0442\u04384\u0435\u044e2\u043a\u0430\u0442\u043e\u043b\u0438\u043a6\u043e\u043c3\u043c\u043a\u04342\u043e\u043d1\u0441\u043a\u0432\u04306\u043e\u043d\u043b\u0430\u0439\u043d5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043a\u04403\u049b\u0430\u04373\u0570\u0561\u05753\u05d9\u05e9\u05e8\u05d0\u05dc5\u05e7\u05d5\u05dd3\u0627\u0628\u0648\u0638\u0628\u064a5\u062a\u0635\u0627\u0644\u0627\u062a6\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062f\u06464\u0628\u062d\u0631\u064a\u06465\u062c\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062f\u064a\u06296\u0639\u0644\u064a\u0627\u06465\u0645\u063a\u0631\u06285\u0645\u0627\u0631\u0627\u062a5\u06cc\u0631\u0627\u06465\u0628\u0627\u0631\u062a2\u0632\u0627\u06314\u064a\u062a\u06433\u06be\u0627\u0631\u062a5\u062a\u0648\u0646\u06334\u0633\u0648\u062f\u0627\u06463\u0631\u064a\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064a\u06466\u0642\u0637\u06313\u0643\u0627\u062b\u0648\u0644\u064a\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064a\u0633\u064a\u06275\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067e\u0627\u06a9\u0633\u062a\u0627\u06467\u0680\u0627\u0631\u062a4\u0915\u0949\u092e3\u0928\u0947\u091f3\u092d\u093e\u0930\u09240\u092e\u094d3\u094b\u09245\u0938\u0902\u0917\u0920\u09285\u09ac\u09be\u0982\u09b2\u09be5\u09ad\u09be\u09b0\u09a42\u09f0\u09a44\u0a2d\u0a3e\u0a30\u0a244\u0aad\u0abe\u0ab0\u0aa44\u0b2d\u0b3e\u0b30\u0b244\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe6\u0bb2\u0b99\u0bcd\u0b95\u0bc86\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd11\u0c2d\u0c3e\u0c30\u0c24\u0c4d5\u0cad\u0cbe\u0cb0\u0ca44\u0d2d\u0d3e\u0d30\u0d24\u0d025\u0dbd\u0d82\u0d9a\u0dcf4\u0e04\u0e2d\u0e213\u0e44\u0e17\u0e223\u0ea5\u0eb2\u0ea73\u10d2\u10d42\u307f\u3093\u306a3\u30a2\u30de\u30be\u30f34\u30af\u30e9\u30a6\u30c94\u30b0\u30fc\u30b0\u30eb4\u30b3\u30e02\u30b9\u30c8\u30a23\u30bb\u30fc\u30eb3\u30d5\u30a1\u30c3\u30b7\u30e7\u30f36\u30dd\u30a4\u30f3\u30c84\u4e16\u754c2\u4e2d\u4fe11\u56fd1\u570b1\u6587\u7f513\u4e9a\u9a6c\u900a3\u4f01\u4e1a2\u4f5b\u5c712\u4fe1\u606f2\u5065\u5eb72\u516b\u53662\u516c\u53f81\u76ca2\u53f0\u6e7e1\u70632\u5546\u57ce1\u5e971\u68072\u5609\u91cc0\u5927\u9152\u5e975\u5728\u7ebf2\u5927\u62ff2\u5929\u4e3b\u65593\u5a31\u4e502\u5bb6\u96fb2\u5e7f\u4e1c2\u5fae\u535a2\u6148\u55842\u6211\u7231\u4f603\u624b\u673a2\u62db\u80582\u653f\u52a11\u5e9c2\u65b0\u52a0\u57612\u95fb2\u65f6\u5c1a2\u66f8\u7c4d2\u673a\u67842\u6de1\u9a6c\u95213\u6e38\u620f2\u6fb3\u95802\u70b9\u770b2\u79fb\u52a82\u7ec4\u7ec7\u673a\u67844\u7f51\u57401\u5e971\u7ad91\u7edc2\u8054\u901a2\u8c37\u6b4c2\u8d2d\u72692\u901a\u8ca92\u96c6\u56e22\u96fb\u8a0a\u76c8\u79d14\u98de\u5229\u6d663\u98df\u54c12\u9910\u53852\u9999\u683c\u91cc\u62c93\u6e2f2\ub2f7\ub1371\ucef42\uc0bc\uc1312\ud55c\uad6d2")),pe(t,"'",b0),pe(t,"{",Qh),pe(t,"[",Ng),pe(t,"<",Pg),pe(t,"(",Lg),pe(t,"}",Su),pe(t,"]",Zh),pe(t,">",Jh),pe(t,")",Eu),pe(t,"&",v0),pe(t,"*",w0),pe(t,"@",Ul),pe(t,"`",D0),pe(t,"^",M0),pe(t,":",Hl),pe(t,",",uE),pe(t,"$",T0),pe(t,".",Js),pe(t,"=",S0),pe(t,"!",dE),pe(t,"-",Xs),pe(t,"%",E0),pe(t,"|",x0),pe(t,"+",I0),pe(t,"#",O0),pe(t,"?",A0),pe(t,'"',hE),pe(t,"/",ea),pe(t,";",fE),pe(t,"~",Rg),pe(t,"_",k0),pe(t,"\\",C0);const i=Wo(t,R0,"NUM",{[tE]:!0});Wo(i,R0,i);const r=Wo(t,xu,Ua,{[nE]:!0});Wo(r,xu,r);const o=Wo(t,P0,oE,{[iE]:!0});Wo(o,xu),Wo(o,P0,o);const s=Wo(t,pE,"WS",{[pV]:!0});pe(t,"\n","NL",{[pV]:!0}),pe(s,"\n"),Wo(s,pE,s);const a=Wo(t,L0,"EMOJI",{emoji:!0});Wo(a,L0,a),pe(a,"\ufe0f",a);const l=pe(a,"\u200d");Wo(l,L0,a);const c=[[xu,r]],u=[[xu,null],[P0,o]];for(let d=0;dd[0]>h[0]?1:-1);for(let d=0;d=0?p[rE]=!0:xu.test(h)?R0.test(h)?p[g0]=!0:p[nE]=!0:p[tE]=!0,mV(t,h,h,p)}return mV(t,"localhost",kg,{ascii:!0}),t.jd=new Xr(N0),{start:t,tokens:Mu({groups:e},_V)}}(an.customSchemes);for(let n=0;n=0&&h++,r++,u++;if(h<0)r-=u,r0&&(o.push(yE(gE,e,s)),s=[]),r-=h,u-=h;const f=d.t,p=t.slice(r-u,r);o.push(yE(f,e,p))}}return s.length>0&&o.push(yE(gE,e,s)),o}(an.parser.start,n,function xbe(n,e){const t=function Ibe(n){const e=[],t=n.length;let i=0;for(;i56319||i+1===t||(o=n.charCodeAt(i+1))<56320||o>57343?n[i]:n.slice(i,i+2);e.push(s),i+=s.length}return e}(e.replace(/[A-Z]/g,a=>a.toLowerCase())),i=t.length,r=[];let o=0,s=0;for(;s=0&&(d+=t[s].length,h++),c+=t[s].length,o+=t[s].length,s++;o-=d,s-=h,c-=d,r.push({t:u.t,v:e.slice(o-c,o),s:o-c,e:o})}return r}(an.scanner.start,n))}function vE(n,e,t){if(void 0===e&&(e=null),void 0===t&&(t=null),e&&"object"==typeof e){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const i=new z0(t),r=MV(n),o=[];for(let s=0;s{const r=e.some(u=>u.docChanged)&&!t.doc.eq(i.doc),o=e.some(u=>u.getMeta("preventAutolink"));if(!r||o)return;const{tr:s}=i,a=function Ole(n,e){const t=new l1(n);return e.forEach(i=>{i.steps.forEach(r=>{t.step(r)})}),t}(t.doc,[...e]),{mapping:l}=a;return function Rle(n){const{mapping:e,steps:t}=n,i=[];return e.maps.forEach((r,o)=>{const s=[];if(r.ranges.length)r.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=t[o];if(void 0===a||void 0===l)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=e.slice(o).map(a,-1),u=e.slice(o).map(l),d=e.invert().map(c,-1),h=e.invert().map(u);i.push({oldRange:{from:d,to:h},newRange:{from:c,to:u}})})}),function Lle(n){const e=function Ple(n,e=JSON.stringify){const t={};return n.filter(i=>{const r=e(i);return!Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=!0)})}(n);return 1===e.length?e:e.filter((t,i)=>!e.filter((o,s)=>s!==i).some(o=>t.oldRange.from>=o.oldRange.from&&t.oldRange.to<=o.oldRange.to&&t.newRange.from>=o.newRange.from&&t.newRange.to<=o.newRange.to))}(i)}(a).forEach(({oldRange:u,newRange:d})=>{Ab(u.from,u.to,t.doc).filter(m=>m.mark.type===n.type).forEach(m=>{const v=Ab(l.map(m.from),l.map(m.to),i.doc).filter(K=>K.mark.type===n.type);if(!v.length)return;const w=v[0],_=t.doc.textBetween(m.from,m.to,void 0," "),N=i.doc.textBetween(w.from,w.to,void 0," "),T=TV(_),ne=TV(N);T&&!ne&&s.removeMark(w.from,w.to,n.type)});const h=function kle(n,e,t){const i=[];return n.nodesBetween(e.from,e.to,(r,o)=>{t(r)&&i.push({node:r,pos:o})}),i}(i.doc,d,m=>m.isTextblock);let f,p;if(h.length>1?(f=h[0],p=i.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):h.length&&i.doc.textBetween(d.from,d.to," "," ").endsWith(" ")&&(f=h[0],p=i.doc.textBetween(f.pos,d.to,void 0," ")),f&&p){const m=p.split(" ").filter(v=>""!==v);if(m.length<=0)return!1;const g=m[m.length-1],y=f.pos+p.lastIndexOf(g);if(!g)return!1;vE(g).filter(v=>v.isLink).filter(v=>!n.validate||n.validate(v.value)).map(v=>({...v,from:y+v.start+1,to:y+v.end+1})).forEach(v=>{s.addMark(v.from,v.to,n.type.create({href:v.href}))})}}),s.steps.length?s:void 0}})}const Fbe=Or.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{"string"!=typeof n?DV(n.scheme,n.optionalSlashes):DV(n)})},onDestroy(){!function kbe(){Xr.groups={},an.scanner=null,an.parser=null,an.tokenQueue=[],an.pluginQueue=[],an.customSchemes=[],an.initialized=!1}()},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:n}){return["a",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ll({find:n=>vE(n).filter(e=>!this.options.validate||this.options.validate(e.value)).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:n=>{var e;return{href:null===(e=n.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(Pbe({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(function Lbe(n){return new $t({key:new rn("handleClickLink"),props:{handleClick:(e,t,i)=>{var r,o,s;if(0!==i.button)return!1;const a=c5(e.state,n.type.name),l=null===(r=i.target)||void 0===r?void 0:r.closest("a"),c=null!==(o=l?.href)&&void 0!==o?o:a.href,u=null!==(s=l?.target)&&void 0!==s?s:a.target;return!(!l||!c||(window.open(c,u),0))}}})}({type:this.type})),this.options.linkOnPaste&&n.push(function Rbe(n){return new $t({key:new rn("handlePasteLink"),props:{handlePaste:(e,t,i)=>{const{state:r}=e,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach(c=>{a+=c.textContent});const l=vE(a).find(c=>c.isLink&&c.value===a);return!(!a||!l||(n.editor.commands.setMark(n.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),n}}),jbe=Or.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:n=>"sub"===n&&null}],renderHTML({HTMLAttributes:n}){return["sub",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),zbe=Or.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:n=>"super"===n&&null}],renderHTML({HTMLAttributes:n}){return["sup",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Vbe=Rn.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:n}){return["tr",Xt(this.options.HTMLAttributes,n),0]}}),Bbe=vn.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>!!this.options.alignments.includes(n)&&this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})),unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Ube=Or.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("underline")&&{}}],renderHTML({HTMLAttributes:n}){return["u",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Hbe=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/,$be=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/g,SV=n=>n?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",Ybe=Rn.create({name:"youtube",addOptions:()=>({addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML:()=>[{tag:"div[data-youtube-video] iframe"}],addCommands(){return{setYoutubeVideo:n=>({commands:e})=>!!(n=>n.match(Hbe))(n.src)&&e.insertContent({type:this.name,attrs:n})}},addPasteRules(){return this.options.addPasteHandler?[lce({find:$be,type:this.type,getAttributes:n=>({src:n.input})})]:[]},renderHTML({HTMLAttributes:n}){const e=(n=>{const{url:e,allowFullscreen:t,autoplay:i,ccLanguage:r,ccLoadPolicy:o,controls:s,disableKBcontrols:a,enableIFrameApi:l,endTime:c,interfaceLanguage:u,ivLoadPolicy:d,loop:h,modestBranding:f,nocookie:p,origin:m,playlist:g,progressBarColor:y,startAt:v}=n;if(e.includes("/embed/"))return e;if(e.includes("youtu.be")){const ne=e.split("/").pop();return ne?`${SV(p)}${ne}`:null}const _=/v=([-\w]+)/gm.exec(e);if(!_||!_[1])return null;let N=`${SV(p)}${_[1]}`;const T=[];return!1===t&&T.push("fs=0"),i&&T.push("autoplay=1"),r&&T.push(`cc_lang_pref=${r}`),o&&T.push("cc_load_policy=1"),s||T.push("controls=0"),a&&T.push("disablekb=1"),l&&T.push("enablejsapi=1"),c&&T.push(`end=${c}`),u&&T.push(`hl=${u}`),d&&T.push(`iv_load_policy=${d}`),h&&T.push("loop=1"),f&&T.push("modestbranding=1"),m&&T.push(`origin=${m}`),g&&T.push(`playlist=${g}`),v&&T.push(`start=${v}`),y&&T.push(`color=${y}`),T.length&&(N+=`?${T.join("&")}`),N})({url:n.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:n.start||0});return n.src=e,["div",{"data-youtube-video":""},["iframe",Xt(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor},n)]]}}),qbe=/^\s*>\s$/,Kbe=Rn.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:n}){return["blockquote",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[vm({find:qbe,type:this.type})]}}),Qbe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,Zbe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,Jbe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,Xbe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,e0e=Or.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:n=>"normal"!==n.style.fontWeight&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}],renderHTML({HTMLAttributes:n}){return["strong",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[ou({find:Qbe,type:this.type}),ou({find:Jbe,type:this.type})]},addPasteRules(){return[Ll({find:Zbe,type:this.type}),Ll({find:Xbe,type:this.type})]}}),t0e=Rn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",Xt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),EV=Or.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ob(n,this.type);return!!Object.entries(t).some(([,r])=>!!r)||e.unsetMark(this.name)}}}}),xV=/^\s*([-+*])\s$/,n0e=Rn.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:n}){return["ul",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(t0e.name,this.editor.getAttributes(EV.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=vm({find:xV,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=vm({find:xV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(EV.name),editor:this.editor})),[n]}}),i0e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,r0e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,o0e=Or.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:n}){return["code",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[ou({find:i0e,type:this.type})]},addPasteRules(){return[Ll({find:r0e,type:this.type})]}}),s0e=/^```([a-z]+)?[\s\n]$/,a0e=/^~~~([a-z]+)?[\s\n]$/,l0e=Rn.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:n=>{var e;const{languageClassPrefix:t}=this.options;return[...(null===(e=n.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter(s=>s.startsWith(t)).map(s=>s.replace(t,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:n,HTMLAttributes:e}){return["pre",Xt(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:e}=this.editor.state.selection;return!(!n||e.parent.type.name!==this.name)&&!(1!==e.pos&&e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=n,{selection:t}=e,{$from:i,empty:r}=t;if(!r||i.parent.type!==this.type)return!1;const o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!(!o||!s)&&n.chain().command(({tr:a})=>(a.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:i}=e,{$from:r,empty:o}=t;if(!o||r.parent.type!==this.type||r.parentOffset!==r.parent.nodeSize-2)return!1;const a=r.after();return void 0!==a&&!i.nodeAt(a)&&n.commands.exitCode()}}},addInputRules(){return[MS({find:s0e,type:this.type,getAttributes:n=>({language:n[1]})}),MS({find:a0e,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new $t({key:new rn("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),i=e.clipboardData.getData("vscode-editor-data"),o=(i?JSON.parse(i):void 0)?.mode;if(!t||!o)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(it.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(t.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),c0e=Rn.create({name:"doc",topNode:!0,content:"block+"});function u0e(n={}){return new $t({view:e=>new d0e(e,n)})}class d0e{constructor(e,t){var i;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(i=t.width)&&void 0!==i?i:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=s=>{this[r](s)};return e.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let i,e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent;if(t){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=a?u.bottom:u.top;a&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!i){let a=this.editorView.coordsAtPos(this.cursorPos);i={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let o,s,r=this.editorView.dom.offsetParent;if(this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t),!r||r==document.body&&"static"==getComputedStyle(r).position)o=-pageXOffset,s=-pageYOffset;else{let a=r.getBoundingClientRect();o=a.left-r.scrollLeft,s=a.top-r.scrollTop}this.element.style.left=i.left-o+"px",this.element.style.top=i.top-s+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),i=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=i&&i.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t,e):r;if(t&&!o){let s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=fj(this.editorView.state.doc,s,this.editorView.dragging.slice);null!=a&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const h0e=vn.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[u0e(this.options)]}});class ri extends nt{constructor(e){super(e,e)}map(e,t){let i=e.resolve(t.map(this.head));return ri.valid(i)?new ri(i):nt.near(i)}content(){return we.empty}eq(e){return e instanceof ri&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new ri(e.resolve(t.pos))}getBookmark(){return new bE(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function f0e(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),i=n.node(e);if(0!=t)for(let r=i.child(t-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(e)||!function p0e(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),i=n.node(e);if(t!=i.childCount)for(let r=i.child(t);;r=r.firstChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(e))return!1;let i=t.type.spec.allowGapCursor;if(null!=i)return i;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,i=!1){e:for(;;){if(!i&&ri.valid(e))return e;let r=e.pos,o=null;for(let s=e.depth;;s--){let a=e.node(s);if(t>0?e.indexAfter(s)0){o=a.child(t>0?e.indexAfter(s):e.index(s)-1);break}if(0==s)return null;r+=t;let l=e.doc.resolve(r);if(ri.valid(l))return l}for(;;){let s=t>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!Ye.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),i=!1;continue e}break}o=s,r+=t;let a=e.doc.resolve(r);if(ri.valid(a))return a}return null}}}ri.prototype.visible=!1,ri.findFrom=ri.findGapCursorFrom,nt.jsonID("gapcursor",ri);class bE{constructor(e){this.pos=e}map(e){return new bE(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return ri.valid(t)?new ri(t):nt.near(t)}}const g0e=tS({ArrowLeft:B0("horiz",-1),ArrowRight:B0("horiz",1),ArrowUp:B0("vert",-1),ArrowDown:B0("vert",1)});function B0(n,e){const t="vert"==n?e>0?"down":"up":e>0?"right":"left";return function(i,r,o){let s=i.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof it){if(!o.endOfTextblock(t)||0==a.depth)return!1;l=!1,a=i.doc.resolve(e>0?a.after():a.before())}let c=ri.findGapCursorFrom(a,e,l);return!!c&&(r&&r(i.tr.setSelection(new ri(c))),!0)}}function y0e(n,e,t){if(!n||!n.editable)return!1;let i=n.state.doc.resolve(e);if(!ri.valid(i))return!1;let r=n.posAtCoords({left:t.clientX,top:t.clientY});return!(r&&r.inside>-1&&Ye.isSelectable(n.state.doc.nodeAt(r.inside))||(n.dispatch(n.state.tr.setSelection(new ri(i))),0))}function _0e(n,e){if("insertCompositionText"!=e.inputType||!(n.state.selection instanceof ri))return!1;let{$from:t}=n.state.selection,i=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;let r=le.empty;for(let s=i.length-1;s>=0;s--)r=le.from(i[s].createAndFill(null,r));let o=n.state.tr.replace(t.pos,t.pos,new we(r,0,0));return o.setSelection(it.near(o.doc.resolve(t.pos+1))),n.dispatch(o),!1}function v0e(n){if(!(n.selection instanceof ri))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ln.create(n.doc,[Ei.widget(n.selection.head,e,{key:"gapcursor"})])}const b0e=vn.create({name:"gapCursor",addProseMirrorPlugins:()=>[new $t({props:{decorations:v0e,createSelectionBetween:(n,e,t)=>e.pos==t.pos&&ri.valid(t)?new ri(t):null,handleClick:y0e,handleKeyDown:g0e,handleDOMEvents:{beforeinput:_0e}}})],extendNodeSchema(n){var e;return{allowGapCursor:null!==(e=bt(Ve(n,"allowGapCursor",{name:n.name,options:n.options,storage:n.storage})))&&void 0!==e?e:null}}}),w0e=Rn.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:n}){return["br",Xt(this.options.HTMLAttributes,n)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:i})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:r,storedMarks:o}=t;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=i.extensionManager,l=o||r.$to.parentOffset&&r.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const d=l.filter(h=>a.includes(h.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),C0e=Rn.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,Xt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.setNode(this.name,n),toggleHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>MS({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Gi=function(){};Gi.prototype.append=function(e){return e.length?(e=Gi.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Gi.prototype.prepend=function(e){return e.length?Gi.from(e).append(this):this},Gi.prototype.appendInner=function(e){return new D0e(this,e)},Gi.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Gi.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Gi.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Gi.prototype.forEach=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=this.length),t<=i?this.forEachInner(e,t,i,0):this.forEachInvertedInner(e,t,i,0)},Gi.prototype.map=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(e(o,s))},t,i),r},Gi.from=function(e){return e instanceof Gi?e:e&&e.length?new IV(e):Gi.empty};var IV=function(n){function e(i){n.call(this),this.values=i}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,o){return 0==r&&o==this.length?this:new e(this.values.slice(r,o))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,o,s,a){for(var l=o;l=s;l--)if(!1===r(this.values[l],a+l))return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=200)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=200)return new e(r.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(Gi);Gi.empty=new IV([]);var D0e=function(n){function e(t,i){n.call(this),this.left=t,this.right=i,this.length=t.length+i.length,this.depth=Math.max(t.depth,i.depth)+1}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(i){return ia&&!1===this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,o)-a,s+a))return!1},e.prototype.forEachInvertedInner=function(i,r,o,s){var a=this.left.length;if(r>a&&!1===this.right.forEachInvertedInner(i,r-a,Math.max(o,a)-a,s+a)||o=o?this.right.slice(i-o,r-o):this.left.slice(i,o).append(this.right.slice(0,r-o))},e.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new e(r,this.right)},e.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new e(this.left,new e(this.right,i)):new e(this,i)},e}(Gi);const OV=Gi;class gs{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let r,o,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}t&&(r=this.remapping(i,this.items.length),o=r.maps.length);let a,l,s=e.tr,c=[],u=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(i,h+1),o=r.maps.length),o--,void u.push(d);if(r){u.push(new ta(d.map));let p,f=d.step.map(r.slice(o));f&&s.maybeStep(f).doc&&(p=s.mapping.maps[s.mapping.maps.length-1],c.push(new ta(p,void 0,void 0,c.length+u.length))),o--,p&&r.appendMap(p,o)}else s.maybeStep(d.step);return d.selection?(a=r?d.selection.map(r.slice(o)):d.selection,l=new gs(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,t,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let u=0;uS0e&&(a=function T0e(n,e){let t;return n.forEach((i,r)=>{if(i.selection&&0==e--)return t=r,!1}),n.slice(t)}(a,c),s-=c),new gs(a.append(o),s)}remapping(e,t){let i=new sh;return this.items.forEach((r,o)=>{i.appendMap(r.map,null!=r.mirrorOffset&&o-r.mirrorOffset>=e?i.maps.length-r.mirrorOffset:void 0)},e,t),i}addMaps(e){return 0==this.eventCount?this:new gs(this.items.append(e.map(t=>new ta(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},r);let l=t;this.items.forEach(h=>{let f=o.getMirror(--l);if(null==f)return;s=Math.min(s,f);let p=o.maps[f];if(h.step){let m=e.steps[f].invert(e.docs[f]),g=h.selection&&h.selection.map(o.slice(l+1,f));g&&a++,i.push(new ta(p,m,g))}else i.push(new ta(p))},r);let c=[];for(let h=t;h500&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),i=t.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(t.slice(i)),c=l&&l.getMap();if(i--,c&&t.appendMap(c,i),l){let u=s.selection&&s.selection.map(t.slice(i));u&&o++;let h,d=new ta(c.invert(),l,u),f=r.length-1;(h=r.length&&r[f].merge(d))?r[f]=h:r.push(d)}}else s.map&&i--},this.items.length,0),new gs(OV.from(r.reverse()),o)}}gs.empty=new gs(OV.empty,0);class ta{constructor(e,t,i,r){this.map=e,this.step=t,this.selection=i,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new ta(t.getMap().invert(),t,this.selection)}}}class Gl{constructor(e,t,i,r,o){this.done=e,this.undone=t,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}}const S0e=20;function AV(n){let e=[];return n.forEach((t,i,r,o)=>e.push(r,o)),e}function wE(n,e){if(!n)return null;let t=[];for(let i=0;inew Gl(gs.empty,gs.empty,null,0,-1),apply:(e,t,i)=>function E0e(n,e,t,i){let o,r=t.getMeta(na);if(r)return r.historyState;t.getMeta(PV)&&(n=new Gl(n.done,n.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(0==t.steps.length)return n;if(s&&s.getMeta(na))return s.getMeta(na).redo?new Gl(n.done.addTransform(t,void 0,i,H0(e)),n.undone,AV(t.mapping.maps[t.steps.length-1]),n.prevTime,n.prevComposition):new Gl(n.done,n.undone.addTransform(t,void 0,i,H0(e)),null,n.prevTime,n.prevComposition);if(!1===t.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=t.getMeta("rebased"))?new Gl(n.done.rebased(t,o),n.undone.rebased(t,o),wE(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Gl(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),wE(n.prevRanges,t.mapping),n.prevTime,n.prevComposition);{let a=t.getMeta("composition"),l=0==n.prevTime||!s&&n.prevComposition!=a&&(n.prevTime<(t.time||0)-i.newGroupDelay||!function x0e(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((i,r)=>{for(let o=0;o=e[o]&&(t=!0)}),t}(t,n.prevRanges)),c=s?wE(n.prevRanges,t.mapping):AV(t.mapping.maps[t.steps.length-1]);return new Gl(n.done.addTransform(t,l?e.selection.getBookmark():void 0,i,H0(e)),gs.empty,c,t.time,a??n.prevComposition)}}(t,i,e,n)},config:n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},props:{handleDOMEvents:{beforeinput(e,t){let i=t.inputType,r="historyUndo"==i?LV:"historyRedo"==i?RV:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const LV=(n,e)=>{let t=na.getState(n);return!(!t||0==t.done.eventCount||(e&&kV(t,n,e,!1),0))},RV=(n,e)=>{let t=na.getState(n);return!(!t||0==t.undone.eventCount||(e&&kV(t,n,e,!0),0))},O0e=vn.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:n,dispatch:e})=>LV(n,e),redo:()=>({state:n,dispatch:e})=>RV(n,e)}),addProseMirrorPlugins(){return[I0e(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-\u044f":()=>this.editor.commands.undo(),"Shift-Mod-\u044f":()=>this.editor.commands.redo()}}}),A0e=Rn.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:n}){return["hr",Xt(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{var i;if(t){const{$to:r}=e.selection,o=r.end();if(r.nodeAfter)e.setSelection(it.create(e.doc,r.pos));else{const s=null===(i=r.parent.type.contentMatch.defaultType)||void 0===i?void 0:i.create();s&&(e.insert(o,s),e.setSelection(it.create(e.doc,o)))}e.scrollIntoView()}return!0}).run()}},addInputRules(){return[h5({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),k0e=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,N0e=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,P0e=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,L0e=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,R0e=Or.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:n=>"normal"!==n.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:n}){return["em",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[ou({find:k0e,type:this.type}),ou({find:P0e,type:this.type})]},addPasteRules(){return[Ll({find:N0e,type:this.type}),Ll({find:L0e,type:this.type})]}}),F0e=Rn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",Xt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),j0e=Rn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",Xt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),FV=Or.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ob(n,this.type);return!!Object.entries(t).some(([,r])=>!!r)||e.unsetMark(this.name)}}}}),jV=/^(\d+)\.\s$/,z0e=Rn.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return 1===e?["ol",Xt(this.options.HTMLAttributes,t),0]:["ol",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(j0e.name,this.editor.getAttributes(FV.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=vm({find:jV,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=vm({find:jV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(FV.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),V0e=Rn.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:n}){return["p",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),B0e=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,U0e=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,H0e=Or.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("line-through")&&{}}],renderHTML({HTMLAttributes:n}){return["s",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[ou({find:B0e,type:this.type})]},addPasteRules(){return[Ll({find:U0e,type:this.type})]}}),$0e=Rn.create({name:"text",group:"inline"}),zV=vn.create({name:"starterKit",addExtensions(){var n,e,t,i,r,o,s,a,l,c,u,d,h,f,p,m,g,y;const v=[];return!1!==this.options.blockquote&&v.push(Kbe.configure(null===(n=this.options)||void 0===n?void 0:n.blockquote)),!1!==this.options.bold&&v.push(e0e.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.bulletList&&v.push(n0e.configure(null===(t=this.options)||void 0===t?void 0:t.bulletList)),!1!==this.options.code&&v.push(o0e.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&v.push(l0e.configure(null===(r=this.options)||void 0===r?void 0:r.codeBlock)),!1!==this.options.document&&v.push(c0e.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&v.push(h0e.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&v.push(b0e.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&v.push(w0e.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&v.push(C0e.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&v.push(O0e.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&v.push(A0e.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&v.push(R0e.configure(null===(h=this.options)||void 0===h?void 0:h.italic)),!1!==this.options.listItem&&v.push(F0e.configure(null===(f=this.options)||void 0===f?void 0:f.listItem)),!1!==this.options.orderedList&&v.push(z0e.configure(null===(p=this.options)||void 0===p?void 0:p.orderedList)),!1!==this.options.paragraph&&v.push(V0e.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&v.push(H0e.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&v.push($0e.configure(null===(y=this.options)||void 0===y?void 0:y.text)),v}});var zg=(()=>(function(n){n.TOP_INITIAL="40px",n.TOP_CURRENT="26px"}(zg||(zg={})),zg))();function W0e(n){return n.replace(/\p{L}+('\p{L}+)?/gu,function(e){return e.charAt(0).toUpperCase()+e.slice(1)})}const Y0e=vn.create({name:"dotPlaceholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new $t({key:new rn("dotPlaceholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=e,r=[];if(!t)return null;const o=n.type.createAndFill(),s=o?.sameMarkup(n)&&null===o.content.findDiffStart(n.content);return n.descendants((a,l)=>{if((i>=l&&i<=l+a.nodeSize||!this.options.showOnlyCurrent)&&!a.isLeaf&&!a.childCount){const d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);const h=Ei.widget(l,((n,e,t)=>{const i=document.createElement("button");i.classList.add("add-button"),i.style.position="absolute",i.style.left="-45px",i.style.top="-2px";const r=document.createElement("div");return r.style.position="relative",r.setAttribute("draggable","false"),0===n&&e.type.name===Wi.HEADING&&(i.style.top=zg.TOP_INITIAL),0!==n&&e.type.name===Wi.HEADING&&(i.style.top=zg.TOP_CURRENT),i.innerHTML='',i.setAttribute("draggable","false"),i.addEventListener("mousedown",o=>{o.preventDefault(),t.chain().insertContent("/").run()},{once:!0}),r.appendChild(i),r})(l,a,this.editor)),f=Ei.node(l,l+a.nodeSize,{class:d.join(" "),"data-placeholder":a.type.name===Wi.HEADING?`${W0e(a.type.name)} ${a.attrs.level}`:this.options.placeholder});r.push(f),r.push(h)}return this.options.includeChildren}),Ln.create(n,r)}}})]}});class Vg{constructor(){}}function q0e(n,e){if(1&n&&_e(0,"dot-editor-count-bar",4),2&n){const t=M(2);b("characterCount",t.characterCount)("charLimit",t.charLimit)("readingTime",t.readingTime)}}Vg.\u0275fac=function(e){return new(e||Vg)},Vg.\u0275cmp=xe({type:Vg,selectors:[["dot-editor-count-bar"]],inputs:{characterCount:"characterCount",charLimit:"charLimit",readingTime:"readingTime"},decls:8,vars:6,template:function(e,t){1&e&&(I(0,"span"),Te(1),A(),I(2,"span"),Te(3,"\u25cf"),A(),Te(4),I(5,"span"),Te(6,"\u25cf"),A(),Te(7)),2&e&&(es("error-message",t.charLimit&&t.characterCount.characters()>t.charLimit),C(1),Wy(" ",t.characterCount.characters(),"",t.charLimit?"/"+t.charLimit:""," chars\n"),C(3),Vi("\n",t.characterCount.words()," words\n"),C(3),Vi("\n",t.readingTime,"m read\n"))},styles:["[_nghost-%COMP%]{display:flex;justify-content:flex-end;align-items:flex-end;color:#afb3c0;margin-top:1rem;gap:.65rem;font-size:16px}[_nghost-%COMP%] .error-message[_ngcontent-%COMP%]{color:#d82b2e}"]});const K0e=function(n,e){return{"editor-wrapper--fullscreen":n,"editor-wrapper--default":e}},Q0e=function(n){return{"overflow-hidden":n}};function Z0e(n,e){if(1&n){const t=Qe();mt(0),I(1,"div",1)(2,"tiptap-editor",2),de("ngModelChange",function(r){return ge(t),ye(M().onChange(r))})("keyup",function(){return ge(t),ye(M().subject.next())}),A()(),E(3,q0e,1,3,"dot-editor-count-bar",3),gt()}if(2&n){const t=M();C(1),Yn(t.customStyles),b("ngClass",Mi(7,K0e,"true"===t.isFullscreen,"true"!==t.isFullscreen)),C(1),b("ngModel",t.content)("editor",t.editor)("ngClass",xt(10,Q0e,t.freezeScroll)),C(1),b("ngIf",t.showCharData)}}class Bg{constructor(e,t,i){this.injector=e,this.viewContainerRef=t,this.dotMarketingConfigService=i,this.lang=tg,this.displayCountBar=!0,this.customBlocks="",this.content="",this.isFullscreen=!1,this.valueChange=new ie,this.subject=new ae,this.freezeScroll=!0,this._allowedBlocks=["paragraph"],this._customNodes=new Map([["dotContent",Ipe(this.injector)],["image",Jr],["video",Ppe],["table",eye.extend({resizable:!0})],["aiContent",Rpe],["loader",Fpe]]),this.destroy$=new ae}set showVideoThumbnail(e){this.dotMarketingConfigService.setProperty(zp.SHOW_VIDEO_THUMBNAIL,e)}set allowedBlocks(e){const t=e?e.replace(/ /g,"").split(",").filter(Boolean):[];this._allowedBlocks=[...this._allowedBlocks,...t]}set value(e){"string"!=typeof e?this.setEditorJSONContent(e):this.content=(n=>{const e=new RegExp(/]*)>(.|\n)*?<\/p>/gm),t=new RegExp(/]*)>(.|\n)*?<\/h\d+>/gm),i=new RegExp(/]*)>(.|\n)*?<\/li>/gm),r=new RegExp(/<(ul|ol)(|\s+[^>]*)>(.|\n)*?<\/(ul|ol)>/gm);return n.replace(nue,o=>(n=>{const e=document.createElement("div");e.innerHTML=n;const t=e.querySelector("a").getAttribute("href"),i=e.querySelector("a").getAttribute("href"),r=e.querySelector("a").getAttribute("alt");return n.replace(/]*)>/gm,"").replace(//gm,"").replace(xS,o=>o.replace(/img/gm,`img href="${t}" title="${i}" alt="${r}"`))})(o)).replace(e,o=>Vb(o)).replace(t,o=>Vb(o)).replace(i,o=>Vb(o)).replace(r,o=>Vb(o))})(e)}get characterCount(){return this.editor?.storage.characterCount}get showCharData(){try{return JSON.parse(this.displayCountBar)}catch{return!0}}get readingTime(){return Math.ceil(this.characterCount.words()/265)}loadCustomBlocks(e){return su(function*(){return Promise.allSettled(e.map(function(){var t=su(function*(i){return import(i)});return function(i){return t.apply(this,arguments)}}()))})()}ngOnInit(){_t(this.getCustomRemoteExtensions()).pipe(Tt(1)).subscribe(e=>{this.editor=new oce({extensions:[...this.getEditorExtensions(),...this.getEditorMarks(),...this.getEditorNodes(),...e]}),this.editor.on("create",()=>this.updateCharCount()),this.subject.pipe(In(this.destroy$),Hd(250)).subscribe(()=>this.updateCharCount()),this.editor.on("transaction",({editor:t})=>{this.freezeScroll=mg.getState(t.view.state)?.freezeScroll})})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onChange(e){this.valueChange.emit(e)}updateCharCount(){const e=this.editor.state.tr.setMeta("addToHistory",!1);0!=this.characterCount.characters()?e.step(new du("charCount",this.characterCount.characters())).step(new du("wordCount",this.characterCount.words())).step(new du("readingTime",this.readingTime)):e.step(new Bb),this.editor.view.dispatch(e)}isValidSchema(e){oV(e,Du({extensions:aV(Du({url:Ag(),actions:cV(aV(Du({command:Ag(),menuLabel:Ag(),icon:Ag()})))}))}))}getParsedCustomBlocks(){if(!this.customBlocks?.length)return{extensions:[]};try{const t=JSON.parse(this.customBlocks);return this.isValidSchema(t),t}catch(t){return console.warn("JSON parse fails, please check the JSON format.",t),{extensions:[]}}}parsedCustomModules(e,t){return t.status===Vp.REJECTED&&console.warn("Failed to load the module",t.reason),t.status===Vp.FULFILLED?{...e,...t?.value}:{...e}}getCustomRemoteExtensions(){var e=this;return su(function*(){const t=e.getParsedCustomBlocks(),i=t?.extensions?.map(a=>a.url),r=yield e.loadCustomBlocks(i),o=[];t.extensions.forEach(a=>{o.push(...a.actions?.map(l=>l.name)||[])});const s=r.reduce(e.parsedCustomModules,{});return Object.values(s)})()}getEditorNodes(){return[this._allowedBlocks?.length>1?zV.configure(this.starterConfig()):zV,...this.getAllowedCustomNodes()]}starterConfig(){const i=["heading1","heading2","heading3","heading4","heading5","heading6"].filter(o=>this._allowedBlocks?.includes(o)).map(o=>+o.slice(-1)),r=["orderedList","bulletList","blockquote","codeBlock","horizontalRule"].filter(o=>!this._allowedBlocks?.includes(o)).reduce((o,s)=>({...o,[s]:!1}),{});return{heading:!!i?.length&&{levels:i,HTMLAttributes:{}},...r}}getAllowedCustomNodes(){const e=[];if(this._allowedBlocks.length<=1)return[...this._customNodes.values()];for(const t of this._allowedBlocks){const i=this._customNodes.get(t);i&&e.push(i)}return e}getEditorExtensions(){return[Gme({lang:this.lang,allowedContentTypes:this.allowedContentTypes,allowedBlocks:this._allowedBlocks,contentletIdentifier:this.contentletIdentifier}),Wme,Y0e.configure({placeholder:'Type "/" for commands'}),Ybe.configure({height:300,width:400,interfaceLanguage:"us",nocookie:!0,modestBranding:!0}),jbe,zbe,mue(this.viewContainerRef,this.getParsedCustomBlocks()),nye(this.viewContainerRef),bme(this.viewContainerRef,this.lang),$me(this.viewContainerRef),Nme(this.viewContainerRef),bye(this.viewContainerRef),Aye(this.viewContainerRef),Tye(this.viewContainerRef),uye(this.injector,this.viewContainerRef),Zme(this.viewContainerRef),Cue(this.viewContainerRef),Jme.extend({renderHTML({HTMLAttributes:n}){return["th",Xt(this.options.HTMLAttributes,n),["button",{class:"dot-cell-arrow"}],["p",0]]}}),Vbe,dye,pbe,zpe(this.injector,this.viewContainerRef)]}getEditorMarks(){return[Ube,Bbe.configure({types:["heading","paragraph","listItem","dotImage"]}),ybe.configure({HTMLAttributes:{style:"background: #accef7;"}}),Fbe.configure({autolink:!1,openOnClick:!1})]}setEditorJSONContent(e){this.content=this._allowedBlocks?.length>1?((n,e)=>{const t=(n=>n.reduce((e,t)=>C5[t]?{...e,...C5[t]}:{...e,[t]:!0},Jce))(this._allowedBlocks),i=Array.isArray(n)?[...n]:[...n.content];return D5(i,t)})(e):e}}Bg.\u0275fac=function(e){return new(e||Bg)(O(yr),O(Br),O(lu))},Bg.\u0275cmp=xe({type:Bg,selectors:[["dot-block-editor"]],inputs:{lang:"lang",allowedContentTypes:"allowedContentTypes",customStyles:"customStyles",displayCountBar:"displayCountBar",charLimit:"charLimit",customBlocks:"customBlocks",content:"content",contentletIdentifier:"contentletIdentifier",showVideoThumbnail:"showVideoThumbnail",isFullscreen:"isFullscreen",allowedBlocks:"allowedBlocks",value:"value"},outputs:{valueChange:"valueChange"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"editor-wrapper",3,"ngClass"],[3,"ngModel","editor","ngClass","ngModelChange","keyup"],[3,"characterCount","charLimit","readingTime",4,"ngIf"],[3,"characterCount","charLimit","readingTime"]],template:function(e,t){1&e&&E(0,Z0e,4,12,"ng-container",0),2&e&&b("ngIf",t.editor)},dependencies:[gi,nn,Cc,$_,Nh,Vg],styles:['[_nghost-%COMP%]{position:relative;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;height:100%;display:block}[_nghost-%COMP%] .editor-wrapper[_ngcontent-%COMP%]{display:block;border-radius:.25rem;overflow:hidden;position:relative;resize:vertical;outline:#afb3c0 solid 1px}[_nghost-%COMP%] .editor-wrapper--default[_ngcontent-%COMP%]{height:500px}[_nghost-%COMP%] .editor-wrapper--fullscreen[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]:focus-within{outline-color:var(--color-palette-primary-500)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] {display:block;height:100%;overflow-y:auto;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror{box-sizing:border-box;display:block;min-height:100%;outline:none;padding:16px 64px;font:16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror img{max-width:100%;max-height:100%;position:relative}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror img:before{align-items:center;background:#f3f3f4;border-radius:3px;border:1px solid #afb3c0;color:#6c7389;content:"The image URL " attr(src) " seems to be broken, please double check the URL.";display:flex;height:100%;left:0;padding:1rem;position:absolute;text-align:center;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol{padding-inline-start:16px;margin:0 0 0 16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol li{list-style-type:decimal}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul li{list-style-type:disc}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li{padding-top:4.576px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li p{padding:0;margin:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h1{font-size:38.88px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h2{font-size:30.88px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h3{font-size:25.12px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h4{font-size:20.64px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h5{font-size:17.12px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h6{font-size:16px;font-weight:700;font-style:normal}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h1, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h2, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h3, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h4, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h5, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h6{margin:48px 0 22.08px;line-height:1.3}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror p{font-size:16px;line-height:20.64px;padding-top:4.576px;margin-bottom:16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror p.is-empty{padding-top:4.576px;margin:0 0 5px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror blockquote{margin:16px;border-left:3px solid var(--color-palette-black-op-10);padding-left:16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre{background:#14151a;border-radius:8px;color:#fff;padding:12px 16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre code{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background:none;color:inherit;padding:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror .is-empty:before{color:#afb3c0;content:attr(data-placeholder);float:left;height:0;pointer-events:none}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror .add-button{all:unset;cursor:pointer;border:solid 1px #eee;width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:#666;background:#ffffff}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table td, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th{border:2px solid #afb3c0;box-sizing:border-box;min-width:1rem;padding:3px 20px 3px 5px;position:relative;vertical-align:top}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th{background-clip:padding-box}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table td>*, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th>*{margin-bottom:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th{background-color:#f3f3f4;font-weight:700;text-align:left}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .selectedCell{background-color:#ebecef}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .selectedCell:after{content:"";inset:0;pointer-events:none;position:absolute}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .column-resize-handle{bottom:-2px;position:absolute;right:-2px;pointer-events:none;top:0;width:4px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table p{margin:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .tableWrapper{padding:1rem 0;overflow-x:auto}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .resize-cursor{cursor:ew-resize;cursor:col-resize}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .dot-cell-arrow{position:absolute;display:none;top:3px;right:5px;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg);background:transparent;cursor:pointer;z-index:100}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .selectedCell .dot-cell-arrow{display:block}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table td.focus .dot-cell-arrow, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th.focus .dot-cell-arrow{display:block}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .video-container{margin-bottom:1rem;aspect-ratio:16/9;height:300px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .video-container video{width:100%;height:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .image-container{margin-bottom:1rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .image-container img{width:auto;max-height:300px;max-width:50%;padding:.5rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .image-container.ProseMirror-selectednode img{outline:1px solid var(--color-palette-primary-500)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ai-content-container.ProseMirror-selectednode{background-color:var(--color-palette-primary-op-20);border:1px solid var(--color-palette-primary-300)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .loader-style{display:flex;justify-content:center;flex-direction:column;align-items:center;min-height:12.5rem;min-width:25rem;width:25.5625rem;height:17.375rem;padding:.5rem;border-radius:.5rem;border:1.5px solid #d1d4db}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .p-progress-spinner{border:5px solid #ebecef;border-radius:50%;border-top:5px solid var(--color-palette-primary-500);width:2.4rem;height:2.4rem;animation:_ngcontent-%COMP%_spin 1s linear infinite}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%]{scrollbar-gutter:stable}[_nghost-%COMP%] .overflow-hidden[_ngcontent-%COMP%]{overflow-y:hidden}']});class ef{constructor(e){this.injector=e}ngDoBootstrap(){if(void 0===customElements.get("dotcms-block-editor")){const e=function BY(n,e){const t=function PY(n,e){return e.get(dc).resolveComponentFactory(n).inputs}(n,e.injector),i=e.strategyFactory||new jY(n,e.injector),r=function NY(n){const e={};return n.forEach(({propName:t,templateName:i})=>{e[function xY(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}(i)]=t}),e}(t);class o extends VY{get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=i.create(this.injector||e.injector);t.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const c=this[l];delete this[l],a.setInputValue(l,c)})}return this._ngElementStrategy}constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,u){this.ngElementStrategy.setInputValue(r[a],c)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return o.observedAttributes=Object.keys(r),t.forEach(({propName:s})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(a){this.ngElementStrategy.setInputValue(s,a)},configurable:!0,enumerable:!0})}),o}(Bg,{injector:this.injector});customElements.define("dotcms-block-editor",e)}}}ef.\u0275fac=function(e){return new(e||ef)(F(yr))},ef.\u0275mod=rt({type:ef}),ef.\u0275inj=wt({imports:[oP,zQ,zn,G_,Yh,mT,XM,iM]}),FG().bootstrapModule(ef).catch(n=>console.error(n))},10152:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k,V){for(var B=k<0?"-":"",G=Math.abs(k).toString();G.length{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k,V){if(null==k)throw new TypeError("assign requires that input parameter not be null or undefined");for(var B in V)Object.prototype.hasOwnProperty.call(V,B)&&(k[B]=V[B]);return k},q.exports=S.default},42926:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function B(G){return(0,V.default)({},G)};var V=k(x(32963));q.exports=S.default},73215:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(33338));S.default=V.default,q.exports=S.default},40150:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.getDefaultOptions=function k(){return x},S.setDefaultOptions=function V(B){x=B};var x={}},1635:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(90448)),B=k(x(71074)),G=k(x(23122)),H=k(x(8622)),R=k(x(68450)),P=k(x(10152)),Y=k(x(21393));function ze(Z,U){var W=Z>0?"-":"+",j=Math.abs(Z),z=Math.floor(j/60),he=j%60;if(0===he)return W+String(z);var Le=U||"";return W+String(z)+Le+(0,P.default)(he,2)}function me(Z,U){return Z%60==0?(Z>0?"-":"+")+(0,P.default)(Math.abs(Z)/60,2):je(Z,U)}function je(Z,U){var W=U||"",j=Z>0?"-":"+",z=Math.abs(Z);return j+(0,P.default)(Math.floor(z/60),2)+W+(0,P.default)(z%60,2)}S.default={G:function(U,W,j){var z=U.getUTCFullYear()>0?1:0;switch(W){case"G":case"GG":case"GGG":return j.era(z,{width:"abbreviated"});case"GGGGG":return j.era(z,{width:"narrow"});default:return j.era(z,{width:"wide"})}},y:function(U,W,j){if("yo"===W){var z=U.getUTCFullYear();return j.ordinalNumber(z>0?z:1-z,{unit:"year"})}return Y.default.y(U,W)},Y:function(U,W,j,z){var he=(0,R.default)(U,z),Le=he>0?he:1-he;return"YY"===W?(0,P.default)(Le%100,2):"Yo"===W?j.ordinalNumber(Le,{unit:"year"}):(0,P.default)(Le,W.length)},R:function(U,W){var j=(0,G.default)(U);return(0,P.default)(j,W.length)},u:function(U,W){var j=U.getUTCFullYear();return(0,P.default)(j,W.length)},Q:function(U,W,j){var z=Math.ceil((U.getUTCMonth()+1)/3);switch(W){case"Q":return String(z);case"QQ":return(0,P.default)(z,2);case"Qo":return j.ordinalNumber(z,{unit:"quarter"});case"QQQ":return j.quarter(z,{width:"abbreviated",context:"formatting"});case"QQQQQ":return j.quarter(z,{width:"narrow",context:"formatting"});default:return j.quarter(z,{width:"wide",context:"formatting"})}},q:function(U,W,j){var z=Math.ceil((U.getUTCMonth()+1)/3);switch(W){case"q":return String(z);case"qq":return(0,P.default)(z,2);case"qo":return j.ordinalNumber(z,{unit:"quarter"});case"qqq":return j.quarter(z,{width:"abbreviated",context:"standalone"});case"qqqqq":return j.quarter(z,{width:"narrow",context:"standalone"});default:return j.quarter(z,{width:"wide",context:"standalone"})}},M:function(U,W,j){var z=U.getUTCMonth();switch(W){case"M":case"MM":return Y.default.M(U,W);case"Mo":return j.ordinalNumber(z+1,{unit:"month"});case"MMM":return j.month(z,{width:"abbreviated",context:"formatting"});case"MMMMM":return j.month(z,{width:"narrow",context:"formatting"});default:return j.month(z,{width:"wide",context:"formatting"})}},L:function(U,W,j){var z=U.getUTCMonth();switch(W){case"L":return String(z+1);case"LL":return(0,P.default)(z+1,2);case"Lo":return j.ordinalNumber(z+1,{unit:"month"});case"LLL":return j.month(z,{width:"abbreviated",context:"standalone"});case"LLLLL":return j.month(z,{width:"narrow",context:"standalone"});default:return j.month(z,{width:"wide",context:"standalone"})}},w:function(U,W,j,z){var he=(0,H.default)(U,z);return"wo"===W?j.ordinalNumber(he,{unit:"week"}):(0,P.default)(he,W.length)},I:function(U,W,j){var z=(0,B.default)(U);return"Io"===W?j.ordinalNumber(z,{unit:"week"}):(0,P.default)(z,W.length)},d:function(U,W,j){return"do"===W?j.ordinalNumber(U.getUTCDate(),{unit:"date"}):Y.default.d(U,W)},D:function(U,W,j){var z=(0,V.default)(U);return"Do"===W?j.ordinalNumber(z,{unit:"dayOfYear"}):(0,P.default)(z,W.length)},E:function(U,W,j){var z=U.getUTCDay();switch(W){case"E":case"EE":case"EEE":return j.day(z,{width:"abbreviated",context:"formatting"});case"EEEEE":return j.day(z,{width:"narrow",context:"formatting"});case"EEEEEE":return j.day(z,{width:"short",context:"formatting"});default:return j.day(z,{width:"wide",context:"formatting"})}},e:function(U,W,j,z){var he=U.getUTCDay(),Le=(he-z.weekStartsOn+8)%7||7;switch(W){case"e":return String(Le);case"ee":return(0,P.default)(Le,2);case"eo":return j.ordinalNumber(Le,{unit:"day"});case"eee":return j.day(he,{width:"abbreviated",context:"formatting"});case"eeeee":return j.day(he,{width:"narrow",context:"formatting"});case"eeeeee":return j.day(he,{width:"short",context:"formatting"});default:return j.day(he,{width:"wide",context:"formatting"})}},c:function(U,W,j,z){var he=U.getUTCDay(),Le=(he-z.weekStartsOn+8)%7||7;switch(W){case"c":return String(Le);case"cc":return(0,P.default)(Le,W.length);case"co":return j.ordinalNumber(Le,{unit:"day"});case"ccc":return j.day(he,{width:"abbreviated",context:"standalone"});case"ccccc":return j.day(he,{width:"narrow",context:"standalone"});case"cccccc":return j.day(he,{width:"short",context:"standalone"});default:return j.day(he,{width:"wide",context:"standalone"})}},i:function(U,W,j){var z=U.getUTCDay(),he=0===z?7:z;switch(W){case"i":return String(he);case"ii":return(0,P.default)(he,W.length);case"io":return j.ordinalNumber(he,{unit:"day"});case"iii":return j.day(z,{width:"abbreviated",context:"formatting"});case"iiiii":return j.day(z,{width:"narrow",context:"formatting"});case"iiiiii":return j.day(z,{width:"short",context:"formatting"});default:return j.day(z,{width:"wide",context:"formatting"})}},a:function(U,W,j){var he=U.getUTCHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"});case"aaa":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return j.dayPeriod(he,{width:"narrow",context:"formatting"});default:return j.dayPeriod(he,{width:"wide",context:"formatting"})}},b:function(U,W,j){var he,z=U.getUTCHours();switch(he=12===z?"noon":0===z?"midnight":z/12>=1?"pm":"am",W){case"b":case"bb":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"});case"bbb":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return j.dayPeriod(he,{width:"narrow",context:"formatting"});default:return j.dayPeriod(he,{width:"wide",context:"formatting"})}},B:function(U,W,j){var he,z=U.getUTCHours();switch(he=z>=17?"evening":z>=12?"afternoon":z>=4?"morning":"night",W){case"B":case"BB":case"BBB":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"});case"BBBBB":return j.dayPeriod(he,{width:"narrow",context:"formatting"});default:return j.dayPeriod(he,{width:"wide",context:"formatting"})}},h:function(U,W,j){if("ho"===W){var z=U.getUTCHours()%12;return 0===z&&(z=12),j.ordinalNumber(z,{unit:"hour"})}return Y.default.h(U,W)},H:function(U,W,j){return"Ho"===W?j.ordinalNumber(U.getUTCHours(),{unit:"hour"}):Y.default.H(U,W)},K:function(U,W,j){var z=U.getUTCHours()%12;return"Ko"===W?j.ordinalNumber(z,{unit:"hour"}):(0,P.default)(z,W.length)},k:function(U,W,j){var z=U.getUTCHours();return 0===z&&(z=24),"ko"===W?j.ordinalNumber(z,{unit:"hour"}):(0,P.default)(z,W.length)},m:function(U,W,j){return"mo"===W?j.ordinalNumber(U.getUTCMinutes(),{unit:"minute"}):Y.default.m(U,W)},s:function(U,W,j){return"so"===W?j.ordinalNumber(U.getUTCSeconds(),{unit:"second"}):Y.default.s(U,W)},S:function(U,W){return Y.default.S(U,W)},X:function(U,W,j,z){var Le=(z._originalDate||U).getTimezoneOffset();if(0===Le)return"Z";switch(W){case"X":return me(Le);case"XXXX":case"XX":return je(Le);default:return je(Le,":")}},x:function(U,W,j,z){var Le=(z._originalDate||U).getTimezoneOffset();switch(W){case"x":return me(Le);case"xxxx":case"xx":return je(Le);default:return je(Le,":")}},O:function(U,W,j,z){var Le=(z._originalDate||U).getTimezoneOffset();switch(W){case"O":case"OO":case"OOO":return"GMT"+ze(Le,":");default:return"GMT"+je(Le,":")}},z:function(U,W,j,z){var Le=(z._originalDate||U).getTimezoneOffset();switch(W){case"z":case"zz":case"zzz":return"GMT"+ze(Le,":");default:return"GMT"+je(Le,":")}},t:function(U,W,j,z){var Le=Math.floor((z._originalDate||U).getTime()/1e3);return(0,P.default)(Le,W.length)},T:function(U,W,j,z){var Le=(z._originalDate||U).getTime();return(0,P.default)(Le,W.length)}},q.exports=S.default},21393:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(10152));S.default={y:function(R,P){var Y=R.getUTCFullYear(),X=Y>0?Y:1-Y;return(0,V.default)("yy"===P?X%100:X,P.length)},M:function(R,P){var Y=R.getUTCMonth();return"M"===P?String(Y+1):(0,V.default)(Y+1,2)},d:function(R,P){return(0,V.default)(R.getUTCDate(),P.length)},a:function(R,P){var Y=R.getUTCHours()/12>=1?"pm":"am";switch(P){case"a":case"aa":return Y.toUpperCase();case"aaa":return Y;case"aaaaa":return Y[0];default:return"am"===Y?"a.m.":"p.m."}},h:function(R,P){return(0,V.default)(R.getUTCHours()%12||12,P.length)},H:function(R,P){return(0,V.default)(R.getUTCHours(),P.length)},m:function(R,P){return(0,V.default)(R.getUTCMinutes(),P.length)},s:function(R,P){return(0,V.default)(R.getUTCSeconds(),P.length)},S:function(R,P){var Y=P.length,X=R.getUTCMilliseconds(),oe=Math.floor(X*Math.pow(10,Y-3));return(0,V.default)(oe,P.length)}},q.exports=S.default},75852:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var x=function(R,P){switch(R){case"P":return P.date({width:"short"});case"PP":return P.date({width:"medium"});case"PPP":return P.date({width:"long"});default:return P.date({width:"full"})}},k=function(R,P){switch(R){case"p":return P.time({width:"short"});case"pp":return P.time({width:"medium"});case"ppp":return P.time({width:"long"});default:return P.time({width:"full"})}};S.default={p:k,P:function(R,P){var ze,Y=R.match(/(P+)(p+)?/)||[],X=Y[1],oe=Y[2];if(!oe)return x(R,P);switch(X){case"P":ze=P.dateTime({width:"short"});break;case"PP":ze=P.dateTime({width:"medium"});break;case"PPP":ze=P.dateTime({width:"long"});break;default:ze=P.dateTime({width:"full"})}return ze.replace("{{date}}",x(X,P)).replace("{{time}}",k(oe,P))}},q.exports=S.default},47664:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){var V=new Date(Date.UTC(k.getFullYear(),k.getMonth(),k.getDate(),k.getHours(),k.getMinutes(),k.getSeconds(),k.getMilliseconds()));return V.setUTCFullYear(k.getFullYear()),k.getTime()-V.getTime()},q.exports=S.default},90448:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R){(0,B.default)(1,arguments);var P=(0,V.default)(R),Y=P.getTime();P.setUTCMonth(0,1),P.setUTCHours(0,0,0,0);var X=P.getTime(),oe=Y-X;return Math.floor(oe/G)+1};var V=k(x(90798)),B=k(x(61886)),G=864e5;q.exports=S.default},71074:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y){(0,H.default)(1,arguments);var X=(0,V.default)(Y),oe=(0,B.default)(X).getTime()-(0,G.default)(X).getTime();return Math.round(oe/R)+1};var V=k(x(90798)),B=k(x(96729)),G=k(x(50525)),H=k(x(61886)),R=6048e5;q.exports=S.default},23122:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R){(0,B.default)(1,arguments);var P=(0,V.default)(R),Y=P.getUTCFullYear(),X=new Date(0);X.setUTCFullYear(Y+1,0,4),X.setUTCHours(0,0,0,0);var oe=(0,G.default)(X),ze=new Date(0);ze.setUTCFullYear(Y,0,4),ze.setUTCHours(0,0,0,0);var me=(0,G.default)(ze);return P.getTime()>=oe.getTime()?Y+1:P.getTime()>=me.getTime()?Y:Y-1};var V=k(x(90798)),B=k(x(61886)),G=k(x(96729));q.exports=S.default},8622:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y,X){(0,H.default)(1,arguments);var oe=(0,V.default)(Y),ze=(0,B.default)(oe,X).getTime()-(0,G.default)(oe,X).getTime();return Math.round(ze/R)+1};var V=k(x(90798)),B=k(x(88314)),G=k(x(72447)),H=k(x(61886)),R=6048e5;q.exports=S.default},68450:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y,X){var oe,ze,me,je,ee,Z,U,W;(0,B.default)(1,arguments);var j=(0,V.default)(Y),z=j.getUTCFullYear(),he=(0,R.getDefaultOptions)(),Le=(0,H.default)(null!==(oe=null!==(ze=null!==(me=null!==(je=X?.firstWeekContainsDate)&&void 0!==je?je:null==X||null===(ee=X.locale)||void 0===ee||null===(Z=ee.options)||void 0===Z?void 0:Z.firstWeekContainsDate)&&void 0!==me?me:he.firstWeekContainsDate)&&void 0!==ze?ze:null===(U=he.locale)||void 0===U||null===(W=U.options)||void 0===W?void 0:W.firstWeekContainsDate)&&void 0!==oe?oe:1);if(!(Le>=1&&Le<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Se=new Date(0);Se.setUTCFullYear(z+1,0,Le),Se.setUTCHours(0,0,0,0);var Ee=(0,G.default)(Se,X),Ae=new Date(0);Ae.setUTCFullYear(z,0,Le),Ae.setUTCHours(0,0,0,0);var ve=(0,G.default)(Ae,X);return j.getTime()>=Ee.getTime()?z+1:j.getTime()>=ve.getTime()?z:z-1};var V=k(x(90798)),B=k(x(61886)),G=k(x(88314)),H=k(x(6092)),R=x(40150);q.exports=S.default},70183:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.isProtectedDayOfYearToken=function V(H){return-1!==x.indexOf(H)},S.isProtectedWeekYearToken=function B(H){return-1!==k.indexOf(H)},S.throwProtectedError=function G(H,R,P){if("YYYY"===H)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(R,"`) for formatting years to the input `").concat(P,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===H)throw new RangeError("Use `yy` instead of `YY` (in `".concat(R,"`) for formatting years to the input `").concat(P,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===H)throw new RangeError("Use `d` instead of `D` (in `".concat(R,"`) for formatting days of the month to the input `").concat(P,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===H)throw new RangeError("Use `dd` instead of `DD` (in `".concat(R,"`) for formatting days of the month to the input `").concat(P,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))};var x=["D","DD"],k=["YY","YYYY"]},61886:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k,V){if(V.length1?"s":"")+" required, but only "+V.length+" present")},q.exports=S.default},96729:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function G(H){(0,B.default)(1,arguments);var R=1,P=(0,V.default)(H),Y=P.getUTCDay(),X=(Y{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R){(0,G.default)(1,arguments);var P=(0,V.default)(R),Y=new Date(0);Y.setUTCFullYear(P,0,4),Y.setUTCHours(0,0,0,0);var X=(0,B.default)(Y);return X};var V=k(x(23122)),B=k(x(96729)),G=k(x(61886));q.exports=S.default},88314:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function R(P,Y){var X,oe,ze,me,je,ee,Z,U;(0,B.default)(1,arguments);var W=(0,H.getDefaultOptions)(),j=(0,G.default)(null!==(X=null!==(oe=null!==(ze=null!==(me=Y?.weekStartsOn)&&void 0!==me?me:null==Y||null===(je=Y.locale)||void 0===je||null===(ee=je.options)||void 0===ee?void 0:ee.weekStartsOn)&&void 0!==ze?ze:W.weekStartsOn)&&void 0!==oe?oe:null===(Z=W.locale)||void 0===Z||null===(U=Z.options)||void 0===U?void 0:U.weekStartsOn)&&void 0!==X?X:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var z=(0,V.default)(P),he=z.getUTCDay(),Le=(he{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y,X){var oe,ze,me,je,ee,Z,U,W;(0,B.default)(1,arguments);var j=(0,R.getDefaultOptions)(),z=(0,H.default)(null!==(oe=null!==(ze=null!==(me=null!==(je=X?.firstWeekContainsDate)&&void 0!==je?je:null==X||null===(ee=X.locale)||void 0===ee||null===(Z=ee.options)||void 0===Z?void 0:Z.firstWeekContainsDate)&&void 0!==me?me:j.firstWeekContainsDate)&&void 0!==ze?ze:null===(U=j.locale)||void 0===U||null===(W=U.options)||void 0===W?void 0:W.firstWeekContainsDate)&&void 0!==oe?oe:1),he=(0,V.default)(Y,X),Le=new Date(0);Le.setUTCFullYear(he,0,z),Le.setUTCHours(0,0,0,0);var Se=(0,G.default)(Le,X);return Se};var V=k(x(68450)),B=k(x(61886)),G=k(x(88314)),H=k(x(6092)),R=x(40150);q.exports=S.default},6092:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){if(null===k||!0===k||!1===k)return NaN;var V=Number(k);return isNaN(V)?V:V<0?Math.ceil(V):Math.floor(V)},q.exports=S.default},50405:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R,P){(0,G.default)(2,arguments);var Y=(0,B.default)(R).getTime(),X=(0,V.default)(P);return new Date(Y+X)};var V=k(x(6092)),B=k(x(90798)),G=k(x(61886));q.exports=S.default},61348:(q,S,x)=>{"use strict";x.r(S),x.d(S,{default:()=>wo});var k={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function G(Be){return function(){var Ft=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},dt=Ft.width?String(Ft.width):Be.defaultWidth,Vt=Be.formats[dt]||Be.formats[Be.defaultWidth];return Vt}}var Y={date:G({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:G({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:G({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},oe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function je(Be){return function(Ft,dt){var Sn;if("formatting"===(null!=dt&&dt.context?String(dt.context):"standalone")&&Be.formattingValues){var oi=Be.defaultFormattingWidth||Be.defaultWidth,Fi=null!=dt&&dt.width?String(dt.width):oi;Sn=Be.formattingValues[Fi]||Be.formattingValues[oi]}else{var Pr=Be.defaultWidth,_t=null!=dt&&dt.width?String(dt.width):Be.defaultWidth;Sn=Be.values[_t]||Be.values[Pr]}return Sn[Be.argumentCallback?Be.argumentCallback(Ft):Ft]}}function Ee(Be){return function(Ft){var dt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Vt=dt.width,Sn=Vt&&Be.matchPatterns[Vt]||Be.matchPatterns[Be.defaultMatchWidth],oi=Ft.match(Sn);if(!oi)return null;var Vn,Fi=oi[0],Pr=Vt&&Be.parsePatterns[Vt]||Be.parsePatterns[Be.defaultParseWidth],_t=Array.isArray(Pr)?ve(Pr,function(Yo){return Yo.test(Fi)}):Ae(Pr,function(Yo){return Yo.test(Fi)});Vn=Be.valueCallback?Be.valueCallback(_t):_t,Vn=dt.valueCallback?dt.valueCallback(Vn):Vn;var aa=Ft.slice(Fi.length);return{value:Vn,rest:aa}}}function Ae(Be,Ft){for(var dt in Be)if(Be.hasOwnProperty(dt)&&Ft(Be[dt]))return dt}function ve(Be,Ft){for(var dt=0;dt0?"in "+Sn:Sn+" ago":Sn},formatLong:Y,formatRelative:function(Ft,dt,Vt,Sn){return oe[Ft]},localize:{ordinalNumber:function(Ft,dt){var Vt=Number(Ft),Sn=Vt%100;if(Sn>20||Sn<10)switch(Sn%10){case 1:return Vt+"st";case 2:return Vt+"nd";case 3:return Vt+"rd"}return Vt+"th"},era:je({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:je({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(Ft){return Ft-1}}),month:je({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:je({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:je({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:function qe(Be){return function(Ft){var dt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Vt=Ft.match(Be.matchPattern);if(!Vt)return null;var Sn=Vt[0],oi=Ft.match(Be.parsePattern);if(!oi)return null;var Fi=Be.valueCallback?Be.valueCallback(oi[0]):oi[0];Fi=dt.valueCallback?dt.valueCallback(Fi):Fi;var Pr=Ft.slice(Sn.length);return{value:Fi,rest:Pr}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(Ft){return parseInt(Ft,10)}}),era:Ee({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ee({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(Ft){return Ft+1}}),month:Ee({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Ee({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Ee({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}}},27868:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function j(he,Le,Se){var Ee,Ae,ve,qe,yt,ae,Ii,vi,ue,Nr,qi,Ri,ia,ra,bo,$a,oa,un;(0,oe.default)(2,arguments);var sa=String(Le),wo=(0,ze.getDefaultOptions)(),Be=null!==(Ee=null!==(Ae=Se?.locale)&&void 0!==Ae?Ae:wo.locale)&&void 0!==Ee?Ee:me.default,Ft=(0,X.default)(null!==(ve=null!==(qe=null!==(yt=null!==(ae=Se?.firstWeekContainsDate)&&void 0!==ae?ae:null==Se||null===(Ii=Se.locale)||void 0===Ii||null===(vi=Ii.options)||void 0===vi?void 0:vi.firstWeekContainsDate)&&void 0!==yt?yt:wo.firstWeekContainsDate)&&void 0!==qe?qe:null===(ue=wo.locale)||void 0===ue||null===(Nr=ue.options)||void 0===Nr?void 0:Nr.firstWeekContainsDate)&&void 0!==ve?ve:1);if(!(Ft>=1&&Ft<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var dt=(0,X.default)(null!==(qi=null!==(Ri=null!==(ia=null!==(ra=Se?.weekStartsOn)&&void 0!==ra?ra:null==Se||null===(bo=Se.locale)||void 0===bo||null===($a=bo.options)||void 0===$a?void 0:$a.weekStartsOn)&&void 0!==ia?ia:wo.weekStartsOn)&&void 0!==Ri?Ri:null===(oa=wo.locale)||void 0===oa||null===(un=oa.options)||void 0===un?void 0:un.weekStartsOn)&&void 0!==qi?qi:0);if(!(dt>=0&&dt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Be.localize)throw new RangeError("locale must contain localize property");if(!Be.formatLong)throw new RangeError("locale must contain formatLong property");var Vt=(0,G.default)(he);if(!(0,V.default)(Vt))throw new RangeError("Invalid time value");var Sn=(0,P.default)(Vt),oi=(0,B.default)(Vt,Sn),Fi={firstWeekContainsDate:Ft,weekStartsOn:dt,locale:Be,_originalDate:Vt},Pr=sa.match(ee).map(function(_t){var Vn=_t[0];return"p"===Vn||"P"===Vn?(0,R.default[Vn])(_t,Be.formatLong):_t}).join("").match(je).map(function(_t){if("''"===_t)return"'";var Vn=_t[0];if("'"===Vn)return z(_t);var aa=H.default[Vn];if(aa)return!(null!=Se&&Se.useAdditionalWeekYearTokens)&&(0,Y.isProtectedWeekYearToken)(_t)&&(0,Y.throwProtectedError)(_t,Le,String(he)),!(null!=Se&&Se.useAdditionalDayOfYearTokens)&&(0,Y.isProtectedDayOfYearToken)(_t)&&(0,Y.throwProtectedError)(_t,Le,String(he)),aa(oi,_t,Be.localize,Fi);if(Vn.match(W))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Vn+"`");return _t}).join("");return Pr};var V=k(x(88830)),B=k(x(65726)),G=k(x(90798)),H=k(x(1635)),R=k(x(75852)),P=k(x(47664)),Y=x(70183),X=k(x(6092)),oe=k(x(61886)),ze=x(40150),me=k(x(73215)),je=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Z=/^'([^]*?)'?$/,U=/''/g,W=/[a-zA-Z]/;function z(he){var Le=he.match(Z);return Le?Le[1].replace(U,"'"):he}q.exports=S.default},73085:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function G(H){return(0,B.default)(1,arguments),H instanceof Date||"object"===(0,V.default)(H)&&"[object Date]"===Object.prototype.toString.call(H)};var V=k(x(50590)),B=k(x(61886));q.exports=S.default},88830:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R){if((0,G.default)(1,arguments),!(0,V.default)(R)&&"number"!=typeof R)return!1;var P=(0,B.default)(R);return!isNaN(Number(P))};var V=k(x(73085)),B=k(x(90798)),G=k(x(61886));q.exports=S.default},88995:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){return function(){var V=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},B=V.width?String(V.width):k.defaultWidth,G=k.formats[B]||k.formats[k.defaultWidth];return G}},q.exports=S.default},77579:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){return function(V,B){var H;if("formatting"===(null!=B&&B.context?String(B.context):"standalone")&&k.formattingValues){var R=k.defaultFormattingWidth||k.defaultWidth,P=null!=B&&B.width?String(B.width):R;H=k.formattingValues[P]||k.formattingValues[R]}else{var Y=k.defaultWidth,X=null!=B&&B.width?String(B.width):k.defaultWidth;H=k.values[X]||k.values[Y]}return H[k.argumentCallback?k.argumentCallback(V):V]}},q.exports=S.default},84728:(q,S)=>{"use strict";function k(B,G){for(var H in B)if(B.hasOwnProperty(H)&&G(B[H]))return H}function V(B,G){for(var H=0;H1&&void 0!==arguments[1]?arguments[1]:{},R=H.width,P=R&&B.matchPatterns[R]||B.matchPatterns[B.defaultMatchWidth],Y=G.match(P);if(!Y)return null;var me,X=Y[0],oe=R&&B.parsePatterns[R]||B.parsePatterns[B.defaultParseWidth],ze=Array.isArray(oe)?V(oe,function(ee){return ee.test(X)}):k(oe,function(ee){return ee.test(X)});me=B.valueCallback?B.valueCallback(ze):ze,me=H.valueCallback?H.valueCallback(me):me;var je=G.slice(X.length);return{value:me,rest:je}}},q.exports=S.default},27223:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){return function(V){var B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},G=V.match(k.matchPattern);if(!G)return null;var H=G[0],R=V.match(k.parsePattern);if(!R)return null;var P=k.valueCallback?k.valueCallback(R[0]):R[0];P=B.valueCallback?B.valueCallback(P):P;var Y=V.slice(H.length);return{value:P,rest:Y}}},q.exports=S.default},39563:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var x={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};S.default=function(G,H,R){var P,Y=x[G];return P="string"==typeof Y?Y:1===H?Y.one:Y.other.replace("{{count}}",H.toString()),null!=R&&R.addSuffix?R.comparison&&R.comparison>0?"in "+P:P+" ago":P},q.exports=S.default},66929:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(88995)),R={date:(0,V.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,V.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,V.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};S.default=R,q.exports=S.default},21656:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var x={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};S.default=function(G,H,R,P){return x[G]},q.exports=S.default},31098:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(77579)),oe={ordinalNumber:function(je,ee){var Z=Number(je),U=Z%100;if(U>20||U<10)switch(U%10){case 1:return Z+"st";case 2:return Z+"nd";case 3:return Z+"rd"}return Z+"th"},era:(0,V.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,V.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(je){return je-1}}),month:(0,V.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,V.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,V.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};S.default=oe,q.exports=S.default},53239:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(84728)),U={ordinalNumber:(0,k(x(27223)).default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(z){return parseInt(z,10)}}),era:(0,V.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,V.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(z){return z+1}}),month:(0,V.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,V.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,V.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};S.default=U,q.exports=S.default},33338:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(39563)),B=k(x(66929)),G=k(x(21656)),H=k(x(31098)),R=k(x(53239));S.default={code:"en-US",formatDistance:V.default,formatLong:B.default,formatRelative:G.default,localize:H.default,match:R.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},q.exports=S.default},65726:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R,P){(0,B.default)(2,arguments);var Y=(0,G.default)(P);return(0,V.default)(R,-Y)};var V=k(x(50405)),B=k(x(61886)),G=k(x(6092));q.exports=S.default},90798:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function G(H){(0,B.default)(1,arguments);var R=Object.prototype.toString.call(H);return H instanceof Date||"object"===(0,V.default)(H)&&"[object Date]"===R?new Date(H.getTime()):"number"==typeof H||"[object Number]"===R?new Date(H):(("string"==typeof H||"[object String]"===R)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))};var V=k(x(50590)),B=k(x(61886));q.exports=S.default},88222:(q,S,x)=>{q=x.nmd(q);var V="__lodash_hash_undefined__",H=9007199254740991,R="[object Arguments]",P="[object Array]",X="[object Boolean]",oe="[object Date]",ze="[object Error]",me="[object Function]",ee="[object Map]",Z="[object Number]",W="[object Object]",j="[object Promise]",he="[object RegExp]",Le="[object Set]",Se="[object String]",ve="[object WeakMap]",qe="[object ArrayBuffer]",yt="[object DataView]",$a=/^\[object .+?Constructor\]$/,oa=/^(?:0|[1-9]\d*)$/,un={};un["[object Float32Array]"]=un["[object Float64Array]"]=un["[object Int8Array]"]=un["[object Int16Array]"]=un["[object Int32Array]"]=un["[object Uint8Array]"]=un["[object Uint8ClampedArray]"]=un["[object Uint16Array]"]=un["[object Uint32Array]"]=!0,un[R]=un[P]=un[qe]=un[X]=un[yt]=un[oe]=un[ze]=un[me]=un[ee]=un[Z]=un[W]=un[he]=un[Le]=un[Se]=un[ve]=!1;var sa="object"==typeof global&&global&&global.Object===Object&&global,wo="object"==typeof self&&self&&self.Object===Object&&self,Be=sa||wo||Function("return this")(),Ft=S&&!S.nodeType&&S,dt=Ft&&q&&!q.nodeType&&q,Vt=dt&&dt.exports===Ft,Sn=Vt&&sa.process,oi=function(){try{return Sn&&Sn.binding&&Sn.binding("util")}catch{}}(),Fi=oi&&oi.isTypedArray;function Vn(D,L){for(var te=-1,Ce=null==D?0:D.length;++teXn))return!1;var tn=lt.get(D);if(tn&<.get(L))return tn==L;var bi=-1,no=!0,xe=2&te?new Gt:void 0;for(lt.set(D,L),lt.set(L,D);++bi-1},qo.prototype.set=function kE(D,L){var te=this.__data__,Ce=ju(te,D);return Ce<0?(++this.size,te.push([D,L])):te[Ce][1]=L,this},Ya.prototype.clear=function iw(){this.size=0,this.__data__={hash:new da,map:new(ca||qo),string:new da}},Ya.prototype.delete=function NE(D){var L=dn(this,D).delete(D);return this.size-=L?1:0,L},Ya.prototype.get=function rw(D){return dn(this,D).get(D)},Ya.prototype.has=function PE(D){return dn(this,D).has(D)},Ya.prototype.set=function Lr(D,L){var te=dn(this,D),Ce=te.size;return te.set(D,L),this.size+=te.size==Ce?0:1,this},Gt.prototype.add=Gt.prototype.push=function LE(D){return this.__data__.set(D,V),this},Gt.prototype.has=function RE(D){return this.__data__.has(D)},ha.prototype.clear=function $(){this.__data__=new qo,this.size=0},ha.prototype.delete=function FE(D){var L=this.__data__,te=L.delete(D);return this.size=L.size,te},ha.prototype.get=function wt(D){return this.__data__.get(D)},ha.prototype.has=function Fu(D){return this.__data__.has(D)},ha.prototype.set=function ow(D,L){var te=this.__data__;if(te instanceof qo){var Ce=te.__data__;if(!ca||Ce.length<199)return Ce.push([D,L]),this.size=++te.size,this;te=this.__data__=new Ya(Ce)}return te.set(D,L),this.size=te.size,this};var zE=Qg?function(D){return null==D?[]:(D=Object(D),function Pr(D,L){for(var te=-1,Ce=null==D?0:D.length,Ge=0,lt=[];++te-1&&D%1==0&&D-1&&D%1==0&&D<=H}function Za(D){var L=typeof D;return null!=D&&("object"==L||"function"==L)}function tc(D){return null!=D&&"object"==typeof D}var ty=Fi?function Yo(D){return function(L){return D(L)}}(Fi):function Ze(D){return tc(D)&&Hu(D.length)&&!!un[qa(D)]};function hw(D){return function F(D){return null!=D&&Hu(D.length)&&!ec(D)}(D)?function Zg(D,L){var te=Bu(D),Ce=!te&&Qa(D),Ge=!te&&!Ce&&Uu(D),lt=!te&&!Ce&&!Ge&&ty(D),An=te||Ce||Ge||lt,Xn=An?function aa(D,L){for(var te=-1,Ce=Array(D);++te{var k={"./ar-DZ/_lib/formatDistance/index.js":[28066,8592],"./ar-DZ/_lib/formatLong/index.js":[86369,8592],"./ar-DZ/_lib/formatRelative/index.js":[89786,8592],"./ar-DZ/_lib/localize/index.js":[36207,8592],"./ar-DZ/_lib/match/index.js":[53371,8592],"./ar-DZ/index.js":[76327,8592,6327],"./ar-EG/_lib/formatDistance/index.js":[95932,8592],"./ar-EG/_lib/formatLong/index.js":[46023,8592],"./ar-EG/_lib/formatRelative/index.js":[74621,8592],"./ar-EG/_lib/localize/index.js":[93376,8592],"./ar-EG/_lib/match/index.js":[76456,8592],"./ar-EG/index.js":[30830,8592,830],"./ar-MA/_lib/formatDistance/index.js":[25565,8592],"./ar-MA/_lib/formatLong/index.js":[81783,8592],"./ar-MA/_lib/formatRelative/index.js":[90030,8592],"./ar-MA/_lib/localize/index.js":[60503,8592],"./ar-MA/_lib/match/index.js":[83427,8592],"./ar-MA/index.js":[96094,8592,6094],"./ar-SA/_lib/formatDistance/index.js":[3797,8592],"./ar-SA/_lib/formatLong/index.js":[73212,8592],"./ar-SA/_lib/formatRelative/index.js":[79009,8592],"./ar-SA/_lib/localize/index.js":[12535,8592],"./ar-SA/_lib/match/index.js":[14710,8592],"./ar-SA/index.js":[54370,8592,4370],"./ar-TN/_lib/formatDistance/index.js":[56566,8592],"./ar-TN/_lib/formatLong/index.js":[4585,8592],"./ar-TN/_lib/formatRelative/index.js":[5374,8592],"./ar-TN/_lib/localize/index.js":[85963,8592],"./ar-TN/_lib/match/index.js":[13401,8592],"./ar-TN/index.js":[37373,8592,7373],"./be-tarask/_lib/formatDistance/index.js":[82665,8592],"./be-tarask/_lib/formatLong/index.js":[9662,8592],"./be-tarask/_lib/formatRelative/index.js":[4653,4,8592],"./be-tarask/_lib/localize/index.js":[40591,8592],"./be-tarask/_lib/match/index.js":[34412,8592],"./be-tarask/index.js":[27840,4,8592,7840],"./de-AT/_lib/localize/index.js":[44821,8592],"./de-AT/index.js":[21782,8592,1782],"./en-AU/_lib/formatLong/index.js":[65493,8592],"./en-AU/index.js":[87747,8592,7747],"./en-CA/_lib/formatDistance/index.js":[80780,8592],"./en-CA/_lib/formatLong/index.js":[26153,8592],"./en-CA/index.js":[21413,8592,1413],"./en-GB/_lib/formatLong/index.js":[33819,8592],"./en-GB/index.js":[33035,8592,3035],"./en-IE/index.js":[61959,8592,1959],"./en-IN/_lib/formatLong/index.js":[20862,8592],"./en-IN/index.js":[82873,8592,2873],"./en-NZ/_lib/formatLong/index.js":[36336,8592],"./en-NZ/index.js":[26041,8592,6041],"./en-US/_lib/formatDistance/index.js":[39563],"./en-US/_lib/formatLong/index.js":[66929],"./en-US/_lib/formatRelative/index.js":[21656],"./en-US/_lib/localize/index.js":[31098],"./en-US/_lib/match/index.js":[53239],"./en-US/index.js":[33338],"./en-ZA/_lib/formatLong/index.js":[9221,8592],"./en-ZA/index.js":[11543,8592,1543],"./fa-IR/_lib/formatDistance/index.js":[76726,8592],"./fa-IR/_lib/formatLong/index.js":[10749,8592],"./fa-IR/_lib/formatRelative/index.js":[7220,8592],"./fa-IR/_lib/localize/index.js":[72441,8592],"./fa-IR/_lib/match/index.js":[81488,8592],"./fa-IR/index.js":[84996,8592,4996],"./fr-CA/_lib/formatLong/index.js":[85947,8592],"./fr-CA/index.js":[73723,8592,3723],"./fr-CH/_lib/formatLong/index.js":[27414,8592],"./fr-CH/_lib/formatRelative/index.js":[66155,8592],"./fr-CH/index.js":[24565,8592,4565],"./it-CH/_lib/formatLong/index.js":[31519,8592],"./it-CH/index.js":[87736,8592,469],"./ja-Hira/_lib/formatDistance/index.js":[84703,8592],"./ja-Hira/_lib/formatLong/index.js":[56574,8592],"./ja-Hira/_lib/formatRelative/index.js":[93381,8592],"./ja-Hira/_lib/localize/index.js":[35710,8592],"./ja-Hira/_lib/match/index.js":[69417,8592],"./ja-Hira/index.js":[12944,8592,2944],"./nl-BE/_lib/formatDistance/index.js":[16129,8592],"./nl-BE/_lib/formatLong/index.js":[17657,8592],"./nl-BE/_lib/formatRelative/index.js":[89811,8592],"./nl-BE/_lib/localize/index.js":[58816,8592],"./nl-BE/_lib/match/index.js":[28333,8592],"./nl-BE/index.js":[70296,8592,296],"./pt-BR/_lib/formatDistance/index.js":[52638,8592],"./pt-BR/_lib/formatLong/index.js":[33247,8592],"./pt-BR/_lib/formatRelative/index.js":[25492,8592],"./pt-BR/_lib/localize/index.js":[81046,8592],"./pt-BR/_lib/match/index.js":[63770,8592],"./pt-BR/index.js":[47569,8592,7569],"./sr-Latn/_lib/formatDistance/index.js":[69014,8592],"./sr-Latn/_lib/formatLong/index.js":[99257,8592],"./sr-Latn/_lib/formatRelative/index.js":[42428,8592],"./sr-Latn/_lib/localize/index.js":[92773,8592],"./sr-Latn/_lib/match/index.js":[7766,8592],"./sr-Latn/index.js":[99064,8592,9064],"./uz-Cyrl/_lib/formatDistance/index.js":[67778,8592],"./uz-Cyrl/_lib/formatLong/index.js":[64095,8592],"./uz-Cyrl/_lib/formatRelative/index.js":[83734,8592],"./uz-Cyrl/_lib/localize/index.js":[17670,8592],"./uz-Cyrl/_lib/match/index.js":[75798,8592],"./uz-Cyrl/index.js":[14527,8592,4527],"./zh-CN/_lib/formatDistance/index.js":[33437,8592],"./zh-CN/_lib/formatLong/index.js":[91583,8592],"./zh-CN/_lib/formatRelative/index.js":[95629,8592,5441],"./zh-CN/_lib/localize/index.js":[17939,8592],"./zh-CN/_lib/match/index.js":[71362,8592],"./zh-CN/index.js":[86335,8592,2007],"./zh-HK/_lib/formatDistance/index.js":[37348,8592],"./zh-HK/_lib/formatLong/index.js":[60924,8592],"./zh-HK/_lib/formatRelative/index.js":[22164,8592],"./zh-HK/_lib/localize/index.js":[39264,8592],"./zh-HK/_lib/match/index.js":[50358,8592],"./zh-HK/index.js":[59277,8592,9277],"./zh-TW/_lib/formatDistance/index.js":[31613,8592],"./zh-TW/_lib/formatLong/index.js":[1239,8592],"./zh-TW/_lib/formatRelative/index.js":[13240,8592],"./zh-TW/_lib/localize/index.js":[29850,8592],"./zh-TW/_lib/match/index.js":[38819,8592],"./zh-TW/index.js":[74565,8592,3793]};function V(B){if(!x.o(k,B))return Promise.resolve().then(()=>{var R=new Error("Cannot find module '"+B+"'");throw R.code="MODULE_NOT_FOUND",R});var G=k[B],H=G[0];return Promise.all(G.slice(1).map(x.e)).then(()=>x.t(H,23))}V.keys=()=>Object.keys(k),V.id=13131,q.exports=V},71213:(q,S,x)=>{var k={"./_lib/buildFormatLongFn/index.js":[88995,7],"./_lib/buildLocalizeFn/index.js":[77579,7],"./_lib/buildMatchFn/index.js":[84728,7],"./_lib/buildMatchPatternFn/index.js":[27223,7],"./af/_lib/formatDistance/index.js":[55864,7,8592],"./af/_lib/formatLong/index.js":[25358,7,8592],"./af/_lib/formatRelative/index.js":[25892,7,8592],"./af/_lib/localize/index.js":[18874,7,8592],"./af/_lib/match/index.js":[22146,7,8592],"./af/index.js":[72399,7,8592,2399],"./ar-DZ/_lib/formatDistance/index.js":[28066,7,8592],"./ar-DZ/_lib/formatLong/index.js":[86369,7,8592],"./ar-DZ/_lib/formatRelative/index.js":[89786,7,8592],"./ar-DZ/_lib/localize/index.js":[36207,7,8592],"./ar-DZ/_lib/match/index.js":[53371,7,8592],"./ar-DZ/index.js":[76327,7,8592,6327],"./ar-EG/_lib/formatDistance/index.js":[95932,7,8592],"./ar-EG/_lib/formatLong/index.js":[46023,7,8592],"./ar-EG/_lib/formatRelative/index.js":[74621,7,8592],"./ar-EG/_lib/localize/index.js":[93376,7,8592],"./ar-EG/_lib/match/index.js":[76456,7,8592],"./ar-EG/index.js":[30830,7,8592,830],"./ar-MA/_lib/formatDistance/index.js":[25565,7,8592],"./ar-MA/_lib/formatLong/index.js":[81783,7,8592],"./ar-MA/_lib/formatRelative/index.js":[90030,7,8592],"./ar-MA/_lib/localize/index.js":[60503,7,8592],"./ar-MA/_lib/match/index.js":[83427,7,8592],"./ar-MA/index.js":[96094,7,8592,6094],"./ar-SA/_lib/formatDistance/index.js":[3797,7,8592],"./ar-SA/_lib/formatLong/index.js":[73212,7,8592],"./ar-SA/_lib/formatRelative/index.js":[79009,7,8592],"./ar-SA/_lib/localize/index.js":[12535,7,8592],"./ar-SA/_lib/match/index.js":[14710,7,8592],"./ar-SA/index.js":[54370,7,8592,4370],"./ar-TN/_lib/formatDistance/index.js":[56566,7,8592],"./ar-TN/_lib/formatLong/index.js":[4585,7,8592],"./ar-TN/_lib/formatRelative/index.js":[5374,7,8592],"./ar-TN/_lib/localize/index.js":[85963,7,8592],"./ar-TN/_lib/match/index.js":[13401,7,8592],"./ar-TN/index.js":[37373,7,8592,7373],"./ar/_lib/formatDistance/index.js":[91118,7,8592],"./ar/_lib/formatLong/index.js":[90899,7,8592],"./ar/_lib/formatRelative/index.js":[18739,7,8592],"./ar/_lib/localize/index.js":[64620,7,8592],"./ar/_lib/match/index.js":[32101,7,8592],"./ar/index.js":[91780,7,8592,1780],"./az/_lib/formatDistance/index.js":[2541,7,8592],"./az/_lib/formatLong/index.js":[6246,7,8592],"./az/_lib/formatRelative/index.js":[33557,7,8592],"./az/_lib/localize/index.js":[89347,7,8592],"./az/_lib/match/index.js":[75242,7,8592],"./az/index.js":[170,7,8592,170],"./be-tarask/_lib/formatDistance/index.js":[82665,7,8592],"./be-tarask/_lib/formatLong/index.js":[9662,7,8592],"./be-tarask/_lib/formatRelative/index.js":[4653,7,4,8592],"./be-tarask/_lib/localize/index.js":[40591,7,8592],"./be-tarask/_lib/match/index.js":[34412,7,8592],"./be-tarask/index.js":[27840,7,4,8592,7840],"./be/_lib/formatDistance/index.js":[9006,7,8592],"./be/_lib/formatLong/index.js":[58343,7,8592],"./be/_lib/formatRelative/index.js":[20369,7,4,8592],"./be/_lib/localize/index.js":[30768,7,8592],"./be/_lib/match/index.js":[35637,7,8592],"./be/index.js":[94646,7,4,8592,4646],"./bg/_lib/formatDistance/index.js":[54037,7,8592],"./bg/_lib/formatLong/index.js":[44221,7,8592],"./bg/_lib/formatRelative/index.js":[24925,7,8592,9491],"./bg/_lib/localize/index.js":[60958,7,8592],"./bg/_lib/match/index.js":[99124,7,8592],"./bg/index.js":[90948,7,8592,6922],"./bn/_lib/formatDistance/index.js":[5190,7,8592],"./bn/_lib/formatLong/index.js":[10846,7,8592],"./bn/_lib/formatRelative/index.js":[90009,7,8592],"./bn/_lib/localize/index.js":[32143,9,8592],"./bn/_lib/match/index.js":[71701,7,8592],"./bn/index.js":[76982,7,8592,6982],"./bs/_lib/formatDistance/index.js":[3504,7,8592],"./bs/_lib/formatLong/index.js":[47625,7,8592],"./bs/_lib/formatRelative/index.js":[69642,7,8592],"./bs/_lib/localize/index.js":[19781,7,8592],"./bs/_lib/match/index.js":[98469,7,8592],"./bs/index.js":[21670,7,8592,1670],"./ca/_lib/formatDistance/index.js":[78470,7,8592],"./ca/_lib/formatLong/index.js":[37682,7,8592],"./ca/_lib/formatRelative/index.js":[73019,7,8592],"./ca/_lib/localize/index.js":[94354,7,8592],"./ca/_lib/match/index.js":[87821,7,8592],"./ca/index.js":[59800,7,8592,9800],"./cs/_lib/formatDistance/index.js":[84712,7,8592],"./cs/_lib/formatLong/index.js":[25366,7,8592],"./cs/_lib/formatRelative/index.js":[30404,7,8592],"./cs/_lib/localize/index.js":[1944,7,8592],"./cs/_lib/match/index.js":[8302,7,8592],"./cs/index.js":[27463,7,8592,7463],"./cy/_lib/formatDistance/index.js":[53860,7,8592],"./cy/_lib/formatLong/index.js":[5355,7,8592],"./cy/_lib/formatRelative/index.js":[11612,7,8592],"./cy/_lib/localize/index.js":[79008,7,8592],"./cy/_lib/match/index.js":[69946,7,8592],"./cy/index.js":[87955,7,8592,7955],"./da/_lib/formatDistance/index.js":[32439,7,8592],"./da/_lib/formatLong/index.js":[40114,7,8592],"./da/_lib/formatRelative/index.js":[33452,7,8592],"./da/_lib/localize/index.js":[22653,7,8592],"./da/_lib/match/index.js":[1416,7,8592],"./da/index.js":[11295,7,8592,1295],"./de-AT/_lib/localize/index.js":[44821,7,8592],"./de-AT/index.js":[21782,7,8592,1782],"./de/_lib/formatDistance/index.js":[98815,7,8592],"./de/_lib/formatLong/index.js":[47173,7,8592],"./de/_lib/formatRelative/index.js":[5278,7,8592],"./de/_lib/localize/index.js":[54552,7,8592],"./de/_lib/match/index.js":[31871,7,8592],"./de/index.js":[94086,7,8592,4086],"./el/_lib/formatDistance/index.js":[39298,7,8592],"./el/_lib/formatLong/index.js":[94460,7,8592],"./el/_lib/formatRelative/index.js":[72435,7,8592],"./el/_lib/localize/index.js":[674,7,8592],"./el/_lib/match/index.js":[40588,7,8592],"./el/index.js":[26106,7,8592,6106],"./en-AU/_lib/formatLong/index.js":[65493,7,8592],"./en-AU/index.js":[87747,7,8592,7747],"./en-CA/_lib/formatDistance/index.js":[80780,7,8592],"./en-CA/_lib/formatLong/index.js":[26153,7,8592],"./en-CA/index.js":[21413,7,8592,1413],"./en-GB/_lib/formatLong/index.js":[33819,7,8592],"./en-GB/index.js":[33035,7,8592,3035],"./en-IE/index.js":[61959,7,8592,1959],"./en-IN/_lib/formatLong/index.js":[20862,7,8592],"./en-IN/index.js":[82873,7,8592,2873],"./en-NZ/_lib/formatLong/index.js":[36336,7,8592],"./en-NZ/index.js":[26041,7,8592,6041],"./en-US/_lib/formatDistance/index.js":[39563,7],"./en-US/_lib/formatLong/index.js":[66929,7],"./en-US/_lib/formatRelative/index.js":[21656,7],"./en-US/_lib/localize/index.js":[31098,7],"./en-US/_lib/match/index.js":[53239,7],"./en-US/index.js":[33338,7],"./en-ZA/_lib/formatLong/index.js":[9221,7,8592],"./en-ZA/index.js":[11543,7,8592,1543],"./eo/_lib/formatDistance/index.js":[43549,7,8592],"./eo/_lib/formatLong/index.js":[25567,7,8592],"./eo/_lib/formatRelative/index.js":[30410,7,8592],"./eo/_lib/localize/index.js":[27249,7,8592],"./eo/_lib/match/index.js":[75687,7,8592],"./eo/index.js":[63574,7,8592,3574],"./es/_lib/formatDistance/index.js":[66660,7,8592],"./es/_lib/formatLong/index.js":[39055,7,8592],"./es/_lib/formatRelative/index.js":[63774,7,8592],"./es/_lib/localize/index.js":[38835,7,8592],"./es/_lib/match/index.js":[38662,7,8592],"./es/index.js":[23413,7,8592,3413],"./et/_lib/formatDistance/index.js":[64334,7,8592],"./et/_lib/formatLong/index.js":[32045,7,8592],"./et/_lib/formatRelative/index.js":[47074,7,8592],"./et/_lib/localize/index.js":[42462,7,8592],"./et/_lib/match/index.js":[85999,7,8592],"./et/index.js":[65861,7,8592,5861],"./eu/_lib/formatDistance/index.js":[91793,7,8592],"./eu/_lib/formatLong/index.js":[17350,7,8592],"./eu/_lib/formatRelative/index.js":[25688,7,8592],"./eu/_lib/localize/index.js":[28061,7,8592],"./eu/_lib/match/index.js":[11113,7,8592],"./eu/index.js":[29618,7,8592,9618],"./fa-IR/_lib/formatDistance/index.js":[76726,7,8592],"./fa-IR/_lib/formatLong/index.js":[10749,7,8592],"./fa-IR/_lib/formatRelative/index.js":[7220,7,8592],"./fa-IR/_lib/localize/index.js":[72441,7,8592],"./fa-IR/_lib/match/index.js":[81488,7,8592],"./fa-IR/index.js":[84996,7,8592,4996],"./fi/_lib/formatDistance/index.js":[97929,7,8592],"./fi/_lib/formatLong/index.js":[63741,7,8592],"./fi/_lib/formatRelative/index.js":[23234,7,8592],"./fi/_lib/localize/index.js":[5936,7,8592],"./fi/_lib/match/index.js":[157,7,8592],"./fi/index.js":[3596,7,8592,3596],"./fr-CA/_lib/formatLong/index.js":[85947,7,8592],"./fr-CA/index.js":[73723,7,8592,3723],"./fr-CH/_lib/formatLong/index.js":[27414,7,8592],"./fr-CH/_lib/formatRelative/index.js":[66155,7,8592],"./fr-CH/index.js":[24565,7,8592,4565],"./fr/_lib/formatDistance/index.js":[26839,7,8592],"./fr/_lib/formatLong/index.js":[32554,7,8592],"./fr/_lib/formatRelative/index.js":[15328,7,8592],"./fr/_lib/localize/index.js":[29821,7,8592],"./fr/_lib/match/index.js":[57047,7,8592],"./fr/index.js":[34153,7,8592,4153],"./fy/_lib/formatDistance/index.js":[60373,7,8592],"./fy/_lib/formatLong/index.js":[97771,7,8592],"./fy/_lib/formatRelative/index.js":[33851,7,8592],"./fy/_lib/localize/index.js":[86993,7,8592],"./fy/_lib/match/index.js":[48603,7,8592],"./fy/index.js":[73434,7,8592,3434],"./gd/_lib/formatDistance/index.js":[45690,7,8592],"./gd/_lib/formatLong/index.js":[2660,7,8592],"./gd/_lib/formatRelative/index.js":[30700,7,8592],"./gd/_lib/localize/index.js":[40751,7,8592],"./gd/_lib/match/index.js":[40421,7,8592],"./gd/index.js":[48569,7,8592,8569],"./gl/_lib/formatDistance/index.js":[35871,7,8592],"./gl/_lib/formatLong/index.js":[30449,7,8592],"./gl/_lib/formatRelative/index.js":[95563,7,8592],"./gl/_lib/localize/index.js":[61905,7,8592],"./gl/_lib/match/index.js":[33150,7,8592],"./gl/index.js":[96508,7,8592,6508],"./gu/_lib/formatDistance/index.js":[88210,7,8592],"./gu/_lib/formatLong/index.js":[63333,7,8592],"./gu/_lib/formatRelative/index.js":[89348,7,8592],"./gu/_lib/localize/index.js":[50143,7,8592],"./gu/_lib/match/index.js":[50932,7,8592],"./gu/index.js":[75732,7,8592,5732],"./he/_lib/formatDistance/index.js":[42191,7,8592],"./he/_lib/formatLong/index.js":[13925,7,8592],"./he/_lib/formatRelative/index.js":[11481,7,8592],"./he/_lib/localize/index.js":[19661,7,8592],"./he/_lib/match/index.js":[41291,7,8592],"./he/index.js":[86517,7,8592,6517],"./hi/_lib/formatDistance/index.js":[52573,7,8592],"./hi/_lib/formatLong/index.js":[30535,7,8592],"./hi/_lib/formatRelative/index.js":[65379,7,8592],"./hi/_lib/localize/index.js":[35423,9,8592],"./hi/_lib/match/index.js":[78198,7,8592],"./hi/index.js":[29562,7,8592,9562],"./hr/_lib/formatDistance/index.js":[7652,7,8592],"./hr/_lib/formatLong/index.js":[29577,7,8592],"./hr/_lib/formatRelative/index.js":[27603,7,8592],"./hr/_lib/localize/index.js":[12512,7,8592],"./hr/_lib/match/index.js":[83880,7,8592],"./hr/index.js":[41499,7,8592,1499],"./ht/_lib/formatDistance/index.js":[17743,7,8592],"./ht/_lib/formatLong/index.js":[50596,7,8592],"./ht/_lib/formatRelative/index.js":[66473,7,8592],"./ht/_lib/localize/index.js":[98942,7,8592],"./ht/_lib/match/index.js":[18649,7,8592],"./ht/index.js":[91792,7,8592,1792],"./hu/_lib/formatDistance/index.js":[74406,7,8592],"./hu/_lib/formatLong/index.js":[53971,7,8592],"./hu/_lib/formatRelative/index.js":[48580,7,8592],"./hu/_lib/localize/index.js":[6998,7,8592],"./hu/_lib/match/index.js":[69897,7,8592],"./hu/index.js":[85980,7,8592,5980],"./hy/_lib/formatDistance/index.js":[50897,7,8592],"./hy/_lib/formatLong/index.js":[11837,7,8592],"./hy/_lib/formatRelative/index.js":[3543,7,8592],"./hy/_lib/localize/index.js":[90151,7,8592],"./hy/_lib/match/index.js":[97177,7,8592],"./hy/index.js":[83268,7,8592,3268],"./id/_lib/formatDistance/index.js":[70846,7,8592],"./id/_lib/formatLong/index.js":[53405,7,8592],"./id/_lib/formatRelative/index.js":[97180,7,8592],"./id/_lib/localize/index.js":[35645,7,8592],"./id/_lib/match/index.js":[87601,7,8592],"./id/index.js":[90146,7,8592,146],"./is/_lib/formatDistance/index.js":[2370,7,8592],"./is/_lib/formatLong/index.js":[74096,7,8592],"./is/_lib/formatRelative/index.js":[42141,7,8592],"./is/_lib/localize/index.js":[12161,7,8592],"./is/_lib/match/index.js":[20798,7,8592],"./is/index.js":[84111,7,8592,4111],"./it-CH/_lib/formatLong/index.js":[31519,7,8592],"./it-CH/index.js":[87736,7,8592,469],"./it/_lib/formatDistance/index.js":[40358,7,8592],"./it/_lib/formatLong/index.js":[29588,7,8592],"./it/_lib/formatRelative/index.js":[91403,7,8592,5096],"./it/_lib/localize/index.js":[62007,7,8592],"./it/_lib/match/index.js":[94070,7,8592],"./it/index.js":[93722,7,8592,2039],"./ja-Hira/_lib/formatDistance/index.js":[84703,7,8592],"./ja-Hira/_lib/formatLong/index.js":[56574,7,8592],"./ja-Hira/_lib/formatRelative/index.js":[93381,7,8592],"./ja-Hira/_lib/localize/index.js":[35710,7,8592],"./ja-Hira/_lib/match/index.js":[69417,7,8592],"./ja-Hira/index.js":[12944,7,8592,2944],"./ja/_lib/formatDistance/index.js":[68018,7,8592],"./ja/_lib/formatLong/index.js":[45602,7,8592],"./ja/_lib/formatRelative/index.js":[65297,7,8592],"./ja/_lib/localize/index.js":[77420,7,8592],"./ja/_lib/match/index.js":[83926,7,8592],"./ja/index.js":[89251,7,8592,9251],"./ka/_lib/formatDistance/index.js":[39442,7,8592],"./ka/_lib/formatLong/index.js":[960,7,8592],"./ka/_lib/formatRelative/index.js":[18861,7,8592],"./ka/_lib/localize/index.js":[85798,7,8592],"./ka/_lib/match/index.js":[55077,7,8592],"./ka/index.js":[34010,7,8592,4010],"./kk/_lib/formatDistance/index.js":[44502,7,8592],"./kk/_lib/formatLong/index.js":[79591,7,8592],"./kk/_lib/formatRelative/index.js":[80876,7,8592,1098],"./kk/_lib/localize/index.js":[16163,7,8592],"./kk/_lib/match/index.js":[11079,7,8592],"./kk/index.js":[61615,7,8592,3387],"./km/_lib/formatDistance/index.js":[69355,7,8592],"./km/_lib/formatLong/index.js":[64335,7,8592],"./km/_lib/formatRelative/index.js":[68462,7,8592],"./km/_lib/localize/index.js":[32885,7,8592],"./km/_lib/match/index.js":[49242,7,8592],"./km/index.js":[98510,7,8592,8510],"./kn/_lib/formatDistance/index.js":[93557,7,8592],"./kn/_lib/formatLong/index.js":[19335,7,8592],"./kn/_lib/formatRelative/index.js":[19080,7,8592],"./kn/_lib/localize/index.js":[83848,7,8592],"./kn/_lib/match/index.js":[36809,7,8592],"./kn/index.js":[99517,7,8592,9517],"./ko/_lib/formatDistance/index.js":[21540,7,8592],"./ko/_lib/formatLong/index.js":[47237,7,8592],"./ko/_lib/formatRelative/index.js":[91078,7,8592],"./ko/_lib/localize/index.js":[89409,7,8592],"./ko/_lib/match/index.js":[38567,7,8592],"./ko/index.js":[15058,7,8592,5058],"./lb/_lib/formatDistance/index.js":[81904,7,8592],"./lb/_lib/formatLong/index.js":[53103,7,8592],"./lb/_lib/formatRelative/index.js":[64861,7,8592],"./lb/_lib/localize/index.js":[13317,7,8592],"./lb/_lib/match/index.js":[72652,7,8592],"./lb/index.js":[61953,7,8592,1953],"./lt/_lib/formatDistance/index.js":[55348,7,8592],"./lt/_lib/formatLong/index.js":[18290,7,8592],"./lt/_lib/formatRelative/index.js":[53257,7,8592],"./lt/_lib/localize/index.js":[62395,7,8592],"./lt/_lib/match/index.js":[5825,7,8592],"./lt/index.js":[35901,7,8592,5901],"./lv/_lib/formatDistance/index.js":[28910,7,8592],"./lv/_lib/formatLong/index.js":[86421,7,8592],"./lv/_lib/formatRelative/index.js":[60151,7,8592,3746],"./lv/_lib/localize/index.js":[44960,7,8592],"./lv/_lib/match/index.js":[4876,7,8592],"./lv/index.js":[82008,7,8592,6752],"./mk/_lib/formatDistance/index.js":[38992,7,8592],"./mk/_lib/formatLong/index.js":[7479,7,8592],"./mk/_lib/formatRelative/index.js":[41655,7,8592,903],"./mk/_lib/localize/index.js":[23458,7,8592],"./mk/_lib/match/index.js":[82975,7,8592],"./mk/index.js":[21880,7,8592,3593],"./mn/_lib/formatDistance/index.js":[61341,7,8592],"./mn/_lib/formatLong/index.js":[19732,7,8592],"./mn/_lib/formatRelative/index.js":[98225,7,8592],"./mn/_lib/localize/index.js":[89576,7,8592],"./mn/_lib/match/index.js":[33306,7,8592],"./mn/index.js":[31937,7,8592,1937],"./ms/_lib/formatDistance/index.js":[97808,7,8592],"./ms/_lib/formatLong/index.js":[61962,7,8592],"./ms/_lib/formatRelative/index.js":[68530,7,8592],"./ms/_lib/localize/index.js":[13241,7,8592],"./ms/_lib/match/index.js":[67079,7,8592],"./ms/index.js":[25098,7,8592,5098],"./mt/_lib/formatDistance/index.js":[14611,7,8592],"./mt/_lib/formatLong/index.js":[65011,7,8592],"./mt/_lib/formatRelative/index.js":[44521,7,8592],"./mt/_lib/localize/index.js":[69408,7,8592],"./mt/_lib/match/index.js":[29726,7,8592],"./mt/index.js":[12811,7,8592,2811],"./nb/_lib/formatDistance/index.js":[59968,7,8592],"./nb/_lib/formatLong/index.js":[20511,7,8592],"./nb/_lib/formatRelative/index.js":[11639,7,8592],"./nb/_lib/localize/index.js":[94249,7,8592],"./nb/_lib/match/index.js":[63498,7,8592],"./nb/index.js":[61295,7,8592,8226],"./nl-BE/_lib/formatDistance/index.js":[16129,7,8592],"./nl-BE/_lib/formatLong/index.js":[17657,7,8592],"./nl-BE/_lib/formatRelative/index.js":[89811,7,8592],"./nl-BE/_lib/localize/index.js":[58816,7,8592],"./nl-BE/_lib/match/index.js":[28333,7,8592],"./nl-BE/index.js":[70296,7,8592,296],"./nl/_lib/formatDistance/index.js":[57117,7,8592],"./nl/_lib/formatLong/index.js":[57197,7,8592],"./nl/_lib/formatRelative/index.js":[62818,7,8592],"./nl/_lib/localize/index.js":[67706,7,8592],"./nl/_lib/match/index.js":[61430,7,8592],"./nl/index.js":[80775,7,8592,775],"./nn/_lib/formatDistance/index.js":[4563,7,8592],"./nn/_lib/formatLong/index.js":[89212,7,8592],"./nn/_lib/formatRelative/index.js":[2565,7,8592],"./nn/_lib/localize/index.js":[28456,7,8592],"./nn/_lib/match/index.js":[51571,7,8592],"./nn/index.js":[34632,7,8592,4632],"./oc/_lib/formatDistance/index.js":[16585,7,8592],"./oc/_lib/formatLong/index.js":[96725,7,8592],"./oc/_lib/formatRelative/index.js":[7548,7,8592],"./oc/_lib/localize/index.js":[93417,7,8592],"./oc/_lib/match/index.js":[18145,7,8592],"./oc/index.js":[68311,7,8592,8311],"./pl/_lib/formatDistance/index.js":[62056,7,8592],"./pl/_lib/formatLong/index.js":[47448,7,8592],"./pl/_lib/formatRelative/index.js":[65991,7,8592,6160],"./pl/_lib/localize/index.js":[4306,7,8592],"./pl/_lib/match/index.js":[76075,7,8592],"./pl/index.js":[8554,7,8592,715],"./pt-BR/_lib/formatDistance/index.js":[52638,7,8592],"./pt-BR/_lib/formatLong/index.js":[33247,7,8592],"./pt-BR/_lib/formatRelative/index.js":[25492,7,8592],"./pt-BR/_lib/localize/index.js":[81046,7,8592],"./pt-BR/_lib/match/index.js":[63770,7,8592],"./pt-BR/index.js":[47569,7,8592,7569],"./pt/_lib/formatDistance/index.js":[55488,7,8592],"./pt/_lib/formatLong/index.js":[5133,7,8592],"./pt/_lib/formatRelative/index.js":[7493,7,8592],"./pt/_lib/localize/index.js":[58360,7,8592],"./pt/_lib/match/index.js":[37200,7,8592],"./pt/index.js":[24239,7,8592,4239],"./ro/_lib/formatDistance/index.js":[18199,7,8592],"./ro/_lib/formatLong/index.js":[84311,7,8592],"./ro/_lib/formatRelative/index.js":[97974,7,8592],"./ro/_lib/localize/index.js":[64729,7,8592],"./ro/_lib/match/index.js":[9202,7,8592],"./ro/index.js":[51055,7,8592,1055],"./ru/_lib/formatDistance/index.js":[90650,7,8592],"./ru/_lib/formatLong/index.js":[12580,7,8592],"./ru/_lib/formatRelative/index.js":[15994,7,8592,1338],"./ru/_lib/localize/index.js":[66943,7,8592],"./ru/_lib/match/index.js":[86374,7,8592],"./ru/index.js":[27413,7,8592,5287],"./sk/_lib/formatDistance/index.js":[32882,7,8592],"./sk/_lib/formatLong/index.js":[95087,7,8592],"./sk/_lib/formatRelative/index.js":[35507,7,8592,3951],"./sk/_lib/localize/index.js":[37369,7,8592],"./sk/_lib/match/index.js":[74329,7,8592],"./sk/index.js":[17065,7,8592,4586],"./sl/_lib/formatDistance/index.js":[57613,7,8592],"./sl/_lib/formatLong/index.js":[66302,7,8592],"./sl/_lib/formatRelative/index.js":[92131,7,8592],"./sl/_lib/localize/index.js":[2942,7,8592],"./sl/_lib/match/index.js":[36326,7,8592],"./sl/index.js":[62166,7,8592,2166],"./sq/_lib/formatDistance/index.js":[82569,7,8592],"./sq/_lib/formatLong/index.js":[32784,7,8592],"./sq/_lib/formatRelative/index.js":[44390,7,8592],"./sq/_lib/localize/index.js":[26425,7,8592],"./sq/_lib/match/index.js":[72140,7,8592],"./sq/index.js":[70797,7,8592,797],"./sr-Latn/_lib/formatDistance/index.js":[69014,7,8592],"./sr-Latn/_lib/formatLong/index.js":[99257,7,8592],"./sr-Latn/_lib/formatRelative/index.js":[42428,7,8592],"./sr-Latn/_lib/localize/index.js":[92773,7,8592],"./sr-Latn/_lib/match/index.js":[7766,7,8592],"./sr-Latn/index.js":[99064,7,8592,9064],"./sr/_lib/formatDistance/index.js":[55503,7,8592],"./sr/_lib/formatLong/index.js":[13465,7,8592],"./sr/_lib/formatRelative/index.js":[25743,7,8592],"./sr/_lib/localize/index.js":[30172,7,8592],"./sr/_lib/match/index.js":[81613,7,8592],"./sr/index.js":[15930,7,8592,5930],"./sv/_lib/formatDistance/index.js":[81387,7,8592],"./sv/_lib/formatLong/index.js":[20660,7,8592],"./sv/_lib/formatRelative/index.js":[43502,7,8592],"./sv/_lib/localize/index.js":[32384,7,8592],"./sv/_lib/match/index.js":[69940,7,8592],"./sv/index.js":[81413,7,8592,2135],"./ta/_lib/formatDistance/index.js":[66840,7,8592],"./ta/_lib/formatLong/index.js":[49391,7,8592],"./ta/_lib/formatRelative/index.js":[99284,7,8592],"./ta/_lib/localize/index.js":[61290,7,8592],"./ta/_lib/match/index.js":[33749,7,8592],"./ta/index.js":[21486,7,8592,1486],"./te/_lib/formatDistance/index.js":[38,7,8592],"./te/_lib/formatLong/index.js":[34703,7,8592],"./te/_lib/formatRelative/index.js":[46611,7,8592],"./te/_lib/localize/index.js":[86184,7,8592],"./te/_lib/match/index.js":[17208,7,8592],"./te/index.js":[52492,7,8592,2492],"./th/_lib/formatDistance/index.js":[32939,7,8592],"./th/_lib/formatLong/index.js":[96146,7,8592],"./th/_lib/formatRelative/index.js":[97294,7,8592],"./th/_lib/localize/index.js":[44204,7,8592],"./th/_lib/match/index.js":[59829,7,8592],"./th/index.js":[74785,7,8592,4785],"./tr/_lib/formatDistance/index.js":[77216,7,8592],"./tr/_lib/formatLong/index.js":[68379,7,8592],"./tr/_lib/formatRelative/index.js":[93999,7,8592],"./tr/_lib/localize/index.js":[8830,7,8592],"./tr/_lib/match/index.js":[58828,7,8592],"./tr/index.js":[63131,7,8592,3131],"./ug/_lib/formatDistance/index.js":[69442,7,8592],"./ug/_lib/formatLong/index.js":[36922,7,8592],"./ug/_lib/formatRelative/index.js":[20290,7,8592],"./ug/_lib/localize/index.js":[82490,7,8592],"./ug/_lib/match/index.js":[85282,7,8592],"./ug/index.js":[60182,7,8592,182],"./uk/_lib/formatDistance/index.js":[10017,7,8592],"./uk/_lib/formatLong/index.js":[26136,7,8592],"./uk/_lib/formatRelative/index.js":[88271,7,4,8592],"./uk/_lib/localize/index.js":[10954,7,8592],"./uk/_lib/match/index.js":[71680,7,8592],"./uk/index.js":[12509,7,4,8592,2509],"./uz-Cyrl/_lib/formatDistance/index.js":[67778,7,8592],"./uz-Cyrl/_lib/formatLong/index.js":[64095,7,8592],"./uz-Cyrl/_lib/formatRelative/index.js":[83734,7,8592],"./uz-Cyrl/_lib/localize/index.js":[17670,7,8592],"./uz-Cyrl/_lib/match/index.js":[75798,7,8592],"./uz-Cyrl/index.js":[14527,7,8592,4527],"./uz/_lib/formatDistance/index.js":[27197,7,8592],"./uz/_lib/formatLong/index.js":[27810,7,8592],"./uz/_lib/formatRelative/index.js":[22175,7,8592],"./uz/_lib/localize/index.js":[6881,7,8592],"./uz/_lib/match/index.js":[19263,7,8592],"./uz/index.js":[44203,7,8592,4203],"./vi/_lib/formatDistance/index.js":[61664,7,8592],"./vi/_lib/formatLong/index.js":[42296,7,8592],"./vi/_lib/formatRelative/index.js":[55191,7,8592],"./vi/_lib/localize/index.js":[67431,7,8592],"./vi/_lib/match/index.js":[98442,7,8592],"./vi/index.js":[48875,7,8592,8875],"./zh-CN/_lib/formatDistance/index.js":[33437,7,8592],"./zh-CN/_lib/formatLong/index.js":[91583,7,8592],"./zh-CN/_lib/formatRelative/index.js":[95629,7,8592,5441],"./zh-CN/_lib/localize/index.js":[17939,7,8592],"./zh-CN/_lib/match/index.js":[71362,7,8592],"./zh-CN/index.js":[86335,7,8592,2007],"./zh-HK/_lib/formatDistance/index.js":[37348,7,8592],"./zh-HK/_lib/formatLong/index.js":[60924,7,8592],"./zh-HK/_lib/formatRelative/index.js":[22164,7,8592],"./zh-HK/_lib/localize/index.js":[39264,7,8592],"./zh-HK/_lib/match/index.js":[50358,7,8592],"./zh-HK/index.js":[59277,7,8592,9277],"./zh-TW/_lib/formatDistance/index.js":[31613,7,8592],"./zh-TW/_lib/formatLong/index.js":[1239,7,8592],"./zh-TW/_lib/formatRelative/index.js":[13240,7,8592],"./zh-TW/_lib/localize/index.js":[29850,7,8592],"./zh-TW/_lib/match/index.js":[38819,7,8592],"./zh-TW/index.js":[74565,7,8592,3793]};function V(B){if(!x.o(k,B))return Promise.resolve().then(()=>{var R=new Error("Cannot find module '"+B+"'");throw R.code="MODULE_NOT_FOUND",R});var G=k[B],H=G[0];return Promise.all(G.slice(2).map(x.e)).then(()=>x.t(H,16|G[1]))}V.keys=()=>Object.keys(k),V.id=71213,q.exports=V},36930:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k,V,B,G,H,R,P){var Y=new Date(0);return Y.setUTCFullYear(k,V,B),Y.setUTCHours(G,H,R,P),Y},q.exports=S.default},47:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(G,H,R){var P=function B(G,H,R){if(R&&!R.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(R?[R.code,"en-US"]:void 0,{timeZone:H,timeZoneName:G})}(G,R.timeZone,R.locale);return P.formatToParts?function k(G,H){for(var R=G.formatToParts(H),P=R.length-1;P>=0;--P)if("timeZoneName"===R[P].type)return R[P].value}(P,H):function V(G,H){var R=G.format(H).replace(/\u200E/g,""),P=/ [\w-+ ]+$/.exec(R);return P?P[0].substr(1):""}(P,H)},q.exports=S.default},1870:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(ee,Z,U){var W,j,z;if(!ee||(W=R.timezoneZ.exec(ee)))return 0;if(W=R.timezoneHH.exec(ee))return ze(z=parseInt(W[1],10))?-z*G:NaN;if(W=R.timezoneHHMM.exec(ee)){z=parseInt(W[1],10);var he=parseInt(W[2],10);return ze(z,he)?(j=Math.abs(z)*G+6e4*he,z>0?-j:j):NaN}if(function je(ee){if(me[ee])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:ee}),me[ee]=!0,!0}catch{return!1}}(ee)){Z=new Date(Z||Date.now());var Le=U?Z:function Y(ee){return(0,V.default)(ee.getFullYear(),ee.getMonth(),ee.getDate(),ee.getHours(),ee.getMinutes(),ee.getSeconds(),ee.getMilliseconds())}(Z),Se=X(Le,ee),Ee=U?Se:function oe(ee,Z,U){var j=ee.getTime()-Z,z=X(new Date(j),U);if(Z===z)return Z;j-=z-Z;var he=X(new Date(j),U);return z===he?z:Math.max(z,he)}(Z,Se,ee);return-Ee}return NaN};var k=B(x(78598)),V=B(x(36930));function B(ee){return ee&&ee.__esModule?ee:{default:ee}}var G=36e5,R={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function X(ee,Z){var U=(0,k.default)(ee,Z),W=(0,V.default)(U[0],U[1]-1,U[2],U[3]%24,U[4],U[5],0).getTime(),j=ee.getTime(),z=j%1e3;return W-(j-(z>=0?z:1e3+z))}function ze(ee,Z){return-23<=ee&&ee<=23&&(null==Z||0<=Z&&Z<=59)}var me={};q.exports=S.default},32121:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0,S.default=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,q.exports=S.default},78598:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(R,P){var Y=function H(R){if(!G[R]){var P=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z"));G[R]="06/25/2014, 00:00:00"===P||"\u200e06\u200e/\u200e25\u200e/\u200e2014\u200e \u200e00\u200e:\u200e00\u200e:\u200e00"===P?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:R,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:R,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return G[R]}(P);return Y.formatToParts?function V(R,P){try{for(var Y=R.formatToParts(P),X=[],oe=0;oe=0&&(X[ze]=parseInt(Y[oe].value,10))}return X}catch(me){if(me instanceof RangeError)return[NaN];throw me}}(Y,R):function B(R,P){var Y=R.format(P).replace(/\u200E/g,""),X=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(Y);return[X[3],X[1],X[2],X[4],X[5],X[6]]}(Y,R)};var k={year:0,month:1,day:2,hour:3,minute:4,second:5},G={};q.exports=S.default},65660:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var k=B(x(47)),V=B(x(1870));function B(me){return me&&me.__esModule?me:{default:me}}function R(me,je){var ee=me?(0,V.default)(me,je,!0)/6e4:je.getTimezoneOffset();if(Number.isNaN(ee))throw new RangeError("Invalid time zone specified: "+me);return ee}function P(me,je){for(var ee=me<0?"-":"",Z=Math.abs(me).toString();Z.length0?"-":"+",U=Math.abs(me);return Z+P(Math.floor(U/60),2)+ee+P(Math.floor(U%60),2)}function X(me,je){return me%60==0?(me>0?"-":"+")+P(Math.abs(me)/60,2):Y(me,je)}S.default={X:function(me,je,ee,Z){var U=R(Z.timeZone,Z._originalDate||me);if(0===U)return"Z";switch(je){case"X":return X(U);case"XXXX":case"XX":return Y(U);default:return Y(U,":")}},x:function(me,je,ee,Z){var U=R(Z.timeZone,Z._originalDate||me);switch(je){case"x":return X(U);case"xxxx":case"xx":return Y(U);default:return Y(U,":")}},O:function(me,je,ee,Z){var U=R(Z.timeZone,Z._originalDate||me);switch(je){case"O":case"OO":case"OOO":return"GMT"+function oe(me,je){var ee=me>0?"-":"+",Z=Math.abs(me),U=Math.floor(Z/60),W=Z%60;if(0===W)return ee+String(U);var j=je||"";return ee+String(U)+j+P(W,2)}(U,":");default:return"GMT"+Y(U,":")}},z:function(me,je,ee,Z){var U=Z._originalDate||me;switch(je){case"z":case"zz":case"zzz":return(0,k.default)("short",U,Z);default:return(0,k.default)("long",U,Z)}}},q.exports=S.default},34294:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function R(P,Y,X){var oe=String(Y),ze=X||{},me=oe.match(H);if(me){var je=(0,B.default)(P,ze);oe=me.reduce(function(ee,Z){if("'"===Z[0])return ee;var U=ee.indexOf(Z),W="'"===ee[U-1],j=ee.replace(Z,"'"+V.default[Z[0]](je,Z,null,ze)+"'");return W?j.substring(0,U-1)+j.substring(U+1):j},oe)}return(0,k.default)(P,oe,ze)};var k=G(x(27868)),V=G(x(65660)),B=G(x(29018));function G(P){return P&&P.__esModule?P:{default:P}}var H=/([xXOz]+)|''|'(''|[^'])+('|$)/g;q.exports=S.default},28032:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R,P,Y,X){var oe=(0,k.default)(X);return oe.timeZone=P,(0,V.default)((0,B.default)(R,P),Y,oe)};var k=G(x(42926)),V=G(x(34294)),B=G(x(17318));function G(R){return R&&R.__esModule?R:{default:R}}q.exports=S.default},46167:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function B(G,H){return-(0,k.default)(G,H)};var k=function V(G){return G&&G.__esModule?G:{default:G}}(x(1870));q.exports=S.default},30298:(q,S,x)=>{"use strict";q.exports={format:x(34294),formatInTimeZone:x(28032),getTimezoneOffset:x(46167),toDate:x(29018),utcToZonedTime:x(17318),zonedTimeToUtc:x(99679)}},29018:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function oe(Ee,Ae){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===Ee)return new Date(NaN);var ve=Ae||{},qe=null==ve.additionalDigits?2:(0,k.default)(ve.additionalDigits);if(2!==qe&&1!==qe&&0!==qe)throw new RangeError("additionalDigits must be 0, 1 or 2");if(Ee instanceof Date||"object"==typeof Ee&&"[object Date]"===Object.prototype.toString.call(Ee))return new Date(Ee.getTime());if("number"==typeof Ee||"[object Number]"===Object.prototype.toString.call(Ee))return new Date(Ee);if("string"!=typeof Ee&&"[object String]"!==Object.prototype.toString.call(Ee))return new Date(NaN);var yt=ze(Ee),ae=me(yt.date,qe),Ii=ae.year,vi=ae.restDateString,ue=je(vi,Ii);if(isNaN(ue))return new Date(NaN);if(ue){var Ri,Nr=ue.getTime(),qi=0;if(yt.time&&(qi=ee(yt.time),isNaN(qi)))return new Date(NaN);if(yt.timeZone||ve.timeZone){if(Ri=(0,B.default)(yt.timeZone||ve.timeZone,new Date(Nr+qi)),isNaN(Ri))return new Date(NaN)}else Ri=(0,V.default)(new Date(Nr+qi)),Ri=(0,V.default)(new Date(Nr+qi+Ri));return new Date(Nr+qi+Ri)}return new Date(NaN)};var k=H(x(6092)),V=H(x(47664)),B=H(x(1870)),G=H(x(32121));function H(Ee){return Ee&&Ee.__esModule?Ee:{default:Ee}}var R=36e5,X={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:G.default};function ze(Ee){var qe,Ae={},ve=X.dateTimePattern.exec(Ee);if(ve?(Ae.date=ve[1],qe=ve[3]):(ve=X.datePattern.exec(Ee))?(Ae.date=ve[1],qe=ve[2]):(Ae.date=null,qe=Ee),qe){var yt=X.timeZone.exec(qe);yt?(Ae.time=qe.replace(yt[1],""),Ae.timeZone=yt[1].trim()):Ae.time=qe}return Ae}function me(Ee,Ae){var yt,ve=X.YYY[Ae],qe=X.YYYYY[Ae];if(yt=X.YYYY.exec(Ee)||qe.exec(Ee)){var ae=yt[1];return{year:parseInt(ae,10),restDateString:Ee.slice(ae.length)}}if(yt=X.YY.exec(Ee)||ve.exec(Ee)){var Ii=yt[1];return{year:100*parseInt(Ii,10),restDateString:Ee.slice(Ii.length)}}return{year:null}}function je(Ee,Ae){if(null===Ae)return null;var ve,qe,yt,ae;if(0===Ee.length)return(qe=new Date(0)).setUTCFullYear(Ae),qe;if(ve=X.MM.exec(Ee))return qe=new Date(0),z(Ae,yt=parseInt(ve[1],10)-1)?(qe.setUTCFullYear(Ae,yt),qe):new Date(NaN);if(ve=X.DDD.exec(Ee)){qe=new Date(0);var Ii=parseInt(ve[1],10);return function he(Ee,Ae){if(Ae<1)return!1;var ve=j(Ee);return!(ve&&Ae>366||!ve&&Ae>365)}(Ae,Ii)?(qe.setUTCFullYear(Ae,0,Ii),qe):new Date(NaN)}if(ve=X.MMDD.exec(Ee)){qe=new Date(0),yt=parseInt(ve[1],10)-1;var vi=parseInt(ve[2],10);return z(Ae,yt,vi)?(qe.setUTCFullYear(Ae,yt,vi),qe):new Date(NaN)}if(ve=X.Www.exec(Ee))return Le(0,ae=parseInt(ve[1],10)-1)?Z(Ae,ae):new Date(NaN);if(ve=X.WwwD.exec(Ee)){ae=parseInt(ve[1],10)-1;var ue=parseInt(ve[2],10)-1;return Le(0,ae,ue)?Z(Ae,ae,ue):new Date(NaN)}return null}function ee(Ee){var Ae,ve,qe;if(Ae=X.HH.exec(Ee))return Se(ve=parseFloat(Ae[1].replace(",",".")))?ve%24*R:NaN;if(Ae=X.HHMM.exec(Ee))return Se(ve=parseInt(Ae[1],10),qe=parseFloat(Ae[2].replace(",",".")))?ve%24*R+6e4*qe:NaN;if(Ae=X.HHMMSS.exec(Ee)){ve=parseInt(Ae[1],10),qe=parseInt(Ae[2],10);var yt=parseFloat(Ae[3].replace(",","."));return Se(ve,qe,yt)?ve%24*R+6e4*qe+1e3*yt:NaN}return null}function Z(Ee,Ae,ve){Ae=Ae||0,ve=ve||0;var qe=new Date(0);qe.setUTCFullYear(Ee,0,4);var ae=7*Ae+ve+1-(qe.getUTCDay()||7);return qe.setUTCDate(qe.getUTCDate()+ae),qe}var U=[31,28,31,30,31,30,31,31,30,31,30,31],W=[31,29,31,30,31,30,31,31,30,31,30,31];function j(Ee){return Ee%400==0||Ee%4==0&&Ee%100!=0}function z(Ee,Ae,ve){if(Ae<0||Ae>11)return!1;if(null!=ve){if(ve<1)return!1;var qe=j(Ee);if(qe&&ve>W[Ae]||!qe&&ve>U[Ae])return!1}return!0}function Le(Ee,Ae,ve){return!(Ae<0||Ae>52||null!=ve&&(ve<0||ve>6))}function Se(Ee,Ae,ve){return!(null!=Ee&&(Ee<0||Ee>=25)||null!=Ae&&(Ae<0||Ae>=60)||null!=ve&&(ve<0||ve>=60))}q.exports=S.default},17318:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function G(H,R,P){var Y=(0,V.default)(H,P),X=(0,k.default)(R,Y,!0),oe=new Date(Y.getTime()-X),ze=new Date(0);return ze.setFullYear(oe.getUTCFullYear(),oe.getUTCMonth(),oe.getUTCDate()),ze.setHours(oe.getUTCHours(),oe.getUTCMinutes(),oe.getUTCSeconds(),oe.getUTCMilliseconds()),ze};var k=B(x(1870)),V=B(x(29018));function B(H){return H&&H.__esModule?H:{default:H}}q.exports=S.default},99679:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y,X,oe){if("string"==typeof Y&&!Y.match(B.default)){var ze=(0,k.default)(oe);return ze.timeZone=X,(0,V.default)(Y,ze)}var me=(0,V.default)(Y,oe),je=(0,H.default)(me.getFullYear(),me.getMonth(),me.getDate(),me.getHours(),me.getMinutes(),me.getSeconds(),me.getMilliseconds()).getTime(),ee=(0,G.default)(X,new Date(je));return new Date(je+ee)};var k=R(x(42926)),V=R(x(29018)),B=R(x(32121)),G=R(x(1870)),H=R(x(36930));function R(Y){return Y&&Y.__esModule?Y:{default:Y}}q.exports=S.default},36758:q=>{q.exports=function S(x){return x&&x.__esModule?x:{default:x}},q.exports.__esModule=!0,q.exports.default=q.exports},50590:q=>{function S(x){return q.exports=S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"==typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},q.exports.__esModule=!0,q.exports.default=q.exports,S(x)}q.exports=S,q.exports.__esModule=!0,q.exports.default=q.exports}},q=>{q(q.s=79632)}]); \ No newline at end of file +var runtime=function(c){"use strict";var l,M=Object.prototype,p=M.hasOwnProperty,w=Object.defineProperty||function(r,t,e){r[t]=e.value},O="function"==typeof Symbol?Symbol:{},L=O.iterator||"@@iterator",z=O.asyncIterator||"@@asyncIterator",_=O.toStringTag||"@@toStringTag";function v(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{v({},"")}catch{v=function(t,e,o){return t[e]=o}}function R(r,t,e,o){var i=Object.create((t&&t.prototype instanceof j?t:j).prototype),a=new I(o||[]);return w(i,"_invoke",{value:H(r,e,a)}),i}function k(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(o){return{type:"throw",arg:o}}}c.wrap=R;var Y="suspendedStart",q="executing",b="completed",s={};function j(){}function S(){}function d(){}var N={};v(N,L,function(){return this});var T=Object.getPrototypeOf,E=T&&T(T(A([])));E&&E!==M&&p.call(E,L)&&(N=E);var g=d.prototype=j.prototype=Object.create(N);function D(r){["next","throw","return"].forEach(function(t){v(r,t,function(e){return this._invoke(t,e)})})}function G(r,t){function e(i,a,u,h){var f=k(r[i],r,a);if("throw"!==f.type){var C=f.arg,m=C.value;return m&&"object"==typeof m&&p.call(m,"__await")?t.resolve(m.__await).then(function(y){e("next",y,u,h)},function(y){e("throw",y,u,h)}):t.resolve(m).then(function(y){C.value=y,u(C)},function(y){return e("throw",y,u,h)})}h(f.arg)}var o;w(this,"_invoke",{value:function n(i,a){function u(){return new t(function(h,f){e(i,a,h,f)})}return o=o?o.then(u,u):u()}})}function H(r,t,e){var o=Y;return function(i,a){if(o===q)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return $()}for(e.method=i,e.arg=a;;){var u=e.delegate;if(u){var h=W(u,e);if(h){if(h===s)continue;return h}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===Y)throw o=b,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=q;var f=k(r,t,e);if("normal"===f.type){if(o=e.done?b:"suspendedYield",f.arg===s)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=b,e.method="throw",e.arg=f.arg)}}}function W(r,t){var e=t.method,o=r.iterator[e];if(o===l)return t.delegate=null,"throw"===e&&r.iterator.return&&(t.method="return",t.arg=l,W(r,t),"throw"===t.method)||"return"!==e&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),s;var n=k(o,r.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,s;var i=n.arg;return i?i.done?(t[r.resultName]=i.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=l),t.delegate=null,s):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function J(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function P(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(J,this),this.reset(!0)}function A(r){if(r){var t=r[L];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var e=-1,o=function n(){for(;++e=0;--o){var n=this.tryEntries[o],i=n.completion;if("root"===n.tryLoc)return e("end");if(n.tryLoc<=this.prev){var a=p.call(n,"catchLoc"),u=p.call(n,"finallyLoc");if(a&&u){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),P(e),s}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var o=e.completion;if("throw"===o.type){var n=o.arg;P(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:A(r),resultName:t,nextLoc:e},"next"===this.method&&(this.arg=l),s}},c}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch{"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}(()=>{"use strict";var e,_={},v={};function r(e){var n=v[e];if(void 0!==n)return n.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return _[e](t,t.exports,r),t.loaded=!0,t.exports}r.m=_,e=[],r.O=(n,t,o,f)=>{if(!t){var a=1/0;for(i=0;i=f)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(l=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[t,o,f]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},(()=>{var n,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,o){if(1&o&&(t=this(t)),8&o||"object"==typeof t&&t&&(4&o&&t.__esModule||16&o&&"function"==typeof t.then))return t;var f=Object.create(null);r.r(f);var i={};n=n||[null,e({}),e([]),e(e)];for(var a=2&o&&t;"object"==typeof a&&!~n.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(l=>i[l]=()=>t[l]);return i.default=()=>t,r.d(f,i),f}})(),r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(8592===e?"common":e)+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="dotcms-block-editor:";r.l=(t,o,f,i)=>{if(e[t])e[t].push(o);else{var a,l;if(void 0!==f)for(var d=document.getElementsByTagName("script"),s=0;s{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(m=>m(b)),g)return g(b)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={3666:0};r.f.j=(o,f)=>{var i=r.o(e,o)?e[o]:void 0;if(0!==i)if(i)f.push(i[2]);else if(3666!=o){var a=new Promise((c,u)=>i=e[o]=[c,u]);f.push(i[2]=a);var l=r.p+r.u(o),d=new Error;r.l(l,c=>{if(r.o(e,o)&&(0!==(i=e[o])&&(e[o]=void 0),i)){var u=c&&("load"===c.type?"missing":c.type),p=c&&c.target&&c.target.src;d.message="Loading chunk "+o+" failed.\n("+u+": "+p+")",d.name="ChunkLoadError",d.type=u,d.request=p,i[1](d)}},"chunk-"+o,o)}else e[o]=0},r.O.j=o=>0===e[o];var n=(o,f)=>{var d,s,[i,a,l]=f,c=0;if(i.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(l)var u=l(r)}for(o&&o(f);c{"use strict";ge(88583),ge(30757)},30757:()=>{!function(X,oe){"use strict";function ge(){var e=Ue.splice(0,Ue.length);for(F=0;e.length;)e.shift().call(null,e.shift())}function ye(e,r){for(var i=0,h=e.length;i1)&&tt(this)}}}),x(o,pe,{value:function(p){-1>0,de="__"+se+dt,be="addEventListener",Le="attached",ce="Callback",me="detached",te="extends",pe="attributeChanged"+ce,vt=Le+ce,rt="connected"+ce,mt="disconnected"+ce,ze="created"+ce,kt=me+ce,ot="ADDITION",pt="REMOVAL",Oe="DOMAttrModified",bt="DOMContentLoaded",Et="DOMSubtreeModified",qe="<",st="=",Mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,wt=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],He=[],We=[],le="",De=A.documentElement,Ee=He.indexOf||function(e){for(var r=this.length;r--&&this[r]!==e;);return r},it=ne.prototype,Pe=it.hasOwnProperty,at=it.isPrototypeOf,Re=ne.defineProperty,Ne=[],Xe=ne.getOwnPropertyDescriptor,Y=ne.getOwnPropertyNames,Ct=ne.getPrototypeOf,Ye=ne.setPrototypeOf,Se=!!ne.__proto__,$e="__dreCEv1",Me=X.customElements,t=!/^force/.test(oe.type)&&!!(Me&&Me.define&&Me.get&&Me.whenDefined),a=ne.create||ne,u=X.Map||function(){var e,r=[],i=[];return{get:function(h){return i[Ee.call(r,h)]},set:function(h,s){(e=Ee.call(r,h))<0?i[r.push(h)-1]=s:i[e]=s}}},c=X.Promise||function(e){function r(o){for(h=!0;i.length;)i.shift()(o)}var i=[],h=!1,s={catch:function(){return s},then:function(o){return i.push(o),h&&setTimeout(r,1),s}};return e(r),s},f=!1,m=a(null),E=a(null),v=new u,C=function(e){return e.toLowerCase()},w=ne.create||function e(r){return r?(e.prototype=r,new e):this},b=Ye||(Se?function(e,r){return e.__proto__=r,e}:Y&&Xe?function(){function e(r,i){for(var h,s=Y(i),o=0,l=s.length;o
",new H(function(e,r){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var i=(Ce=Xe(P,"innerHTML"))&&Ce.set;i&&Re(P,"innerHTML",{set:function(h){for(;this.lastChild;)this.removeChild(this.lastChild);i.call(this,h)}})}r.disconnect(),Ce=null}).observe(Ce,{childList:!0,subtree:!0}),Ce.innerHTML=""),ue||(Ye||Se?(we=function(e,r){at.call(r,e)||Fe(e,r)},ae=Fe):(we=function(e,r){e[de]||(e[de]=ne(!0),Fe(e,r))},ae=we),G?(I=!1,e=Xe(P,be),r=e.value,i=function(o){var l=new CustomEvent(Oe,{bubbles:!0});l.attrName=o,l.prevValue=R.call(this,o),l.newValue=null,l[pt]=l.attrChange=2,V.call(this,o),$.call(this,l)},h=function(o,l){var d=Q.call(this,o),p=d&&R.call(this,o),y=new CustomEvent(Oe,{bubbles:!0});K.call(this,o,l),y.attrName=o,y.prevValue=d?p:null,y.newValue=l,d?y.MODIFICATION=y.attrChange=1:y[ot]=y.attrChange=0,$.call(this,y)},s=function(o){var l,d=o.currentTarget,p=d[de],y=o.propertyName;p.hasOwnProperty(y)&&(p=p[y],(l=new CustomEvent(Oe,{bubbles:!0})).attrName=p.name,l.prevValue=p.value||null,l.newValue=p.value=d[y]||null,null==l.prevValue?l[ot]=l.attrChange=0:l.MODIFICATION=l.attrChange=1,$.call(d,l))},e.value=function(o,l,d){o===Oe&&this[pe]&&this.setAttribute!==h&&(this[de]={className:{name:"class",value:this.className}},this.setAttribute=h,this.removeAttribute=i,r.call(this,"propertychange",s)),r.call(this,o,l,d)},Re(P,be,e)):H||(De[be](Oe,Te),De.setAttribute(de,1),De.removeAttribute(de),I&&(je=function(e){var r,i,h,s=this;if(s===e.target){for(h in r=s[de],s[de]=i=nt(s),i){if(!(h in r))return Be(0,s,h,r[h],i[h],ot);if(i[h]!==r[h])return Be(1,s,h,r[h],i[h],"MODIFICATION")}for(h in r)if(!(h in i))return Be(2,s,h,r[h],i[h],pt)}},Be=function(e,r,i,h,s,o){var l={attrChange:e,currentTarget:r,attrName:i,prevValue:h,newValue:s};l[o]=e,Qe(l)},nt=function(e){for(var r,i,h={},s=e.attributes,o=0,l=s.length;o$");if(r[te]="a",(e.prototype=w(S.prototype)).constructor=e,X.customElements.define(i,e,r),!h.test(A.createElement("a",{is:i}).outerHTML)||!h.test((new e).outerHTML))throw r}(function e(){return Reflect.construct(S,[],e)},{},"document-register-element-a"+dt)}catch{ft()}if(!oe.noBuiltIn)try{if(N.call(A,"a","a").outerHTML.indexOf("is")<0)throw{}}catch{C=function(r){return{is:r.toLowerCase()}}}}(window)},88583:()=>{"use strict";!function(t){const a=t.performance;function u(I){a&&a.mark&&a.mark(I)}function c(I,k){a&&a.measure&&a.measure(I,k)}u("Zone");const f=t.__Zone_symbol_prefix||"__zone_symbol__";function m(I){return f+I}const E=!0===t[m("forceDuplicateZoneCheck")];if(t.Zone){if(E||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let v=(()=>{class I{constructor(n,e){this._parent=n,this._name=e?e.name||"unnamed":"",this._properties=e&&e.properties||{},this._zoneDelegate=new w(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==re.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=I.current;for(;n.parent;)n=n.parent;return n}static get current(){return F.zone}static get currentTask(){return ue}static __load_patch(n,e,r=!1){if(re.hasOwnProperty(n)){if(!r&&E)throw Error("Already loaded patch: "+n)}else if(!t["__Zone_disable_"+n]){const i="Zone:"+n;u(i),re[n]=e(t,I,Te),c(i,i)}}get parent(){return this._parent}get name(){return this._name}get(n){const e=this.getZoneWith(n);if(e)return e._properties[n]}getZoneWith(n){let e=this;for(;e;){if(e._properties.hasOwnProperty(n))return e;e=e._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,e){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const r=this._zoneDelegate.intercept(this,n,e),i=this;return function(){return i.runGuarded(r,this,arguments,e)}}run(n,e,r,i){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,n,e,r,i)}finally{F=F.parent}}runGuarded(n,e=null,r,i){F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,n,e,r,i)}catch(h){if(this._zoneDelegate.handleError(this,h))throw h}}finally{F=F.parent}}runTask(n,e,r){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");if(n.state===B&&(n.type===O||n.type===j))return;const i=n.state!=Q;i&&n._transitionTo(Q,R),n.runCount++;const h=ue;ue=n,F={parent:F,zone:this};try{n.type==j&&n.data&&!n.data.isPeriodic&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,n,e,r)}catch(s){if(this._zoneDelegate.handleError(this,s))throw s}}finally{n.state!==B&&n.state!==K&&(n.type==O||n.data&&n.data.isPeriodic?i&&n._transitionTo(R,Q):(n.runCount=0,this._updateTaskCount(n,-1),i&&n._transitionTo(B,Q,B))),F=F.parent,ue=h}}scheduleTask(n){if(n.zone&&n.zone!==this){let r=this;for(;r;){if(r===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);r=r.parent}}n._transitionTo($,B);const e=[];n._zoneDelegates=e,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(r){throw n._transitionTo(K,$,B),this._zoneDelegate.handleError(this,r),r}return n._zoneDelegates===e&&this._updateTaskCount(n,1),n.state==$&&n._transitionTo(R,$),n}scheduleMicroTask(n,e,r,i){return this.scheduleTask(new b(N,n,e,r,i,void 0))}scheduleMacroTask(n,e,r,i,h){return this.scheduleTask(new b(j,n,e,r,i,h))}scheduleEventTask(n,e,r,i,h){return this.scheduleTask(new b(O,n,e,r,i,h))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");n._transitionTo(V,R,Q);try{this._zoneDelegate.cancelTask(this,n)}catch(e){throw n._transitionTo(K,V),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(n,-1),n._transitionTo(B,V),n.runCount=0,n}_updateTaskCount(n,e){const r=n._zoneDelegates;-1==e&&(n._zoneDelegates=null);for(let i=0;iI.hasTask(n,e),onScheduleTask:(I,k,n,e)=>I.scheduleTask(n,e),onInvokeTask:(I,k,n,e,r,i)=>I.invokeTask(n,e,r,i),onCancelTask:(I,k,n,e)=>I.cancelTask(n,e)};class w{constructor(k,n,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=k,this._parentDelegate=n,this._forkZS=e&&(e&&e.onFork?e:n._forkZS),this._forkDlgt=e&&(e.onFork?n:n._forkDlgt),this._forkCurrZone=e&&(e.onFork?this.zone:n._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:n._interceptZS),this._interceptDlgt=e&&(e.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this.zone:n._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:n._invokeZS),this._invokeDlgt=e&&(e.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this.zone:n._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:n._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this.zone:n._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:n._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this.zone:n._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:n._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this.zone:n._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:n._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this.zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=e&&e.onHasTask;(r||n&&n._hasTaskZS)&&(this._hasTaskZS=r?e:C,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=k,e.onScheduleTask||(this._scheduleTaskZS=C,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this.zone),e.onInvokeTask||(this._invokeTaskZS=C,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this.zone),e.onCancelTask||(this._cancelTaskZS=C,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this.zone))}fork(k,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,k,n):new v(k,n)}intercept(k,n,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,k,n,e):n}invoke(k,n,e,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,k,n,e,r,i):n.apply(e,r)}handleError(k,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,k,n)}scheduleTask(k,n){let e=n;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,k,n),e||(e=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=N)throw new Error("Task is missing scheduleFn.");T(n)}return e}invokeTask(k,n,e,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,k,n,e,r):n.callback.apply(e,r)}cancelTask(k,n){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,k,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");e=n.cancelFn(n)}return e}hasTask(k,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,k,n)}catch(e){this.handleError(k,e)}}_updateTaskCount(k,n){const e=this._taskCounts,r=e[k],i=e[k]=r+n;if(i<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=i||this.hasTask(this.zone,{microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:k})}}class b{constructor(k,n,e,r,i,h){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=k,this.source=n,this.data=r,this.scheduleFn=i,this.cancelFn=h,!e)throw new Error("callback is not defined");this.callback=e;const s=this;this.invoke=k===O&&r&&r.useG?b.invokeTask:function(){return b.invokeTask.call(t,s,this,arguments)}}static invokeTask(k,n,e){k||(k=this),fe++;try{return k.runCount++,k.zone.runTask(k,n,e)}finally{1==fe&&Z(),fe--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(B,$)}_transitionTo(k,n,e){if(this._state!==n&&this._state!==e)throw new Error(`${this.type} '${this.source}': can not transition to '${k}', expecting state '${n}'${e?" or '"+e+"'":""}, was '${this._state}'.`);this._state=k,k==B&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const H=m("setTimeout"),S=m("Promise"),P=m("then");let L,G=[],x=!1;function T(I){if(0===fe&&0===G.length)if(L||t[S]&&(L=t[S].resolve(0)),L){let k=L[P];k||(k=L.then),k.call(L,Z)}else t[H](Z,0);I&&G.push(I)}function Z(){if(!x){for(x=!0;G.length;){const I=G;G=[];for(let k=0;kF,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:T,showUncaughtError:()=>!v[m("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W};let F={parent:null,zone:new v(null,null)},ue=null,fe=0;function W(){}c("Zone","Zone"),t.Zone=v}(typeof window<"u"&&window||typeof self<"u"&&self||global);const oe=Object.getOwnPropertyDescriptor,ge=Object.defineProperty,ye=Object.getPrototypeOf,_t=Object.create,Ve=Array.prototype.slice,Ie="addEventListener",Je="removeEventListener",Qe=Zone.__symbol__(Ie),et=Zone.__symbol__(Je),he="true",ve="false",Ze=Zone.__symbol__("");function Fe(t,a){return Zone.current.wrap(t,a)}function lt(t,a,u,c,f){return Zone.current.scheduleMacroTask(t,a,u,c,f)}const U=Zone.__symbol__,Ae=typeof window<"u",ke=Ae?window:void 0,J=Ae&&ke||"object"==typeof self&&self||global,yt=[null];function tt(t,a){for(let u=t.length-1;u>=0;u--)"function"==typeof t[u]&&(t[u]=Fe(t[u],a+"_"+u));return t}function ft(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&typeof t.set>"u")}const A=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,ne=!("nw"in J)&&typeof J.process<"u"&&"[object process]"==={}.toString.call(J.process),ht=!ne&&!A&&!(!Ae||!ke.HTMLElement),Ue=typeof J.process<"u"&&"[object process]"==={}.toString.call(J.process)&&!A&&!(!Ae||!ke.HTMLElement),je={},Be=function(t){if(!(t=t||J.event))return;let a=je[t.type];a||(a=je[t.type]=U("ON_PROPERTY"+t.type));const u=this||t.target||J,c=u[a];let f;return ht&&u===ke&&"error"===t.type?(f=c&&c.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===f&&t.preventDefault()):(f=c&&c.apply(this,arguments),null!=f&&!f&&t.preventDefault()),f};function nt(t,a,u){let c=oe(t,a);if(!c&&u&&oe(u,a)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const f=U("on"+a+"patched");if(t.hasOwnProperty(f)&&t[f])return;delete c.writable,delete c.value;const m=c.get,E=c.set,v=a.substr(2);let C=je[v];C||(C=je[v]=U("ON_PROPERTY"+v)),c.set=function(w){let b=this;!b&&t===J&&(b=J),b&&(b[C]&&b.removeEventListener(v,Be),E&&E.apply(b,yt),"function"==typeof w?(b[C]=w,b.addEventListener(v,Be,!1)):b[C]=null)},c.get=function(){let w=this;if(!w&&t===J&&(w=J),!w)return null;const b=w[C];if(b)return b;if(m){let H=m&&m.call(this);if(H)return c.set.call(this,H),"function"==typeof w.removeAttribute&&w.removeAttribute(a),H}return null},ge(t,a,c),t[f]=!0}function Ge(t,a,u){if(a)for(let c=0;cfunction(E,v){const C=u(E,v);return C.cbIdx>=0&&"function"==typeof v[C.cbIdx]?lt(C.name,v[C.cbIdx],C,f):m.apply(E,v)})}function se(t,a){t[U("OriginalDelegate")]=a}let dt=!1,de=!1;function Le(){if(dt)return de;dt=!0;try{const t=ke.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(de=!0)}catch{}return de}Zone.__load_patch("ZoneAwarePromise",(t,a,u)=>{const c=Object.getOwnPropertyDescriptor,f=Object.defineProperty,E=u.symbol,v=[],C=!0===t[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],w=E("Promise"),b=E("then");u.onUnhandledError=s=>{if(u.showUncaughtError()){const o=s&&s.rejection;o?console.error("Unhandled Promise rejection:",o instanceof Error?o.message:o,"; Zone:",s.zone.name,"; Task:",s.task&&s.task.source,"; Value:",o,o instanceof Error?o.stack:void 0):console.error(s)}},u.microtaskDrainDone=()=>{for(;v.length;){const s=v.shift();try{s.zone.runGuarded(()=>{throw s.throwOriginal?s.rejection:s})}catch(o){P(o)}}};const S=E("unhandledPromiseRejectionHandler");function P(s){u.onUnhandledError(s);try{const o=a[S];"function"==typeof o&&o.call(this,s)}catch{}}function G(s){return s&&s.then}function x(s){return s}function L(s){return n.reject(s)}const T=E("state"),Z=E("value"),z=E("finally"),B=E("parentPromiseValue"),$=E("parentPromiseState"),Q=null,V=!0,K=!1;function j(s,o){return l=>{try{F(s,o,l)}catch(d){F(s,!1,d)}}}const Te=E("currentTaskTrace");function F(s,o,l){const d=function(){let s=!1;return function(l){return function(){s||(s=!0,l.apply(null,arguments))}}}();if(s===l)throw new TypeError("Promise resolved with itself");if(s[T]===Q){let p=null;try{("object"==typeof l||"function"==typeof l)&&(p=l&&l.then)}catch(y){return d(()=>{F(s,!1,y)})(),s}if(o!==K&&l instanceof n&&l.hasOwnProperty(T)&&l.hasOwnProperty(Z)&&l[T]!==Q)fe(l),F(s,l[T],l[Z]);else if(o!==K&&"function"==typeof p)try{p.call(l,d(j(s,o)),d(j(s,!1)))}catch(y){d(()=>{F(s,!1,y)})()}else{s[T]=o;const y=s[Z];if(s[Z]=l,s[z]===z&&o===V&&(s[T]=s[$],s[Z]=s[B]),o===K&&l instanceof Error){const _=a.currentTask&&a.currentTask.data&&a.currentTask.data.__creationTrace__;_&&f(l,Te,{configurable:!0,enumerable:!1,writable:!0,value:_})}for(let _=0;_{try{const g=s[Z],M=!!l&&z===l[z];M&&(l[B]=g,l[$]=y);const D=o.run(_,void 0,M&&_!==L&&_!==x?[]:[g]);F(l,!0,D)}catch(g){F(l,!1,g)}},l)}const k=function(){};class n{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(o){return F(new this(null),V,o)}static reject(o){return F(new this(null),K,o)}static race(o){let l,d,p=new this((g,M)=>{l=g,d=M});function y(g){l(g)}function _(g){d(g)}for(let g of o)G(g)||(g=this.resolve(g)),g.then(y,_);return p}static all(o){return n.allWithCallback(o)}static allSettled(o){return(this&&this.prototype instanceof n?this:n).allWithCallback(o,{thenCallback:d=>({status:"fulfilled",value:d}),errorCallback:d=>({status:"rejected",reason:d})})}static allWithCallback(o,l){let d,p,y=new this((D,q)=>{d=D,p=q}),_=2,g=0;const M=[];for(let D of o){G(D)||(D=this.resolve(D));const q=g;try{D.then(ee=>{M[q]=l?l.thenCallback(ee):ee,_--,0===_&&d(M)},ee=>{l?(M[q]=l.errorCallback(ee),_--,0===_&&d(M)):p(ee)})}catch(ee){p(ee)}_++,g++}return _-=2,0===_&&d(M),y}constructor(o){const l=this;if(!(l instanceof n))throw new Error("Must be an instanceof Promise.");l[T]=Q,l[Z]=[];try{o&&o(j(l,V),j(l,K))}catch(d){F(l,!1,d)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return n}then(o,l){let d=this.constructor[Symbol.species];(!d||"function"!=typeof d)&&(d=this.constructor||n);const p=new d(k),y=a.current;return this[T]==Q?this[Z].push(y,p,o,l):W(this,y,p,o,l),p}catch(o){return this.then(null,o)}finally(o){let l=this.constructor[Symbol.species];(!l||"function"!=typeof l)&&(l=n);const d=new l(k);d[z]=z;const p=a.current;return this[T]==Q?this[Z].push(p,d,o,o):W(this,p,d,o,o),d}}n.resolve=n.resolve,n.reject=n.reject,n.race=n.race,n.all=n.all;const e=t[w]=t.Promise;t.Promise=n;const r=E("thenPatched");function i(s){const o=s.prototype,l=c(o,"then");if(l&&(!1===l.writable||!l.configurable))return;const d=o.then;o[b]=d,s.prototype.then=function(p,y){return new n((g,M)=>{d.call(this,g,M)}).then(p,y)},s[r]=!0}return u.patchThen=i,e&&(i(e),ae(t,"fetch",s=>function h(s){return function(o,l){let d=s.apply(o,l);if(d instanceof n)return d;let p=d.constructor;return p[r]||i(p),d}}(s))),Promise[a.__symbol__("uncaughtPromiseErrors")]=v,n}),Zone.__load_patch("toString",t=>{const a=Function.prototype.toString,u=U("OriginalDelegate"),c=U("Promise"),f=U("Error"),m=function(){if("function"==typeof this){const w=this[u];if(w)return"function"==typeof w?a.call(w):Object.prototype.toString.call(w);if(this===Promise){const b=t[c];if(b)return a.call(b)}if(this===Error){const b=t[f];if(b)return a.call(b)}}return a.call(this)};m[u]=a,Function.prototype.toString=m;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ce=!1;if(typeof window<"u")try{const t=Object.defineProperty({},"passive",{get:function(){ce=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{ce=!1}const me={useG:!0},te={},pe={},vt=new RegExp("^"+Ze+"(\\w+)(true|false)$"),rt=U("propagationStopped");function mt(t,a){const u=(a?a(t):t)+ve,c=(a?a(t):t)+he,f=Ze+u,m=Ze+c;te[t]={},te[t][ve]=f,te[t][he]=m}function ze(t,a,u){const c=u&&u.add||Ie,f=u&&u.rm||Je,m=u&&u.listeners||"eventListeners",E=u&&u.rmAll||"removeAllListeners",v=U(c),C="."+c+":",w="prependListener",b="."+w+":",H=function(L,T,Z){if(L.isRemoved)return;const z=L.callback;"object"==typeof z&&z.handleEvent&&(L.callback=$=>z.handleEvent($),L.originalDelegate=z),L.invoke(L,T,[Z]);const B=L.options;B&&"object"==typeof B&&B.once&&T[f].call(T,Z.type,L.originalDelegate?L.originalDelegate:L.callback,B)},S=function(L){if(!(L=L||t.event))return;const T=this||L.target||t,Z=T[te[L.type][ve]];if(Z)if(1===Z.length)H(Z[0],T,L);else{const z=Z.slice();for(let B=0;Bfunction(f,m){f[rt]=!0,c&&c.apply(f,m)})}function pt(t,a,u,c,f){const m=Zone.__symbol__(c);if(a[m])return;const E=a[m]=a[c];a[c]=function(v,C,w){return C&&C.prototype&&f.forEach(function(b){const H=`${u}.${c}::`+b,S=C.prototype;if(S.hasOwnProperty(b)){const P=t.ObjectGetOwnPropertyDescriptor(S,b);P&&P.value?(P.value=t.wrapWithCurrentZone(P.value,H),t._redefineProperty(C.prototype,b,P)):S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}else S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}),E.call(a,v,C,w)},t.attachOriginToPatched(a[c],E)}const Et=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],st=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],le=["load"],De=["blur","error","focus","load","resize","scroll","messageerror"],Ee=["bounce","finish","start"],it=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Pe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],Re=["error","message"],Ne=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Et,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function Xe(t,a,u){if(!u||0===u.length)return a;const c=u.filter(m=>m.target===t);if(!c||0===c.length)return a;const f=c[0].ignoreProperties;return a.filter(m=>-1===f.indexOf(m))}function Y(t,a,u,c){t&&Ge(t,Xe(t,a,u),c)}Zone.__load_patch("util",(t,a,u)=>{u.patchOnProperties=Ge,u.patchMethod=ae,u.bindArguments=tt,u.patchMacroTask=Ce;const c=a.__symbol__("BLACK_LISTED_EVENTS"),f=a.__symbol__("UNPATCHED_EVENTS");t[f]&&(t[c]=t[f]),t[c]&&(a[c]=a[f]=t[c]),u.patchEventPrototype=ot,u.patchEventTarget=ze,u.isIEOrEdge=Le,u.ObjectDefineProperty=ge,u.ObjectGetOwnPropertyDescriptor=oe,u.ObjectCreate=_t,u.ArraySlice=Ve,u.patchClass=we,u.wrapWithCurrentZone=Fe,u.filterProperties=Xe,u.attachOriginToPatched=se,u._redefineProperty=Object.defineProperty,u.patchCallbacks=pt,u.getGlobalObjects=()=>({globalSources:pe,zoneSymbolEventNames:te,eventNames:Ne,isBrowser:ht,isMix:Ue,isNode:ne,TRUE_STR:he,FALSE_STR:ve,ZONE_SYMBOL_PREFIX:Ze,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Je})});const Ye=U("zoneTask");function Se(t,a,u,c){let f=null,m=null;u+=c;const E={};function v(w){const b=w.data;return b.args[0]=function(){return w.invoke.apply(this,arguments)},b.handleId=f.apply(t,b.args),w}function C(w){return m.call(t,w.data.handleId)}f=ae(t,a+=c,w=>function(b,H){if("function"==typeof H[0]){const S={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?H[1]||0:void 0,args:H},P=H[0];H[0]=function(){try{return P.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete E[S.handleId]:S.handleId&&(S.handleId[Ye]=null))}};const G=lt(a,H[0],S,v,C);if(!G)return G;const x=G.data.handleId;return"number"==typeof x?E[x]=G:x&&(x[Ye]=G),x&&x.ref&&x.unref&&"function"==typeof x.ref&&"function"==typeof x.unref&&(G.ref=x.ref.bind(x),G.unref=x.unref.bind(x)),"number"==typeof x||x?x:G}return w.apply(t,H)}),m=ae(t,u,w=>function(b,H){const S=H[0];let P;"number"==typeof S?P=E[S]:(P=S&&S[Ye],P||(P=S)),P&&"string"==typeof P.type?"notScheduled"!==P.state&&(P.cancelFn&&P.data.isPeriodic||0===P.runCount)&&("number"==typeof S?delete E[S]:S&&(S[Ye]=null),P.zone.cancelTask(P)):w.apply(t,H)})}Zone.__load_patch("legacy",t=>{const a=t[Zone.__symbol__("legacyPatch")];a&&a()}),Zone.__load_patch("queueMicrotask",(t,a,u)=>{u.patchMethod(t,"queueMicrotask",c=>function(f,m){a.current.scheduleMicroTask("queueMicrotask",m[0])})}),Zone.__load_patch("timers",t=>{const a="set",u="clear";Se(t,a,u,"Timeout"),Se(t,a,u,"Interval"),Se(t,a,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{Se(t,"request","cancel","AnimationFrame"),Se(t,"mozRequest","mozCancel","AnimationFrame"),Se(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,a)=>{const u=["alert","prompt","confirm"];for(let c=0;cfunction(C,w){return a.current.run(m,t,w,v)})}),Zone.__load_patch("EventTarget",(t,a,u)=>{(function Me(t,a){a.patchEventPrototype(t,a)})(t,u),function $e(t,a){if(Zone[a.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:f,FALSE_STR:m,ZONE_SYMBOL_PREFIX:E}=a.getGlobalObjects();for(let C=0;C{we("MutationObserver"),we("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,a,u)=>{we("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,a,u)=>{we("FileReader")}),Zone.__load_patch("on_property",(t,a,u)=>{!function Ct(t,a){if(ne&&!Ue||Zone[t.symbol("patchEvents")])return;const u=typeof WebSocket<"u",c=a.__Zone_ignore_on_properties;if(ht){const E=window,v=function be(){try{const t=ke.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:E,ignoreProperties:["error"]}]:[];Y(E,Ne.concat(["messageerror"]),c&&c.concat(v),ye(E)),Y(Document.prototype,Ne,c),typeof E.SVGElement<"u"&&Y(E.SVGElement.prototype,Ne,c),Y(Element.prototype,Ne,c),Y(HTMLElement.prototype,Ne,c),Y(HTMLMediaElement.prototype,st,c),Y(HTMLFrameSetElement.prototype,Et.concat(De),c),Y(HTMLBodyElement.prototype,Et.concat(De),c),Y(HTMLFrameElement.prototype,le,c),Y(HTMLIFrameElement.prototype,le,c);const C=E.HTMLMarqueeElement;C&&Y(C.prototype,Ee,c);const w=E.Worker;w&&Y(w.prototype,Re,c)}const f=a.XMLHttpRequest;f&&Y(f.prototype,it,c);const m=a.XMLHttpRequestEventTarget;m&&Y(m&&m.prototype,it,c),typeof IDBIndex<"u"&&(Y(IDBIndex.prototype,Pe,c),Y(IDBRequest.prototype,Pe,c),Y(IDBOpenDBRequest.prototype,Pe,c),Y(IDBDatabase.prototype,Pe,c),Y(IDBTransaction.prototype,Pe,c),Y(IDBCursor.prototype,Pe,c)),u&&Y(WebSocket.prototype,at,c)}(u,t)}),Zone.__load_patch("customElements",(t,a,u)=>{!function Pt(t,a){const{isBrowser:u,isMix:c}=a.getGlobalObjects();(u||c)&&t.customElements&&"customElements"in t&&a.patchCallbacks(a,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,u)}),Zone.__load_patch("XHR",(t,a)=>{!function C(w){const b=w.XMLHttpRequest;if(!b)return;const H=b.prototype;let P=H[Qe],G=H[et];if(!P){const N=w.XMLHttpRequestEventTarget;if(N){const j=N.prototype;P=j[Qe],G=j[et]}}const x="readystatechange",L="scheduled";function T(N){const j=N.data,O=j.target;O[m]=!1,O[v]=!1;const re=O[f];P||(P=O[Qe],G=O[et]),re&&G.call(O,x,re);const Te=O[f]=()=>{if(O.readyState===O.DONE)if(!j.aborted&&O[m]&&N.state===L){const ue=O[a.__symbol__("loadfalse")];if(0!==O.status&&ue&&ue.length>0){const fe=N.invoke;N.invoke=function(){const W=O[a.__symbol__("loadfalse")];for(let I=0;Ifunction(N,j){return N[c]=0==j[2],N[E]=j[1],B.apply(N,j)}),R=U("fetchTaskAborting"),Q=U("fetchTaskScheduling"),V=ae(H,"send",()=>function(N,j){if(!0===a.current[Q]||N[c])return V.apply(N,j);{const O={target:N,url:N[E],isPeriodic:!1,args:j,aborted:!1},re=lt("XMLHttpRequest.send",Z,O,T,z);N&&!0===N[v]&&!O.aborted&&re.state===L&&re.invoke()}}),K=ae(H,"abort",()=>function(N,j){const O=function S(N){return N[u]}(N);if(O&&"string"==typeof O.type){if(null==O.cancelFn||O.data&&O.data.aborted)return;O.zone.cancelTask(O)}else if(!0===a.current[R])return K.apply(N,j)})}(t);const u=U("xhrTask"),c=U("xhrSync"),f=U("xhrListener"),m=U("xhrScheduled"),E=U("xhrURL"),v=U("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function ut(t,a){const u=t.constructor.name;for(let c=0;c{const C=function(){return v.apply(this,tt(arguments,u+"."+f))};return se(C,v),C})(m)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,a)=>{function u(c){return function(f){kt(t,c).forEach(E=>{const v=t.PromiseRejectionEvent;if(v){const C=new v(c,{promise:f.promise,reason:f.rejection});E.invoke(C)}})}}t.PromiseRejectionEvent&&(a[U("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),a[U("rejectionHandledHandler")]=u("rejectionhandled"))})}},X=>{X(X.s=39061)}]);(self.webpackChunkdotcms_block_editor=self.webpackChunkdotcms_block_editor||[]).push([[179],{18664:(q,S,x)=>{"use strict";function k(n){return"function"==typeof n}let V=!1;const B={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else V&&console.log("RxJS: Back to a better error behavior. Thank you. <3");V=n},get useDeprecatedSynchronousErrorHandling(){return V}};function G(n){setTimeout(()=>{throw n},0)}const H={closed:!0,next(n){},error(n){if(B.useDeprecatedSynchronousErrorHandling)throw n;G(n)},complete(){}},R=Array.isArray||(n=>n&&"number"==typeof n.length);function P(n){return null!==n&&"object"==typeof n}const X=(()=>{function n(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((t,i)=>`${i+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return n.prototype=Object.create(Error.prototype),n})();class oe{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof oe)t.remove(this);else if(null!==t)for(let s=0;se.concat(t instanceof X?t.errors:t),[])}oe.EMPTY=((n=new oe).closed=!0,n);const me="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class ee extends oe{constructor(e,t,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=H;break;case 1:if(!e){this.destination=H;break}if("object"==typeof e){e instanceof ee?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new Z(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new Z(this,e,t,i)}}[me](){return this}static create(e,t,i){const r=new ee(e,t,i);return r.syncErrorThrowable=!1,r}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class Z extends ee{constructor(e,t,i,r){super(),this._parentSubscriber=e;let o,s=this;k(t)?o=t:t&&(o=t.next,i=t.error,r=t.complete,t!==H&&(s=Object.create(t),k(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;B.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:i}=B;if(this._error)i&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)i?(t.syncErrorValue=e,t.syncErrorThrown=!0):G(e),this.unsubscribe();else{if(this.unsubscribe(),i)throw e;G(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);B.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(i){if(this.unsubscribe(),B.useDeprecatedSynchronousErrorHandling)throw i;G(i)}}__tryOrSetError(e,t,i){if(!B.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,i)}catch(r){return B.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):(G(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const j="function"==typeof Symbol&&Symbol.observable||"@@observable";function z(n){return n}function he(...n){return Le(n)}function Le(n){return 0===n.length?z:1===n.length?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}let Se=(()=>{class n{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){const i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){const{operator:o}=this,s=function W(n,e,t){if(n){if(n instanceof ee)return n;if(n[me])return n[me]()}return n||e||t?new ee(n,e,t):new ee(H)}(t,i,r);if(s.add(o?o.call(s,this.source):this.source||B.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),B.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(i){B.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=i),function U(n){for(;n;){const{closed:e,destination:t,isStopped:i}=n;if(e||i)return!1;n=t&&t instanceof ee?t:null}return!0}(t)?t.error(i):console.warn(i)}}forEach(t,i){return new(i=Ee(i))((r,o)=>{let s;s=this.subscribe(a=>{try{t(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(t){const{source:i}=this;return i&&i.subscribe(t)}[j](){return this}pipe(...t){return 0===t.length?this:Le(t)(this)}toPromise(t){return new(t=Ee(t))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=e=>new n(e),n})();function Ee(n){if(n||(n=B.Promise||Promise),!n)throw new Error("no Promise impl found");return n}const ve=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class qe extends oe{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const i=t.indexOf(this.subscriber);-1!==i&&t.splice(i,1)}}class yt extends ee{constructor(e){super(e),this.destination=e}}let se=(()=>{class n extends Se{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[me](){return new yt(this)}lift(t){const i=new Ii(this,this);return i.operator=t,i}next(t){if(this.closed)throw new ve;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew Ii(e,t),n})();class Ii extends se{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):oe.EMPTY}}function vi(n){return n&&"function"==typeof n.schedule}function ue(n,e){return function(i){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Nr(n,e))}}class Nr{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new qi(e,this.project,this.thisArg))}}class qi extends ee{constructor(e,t,i){super(e),this.project=t,this.count=0,this.thisArg=i||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(t)}}const Ri=n=>e=>{for(let t=0,i=n.length;tn&&"number"==typeof n.length&&"function"!=typeof n;function wo(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const Be=n=>{if(n&&"function"==typeof n[j])return(n=>e=>{const t=n[j]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)})(n);if(sa(n))return Ri(n);if(wo(n))return(n=>e=>(n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,G),e))(n);if(n&&"function"==typeof n[bo])return(n=>e=>{const t=n[bo]();for(;;){let i;try{i=t.next()}catch(r){return e.error(r),e}if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof t.return&&e.add(()=>{t.return&&t.return()}),e})(n);{const t=`You provided ${P(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(t)}};function Vt(n,e){return new Se(t=>{const i=new oe;let r=0;return i.add(e.schedule(function(){r!==n.length?(t.next(n[r++]),t.closed||i.add(this.schedule())):t.complete()})),i})}function Pr(n,e){if(null!=n){if(function oi(n){return n&&"function"==typeof n[j]}(n))return function Ft(n,e){return new Se(t=>{const i=new oe;return i.add(e.schedule(()=>{const r=n[j]();i.add(r.subscribe({next(o){i.add(e.schedule(()=>t.next(o)))},error(o){i.add(e.schedule(()=>t.error(o)))},complete(){i.add(e.schedule(()=>t.complete()))}}))})),i})}(n,e);if(wo(n))return function dt(n,e){return new Se(t=>{const i=new oe;return i.add(e.schedule(()=>n.then(r=>{i.add(e.schedule(()=>{t.next(r),i.add(e.schedule(()=>t.complete()))}))},r=>{i.add(e.schedule(()=>t.error(r)))}))),i})}(n,e);if(sa(n))return Vt(n,e);if(function Fi(n){return n&&"function"==typeof n[bo]}(n)||"string"==typeof n)return function xn(n,e){if(!n)throw new Error("Iterable cannot be null");return new Se(t=>{const i=new oe;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(e.schedule(()=>{r=n[bo](),i.add(e.schedule(function(){if(t.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void t.error(a)}s?t.complete():(t.next(o),this.schedule())}))})),i})}(n,e)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}function _t(n,e){return e?Pr(n,e):n instanceof Se?n:new Se(Be(n))}class Vn extends ee{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class Ko extends ee{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function Zl(n,e){if(e.closed)return;if(n instanceof Se)return n.subscribe(e);let t;try{t=Be(n)(e)}catch(i){e.error(i)}return t}function Xn(n,e,t=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(Xn((r,o)=>_t(n(r,o)).pipe(ue((s,a)=>e(r,s,o,a))),t)):("number"==typeof e&&(t=e),i=>i.lift(new ew(n,t)))}class ew{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new tw(e,this.project,this.concurrent))}}class tw extends Ko{constructor(e,t,i=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}const sf=Xn;function $a(n=Number.POSITIVE_INFINITY){return Xn(z,n)}function Wa(n,e){return e?Vt(n,e):new Se(Ri(n))}function ys(...n){let e=Number.POSITIVE_INFINITY,t=null,i=n[n.length-1];return vi(i)?(t=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(e=n.pop())):"number"==typeof i&&(e=n.pop()),null===t&&1===n.length&&n[0]instanceof Se?n[0]:$a(e)(Wa(n,t))}function Jl(){return function(e){return e.lift(new Co(e))}}class Co{constructor(e){this.connectable=e}call(e,t){const{connectable:i}=this;i._refCount++;const r=new Yg(e,i),o=t.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class Yg extends ee{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:i}=this,r=e._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class Pu extends Se{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new oe,e.add(this.source.subscribe(new qg(this.getSubject(),this))),e.closed&&(this._connection=null,e=oe.EMPTY)),e}refCount(){return Jl()(this)}}const nw=(()=>{const n=Pu.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})();class qg extends yt{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}class iw{constructor(e,t){this.subjectFactory=e,this.selector=t}call(e,t){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(e);return o.add(t.subscribe(r)),o}}function la(){return new se}function _n(n){for(let e in n)if(n[e]===_n)return e;throw Error("Could not find renamed property on target object.")}function lf(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function mn(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(mn).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function ca(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const cf=_n({__forward_ref__:_n});function Bt(n){return n.__forward_ref__=Bt,n.toString=function(){return mn(this())},n}function Ke(n){return ua(n)?n():n}function ua(n){return"function"==typeof n&&n.hasOwnProperty(cf)&&n.__forward_ref__===Bt}function uf(n){return n&&!!n.\u0275providers}const Lu="https://g.co/ng/security#xss";class Q extends Error{constructor(e,t){super(function Ru(n,e){return`NG0${Math.abs(n)}${e?": "+e.trim():""}`}(e,t)),this.code=e}}function st(n){return"string"==typeof n?n:null==n?"":String(n)}function Fu(n,e){throw new Q(-201,!1)}function Lr(n,e){null==n&&function Gt(n,e,t,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${t} ${i} ${e} <=Actual]`))}(e,n,null,"!=")}function $(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function wt(n){return{providers:n.providers||[],imports:n.imports||[]}}function ju(n){return Jg(n,Xl)||Jg(n,Xg)}function Jg(n,e){return n.hasOwnProperty(e)?n[e]:null}function Ya(n){return n&&(n.hasOwnProperty(Vu)||n.hasOwnProperty(cw))?n[Vu]:null}const Xl=_n({\u0275prov:_n}),Vu=_n({\u0275inj:_n}),Xg=_n({ngInjectableDef:_n}),cw=_n({ngInjectorDef:_n});var Ze=(()=>((Ze=Ze||{})[Ze.Default=0]="Default",Ze[Ze.Host=1]="Host",Ze[Ze.Self=2]="Self",Ze[Ze.SkipSelf=4]="SkipSelf",Ze[Ze.Optional=8]="Optional",Ze))();let df;function Rr(n){const e=df;return df=n,e}function ty(n,e,t){const i=ju(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:t&Ze.Optional?null:void 0!==e?e:void Fu(mn(n))}const dn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Fr={},hf="__NG_DI_FLAG__",Bu="ngTempTokenPath",hw=/\n/gm,vs="__source";let qa;function Ka(n){const e=qa;return qa=n,e}function Uu(n,e=Ze.Default){if(void 0===qa)throw new Q(-203,!1);return null===qa?ty(n,void 0,e):qa.get(n,e&Ze.Optional?null:void 0,e)}function F(n,e=Ze.Default){return(function ey(){return df}()||Uu)(Ke(n),e)}function vt(n,e=Ze.Default){return F(n,tc(e))}function tc(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function $u(n){const e=[];for(let t=0;t((to=to||{})[to.OnPush=0]="OnPush",to[to.Default=1]="Default",to))(),te=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}(te||(te={})),te))();const Ce={},Ge=[],lt=_n({\u0275cmp:_n}),An=_n({\u0275dir:_n}),ei=_n({\u0275pipe:_n}),fi=_n({\u0275mod:_n}),tn=_n({\u0275fac:_n}),bi=_n({__NG_ELEMENT_ID__:_n});let no=0;function xe(n){return bs(()=>{const t=!0===n.standalone,i={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===to.OnPush,directiveDefs:null,pipeDefs:null,standalone:t,dependencies:t&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||Ge,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||te.Emulated,id:"c"+no++,styles:n.styles||Ge,_:null,setInput:null,schemas:n.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=n.dependencies,s=n.features;return r.inputs=ff(n.inputs,i),r.outputs=ff(n.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(hr).filter(Zo):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(fr).filter(Zo):null,r})}function wi(n,e,t){const i=n.\u0275cmp;i.directiveDefs=()=>("function"==typeof e?e():e).map(hr),i.pipeDefs=()=>("function"==typeof t?t():t).map(fr)}function hr(n){return gn(n)||Ki(n)}function Zo(n){return null!==n}function rt(n){return bs(()=>({type:n.type,bootstrap:n.bootstrap||Ge,declarations:n.declarations||Ge,imports:n.imports||Ge,exports:n.exports||Ge,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function ff(n,e){if(null==n)return Ce;const t={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),t[r]=i,e&&(e[r]=o)}return t}const Me=xe;function Gn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function gn(n){return n[lt]||null}function Ki(n){return n[An]||null}function fr(n){return n[ei]||null}function io(n,e){const t=n[fi]||null;if(!t&&!0===e)throw new Error(`Type ${mn(n)} does not have '\u0275mod' property.`);return t}function ro(n){return Array.isArray(n)&&"object"==typeof n[1]}function Xo(n){return Array.isArray(n)&&!0===n[1]}function yw(n){return 0!=(4&n.flags)}function yf(n){return n.componentOffset>-1}function ay(n){return 1==(1&n.flags)}function es(n){return null!==n.template}function $V(n){return 0!=(256&n[2])}function rc(n,e){return n.hasOwnProperty(tn)?n[tn]:null}class qE{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}}function Ji(){return KE}function KE(n){return n.type.prototype.ngOnChanges&&(n.setInput=qV),YV}function YV(){const n=ZE(this),e=n?.current;if(e){const t=n.previous;if(t===Ce)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function qV(n,e,t,i){const r=this.declaredInputs[t],o=ZE(n)||function KV(n,e){return n[QE]=e}(n,{previous:Ce,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new qE(l&&l.currentValue,e,a===Ce),n[i]=e}Ji.ngInherit=!0;const QE="__ngSimpleChanges__";function ZE(n){return n[QE]||null}function ji(n){for(;Array.isArray(n);)n=n[0];return n}function ly(n,e){return ji(e[n])}function oo(n,e){return ji(e[n.index])}function ex(n,e){return n.data[e]}function Qu(n,e){return n[e]}function so(n,e){const t=e[n];return ro(t)?t:t[0]}function cy(n){return 64==(64&n[2])}function Za(n,e){return null==e?null:n[e]}function tx(n){n[18]=0}function vw(n,e){n[5]+=e;let t=n,i=n[3];for(;null!==i&&(1===e&&1===t[5]||-1===e&&0===t[5]);)i[5]+=e,t=i,i=i[3]}const ht={lFrame:dx(null),bindingsEnabled:!0};function ix(){return ht.bindingsEnabled}function ie(){return ht.lFrame.lView}function Zt(){return ht.lFrame.tView}function ge(n){return ht.lFrame.contextLView=n,n[8]}function ye(n){return ht.lFrame.contextLView=null,n}function zi(){let n=rx();for(;null!==n&&64===n.type;)n=n.parent;return n}function rx(){return ht.lFrame.currentTNode}function Cs(n,e){const t=ht.lFrame;t.currentTNode=n,t.isParent=e}function bw(){return ht.lFrame.isParent}function ww(){ht.lFrame.isParent=!1}function mr(){const n=ht.lFrame;let e=n.bindingRootIndex;return-1===e&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function Zu(){return ht.lFrame.bindingIndex++}function ga(n){const e=ht.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function lB(n,e){const t=ht.lFrame;t.bindingIndex=t.bindingRootIndex=n,Cw(e)}function Cw(n){ht.lFrame.currentDirectiveIndex=n}function lx(){return ht.lFrame.currentQueryIndex}function Mw(n){ht.lFrame.currentQueryIndex=n}function uB(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function cx(n,e,t){if(t&Ze.SkipSelf){let r=e,o=n;for(;!(r=r.parent,null!==r||t&Ze.Host||(r=uB(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;e=r,n=o}const i=ht.lFrame=ux();return i.currentTNode=e,i.lView=n,!0}function Tw(n){const e=ux(),t=n[1];ht.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function ux(){const n=ht.lFrame,e=null===n?null:n.child;return null===e?dx(n):e}function dx(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function hx(){const n=ht.lFrame;return ht.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const fx=hx;function Sw(){const n=hx();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function gr(){return ht.lFrame.selectedIndex}function oc(n){ht.lFrame.selectedIndex=n}function Yn(){const n=ht.lFrame;return ex(n.tView,n.selectedIndex)}function Ew(){ht.lFrame.currentNamespace="svg"}function xw(){!function pB(){ht.lFrame.currentNamespace=null}()}function uy(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t=i)break}else e[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===e){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class vf{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}}function Aw(n,e,t){let i=0;for(;ie){s=o-1;break}}}for(;o>16}(n),i=e;for(;t>0;)i=i[15],t--;return i}let kw=!0;function my(n){const e=kw;return kw=n,e}let CB=0;const Ds={};function gy(n,e){const t=wx(n,e);if(-1!==t)return t;const i=e[1];i.firstCreatePass&&(n.injectorIndex=e.length,Nw(i.data,n),Nw(e,null),Nw(i.blueprint,null));const r=Pw(n,e),o=n.injectorIndex;if(_x(r)){const s=fy(r),a=py(r,e),l=a[1].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function Nw(n,e){n.push(0,0,0,0,0,0,0,0,e)}function wx(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function Pw(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;null!==r;){if(i=xx(r),null===i)return-1;if(t++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|t<<16}return-1}function Lw(n,e,t){!function DB(n,e,t){let i;"string"==typeof t?i=t.charCodeAt(0)||0:t.hasOwnProperty(bi)&&(i=t[bi]),null==i&&(i=t[bi]=CB++);const r=255&i;e.data[n+(r>>5)]|=1<=0?255&e:EB:e}(t);if("function"==typeof o){if(!cx(e,n,i))return i&Ze.Host?Cx(r,0,i):Dx(e,t,i,r);try{const s=o(i);if(null!=s||i&Ze.Optional)return s;Fu()}finally{fx()}}else if("number"==typeof o){let s=null,a=wx(n,e),l=-1,c=i&Ze.Host?e[16][6]:null;for((-1===a||i&Ze.SkipSelf)&&(l=-1===a?Pw(n,e):e[a+8],-1!==l&&Ex(i,!1)?(s=e[1],a=fy(l),e=py(l,e)):a=-1);-1!==a;){const u=e[1];if(Sx(o,a,u.data)){const d=TB(a,e,t,s,i,c);if(d!==Ds)return d}l=e[a+8],-1!==l&&Ex(i,e[1].data[a+8]===c)&&Sx(o,a,e)?(s=u,a=fy(l),e=py(l,e)):a=-1}}return r}function TB(n,e,t,i,r,o){const s=e[1],a=s.data[n+8],u=yy(a,s,t,null==i?yf(a)&&kw:i!=s&&0!=(3&a.type),r&Ze.Host&&o===a);return null!==u?sc(e,s,u,a):Ds}function yy(n,e,t,i,r){const o=n.providerIndexes,s=e.data,a=1048575&o,l=n.directiveStart,u=o>>20,h=r?a+u:n.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===t)return f}if(r){const f=s[l];if(f&&es(f)&&f.type===t)return l}return null}function sc(n,e,t,i){let r=n[t];const o=e.data;if(function _B(n){return n instanceof vf}(r)){const s=r;s.resolving&&function da(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new Q(-200,`Circular dependency in DI detected for ${n}${t}`)}(function Qt(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():st(n)}(o[t]));const a=my(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Rr(s.injectImpl):null;cx(n,i,Ze.Default);try{r=n[t]=s.factory(void 0,o,n,i),e.firstCreatePass&&t>=i.directiveStart&&function gB(n,e,t){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(i){const s=KE(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,s)}r&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,r),o&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o))}(t,o[t],e)}finally{null!==l&&Rr(l),my(a),s.resolving=!1,fx()}}return r}function Sx(n,e,t){return!!(t[e+(n>>5)]&1<{const e=n.prototype.constructor,t=e[tn]||Rw(e),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const o=r[tn]||Rw(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function Rw(n){return ua(n)?()=>{const e=Rw(Ke(n));return e&&e()}:rc(n)}function xx(n){const e=n[1],t=e.type;return 2===t?e.declTNode:1===t?n[6]:null}const td="__parameters__";function id(n,e,t){return bs(()=>{const i=function Fw(n){return function(...t){if(n){const i=n(...t);for(const r in i)this[r]=i[r]}}}(e);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(td)?l[td]:Object.defineProperty(l,td,{value:[]})[td];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class De{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=$({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function ac(n,e){n.forEach(t=>Array.isArray(t)?ac(t,e):e(t))}function Ox(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function vy(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Df(n,e){const t=[];for(let i=0;i=0?n[1|i]=t:(i=~i,function kB(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(1===r)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;)n[r]=n[r-2],r--;n[e]=t,n[e+1]=i}}(n,i,e,t)),i}function zw(n,e){const t=rd(n,e);if(t>=0)return n[1|t]}function rd(n,e){return function Ax(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){const o=i+(r-i>>1),s=n[o<e?r=o:i=o+1}return~(r<({token:n})),-1),Mf=Qa(id("Optional"),8),Tf=Qa(id("SkipSelf"),4);var jr=(()=>((jr=jr||{})[jr.Important=1]="Important",jr[jr.DashCase=2]="DashCase",jr))();const $w=new Map;let eU=0;const Gw="__ngContext__";function Xi(n,e){ro(e)?(n[Gw]=e[20],function nU(n){$w.set(n[20],n)}(e)):n[Gw]=e}function qw(n,e){return undefined(n,e)}function If(n){const e=n[3];return Xo(e)?e[3]:e}function Kw(n){return Zx(n[13])}function Qw(n){return Zx(n[4])}function Zx(n){for(;null!==n&&!Xo(n);)n=n[4];return n}function sd(n,e,t,i,r){if(null!=i){let o,s=!1;Xo(i)?o=i:ro(i)&&(s=!0,i=i[0]);const a=ji(i);0===n&&null!==t?null==r?iI(e,t,a):lc(e,t,a,r||null,!0):1===n&&null!==t?lc(e,t,a,r||null,!0):2===n?function iC(n,e,t){const i=My(n,e);i&&function CU(n,e,t,i){n.removeChild(e,t,i)}(n,i,e,t)}(e,a,s):3===n&&e.destroyNode(a),null!=o&&function TU(n,e,t,i,r){const o=t[7];o!==ji(t)&&sd(e,n,i,o,r);for(let a=10;a0&&(n[t-1][4]=i[4]);const o=vy(n,10+e);!function pU(n,e){Of(n,e,e[11],2,null,null),e[0]=null,e[6]=null}(i[1],i);const s=o[19];null!==s&&s.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-65}return i}function eI(n,e){if(!(128&e[2])){const t=e[11];t.destroyNode&&Of(n,e,t,3,null,null),function yU(n){let e=n[13];if(!e)return eC(n[1],n);for(;e;){let t=null;if(ro(e))t=e[13];else{const i=e[10];i&&(t=i)}if(!t){for(;e&&!e[4]&&e!==n;)ro(e)&&eC(e[1],e),e=e[3];null===e&&(e=n),ro(e)&&eC(e[1],e),t=e&&e[4]}e=t}}(e)}}function eC(n,e){if(!(128&e[2])){e[2]&=-65,e[2]|=128,function wU(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=t[o+1]];t[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=n.data[i.directiveStart+r];if(o===te.None||o===te.Emulated)return null}return oo(i,t)}}(n,e.parent,t)}function lc(n,e,t,i,r){n.insertBefore(e,t,i,r)}function iI(n,e,t){n.appendChild(e,t)}function rI(n,e,t,i,r){null!==i?lc(n,e,t,i,r):iI(n,e,t)}function My(n,e){return n.parentNode(e)}function oI(n,e,t){return aI(n,e,t)}let Ey,sC,xy,aI=function sI(n,e,t){return 40&n.type?oo(n,t):null};function Ty(n,e,t,i){const r=tI(n,i,e),o=e[11],a=oI(i.parent||e[6],i,e);if(null!=r)if(Array.isArray(t))for(let l=0;ln,createScript:n=>n,createScriptURL:n=>n})}catch{}return Ey}()?.createHTML(n)||n}function pI(n){return function aC(){if(void 0===xy&&(xy=null,dn.trustedTypes))try{xy=dn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return xy}()?.createHTML(n)||n}class uc{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Lu})`}}class kU extends uc{getTypeName(){return"HTML"}}class NU extends uc{getTypeName(){return"Style"}}class PU extends uc{getTypeName(){return"Script"}}class LU extends uc{getTypeName(){return"URL"}}class RU extends uc{getTypeName(){return"ResourceURL"}}function lo(n){return n instanceof uc?n.changingThisBreaksApplicationSecurity:n}function Ms(n,e){const t=function FU(n){return n instanceof uc&&n.getTypeName()||null}(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Lu})`)}return t===e}class HU{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const t=(new window.DOMParser).parseFromString(cc(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch{return null}}}class $U{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const i=this.inertDocument.createElement("body");t.appendChild(i)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=cc(e),t;const i=this.inertDocument.createElement("body");return i.innerHTML=cc(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(e){const t=e.attributes;for(let r=t.length-1;0"),!0}endElement(e){const t=e.nodeName.toLowerCase();lC.hasOwnProperty(t)&&!_I.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(CI(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const KU=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,QU=/([^\#-~ |!])/g;function CI(n){return n.replace(/&/g,"&").replace(KU,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(QU,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let Oy;function DI(n,e){let t=null;try{Oy=Oy||function yI(n){const e=new $U(n);return function WU(){try{return!!(new window.DOMParser).parseFromString(cc(""),"text/html")}catch{return!1}}()?new HU(e):e}(n);let i=e?String(e):"";t=Oy.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=t.innerHTML,t=Oy.getInertBodyElement(i)}while(i!==o);return cc((new qU).sanitizeChildren(uC(t)||t))}finally{if(t){const i=uC(t)||t;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function uC(n){return"content"in n&&function ZU(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var kn=(()=>((kn=kn||{})[kn.NONE=0]="NONE",kn[kn.HTML=1]="HTML",kn[kn.STYLE=2]="STYLE",kn[kn.SCRIPT=3]="SCRIPT",kn[kn.URL=4]="URL",kn[kn.RESOURCE_URL=5]="RESOURCE_URL",kn))();function kf(n){const e=Nf();return e?pI(e.sanitize(kn.HTML,n)||""):Ms(n,"HTML")?pI(lo(n)):DI(function fI(){return void 0!==sC?sC:typeof document<"u"?document:void 0}(),st(n))}function Ja(n){const e=Nf();return e?e.sanitize(kn.URL,n)||"":Ms(n,"URL")?lo(n):Iy(st(n))}function Nf(){const n=ie();return n&&n[12]}const Ay=new De("ENVIRONMENT_INITIALIZER"),SI=new De("INJECTOR",-1),EI=new De("INJECTOR_DEF_TYPES");class xI{get(e,t=Fr){if(t===Fr){const i=new Error(`NullInjectorError: No provider for ${mn(e)}!`);throw i.name="NullInjectorError",i}return t}}function r8(...n){return{\u0275providers:II(0,n),\u0275fromNgModule:!0}}function II(n,...e){const t=[],i=new Set;let r;return ac(e,o=>{const s=o;dC(s,t,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&OI(r,t),t}function OI(n,e){for(let t=0;t{e.push(o)})}}function dC(n,e,t,i){if(!(n=Ke(n)))return!1;let r=null,o=Ya(n);const s=!o&&gn(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{const l=n.ngModule;if(o=Ya(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)dC(c,e,t,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{ac(o.imports,u=>{dC(u,e,t,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&OI(c,e)}if(!a){const c=rc(r)||(()=>new r);e.push({provide:r,useFactory:c,deps:Ge},{provide:EI,useValue:r,multi:!0},{provide:Ay,useValue:()=>F(r),multi:!0})}const l=o.providers;null==l||a||hC(l,u=>{e.push(u)})}}return r!==n&&void 0!==n.providers}function hC(n,e){for(let t of n)uf(t)&&(t=t.\u0275providers),Array.isArray(t)?hC(t,e):e(t)}const o8=_n({provide:String,useValue:_n});function fC(n){return null!==n&&"object"==typeof n&&o8 in n}function dc(n){return"function"==typeof n}const pC=new De("Set Injector scope."),ky={},a8={};let mC;function Ny(){return void 0===mC&&(mC=new xI),mC}class Ts{}class NI extends Ts{get destroyed(){return this._destroyed}constructor(e,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,yC(e,s=>this.processProvider(s)),this.records.set(SI,ad(void 0,this)),r.has("environment")&&this.records.set(Ts,ad(void 0,this));const o=this.records.get(pC);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(EI.multi,Ge,Ze.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const t=Ka(this),i=Rr(void 0);try{return e()}finally{Ka(t),Rr(i)}}get(e,t=Fr,i=Ze.Default){this.assertNotDestroyed(),i=tc(i);const r=Ka(this),o=Rr(void 0);try{if(!(i&Ze.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function h8(n){return"function"==typeof n||"object"==typeof n&&n instanceof De}(e)&&ju(e);a=l&&this.injectableDefInScope(l)?ad(gC(e),ky):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(i&Ze.Self?Ny():this.parent).get(e,t=i&Ze.Optional&&t===Fr?null:t)}catch(s){if("NullInjectorError"===s.name){if((s[Bu]=s[Bu]||[]).unshift(mn(e)),r)throw s;return function ny(n,e,t,i){const r=n[Bu];throw e[vs]&&r.unshift(e[vs]),n.message=function pw(n,e,t,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=mn(e);if(Array.isArray(e))r=e.map(mn).join(" -> ");else if("object"==typeof e){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):mn(a)))}r=`{${o.join(", ")}}`}return`${t}${i?"("+i+")":""}[${r}]: ${n.replace(hw,"\n ")}`}("\n"+n.message,r,t,i),n.ngTokenPath=r,n[Bu]=null,n}(s,e,"R3InjectorError",this.source)}throw s}finally{Rr(o),Ka(r)}}resolveInjectorInitializers(){const e=Ka(this),t=Rr(void 0);try{const i=this.get(Ay.multi,Ge,Ze.Self);for(const r of i)r()}finally{Ka(e),Rr(t)}}toString(){const e=[],t=this.records;for(const i of t.keys())e.push(mn(i));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Q(205,!1)}processProvider(e){let t=dc(e=Ke(e))?e:Ke(e&&e.provide);const i=function c8(n){return fC(n)?ad(void 0,n.useValue):ad(PI(n),ky)}(e);if(dc(e)||!0!==e.multi)this.records.get(t);else{let r=this.records.get(t);r||(r=ad(void 0,ky,!0),r.factory=()=>$u(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t){return t.value===ky&&(t.value=a8,t.value=t.factory()),"object"==typeof t.value&&t.value&&function d8(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=Ke(e.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}}function gC(n){const e=ju(n),t=null!==e?e.factory:rc(n);if(null!==t)return t;if(n instanceof De)throw new Q(204,!1);if(n instanceof Function)return function l8(n){const e=n.length;if(e>0)throw Df(e,"?"),new Q(204,!1);const t=function zu(n){const e=n&&(n[Xl]||n[Xg]);if(e){const t=function lw(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new Q(204,!1)}function PI(n,e,t){let i;if(dc(n)){const r=Ke(n);return rc(r)||gC(r)}if(fC(n))i=()=>Ke(n.useValue);else if(function kI(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...$u(n.deps||[]));else if(function AI(n){return!(!n||!n.useExisting)}(n))i=()=>F(Ke(n.useExisting));else{const r=Ke(n&&(n.useClass||n.provide));if(!function u8(n){return!!n.deps}(n))return rc(r)||gC(r);i=()=>new r(...$u(n.deps))}return i}function ad(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function yC(n,e){for(const t of n)Array.isArray(t)?yC(t,e):t&&uf(t)?yC(t.\u0275providers,e):e(t)}class f8{}class LI{}class m8{resolveComponentFactory(e){throw function p8(n){const e=Error(`No component factory found for ${mn(n)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=n,e}(e)}}let hc=(()=>{class n{}return n.NULL=new m8,n})();function g8(){return ld(zi(),ie())}function ld(n,e){return new kt(oo(n,e))}let kt=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=g8,n})();function y8(n){return n instanceof kt?n.nativeElement:n}class Pf{}let Vr=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function _8(){const n=ie(),t=so(zi().index,n);return(ro(t)?t:n)[11]}(),n})(),v8=(()=>{class n{}return n.\u0275prov=$({token:n,providedIn:"root",factory:()=>null}),n})();class cd{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const b8=new cd("15.1.1"),_C={};function bC(n){return n.ngOriginalError}class ud{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e);this._console.error("ERROR",e),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&bC(e);for(;t&&bC(t);)t=bC(t);return t||null}}function FI(n){return n.ownerDocument.defaultView}function jI(n){return n.ownerDocument}function _a(n){return n instanceof Function?n():n}function VI(n,e,t){let i=n.length;for(;;){const r=n.indexOf(e,t);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const o=e.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}t=r+1}}const BI="ng-template";function I8(n,e,t){let i=0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==VI(f,c,0)||2&i&&c!==h){if(ts(i))return!1;s=!0}}}}else{if(!s&&!ts(i)&&!ts(l))return!1;if(s&&ts(l))continue;s=!1,i=l|1&i}}return ts(i)||s}function ts(n){return 0==(1&n)}function k8(n,e,t,i){if(null===e)return-1;let r=0;if(i||!t){let o=!1;for(;r-1)for(t++;t0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!ts(s)&&(e+=$I(o,r),r=""),i=s,o=o||!ts(i);t++}return""!==r&&(e+=$I(o,r)),e}const ft={};function C(n){WI(Zt(),ie(),gr()+n,!1)}function WI(n,e,t,i){if(!i)if(3==(3&e[2])){const o=n.preOrderCheckHooks;null!==o&&dy(e,o,t)}else{const o=n.preOrderHooks;null!==o&&hy(e,o,0,t)}oc(t)}function KI(n,e=null,t=null,i){const r=QI(n,e,t,i);return r.resolveInjectorInitializers(),r}function QI(n,e=null,t=null,i,r=new Set){const o=[t||Ge,r8(n)];return i=i||("object"==typeof n?void 0:mn(n)),new NI(o,e||Ny(),i||null,r)}let yr=(()=>{class n{static create(t,i){if(Array.isArray(t))return KI({name:""},i,t,"");{const r=t.name??"";return KI({name:r},t.parent,t.providers,r)}}}return n.THROW_IF_NOT_FOUND=Fr,n.NULL=new xI,n.\u0275prov=$({token:n,providedIn:"any",factory:()=>F(SI)}),n.__NG_ELEMENT_ID__=-1,n})();function O(n,e=Ze.Default){const t=ie();return null===t?F(n,e):Mx(zi(),t,Ke(n),e)}function rO(n,e){const t=n.contentQueries;if(null!==t)for(let i=0;i22&&WI(n,e,22,!1),t(i,r)}finally{oc(o)}}function EC(n,e,t){if(yw(e)){const r=e.directiveEnd;for(let o=e.directiveStart;o0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(s)!=a&&s.push(a),s.push(t,i,o)}}(n,e,i,Lf(n,t,r.hostVars,ft),r)}function Ss(n,e,t,i,r,o){const s=oo(n,e);!function NC(n,e,t,i,r,o,s){if(null==o)n.removeAttribute(e,r,t);else{const a=null==s?st(o):s(o,i||"",r);n.setAttribute(e,r,a,t)}}(e[11],s,o,n.value,t,i,r)}function DH(n,e,t,i,r,o){const s=o[e];if(null!==s){const a=i.setInput;for(let l=0;l0&&PC(t)}}function PC(n){for(let i=Kw(n);null!==i;i=Qw(i))for(let r=10;r0&&PC(o)}const t=n[1].components;if(null!==t)for(let i=0;i0&&PC(r)}}function xH(n,e){const t=so(e,n),i=t[1];(function IH(n,e){for(let t=e.length;t-1&&(Xw(e,i),vy(t,i))}this._attachedToViewContainer=!1}eI(this._lView[1],this._lView)}onDestroy(e){aO(this._lView[1],this._lView,null,e)}markForCheck(){LC(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){jy(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Q(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function gU(n,e){Of(n,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Q(902,!1);this._appRef=e}}class OH extends Rf{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;jy(e[1],e,e[8],!1)}checkNoChanges(){}get context(){return null}}class _O extends hc{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=gn(e);return new Ff(t,this.ngModule)}}function vO(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}class kH{constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){i=tc(i);const r=this.injector.get(e,_C,i);return r!==_C||t===_C?r:this.parentInjector.get(e,t,i)}}class Ff extends LI{get inputs(){return vO(this.componentDef.inputs)}get outputs(){return vO(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function j8(n){return n.map(F8).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}create(e,t,i,r){let o=(r=r||this.ngModule)instanceof Ts?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new kH(e,o):e,a=s.get(Pf,null);if(null===a)throw new Q(407,!1);const l=s.get(v8,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function lH(n,e,t){return n.selectRootElement(e,t===te.ShadowDom)}(c,i,this.componentDef.encapsulation):Jw(c,u,function AH(n){const e=n.toLowerCase();return"svg"===e?"svg":"math"===e?"math":null}(u)),h=this.componentDef.onPush?288:272,f=OC(0,null,null,1,0,null,null,null,null,null),p=Ly(null,f,null,h,null,null,a,c,l,s,null);let m,g;Tw(p);try{const y=this.componentDef;let v,w=null;y.findHostDirectiveDefs?(v=[],w=new Map,y.findHostDirectiveDefs(y,v,w),v.push(y)):v=[y];const _=function PH(n,e){const t=n[1];return n[22]=e,fd(t,22,2,"#host",null)}(p,d),N=function LH(n,e,t,i,r,o,s,a){const l=r[1];!function RH(n,e,t,i){for(const r of n)e.mergedAttrs=bf(e.mergedAttrs,r.hostAttrs);null!==e.mergedAttrs&&(zy(e,e.mergedAttrs,!0),null!==t&&hI(i,t,e))}(i,n,e,s);const c=o.createRenderer(e,t),u=Ly(r,sO(t),null,t.onPush?32:16,r[n.index],n,o,c,a||null,null,null);return l.firstCreatePass&&kC(l,n,i.length-1),Fy(r,u),r[n.index]=u}(_,d,y,v,p,a,c);g=ex(f,22),d&&function jH(n,e,t,i){if(i)Aw(n,t,["ng-version",b8.full]);else{const{attrs:r,classes:o}=function z8(n){const e=[],t=[];let i=1,r=2;for(;i0&&dI(n,t,o.join(" "))}}(c,y,d,i),void 0!==t&&function zH(n,e,t){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=bf(r.hostAttrs,t=bf(t,r.hostAttrs))}}(i)}function jC(n){return n===Ce?{}:n===Ge?[]:n}function UH(n,e){const t=n.viewQuery;n.viewQuery=t?(i,r)=>{e(i,r),t(i,r)}:e}function HH(n,e){const t=n.contentQueries;n.contentQueries=t?(i,r,o)=>{e(i,r,o),t(i,r,o)}:e}function $H(n,e){const t=n.hostBindings;n.hostBindings=t?(i,r)=>{e(i,r),t(i,r)}:e}let By=null;function fc(){if(!By){const n=dn.Symbol;if(n&&n.iterator)By=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;ts(ji(_[i.index])):i.index;let w=null;if(!s&&a&&(w=function r9(n,e,t,i){const r=n.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,e,r,i.index)),null!==w)(w.__ngLastListenerFn__||w).__ngNextListenerFn__=o,w.__ngLastListenerFn__=o,h=!1;else{o=FO(i,e,u,o,!1);const _=t.listen(g,r,o);d.push(o,_),c&&c.push(r,v,y,y+1)}}else o=FO(i,e,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const m=p.length;if(m)for(let g=0;g-1?so(n.index,e):e);let l=RO(e,0,i,s),c=o.__ngNextListenerFn__;for(;c;)l=RO(e,0,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function M(n=1){return function dB(n){return(ht.lFrame.contextLView=function hB(n,e){for(;n>0;)e=e[15],n--;return e}(n,ht.lFrame.contextLView))[8]}(n)}function o9(n,e){let t=null;const i=function N8(n){const e=n.attrs;if(null!=e){const t=e.indexOf(5);if(!(1&t))return e[t+1]}return null}(n);for(let r=0;r>17&32767}function HC(n){return 2|n}function mc(n){return(131068&n)>>2}function $C(n,e){return-131069&n|e<<2}function WC(n){return 1|n}function YO(n,e,t,i,r){const o=n[t+1],s=null===e;let a=i?Xa(o):mc(o),l=!1;for(;0!==a&&(!1===l||s);){const u=n[a+1];d9(n[a],e)&&(l=!0,n[a+1]=i?WC(u):HC(u)),a=i?Xa(u):mc(u)}l&&(n[t+1]=i?HC(o):WC(o))}function d9(n,e){return null===n||null==e||(Array.isArray(n)?n[1]:n)===e||!(!Array.isArray(n)||"string"!=typeof e)&&rd(n,e)>=0}const Di={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function qO(n){return n.substring(Di.key,Di.keyEnd)}function h9(n){return n.substring(Di.value,Di.valueEnd)}function KO(n,e){const t=Di.textEnd;return t===e?-1:(e=Di.keyEnd=function m9(n,e,t){for(;e32;)e++;return e}(n,Di.key=e,t),Dd(n,e,t))}function QO(n,e){const t=Di.textEnd;let i=Di.key=Dd(n,e,t);return t===i?-1:(i=Di.keyEnd=function g9(n,e,t){let i;for(;e=65&&(-33&i)<=90||i>=48&&i<=57);)e++;return e}(n,i,t),i=JO(n,i,t),i=Di.value=Dd(n,i,t),i=Di.valueEnd=function y9(n,e,t){let i=-1,r=-1,o=-1,s=e,a=s;for(;s32&&(a=s),o=r,r=i,i=-33&l}return a}(n,i,t),JO(n,i,t))}function ZO(n){Di.key=0,Di.keyEnd=0,Di.value=0,Di.valueEnd=0,Di.textEnd=n.length}function Dd(n,e,t){for(;e=0;t=QO(e,t))nA(n,qO(e),h9(e))}function Dn(n){rs(ao,xs,n,!0)}function xs(n,e){for(let t=function f9(n){return ZO(n),KO(n,Dd(n,0,Di.textEnd))}(e);t>=0;t=KO(e,t))ao(n,qO(e),!0)}function is(n,e,t,i){const r=ie(),o=Zt(),s=ga(2);o.firstUpdatePass&&tA(o,n,s,i),e!==ft&&er(r,s,e)&&iA(o,o.data[gr()],r,r[11],n,r[s+1]=function T9(n,e){return null==n||("string"==typeof e?n+=e:"object"==typeof n&&(n=mn(lo(n)))),n}(e,t),i,s)}function rs(n,e,t,i){const r=Zt(),o=ga(2);r.firstUpdatePass&&tA(r,null,o,i);const s=ie();if(t!==ft&&er(s,o,t)){const a=r.data[gr()];if(oA(a,i)&&!eA(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(t=ca(l,t||"")),VC(r,a,s,t,i)}else!function M9(n,e,t,i,r,o,s,a){r===ft&&(r=Ge);let l=0,c=0,u=0=n.expandoStartIndex}function tA(n,e,t,i){const r=n.data;if(null===r[t+1]){const o=r[gr()],s=eA(n,t);oA(o,i)&&null===e&&!s&&(e=!1),e=function v9(n,e,t,i){const r=function Dw(n){const e=ht.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}(n);let o=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(t=Vf(t=GC(null,n,e,t,i),e.attrs,i),o=null);else{const s=e.directiveStylingLast;if(-1===s||n[s]!==r)if(t=GC(r,n,e,t,i),null===o){let l=function b9(n,e,t){const i=t?e.classBindings:e.styleBindings;if(0!==mc(i))return n[Xa(i)]}(n,e,i);void 0!==l&&Array.isArray(l)&&(l=GC(null,n,e,l[1],i),l=Vf(l,e.attrs,i),function w9(n,e,t,i){n[Xa(t?e.classBindings:e.styleBindings)]=i}(n,e,i,l))}else o=function C9(n,e,t){let i;const r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0)&&(c=!0)):u=t,r)if(0!==l){const h=Xa(n[a+1]);n[i+1]=$y(h,a),0!==h&&(n[h+1]=$C(n[h+1],i)),n[a+1]=function a9(n,e){return 131071&n|e<<17}(n[a+1],i)}else n[i+1]=$y(a,0),0!==a&&(n[a+1]=$C(n[a+1],i)),a=i;else n[i+1]=$y(l,0),0===a?a=i:n[l+1]=$C(n[l+1],i),l=i;c&&(n[i+1]=HC(n[i+1])),YO(n,u,i,!0),YO(n,u,i,!1),function u9(n,e,t,i,r){const o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof e&&rd(o,e)>=0&&(t[i+1]=WC(t[i+1]))}(e,u,n,i,o),s=$y(a,l),o?e.classBindings=s:e.styleBindings=s}(r,o,e,t,s,i)}}function GC(n,e,t,i,r){let o=null;const s=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=t[r+1];h===ft&&(h=d?Ge:void 0);let f=d?zw(h,i):u===i?h:void 0;if(c&&!Wy(f)&&(f=zw(l,i)),Wy(f)&&(a=f,s))return a;const p=n[r+1];r=s?Xa(p):mc(p)}if(null!==e){let l=o?e.residualClasses:e.residualStyles;null!=l&&(a=zw(l,i))}return a}function Wy(n){return void 0!==n}function oA(n,e){return 0!=(n.flags&(e?8:16))}function Te(n,e=""){const t=ie(),i=Zt(),r=n+22,o=i.firstCreatePass?fd(i,r,1,e,null):i.data[r],s=t[r]=function Zw(n,e){return n.createText(e)}(t[11],e);Ty(i,t,s,o),Cs(o,!1)}function Ot(n){return Vi("",n,""),Ot}function Vi(n,e,t){const i=ie(),r=function md(n,e,t,i){return er(n,Zu(),t)?e+st(t)+i:ft}(i,n,e,t);return r!==ft&&va(i,gr(),r),Vi}function Gy(n,e,t,i,r){const o=ie(),s=gd(o,n,e,t,i,r);return s!==ft&&va(o,gr(),s),Gy}const Td="en-US";let SA=Td;function KC(n,e,t,i,r){if(n=Ke(n),Array.isArray(n))for(let o=0;o>20;if(dc(n)||!n.multi){const f=new vf(l,r,O),p=ZC(a,e,r?u:u+h,d);-1===p?(Lw(gy(c,s),o,a),QC(o,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(f),s.push(f)):(t[p]=f,s[p]=f)}else{const f=ZC(a,e,u+h,d),p=ZC(a,e,u,u+h),g=p>=0&&t[p];if(r&&!g||!r&&!(f>=0&&t[f])){Lw(gy(c,s),o,a);const y=function H7(n,e,t,i,r){const o=new vf(n,t,O);return o.multi=[],o.index=e,o.componentProviders=0,ZA(o,r,i&&!t),o}(r?U7:B7,t.length,r,i,l);!r&&g&&(t[p].providerFactory=y),QC(o,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(y),s.push(y)}else QC(o,n,f>-1?f:p,ZA(t[r?p:f],l,!r&&i));!r&&i&&g&&t[p].componentProviders++}}}function QC(n,e,t,i){const r=dc(e),o=function s8(n){return!!n.useClass}(e);if(r||o){const l=(o?Ke(e.useClass):e).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){const u=c.indexOf(t);-1===u?c.push(t,[i,l]):c[u+1].push(i,l)}else c.push(t,l)}}}function ZA(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function ZC(n,e,t,i){for(let r=t;r{t.providersResolver=(i,r)=>function V7(n,e,t){const i=Zt();if(i.firstCreatePass){const r=es(n);KC(t,i.data,i.blueprint,r,!0),KC(e,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,e)}}class Sd{}class JA{}class XA extends Sd{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new _O(this);const i=io(e);this._bootstrapComponents=_a(i.bootstrap),this._r3Injector=QI(e,t,[{provide:Sd,useValue:this},{provide:hc,useValue:this.componentFactoryResolver}],mn(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class XC extends JA{constructor(e){super(),this.moduleType=e}create(e){return new XA(this.moduleType,e)}}class W7 extends Sd{constructor(e,t,i){super(),this.componentFactoryResolver=new _O(this),this.instance=null;const r=new NI([...e,{provide:Sd,useValue:this},{provide:hc,useValue:this.componentFactoryResolver}],t||Ny(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function Zy(n,e,t=null){return new W7(n,e,t).injector}let G7=(()=>{class n{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t.id)){const i=II(0,t.type),r=i.length>0?Zy([i],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t.id,r)}return this.cachedInjectors.get(t.id)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=$({token:n,providedIn:"environment",factory:()=>new n(F(Ts))}),n})();function el(n){n.getStandaloneInjector=e=>e.get(G7).getOrCreateStandaloneInjector(n)}function uo(n,e,t){const i=mr()+n,r=ie();return r[i]===ft?Es(r,i,t?e.call(t):e()):jf(r,i)}function xt(n,e,t,i){return lk(ie(),mr(),n,e,t,i)}function Mi(n,e,t,i,r){return function ck(n,e,t,i,r,o,s){const a=e+t;return pc(n,a,r,o)?Es(n,a+2,s?i.call(s,r,o):i(r,o)):Yf(n,a+2)}(ie(),mr(),n,e,t,i,r)}function tl(n,e,t,i,r,o){return function uk(n,e,t,i,r,o,s,a){const l=e+t;return function Hy(n,e,t,i,r){const o=pc(n,e,t,i);return er(n,e+2,r)||o}(n,l,r,o,s)?Es(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):Yf(n,l+3)}(ie(),mr(),n,e,t,i,r,o)}function Gf(n,e,t,i,r,o,s){return function dk(n,e,t,i,r,o,s,a,l){const c=e+t;return To(n,c,r,o,s,a)?Es(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):Yf(n,c+4)}(ie(),mr(),n,e,t,i,r,o,s)}function ak(n,e,t,i){return function hk(n,e,t,i,r,o){let s=e+t,a=!1;for(let l=0;l=0;t--){const i=e[t];if(n===i.name)return i}}(e,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(r,i.onDestroy)):i=t.data[r];const o=i.factory||(i.factory=rc(i.type)),s=Rr(O);try{const a=my(!1),l=o();return my(a),function t9(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}(t,ie(),r,l),l}finally{Rr(s)}}function xo(n,e,t){const i=n+22,r=ie(),o=Qu(r,i);return function qf(n,e){return n[1].data[e].pure}(r,i)?lk(r,mr(),e,o.transform,t,o):o.transform(t)}function tD(n){return e=>{setTimeout(n,void 0,e)}}const re=class c6 extends se{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,i){let r=e,o=t||(()=>null),s=i;if(e&&"object"==typeof e){const l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=tD(o),r&&(r=tD(r)),s&&(s=tD(s)));const a=super.subscribe({next:r,error:o,complete:s});return e instanceof oe&&e.add(a),a}};function u6(){return this._results[fc()]()}class Kf{get changes(){return this._changes||(this._changes=new re)}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=fc(),i=Kf.prototype;i[t]||(i[t]=u6)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){const i=this;i.dirty=!1;const r=function Mo(n){return n.flat(Number.POSITIVE_INFINITY)}(e);(this._changesDetected=!function OB(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=f6,n})();const d6=Io,h6=class extends d6{constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}createEmbeddedView(e,t){const i=this._declarationTContainer.tViews,r=Ly(this._declarationLView,i,e,16,null,i.declTNode,null,null,null,null,t||null);r[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(r[19]=s.createEmbeddedView(i)),SC(i,r,e),new Rf(r)}};function f6(){return Jy(zi(),ie())}function Jy(n,e){return 4&n.type?new h6(e,n,ld(n,e)):null}let Br=(()=>{class n{}return n.__NG_ELEMENT_ID__=p6,n})();function p6(){return mk(zi(),ie())}const m6=Br,fk=class extends m6{constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return ld(this._hostTNode,this._hostLView)}get injector(){return new Xu(this._hostTNode,this._hostLView)}get parentInjector(){const e=Pw(this._hostTNode,this._hostLView);if(_x(e)){const t=py(e,this._hostLView),i=fy(e);return new Xu(t[1].data[i+8],t)}return new Xu(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=pk(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=e.createEmbeddedView(t||{},o);return this.insert(s,r),s}createComponent(e,t,i,r,o){const s=e&&!function Cf(n){return"function"==typeof n}(e);let a;if(s)a=t;else{const d=t||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?e:new Ff(gn(e)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Ts,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(e,t){const i=e._lView,r=i[1];if(function eB(n){return Xo(n[3])}(i)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const d=i[3],h=new fk(d,d[6],d[3]);h.detach(h.indexOf(e))}}const o=this._adjustIndex(t),s=this._lContainer;!function _U(n,e,t,i){const r=10+i,o=t.length;i>0&&(t[r-1][4]=e),i0)i.push(s[a/2]);else{const c=o[a+1],u=e[-l];for(let d=10;d{class n{constructor(t){this.appInits=t,this.resolve=e_,this.reject=e_,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const t=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});t.push(s)}}Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),0===t.length&&i(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(F(t_,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Zf=new De("AppId",{providedIn:"root",factory:function zk(){return`${hD()}${hD()}${hD()}`}});function hD(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Vk=new De("Platform Initializer"),i_=new De("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Bk=new De("appBootstrapListener"),Uk=new De("AnimationModuleType");let B6=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Is=new De("LocaleId",{providedIn:"root",factory:()=>vt(Is,Ze.Optional|Ze.SkipSelf)||function U6(){return typeof $localize<"u"&&$localize.locale||Td}()});class $6{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}let Hk=(()=>{class n{compileModuleSync(t){return new XC(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const i=this.compileModuleSync(t),o=_a(io(t).declarations).reduce((s,a)=>{const l=gn(a);return l&&s.push(new Ff(l)),s},[]);return new $6(i,o)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Y6=(()=>Promise.resolve(0))();function fD(n){typeof Zone>"u"?Y6.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class Jt{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new re(!1),this.onMicrotaskEmpty=new re(!1),this.onStable=new re(!1),this.onError=new re(!1),typeof Zone>"u")throw new Q(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&t,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function q6(){let n=dn.requestAnimationFrame,e=dn.cancelAnimationFrame;if(typeof Zone<"u"&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function Z6(n){const e=()=>{!function Q6(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(dn,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,mD(n),n.isCheckStableRunning=!0,pD(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),mD(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,i,r,o,s,a)=>{try{return Gk(n),t.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&e(),Yk(n)}},onInvoke:(t,i,r,o,s,a,l)=>{try{return Gk(n),t.invoke(r,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),Yk(n)}},onHasTask:(t,i,r,o)=>{t.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,mD(n),pD(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,i,r,o)=>(t.handleError(r,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Jt.isInAngularZone())throw new Q(909,!1)}static assertNotInAngularZone(){if(Jt.isInAngularZone())throw new Q(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,K6,e_,e_);try{return o.runTask(s,t,i)}finally{o.cancelTask(s)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}}const K6={};function pD(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function mD(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function Gk(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function Yk(n){n._nesting--,pD(n)}class J6{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new re,this.onMicrotaskEmpty=new re,this.onStable=new re,this.onError=new re}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}}const qk=new De(""),r_=new De("");let _D,gD=(()=>{class n{constructor(t,i,r){this._ngZone=t,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,_D||(function X6(n){_D=n}(r),r.addToWindow(i)),this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Jt.assertNotInAngularZone(),fD(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())fD(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(t)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),t(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:t,timeoutId:o,updateCb:r})}whenStable(t,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,i,r){return[]}}return n.\u0275fac=function(t){return new(t||n)(F(Jt),F(yD),F(r_))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),yD=(()=>{class n{constructor(){this._applications=new Map}registerApplication(t,i){this._applications.set(t,i)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,i=!0){return _D?.findTestabilityInTree(this,t,i)??null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),nl=null;const Kk=new De("AllowMultipleToken"),vD=new De("PlatformDestroyListeners");class Qk{constructor(e,t){this.name=e,this.token=t}}function Jk(n,e,t=[]){const i=`Platform: ${e}`,r=new De(i);return(o=[])=>{let s=bD();if(!s||s.injector.get(Kk,!1)){const a=[...t,...o,{provide:r,useValue:!0}];n?n(a):function n$(n){if(nl&&!nl.get(Kk,!1))throw new Q(400,!1);nl=n;const e=n.get(eN);(function Zk(n){const e=n.get(Vk,null);e&&e.forEach(t=>t())})(n)}(function Xk(n=[],e){return yr.create({name:e,providers:[{provide:pC,useValue:"platform"},{provide:vD,useValue:new Set([()=>nl=null])},...n]})}(a,i))}return function r$(n){const e=bD();if(!e)throw new Q(401,!1);return e}()}}function bD(){return nl?.get(eN)??null}let eN=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,i){const r=function nN(n,e){let t;return t="noop"===n?new J6:("zone.js"===n?void 0:n)||new Jt(e),t}(i?.ngZone,function tN(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:Jt,useValue:r}];return r.run(()=>{const s=yr.create({providers:o,parent:this.injector,name:t.moduleType.name}),a=t.create(s),l=a.injector.get(ud,null);if(!l)throw new Q(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{o_(this._modules,a),c.unsubscribe()})}),function iN(n,e,t){try{const i=t();return zf(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(n_);return c.runInitializers(),c.donePromise.then(()=>(function EA(n){Lr(n,"Expected localeId to be defined"),"string"==typeof n&&(SA=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Is,Td)||Td),this._moduleDoBootstrap(a),a))})})}bootstrapModule(t,i=[]){const r=rN({},i);return function e$(n,e,t){const i=new XC(t);return Promise.resolve(i)}(0,0,t).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(t){const i=t.injector.get(_c);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new Q(-403,!1);t.instance.ngDoBootstrap(i)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Q(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const t=this._injector.get(vD,null);t&&(t.forEach(i=>i()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(F(yr))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function rN(n,e){return Array.isArray(e)?e.reduce(rN,n):{...n,...e}}let _c=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(t,i,r){this._zone=t,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new Se(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new Se(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{Jt.assertNotInAngularZone(),fD(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{Jt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=ys(o,s.pipe(function Zg(){return n=>Jl()(function Qg(n,e){return function(i){let r;if(r="function"==typeof n?n:function(){return n},"function"==typeof e)return i.lift(new iw(r,e));const o=Object.create(i,nw);return o.source=i,o.subjectFactory=r,o}}(la)(n))}()))}bootstrap(t,i){const r=t instanceof LI;if(!this._injector.get(n_).done)throw!r&&function Wu(n){const e=gn(n)||Ki(n)||fr(n);return null!==e&&e.standalone}(t),new Q(405,false);let s;s=r?t:this._injector.get(hc).resolveComponentFactory(t),this.componentTypes.push(s.componentType);const a=function t$(n){return n.isBoundToModule}(s)?void 0:this._injector.get(Sd),c=s.create(yr.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(qk,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),o_(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new Q(101,!1);try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){const i=t;o_(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const i=this._injector.get(Bk,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>o_(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new Q(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(t){return new(t||n)(F(Jt),F(Ts),F(ud))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function o_(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}let Kn=(()=>{class n{}return n.__NG_ELEMENT_ID__=a$,n})();function a$(n){return function l$(n,e,t){if(yf(n)&&!t){const i=so(n.index,e);return new Rf(i,i)}return 47&n.type?new Rf(e[16],e):null}(zi(),ie(),16==(16&n))}class cN{constructor(){}supports(e){return Uy(e)}create(e){return new p$(e)}}const f$=(n,e)=>e;class p${constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||f$}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,o=null;for(;t||i;){const s=!i||t&&t.currentIndex{s=this._trackByFn(r,a),null!==t&&Object.is(t.trackById,s)?(i&&(t=this._verifyReinsertion(t,a,s,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,s,r),i=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let o;return null===e?o=this._itTail:(o=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,r)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,r)):e=this._addAfter(new m$(t,i),o,r),e}_verifyReinsertion(e,t,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?e=this._reinsertAfter(o,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const r=e._prevRemoved,o=e._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){const r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new uN),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,i=e._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new uN),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class m${constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class g${constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){const t=e._prevDup,i=e._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}}class uN{constructor(){this.map=new Map}put(e){const t=e.trackById;let i=this.map.get(t);i||(i=new g$,this.map.set(t,i)),i.add(e)}get(e,t){const r=this.map.get(e);return r?r.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function dN(n,e,t){const i=n.previousIndex;if(null===i)return i;let r=0;return t&&i{if(t&&t.key===r)this._maybeAddToChanges(t,i),this._appendAfter=t,t=t._next;else{const o=this._getOrCreateRecordForKey(r,i);t=this._insertBeforeOrAppend(t,o)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let i=t;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const r=this._records.get(e);this._maybeAddToChanges(r,t);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new _$(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(i=>t(e[i],i))}}class _${constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function fN(){return new l_([new cN])}let l_=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(null!=i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||fN()),deps:[[n,new Tf,new Mf]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(null!=i)return i;throw new Q(901,!1)}}return n.\u0275prov=$({token:n,providedIn:"root",factory:fN}),n})();function pN(){return new Jf([new hN])}let Jf=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||pN()),deps:[[n,new Tf,new Mf]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(i)return i;throw new Q(901,!1)}}return n.\u0275prov=$({token:n,providedIn:"root",factory:pN}),n})();const w$=Jk(null,"core",[]);let C$=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(F(_c))},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({}),n})();let TD=null;function Os(){return TD}class S${}const Nn=new De("DocumentToken");let SD=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return function E$(){return F(mN)}()},providedIn:"platform"}),n})();const x$=new De("Location Initialized");let mN=(()=>{class n extends SD{constructor(t){super(),this._doc=t,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Os().getBaseHref(this._doc)}onPopState(t){const i=Os().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){const i=Os().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",t,!1),()=>i.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,i,r){gN()?this._history.pushState(t,i,r):this._location.hash=r}replaceState(t,i,r){gN()?this._history.replaceState(t,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:function(){return function I$(){return new mN(F(Nn))}()},providedIn:"platform"}),n})();function gN(){return!!window.history.pushState}function ED(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function yN(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function wa(n){return n&&"?"!==n[0]?"?"+n:n}let bc=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return vt(vN)},providedIn:"root"}),n})();const _N=new De("appBaseHref");let vN=(()=>{class n extends bc{constructor(t,i){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??vt(Nn).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return ED(this._baseHref,t)}path(t=!1){const i=this._platformLocation.pathname+wa(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${i}${r}`:i}pushState(t,i,r,o){const s=this.prepareExternalUrl(r+wa(o));this._platformLocation.pushState(t,i,s)}replaceState(t,i,r,o){const s=this.prepareExternalUrl(r+wa(o));this._platformLocation.replaceState(t,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}}return n.\u0275fac=function(t){return new(t||n)(F(SD),F(_N,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),O$=(()=>{class n extends bc{constructor(t,i){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(t){const i=ED(this._baseHref,t);return i.length>0?"#"+i:i}pushState(t,i,r,o){let s=this.prepareExternalUrl(r+wa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,i,s)}replaceState(t,i,r,o){let s=this.prepareExternalUrl(r+wa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}}return n.\u0275fac=function(t){return new(t||n)(F(SD),F(_N,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),xD=(()=>{class n{constructor(t){this._subject=new re,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const i=this._locationStrategy.getBaseHref();this._basePath=function N$(n){if(new RegExp("^(https?:)?//").test(n)){const[,t]=n.split(/\/\/[^\/]+/);return t}return n}(yN(bN(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,i=""){return this.path()==this.normalize(t+wa(i))}normalize(t){return n.stripTrailingSlash(function k$(n,e){return n&&new RegExp(`^${n}([/;?#]|$)`).test(e)?e.substring(n.length):e}(this._basePath,bN(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,i="",r=null){this._locationStrategy.pushState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+wa(i)),r)}replaceState(t,i="",r=null){this._locationStrategy.replaceState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+wa(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",i){this._urlChangeListeners.forEach(r=>r(t,i))}subscribe(t,i,r){return this._subject.subscribe({next:t,error:i,complete:r})}}return n.normalizeQueryParams=wa,n.joinWithSlash=ED,n.stripTrailingSlash=yN,n.\u0275fac=function(t){return new(t||n)(F(bc))},n.\u0275prov=$({token:n,factory:function(){return function A$(){return new xD(F(bc))}()},providedIn:"root"}),n})();function bN(n){return n.replace(/\/index.html$/,"")}function IN(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const i=t.indexOf("="),[r,o]=-1==i?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}const jD=/\s+/,ON=[];let yi=(()=>{class n{constructor(t,i,r,o){this._iterableDiffers=t,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=ON,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(jD):ON}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(jD):t}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const i of t)this._updateState(i,!0);else if(null!=t)for(const i of Object.keys(t))this._updateState(i,Boolean(t[i]));this._applyStateDiff()}_updateState(t,i){const r=this.stateMap.get(t);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(t,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const i=t[0],r=t[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(t,i){(t=t.trim()).length>0&&t.split(jD).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(t){return new(t||n)(O(l_),O(Jf),O(kt),O(Vr))},n.\u0275dir=Me({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class yW{constructor(e,t,i,r){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Hr=(()=>{class n{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,i,r){this._viewContainer=t,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const i=this._viewContainer;t.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new yW(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),NN(a,r)}});for(let r=0,o=i.length;r{NN(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(O(Br),O(Io),O(l_))},n.\u0275dir=Me({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function NN(n,e){n.context.$implicit=e.item}let nn=(()=>{class n{constructor(t,i){this._viewContainer=t,this._context=new vW,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){PN("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){PN("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(O(Br),O(Io))},n.\u0275dir=Me({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class vW{constructor(){this.$implicit=null,this.ngIf=null}}function PN(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${mn(e)}'.`)}class zD{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}let Od=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews.push(t)}_matchCase(t){const i=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(t){if(this._defaultViews.length>0&&t!==this._defaultUsed){this._defaultUsed=t;for(const i of this._defaultViews)i.enforceState(t)}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Me({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),__=(()=>{class n{constructor(t,i,r){this.ngSwitch=r,r._addCase(),this._view=new zD(t,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(t){return new(t||n)(O(Br),O(Io),O(Od,9))},n.\u0275dir=Me({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),v_=(()=>{class n{constructor(t,i,r){r._addDefault(new zD(t,i))}}return n.\u0275fac=function(t){return new(t||n)(O(Br),O(Io),O(Od,9))},n.\u0275dir=Me({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),wr=(()=>{class n{constructor(t,i,r){this._ngEl=t,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,i){const[r,o]=t.split("."),s=-1===r.indexOf("-")?void 0:jr.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(t){t.forEachRemovedItem(i=>this._setStyle(i.key,null)),t.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),t.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(Jf),O(Vr))},n.\u0275dir=Me({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),ko=(()=>{class n{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(t.ngTemplateOutlet||t.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&t.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(t){return new(t||n)(O(Br))},n.\u0275dir=Me({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Ji]}),n})();function ls(n,e){return new Q(2100,!1)}class wW{createSubscription(e,t){return e.subscribe({next:t,error:i=>{throw i}})}dispose(e){e.unsubscribe()}}class CW{createSubscription(e,t){return e.then(t,i=>{throw i})}dispose(e){}}const DW=new CW,MW=new wW;let VD=(()=>{class n{constructor(t){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,i=>this._updateLatestValue(t,i))}_selectStrategy(t){if(zf(t))return DW;if(NO(t))return MW;throw ls()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,i){t===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(t){return new(t||n)(O(Kn,16))},n.\u0275pipe=Gn({name:"async",type:n,pure:!1,standalone:!0}),n})(),BD=(()=>{class n{transform(t){if(null==t)return null;if("string"!=typeof t)throw ls();return t.toLowerCase()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=Gn({name:"lowercase",type:n,pure:!0,standalone:!0}),n})();const TW=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;let RN=(()=>{class n{transform(t){if(null==t)return null;if("string"!=typeof t)throw ls();return t.replace(TW,i=>i[0].toUpperCase()+i.slice(1).toLowerCase())}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=Gn({name:"titlecase",type:n,pure:!0,standalone:!0}),n})(),zn=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({}),n})();const jN="browser";let $W=(()=>{class n{}return n.\u0275prov=$({token:n,providedIn:"root",factory:()=>new WW(F(Nn),window)}),n})();class WW{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const t=function GW(n,e){const t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,e);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),i=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=zN(this.window.history)||zN(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function zN(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class VN{}class vG extends S${constructor(){super(...arguments),this.supportsDOMEvents=!0}}class GD extends vG{static makeCurrent(){!function T$(n){TD||(TD=n)}(new GD)}onAndCancel(e,t,i){return e.addEventListener(t,i,!1),()=>{e.removeEventListener(t,i,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function bG(){return np=np||document.querySelector("base"),np?np.getAttribute("href"):null}();return null==t?null:function wG(n){w_=w_||document.createElement("a"),w_.setAttribute("href",n);const e=w_.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){np=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return IN(document.cookie,e)}}let w_,np=null;const GN=new De("TRANSITION_ID"),DG=[{provide:t_,useFactory:function CG(n,e,t){return()=>{t.get(n_).donePromise.then(()=>{const i=Os(),r=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const C_=new De("EventManagerPlugins");let D_=(()=>{class n{constructor(t,i){this._zone=i,this._eventNameToPlugin=new Map,t.forEach(r=>r.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,i,r){return this._findPluginFor(i).addEventListener(t,i,r)}addGlobalEventListener(t,i,r){return this._findPluginFor(i).addGlobalEventListener(t,i,r)}getZone(){return this._zone}_findPluginFor(t){const i=this._eventNameToPlugin.get(t);if(i)return i;const r=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(t){const i=new Set;t.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),ip=(()=>{class n extends qN{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,i,r){t.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}addHost(t){const i=[];this._addStylesToHost(this._stylesSet,t,i),this._hostNodes.set(t,i)}removeHost(t){const i=this._hostNodes.get(t);i&&i.forEach(KN),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(t,r,i)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(KN))}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function KN(n){Os().remove(n)}const YD={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},qD=/%COMP%/g;function KD(n,e){return e.flat(100).map(t=>t.replace(qD,n))}function JN(n){return e=>{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let M_=(()=>{class n{constructor(t,i,r){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new QD(t)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;switch(i.encapsulation){case te.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new AG(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(t),r}case te.ShadowDom:return new kG(this.eventManager,this.sharedStylesHost,t,i);default:if(!this.rendererByCompId.has(i.id)){const r=KD(i.id,i.styles);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(F(D_),F(ip),F(Zf))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class QD{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(YD[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){(eP(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(eP(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let i="string"==typeof e?document.querySelector(e):e;if(!i)throw new Error(`The selector "${e}" did not match any elements`);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;const o=YD[r];o?e.setAttributeNS(o,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){const r=YD[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(jr.DashCase|jr.Important)?e.style.setProperty(t,i,r&jr.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&jr.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e[t]=i}setValue(e,t){e.nodeValue=t}listen(e,t,i){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,JN(i)):this.eventManager.addEventListener(e,t,JN(i))}}function eP(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class AG extends QD{constructor(e,t,i,r){super(e),this.component=i;const o=KD(r+"-"+i.id,i.styles);t.addStyles(o),this.contentAttr=function xG(n){return"_ngcontent-%COMP%".replace(qD,n)}(r+"-"+i.id),this.hostAttr=function IG(n){return"_nghost-%COMP%".replace(qD,n)}(r+"-"+i.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}}class kG extends QD{constructor(e,t,i,r){super(e),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=KD(r.id,r.styles);for(let s=0;s{class n extends YN{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r){return t.addEventListener(i,r,!1),()=>this.removeEventListener(t,i,r)}removeEventListener(t,i,r){return t.removeEventListener(i,r)}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const tP=["alt","control","meta","shift"],PG={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},LG={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let RG=(()=>{class n extends YN{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,i,r){const o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Os().onAndCancel(t,o.domEventName,s))}static parseEventName(t){const i=t.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=n._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),tP.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(t,i){let r=PG[t.key]||t.key,o="";return i.indexOf("code.")>-1&&(r=t.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),tP.forEach(s=>{s!==r&&(0,LG[s])(t)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(t,i,r){return o=>{n.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>i(o))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const iP=[{provide:i_,useValue:jN},{provide:Vk,useValue:function FG(){GD.makeCurrent()},multi:!0},{provide:Nn,useFactory:function zG(){return function AU(n){sC=n}(document),document},deps:[]}],VG=Jk(w$,"browser",iP),rP=new De(""),oP=[{provide:r_,useClass:class MG{addToWindow(e){dn.getAngularTestability=(i,r=!0)=>{const o=e.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},dn.getAllAngularTestabilities=()=>e.getAllTestabilities(),dn.getAllAngularRootElements=()=>e.getAllRootElements(),dn.frameworkStabilizers||(dn.frameworkStabilizers=[]),dn.frameworkStabilizers.push(i=>{const r=dn.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,i){return null==t?null:e.getTestability(t)??(i?Os().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null)}},deps:[]},{provide:qk,useClass:gD,deps:[Jt,yD,r_]},{provide:gD,useClass:gD,deps:[Jt,yD,r_]}],sP=[{provide:pC,useValue:"root"},{provide:ud,useFactory:function jG(){return new ud},deps:[]},{provide:C_,useClass:NG,multi:!0,deps:[Nn,Jt,i_]},{provide:C_,useClass:RG,multi:!0,deps:[Nn]},{provide:M_,useClass:M_,deps:[D_,ip,Zf]},{provide:Pf,useExisting:M_},{provide:qN,useExisting:ip},{provide:ip,useClass:ip,deps:[Nn]},{provide:D_,useClass:D_,deps:[C_,Jt]},{provide:VN,useClass:TG,deps:[]},[]];let aP=(()=>{class n{constructor(t){}static withServerTransition(t){return{ngModule:n,providers:[{provide:Zf,useValue:t.appId},{provide:GN,useExisting:Zf},DG]}}}return n.\u0275fac=function(t){return new(t||n)(F(rP,12))},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({providers:[...sP,...oP],imports:[zn,C$]}),n})(),lP=(()=>{class n{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:function(t){let i=null;return i=t?new t:function UG(){return new lP(F(Nn))}(),i},providedIn:"root"}),n})();typeof window<"u"&&window;let XD=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(t){let i=null;return i=t?new(t||n):F(eM),i},providedIn:"root"}),n})(),eM=(()=>{class n extends XD{constructor(t){super(),this._doc=t}sanitize(t,i){if(null==i)return null;switch(t){case kn.NONE:return i;case kn.HTML:return Ms(i,"HTML")?lo(i):DI(this._doc,String(i)).toString();case kn.STYLE:return Ms(i,"Style")?lo(i):i;case kn.SCRIPT:if(Ms(i,"Script"))return lo(i);throw new Error("unsafe value used in a script context");case kn.URL:return Ms(i,"URL")?lo(i):Iy(String(i));case kn.RESOURCE_URL:if(Ms(i,"ResourceURL"))return lo(i);throw new Error(`unsafe value used in a resource URL context (see ${Lu})`);default:throw new Error(`Unexpected SecurityContext ${t} (see ${Lu})`)}}bypassSecurityTrustHtml(t){return function jU(n){return new kU(n)}(t)}bypassSecurityTrustStyle(t){return function zU(n){return new NU(n)}(t)}bypassSecurityTrustScript(t){return function VU(n){return new PU(n)}(t)}bypassSecurityTrustUrl(t){return function BU(n){return new LU(n)}(t)}bypassSecurityTrustResourceUrl(t){return function UU(n){return new RU(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(F(Nn))},n.\u0275prov=$({token:n,factory:function(t){let i=null;return i=t?new t:function KG(n){return new eM(n.get(Nn))}(F(yr)),i},providedIn:"root"}),n})();function Re(...n){let e=n[n.length-1];return vi(e)?(n.pop(),Vt(n,e)):Wa(n)}function rl(n,e){return Xn(n,e,1)}function Un(n,e){return function(i){return i.lift(new QG(n,e))}}class QG{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new ZG(e,this.predicate,this.thisArg))}}class ZG extends ee{constructor(e,t,i){super(e),this.predicate=t,this.thisArg=i,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(i){return void this.destination.error(i)}t&&this.destination.next(e)}}class T_{}class tM{}class Cr{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(t=>{const i=t.indexOf(":");if(i>0){const r=t.slice(0,i),o=r.toLowerCase(),s=t.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(t=>{let i=e[t];const r=t.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(t,r))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof Cr?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){const t=new Cr;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof Cr?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(e.name,t);const r=("a"===e.op?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":const o=e.value;if(o){let s=this.headers.get(t);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class JG{encodeKey(e){return dP(e)}encodeValue(e){return dP(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const eY=/%(\d[a-f0-9])/gi,tY={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function dP(n){return encodeURIComponent(n).replace(eY,(e,t)=>tY[t]??e)}function S_(n){return`${n}`}class cs{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new JG,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function XG(n,e){const t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const i=e.fromObject[t],r=Array.isArray(i)?i.map(S_):[S_(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){const t=[];return Object.keys(e).forEach(i=>{const r=e[i];Array.isArray(r)?r.forEach(o=>{t.push({param:i,value:o,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new cs({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(S_(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let i=this.map.get(e.param)||[];const r=i.indexOf(S_(e.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class nY{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function hP(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function fP(n){return typeof Blob<"u"&&n instanceof Blob}function pP(n){return typeof FormData<"u"&&n instanceof FormData}class Da{constructor(e,t,i,r){let o;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function iY(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Cr),this.context||(this.context=new nY),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=t;else{const a=t.indexOf("?");this.urlWithParams=t+(-1===a?"?":ad.set(h,e.setHeaders[h]),l)),e.setParams&&(c=Object.keys(e.setParams).reduce((d,h)=>d.set(h,e.setParams[h]),c)),new Da(t,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var In=(()=>((In=In||{})[In.Sent=0]="Sent",In[In.UploadProgress=1]="UploadProgress",In[In.ResponseHeader=2]="ResponseHeader",In[In.DownloadProgress=3]="DownloadProgress",In[In.Response=4]="Response",In[In.User=5]="User",In))();class nM{constructor(e,t=200,i="OK"){this.headers=e.headers||new Cr,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class iM extends nM{constructor(e={}){super(e),this.type=In.ResponseHeader}clone(e={}){return new iM({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class E_ extends nM{constructor(e={}){super(e),this.type=In.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new E_({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class mP extends nM{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${e.url||"(unknown url)"}`:`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function rM(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let tr=(()=>{class n{constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof Da)o=t;else{let l,c;l=r.headers instanceof Cr?r.headers:new Cr(r.headers),r.params&&(c=r.params instanceof cs?r.params:new cs({fromObject:r.params})),o=new Da(t,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=Re(o).pipe(rl(l=>this.handler.handle(l)));if(t instanceof Da||"events"===r.observe)return s;const a=s.pipe(Un(l=>l instanceof E_));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(ue(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(ue(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(ue(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(ue(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:(new cs).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,rM(r,i))}post(t,i,r={}){return this.request("POST",t,rM(r,i))}put(t,i,r={}){return this.request("PUT",t,rM(r,i))}}return n.\u0275fac=function(t){return new(t||n)(F(T_))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function gP(n,e){return e(n)}function oY(n,e){return(t,i)=>e.intercept(t,{handle:r=>n(r,i)})}const aY=new De("HTTP_INTERCEPTORS"),rp=new De("HTTP_INTERCEPTOR_FNS");function lY(){let n=null;return(e,t)=>(null===n&&(n=(vt(aY,{optional:!0})??[]).reduceRight(oY,gP)),n(e,t))}let yP=(()=>{class n extends T_{constructor(t,i){super(),this.backend=t,this.injector=i,this.chain=null}handle(t){if(null===this.chain){const i=Array.from(new Set(this.injector.get(rp)));this.chain=i.reduceRight((r,o)=>function sY(n,e,t){return(i,r)=>t.runInContext(()=>e(i,o=>n(o,r)))}(r,o,this.injector),gP)}return this.chain(t,i=>this.backend.handle(i))}}return n.\u0275fac=function(t){return new(t||n)(F(tM),F(Ts))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const hY=/^\)\]\}',?\n/;let vP=(()=>{class n{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Se(i=>{const r=this.xhrFactory.build();if(r.open(t.method,t.urlWithParams),t.withCredentials&&(r.withCredentials=!0),t.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),t.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const f=t.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(t.responseType){const f=t.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=t.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Cr(r.getAllResponseHeaders()),m=function fY(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||t.url;return s=new iM({headers:p,status:r.status,statusText:f,url:m}),s},l=()=>{let{headers:f,status:p,statusText:m,url:g}=a(),y=null;204!==p&&(y=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=y?200:0);let v=p>=200&&p<300;if("json"===t.responseType&&"string"==typeof y){const w=y;y=y.replace(hY,"");try{y=""!==y?JSON.parse(y):null}catch(_){y=w,v&&(v=!1,y={error:_,text:y})}}v?(i.next(new E_({body:y,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new mP({error:y,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new mP({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(m)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:In.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===t.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:In.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),t.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:In.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),t.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(t){return new(t||n)(F(VN))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const oM=new De("XSRF_ENABLED"),bP="XSRF-TOKEN",wP=new De("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>bP}),CP="X-XSRF-TOKEN",DP=new De("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>CP});class MP{}let pY=(()=>{class n{constructor(t,i,r){this.doc=t,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=IN(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return n.\u0275fac=function(t){return new(t||n)(F(Nn),F(i_),F(wP))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function mY(n,e){const t=n.url.toLowerCase();if(!vt(oM)||"GET"===n.method||"HEAD"===n.method||t.startsWith("http://")||t.startsWith("https://"))return e(n);const i=vt(MP).getToken(),r=vt(DP);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),e(n)}var li=(()=>((li=li||{})[li.Interceptors=0]="Interceptors",li[li.LegacyInterceptors=1]="LegacyInterceptors",li[li.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",li[li.NoXsrfProtection=3]="NoXsrfProtection",li[li.JsonpSupport=4]="JsonpSupport",li[li.RequestsMadeViaParent=5]="RequestsMadeViaParent",li))();function Ad(n,e){return{\u0275kind:n,\u0275providers:e}}function gY(...n){const e=[tr,vP,yP,{provide:T_,useExisting:yP},{provide:tM,useExisting:vP},{provide:rp,useValue:mY,multi:!0},{provide:oM,useValue:!0},{provide:MP,useClass:pY}];for(const t of n)e.push(...t.\u0275providers);return function i8(n){return{\u0275providers:n}}(e)}const TP=new De("LEGACY_INTERCEPTOR_FN");function _Y({cookieName:n,headerName:e}){const t=[];return void 0!==n&&t.push({provide:wP,useValue:n}),void 0!==e&&t.push({provide:DP,useValue:e}),Ad(li.CustomXsrfConfiguration,t)}let sM=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({providers:[gY(Ad(li.LegacyInterceptors,[{provide:TP,useFactory:lY},{provide:rp,useExisting:TP,multi:!0}]),_Y({cookieName:bP,headerName:CP}))]}),n})();class vY extends oe{constructor(e,t){super()}schedule(e,t=0){return this}}class x_ extends vY{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this}requestAsyncId(e,t,i=0){return setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,t,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(e,t);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let r,i=!1;try{this.work(e)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const e=this.id,t=this.scheduler,i=t.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}let SP=(()=>{class n{constructor(t,i=n.now){this.SchedulerAction=t,this.now=i}schedule(t,i=0,r){return new this.SchedulerAction(this,t).schedule(r,i)}}return n.now=()=>Date.now(),n})();class us extends SP{constructor(e,t=SP.now){super(e,()=>us.delegate&&us.delegate!==this?us.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,i){return us.delegate&&us.delegate!==this?us.delegate.schedule(e,t,i):super.schedule(e,t,i)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let i;this.active=!0;do{if(i=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,i){for(;e=t.shift();)e.unsubscribe();throw i}}}const aM=new class wY extends us{}(class bY extends x_{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(e,t,i):e.flush(this)}}),CY=aM,ol=new Se(n=>n.complete());function I_(n){return n?function DY(n){return new Se(e=>n.schedule(()=>e.complete()))}(n):ol}function ho(n,e){return new Se(e?t=>e.schedule(MY,0,{error:n,subscriber:t}):t=>t.error(n))}function MY({error:n,subscriber:e}){e.error(n)}class No{constructor(e,t,i){this.kind=e,this.value=t,this.error=i,this.hasValue="N"===e}observe(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}do(e,t,i){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return i&&i()}}accept(e,t,i){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,i)}toObservable(){switch(this.kind){case"N":return Re(this.value);case"E":return ho(this.error);case"C":return I_()}throw new Error("unexpected notification kind value")}static createNext(e){return typeof e<"u"?new No("N",e):No.undefinedValueNotification}static createError(e){return new No("E",void 0,e)}static createComplete(){return No.completeNotification}}No.completeNotification=new No("C"),No.undefinedValueNotification=new No("N",void 0);class SY{constructor(e,t=0){this.scheduler=e,this.delay=t}call(e,t){return t.subscribe(new O_(e,this.scheduler,this.delay))}}class O_ extends ee{constructor(e,t,i=0){super(e),this.scheduler=t,this.delay=i}static dispatch(e){const{notification:t,destination:i}=e;t.observe(i),this.unsubscribe()}scheduleMessage(e){this.destination.add(this.scheduler.schedule(O_.dispatch,this.delay,new EY(e,this.destination)))}_next(e){this.scheduleMessage(No.createNext(e))}_error(e){this.scheduleMessage(No.createError(e)),this.unsubscribe()}_complete(){this.scheduleMessage(No.createComplete()),this.unsubscribe()}}class EY{constructor(e,t){this.notification=e,this.destination=t}}class A_ extends se{constructor(e=Number.POSITIVE_INFINITY,t=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=e<1?1:e,this._windowTime=t<1?1:t,t===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(e){if(!this.isStopped){const t=this._events;t.push(e),t.length>this._bufferSize&&t.shift()}super.next(e)}nextTimeWindow(e){this.isStopped||(this._events.push(new xY(this._getNow(),e)),this._trimBufferThenGetEvents()),super.next(e)}_subscribe(e){const t=this._infiniteTimeWindow,i=t?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;let s;if(this.closed)throw new ve;if(this.isStopped||this.hasError?s=oe.EMPTY:(this.observers.push(e),s=new qe(this,e)),r&&e.add(e=new O_(e,r)),t)for(let a=0;at&&(s=Math.max(s,o-t)),s>0&&r.splice(0,s),r}}class xY{constructor(e,t){this.time=e,this.value=t}}function ci(n,e){return"function"==typeof e?t=>t.pipe(ci((i,r)=>_t(n(i,r)).pipe(ue((o,s)=>e(i,o,r,s))))):t=>t.lift(new IY(n))}class IY{constructor(e){this.project=e}call(e,t){return t.subscribe(new OY(e,this.project))}}class OY extends Ko{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t;const i=this.index++;try{t=this.project(e,i)}catch(r){return void this.destination.error(r)}this._innerSub(t)}_innerSub(e){const t=this.innerSubscription;t&&t.unsubscribe();const i=new Vn(this),r=this.destination;r.add(i),this.innerSubscription=Zl(e,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;(!e||e.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}}const k_={schedule(n,e){const t=setTimeout(n,e);return()=>clearTimeout(t)},scheduleBeforeRender(n){if(typeof window>"u")return k_.schedule(n,0);if(typeof window.requestAnimationFrame>"u")return k_.schedule(n,16);const e=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(e)}};let lM;function zY(n,e,t){let i=t;return function kY(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&e.some((r,o)=>!("*"===r||!function PY(n,e){if(!lM){const t=Element.prototype;lM=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&lM.call(n,e)}(n,r)||(i=o,0))),i}class BY{constructor(e,t){this.componentFactory=t.get(hc).resolveComponentFactory(e)}create(e){return new UY(this.componentFactory,e)}}class UY{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new A_(1),this.events=this.eventEmitters.pipe(ci(i=>ys(...i))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:i})=>i)),this.ngZone=this.injector.get(Jt),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=k_.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(e){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){this.runInZone(()=>{null!==this.componentRef?function LY(n,e){return n===e||n!=n&&e!=e}(t,this.getInputValue(e))&&(void 0!==t||!this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges()):this.initialInputValues.set(e,t)})}initializeComponent(e){const t=yr.create({providers:[],parent:this.injector}),i=function jY(n,e){const t=n.childNodes,i=e.map(()=>[]);let r=-1;e.some((o,s)=>"*"===o&&(r=s,!0));for(let o=0,s=t.length;o{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e))}),this.initialInputValues.clear()}initializeOutputs(e){const t=this.componentFactory.outputs.map(({propName:i,templateName:r})=>e.instance[i].pipe(ue(s=>({name:r,value:s}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||null===this.inputChanges)return;const t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=k_.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[e];if(i)return void(i.currentValue=t);const r=this.unchangedInputs.has(e),o=r?void 0:this.getInputValue(e);this.inputChanges[e]=new qE(o,t,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}}class HY extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function N_(n,e){return new Se(t=>{const i=n.length;if(0===i)return void t.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>t.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&t.next(e?e.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),t.complete())}}))}})}let EP=(()=>{class n{constructor(t,i){this._renderer=t,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return n.\u0275fac=function(t){return new(t||n)(O(Vr),O(kt))},n.\u0275dir=Me({type:n}),n})(),wc=(()=>{class n extends EP{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Oi(n)))(i||n)}}(),n.\u0275dir=Me({type:n,features:[yn]}),n})();const Dr=new De("NgValueAccessor"),YY={provide:Dr,useExisting:Bt(()=>sl),multi:!0},KY=new De("CompositionEventMode");let sl=(()=>{class n extends EP{constructor(t,i,r){super(t,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function qY(){const n=Os()?Os().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return n.\u0275fac=function(t){return new(t||n)(O(Vr),O(kt),O(KY,8))},n.\u0275dir=Me({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,i){1&t&&de("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Nt([YY]),yn]}),n})();function al(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function IP(n){return null!=n&&"number"==typeof n.length}const nr=new De("NgValidators"),ll=new De("NgAsyncValidators"),ZY=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Cc{static min(e){return function OP(n){return e=>{if(al(e.value)||al(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t{if(al(e.value)||al(n))return null;const t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}(e)}static required(e){return function kP(n){return al(n.value)?{required:!0}:null}(e)}static requiredTrue(e){return function NP(n){return!0===n.value?null:{required:!0}}(e)}static email(e){return function PP(n){return al(n.value)||ZY.test(n.value)?null:{email:!0}}(e)}static minLength(e){return function LP(n){return e=>al(e.value)||!IP(e.value)?null:e.value.lengthIP(e.value)&&e.value.length>n?{maxlength:{requiredLength:n,actualLength:e.value.length}}:null}(e)}static pattern(e){return function FP(n){if(!n)return P_;let e,t;return"string"==typeof n?(t="","^"!==n.charAt(0)&&(t+="^"),t+=n,"$"!==n.charAt(n.length-1)&&(t+="$"),e=new RegExp(t)):(t=n.toString(),e=n),i=>{if(al(i.value))return null;const r=i.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}(e)}static nullValidator(e){return null}static compose(e){return HP(e)}static composeAsync(e){return $P(e)}}function P_(n){return null}function jP(n){return null!=n}function zP(n){return zf(n)?_t(n):n}function VP(n){let e={};return n.forEach(t=>{e=null!=t?{...e,...t}:e}),0===Object.keys(e).length?null:e}function BP(n,e){return e.map(t=>t(n))}function UP(n){return n.map(e=>function JY(n){return!n.validate}(e)?e:t=>e.validate(t))}function HP(n){if(!n)return null;const e=n.filter(jP);return 0==e.length?null:function(t){return VP(BP(t,e))}}function cM(n){return null!=n?HP(UP(n)):null}function $P(n){if(!n)return null;const e=n.filter(jP);return 0==e.length?null:function(t){return function WY(...n){if(1===n.length){const e=n[0];if(R(e))return N_(e,null);if(P(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return N_(t.map(i=>e[i]),t)}}if("function"==typeof n[n.length-1]){const e=n.pop();return N_(n=1===n.length&&R(n[0])?n[0]:n,null).pipe(ue(t=>e(...t)))}return N_(n,null)}(BP(t,e).map(zP)).pipe(ue(VP))}}function uM(n){return null!=n?$P(UP(n)):null}function WP(n,e){return null===n?[e]:Array.isArray(n)?[...n,e]:[n,e]}function GP(n){return n._rawValidators}function YP(n){return n._rawAsyncValidators}function dM(n){return n?Array.isArray(n)?n:[n]:[]}function L_(n,e){return Array.isArray(n)?n.includes(e):n===e}function qP(n,e){const t=dM(e);return dM(n).forEach(r=>{L_(t,r)||t.push(r)}),t}function KP(n,e){return dM(e).filter(t=>!L_(n,t))}class QP{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=cM(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=uM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}class Mr extends QP{get formDirective(){return null}get path(){return null}}class Ma extends QP{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class ZP{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Dc=(()=>{class n extends ZP{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(O(Ma,2))},n.\u0275dir=Me({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,i){2&t&&ns("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[yn]}),n})(),kd=(()=>{class n extends ZP{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(O(Mr,10))},n.\u0275dir=Me({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,i){2&t&&ns("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[yn]}),n})();const op="VALID",F_="INVALID",Nd="PENDING",sp="DISABLED";function mM(n){return(j_(n)?n.validators:n)||null}function gM(n,e){return(j_(e)?e.asyncValidators:n)||null}function j_(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function XP(n,e,t){const i=n.controls;if(!(e?Object.keys(i):i).length)throw new Q(1e3,"");if(!i[t])throw new Q(1001,"")}function e2(n,e,t){n._forEachChild((i,r)=>{if(void 0===t[r])throw new Q(1002,"")})}class z_{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===op}get invalid(){return this.status===F_}get pending(){return this.status==Nd}get disabled(){return this.status===sp}get enabled(){return this.status!==sp}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(qP(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(qP(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(KP(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(KP(e,this._rawAsyncValidators))}hasValidator(e){return L_(this._rawValidators,e)}hasAsyncValidator(e){return L_(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=Nd,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=sp,this.errors=null,this._forEachChild(i=>{i.disable({...e,onlySelf:!0})}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=op,this._forEachChild(i=>{i.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===op||this.status===Nd)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?sp:op}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=Nd,this._hasOwnPendingAsyncValidator=!0;const t=zP(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){let t=e;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){const i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new re,this.statusChanges=new re}_calculateStatus(){return this._allControlsDisabled()?sp:this.errors?F_:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Nd)?Nd:this._anyControlsHaveStatus(F_)?F_:op}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){j_(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function oq(n){return Array.isArray(n)?cM(n):n||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function sq(n){return Array.isArray(n)?uM(n):n||null}(this._rawAsyncValidators)}}class Pd extends z_{constructor(e,t,i){super(mM(t),gM(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,i={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){e2(this,0,e),Object.keys(e).forEach(i=>{XP(this,!0,i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(i=>{const r=this.controls[i];r&&r.patchValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,i)=>(e[i]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,i)=>!!i._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const i=this.controls[t];i&&e(i,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[t,i]of Object.entries(this.controls))if(this.contains(t)&&e(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,i,r)=>((i.enabled||this.disabled)&&(t[r]=i.value),t))}_reduceChildren(e,t){let i=e;return this._forEachChild((r,o)=>{i=t(i,r,o)}),i}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class t2 extends Pd{}const Ld=new De("CallSetDisabledState",{providedIn:"root",factory:()=>V_}),V_="always";function B_(n,e){return[...e.path,n]}function ap(n,e,t=V_){yM(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||"always"===t)&&e.valueAccessor.setDisabledState?.(n.disabled),function lq(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&n2(n,e)})}(n,e),function uq(n,e){const t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}(n,e),function cq(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&n2(n,e),"submit"!==n.updateOn&&n.markAsTouched()})}(n,e),function aq(n,e){if(e.valueAccessor.setDisabledState){const t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}(n,e)}function U_(n,e,t=!0){const i=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i)),$_(n,e),n&&(e._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function H_(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function yM(n,e){const t=GP(n);null!==e.validator?n.setValidators(WP(t,e.validator)):"function"==typeof t&&n.setValidators([t]);const i=YP(n);null!==e.asyncValidator?n.setAsyncValidators(WP(i,e.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();H_(e._rawValidators,r),H_(e._rawAsyncValidators,r)}function $_(n,e){let t=!1;if(null!==n){if(null!==e.validator){const r=GP(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==e.validator);o.length!==r.length&&(t=!0,n.setValidators(o))}}if(null!==e.asyncValidator){const r=YP(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==e.asyncValidator);o.length!==r.length&&(t=!0,n.setAsyncValidators(o))}}}const i=()=>{};return H_(e._rawValidators,i),H_(e._rawAsyncValidators,i),t}function n2(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function vM(n,e){if(!n.hasOwnProperty("model"))return!1;const t=n.model;return!!t.isFirstChange()||!Object.is(e,t.currentValue)}function bM(n,e){if(!e)return null;let t,i,r;return Array.isArray(e),e.forEach(o=>{o.constructor===sl?t=o:function fq(n){return Object.getPrototypeOf(n.constructor)===wc}(o)?i=o:r=o}),r||i||t||null}function s2(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}function a2(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Rd=class extends z_{constructor(e=null,t,i){super(mM(t),gM(i,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),j_(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=a2(e)?e.value:e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){s2(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){s2(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){a2(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},_q={provide:Ma,useExisting:Bt(()=>W_)},u2=(()=>Promise.resolve())();let W_=(()=>{class n extends Ma{constructor(t,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new Rd,this._registered=!1,this.update=new re,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=bM(0,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),vM(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){ap(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){u2.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const i=t.isDisabled.currentValue,r=0!==i&&function Id(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}(i);u2.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?B_(t,this._parent):[t]}}return n.\u0275fac=function(t){return new(t||n)(O(Mr,9),O(nr,10),O(ll,10),O(Dr,10),O(Kn,8),O(Ld,8))},n.\u0275dir=Me({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Nt([_q]),yn,Ji]}),n})(),Fd=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Me({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),h2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({}),n})();const CM=new De("NgModelWithFormControlWarning"),Mq={provide:Mr,useExisting:Bt(()=>Ta)};let Ta=(()=>{class n extends Mr{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new re,this._setValidators(t),this._setAsyncValidators(i)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&($_(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const i=this.form.get(t.path);return ap(i,t,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),i}getControl(t){return this.form.get(t.path)}removeControl(t){U_(t.control||null,t,!1),function pq(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,i){this.form.get(t.path).setValue(i)}onSubmit(t){return this.submitted=!0,function o2(n,e){n._syncPendingControls(),e.forEach(t=>{const i=t.control;"submit"===i.updateOn&&i._pendingChange&&(t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const i=t.control,r=this.form.get(t.path);i!==r&&(U_(i||null,t),(n=>n instanceof Rd)(r)&&(ap(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const i=this.form.get(t.path);(function r2(n,e){yM(n,e)})(i,t),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const i=this.form.get(t.path);i&&function dq(n,e){return $_(n,e)}(i,t)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){yM(this.form,this),this._oldForm&&$_(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(t){return new(t||n)(O(nr,10),O(ll,10),O(Ld,8))},n.\u0275dir=Me({type:n,selectors:[["","formGroup",""]],hostBindings:function(t,i){1&t&&de("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Nt([Mq]),yn,Ji]}),n})();const Eq={provide:Ma,useExisting:Bt(()=>Mc)};let Mc=(()=>{class n extends Ma{set isDisabled(t){}constructor(t,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new re,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=bM(0,o)}ngOnChanges(t){this._added||this._setUpControl(),vM(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return B_(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(t){return new(t||n)(O(Mr,13),O(nr,10),O(ll,10),O(Dr,10),O(CM,8))},n.\u0275dir=Me({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Nt([Eq]),yn,Ji]}),n})(),x2=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[h2]}),n})();class I2 extends z_{constructor(e,t,i){super(mM(t),gM(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,i={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,t={}){let i=this._adjustIndex(e);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,i={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){e2(this,0,e),e.forEach((i,r)=>{XP(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((t,i)=>!!i._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,i)=>{e(t,i)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function O2(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let G_=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new n;return t.useNonNullable=!0,t}group(t,i=null){const r=this._reduceControls(t);let o={};return O2(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Pd(r,o)}record(t,i=null){const r=this._reduceControls(t);return new t2(r,i)}control(t,i,r){let o={};return this.useNonNullable?(O2(i)?o=i:(o.validators=i,o.asyncValidators=r),new Rd(t,{...o,nonNullable:!0})):new Rd(t,i,r)}array(t,i,r){const o=t.map(s=>this._createControl(s));return new I2(o,i,r)}_reduceControls(t){const i={};return Object.keys(t).forEach(r=>{i[r]=this._createControl(t[r])}),i}_createControl(t){return t instanceof Rd||t instanceof z_?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Y_=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Ld,useValue:t.callSetDisabledState??V_}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[x2]}),n})(),q_=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:CM,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Ld,useValue:t.callSetDisabledState??V_}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[x2]}),n})();class A2{}class Uq{}const Sa="*";function xM(n,e){return{type:7,name:n,definitions:e,options:{}}}function cp(n,e=null){return{type:4,styles:e,timings:n}}function k2(n,e=null){return{type:2,steps:n,options:e}}function Bi(n){return{type:6,styles:n,offset:null}}function N2(n,e,t){return{type:0,name:n,styles:e,options:t}}function up(n,e,t=null){return{type:1,expr:n,animation:e,options:t}}function P2(n,e=null){return{type:8,animation:n,options:e}}function L2(n,e=null){return{type:10,animation:n,options:e}}function R2(n){Promise.resolve().then(n)}class dp{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){R2(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class F2{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,i=0,r=0;const o=this.players.length;0==o?R2(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++t==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(r)})}getPosition(){const e=this.players.reduce((t,i)=>null===t||i.totalTime>t.totalTime?i:t,null);return null!=e?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}function j2(n){return new Q(3e3,!1)}function MK(){return typeof window<"u"&&typeof window.document<"u"}function OM(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function cl(n){switch(n.length){case 0:return new dp;case 1:return n[0];default:return new F2(n)}}function z2(n,e,t,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,m)=>{let g=m,y=p;if("offset"!==m)switch(g=e.normalizePropertyName(g,s),y){case"!":y=r.get(m);break;case Sa:y=o.get(m);break;default:y=e.normalizeStyleValue(m,g,y,s)}f.set(g,y)}),h||a.push(f),c=f,l=d}),s.length)throw function hK(n){return new Q(3502,!1)}();return a}function AM(n,e,t,i){switch(e){case"start":n.onStart(()=>i(t&&kM(t,"start",n)));break;case"done":n.onDone(()=>i(t&&kM(t,"done",n)));break;case"destroy":n.onDestroy(()=>i(t&&kM(t,"destroy",n)))}}function kM(n,e,t){const o=NM(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,t.totalTime??n.totalTime,!!t.disabled),s=n._data;return null!=s&&(o._data=s),o}function NM(n,e,t,i,r="",o=0,s){return{element:n,triggerName:e,fromState:t,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fo(n,e,t){let i=n.get(e);return i||n.set(e,i=t),i}function V2(n){const e=n.indexOf(":");return[n.substring(1,e),n.slice(e+1)]}let PM=(n,e)=>!1,B2=(n,e,t)=>[],U2=null;function LM(n){const e=n.parentNode||n.host;return e===U2?null:e}(OM()||typeof Element<"u")&&(MK()?(U2=(()=>document.documentElement)(),PM=(n,e)=>{for(;e;){if(e===n)return!0;e=LM(e)}return!1}):PM=(n,e)=>n.contains(e),B2=(n,e,t)=>{if(t)return Array.from(n.querySelectorAll(e));const i=n.querySelector(e);return i?[i]:[]});let Sc=null,H2=!1;const $2=PM,W2=B2;let G2=(()=>{class n{validateStyleProperty(t){return function SK(n){Sc||(Sc=function EK(){return typeof document<"u"?document.body:null}()||{},H2=!!Sc.style&&"WebkitAppearance"in Sc.style);let e=!0;return Sc.style&&!function TK(n){return"ebkit"==n.substring(1,6)}(n)&&(e=n in Sc.style,!e&&H2&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Sc.style)),e}(t)}matchesElement(t,i){return!1}containsElement(t,i){return $2(t,i)}getParentElement(t){return LM(t)}query(t,i,r){return W2(t,i,r)}computeStyle(t,i,r){return r||""}animate(t,i,r,o,s,a=[],l){return new dp(r,o)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),RM=(()=>{class n{}return n.NOOP=new G2,n})();const FM="ng-enter",K_="ng-leave",Q_="ng-trigger",Z_=".ng-trigger",q2="ng-animating",jM=".ng-animating";function Ea(n){if("number"==typeof n)return n;const e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:zM(parseFloat(e[1]),e[2])}function zM(n,e){return"s"===e?1e3*n:n}function J_(n,e,t){return n.hasOwnProperty("duration")?n:function OK(n,e,t){let r,o=0,s="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return e.push(j2()),{duration:0,delay:0,easing:""};r=zM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=zM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=n;if(!t){let a=!1,l=e.length;r<0&&(e.push(function $q(){return new Q(3100,!1)}()),a=!0),o<0&&(e.push(function Wq(){return new Q(3101,!1)}()),a=!0),a&&e.splice(l,0,j2())}return{duration:r,delay:o,easing:s}}(n,e,t)}function hp(n,e={}){return Object.keys(n).forEach(t=>{e[t]=n[t]}),e}function K2(n){const e=new Map;return Object.keys(n).forEach(t=>{e.set(t,n[t])}),e}function ul(n,e=new Map,t){if(t)for(let[i,r]of t)e.set(i,r);for(let[i,r]of n)e.set(i,r);return e}function Z2(n,e,t){return t?e+":"+t+";":""}function J2(n){let e="";for(let t=0;t{const o=BM(r);t&&!t.has(r)&&t.set(r,n.style[o]),n.style[o]=i}),OM()&&J2(n))}function Ec(n,e){n.style&&(e.forEach((t,i)=>{const r=BM(i);n.style[r]=""}),OM()&&J2(n))}function fp(n){return Array.isArray(n)?1==n.length?n[0]:k2(n):n}const VM=new RegExp("{{\\s*(.+?)\\s*}}","g");function X2(n){let e=[];if("string"==typeof n){let t;for(;t=VM.exec(n);)e.push(t[1]);VM.lastIndex=0}return e}function pp(n,e,t){const i=n.toString(),r=i.replace(VM,(o,s)=>{let a=e[s];return null==a&&(t.push(function Yq(n){return new Q(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function X_(n){const e=[];let t=n.next();for(;!t.done;)e.push(t.value),t=n.next();return e}const NK=/-+([a-z0-9])/g;function BM(n){return n.replace(NK,(...e)=>e[1].toUpperCase())}function PK(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function po(n,e,t){switch(e.type){case 7:return n.visitTrigger(e,t);case 0:return n.visitState(e,t);case 1:return n.visitTransition(e,t);case 2:return n.visitSequence(e,t);case 3:return n.visitGroup(e,t);case 4:return n.visitAnimate(e,t);case 5:return n.visitKeyframes(e,t);case 6:return n.visitStyle(e,t);case 8:return n.visitReference(e,t);case 9:return n.visitAnimateChild(e,t);case 10:return n.visitAnimateRef(e,t);case 11:return n.visitQuery(e,t);case 12:return n.visitStagger(e,t);default:throw function qq(n){return new Q(3004,!1)}()}}function eL(n,e){return window.getComputedStyle(n)[e]}function VK(n,e){const t=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function BK(n,e,t){if(":"==n[0]){const l=function UK(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i) *"}}(n,t);if("function"==typeof l)return void e.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return t.push(function aK(n){return new Q(3015,!1)}()),e;const r=i[1],o=i[2],s=i[3];e.push(tL(r,s));"<"==o[0]&&!("*"==r&&"*"==s)&&e.push(tL(s,r))}(i,t,e)):t.push(n),t}const iv=new Set(["true","1"]),rv=new Set(["false","0"]);function tL(n,e){const t=iv.has(n)||rv.has(n),i=iv.has(e)||rv.has(e);return(r,o)=>{let s="*"==n||n==r,a="*"==e||e==o;return!s&&t&&"boolean"==typeof r&&(s=r?iv.has(n):rv.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?iv.has(e):rv.has(e)),s&&a}}const HK=new RegExp("s*:selfs*,?","g");function UM(n,e,t,i){return new $K(n).build(e,t,i)}class $K{constructor(e){this._driver=e}build(e,t,i){const r=new YK(t);return this._resetContextStyleTimingState(r),po(this,fp(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles=new Map,e.collectedStyles.set("",new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,r=t.depCount=0;const o=[],s=[];return"@"==e.name.charAt(0)&&t.errors.push(function Qq(){return new Q(3006,!1)}()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,t))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,t);i+=l.queryCount,r+=l.depCount,s.push(l)}else t.errors.push(function Zq(){return new Q(3007,!1)}())}),{type:7,name:e.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(e,t){const i=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{X2(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(X_(o.values()),t.errors.push(function Jq(n,e){return new Q(3008,!1)}()))}return{type:0,name:e.name,style:i,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const i=po(this,fp(e.animation),t);return{type:1,matchers:VK(e.expr,t.errors),animation:i,queryCount:t.queryCount,depCount:t.depCount,options:xc(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(i=>po(this,i,t)),options:xc(e.options)}}visitGroup(e,t){const i=t.currentTime;let r=0;const o=e.steps.map(s=>{t.currentTime=i;const a=po(this,s,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:3,steps:o,options:xc(e.options)}}visitAnimate(e,t){const i=function KK(n,e){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return HM(J_(n,e).duration,0,"");const t=n;if(t.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=HM(0,0,"");return o.dynamic=!0,o.strValue=t,o}const r=J_(t,e);return HM(r.duration,r.delay,r.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;let r,o=e.styles?e.styles:Bi({});if(5==o.type)r=this.visitKeyframes(o,t);else{let s=e.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Bi(c)}t.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,t);l.isEmptyStep=a,r=l}return t.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(e,t){const i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){const i=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of r)"string"==typeof a?a===Sa?i.push(a):t.errors.push(new Q(3002,!1)):i.push(K2(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,t){const i=t.currentAnimateTimings;let r=t.currentTime,o=t.currentTime;i&&o>0&&(o-=i.duration+i.delay),e.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=t.collectedStyles.get(t.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(t.errors.push(function eK(n,e,t,i,r){return new Q(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),t.options&&function kK(n,e,t){const i=e.params||{},r=X2(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||t.push(function Gq(n){return new Q(3001,!1)}())})}(a,t.options,t.errors)})})}visitKeyframes(e,t){const i={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function tK(){return new Q(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=e.steps.map(y=>{const v=this._makeStyleAst(y,t);let w=null!=v.offset?v.offset:function qK(n){if("string"==typeof n)return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){const i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}(v.styles),_=0;return null!=w&&(o++,_=v.offset=w),l=l||_<0||_>1,a=a||_0&&o{const w=h>0?v==f?1:h*v:s[v],_=w*g;t.currentTime=p+m.delay+_,m.duration=_,this._validateStyleAst(y,t),y.offset=w,i.styles.push(y)}),i}visitReference(e,t){return{type:8,animation:po(this,fp(e.animation),t),options:xc(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:xc(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:xc(e.options)}}visitQuery(e,t){const i=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;const[o,s]=function WK(n){const e=!!n.split(/\s*,\s*/).find(t=>":self"==t);return e&&(n=n.replace(HK,"")),n=n.replace(/@\*/g,Z_).replace(/@\w+/g,t=>Z_+"-"+t.slice(1)).replace(/:animating/g,jM),[n,e]}(e.selector);t.currentQuerySelector=i.length?i+" "+o:o,fo(t.collectedStyles,t.currentQuerySelector,new Map);const a=po(this,fp(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:xc(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(function oK(){return new Q(3013,!1)}());const i="full"===e.timings?{duration:0,delay:0,easing:"full"}:J_(e.timings,t.errors,!0);return{type:12,animation:po(this,fp(e.animation),t),timings:i,options:null}}}class YK{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function xc(n){return n?(n=hp(n)).params&&(n.params=function GK(n){return n?hp(n):null}(n.params)):n={},n}function HM(n,e,t){return{duration:n,delay:e,easing:t}}function $M(n,e,t,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class ov{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const JK=new RegExp(":enter","g"),eQ=new RegExp(":leave","g");function WM(n,e,t,i,r,o=new Map,s=new Map,a,l,c=[]){return(new tQ).buildKeyframes(n,e,t,i,r,o,s,a,l,c)}class tQ{buildKeyframes(e,t,i,r,o,s,a,l,c,u=[]){c=c||new ov;const d=new GM(e,t,c,r,o,u,[]);d.options=l;const h=l.delay?Ea(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),po(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let m=f.length-1;m>=0;m--){const g=f[m];if(g.element===t){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[$M(t,[],[],[],0,h,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const i=t.subInstructions.get(t.element);if(i){const r=t.createSubContext(e.options),o=t.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){const i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(const r of e){const o=r?.delay;if(o){const s="number"==typeof o?o:Ea(pp(o,r?.params??{},t.errors));i.delayNextStep(s)}}}_visitSubInstructions(e,t,i){let o=t.currentTimeline.currentTime;const s=null!=i.duration?Ea(i.duration):null,a=null!=i.delay?Ea(i.delay):null;return 0!==s&&e.forEach(l=>{const c=t.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(e,t){t.updateOptions(e.options,!0),po(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const i=t.subContextCount;let r=t;const o=e.options;if(o&&(o.params||o.delay)&&(r=t.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=sv);const s=Ea(o.delay);r.delayNextStep(s)}e.steps.length&&(e.steps.forEach(s=>po(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const i=[];let r=t.currentTimeline.currentTime;const o=e.options&&e.options.delay?Ea(e.options.delay):0;e.steps.forEach(s=>{const a=t.createSubContext(e.options);o&&a.delayNextStep(o),po(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>t.currentTimeline.mergeTimelineCollectedStyles(s)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const i=e.strValue;return J_(t.params?pp(i,t.params,t.errors):i,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const i=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),r.snapshotCurrentStyles());const o=e.style;5==o.type?this.visitKeyframes(o,t):(t.incrementTime(i.duration),this.visitStyle(o,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const i=t.currentTimeline,r=t.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(o):i.setStyles(e.styles,o,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const i=t.currentAnimateTimings,r=t.currentTimeline.duration,o=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+o),t.previousNode=e}visitQuery(e,t){const i=t.currentTimeline.currentTime,r=e.options||{},o=r.delay?Ea(r.delay):0;o&&(6===t.previousNode.type||0==i&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=sv);let s=i;const a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{t.currentQueryIndex=u;const d=t.createSubContext(e.options,c);o&&d.delayNextStep(o),c===t.element&&(l=d.currentTimeline),po(this,e.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const i=t.parentContext,r=t.currentTimeline,o=e.timings,s=Math.abs(o.duration),a=s*(t.currentQueryTotal-1);let l=s*t.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=t.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;po(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const sv={};class GM{constructor(e,t,i,r,o,s,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=sv,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new av(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const i=e;let r=this.options;null!=i.duration&&(r.duration=Ea(i.duration)),null!=i.delay&&(r.delay=Ea(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!t||!s.hasOwnProperty(a))&&(s[a]=pp(o[a],s,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const i=e.params={};Object.keys(t).forEach(r=>{i[r]=t[r]})}}return e}createSubContext(e=null,t,i){const r=t||this.element,o=new GM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=sv,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){const r={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},o=new nQ(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,r,o,s){let a=[];if(r&&a.push(this.element),e.length>0){e=(e=e.replace(JK,"."+this._enterClassName)).replace(eQ,"."+this._leaveClassName);let c=this._driver.query(this.element,e,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function sK(n){return new Q(3014,!1)}()),a}}class av{constructor(e,t,i,r){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new av(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||Sa),this._currentKeyframe.set(t,Sa);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,r){t&&this._previousKeyframe.set("easing",t);const o=r&&r.params||{},s=function iQ(n,e){const t=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||e.keys();for(let o of i)t.set(o,Sa)}else ul(r,t)}),t}(e,this._globalTimelineStyles);for(let[a,l]of s){const c=pp(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Sa),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{const r=this._styleSummary.get(i);(!r||t.time>r.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=ul(a,new Map,this._backFill);c.forEach((u,d)=>{"!"===u?e.add(d):u===Sa&&t.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=e.size?X_(e.values()):[],s=t.size?X_(t.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return $M(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class nQ extends av{constructor(e,t,i,r,o,s,a=!1){super(e,t,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const o=[],s=i+t,a=t/s,l=ul(e[0]);l.set("offset",0),o.push(l);const c=ul(e[0]);c.set("offset",rL(a)),o.push(c);const u=e.length-1;for(let d=1;d<=u;d++){let h=ul(e[d]);const f=h.get("offset");h.set("offset",rL((t+f*i)/s)),o.push(h)}i=s,t=0,r="",e=o}return $M(this.element,e,this.preStyleProps,this.postStyleProps,i,t,r,!0)}}function rL(n,e=3){const t=Math.pow(10,e-1);return Math.round(n*t)/t}class YM{}const rQ=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class oQ extends YM{normalizePropertyName(e,t){return BM(e)}normalizeStyleValue(e,t,i,r){let o="";const s=i.toString().trim();if(rQ.has(t)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function Kq(n,e){return new Q(3005,!1)}())}return s+o}}function oL(n,e,t,i,r,o,s,a,l,c,u,d,h){return{type:0,element:n,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const qM={};class sL{constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,r){return function sQ(n,e,t,i,r){return n.some(o=>o(e,t,i,r))}(this.ast.matchers,e,t,i,r)}buildStyles(e,t,i){let r=this._stateStyles.get("*");return void 0!==e&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(t,i):new Map}build(e,t,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||qM,p=this.buildStyles(i,a&&a.params||qM,d),m=l&&l.params||qM,g=this.buildStyles(r,m,d),y=new Set,v=new Map,w=new Map,_="void"===r,N={params:aQ(m,h),delay:this.ast.options?.delay},T=u?[]:WM(e,t,this.ast.animation,o,s,p,g,N,c,d);let ne=0;if(T.forEach(Ne=>{ne=Math.max(Ne.duration+Ne.delay,ne)}),d.length)return oL(t,this._triggerName,i,r,_,p,g,[],[],v,w,ne,d);T.forEach(Ne=>{const He=Ne.element,gt=fo(v,He,new Set);Ne.preStyleProps.forEach(ot=>gt.add(ot));const at=fo(w,He,new Set);Ne.postStyleProps.forEach(ot=>at.add(ot)),He!==t&&y.add(He)});const K=X_(y.values());return oL(t,this._triggerName,i,r,_,p,g,T,K,v,w,ne)}}function aQ(n,e){const t=hp(e);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(t[i]=n[i]);return t}class lQ{constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){const i=new Map,r=hp(this.defaultParams);return Object.keys(e).forEach(o=>{const s=e[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=pp(s,r,t));const l=this.normalizer.normalizePropertyName(a,t);s=this.normalizer.normalizeStyleValue(a,l,s,t),i.set(a,s)})}),i}}class uQ{constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{this.states.set(r.name,new lQ(r.style,r.options&&r.options.params||{},i))}),aL(this.states,"true","1"),aL(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new sL(e,r,this.states))}),this.fallbackTransition=function dQ(n,e,t){return new sL(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},e)}(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,r){return this.transitionFactories.find(s=>s.match(e,t,i,r))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}}function aL(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}const hQ=new ov;class fQ{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){const i=[],o=UM(this._driver,t,i,[]);if(i.length)throw function fK(n){return new Q(3503,!1)}();this._animations.set(e,o)}_buildPlayer(e,t,i){const r=e.element,o=z2(0,this._normalizer,0,e.keyframes,t,i);return this._driver.animate(r,o,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){const r=[],o=this._animations.get(e);let s;const a=new Map;if(o?(s=WM(this._driver,t,o,FM,K_,new Map,new Map,i,hQ,r),s.forEach(u=>{const d=fo(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function pK(){return new Q(3300,!1)}()),s=[]),r.length)throw function mK(n){return new Q(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,Sa))})});const c=cl(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){const t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);const i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){const t=this._playersById.get(e);if(!t)throw function gK(n){return new Q(3301,!1)}();return t}listen(e,t,i,r){const o=NM(t,"","","");return AM(this._getPlayer(e),i,o,r),()=>{}}command(e,t,i,r){if("register"==i)return void this.register(e,r[0]);if("create"==i)return void this.create(e,t,r[0]||{});const o=this._getPlayer(e);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}}const lL="ng-animate-queued",KM="ng-animate-disabled",_Q=[],cL={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},vQ={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Po="__ng_removed";class QM{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;const i=e&&e.hasOwnProperty("value");if(this.value=function DQ(n){return n??null}(i?e.value:e),i){const o=hp(e);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){const t=e.params;if(t){const i=this.options.params;Object.keys(t).forEach(r=>{null==i[r]&&(i[r]=t[r])})}}}const mp="void",ZM=new QM(mp);class bQ{constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Lo(t,this._hostClassName)}listen(e,t,i,r){if(!this._triggers.has(t))throw function yK(n,e){return new Q(3302,!1)}();if(null==i||0==i.length)throw function _K(n){return new Q(3303,!1)}();if(!function MQ(n){return"start"==n||"done"==n}(i))throw function vK(n,e){return new Q(3400,!1)}();const o=fo(this._elementListeners,e,[]),s={name:t,phase:i,callback:r};o.push(s);const a=fo(this._engine.statesByElement,e,new Map);return a.has(t)||(Lo(e,Q_),Lo(e,Q_+"-"+t),a.set(t,ZM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return!this._triggers.has(e)&&(this._triggers.set(e,t),!0)}_getTrigger(e){const t=this._triggers.get(e);if(!t)throw function bK(n){return new Q(3401,!1)}();return t}trigger(e,t,i,r=!0){const o=this._getTrigger(t),s=new JM(this.id,t,e);let a=this._engine.statesByElement.get(e);a||(Lo(e,Q_),Lo(e,Q_+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t);const c=new QM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=ZM),c.value!==mp&&l.value===c.value){if(!function EQ(n,e){const t=Object.keys(n),i=Object.keys(e);if(t.length!=i.length)return!1;for(let r=0;r{Ec(e,g),As(e,y)})}return}const h=fo(this._engine.playersByElement,e,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==t&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,e,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Lo(e,lL),s.onStart(()=>{jd(e,lL)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(e);if(g){let y=g.indexOf(s);y>=0&&g.splice(y,1)}}),this.players.push(s),h.push(s),s}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const i=this._engine.driver.query(e,Z_,!0);i.forEach(r=>{if(r[Po])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,i,r){const o=this._engine.statesByElement.get(e),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(e,c,mp,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,s),i&&cl(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){const r=new Set;t.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||ZM,u=new QM(mp),d=new JM(this.id,s,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(e,t){const i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(e):[];if(o&&o.length)r=!0;else{let s=e;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,t);else{const o=e[Po];(!o||o===cL)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){Lo(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=NM(o,i.triggerName,i.fromState.value,i.toState.value);l._data=e,AM(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(i)}),this._queue=[],t.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(i=>i.element===e)||t,t}}class wQ{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){const i=new bQ(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(t);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,e),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(e)}else i.push(e);return r.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let r=this._namespaceLookup[e];r&&r.register(t,i)&&this.totalAnimations++}destroy(e,t){if(!e)return;const i=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[e];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,i=this.statesByElement.get(e);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&t.add(o)}return t}trigger(e,t,i,r){if(lv(t)){const o=this._fetchNamespace(e);if(o)return o.trigger(t,i,r),!0}return!1}insertNode(e,t,i,r){if(!lv(t))return;const o=t[Po];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(t);s>=0&&this.collectedLeaveElements.splice(s,1)}if(e){const s=this._fetchNamespace(e);s&&s.insertNode(t,i)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Lo(e,KM)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),jd(e,KM))}removeNode(e,t,i,r){if(lv(t)){const o=e?this._fetchNamespace(e):null;if(o?o.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),i){const s=this.namespacesByHostElement.get(t);s&&s.id!==e&&s.removeNode(t,r)}}else this._onRemovalComplete(t,r)}markElementAsRemoved(e,t,i,r,o){this.collectedLeaveElements.push(t),t[Po]={namespaceId:e,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,t,i,r,o){return lv(t)?this._fetchNamespace(e).listen(t,i,r,o):()=>{}}_buildInstruction(e,t,i,r,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,r,e.fromState.options,e.toState.options,t,o)}destroyInnerAnimations(e){let t=this.driver.query(e,Z_,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,jM,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return cl(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e[Po];if(t&&t.setForRemoval){if(e[Po]=cL,t.namespaceId){this.destroyInnerAnimations(e);const i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(KM)&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],t.length?cl(t).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(e){throw function wK(n){return new Q(3402,!1)}()}_flushAnimations(e,t){const i=new ov,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(ae=>{u.add(ae);const fe=this.driver.query(ae,".ng-animate-queued",!0);for(let be=0;be{const be=FM+m++;p.set(fe,be),ae.forEach(Ue=>Lo(Ue,be))});const g=[],y=new Set,v=new Set;for(let ae=0;aey.add(Ue)):v.add(fe))}const w=new Map,_=hL(h,Array.from(y));_.forEach((ae,fe)=>{const be=K_+m++;w.set(fe,be),ae.forEach(Ue=>Lo(Ue,be))}),e.push(()=>{f.forEach((ae,fe)=>{const be=p.get(fe);ae.forEach(Ue=>jd(Ue,be))}),_.forEach((ae,fe)=>{const be=w.get(fe);ae.forEach(Ue=>jd(Ue,be))}),g.forEach(ae=>{this.processLeaveNode(ae)})});const N=[],T=[];for(let ae=this._namespaceList.length-1;ae>=0;ae--)this._namespaceList[ae].drainQueuedTransitions(t).forEach(be=>{const Ue=be.player,It=be.element;if(N.push(Ue),this.collectedEnterElements.length){const En=It[Po];if(En&&En.setForMove){if(En.previousTriggersValues&&En.previousTriggersValues.has(be.triggerName)){const Wt=En.previousTriggersValues.get(be.triggerName),ct=this.statesByElement.get(be.element);if(ct&&ct.has(be.triggerName)){const Fn=ct.get(be.triggerName);Fn.value=Wt,ct.set(be.triggerName,Fn)}}return void Ue.destroy()}}const ln=!d||!this.driver.containsElement(d,It),zt=w.get(It),Sn=p.get(It),Rt=this._buildInstruction(be,i,Sn,zt,ln);if(Rt.errors&&Rt.errors.length)return void T.push(Rt);if(ln)return Ue.onStart(()=>Ec(It,Rt.fromStyles)),Ue.onDestroy(()=>As(It,Rt.toStyles)),void r.push(Ue);if(be.isFallbackTransition)return Ue.onStart(()=>Ec(It,Rt.fromStyles)),Ue.onDestroy(()=>As(It,Rt.toStyles)),void r.push(Ue);const Yi=[];Rt.timelines.forEach(En=>{En.stretchStartingKeyframe=!0,this.disabledNodes.has(En.element)||Yi.push(En)}),Rt.timelines=Yi,i.append(It,Rt.timelines),s.push({instruction:Rt,player:Ue,element:It}),Rt.queriedElements.forEach(En=>fo(a,En,[]).push(Ue)),Rt.preStyleProps.forEach((En,Wt)=>{if(En.size){let ct=l.get(Wt);ct||l.set(Wt,ct=new Set),En.forEach((Fn,Ar)=>ct.add(Ar))}}),Rt.postStyleProps.forEach((En,Wt)=>{let ct=c.get(Wt);ct||c.set(Wt,ct=new Set),En.forEach((Fn,Ar)=>ct.add(Ar))})});if(T.length){const ae=[];T.forEach(fe=>{ae.push(function CK(n,e){return new Q(3505,!1)}())}),N.forEach(fe=>fe.destroy()),this.reportError(ae)}const ne=new Map,K=new Map;s.forEach(ae=>{const fe=ae.element;i.has(fe)&&(K.set(fe,fe),this._beforeAnimationBuild(ae.player.namespaceId,ae.instruction,ne))}),r.forEach(ae=>{const fe=ae.element;this._getPreviousPlayers(fe,!1,ae.namespaceId,ae.triggerName,null).forEach(Ue=>{fo(ne,fe,[]).push(Ue),Ue.destroy()})});const Ne=g.filter(ae=>pL(ae,l,c)),He=new Map;dL(He,this.driver,v,c,Sa).forEach(ae=>{pL(ae,l,c)&&Ne.push(ae)});const at=new Map;f.forEach((ae,fe)=>{dL(at,this.driver,new Set(ae),l,"!")}),Ne.forEach(ae=>{const fe=He.get(ae),be=at.get(ae);He.set(ae,new Map([...Array.from(fe?.entries()??[]),...Array.from(be?.entries()??[])]))});const ot=[],pn=[],St={};s.forEach(ae=>{const{element:fe,player:be,instruction:Ue}=ae;if(i.has(fe)){if(u.has(fe))return be.onDestroy(()=>As(fe,Ue.toStyles)),be.disabled=!0,be.overrideTotalTime(Ue.totalTime),void r.push(be);let It=St;if(K.size>1){let zt=fe;const Sn=[];for(;zt=zt.parentNode;){const Rt=K.get(zt);if(Rt){It=Rt;break}Sn.push(zt)}Sn.forEach(Rt=>K.set(Rt,It))}const ln=this._buildAnimation(be.namespaceId,Ue,ne,o,at,He);if(be.setRealPlayer(ln),It===St)ot.push(be);else{const zt=this.playersByElement.get(It);zt&&zt.length&&(be.parentPlayer=cl(zt)),r.push(be)}}else Ec(fe,Ue.fromStyles),be.onDestroy(()=>As(fe,Ue.toStyles)),pn.push(be),u.has(fe)&&r.push(be)}),pn.forEach(ae=>{const fe=o.get(ae.element);if(fe&&fe.length){const be=cl(fe);ae.setRealPlayer(be)}}),r.forEach(ae=>{ae.parentPlayer?ae.syncPlayerEvents(ae.parentPlayer):ae.destroy()});for(let ae=0;ae!ln.destroyed);It.length?TQ(this,fe,It):this.processLeaveNode(fe)}return g.length=0,ot.forEach(ae=>{this.players.push(ae),ae.onDone(()=>{ae.destroy();const fe=this.players.indexOf(ae);this.players.splice(fe,1)}),ae.play()}),ot}elementContainsData(e,t){let i=!1;const r=t[Po];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(t)&&(i=!0),this.playersByQueriedElement.has(t)&&(i=!0),this.statesByElement.has(t)&&(i=!0),this._fetchNamespace(e).elementContainsData(t)||i}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,r,o){let s=[];if(t){const a=this.playersByQueriedElement.get(e);a&&(s=a)}else{const a=this.playersByElement.get(e);if(a){const l=!o||o==mp;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(e,t,i){const o=t.element,s=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:t.triggerName;for(const l of t.timelines){const c=l.element,u=c!==o,d=fo(i,c,[]);this._getPreviousPlayers(c,u,s,a,t.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Ec(o,t.fromStyles)}_buildAnimation(e,t,i,r,o,s){const a=t.triggerName,l=t.element,c=[],u=new Set,d=new Set,h=t.timelines.map(p=>{const m=p.element;u.add(m);const g=m[Po];if(g&&g.removedBeforeQueried)return new dp(p.duration,p.delay);const y=m!==l,v=function SQ(n){const e=[];return fL(n,e),e}((i.get(m)||_Q).map(ne=>ne.getRealPlayer())).filter(ne=>!!ne.element&&ne.element===m),w=o.get(m),_=s.get(m),N=z2(0,this._normalizer,0,p.keyframes,w,_),T=this._buildPlayer(p,N,v);if(p.subTimeline&&r&&d.add(m),y){const ne=new JM(e,a,m);ne.setRealPlayer(T),c.push(ne)}return T});c.forEach(p=>{fo(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function CQ(n,e,t){let i=n.get(e);if(i){if(i.length){const r=i.indexOf(t);i.splice(r,1)}0==i.length&&n.delete(e)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Lo(p,q2));const f=cl(h);return f.onDestroy(()=>{u.forEach(p=>jd(p,q2)),As(l,t.toStyles)}),d.forEach(p=>{fo(r,p,[]).push(f)}),f}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new dp(e.duration,e.delay)}}class JM{constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i,this._player=new dp,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(r=>AM(e,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){fo(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function lv(n){return n&&1===n.nodeType}function uL(n,e){const t=n.style.display;return n.style.display=e??"none",t}function dL(n,e,t,i,r){const o=[];t.forEach(l=>o.push(uL(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=e.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Po]=vQ,s.push(c))}),n.set(c,u)});let a=0;return t.forEach(l=>uL(l,o[a++])),s}function hL(n,e){const t=new Map;if(n.forEach(a=>t.set(a,[])),0==e.length)return t;const r=new Set(e),o=new Map;function s(a){if(!a)return 1;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=t.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return e.forEach(a=>{const l=s(a);1!==l&&t.get(l).push(a)}),t}function Lo(n,e){n.classList?.add(e)}function jd(n,e){n.classList?.remove(e)}function TQ(n,e,t){cl(t).onDone(()=>n.processLeaveNode(e))}function fL(n,e){for(let t=0;tr.add(o)):e.set(n,i),t.delete(n),!0}class cv{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new wQ(e,t,i),this._timelineEngine=new fQ(e,t,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(e,t,i,r,o){const s=e+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],u=UM(this._driver,o,l,[]);if(l.length)throw function dK(n,e){return new Q(3404,!1)}();a=function cQ(n,e,t){return new uQ(n,e,t)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,r){this._transitionEngine.insertNode(e,t,i,r)}onRemove(e,t,i,r){this._transitionEngine.removeNode(e,t,r||!1,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,r){if("@"==i.charAt(0)){const[o,s]=V2(i);this._timelineEngine.command(o,t,s,r)}else this._transitionEngine.trigger(e,t,i,r)}listen(e,t,i,r,o){if("@"==i.charAt(0)){const[s,a]=V2(i);return this._timelineEngine.listen(s,t,a,o)}return this._transitionEngine.listen(e,t,i,r,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let IQ=(()=>{class n{constructor(t,i,r){this._element=t,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(t);o||n.initialStylesByElement.set(t,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&As(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(As(this._element,this._initialStyles),this._endStyles&&(As(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Ec(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ec(this._element,this._endStyles),this._endStyles=null),As(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function XM(n){let e=null;return n.forEach((t,i)=>{(function OQ(n){return"display"===n||"position"===n})(i)&&(e=e||new Map,e.set(i,t))}),e}class mL{constructor(e,t,i,r){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){const t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){return e.animate(this._convertKeyframesToObject(t),i)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&e.set(r,this._finished?i:eL(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){const t="start"===e?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class AQ{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}matchesElement(e,t){return!1}containsElement(e,t){return $2(e,t)}getParentElement(e){return LM(e)}query(e,t,i){return W2(e,t,i)}computeStyle(e,t,i){return window.getComputedStyle(e)[t]}animate(e,t,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof mL);(function LK(n,e){return 0===n||0===e})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function AK(n){return n.length?n[0]instanceof Map?n:n.map(e=>K2(e)):[]}(t).map(f=>ul(f));d=function RK(n,e,t){if(t.size&&e.length){let i=e[0],r=[];if(t.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,eL(n,a)))}}return e}(e,d,c);const h=function xQ(n,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=XM(e[0]),e.length>1&&(i=XM(e[e.length-1]))):e instanceof Map&&(t=XM(e)),t||i?new IQ(n,t,i):null}(e,d);return new mL(e,d,l,h)}}let kQ=(()=>{class n extends A2{constructor(t,i){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(i.body,{id:"0",encapsulation:te.None,styles:[],data:{animation:[]}})}build(t){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(t)?k2(t):t;return gL(this._renderer,null,i,"register",[r]),new NQ(i,this._renderer)}}return n.\u0275fac=function(t){return new(t||n)(F(Pf),F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class NQ extends Uq{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new PQ(this._id,e,t||{},this._renderer)}}class PQ{constructor(e,t,i,r){this.id=e,this.element=t,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return gL(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(e){this._command("setPosition",e)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function gL(n,e,t,i,r){return n.setProperty(e,`@@${t}:${i}`,r)}const yL="@.disabled";let LQ=(()=>{class n{constructor(t,i,r){this.delegate=t,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(t,i){const o=this.delegate.createRenderer(t,i);if(!(t&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new _L("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,t,u.name,u)};return i.data.animation.forEach(l),new RQ(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,i,r){t>=0&&ti(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(t){return new(t||n)(F(Pf),F(cv),F(Jt))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class _L{constructor(e,t,i,r){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>t.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,r=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,i){this.engine.onRemove(this.namespaceId,t,this.delegate,i)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,r){this.delegate.setAttribute(e,t,i,r)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,r){this.delegate.setStyle(e,t,i,r)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){"@"==t.charAt(0)&&t==yL?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i){return this.delegate.listen(e,t,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class RQ extends _L{constructor(e,t,i,r,o){super(t,i,r,o),this.factory=e,this.namespaceId=t}setProperty(e,t,i){"@"==t.charAt(0)?"."==t.charAt(1)&&t==yL?this.disableAnimations(e,i=void 0===i||!!i):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i){if("@"==t.charAt(0)){const r=function FQ(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(e);let o=t.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function jQ(n){const e=n.indexOf(".");return[n.substring(0,e),n.slice(e+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(e,t,i)}}let zQ=(()=>{class n extends cv{constructor(t,i,r,o){super(t.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(t){return new(t||n)(F(Nn),F(RM),F(YM),F(_c))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();const vL=[{provide:A2,useClass:kQ},{provide:YM,useFactory:function VQ(){return new oQ}},{provide:cv,useClass:zQ},{provide:Pf,useFactory:function BQ(n,e,t){return new LQ(n,e,t)},deps:[M_,cv,Jt]}],eT=[{provide:RM,useFactory:()=>new AQ},{provide:Uk,useValue:"BrowserAnimations"},...vL],bL=[{provide:RM,useClass:G2},{provide:Uk,useValue:"NoopAnimations"},...vL];let UQ=(()=>{class n{static withConfig(t){return{ngModule:n,providers:t.disableAnimations?bL:eT}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({providers:eT,imports:[aP]}),n})();class Pt{static equals(e,t,i){return i?this.resolveFieldData(e,i)===this.resolveFieldData(t,i):this.equalsByValue(e,t)}static equalsByValue(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var o,s,a,i=Array.isArray(e),r=Array.isArray(t);if(i&&r){if((s=e.length)!=t.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[o],t[o]))return!1;return!0}if(i!=r)return!1;var l=e instanceof Date,c=t instanceof Date;if(l!=c)return!1;if(l&&c)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var h=Object.keys(e);if((s=h.length)!==Object.keys(t).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,h[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(e[a=h[o]],t[a]))return!1;return!0}return e!=e&&t!=t}static resolveFieldData(e,t){if(e&&t){if(this.isFunction(t))return t(e);if(-1==t.indexOf("."))return e[t];{let i=t.split("."),r=e;for(let o=0,s=i.length;o=e.length&&(i%=e.length,t%=e.length),e.splice(i,0,e.splice(t,1)[0]))}static insertIntoOrderedArray(e,t,i,r){if(i.length>0){let o=!1;for(let s=0;st){i.splice(s,0,e),o=!0;break}o||i.push(e)}else i.push(e)}static findIndexInList(e,t){let i=-1;if(t)for(let r=0;r-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}static isEmpty(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length}static isNotEmpty(e){return!this.isEmpty(e)}static compare(e,t,i,r=1){let o=-1;const s=this.isEmpty(e),a=this.isEmpty(t);return o=s&&a?0:s?r:a?-r:"string"==typeof e&&"string"==typeof t?e.localeCompare(t,i,{numeric:!0}):et?1:0,o}static sort(e,t,i=1,r,o=1){return(1===o?i:o)*Pt.compare(e,t,r,i)}static merge(e,t){if(null!=e||null!=t)return null!=e&&"object"!=typeof e||null!=t&&"object"!=typeof t?null!=e&&"string"!=typeof e||null!=t&&"string"!=typeof t?t||e:[e||"",t||""].join(" "):{...e||{},...t||{}}}}var wL=0,zd=function $Q(){let n=[];const r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(((o,s)=>{let a=n.length>0?n[n.length-1]:{key:o,value:s},l=a.value+(a.key===o?0:s)+1;return n.push({key:o,value:l}),l})(o,a)))},clear:o=>{o&&((o=>{n=n.filter(s=>s.value!==o)})(r(o)),o.style.zIndex="")},getCurrent:()=>n.length>0?n[n.length-1].value:0}}();const CL=["*"];let DL=(()=>{class n{constructor(){this.requireConfirmationSource=new se,this.acceptConfirmationSource=new se,this.requireConfirmation$=this.requireConfirmationSource.asObservable(),this.accept=this.acceptConfirmationSource.asObservable()}confirm(t){return this.requireConfirmationSource.next(t),this}close(){return this.requireConfirmationSource.next(null),this}onAccept(){this.acceptConfirmationSource.next(null)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),ir=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.IN="in",n.LESS_THAN="lt",n.LESS_THAN_OR_EQUAL_TO="lte",n.GREATER_THAN="gt",n.GREATER_THAN_OR_EQUAL_TO="gte",n.BETWEEN="between",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.DATE_IS="dateIs",n.DATE_IS_NOT="dateIsNot",n.DATE_BEFORE="dateBefore",n.DATE_AFTER="dateAfter",n})(),ML=(()=>{class n{constructor(){this.filters={startsWith:(t,i,r)=>{if(null==i||""===i.trim())return!0;if(null==t)return!1;let o=Pt.removeAccents(i.toString()).toLocaleLowerCase(r);return Pt.removeAccents(t.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(t,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==t)return!1;let o=Pt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1!==Pt.removeAccents(t.toString()).toLocaleLowerCase(r).indexOf(o)},notContains:(t,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==t)return!1;let o=Pt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1===Pt.removeAccents(t.toString()).toLocaleLowerCase(r).indexOf(o)},endsWith:(t,i,r)=>{if(null==i||""===i.trim())return!0;if(null==t)return!1;let o=Pt.removeAccents(i.toString()).toLocaleLowerCase(r),s=Pt.removeAccents(t.toString()).toLocaleLowerCase(r);return-1!==s.indexOf(o,s.length-o.length)},equals:(t,i,r)=>null==i||"string"==typeof i&&""===i.trim()||null!=t&&(t.getTime&&i.getTime?t.getTime()===i.getTime():Pt.removeAccents(t.toString()).toLocaleLowerCase(r)==Pt.removeAccents(i.toString()).toLocaleLowerCase(r)),notEquals:(t,i,r)=>!(null==i||"string"==typeof i&&""===i.trim()||null!=t&&(t.getTime&&i.getTime?t.getTime()===i.getTime():Pt.removeAccents(t.toString()).toLocaleLowerCase(r)==Pt.removeAccents(i.toString()).toLocaleLowerCase(r))),in:(t,i)=>{if(null==i||0===i.length)return!0;for(let r=0;rnull==i||null==i[0]||null==i[1]||null!=t&&(t.getTime?i[0].getTime()<=t.getTime()&&t.getTime()<=i[1].getTime():i[0]<=t&&t<=i[1]),lt:(t,i,r)=>null==i||null!=t&&(t.getTime&&i.getTime?t.getTime()null==i||null!=t&&(t.getTime&&i.getTime?t.getTime()<=i.getTime():t<=i),gt:(t,i,r)=>null==i||null!=t&&(t.getTime&&i.getTime?t.getTime()>i.getTime():t>i),gte:(t,i,r)=>null==i||null!=t&&(t.getTime&&i.getTime?t.getTime()>=i.getTime():t>=i),is:(t,i,r)=>this.filters.equals(t,i,r),isNot:(t,i,r)=>this.filters.notEquals(t,i,r),before:(t,i,r)=>this.filters.lt(t,i,r),after:(t,i,r)=>this.filters.gt(t,i,r),dateIs:(t,i)=>null==i||null!=t&&t.toDateString()===i.toDateString(),dateIsNot:(t,i)=>null==i||null!=t&&t.toDateString()!==i.toDateString(),dateBefore:(t,i)=>null==i||null!=t&&t.getTime()null==i||null!=t&&t.getTime()>i.getTime()}}filter(t,i,r,o,s){let a=[];if(t)for(let l of t)for(let c of i){let u=Pt.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}register(t,i){this.filters[t]=i}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),WQ=(()=>{class n{constructor(){this.messageSource=new se,this.clearSource=new se,this.messageObserver=this.messageSource.asObservable(),this.clearObserver=this.clearSource.asObservable()}add(t){t&&this.messageSource.next(t)}addAll(t){t&&t.length&&this.messageSource.next(t)}clear(t){this.clearSource.next(t||null)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),GQ=(()=>{class n{constructor(){this.clickSource=new se,this.clickObservable=this.clickSource.asObservable()}add(t){t&&this.clickSource.next(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Vd=(()=>{class n{constructor(){this.ripple=!1,this.overlayOptions={},this.filterMatchModeOptions={text:[ir.STARTS_WITH,ir.CONTAINS,ir.NOT_CONTAINS,ir.ENDS_WITH,ir.EQUALS,ir.NOT_EQUALS],numeric:[ir.EQUALS,ir.NOT_EQUALS,ir.LESS_THAN,ir.LESS_THAN_OR_EQUAL_TO,ir.GREATER_THAN,ir.GREATER_THAN_OR_EQUAL_TO],date:[ir.DATE_IS,ir.DATE_IS_NOT,ir.DATE_BEFORE,ir.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new se,this.translationObserver=this.translationSource.asObservable()}getTranslation(t){return this.translation[t]}setTranslation(t){this.translation={...this.translation,...t},this.translationSource.next(this.translation)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),TL=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-header"]],ngContentSelectors:CL,decls:1,vars:0,template:function(t,i){1&t&&(So(),_r(0))},encapsulation:2}),n})(),SL=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-footer"]],ngContentSelectors:CL,decls:1,vars:0,template:function(t,i){1&t&&(So(),_r(0))},encapsulation:2}),n})(),rr=(()=>{class n{constructor(t){this.template=t}getType(){return this.name}}return n.\u0275fac=function(t){return new(t||n)(O(Io))},n.\u0275dir=Me({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),xa=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})(),Ic=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.NO_FILTER="noFilter",n.LT="lt",n.LTE="lte",n.GT="gt",n.GTE="gte",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.CLEAR="clear",n.APPLY="apply",n.MATCH_ALL="matchAll",n.MATCH_ANY="matchAny",n.ADD_RULE="addRule",n.REMOVE_RULE="removeRule",n.ACCEPT="accept",n.REJECT="reject",n.CHOOSE="choose",n.UPLOAD="upload",n.CANCEL="cancel",n.DAY_NAMES="dayNames",n.DAY_NAMES_SHORT="dayNamesShort",n.DAY_NAMES_MIN="dayNamesMin",n.MONTH_NAMES="monthNames",n.MONTH_NAMES_SHORT="monthNamesShort",n.FIRST_DAY_OF_WEEK="firstDayOfWeek",n.TODAY="today",n.WEEK_HEADER="weekHeader",n.WEAK="weak",n.MEDIUM="medium",n.STRONG="strong",n.PASSWORD_PROMPT="passwordPrompt",n.EMPTY_MESSAGE="emptyMessage",n.EMPTY_FILTER_MESSAGE="emptyFilterMessage",n})(),ce=(()=>{class n{static addClass(t,i){t&&i&&(t.classList?t.classList.add(i):t.className+=" "+i)}static addMultipleClasses(t,i){if(t&&i)if(t.classList){let r=i.trim().split(" ");for(let o=0;o{if(m)return"relative"===getComputedStyle(m).getPropertyValue("position")?m:r(m.parentElement)},o=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),s=i.offsetHeight,a=i.getBoundingClientRect(),l=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),u=this.getViewport(),h=r(t)?.getBoundingClientRect()||{top:-1*l,left:-1*c};let f,p;a.top+s+o.height>u.height?(f=a.top-h.top-o.height,t.style.transformOrigin="bottom",a.top+f<0&&(f=-1*a.top)):(f=s+a.top-h.top,t.style.transformOrigin="top"),p=o.width>u.width?-1*(a.left-h.left):a.left-h.left+o.width>u.width?-1*(a.left-h.left+o.width-u.width):a.left-h.left,t.style.top=f+"px",t.style.left=p+"px"}static absolutePosition(t,i){const r=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),o=r.height,s=r.width,a=i.offsetHeight,l=i.offsetWidth,c=i.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),h=this.getViewport();let f,p;c.top+a+o>h.height?(f=c.top+u-o,t.style.transformOrigin="bottom",f<0&&(f=u)):(f=a+c.top+u,t.style.transformOrigin="top"),p=c.left+s>h.width?Math.max(0,c.left+d+l-s):c.left+d,t.style.top=f+"px",t.style.left=p+"px"}static getParents(t,i=[]){return null===t.parentNode?i:this.getParents(t.parentNode,i.concat([t.parentNode]))}static getScrollableParents(t){let i=[];if(t){let r=this.getParents(t);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of r){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&i.push(d)}}9!==a.nodeType&&s(a)&&i.push(a)}}return i}static getHiddenElementOuterHeight(t){t.style.visibility="hidden",t.style.display="block";let i=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",i}static getHiddenElementOuterWidth(t){t.style.visibility="hidden",t.style.display="block";let i=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",i}static getHiddenElementDimensions(t){let i={};return t.style.visibility="hidden",t.style.display="block",i.width=t.offsetWidth,i.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",i}static scrollInView(t,i){let r=getComputedStyle(t).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(t).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=t.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=t.scrollTop,h=t.clientHeight,f=this.getOuterHeight(i);u<0?t.scrollTop=d+u:u+f>h&&(t.scrollTop=d+u-h+f)}static fadeIn(t,i){t.style.opacity=0;let r=+new Date,o=0,s=function(){o=+t.style.opacity.replace(",",".")+((new Date).getTime()-r)/i,t.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(t,i){var r=1,a=50/i;let l=setInterval(()=>{(r-=a)<=0&&(r=0,clearInterval(l)),t.style.opacity=r},50)}static getWindowScrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static getWindowScrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static matches(t,i){var r=Element.prototype;return(r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(t,i)}static getOuterWidth(t,i){let r=t.offsetWidth;if(i){let o=getComputedStyle(t);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(t){let i=getComputedStyle(t);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(t){let i=getComputedStyle(t);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(t){let i=t.offsetWidth,r=getComputedStyle(t);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(t){let i=t.offsetWidth,r=getComputedStyle(t);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(t){let i=t.offsetHeight,r=getComputedStyle(t);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(t,i){let r=t.offsetHeight;if(i){let o=getComputedStyle(t);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(t){let i=t.offsetHeight,r=getComputedStyle(t);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(t){let i=t.offsetWidth,r=getComputedStyle(t);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let t=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0];return{width:t.innerWidth||r.clientWidth||o.clientWidth,height:t.innerHeight||r.clientHeight||o.clientHeight}}static getOffset(t){var i=t.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(t,i){let r=t.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,t)}static getUserAgent(){return navigator.userAgent}static isIE(){var t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||(t.indexOf("Trident/")>0?(t.indexOf("rv:"),!0):t.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(t,i){if(this.isElement(i))i.appendChild(t);else{if(!i.el||!i.el.nativeElement)throw"Cannot append "+i+" to "+t;i.el.nativeElement.appendChild(t)}}static removeChild(t,i){if(this.isElement(i))i.removeChild(t);else{if(!i.el||!i.el.nativeElement)throw"Cannot remove "+t+" from "+i;i.el.nativeElement.removeChild(t)}}static removeElement(t){"remove"in Element.prototype?t.remove():t.parentNode.removeChild(t)}static isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}static calculateScrollbarWidth(t){if(t){let i=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let r=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let t=document.createElement("div");t.className="p-scrollbar-measure",document.body.appendChild(t);let i=t.offsetHeight-t.clientHeight;return document.body.removeChild(t),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(t,i,r){t[i].apply(t,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(t){return Number.isInteger?Number.isInteger(t):"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}static isHidden(t){return!t||null===t.offsetParent}static isVisible(t){return t&&null!=t.offsetParent}static isExist(t){return null!==t&&typeof t<"u"&&t.nodeName&&t.parentNode}static focus(t,i){t&&document.activeElement!==t&&t.focus(i)}static getFocusableElements(t){let i=n.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),r=[];for(let o of i)(o.offsetWidth||o.offsetHeight||o.getClientRects().length)&&r.push(o);return r}static getNextFocusableElement(t,i=!1){const r=n.getFocusableElements(t);let o=0;if(r&&r.length>0){const s=r.indexOf(r[0].ownerDocument.activeElement);i?o=-1==s||0===s?r.length-1:s-1:-1!=s&&s!==r.length-1&&(o=s+1)}return r[o]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(t,i){if(!t)return null;switch(t){case"document":return document;case"window":return window;case"@next":return i?.nextElementSibling;case"@prev":return i?.previousElementSibling;case"@parent":return i?.parentElement;case"@grandparent":return i?.parentElement.parentElement;default:const r=typeof t;if("string"===r)return document.querySelector(t);if("object"===r&&t.hasOwnProperty("nativeElement"))return this.isExist(t.nativeElement)?t.nativeElement:void 0;const s=(a=t)&&a.constructor&&a.call&&a.apply?t():t;return s&&9===s.nodeType||this.isExist(s)?s:null}var a}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class EL{constructor(e,t=(()=>{})){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=ce.getScrollableParents(this.element);for(let e=0;e{class n{constructor(t,i,r){this.el=t,this.zone=i,this.config=r}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(t){let i=this.getInk();if(!i||"none"===getComputedStyle(i,null).display)return;if(ce.removeClass(i,"p-ink-active"),!ce.getHeight(i)&&!ce.getWidth(i)){let a=Math.max(ce.getOuterWidth(this.el.nativeElement),ce.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=ce.getOffset(this.el.nativeElement),o=t.pageX-r.left+document.body.scrollTop-ce.getWidth(i)/2,s=t.pageY-r.top+document.body.scrollLeft-ce.getHeight(i)/2;i.style.top=s+"px",i.style.left=o+"px",ce.addClass(i,"p-ink-active"),this.timeout=setTimeout(()=>{let a=this.getInk();a&&ce.removeClass(a,"p-ink-active")},401)}getInk(){const t=this.el.nativeElement.children;for(let i=0;i{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();const YQ=["headerchkbox"],qQ=["filter"];function KQ(n,e){1&n&&Dt(0)}function QQ(n,e){if(1&n&&(I(0,"div",7),_r(1),E(2,KQ,1,0,"ng-container",8),A()),2&n){const t=M();C(2),b("ngTemplateOutlet",t.headerTemplate)}}const xL=function(n){return{"p-checkbox-disabled":n}},ZQ=function(n,e,t){return{"p-highlight":n,"p-focus":e,"p-disabled":t}},IL=function(n){return{"pi pi-check":n}};function JQ(n,e){if(1&n){const t=Qe();I(0,"div",12)(1,"div",13)(2,"input",14),de("focus",function(){return ge(t),ye(M(2).onHeaderCheckboxFocus())})("blur",function(){return ge(t),ye(M(2).onHeaderCheckboxBlur())})("keydown.space",function(r){return ge(t),ye(M(2).toggleAll(r))}),A()(),I(3,"div",15,16),de("click",function(r){return ge(t),ye(M(2).toggleAll(r))}),_e(5,"span",17),A()()}if(2&n){const t=M(2);b("ngClass",xt(5,xL,t.disabled||t.toggleAllDisabled)),C(2),b("checked",t.allChecked)("disabled",t.disabled||t.toggleAllDisabled),C(1),b("ngClass",tl(7,ZQ,t.allChecked,t.headerCheckboxFocus,t.disabled||t.toggleAllDisabled)),C(2),b("ngClass",xt(11,IL,t.allChecked))}}function XQ(n,e){1&n&&Dt(0)}const eZ=function(n){return{options:n}};function tZ(n,e){if(1&n&&(pt(0),E(1,XQ,1,0,"ng-container",18),mt()),2&n){const t=M(2);C(1),b("ngTemplateOutlet",t.filterTemplate)("ngTemplateOutletContext",xt(2,eZ,t.filterOptions))}}function nZ(n,e){if(1&n){const t=Qe();I(0,"div",20)(1,"input",21,22),de("input",function(r){return ge(t),ye(M(3).onFilter(r))}),A(),_e(3,"span",23),A()}if(2&n){const t=M(3);C(1),b("value",t.filterValue||"")("disabled",t.disabled),Yt("placeholder",t.filterPlaceHolder)("aria-label",t.ariaFilterLabel)}}function iZ(n,e){1&n&&E(0,nZ,4,4,"div",19),2&n&&b("ngIf",M(2).filter)}function rZ(n,e){if(1&n&&(I(0,"div",7),E(1,JQ,6,13,"div",9),E(2,tZ,2,4,"ng-container",10),E(3,iZ,1,1,"ng-template",null,11,Bn),A()),2&n){const t=Cn(4),i=M();C(1),b("ngIf",i.checkbox&&i.multiple&&i.showToggleAll),C(1),b("ngIf",i.filterTemplate)("ngIfElse",t)}}function oZ(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M().$implicit,i=M(2);C(1),Ot(i.getOptionGroupLabel(t)||"empty")}}function sZ(n,e){1&n&&Dt(0)}function aZ(n,e){1&n&&Dt(0)}const tT=function(n){return{$implicit:n}};function lZ(n,e){if(1&n&&(I(0,"li",25),E(1,oZ,2,1,"span",3),E(2,sZ,1,0,"ng-container",18),A(),E(3,aZ,1,0,"ng-container",18)),2&n){const t=e.$implicit,i=M(2),r=Cn(8);C(1),b("ngIf",!i.groupTemplate),C(1),b("ngTemplateOutlet",i.groupTemplate)("ngTemplateOutletContext",xt(5,tT,t)),C(1),b("ngTemplateOutlet",r)("ngTemplateOutletContext",xt(7,tT,i.getOptionGroupChildren(t)))}}function cZ(n,e){if(1&n&&(pt(0),E(1,lZ,4,9,"ng-template",24),mt()),2&n){const t=M();C(1),b("ngForOf",t.optionsToRender)}}function uZ(n,e){1&n&&Dt(0)}function dZ(n,e){if(1&n&&(pt(0),E(1,uZ,1,0,"ng-container",18),mt()),2&n){const t=M(),i=Cn(8);C(1),b("ngTemplateOutlet",i)("ngTemplateOutletContext",xt(2,tT,t.optionsToRender))}}const hZ=function(n){return{"p-highlight":n}};function fZ(n,e){if(1&n&&(I(0,"div",12)(1,"div",28),_e(2,"span",17),A()()),2&n){const t=M().$implicit,i=M(2);b("ngClass",xt(3,xL,i.disabled||i.isOptionDisabled(t))),C(1),b("ngClass",xt(5,hZ,i.isSelected(t))),C(1),b("ngClass",xt(7,IL,i.isSelected(t)))}}function pZ(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M().$implicit,i=M(2);C(1),Ot(i.getOptionLabel(t))}}function mZ(n,e){1&n&&Dt(0)}const gZ=function(n,e){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":e}},yZ=function(n,e){return{$implicit:n,index:e}};function _Z(n,e){if(1&n){const t=Qe();I(0,"li",27),de("click",function(r){const s=ge(t).$implicit;return ye(M(2).onOptionClick(r,s))})("dblclick",function(r){const s=ge(t).$implicit;return ye(M(2).onOptionDoubleClick(r,s))})("touchend",function(){const o=ge(t).$implicit;return ye(M(2).onOptionTouchEnd(o))})("keydown",function(r){const s=ge(t).$implicit;return ye(M(2).onOptionKeyDown(r,s))}),E(1,fZ,3,9,"div",9),E(2,pZ,2,1,"span",3),E(3,mZ,1,0,"ng-container",18),A()}if(2&n){const t=e.$implicit,i=e.index,r=M(2);b("ngClass",Mi(8,gZ,r.isSelected(t),r.isOptionDisabled(t))),Yt("tabindex",r.disabled||r.isOptionDisabled(t)?null:"0")("aria-label",r.getOptionLabel(t))("aria-selected",r.isSelected(t)),C(1),b("ngIf",r.checkbox&&r.multiple),C(1),b("ngIf",!r.itemTemplate),C(1),b("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",Mi(11,yZ,t,i))}}function vZ(n,e){1&n&&E(0,_Z,4,14,"li",26),2&n&&b("ngForOf",e.$implicit)}function bZ(n,e){if(1&n&&(pt(0),Te(1),mt()),2&n){const t=M(2);C(1),Vi(" ",t.emptyFilterMessageLabel," ")}}function wZ(n,e){1&n&&Dt(0,null,30)}function CZ(n,e){if(1&n&&(I(0,"li",29),E(1,bZ,2,1,"ng-container",10),E(2,wZ,2,0,"ng-container",8),A()),2&n){const t=M();C(1),b("ngIf",!t.emptyFilterTemplate&&!t.emptyTemplate)("ngIfElse",t.emptyFilter),C(1),b("ngTemplateOutlet",t.emptyFilterTemplate||t.emptyTemplate)}}function DZ(n,e){if(1&n&&(pt(0),Te(1),mt()),2&n){const t=M(2);C(1),Vi(" ",t.emptyMessageLabel," ")}}function MZ(n,e){1&n&&Dt(0,null,31)}function TZ(n,e){if(1&n&&(I(0,"li",29),E(1,DZ,2,1,"ng-container",10),E(2,MZ,2,0,"ng-container",8),A()),2&n){const t=M();C(1),b("ngIf",!t.emptyTemplate)("ngIfElse",t.empty),C(1),b("ngTemplateOutlet",t.emptyTemplate)}}function SZ(n,e){1&n&&Dt(0)}function EZ(n,e){if(1&n&&(I(0,"div",32),_r(1,1),E(2,SZ,1,0,"ng-container",8),A()),2&n){const t=M();C(2),b("ngTemplateOutlet",t.footerTemplate)}}const xZ=[[["p-header"]],[["p-footer"]]],IZ=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},OZ=["p-header","p-footer"],AZ={provide:Dr,useExisting:Bt(()=>OL),multi:!0};let OL=(()=>{class n{constructor(t,i,r,o){this.el=t,this.cd=i,this.filterService=r,this.config=o,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new re,this.onClick=new re,this.onDblClick=new re,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(t){this._options=t,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(t){this._filterValue=t,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.filterBy&&(this.filterOptions={filter:t=>this.onFilter(t),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":default:this.itemTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"filter":this.filterTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"emptyfilter":this.emptyFilterTemplate=t.template}})}getOptionLabel(t){return this.optionLabel?Pt.resolveFieldData(t,this.optionLabel):null!=t.label?t.label:t}getOptionGroupChildren(t){return this.optionGroupChildren?Pt.resolveFieldData(t,this.optionGroupChildren):t.items}getOptionGroupLabel(t){return this.optionGroupLabel?Pt.resolveFieldData(t,this.optionGroupLabel):null!=t.label?t.label:t}getOptionValue(t){return this.optionValue?Pt.resolveFieldData(t,this.optionValue):this.optionLabel||void 0===t.value?t:t.value}isOptionDisabled(t){return this.optionDisabled?Pt.resolveFieldData(t,this.optionDisabled):void 0!==t.disabled&&t.disabled}writeValue(t){this.value=t,this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onOptionClick(t,i){this.disabled||this.isOptionDisabled(i)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(t,i):this.onOptionClickMultiple(t,i):this.onOptionClickSingle(t,i),this.onClick.emit({originalEvent:t,option:i,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(t){this.disabled||this.isOptionDisabled(t)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(t,i){this.disabled||this.isOptionDisabled(i)||this.readonly||this.onDblClick.emit({originalEvent:t,option:i,value:this.value})}onOptionClickSingle(t,i){let r=this.isSelected(i),o=!1;!this.optionTouched&&this.metaKeySelection?r?(t.metaKey||t.ctrlKey)&&(this.value=null,o=!0):(this.value=this.getOptionValue(i),o=!0):(this.value=r?null:this.getOptionValue(i),o=!0),o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickMultiple(t,i){let r=this.isSelected(i),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=t.metaKey||t.ctrlKey;r?(a?this.removeOption(i):this.value=[this.getOptionValue(i)],o=!0):(this.value=a&&this.value||[],this.value=[...this.value,this.getOptionValue(i)],o=!0)}else r?this.removeOption(i):this.value=[...this.value||[],this.getOptionValue(i)],o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}onOptionClickCheckbox(t,i){this.disabled||this.readonly||(this.isSelected(i)?this.removeOption(i):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(i)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}))}removeOption(t){this.value=this.value.filter(i=>!Pt.equals(i,this.getOptionValue(t),this.dataKey))}isSelected(t){let i=!1,r=this.getOptionValue(t);if(this.multiple){if(this.value)for(let o of this.value)if(Pt.equals(o,r,this.dataKey)){i=!0;break}}else i=Pt.equals(this.value,r,this.dataKey);return i}get allChecked(){let t=this.optionsToRender;if(!t||0===t.length)return!1;{let i=0,r=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of t)if(this.group)for(let l of this.getOptionGroupChildren(a)){let c=this.isOptionDisabled(l),u=this.isSelected(l);if(c)u?i++:r++;else{if(!u)return!1;o++}s++}else{let l=this.isOptionDisabled(a),c=this.isSelected(a);if(l)c?i++:r++;else{if(!c)return!1;o++}}return s===i||s===o||o&&s===o+r+i}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ic.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ic.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(){return!this.optionsToRender||this.optionsToRender&&0===this.optionsToRender.length}onFilter(t){this._filterValue=t.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let t=(this.filterBy||this.optionLabel||"label").split(","),i=[];for(let r of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(r),t,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&i.push({...r,[this.optionGroupChildren]:o})}this._filteredOptions=i}else this._filteredOptions=this._options.filter(t=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(t),this._filterValue,this.filterLocale));else this._filteredOptions=null}resetFilter(){this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this._filterValue=null,this._filteredOptions=null}get toggleAllDisabled(){let t=this.optionsToRender;if(!t||0===t.length)return!0;for(let i of t)if(!this.isOptionDisabled(i))return!1;return!0}toggleAll(t){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value}),t.preventDefault())}checkAll(){let i=[];this.optionsToRender.forEach(r=>{if(this.group){let o=this.getOptionGroupChildren(r);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&i.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(r);(!o||o&&this.isSelected(r))&&i.push(this.getOptionValue(r))}}),this.value=i}uncheckAll(){let i=[];this.optionsToRender.forEach(r=>{this.group?r.items&&r.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&i.push(this.getOptionValue(o))}):this.isOptionDisabled(r)&&this.isSelected(r)&&i.push(this.getOptionValue(r))}),this.value=i}onOptionKeyDown(t,i){if(this.readonly)return;let r=t.currentTarget;switch(t.which){case 40:var o=this.findNextItem(r);o&&o.focus(),t.preventDefault();break;case 38:var s=this.findPrevItem(r);s&&s.focus(),t.preventDefault();break;case 13:this.onOptionClick(t,i),t.preventDefault()}}findNextItem(t){let i=t.nextElementSibling;return i?ce.hasClass(i,"p-disabled")||ce.isHidden(i)||ce.hasClass(i,"p-listbox-item-group")?this.findNextItem(i):i:null}findPrevItem(t){let i=t.previousElementSibling;return i?ce.hasClass(i,"p-disabled")||ce.isHidden(i)||ce.hasClass(i,"p-listbox-item-group")?this.findPrevItem(i):i:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(Kn),O(ML),O(Vd))},n.\u0275cmp=xe({type:n,selectors:[["p-listbox"]],contentQueries:function(t,i,r){if(1&t&&(pi(r,TL,5),pi(r,SL,5),pi(r,rr,4)),2&t){let o;Xe(o=et())&&(i.headerFacet=o.first),Xe(o=et())&&(i.footerFacet=o.first),Xe(o=et())&&(i.templates=o)}},viewQuery:function(t,i){if(1&t&&(hn(YQ,5),hn(qQ,5)),2&t){let r;Xe(r=et())&&(i.headerCheckboxViewChild=r.first),Xe(r=et())&&(i.filterViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterBy:"filterBy",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Nt([AZ])],ngContentSelectors:OZ,decls:12,vars:18,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-empty-message",4,"ngIf"],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],["builtInFilterElement",""],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],["filter",""],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(t,i){1&t&&(So(xZ),I(0,"div",0),E(1,QQ,3,1,"div",1),E(2,rZ,5,3,"div",1),I(3,"div",0)(4,"ul",2),E(5,cZ,2,1,"ng-container",3),E(6,dZ,2,4,"ng-container",3),E(7,vZ,1,1,"ng-template",null,4,Bn),E(9,CZ,3,3,"li",5),E(10,TZ,3,3,"li",5),A()(),E(11,EZ,3,1,"div",6),A()),2&t&&(Dn(i.styleClass),b("ngClass",xt(16,IZ,i.disabled))("ngStyle",i.style),C(1),b("ngIf",i.headerFacet||i.headerTemplate),C(1),b("ngIf",i.checkbox&&i.multiple&&i.showToggleAll||i.filter),C(1),Dn(i.listStyleClass),b("ngClass","p-listbox-list-wrapper")("ngStyle",i.listStyle),C(1),Yt("aria-multiselectable",i.multiple),C(1),b("ngIf",i.group),C(1),b("ngIf",!i.group),C(3),b("ngIf",i.hasFilter()&&i.isEmpty()),C(1),b("ngIf",!i.hasFilter()&&i.isEmpty()),C(1),b("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[yi,Hr,nn,ko,wr,Bd],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),nT=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,xa,Oc,xa]}),n})();function kZ(n,e){1&n&&Dt(0)}const NZ=function(n,e,t,i){return{"p-button-icon":!0,"p-button-icon-left":n,"p-button-icon-right":e,"p-button-icon-top":t,"p-button-icon-bottom":i}};function PZ(n,e){if(1&n&&_e(0,"span",4),2&n){const t=M();Dn(t.loading?"p-button-loading-icon "+t.loadingIcon:t.icon),b("ngClass",Gf(4,NZ,"left"===t.iconPos&&t.label,"right"===t.iconPos&&t.label,"top"===t.iconPos&&t.label,"bottom"===t.iconPos&&t.label)),Yt("aria-hidden",!0)}}function LZ(n,e){if(1&n&&(I(0,"span",5),Te(1),A()),2&n){const t=M();Yt("aria-hidden",t.icon&&!t.label),C(1),Ot(t.label)}}function RZ(n,e){if(1&n&&(I(0,"span",4),Te(1),A()),2&n){const t=M();Dn(t.badgeClass),b("ngClass",t.badgeStyleClass()),C(1),Ot(t.badge)}}const FZ=function(n,e,t,i,r){return{"p-button p-component":!0,"p-button-icon-only":n,"p-button-vertical":e,"p-disabled":t,"p-button-loading":i,"p-button-loading-label-only":r}},jZ=["*"],Ac={button:"p-button",component:"p-component",iconOnly:"p-button-icon-only",disabled:"p-disabled",loading:"p-button-loading",labelOnly:"p-button-loading-label-only"};let ds=(()=>{class n{constructor(t){this.el=t,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1,this._internalClasses=Object.values(Ac)}get label(){return this._label}set label(t){this._label=t,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}get icon(){return this._icon}set icon(t){this._icon=t,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(t){this._loading=t,this.initialized&&(this.updateIcon(),this.setStyleClass())}get htmlElement(){return this.el.nativeElement}ngAfterViewInit(){ce.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){const t=[Ac.button,Ac.component];return this.icon&&!this.label&&Pt.isEmpty(this.htmlElement.textContent)&&t.push(Ac.iconOnly),this.loading&&(t.push(Ac.disabled,Ac.loading),!this.icon&&this.label&&t.push(Ac.labelOnly)),t}setStyleClass(){const t=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...t)}createLabel(){if(this.label){let t=document.createElement("span");this.icon&&!this.label&&t.setAttribute("aria-hidden","true"),t.className="p-button-label",t.appendChild(document.createTextNode(this.label)),this.htmlElement.appendChild(t)}}createIcon(){if(this.icon||this.loading){let t=document.createElement("span");t.className="p-button-icon",t.setAttribute("aria-hidden","true");let i=this.label?"p-button-icon-"+this.iconPos:null;i&&ce.addClass(t,i);let r=this.getIconClass();r&&ce.addMultipleClasses(t,r),this.htmlElement.insertBefore(t,this.htmlElement.firstChild)}}updateLabel(){let t=ce.findSingle(this.htmlElement,".p-button-label");this.label?t?t.textContent=this.label:this.createLabel():t&&this.htmlElement.removeChild(t)}updateIcon(){let t=ce.findSingle(this.htmlElement,".p-button-icon");this.icon||this.loading?t?t.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIcon():t&&this.htmlElement.removeChild(t)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}ngOnDestroy(){this.initialized=!1}}return n.\u0275fac=function(t){return new(t||n)(O(kt))},n.\u0275dir=Me({type:n,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),n})(),iT=(()=>{class n{constructor(){this.type="button",this.iconPos="left",this.loading=!1,this.loadingIcon="pi pi-spinner pi-spin",this.onClick=new re,this.onFocus=new re,this.onBlur=new re}ngAfterContentInit(){this.templates.forEach(t=>{t.getType(),this.contentTemplate=t.template})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&1===String(this.badge).length}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-button"]],contentQueries:function(t,i,r){if(1&t&&pi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:"disabled",loading:"loading",loadingIcon:"loadingIcon",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},ngContentSelectors:jZ,decls:6,vars:17,consts:[["pRipple","",3,"ngStyle","disabled","ngClass","click","focus","blur"],[4,"ngTemplateOutlet"],[3,"ngClass","class",4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass"],[1,"p-button-label"]],template:function(t,i){1&t&&(So(),I(0,"button",0),de("click",function(o){return i.onClick.emit(o)})("focus",function(o){return i.onFocus.emit(o)})("blur",function(o){return i.onBlur.emit(o)}),_r(1),E(2,kZ,1,0,"ng-container",1),E(3,PZ,1,9,"span",2),E(4,LZ,2,2,"span",3),E(5,RZ,2,4,"span",2),A()),2&t&&(Dn(i.styleClass),b("ngStyle",i.style)("disabled",i.disabled||i.loading)("ngClass",function sk(n,e,t,i,r,o,s,a){const l=mr()+n,c=ie(),u=To(c,l,t,i,r,o);return er(c,l+4,s)||u?Es(c,l+5,a?e.call(a,t,i,r,o,s):e(t,i,r,o,s)):jf(c,l+5)}(11,FZ,i.icon&&!i.label,("top"===i.iconPos||"bottom"===i.iconPos)&&i.label,i.disabled||i.loading,i.loading,i.loading&&!i.icon&&i.label)),Yt("type",i.type)("aria-label",i.ariaLabel),C(2),b("ngTemplateOutlet",i.contentTemplate),C(1),b("ngIf",!i.contentTemplate&&(i.icon||i.loading)),C(1),b("ngIf",!i.contentTemplate&&i.label),C(1),b("ngIf",!i.contentTemplate&&i.badge))},dependencies:[yi,nn,ko,wr,Bd],encapsulation:2,changeDetection:0}),n})(),ks=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,Oc]}),n})();function $r(n){return n instanceof kt?n.nativeElement:n}function dv(n,e,t,i){return k(t)&&(i=t,t=void 0),i?dv(n,e,t).pipe(ue(r=>R(r)?i(...r):i(r))):new Se(r=>{kL(n,e,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,t)})}function kL(n,e,t,i,r){let o;if(function HZ(n){return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener}(n)){const s=n;n.addEventListener(e,t,r),o=()=>s.removeEventListener(e,t,r)}else if(function UZ(n){return n&&"function"==typeof n.on&&"function"==typeof n.off}(n)){const s=n;n.on(e,t),o=()=>s.off(e,t)}else if(function BZ(n){return n&&"function"==typeof n.addListener&&"function"==typeof n.removeListener}(n)){const s=n;n.addListener(e,t),o=()=>s.removeListener(e,t)}else{if(!n||!n.length)throw new TypeError("Invalid event target");for(let s=0,a=n.length;s0?super.requestAsyncId(e,t,i):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(()=>e.flush(null))))}recycleAsyncId(e,t,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(e,t,i);0===e.actions.length&&(cancelAnimationFrame(t),e.scheduled=void 0)}});let GZ=1;const YZ=Promise.resolve(),hv={};function PL(n){return n in hv&&(delete hv[n],!0)}const LL={setImmediate(n){const e=GZ++;return hv[e]=!0,YZ.then(()=>PL(e)&&n()),e},clearImmediate(n){PL(n)}},rT=new class KZ extends us{flush(e){this.active=!0,this.scheduled=void 0;const{actions:t}=this;let i,r=-1,o=t.length;e=e||t.shift();do{if(i=e.execute(e.state,e.delay))break}while(++r0?super.requestAsyncId(e,t,i):(e.actions.push(this),e.scheduled||(e.scheduled=LL.setImmediate(e.flush.bind(e,null))))}recycleAsyncId(e,t,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(e,t,i);0===e.actions.length&&(LL.clearImmediate(t),e.scheduled=void 0)}}),Ud=new us(x_);class ZZ{constructor(e){this.durationSelector=e}call(e,t){return t.subscribe(new JZ(e,this.durationSelector))}}class JZ extends Ko{constructor(e,t){super(e),this.durationSelector=t,this.hasValue=!1}_next(e){if(this.value=e,this.hasValue=!0,!this.throttled){let t;try{const{durationSelector:r}=this;t=r(e)}catch(r){return this.destination.error(r)}const i=Zl(t,new Vn(this));!i||i.closed?this.clearThrottle():this.add(this.throttled=i)}}clearThrottle(){const{value:e,hasValue:t,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function oT(n){return!R(n)&&n-parseFloat(n)+1>=0}function RL(n=0,e,t){let i=-1;return oT(e)?i=Number(e)<1?1:Number(e):vi(e)&&(t=e),vi(t)||(t=Ud),new Se(r=>{const o=oT(n)?n:+n-t.now();return t.schedule(XZ,o,{index:0,period:i,subscriber:r})})}function XZ(n){const{index:e,period:t,subscriber:i}=n;if(i.next(e),!i.closed){if(-1===t)return i.complete();n.index=e+1,this.schedule(n,t)}}let sT;try{sT=typeof Intl<"u"&&Intl.v8BreakIterator}catch{sT=!1}let gp,aT,jL=(()=>{class n{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function HW(n){return n===jN}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!sT)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(t){return new(t||n)(F(i_))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function yp(n){return function eJ(){if(null==gp&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>gp=!0}))}finally{gp=gp||!1}return gp}()?n:!!n.capture}function VL(n){if(function tJ(){if(null==aT){const n=typeof document<"u"?document.head:null;aT=!(!n||!n.createShadowRoot&&!n.attachShadow)}return aT}()){const e=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function pv(n){return n.composedPath?n.composedPath()[0]:n.target}let oJ=(()=>{class n{constructor(t,i,r){this._platform=t,this._change=new se,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(t.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,i=this._getWindow(),r=t.documentElement,o=r.getBoundingClientRect();return{top:-o.top||t.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||t.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(function FL(n,e=Ud){return function QZ(n){return function(t){return t.lift(new ZZ(n))}}(()=>RL(n,e))}(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(t){return new(t||n)(F(jL),F(Jt),F(Nn,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),sJ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({}),n})();function hl(){}function Mn(n,e,t){return function(r){return r.lift(new SJ(n,e,t))}}class SJ{constructor(e,t,i){this.nextOrObserver=e,this.error=t,this.complete=i}call(e,t){return t.subscribe(new EJ(e,this.nextOrObserver,this.error,this.complete))}}class EJ extends ee{constructor(e,t,i,r){super(e),this._tapNext=hl,this._tapError=hl,this._tapComplete=hl,this._tapError=i||hl,this._tapComplete=r||hl,k(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||hl,this._tapError=t.error||hl,this._tapComplete=t.complete||hl)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}function $d(n,e=Ud){return t=>t.lift(new xJ(n,e))}class xJ{constructor(e,t){this.dueTime=e,this.scheduler=t}call(e,t){return t.subscribe(new IJ(e,this.dueTime,this.scheduler))}}class IJ extends ee{constructor(e,t,i){super(e),this.dueTime=t,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(OJ,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){const e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}function OJ(n){n.debouncedNext()}class NJ{constructor(e){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new se,this._typeaheadSubscription=oe.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new se,this.change=new se,e instanceof Kf&&(this._itemChangesSubscription=e.changes.subscribe(t=>{if(this._activeItem){const r=t.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Mn(t=>this._pressedLetters.push(t)),$d(e),Un(()=>this._pressedLetters.length>0),ue(()=>this._pressedLetters.join(""))).subscribe(t=>{const i=this._getItemsArray();for(let r=1;r!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(on[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){const t=this._getItemsArray(),i="number"==typeof e?e:t.indexOf(e);this._activeItem=t[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){const t=this._getItemsArray();for(let i=1;i<=t.length;i++){const r=(this._activeItemIndex+e*i+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){const i=this._getItemsArray();if(i[e]){for(;this._skipPredicateFn(i[e]);)if(!i[e+=t])return;this.setActiveItem(e)}}_getItemsArray(){return this._items instanceof Kf?this._items.toArray():this._items}}class HL extends NJ{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}}function HJ(n){const{subscriber:e,counter:t,period:i}=n;e.next(t),this.schedule({subscriber:e,counter:t+1,period:i},i)}function Tn(n){return e=>e.lift(new $J(n))}class $J{constructor(e){this.notifier=e}call(e,t){const i=new WJ(e),r=Zl(this.notifier,new Vn(i));return r&&!i.seenValue?(i.add(r),t.subscribe(i)):i}}class WJ extends Ko{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function lT(...n){return function GJ(){return $a(1)}()(Re(...n))}const WL=(()=>{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})();function Tt(n){return e=>0===n?I_():e.lift(new YJ(n))}class YJ{constructor(e){if(this.total=e,this.total<0)throw new WL}call(e,t){return t.subscribe(new qJ(e,this.total))}}class qJ extends ee{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){const t=this.total,i=++this.count;i<=t&&(this.destination.next(e),i===t&&(this.destination.complete(),this.unsubscribe()))}}function cT(n,e,t){for(let i in e)if(e.hasOwnProperty(i)){const r=e[i];r?n.setProperty(i,r,t?.has(i)?"important":""):n.removeProperty(i)}return n}function Wd(n,e){const t=e?"":"none";cT(n.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function YL(n,e,t){cT(n.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function gv(n,e){return e&&"none"!=e?n+" "+e:n}function qL(n){const e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function uT(n,e){return n.getPropertyValue(e).split(",").map(i=>i.trim())}function dT(n){const e=n.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function hT(n,e,t){const{top:i,bottom:r,left:o,right:s}=n;return t>=i&&t<=r&&e>=o&&e<=s}function _p(n,e,t){n.top+=e,n.bottom=n.top+n.height,n.left+=t,n.right=n.left+n.width}function KL(n,e,t,i){const{top:r,right:o,bottom:s,left:a,width:l,height:c}=n,u=l*e,d=c*e;return i>r-d&&ia-u&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:dT(t)})})}handleScroll(e){const t=pv(e),i=this.positions.get(t);if(!i)return null;const r=i.scrollPosition;let o,s;if(t===this._document){const c=this.getViewportScrollPosition();o=c.top,s=c.left}else o=t.scrollTop,s=t.scrollLeft;const a=r.top-o,l=r.left-s;return this.positions.forEach((c,u)=>{c.clientRect&&t!==u&&t.contains(u)&&_p(c.clientRect,a,l)}),r.top=o,r.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function ZL(n){const e=n.cloneNode(!0),t=e.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();e.removeAttribute("id");for(let r=0;rWd(i,t)))}constructor(e,t,i,r,o,s){this._config=t,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new se,this._pointerMoveSubscription=oe.EMPTY,this._pointerUpSubscription=oe.EMPTY,this._scrollSubscription=oe.EMPTY,this._resizeSubscription=oe.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new se,this.started=new se,this.released=new se,this.ended=new se,this.entered=new se,this.exited=new se,this.dropped=new se,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{const l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){if(Math.abs(l.x-this._pickupPositionOnPage.x)+Math.abs(l.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const f=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),p=this._dropContainer;if(!f)return void this._endDragSequence(a);(!p||!p.isDragging()&&!p.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}a.preventDefault();const c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{const u=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,d=this._activeTransform;d.x=c.x-u.x+this._passiveTransform.x,d.y=c.y-u.y+this._passiveTransform.y,this._applyRootElementTransform(d.x,d.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){const l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new QL(i),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>$r(i)),this._handles.forEach(i=>Wd(i,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){const t=$r(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,yv),t.addEventListener("touchstart",this._pointerDown,tR),t.addEventListener("dragstart",this._nativeDragStart,yv)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?$r(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),Wd(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Wd(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){const e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){const e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){vp(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const i=this._rootElement,r=i.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();r.insertBefore(s,i),this._initialTransform=i.style.transform||"",this._preview=this._createPreviewElement(),YL(i,!1,fT),this._document.body.appendChild(r.replaceChild(o,i)),this._getPreviewInsertionPoint(r,a).appendChild(this._preview),this.started.next({source:this,event:e}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();const i=this.isDragging(),r=vp(t),o=!r&&0!==t.button,s=this._rootElement,a=pv(t),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=r?function VJ(n){const e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!e||-1!==e.identifier||null!=e.radiusX&&1!==e.radiusX||null!=e.radiusY&&1!==e.radiusY)}(t):function zJ(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}(t);if(a&&a.draggable&&"mousedown"===t.type&&t.preventDefault(),i||o||l||c)return;if(this._handles.length){const h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=dT(this._boundaryElement));const u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,e,t);const d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){YL(this._rootElement,!0,fT),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,i=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),o=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,s,o,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,t,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_createPreviewElement(){const e=this._previewTemplate,t=this.previewClass,i=e?e.template:null;let r;if(i&&e){const o=e.matchSize?this._initialClientRect:null,s=e.viewContainer.createEmbeddedView(i,e.context);s.detectChanges(),r=iR(s,this._document),this._previewRef=s,e.matchSize?rR(r,o):r.style.transform=_v(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=ZL(this._rootElement),rR(r,this._initialClientRect),this._initialTransform&&(r.style.transform=this._initialTransform);return cT(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},fT),Wd(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(o=>r.classList.add(o)):r.classList.add(t)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);const t=function XJ(n){const e=getComputedStyle(n),t=uT(e,"transition-property"),i=t.find(a=>"transform"===a||"all"===a);if(!i)return 0;const r=t.indexOf(i),o=uT(e,"transition-duration"),s=uT(e,"transition-delay");return qL(o[r])+qL(s[r])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const r=s=>{(!s||pv(s)===this._preview&&"transform"===s.propertyName)&&(this._preview?.removeEventListener("transitionend",r),i(),clearTimeout(o))},o=setTimeout(r,1.5*t);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const e=this._placeholderTemplate,t=e?e.template:null;let i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=iR(this._placeholderRef,this._document)):i=ZL(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(e,t,i){const r=t===this._rootElement?null:t,o=r?r.getBoundingClientRect():e,s=vp(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:o.left-e.left+(s.pageX-o.left-a.left),y:o.top-e.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(e){const t=this._getViewportScrollPosition(),i=vp(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=i.pageX-t.left,o=i.pageY-t.top;if(this._ownerSVGElement){const s=this._ownerSVGElement.getScreenCTM();if(s){const a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(e){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialClientRect,this._pickupPositionInElement):e;if("x"===this.lockAxis||"x"===t?r=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===t)&&(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:o,y:s}=this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),u=a.top+s,d=a.bottom-(c-s);i=nR(i,a.left+o,a.right-(l-o)),r=nR(r,u,d)}return{x:i,y:r}}_updatePointerDirectionDelta(e){const{x:t,y:i}=e,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-o.x),a=Math.abs(i-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>o.x?1:-1,o.x=t),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>o.y?1:-1,o.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,Wd(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,yv),e.removeEventListener("touchstart",this._pointerDown,tR),e.removeEventListener("dragstart",this._nativeDragStart,yv)}_applyRootElementTransform(e,t){const i=_v(e,t),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=gv(i,this._initialTransform)}_applyPreviewTransform(e,t){const i=this._previewTemplate?.template?void 0:this._initialTransform,r=_v(e,t);this._preview.style.transform=gv(r,i)}_getDragDistance(e){const t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(0===e&&0===t||this.isDragging()||!this._boundaryElement)return;const i=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===i.width&&0===i.height)return;const o=r.left-i.left,s=i.right-r.right,a=r.top-i.top,l=i.bottom-r.bottom;r.width>i.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,r.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){const t=this.dragStartDelay;return"number"==typeof t?t:vp(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){const t=this._parentPositions.handleScroll(e);if(t){const i=pv(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&_p(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=VL(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){const i=this._previewContainer||"global";if("parent"===i)return e;if("global"===i){const r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return $r(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}}function _v(n,e){return`translate3d(${Math.round(n)}px, ${Math.round(e)}px, 0)`}function nR(n,e,t){return Math.max(e,Math.min(t,n))}function vp(n){return"t"===n.type[0]}function iR(n,e){const t=n.rootNodes;if(1===t.length&&t[0].nodeType===e.ELEMENT_NODE)return t[0];const i=e.createElement("div");return t.forEach(r=>i.appendChild(r)),i}function rR(n,e){n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.transform=_v(e.left,e.top)}function bp(n,e){return Math.max(0,Math.min(e,n))}class rX{constructor(e,t){this._element=e,this._dragDropRegistry=t,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(e){this.withItems(e)}sort(e,t,i,r){const o=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,i,r);if(-1===s&&o.length>0)return null;const a="horizontal"===this.orientation,l=o.findIndex(g=>g.drag===e),c=o[s],d=c.clientRect,h=l>s?1:-1,f=this._getItemOffsetPx(o[l].clientRect,d,h),p=this._getSiblingOffsetPx(l,o,h),m=o.slice();return function iX(n,e,t){const i=bp(e,n.length-1),r=bp(t,n.length-1);if(i===r)return;const o=n[i],s=r{if(m[y]===g)return;const v=g.drag===e,w=v?f:p,_=v?e.getPlaceholderElement():g.drag.getRootElement();g.offset+=w,a?(_.style.transform=gv(`translate3d(${Math.round(g.offset)}px, 0, 0)`,g.initialTransform),_p(g.clientRect,0,w)):(_.style.transform=gv(`translate3d(0, ${Math.round(g.offset)}px, 0)`,g.initialTransform),_p(g.clientRect,w,0))}),this._previousSwap.overlaps=hT(d,t,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:s}}enter(e,t,i,r){const o=null==r||r<0?this._getItemIndexFromPointerPosition(e,t,i):r,s=this._activeDraggables,a=s.indexOf(e),l=e.getPlaceholderElement();let c=s[o];if(c===e&&(c=s[o+1]),!c&&(null==o||-1===o||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){const u=c.getRootElement();u.parentElement.insertBefore(l,u),s.splice(o,0,e)}else $r(this._element).appendChild(l),s.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables.forEach(e=>{const t=e.getRootElement();if(t){const i=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{_p(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const e="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:dT(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getItemOffsetPx(e,t,i){const r="horizontal"===this.orientation;let o=r?t.left-e.left:t.top-e.top;return-1===i&&(o+=r?t.width-e.width:t.height-e.height),o}_getSiblingOffsetPx(e,t,i){const r="horizontal"===this.orientation,o=t[e].clientRect,s=t[e+-1*i];let a=o[r?"width":"height"]*i;if(s){const l=r?"left":"top",c=r?"right":"bottom";-1===i?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,r="horizontal"===this.orientation;if(i[0].drag!==this._activeDraggables[0]){const s=i[i.length-1].clientRect;return r?e>=s.right:t>=s.bottom}{const s=i[0].clientRect;return r?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,i,r){const o="horizontal"===this.orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>a!==e&&((!r||a!==this._previousSwap.drag||!this._previousSwap.overlaps||(o?r.x:r.y)!==this._previousSwap.delta)&&(o?t>=Math.floor(l.left)&&t=Math.floor(l.top)&&i!0,this.sortPredicate=()=>!0,this.beforeStarted=new se,this.entered=new se,this.exited=new se,this.dropped=new se,this.sorted=new se,this.receivingStarted=new se,this.receivingStopped=new se,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=oe.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new se,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function UJ(n=0,e=Ud){return(!oT(n)||n<0)&&(n=0),(!e||"function"!=typeof e.schedule)&&(e=Ud),new Se(t=>(t.add(e.schedule(HJ,n,{subscriber:t,counter:0,period:n})),t))}(0,NL).pipe(Tn(this._stopScrollTimers)).subscribe(()=>{const s=this._scrollNode,a=this.autoScrollStep;1===this._verticalScrollDirection?s.scrollBy(0,-a):2===this._verticalScrollDirection&&s.scrollBy(0,a),1===this._horizontalScrollDirection?s.scrollBy(-a,0):2===this._horizontalScrollDirection&&s.scrollBy(a,0)})},this.element=$r(e),this._document=i,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new QL(i),this._sortStrategy=new rX(this.element,t),this._sortStrategy.withSortPredicate((s,a)=>this.sortPredicate(s,a,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,i,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,r,o,s,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:l})}withItems(e){const t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>-1===e.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._sortStrategy.direction=e,this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){return this._sortStrategy.orientation=e,this}withScrollableParents(e){const t=$r(this.element);return this._scrollableElements=-1===e.indexOf(t)?[t,...e]:e.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,r){if(this.sortingDisabled||!this._clientRect||!KL(this._clientRect,.05,t,i))return;const o=this._sortStrategy.sort(e,t,i,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,r=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||i||KL(s.clientRect,.05,e,t)&&([r,o]=function sX(n,e,t,i){const r=aR(e,i),o=lR(e,t);let s=0,a=0;if(r){const l=n.scrollTop;1===r?l>0&&(s=1):n.scrollHeight-l>n.clientHeight&&(s=2)}if(o){const l=n.scrollLeft;1===o?l>0&&(a=1):n.scrollWidth-l>n.clientWidth&&(a=2)}return[s,a]}(a,s.clientRect,e,t),(r||o)&&(i=a))}),!r&&!o){const{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};r=aR(l,t),o=lR(l,e),i=window}i&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=i,(r||o)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const e=$r(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const e=$r(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(e).clientRect}_reset(){this._isDragging=!1;const e=$r(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(e,t){return null!=this._clientRect&&hT(this._clientRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(r=>r._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._clientRect||!hT(this._clientRect,t,i)||!this.enterPredicate(e,this))return!1;const r=this._getShadowRoot().elementFromPoint(t,i);if(!r)return!1;const o=$r(this.element);return r===o||o.contains(r)}_startReceiving(e,t){const i=this._activeSiblings;!i.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const e=VL($r(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}}function aR(n,e){const{top:t,bottom:i,height:r}=n,o=.05*r;return e>=t-o&&e<=t+o?1:e>=i-o&&e<=i+o?2:0}function lR(n,e){const{left:t,right:i,width:r}=n,o=.05*r;return e>=t-o&&e<=t+o?1:e>=i-o&&e<=i+o?2:0}const vv=yp({passive:!1,capture:!0});let aX=(()=>{class n{constructor(t,i){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new se,this.pointerUp=new se,this.scroll=new se,this._preventDefaultWhileDragging=r=>{this._activeDragInstances.length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=i}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,vv)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,vv)}startDragging(t,i){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const r=i.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:vv}),r||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:vv}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(t){const i=this._activeDragInstances.indexOf(t);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}scrolled(t){const i=[this.scroll];return t&&t!==this._document&&i.push(new Se(r=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&r.next(a)};return t.addEventListener("scroll",s,!0),()=>{t.removeEventListener("scroll",s,!0)}}))),ys(...i)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,i)=>{this._document.removeEventListener(i,t.handler,t.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(t){return new(t||n)(F(Jt),F(Nn))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const lX={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let pT=(()=>{class n{constructor(t,i,r,o){this._document=t,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=o}createDrag(t,i=lX){return new nX(t,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new oX(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(t){return new(t||n)(F(Nn),F(Jt),F(oJ),F(aX))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),fR=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({providers:[pT],imports:[sJ]}),n})(),_T=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,ks,xa,Oc,fR,xa,fR]}),n})();const AX=["data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjMyODEgMjJWMjEuMDE1Nkw3LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw2LjYzMjgxIDExLjYxNzJWMTAuNjI1SDEwLjcxODhWMTEuNjE3Mkw5LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxNC44ODI4VjExLjgzNTlMMTMuNjA5NCAxMS42MTcyVjEwLjYyNUgxNy42OTUzVjExLjYxNzJMMTYuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTcuNjk1MyAyMS4wMTU2VjIySDEzLjYwOTRWMjEuMDE1NkwxNC44ODI4IDIwLjc5NjlWMTYuOTc2Nkg5LjQ0NTMxVjIwLjc5NjlMMTAuNzE4OCAyMS4wMTU2VjIySDYuNjMyODFaTTE5LjI3MzQgMjJWMjEuMDE1NkwyMS4wMzEyIDIwLjc5NjlWMTIuMjczNEwxOS4yNDIyIDEyLjMwNDdWMTEuMzQzOEwyMi41NzAzIDEwLjYyNVYyMC43OTY5TDI0LjMyMDMgMjEuMDE1NlYyMkgxOS4yNzM0WiIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTE4LjA4NTkgMjJWMjAuOTQ1M0wyMS44MTI1IDE2LjgwNDdDMjIuMjU1MiAxNi4zMDk5IDIyLjYwMTYgMTUuODg4IDIyLjg1MTYgMTUuNTM5MUMyMy4xMDE2IDE1LjE4NDkgMjMuMjc2IDE0Ljg2NDYgMjMuMzc1IDE0LjU3ODFDMjMuNDc0IDE0LjI5MTcgMjMuNTIzNCAxMy45OTQ4IDIzLjUyMzQgMTMuNjg3NUMyMy41MjM0IDEzLjExOTggMjMuMzUxNiAxMi42NDMyIDIzLjAwNzggMTIuMjU3OEMyMi42NjQxIDExLjg2NzIgMjIuMTcxOSAxMS42NzE5IDIxLjUzMTIgMTEuNjcxOUMyMC44NjQ2IDExLjY3MTkgMjAuMzQzOCAxMS44NzI0IDE5Ljk2ODggMTIuMjczNEMxOS41OTkgMTIuNjc0NSAxOS40MTQxIDEzLjI0MjIgMTkuNDE0MSAxMy45NzY2SDE3LjkzNzVMMTcuOTIxOSAxMy45Mjk3QzE3LjkwNjIgMTMuMjczNCAxOC4wNDQzIDEyLjY4NDkgMTguMzM1OSAxMi4xNjQxQzE4LjYyNzYgMTEuNjM4IDE5LjA0OTUgMTEuMjI0IDE5LjYwMTYgMTAuOTIxOUMyMC4xNTg5IDEwLjYxNDYgMjAuODIwMyAxMC40NjA5IDIxLjU4NTkgMTAuNDYwOUMyMi4zMDQ3IDEwLjQ2MDkgMjIuOTIxOSAxMC41OTkgMjMuNDM3NSAxMC44NzVDMjMuOTU4MyAxMS4xNDU4IDI0LjM1OTQgMTEuNTE4MiAyNC42NDA2IDExLjk5MjJDMjQuOTIxOSAxMi40NjYxIDI1LjA2MjUgMTMuMDEwNCAyNS4wNjI1IDEzLjYyNUMyNS4wNjI1IDE0LjI1IDI0Ljg3NzYgMTQuODcyNCAyNC41MDc4IDE1LjQ5MjJDMjQuMTQzMiAxNi4xMTIgMjMuNjI3NiAxNi43ODEyIDIyLjk2MDkgMTcuNUwxOS45Njg4IDIwLjc1NzhMMTkuOTg0NCAyMC43OTY5SDI0LjAyMzRMMjQuMTQ4NCAxOS40OTIySDI1LjQ1MzFWMjJIMTguMDg1OVoiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg==","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTIxLjQ2ODggMjIuMTY0MUMyMC43NzYgMjIuMTY0MSAyMC4xNTg5IDIyLjAzOTEgMTkuNjE3MiAyMS43ODkxQzE5LjA3NTUgMjEuNTMzOSAxOC42NTEgMjEuMTc0NSAxOC4zNDM4IDIwLjcxMDlDMTguMDQxNyAyMC4yNDIyIDE3Ljg5ODQgMTkuNjg3NSAxNy45MTQxIDE5LjA0NjlMMTcuOTM3NSAxOUgxOS40MDYyQzE5LjQwNjIgMTkuNTk5IDE5LjU4ODUgMjAuMDc1NSAxOS45NTMxIDIwLjQyOTdDMjAuMzIyOSAyMC43ODM5IDIwLjgyODEgMjAuOTYwOSAyMS40Njg4IDIwLjk2MDlDMjIuMTE5OCAyMC45NjA5IDIyLjYzMDIgMjAuNzgzOSAyMyAyMC40Mjk3QzIzLjM2OTggMjAuMDc1NSAyMy41NTQ3IDE5LjU1MjEgMjMuNTU0NyAxOC44NTk0QzIzLjU1NDcgMTguMTU2MiAyMy4zOTA2IDE3LjYzOCAyMy4wNjI1IDE3LjMwNDdDMjIuNzM0NCAxNi45NzE0IDIyLjIxNjEgMTYuODA0NyAyMS41MDc4IDE2LjgwNDdIMjAuMTY0MVYxNS42MDE2SDIxLjUwNzhDMjIuMTkwMSAxNS42MDE2IDIyLjY3MTkgMTUuNDMyMyAyMi45NTMxIDE1LjA5MzhDMjMuMjM5NiAxNC43NSAyMy4zODI4IDE0LjI3MzQgMjMuMzgyOCAxMy42NjQxQzIzLjM4MjggMTIuMzM1OSAyMi43NDQ4IDExLjY3MTkgMjEuNDY4OCAxMS42NzE5QzIwLjg2OTggMTEuNjcxOSAyMC4zODggMTEuODQ5IDIwLjAyMzQgMTIuMjAzMUMxOS42NjQxIDEyLjU1MjEgMTkuNDg0NCAxMy4wMTgyIDE5LjQ4NDQgMTMuNjAxNkgxOC4wMDc4TDE3Ljk5MjIgMTMuNTU0N0MxNy45NzY2IDEyLjk4MTggMTguMTEyIDEyLjQ2MDkgMTguMzk4NCAxMS45OTIyQzE4LjY5MDEgMTEuNTIzNCAxOS4wOTkgMTEuMTUxIDE5LjYyNSAxMC44NzVDMjAuMTU2MiAxMC41OTkgMjAuNzcwOCAxMC40NjA5IDIxLjQ2ODggMTAuNDYwOUMyMi41MjA4IDEwLjQ2MDkgMjMuMzU5NCAxMC43NDIyIDIzLjk4NDQgMTEuMzA0N0MyNC42MDk0IDExLjg2MiAyNC45MjE5IDEyLjY1ODkgMjQuOTIxOSAxMy42OTUzQzI0LjkyMTkgMTQuMTY0MSAyNC43Nzg2IDE0LjYzMjggMjQuNDkyMiAxNS4xMDE2QzI0LjIxMDkgMTUuNTY1MSAyMy43ODY1IDE1LjkxOTMgMjMuMjE4OCAxNi4xNjQxQzIzLjkwMSAxNi4zODggMjQuMzgyOCAxNi43Mzk2IDI0LjY2NDEgMTcuMjE4OEMyNC45NTA1IDE3LjY5NzkgMjUuMDkzOCAxOC4yMzQ0IDI1LjA5MzggMTguODI4MUMyNS4wOTM4IDE5LjUyMDggMjQuOTM3NSAyMC4xMTcyIDI0LjYyNSAyMC42MTcyQzI0LjMxNzcgMjEuMTEyIDIzLjg5MDYgMjEuNDk0OCAyMy4zNDM4IDIxLjc2NTZDMjIuNzk2OSAyMi4wMzEyIDIyLjE3MTkgMjIuMTY0MSAyMS40Njg4IDIyLjE2NDFaIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo=","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMiAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE2LjY1NjIgMTZWMTUuMDE1NkwxNy45Mjk3IDE0Ljc5NjlWMTMuMzc1SDEyLjgyMDNWMTIuNTA3OEwxNy44MzU5IDQuNjI1SDE5LjQ2MDlWMTIuMTcxOUgyMS4wMzEyVjEzLjM3NUgxOS40NjA5VjE0Ljc5NjlMMjAuNzM0NCAxNS4wMTU2VjE2SDE2LjY1NjJaTTE0LjQ2MDkgMTIuMTcxOUgxNy45Mjk3VjYuODIwMzFMMTcuODgyOCA2LjgwNDY5TDE3LjcyNjYgNy4yMTg3NUwxNC40NjA5IDEyLjE3MTlaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE2LjQwNjIgMTYuMTY0MUMxNS43NjU2IDE2LjE2NDEgMTUuMTkwMSAxNi4wNDY5IDE0LjY3OTcgMTUuODEyNUMxNC4xNzQ1IDE1LjU3ODEgMTMuNzc4NiAxNS4yMzE4IDEzLjQ5MjIgMTQuNzczNEMxMy4yMDU3IDE0LjMwOTkgMTMuMDcwMyAxMy43MzcgMTMuMDg1OSAxMy4wNTQ3TDEzLjEwMTYgMTMuMDA3OEgxNC40OTIyQzE0LjQ5MjIgMTMuNjIyNCAxNC42NjkzIDE0LjEwMTYgMTUuMDIzNCAxNC40NDUzQzE1LjM4MjggMTQuNzg5MSAxNS44NDM4IDE0Ljk2MDkgMTYuNDA2MiAxNC45NjA5QzE3LjA1NzMgMTQuOTYwOSAxNy41NjI1IDE0LjczMTggMTcuOTIxOSAxNC4yNzM0QzE4LjI4MTIgMTMuODE1MSAxOC40NjA5IDEzLjE4NzUgMTguNDYwOSAxMi4zOTA2QzE4LjQ2MDkgMTEuNjU2MiAxOC4yNzg2IDExLjA1NzMgMTcuOTE0MSAxMC41OTM4QzE3LjU1NDcgMTAuMTI1IDE3LjA1NDcgOS44OTA2MiAxNi40MTQxIDkuODkwNjJDMTUuODA5OSA5Ljg5MDYyIDE1LjM2OTggOS45ODE3NyAxNS4wOTM4IDEwLjE2NDFDMTQuODIyOSAxMC4zNDY0IDE0LjYyNSAxMC42MjUgMTQuNSAxMUwxMy4yMTg4IDEwLjg2NzJMMTMuODc1IDQuNjI1SDE5Ljg4MjhWNi44NzVIMTguNzI2NkwxOC41NzgxIDUuOTkyMTlIMTUuMTc5N0wxNC44MTI1IDkuMTg3NUMxNC45Njg4IDkuMDY3NzEgMTUuMTM4IDguOTYzNTQgMTUuMzIwMyA4Ljg3NUMxNS41MDI2IDguNzgxMjUgMTUuNzAwNSA4LjcwNTczIDE1LjkxNDEgOC42NDg0NEMxNi4xMzI4IDguNTkxMTUgMTYuMzY5OCA4LjU1OTkgMTYuNjI1IDguNTU0NjlDMTcuMzIyOSA4LjU0OTQ4IDE3LjkyNDUgOC43MDMxMiAxOC40Mjk3IDkuMDE1NjJDMTguOTM0OSA5LjMyMjkyIDE5LjMyMjkgOS43NjU2MiAxOS41OTM4IDEwLjM0MzhDMTkuODY0NiAxMC45MTY3IDIwIDExLjU5MzggMjAgMTIuMzc1QzIwIDEzLjEzNTQgMTkuODYyIDEzLjc5OTUgMTkuNTg1OSAxNC4zNjcyQzE5LjMxNTEgMTQuOTM0OSAxOC45MTE1IDE1LjM3NzYgMTguMzc1IDE1LjY5NTNDMTcuODQzOCAxNi4wMDc4IDE3LjE4NzUgMTYuMTY0MSAxNi40MDYyIDE2LjE2NDFaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMSAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE3LjEyNSAxNi4xNjQxQzE2LjM4NTQgMTYuMTY0MSAxNS43MjQgMTUuOTg0NCAxNS4xNDA2IDE1LjYyNUMxNC41NjI1IDE1LjI2MDQgMTQuMTA2OCAxNC43MzE4IDEzLjc3MzQgMTQuMDM5MUMxMy40NDAxIDEzLjM0NjQgMTMuMjczNCAxMi41MDc4IDEzLjI3MzQgMTEuNTIzNFY5Ljk5MjE5QzEzLjI3MzQgOC43ODkwNiAxMy40NTMxIDcuNzc4NjUgMTMuODEyNSA2Ljk2MDk0QzE0LjE3NzEgNi4xMzgwMiAxNC42NzcxIDUuNTE1NjIgMTUuMzEyNSA1LjA5Mzc1QzE1Ljk1MzEgNC42NzE4OCAxNi42ODc1IDQuNDYwOTQgMTcuNTE1NiA0LjQ2MDk0QzE3LjkwMSA0LjQ2MDk0IDE4LjI4MzkgNC41MDUyMSAxOC42NjQxIDQuNTkzNzVDMTkuMDQ5NSA0LjY4MjI5IDE5LjM2NzIgNC43OTQyNyAxOS42MTcyIDQuOTI5NjlMMTkuMzIwMyA2LjA3ODEyQzE5LjA3NTUgNS45NTgzMyAxOC44MDczIDUuODYxOTggMTguNTE1NiA1Ljc4OTA2QzE4LjIyNCA1LjcxMDk0IDE3Ljg5MDYgNS42NzE4OCAxNy41MTU2IDUuNjcxODhDMTYuNzE4OCA1LjY3MTg4IDE2LjA4MzMgNS45NzM5NiAxNS42MDk0IDYuNTc4MTJDMTUuMTQwNiA3LjE3NzA4IDE0Ljg5MDYgOC4wODMzMyAxNC44NTk0IDkuMjk2ODhMMTQuODkwNiA5LjMyODEyQzE1LjE4MjMgOS4wNTcyOSAxNS41MzkxIDguODQzNzUgMTUuOTYwOSA4LjY4NzVDMTYuMzgyOCA4LjUyNjA0IDE2LjgzODUgOC40NDUzMSAxNy4zMjgxIDguNDQ1MzFDMTguMDA1MiA4LjQ0NTMxIDE4LjU5MzggOC42MDY3NyAxOS4wOTM4IDguOTI5NjlDMTkuNTkzOCA5LjI0NzQgMTkuOTc5MiA5LjY4NzUgMjAuMjUgMTAuMjVDMjAuNTI2IDEwLjgxMjUgMjAuNjY0MSAxMS40NTMxIDIwLjY2NDEgMTIuMTcxOUMyMC42NjQxIDEyLjk1ODMgMjAuNTE4MiAxMy42NTEgMjAuMjI2NiAxNC4yNUMxOS45MzQ5IDE0Ljg0OSAxOS41MjM0IDE1LjMxNzcgMTguOTkyMiAxNS42NTYyQzE4LjQ2MDkgMTUuOTk0OCAxNy44Mzg1IDE2LjE2NDEgMTcuMTI1IDE2LjE2NDFaTTE3LjEyNSAxNC45NjA5QzE3LjU0NjkgMTQuOTYwOSAxNy45MDYyIDE0LjgzODUgMTguMjAzMSAxNC41OTM4QzE4LjUgMTQuMzQ5IDE4LjcyNjYgMTQuMDE1NiAxOC44ODI4IDEzLjU5MzhDMTkuMDQ0MyAxMy4xNzE5IDE5LjEyNSAxMi42OTc5IDE5LjEyNSAxMi4xNzE5QzE5LjEyNSAxMS40MjE5IDE4LjkzNDkgMTAuODA0NyAxOC41NTQ3IDEwLjMyMDNDMTguMTc5NyA5LjgzNTk0IDE3LjY1ODkgOS41OTM3NSAxNi45OTIyIDkuNTkzNzVDMTYuNjQzMiA5LjU5Mzc1IDE2LjMyNTUgOS42NDMyMyAxNi4wMzkxIDkuNzQyMTlDMTUuNzU3OCA5LjgzNTk0IDE1LjUxMyA5Ljk3MTM1IDE1LjMwNDcgMTAuMTQ4NEMxNS4xMDE2IDEwLjMyMDMgMTQuOTM0OSAxMC41MjM0IDE0LjgwNDcgMTAuNzU3OFYxMS42NzE5QzE0LjgwNDcgMTIuNzI5MiAxNS4wMjM0IDEzLjU0MTcgMTUuNDYwOSAxNC4xMDk0QzE1LjkwMzYgMTQuNjc3MSAxNi40NTgzIDE0Ljk2MDkgMTcuMTI1IDE0Ljk2MDlaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"],BX=new eM(document),pR=[...Array(6).keys()].map(n=>{const e=n+1;return{label:`Heading ${e}`,icon:Ns(AX[n]||""),id:`heading${e}`,attributes:{level:e}}}),vT={label:"Paragraph",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"},mR=[{label:"List Ordered",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"}],WX=[{label:"AI Content",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjA4NDEgOC43MjQ5M0wxMi41MjIgOS41MDc0MkMxMi40NTU2IDkuNTI3NjggMTIuMzk3MiA5LjU2OTczIDEyLjM1NTcgOS42MjcyOEMxMi4zMTQyIDkuNjg0ODMgMTIuMjkxOCA5Ljc1NDc4IDEyLjI5MTggOS44MjY2NkMxMi4yOTE4IDkuODk4NTQgMTIuMzE0MiA5Ljk2ODQ5IDEyLjM1NTcgMTAuMDI2QzEyLjM5NzIgMTAuMDgzNiAxMi40NTU2IDEwLjEyNTYgMTIuNTIyIDEwLjE0NTlMMTUuMDg0MSAxMC45Mjg0TDE1LjgzODEgMTMuNTg3M0MxNS44NTc3IDEzLjY1NjIgMTUuODk4MiAxMy43MTY4IDE1Ljk1MzYgMTMuNzU5OEMxNi4wMDkxIDEzLjgwMjkgMTYuMDc2NSAxMy44MjYyIDE2LjE0NTcgMTMuODI2MkMxNi4yMTUgMTMuODI2MiAxNi4yODI0IDEzLjgwMjkgMTYuMzM3OCAxMy43NTk4QzE2LjM5MzMgMTMuNzE2OCAxNi40MzM4IDEzLjY1NjIgMTYuNDUzMyAxMy41ODczTDE3LjIwNzcgMTAuOTI4NEwxOS43Njk3IDEwLjE0NTlDMTkuODM2MiAxMC4xMjU2IDE5Ljg5NDYgMTAuMDgzNiAxOS45MzYxIDEwLjAyNkMxOS45Nzc2IDkuOTY4NDkgMjAgOS44OTg1NCAyMCA5LjgyNjY2QzIwIDkuNzU0NzggMTkuOTc3NiA5LjY4NDgzIDE5LjkzNjEgOS42MjcyOEMxOS44OTQ2IDkuNTY5NzMgMTkuODM2MiA5LjUyNzY4IDE5Ljc2OTcgOS41MDc0MkwxNy4yMDc3IDguNzI0OTNMMTYuNDUzMyA2LjA2NjA0QzE2LjQzMzggNS45OTcwNyAxNi4zOTMzIDUuOTM2NTIgMTYuMzM3OCA1Ljg5MzQ1QzE2LjI4MjQgNS44NTAzNyAxNi4yMTUgNS44MjcwOSAxNi4xNDU3IDUuODI3MDlDMTYuMDc2NSA1LjgyNzA5IDE2LjAwOTEgNS44NTAzNyAxNS45NTM2IDUuODkzNDVDMTUuODk4MiA1LjkzNjUyIDE1Ljg1NzYgNS45OTcwNyAxNS44MzgxIDYuMDY2MDRMMTUuMDg0MSA4LjcyNDkzWiIgZmlsbD0iIzhEOTJBNSIvPgo8cGF0aCBkPSJNMTguMjE4NSAzLjk1MjMzTDE5LjYwODQgMy41Mjc0M0MxOS42NzQ5IDMuNTA3MTYgMTkuNzMzMiAzLjQ2NTExIDE5Ljc3NDcgMy40MDc1N0MxOS44MTYyIDMuMzUwMDIgMTkuODM4NiAzLjI4MDA4IDE5LjgzODYgMy4yMDgyQzE5LjgzODYgMy4xMzYzMyAxOS44MTYyIDMuMDY2MzggMTkuNzc0NyAzLjAwODg0QzE5LjczMzIgMi45NTEyOSAxOS42NzQ5IDIuOTA5MjQgMTkuNjA4NCAyLjg4ODk4TDE4LjIxODUgMi40NjQ0MUwxNy44MDkxIDEuMDIxNjdDMTcuNzg5NiAwLjk1MjY5OCAxNy43NDkxIDAuODkyMTQ0IDE3LjY5MzYgMC44NDkwNjlDMTcuNjM4MiAwLjgwNTk5NSAxNy41NzA3IDAuNzgyNzE1IDE3LjUwMTUgMC43ODI3MTVDMTcuNDMyMiAwLjc4MjcxNSAxNy4zNjQ4IDAuODA1OTk1IDE3LjMwOTQgMC44NDkwNjlDMTcuMjUzOSAwLjg5MjE0NCAxNy4yMTM0IDAuOTUyNjk4IDE3LjE5MzkgMS4wMjE2N0wxNi43ODQ4IDIuNDY0NDFMMTUuMzk0NiAyLjg4ODk4QzE1LjMyODEgMi45MDkyMyAxNS4yNjk4IDIuOTUxMjggMTUuMjI4MyAzLjAwODgzQzE1LjE4NjcgMy4wNjYzNyAxNS4xNjQzIDMuMTM2MzIgMTUuMTY0MyAzLjIwODJDMTUuMTY0MyAzLjI4MDA4IDE1LjE4NjcgMy4zNTAwMyAxNS4yMjgzIDMuNDA3NThDMTUuMjY5OCAzLjQ2NTEyIDE1LjMyODEgMy41MDcxNyAxNS4zOTQ2IDMuNTI3NDNMMTYuNzg0OCAzLjk1MjMzTDE3LjE5MzkgNS4zOTQ3NEMxNy4yMTM0IDUuNDYzNzEgMTcuMjUzOSA1LjUyNDI2IDE3LjMwOTQgNS41NjczM0MxNy4zNjQ4IDUuNjEwNDEgMTcuNDMyMiA1LjYzMzY5IDE3LjUwMTUgNS42MzM2OUMxNy41NzA3IDUuNjMzNjkgMTcuNjM4MiA1LjYxMDQxIDE3LjY5MzYgNS41NjczM0MxNy43NDkxIDUuNTI0MjYgMTcuNzg5NiA1LjQ2MzcxIDE3LjgwOTEgNS4zOTQ3NEwxOC4yMTg1IDMuOTUyMzNaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xMS4xNjcyIDQuNTU2MzVMOS43NjQ3OCA1LjE0OTk2QzkuNzA1NzggNS4xNzQ5NCA5LjY1NTI5IDUuMjE3NiA5LjYxOTc0IDUuMjcyNDlDOS41ODQyIDUuMzI3MzcgOS41NjUyMiA1LjM5MjAxIDkuNTY1MjIgNS40NTgxNEM5LjU2NTIyIDUuNTI0MjYgOS41ODQyIDUuNTg4OSA5LjYxOTc0IDUuNjQzNzhDOS42NTUyOSA1LjY5ODY3IDkuNzA1NzggNS43NDEzMyA5Ljc2NDc4IDUuNzY2MzFMMTEuMTY3MiA2LjM1OTkyTDExLjczOTIgNy44MTUzNEMxMS43NjMzIDcuODc2NTcgMTEuODA0NCA3LjkyODk3IDExLjg1NzMgNy45NjU4NUMxMS45MTAyIDguMDAyNzQgMTEuOTcyNCA4LjAyMjQzIDEyLjAzNjIgOC4wMjI0M0MxMi4wOTk5IDguMDIyNDMgMTIuMTYyMiA4LjAwMjc0IDEyLjIxNSA3Ljk2NTg1QzEyLjI2NzkgNy45Mjg5NyAxMi4zMDkgNy44NzY1NyAxMi4zMzMxIDcuODE1MzRMMTIuOTA1MSA2LjM1OTkyTDE0LjMwNzIgNS43NjYzMUMxNC4zNjYyIDUuNzQxMzIgMTQuNDE2NyA1LjY5ODY3IDE0LjQ1MjMgNS42NDM3OEMxNC40ODc4IDUuNTg4ODkgMTQuNTA2OCA1LjUyNDI2IDE0LjUwNjggNS40NTgxNEMxNC41MDY4IDUuMzkyMDEgMTQuNDg3OCA1LjMyNzM4IDE0LjQ1MjMgNS4yNzI0OUMxNC40MTY3IDUuMjE3NiAxNC4zNjYyIDUuMTc0OTUgMTQuMzA3MiA1LjE0OTk2TDEyLjkwNTEgNC41NTYzNUwxMi4zMzMxIDMuMTAxMjZDMTIuMzA5IDMuMDQwMDMgMTIuMjY3OSAyLjk4NzY0IDEyLjIxNSAyLjk1MDc1QzEyLjE2MjIgMi45MTM4NyAxMi4wOTk5IDIuODk0MTcgMTIuMDM2MiAyLjg5NDE3QzExLjk3MjQgMi44OTQxNyAxMS45MTAyIDIuOTEzODcgMTEuODU3MyAyLjk1MDc1QzExLjgwNDQgMi45ODc2NCAxMS43NjMzIDMuMDQwMDMgMTEuNzM5MiAzLjEwMTI2TDExLjE2NzIgNC41NTYzNVoiIGZpbGw9IiM4RDkyQTUiLz4KPHJlY3QgeT0iNC4yNjEyMyIgd2lkdGg9IjguNjk1NjUiIGhlaWdodD0iMS41NjUyMiIgcng9IjAuNzgyNjA5IiBmaWxsPSIjOEQ5MkE1Ii8+CjxyZWN0IHk9IjguOTU3MDMiIHdpZHRoPSIxMS4zMDQzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8cmVjdCB5PSIxMy42NTIzIiB3aWR0aD0iMTMuOTEzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8L3N2Zz4K"),id:"aiContentPrompt"},{label:"AI Image",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjUxNDI5IDUuNUMxLjg0NzQ2IDUuNSAxLjIwNzk0IDUuNzYxNjkgMC43MzY0MTcgNi4yMjc1MUMwLjI2NDg5NyA2LjY5MzMyIDAgNy4zMjUxMSAwIDcuOTgzODdWMTcuMDE2MUMwIDE3LjY3NDkgMC4yNjQ4OTcgMTguMzA2NyAwLjczNjQxNyAxOC43NzI1QzEuMjA3OTQgMTkuMjM4MyAxLjg0NzQ2IDE5LjUgMi41MTQyOSAxOS41SDEzLjQ4NTdDMTQuMTUyNSAxOS41IDE0Ljc5MjEgMTkuMjM4MyAxNS4yNjM2IDE4Ljc3MjVDMTUuNzM1MSAxOC4zMDY3IDE2IDE3LjY3NDkgMTYgMTcuMDE2MVYxN0wxNiAxNi43TDE0LjYyODYgMTUuMzgxM0wxMi4xNDE3IDEyLjkyNDVDMTIuMDc2NyAxMi44NTU5IDExLjk5NyAxMi44MDI0IDExLjkwODQgMTIuNzY4QzExLjgxOTkgMTIuNzMzNyAxMS43MjQ2IDEyLjcxOTIgMTEuNjI5NyAxMi43MjU4QzExLjUzMzcgMTIuNzMxMyAxMS40Mzk3IDEyLjc1NTcgMTEuMzUzNCAxMi43OTc2QzExLjI2NyAxMi44Mzk1IDExLjE5IDEyLjg5OCAxMS4xMjY5IDEyLjk2OTdMOS45NDc0MyAxNC4zNjk3TDUuNzQxNzEgMTAuMjE0OEM1LjY3OTc0IDEwLjE0OTggNS42MDQ1MSAxMC4wOTg0IDUuNTIwOTkgMTAuMDY0MkM1LjQzNzQ2IDEwLjAyOTkgNS4zNDc1NCAxMC4wMTM1IDUuMjU3MTQgMTAuMDE2MUM1LjE2MTExIDEwLjAyMTYgNS4wNjcxNiAxMC4wNDYxIDQuOTgwODEgMTAuMDg3OUM0Ljg5NDQ2IDEwLjEyOTggNC44MTc0NCAxMC4xODgzIDQuNzU0MjkgMTAuMjZMMS4zNzE0MyAxNC4yNDMyVjcuOTgzODdDMS4zNzE0MyA3LjY4NDQzIDEuNDkxODQgNy4zOTcyNiAxLjcwNjE2IDcuMTg1NTJDMS45MjA0OSA2Ljk3Mzc5IDIuMjExMTggNi44NTQ4NCAyLjUxNDI5IDYuODU0ODRINy4xMDk2OVY2LjE3NzQyVjUuNUgyLjUxNDI5Wk0xLjM3MTQgMTcuMDE2VjE2LjM1NjdMNS4zMDI4MyAxMS42OTZMOS4wNjk2OCAxNS40MTczTDYuNzY1NjkgMTguMTI3SDIuNTE0MjZDMi4yMTQyOSAxOC4xMjcxIDEuOTI2MzQgMTguMDEwNiAxLjcxMjUzIDE3LjgwMjdDMS40OTg3MiAxNy41OTQ5IDEuMzc2MiAxNy4zMTIzIDEuMzcxNCAxNy4wMTZaTTguNTQ4NTQgMTguMTQ1MUwxMS43MDI4IDE0LjQwNTdMMTQuNTgyOCAxNy4yNTA5QzE0LjUzMjMgMTcuNTAyIDE0LjM5NTQgMTcuNzI4MiAxNC4xOTU1IDE3Ljg5MTFDMTMuOTk1NiAxOC4wNTQgMTMuNzQ0OSAxOC4xNDM4IDEzLjQ4NTcgMTguMTQ1MUgxMS4wMTcxSDguNTQ4NTRaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xNC4zNDY3IDkuNjMzNTVMMTEuNDAwMyAxMC41MzM0QzExLjMyMzkgMTAuNTU2NyAxMS4yNTY4IDEwLjYwNTEgMTEuMjA5MSAxMC42NzEyQzExLjE2MTMgMTAuNzM3NCAxMS4xMzU1IDEwLjgxNzkgMTEuMTM1NSAxMC45MDA1QzExLjEzNTUgMTAuOTgzMiAxMS4xNjEzIDExLjA2MzYgMTEuMjA5MSAxMS4xMjk4QzExLjI1NjggMTEuMTk2IDExLjMyMzkgMTEuMjQ0NCAxMS40MDAzIDExLjI2NzdMMTQuMzQ2NyAxMi4xNjc1TDE1LjIxMzggMTUuMjI1M0MxNS4yMzYzIDE1LjMwNDYgMTUuMjgyOSAxNS4zNzQyIDE1LjM0NjcgMTUuNDIzN0MxNS40MTA0IDE1LjQ3MzIgMTUuNDg3OSAxNS41IDE1LjU2NzYgMTUuNUMxNS42NDcyIDE1LjUgMTUuNzI0NyAxNS40NzMyIDE1Ljc4ODUgMTUuNDIzN0MxNS44NTIzIDE1LjM3NDIgMTUuODk4OSAxNS4zMDQ2IDE1LjkyMTMgMTUuMjI1M0wxNi43ODg4IDEyLjE2NzVMMTkuNzM1MiAxMS4yNjc3QzE5LjgxMTYgMTEuMjQ0NCAxOS44Nzg3IDExLjE5NiAxOS45MjY1IDExLjEyOThDMTkuODc4NyAxMC42MDUxIDE5LjgxMTYgMTAuNTU2NyAxOS43MzUyIDEwLjUzMzRMMTYuNzg4OCA5LjYzMzU1TDE1LjkyMTMgNi41NzU4M0MxNS44OTg5IDYuNDk2NTEgMTUuODUyMyA2LjQyNjg4IDE1Ljc4ODUgNi4zNzczNEMxNS43MjQ4IDYuMzI3ODEgMTUuNjQ3MiA2LjMwMTA0IDE1LjU2NzYgNi4zMDEwNEMxNS40ODc5IDYuMzAxMDQgMTUuNDEwNCA2LjMyNzgxIDE1LjM0NjcgNi4zNzczNEMxNS4yODI5IDYuNDI2ODggMTUuMjM2MyA2LjQ5NjUxIDE1LjIxMzggNi41NzU4M0wxNC4zNDY3IDkuNjMzNTVaIiBmaWxsPSIjOEQ5MkE1Ii8+Cjwvc3ZnPg=="),id:"aiImagePrompt"},{label:"Blockquote",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalRule"}];function Ns(n){return BX.bypassSecurityTrustUrl(n)}const bv=[{label:"Image",icon:"image",id:"image"},{label:"Video",icon:"movie",id:"video"},...pR,{label:"Table",icon:"table_view",id:"table"},...mR,...WX,vT],GX=[...pR,vT,...mR],YX=[{name:"flip",options:{fallbackPlacements:["top"]}},{name:"preventOverflow",options:{altAxis:!1,tether:!1}}],KX={horizontalRule:!0,table:!0,image:!0,video:!0},QX=[...bv.filter(n=>!KX[n.id])],gR=function({type:n,editor:e,range:t,suggestionKey:i,ItemsType:r}){const o={to:t.to+i.getState(e.view.state).query?.length,from:n===r.BLOCK?t.from:t.from+1};e.chain().deleteRange(o).run()},yR={duration:[250,0],interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}};class Nc{getLine(e,t){let i=null;if(e){const r=e.split("\n");i=r&&r.length>t?r[t]:null}return i}camelize(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(t,i)=>0===i?t.toLowerCase():t.toUpperCase()).replace(/\s+/g,"")}titleCase(e){return`${e.charAt(0).toLocaleUpperCase()}${e.slice(1)}`}}Nc.\u0275fac=function(e){return new(e||Nc)},Nc.\u0275prov=$({token:Nc,factory:Nc.\u0275fac});class JX{getQueryParams(){const e=window.location.search.substring(1).split("&"),t=new Map;return e.forEach(i=>{const r=i.split("=");t.set(r[0],r[1])}),t}getQueryStringParam(e){let t=null;const r=new RegExp("[?&]"+e.replace(/[\[\]]/g,"\\$&")+"(=([^&#]*)|&|#|$)").exec(window.location.href);return r&&r[2]&&(t=decodeURIComponent(r[2].replace(/\+/g," "))),t}}class mo{constructor(e){this.stringUtils=e,this.showLogs=!0,this.httpRequestUtils=new JX,this.showLogs=this.shouldShowLogs(),this.showLogs&&console.info("Setting the logger --\x3e Developer mode logger on")}info(e,...t){t&&t.length>0?console.info(this.wrapMessage(e),t):console.info(this.wrapMessage(e))}error(e,...t){t&&t.length>0?console.error(this.wrapMessage(e),t):console.error(this.wrapMessage(e))}warn(e,...t){t&&t.length>0?console.warn(this.wrapMessage(e),t):console.warn(this.wrapMessage(e))}debug(e,...t){t&&t.length>0?console.debug(this.wrapMessage(e),t):console.debug(this.wrapMessage(e))}shouldShowLogs(){this.httpRequestUtils.getQueryStringParam("devMode");return!0}wrapMessage(e){return this.showLogs?e:this.getCaller()+">> "+e}getCaller(){let e="unknown";try{throw new Error}catch(t){e=this.cleanCaller(this.stringUtils.getLine(t.stack,4))}return e}cleanCaller(e){return e?e.trim().substr(3):"unknown"}}mo.\u0275fac=function(e){return new(e||mo)(F(Nc))},mo.\u0275prov=$({token:mo,factory:mo.\u0275fac});class Gd{constructor(e,t){this.loggerService=e,this.suppressAlerts=!1,this.locale=t;try{const i=window.location.search.substring(1);this.locale=this.checkQueryForUrl(i)}catch{this.loggerService.error("Could not set locale from URL.")}}checkQueryForUrl(e){let t=this.locale;if(e&&e.length){const i=e,r="locale=",o=i.indexOf(r);if(o>=0){let s=i.indexOf("&",o);s=-1!==s?s:i.indexOf("#",o),s=-1!==s?s:i.length,t=i.substring(o+r.length,s)}}return t}}Gd.\u0275fac=function(e){return new(e||Gd)(F(mo),F(Is))},Gd.\u0275prov=$({token:Gd,factory:Gd.\u0275fac});class Ps{constructor(e,t){this.loggerService=t,this.siteId="48190c8c-42c4-46af-8d1a-0cd5db894797",this.hideFireOn=!1,this.hideRulePushOptions=!1,this.authUser=e;try{let i=document.location.search.substring(1);""===i&&document.location.hash.indexOf("?")>=0&&(i=document.location.hash.substr(document.location.hash.indexOf("?")+1));const r=Ps.parseQueryParam(i,"realmId");r&&(this.siteId=r,this.loggerService.debug("Site Id set to ",this.siteId));const o=Ps.parseQueryParam(i,"hideFireOn");o&&(this.hideFireOn="true"===o||"1"===o,this.loggerService.debug("hideFireOn set to ",this.hideFireOn));const s=Ps.parseQueryParam(i,"hideRulePushOptions");s&&(this.hideRulePushOptions="true"===s||"1"===s,this.loggerService.debug("hideRulePushOptions set to ",this.hideRulePushOptions)),this.configureUser(i,e)}catch(i){this.loggerService.error("Could not set baseUrl automatically.",i)}}static parseQueryParam(e,t){let i=-1,r=null;if(t+="=",e&&e.length&&(i=e.indexOf(t)),i>=0){let o=e.indexOf("&",i);o=-1!==o?o:e.length,r=e.substring(i+t.length,o)}return r}configureUser(e,t){t.suppressAlerts="true"===Ps.parseQueryParam(e,"suppressAlerts")}}Ps.\u0275fac=function(e){return new(e||Ps)(F(Gd),F(mo))},Ps.\u0275prov=$({token:Ps,factory:Ps.\u0275fac});class wp{isIE11(){return"Netscape"===navigator.appName&&-1!==navigator.appVersion.indexOf("Trident")}}function Ai(n){return function(t){const i=new eee(n),r=t.lift(i);return i.caught=r}}wp.\u0275fac=function(e){return new(e||wp)},wp.\u0275prov=$({token:wp,factory:wp.\u0275fac});class eee{constructor(e){this.selector=e}call(e,t){return t.subscribe(new tee(e,this.selector,this.caught))}}class tee extends Ko{constructor(e,t,i){super(e),this.selector=t,this.caught=i}error(e){if(!this.isStopped){let t;try{t=this.selector(e,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new Vn(this);this.add(i);const r=Zl(t,i);r!==i&&this.add(r)}}}var Pc=(()=>(function(n){n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.FORBIDDEN=403]="FORBIDDEN",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.NO_CONTENT=204]="NO_CONTENT",n[n.SERVER_ERROR=500]="SERVER_ERROR",n[n.UNAUTHORIZED=401]="UNAUTHORIZED"}(Pc||(Pc={})),Pc))();const ree_1="Could not connect to server.";class bT{constructor(e,t,i,r,o){this.code=e,this.message=t,this.request=i,this.response=r,this.source=o}}class wT{constructor(e){this.resp=e;try{this.bodyJsonObject=e.body,this.headers=e.headers}catch{this.bodyJsonObject=null}}header(e){return this.headers.get(e)}get i18nMessagesMap(){return this.bodyJsonObject.i18nMessagesMap}get contentlets(){return this.bodyJsonObject.contentlets}get entity(){return this.bodyJsonObject.entity}get tempFiles(){return this.bodyJsonObject.tempFiles}get errorsMessages(){let e="";return this.bodyJsonObject.errors?this.bodyJsonObject.errors.forEach(t=>{e+=t.message}):e=this.bodyJsonObject.messages.toString(),e}get status(){return this.resp.status}get response(){return this.resp}existError(e){return this.bodyJsonObject.errors&&this.bodyJsonObject.errors.filter(t=>t.errorCode===e).length>0}}class Wr extends se{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new ve;return this._value}next(e){super.next(this._value=e)}}const wv=(()=>{function n(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return n.prototype=Object.create(Error.prototype),n})();class vR extends ee{notifyNext(e,t,i,r,o){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}class see extends ee{constructor(e,t,i){super(),this.parent=e,this.outerValue=t,this.outerIndex=i,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function bR(n,e,t,i,r=new see(n,t,i)){if(!r.closed)return e instanceof Se?e.subscribe(r):Be(e)(r)}const wR={};function CT(...n){let e,t;return vi(n[n.length-1])&&(t=n.pop()),"function"==typeof n[n.length-1]&&(e=n.pop()),1===n.length&&R(n[0])&&(n=n[0]),Wa(n,t).lift(new aee(e))}class aee{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new lee(e,this.resultSelector))}}class lee extends vR{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(wR),this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(let i=0;i{let t;try{t=n()}catch(r){return void e.error(r)}return(t?_t(t):I_()).subscribe(e)})}function Yd(n=null){return e=>e.lift(new cee(n))}class cee{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new uee(e,this.defaultValue))}}class uee extends ee{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function DR(n=fee){return e=>e.lift(new dee(n))}class dee{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new hee(e,this.errorFactory))}}class hee extends ee{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function fee(){return new wv}function fl(n,e){const t=arguments.length>=2;return i=>i.pipe(n?Un((r,o)=>n(r,o,i)):z,Tt(1),t?Yd(e):DR(()=>new wv))}function Cv(n,e){let t=!1;return arguments.length>=2&&(t=!0),function(r){return r.lift(new pee(n,e,t))}}class pee{constructor(e,t,i=!1){this.accumulator=e,this.seed=t,this.hasSeed=i}call(e,t){return t.subscribe(new mee(e,this.accumulator,this.seed,this.hasSeed))}}class mee extends ee{constructor(e,t,i,r){super(e),this.accumulator=t,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}_tryNext(e){const t=this.index++;let i;try{i=this.accumulator(this.seed,e,t)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function Cp(n){return function(t){return 0===n?I_():t.lift(new gee(n))}}class gee{constructor(e){if(this.total=e,this.total<0)throw new WL}call(e,t){return t.subscribe(new yee(e,this.total))}}class yee extends ee{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){const t=this.ring,i=this.total,r=this.count++;t.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(n?Un((r,o)=>n(r,o,i)):z,Cp(1),t?Yd(e):DR(()=>new wv))}class vee{constructor(e,t){this.predicate=e,this.inclusive=t}call(e,t){return t.subscribe(new bee(e,this.predicate,this.inclusive))}}class bee extends ee{constructor(e,t,i){super(e),this.predicate=t,this.inclusive=i,this.index=0}_next(e){const t=this.destination;let i;try{i=this.predicate(e,this.index++)}catch(r){return void t.error(r)}this.nextOrComplete(e,i)}nextOrComplete(e,t){const i=this.destination;Boolean(t)?i.next(e):(this.inclusive&&i.next(e),i.complete())}}class Cee{constructor(e){this.value=e}call(e,t){return t.subscribe(new Dee(e,this.value))}}class Dee extends ee{constructor(e,t){super(e),this.value=t}_next(e){this.destination.next(this.value)}}function DT(n){return e=>e.lift(new Mee(n))}class Mee{constructor(e){this.callback=e}call(e,t){return t.subscribe(new Tee(e,this.callback))}}class Tee extends ee{constructor(e,t){super(e),this.add(new oe(t))}}const At="primary",Dp=Symbol("RouteTitle");class See{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function qd(n){return new See(n)}function Eee(n,e,t){const i=t.path.split("/");if(i.length>n.length||"full"===t.pathMatch&&(e.hasChildren()||i.lengthi[o]===r)}return n===e}function SR(n){return Array.prototype.concat.apply([],n)}function ER(n){return n.length>0?n[n.length-1]:null}function Ui(n,e){for(const t in n)n.hasOwnProperty(t)&&e(n[t],t)}function pl(n){return BC(n)?n:zf(n)?_t(Promise.resolve(n)):Re(n)}const Dv=!1,Iee={exact:function OR(n,e,t){if(!Rc(n.segments,e.segments)||!Mv(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(const i in e.children)if(!n.children[i]||!OR(n.children[i],e.children[i],t))return!1;return!0},subset:AR},xR={exact:function Oee(n,e){return Ls(n,e)},subset:function Aee(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>TR(n[t],e[t]))},ignored:()=>!0};function IR(n,e,t){return Iee[t.paths](n.root,e.root,t.matrixParams)&&xR[t.queryParams](n.queryParams,e.queryParams)&&!("exact"===t.fragment&&n.fragment!==e.fragment)}function AR(n,e,t){return kR(n,e,e.segments,t)}function kR(n,e,t,i){if(n.segments.length>t.length){const r=n.segments.slice(0,t.length);return!(!Rc(r,t)||e.hasChildren()||!Mv(r,t,i))}if(n.segments.length===t.length){if(!Rc(n.segments,t)||!Mv(n.segments,t,i))return!1;for(const r in e.children)if(!n.children[r]||!AR(n.children[r],e.children[r],i))return!1;return!0}{const r=t.slice(0,n.segments.length),o=t.slice(n.segments.length);return!!(Rc(n.segments,r)&&Mv(n.segments,r,i)&&n.children[At])&&kR(n.children[At],e,o,i)}}function Mv(n,e,t){return e.every((i,r)=>xR[t](n[r].parameters,i.parameters))}class Lc{constructor(e=new Lt([],{}),t={},i=null){this.root=e,this.queryParams=t,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=qd(this.queryParams)),this._queryParamMap}toString(){return Pee.serialize(this)}}class Lt{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Ui(t,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Tv(this)}}class Mp{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=qd(this.parameters)),this._parameterMap}toString(){return LR(this)}}function Rc(n,e){return n.length===e.length&&n.every((t,i)=>t.path===e[i].path)}let Tp=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return new MT},providedIn:"root"}),n})();class MT{parse(e){const t=new Hee(e);return new Lc(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){const t=`/${Sp(e.root,!0)}`,i=function Fee(n){const e=Object.keys(n).map(t=>{const i=n[t];return Array.isArray(i)?i.map(r=>`${Sv(t)}=${Sv(r)}`).join("&"):`${Sv(t)}=${Sv(i)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(e.queryParams),r="string"==typeof e.fragment?`#${function Lee(n){return encodeURI(n)}(e.fragment)}`:"";return`${t}${i}${r}`}}const Pee=new MT;function Tv(n){return n.segments.map(e=>LR(e)).join("/")}function Sp(n,e){if(!n.hasChildren())return Tv(n);if(e){const t=n.children[At]?Sp(n.children[At],!1):"",i=[];return Ui(n.children,(r,o)=>{o!==At&&i.push(`${o}:${Sp(r,!1)}`)}),i.length>0?`${t}(${i.join("//")})`:t}{const t=function Nee(n,e){let t=[];return Ui(n.children,(i,r)=>{r===At&&(t=t.concat(e(i,r)))}),Ui(n.children,(i,r)=>{r!==At&&(t=t.concat(e(i,r)))}),t}(n,(i,r)=>r===At?[Sp(n.children[At],!1)]:[`${r}:${Sp(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[At]?`${Tv(n)}/${t[0]}`:`${Tv(n)}/(${t.join("//")})`}}function NR(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Sv(n){return NR(n).replace(/%3B/gi,";")}function TT(n){return NR(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Ev(n){return decodeURIComponent(n)}function PR(n){return Ev(n.replace(/\+/g,"%20"))}function LR(n){return`${TT(n.path)}${function Ree(n){return Object.keys(n).map(e=>`;${TT(e)}=${TT(n[e])}`).join("")}(n.parameters)}`}const jee=/^[^\/()?;=#]+/;function xv(n){const e=n.match(jee);return e?e[0]:""}const zee=/^[^=?&#]+/,Bee=/^[^&#]+/;class Hee{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Lt([],{}):new Lt([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(i[At]=new Lt(e,t)),i}parseSegment(){const e=xv(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Q(4009,Dv);return this.capture(e),new Mp(Ev(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=xv(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const r=xv(this.remaining);r&&(i=r,this.capture(i))}e[Ev(t)]=Ev(i)}parseQueryParam(e){const t=function Vee(n){const e=n.match(zee);return e?e[0]:""}(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const s=function Uee(n){const e=n.match(Bee);return e?e[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=PR(t),o=PR(i);if(e.hasOwnProperty(r)){let s=e[r];Array.isArray(s)||(s=[s],e[r]=s),s.push(o)}else e[r]=o}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=xv(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Q(4010,Dv);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=At);const s=this.parseChildren();t[o]=1===Object.keys(s).length?s[At]:new Lt([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Q(4011,Dv)}}function ST(n){return n.segments.length>0?new Lt([],{[At]:n}):n}function Iv(n){const e={};for(const i of Object.keys(n.children)){const o=Iv(n.children[i]);(o.segments.length>0||o.hasChildren())&&(e[i]=o)}return function $ee(n){if(1===n.numberOfChildren&&n.children[At]){const e=n.children[At];return new Lt(n.segments.concat(e.segments),e.children)}return n}(new Lt(n.segments,e))}function Fc(n){return n instanceof Lc}function Yee(n,e,t,i,r){if(0===t.length)return Kd(e.root,e.root,e.root,i,r);const o=function jR(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new FR(!0,0,n);let e=0,t=!1;const i=n.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Ui(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?t=!0:".."===a?e++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new FR(t,e,i)}(t);return o.toRoot()?Kd(e.root,e.root,new Lt([],{}),i,r):function s(l){const c=function Kee(n,e,t,i){if(n.isAbsolute)return new Qd(e.root,!0,0);if(-1===i)return new Qd(t,t===e.root,0);return function zR(n,e,t){let i=n,r=e,o=t;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Q(4005,!1);r=i.segments.length}return new Qd(i,!1,r-o)}(t,i+(Ep(n.commands[0])?0:1),n.numberOfDoubleDots)}(o,e,n.snapshot?._urlSegment,l),u=c.processChildren?Ip(c.segmentGroup,c.index,o.commands):xT(c.segmentGroup,c.index,o.commands);return Kd(e.root,c.segmentGroup,u,i,r)}(n.snapshot?._lastPathIndex)}function Ep(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function xp(n){return"object"==typeof n&&null!=n&&n.outlets}function Kd(n,e,t,i,r){let s,o={};i&&Ui(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=n===e?t:RR(n,e,t);const a=ST(Iv(s));return new Lc(a,o,r)}function RR(n,e,t){const i={};return Ui(n.children,(r,o)=>{i[o]=r===e?t:RR(r,e,t)}),new Lt(n.segments,i)}class FR{constructor(e,t,i){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=i,e&&i.length>0&&Ep(i[0]))throw new Q(4003,!1);const r=i.find(xp);if(r&&r!==ER(i))throw new Q(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Qd{constructor(e,t,i){this.segmentGroup=e,this.processChildren=t,this.index=i}}function xT(n,e,t){if(n||(n=new Lt([],{})),0===n.segments.length&&n.hasChildren())return Ip(n,e,t);const i=function Zee(n,e,t){let i=0,r=e;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return o;const s=n.segments[r],a=t[i];if(xp(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!BR(l,c,s))return o;i+=2}else{if(!BR(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,e,t),r=t.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=xT(n.children[s],e,o))}),Ui(n.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new Lt(n.segments,r)}}function IT(n,e,t){const i=n.segments.slice(0,e);let r=0;for(;r{"string"==typeof t&&(t=[t]),null!==t&&(e[i]=IT(new Lt([],{}),0,t))}),e}function VR(n){const e={};return Ui(n,(t,i)=>e[i]=`${t}`),e}function BR(n,e,t){return n==t.path&&Ls(e,t.parameters)}const Op="imperative";class Rs{constructor(e,t){this.id=e,this.url=t}}class OT extends Rs{constructor(e,t,i="imperative",r=null){super(e,t),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class jc extends Rs{constructor(e,t,i){super(e,t),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Ov extends Rs{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class UR extends Rs{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=16}}class HR extends Rs{constructor(e,t,i,r){super(e,t),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Xee extends Rs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ete extends Rs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class tte extends Rs{constructor(e,t,i,r,o){super(e,t),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class nte extends Rs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ite extends Rs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class rte{constructor(e){this.route=e,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class ote{constructor(e){this.route=e,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class ste{constructor(e){this.snapshot=e,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ate{constructor(e){this.snapshot=e,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class lte{constructor(e){this.snapshot=e,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class cte{constructor(e){this.snapshot=e,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $R{constructor(e,t,i){this.routerEvent=e,this.position=t,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let dte=(()=>{class n{createUrlTree(t,i,r,o,s,a){return Yee(t||i.root,r,o,s,a)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})(),hte=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(e){return dte.\u0275fac(e)},providedIn:"root"}),n})();class WR{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=AT(e,this._root);return t?t.children.map(i=>i.value):[]}firstChild(e){const t=AT(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=kT(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return kT(e,this._root).map(t=>t.value)}}function AT(n,e){if(n===e.value)return e;for(const t of e.children){const i=AT(n,t);if(i)return i}return null}function kT(n,e){if(n===e.value)return[e];for(const t of e.children){const i=kT(n,t);if(i.length)return i.unshift(e),i}return[]}class Ia{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function Zd(n){const e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}class GR extends WR{constructor(e,t){super(e),this.snapshot=t,NT(this,e)}toString(){return this.snapshot.toString()}}function YR(n,e){const t=function fte(n,e){const s=new Av([],{},{},"",{},At,e,null,n.root,-1,{});return new KR("",new Ia(s,[]))}(n,e),i=new Wr([new Mp("",{})]),r=new Wr({}),o=new Wr({}),s=new Wr({}),a=new Wr(""),l=new Jd(i,r,s,a,o,At,e,t.root);return l.snapshot=t.root,new GR(new Ia(l,[]),t)}class Jd{constructor(e,t,i,r,o,s,a,l){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(ue(c=>c[Dp]))??Re(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(ue(e=>qd(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(ue(e=>qd(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function qR(n,e="emptyOnly"){const t=n.pathFromRoot;let i=0;if("always"!==e)for(i=t.length-1;i>=1;){const r=t[i],o=t[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function pte(n){return n.reduce((e,t)=>({params:{...e.params,...t.params},data:{...e.data,...t.data},resolve:{...t.data,...e.resolve,...t.routeConfig?.data,...t._resolvedData}}),{params:{},data:{},resolve:{}})}(t.slice(i))}class Av{get title(){return this.data?.[Dp]}constructor(e,t,i,r,o,s,a,l,c,u,d){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=qd(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=qd(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class KR extends WR{constructor(e,t){super(t),this.url=e,NT(this,t)}toString(){return QR(this._root)}}function NT(n,e){e.value._routerState=n,e.children.forEach(t=>NT(n,t))}function QR(n){const e=n.children.length>0?` { ${n.children.map(QR).join(", ")} } `:"";return`${n.value}${e}`}function PT(n){if(n.snapshot){const e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,Ls(e.queryParams,t.queryParams)||n.queryParams.next(t.queryParams),e.fragment!==t.fragment&&n.fragment.next(t.fragment),Ls(e.params,t.params)||n.params.next(t.params),function xee(n,e){if(n.length!==e.length)return!1;for(let t=0;tLs(t.parameters,e[i].parameters))}(n.url,e.url);return t&&!(!n.parent!=!e.parent)&&(!n.parent||LT(n.parent,e.parent))}function Ap(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){const i=t.value;i._futureSnapshot=e.value;const r=function gte(n,e,t){return e.children.map(i=>{for(const r of t.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Ap(n,i,r);return Ap(n,i)})}(n,e,t);return new Ia(i,r)}{if(n.shouldAttach(e.value)){const o=n.retrieve(e.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>Ap(n,a)),s}}const i=function yte(n){return new Jd(new Wr(n.url),new Wr(n.params),new Wr(n.queryParams),new Wr(n.fragment),new Wr(n.data),n.outlet,n.component,n)}(e.value),r=e.children.map(o=>Ap(n,o));return new Ia(i,r)}}const RT="ngNavigationCancelingError";function ZR(n,e){const{redirectTo:t,navigationBehaviorOptions:i}=Fc(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=JR(!1,0,e);return r.url=t,r.navigationBehaviorOptions=i,r}function JR(n,e,t){const i=new Error("NavigationCancelingError: "+(n||""));return i[RT]=!0,i.cancellationCode=e,t&&(i.url=t),i}function XR(n){return eF(n)&&Fc(n.url)}function eF(n){return n&&n[RT]}class _te{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new kp,this.attachRef=null}}let kp=(()=>{class n{constructor(){this.contexts=new Map}onChildOutletCreated(t,i){const r=this.getOrCreateContext(t);r.outlet=i,this.contexts.set(t,r)}onChildOutletDestroyed(t){const i=this.getContext(t);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let i=this.getContext(t);return i||(i=new _te,this.contexts.set(t,i)),i}getContext(t){return this.contexts.get(t)||null}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const kv=!1;let tF=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=At,this.activateEvents=new re,this.deactivateEvents=new re,this.attachEvents=new re,this.detachEvents=new re,this.parentContexts=vt(kp),this.location=vt(Br),this.changeDetector=vt(Kn),this.environmentInjector=vt(Ts)}ngOnChanges(t){if(t.name){const{firstChange:i,previousValue:r}=t.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Q(4012,kv);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Q(4012,kv);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Q(4012,kv);this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,i){this.activated=t,this._activatedRoute=i,this.location.insert(t.hostView),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,i){if(this.isActivated)throw new Q(4013,kv);this._activatedRoute=t;const r=this.location,s=t.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new vte(t,a,r.injector);if(i&&function bte(n){return!!n.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Me({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Ji]}),n})();class vte{constructor(e,t,i){this.route=e,this.childContexts=t,this.parent=i}get(e,t){return e===Jd?this.route:e===kp?this.childContexts:this.parent.get(e,t)}}let FT=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["ng-component"]],standalone:!0,features:[el],decls:1,vars:0,template:function(t,i){1&t&&_e(0,"router-outlet")},dependencies:[tF],encapsulation:2}),n})();function nF(n,e){return n.providers&&!n._injector&&(n._injector=Zy(n.providers,e,`Route: ${n.path}`)),n._injector??e}function zT(n){const e=n.children&&n.children.map(zT),t=e?{...n,children:e}:{...n};return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==At&&(t.component=FT),t}function Ro(n){return n.outlet||At}function iF(n,e){const t=n.filter(i=>Ro(i)===e);return t.push(...n.filter(i=>Ro(i)!==e)),t}function Np(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}class Tte{constructor(e,t,i,r){this.routeReuseStrategy=e,this.futureState=t,this.currState=i,this.forwardEvent=r}activate(e){const t=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,i,e),PT(this.futureState.root),this.activateChildRoutes(t,i,e)}deactivateChildRoutes(e,t,i){const r=Zd(t);e.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Ui(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(e,t,i){const r=e.value,o=t?t.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,i);else o&&this.deactivateRouteAndItsChildren(t,i)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,o=Zd(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,o=Zd(e);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(e,t,i){const r=Zd(t);e.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new cte(o.value.snapshot))}),e.children.length&&this.forwardEvent(new ate(e.value.snapshot))}activateRoutes(e,t,i){const r=e.value,o=t?t.value:null;if(PT(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),PT(a.route.value),this.activateChildRoutes(e,null,s.children)}else{const a=Np(r.snapshot),l=a?.get(hc)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,i)}}class rF{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class Nv{constructor(e,t){this.component=e,this.route=t}}function Ste(n,e,t){const i=n._root;return Pp(i,e?e._root:null,t,[i.value])}function Xd(n,e){const t=Symbol(),i=e.get(n,t);return i===t?"function"!=typeof n||function aw(n){return null!==ju(n)}(n)?e.get(n):n:i}function Pp(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Zd(e);return n.children.forEach(s=>{(function xte(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function Ite(n,e,t){if("function"==typeof t)return t(n,e);switch(t){case"pathParamsChange":return!Rc(n.url,e.url);case"pathParamsOrQueryParamsChange":return!Rc(n.url,e.url)||!Ls(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!LT(n,e)||!Ls(n.queryParams,e.queryParams);default:return!LT(n,e)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new rF(i)):(o.data=s.data,o._resolvedData=s._resolvedData),Pp(n,e,o.component?a?a.children:null:t,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Nv(a.outlet.component,s))}else s&&Lp(e,a,r),r.canActivateChecks.push(new rF(i)),Pp(n,null,o.component?a?a.children:null:t,i,r)})(s,o[s.value.outlet],t,i.concat([s.value]),r),delete o[s.value.outlet]}),Ui(o,(s,a)=>Lp(s,t.getContext(a),r)),r}function Lp(n,e,t){const i=Zd(n),r=n.value;Ui(i,(o,s)=>{Lp(o,r.component?e?e.children.getContext(s):null:e,t)}),t.canDeactivateChecks.push(new Nv(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}function Rp(n){return"function"==typeof n}function VT(n){return n instanceof wv||"EmptyError"===n?.name}const Pv=Symbol("INITIAL_VALUE");function eh(){return ci(n=>CT(n.map(e=>e.pipe(Tt(1),function mv(...n){const e=n[n.length-1];return vi(e)?(n.pop(),t=>lT(n,t,e)):t=>lT(n,t)}(Pv)))).pipe(ue(e=>{for(const t of e)if(!0!==t){if(t===Pv)return Pv;if(!1===t||t instanceof Lc)return t}return!0}),Un(e=>e!==Pv),Tt(1)))}function oF(n){return he(Mn(e=>{if(Fc(e))throw ZR(0,e)}),ue(e=>!0===e))}const BT={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function sF(n,e,t,i,r){const o=UT(n,e,t);return o.matched?function Gte(n,e,t,i){const r=e.canMatch;return r&&0!==r.length?Re(r.map(s=>{const a=Xd(s,n);return pl(function Lte(n){return n&&Rp(n.canMatch)}(a)?a.canMatch(e,t):n.runInContext(()=>a(e,t)))})).pipe(eh(),oF()):Re(!0)}(i=nF(e,i),e,t).pipe(ue(s=>!0===s?o:{...BT})):Re(o)}function UT(n,e,t){if(""===e.path)return"full"===e.pathMatch&&(n.hasChildren()||t.length>0)?{...BT}:{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const r=(e.matcher||Eee)(t,n,e);if(!r)return{...BT};const o={};Ui(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Lv(n,e,t,i){if(t.length>0&&function Kte(n,e,t){return t.some(i=>Rv(n,e,i)&&Ro(i)!==At)}(n,t,i)){const o=new Lt(e,function qte(n,e,t,i){const r={};r[At]=i,i._sourceSegment=n,i._segmentIndexShift=e.length;for(const o of t)if(""===o.path&&Ro(o)!==At){const s=new Lt([],{});s._sourceSegment=n,s._segmentIndexShift=e.length,r[Ro(o)]=s}return r}(n,e,i,new Lt(t,n.children)));return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:[]}}if(0===t.length&&function Qte(n,e,t){return t.some(i=>Rv(n,e,i))}(n,t,i)){const o=new Lt(n.segments,function Yte(n,e,t,i,r){const o={};for(const s of i)if(Rv(n,t,s)&&!r[Ro(s)]){const a=new Lt([],{});a._sourceSegment=n,a._segmentIndexShift=e.length,o[Ro(s)]=a}return{...r,...o}}(n,e,t,i,n.children));return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:t}}const r=new Lt(n.segments,n.children);return r._sourceSegment=n,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:t}}function Rv(n,e,t){return(!(n.hasChildren()||e.length>0)||"full"!==t.pathMatch)&&""===t.path}function aF(n,e,t,i){return!!(Ro(n)===i||i!==At&&Rv(e,t,n))&&("**"===n.path||UT(e,n,t).matched)}function lF(n,e,t){return 0===e.length&&!n.children[t]}const Fv=!1;class jv{constructor(e){this.segmentGroup=e||null}}class cF{constructor(e){this.urlTree=e}}function Fp(n){return ho(new jv(n))}function uF(n){return ho(new cF(n))}class ene{constructor(e,t,i,r,o){this.injector=e,this.configLoader=t,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const e=Lv(this.urlTree.root,[],[],this.config).segmentGroup,t=new Lt(e.segments,e.children);return this.expandSegmentGroup(this.injector,this.config,t,At).pipe(ue(o=>this.createUrlTree(Iv(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ai(o=>{if(o instanceof cF)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof jv?this.noMatchError(o):o}))}match(e){return this.expandSegmentGroup(this.injector,this.config,e.root,At).pipe(ue(r=>this.createUrlTree(Iv(r),e.queryParams,e.fragment))).pipe(Ai(r=>{throw r instanceof jv?this.noMatchError(r):r}))}noMatchError(e){return new Q(4002,Fv)}createUrlTree(e,t,i){const r=ST(e);return new Lc(r,t,i)}expandSegmentGroup(e,t,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(e,t,i).pipe(ue(o=>new Lt([],o))):this.expandSegment(e,i,t,i.segments,r,!0)}expandChildren(e,t,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return _t(r).pipe(rl(o=>{const s=i.children[o],a=iF(t,o);return this.expandSegmentGroup(e,a,s,o).pipe(ue(l=>({segment:l,outlet:o})))}),Cv((o,s)=>(o[s.outlet]=s.segment,o),{}),MR())}expandSegment(e,t,i,r,o,s){return _t(i).pipe(rl(a=>this.expandSegmentAgainstRoute(e,t,i,a,r,o,s).pipe(Ai(c=>{if(c instanceof jv)return Re(null);throw c}))),fl(a=>!!a),Ai((a,l)=>{if(VT(a))return lF(t,r,o)?Re(new Lt([],{})):Fp(t);throw a}))}expandSegmentAgainstRoute(e,t,i,r,o,s,a){return aF(r,t,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,i,r,o,s):Fp(t):Fp(t)}expandSegmentAgainstRouteUsingRedirect(e,t,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?uF(o):this.lineralizeSegments(i,o).pipe(Xn(s=>{const a=new Lt(s,{});return this.expandSegment(e,a,t,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=UT(t,r,o);if(!a)return Fp(t);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?uF(d):this.lineralizeSegments(r,d).pipe(Xn(h=>this.expandSegment(e,t,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(e,t,i,r,o){return"**"===i.path?(e=nF(i,e),i.loadChildren?(i._loadedRoutes?Re({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(e,i)).pipe(ue(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new Lt(r,{})))):Re(new Lt(r,{}))):sF(t,i,r,e).pipe(ci(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(e=i._injector??e,i,r).pipe(Xn(u=>{const d=u.injector??e,h=u.routes,{segmentGroup:f,slicedSegments:p}=Lv(t,a,l,h),m=new Lt(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(ue(w=>new Lt(a,w)));if(0===h.length&&0===p.length)return Re(new Lt(a,{}));const g=Ro(i)===o;return this.expandSegment(d,m,h,p,g?At:o,!0).pipe(ue(v=>new Lt(a.concat(v.segments),v.children)))})):Fp(t)))}getChildConfig(e,t,i){return t.children?Re({routes:t.children,injector:e}):t.loadChildren?void 0!==t._loadedRoutes?Re({routes:t._loadedRoutes,injector:t._loadedInjector}):function Wte(n,e,t,i){const r=e.canLoad;return void 0===r||0===r.length?Re(!0):Re(r.map(s=>{const a=Xd(s,n);return pl(function Ate(n){return n&&Rp(n.canLoad)}(a)?a.canLoad(e,t):n.runInContext(()=>a(e,t)))})).pipe(eh(),oF())}(e,t,i).pipe(Xn(r=>r?this.configLoader.loadChildren(e,t).pipe(Mn(o=>{t._loadedRoutes=o.routes,t._loadedInjector=o.injector})):function Jte(n){return ho(JR(Fv,3))}())):Re({routes:[],injector:e})}lineralizeSegments(e,t){let i=[],r=t.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Re(i);if(r.numberOfChildren>1||!r.children[At])return ho(new Q(4e3,Fv));r=r.children[At]}}applyRedirectCommands(e,t,i){return this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,i)}applyRedirectCreateUrlTree(e,t,i,r){const o=this.createSegmentGroup(e,t.root,i,r);return new Lc(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const i={};return Ui(e,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=t[a]}else i[o]=r}),i}createSegmentGroup(e,t,i,r){const o=this.createSegments(e,t.segments,i,r);let s={};return Ui(t.children,(a,l)=>{s[l]=this.createSegmentGroup(e,a,i,r)}),new Lt(o,s)}createSegments(e,t,i,r){return t.map(o=>o.path.startsWith(":")?this.findPosParam(e,o,r):this.findOrReturn(o,i))}findPosParam(e,t,i){const r=i[t.path.substring(1)];if(!r)throw new Q(4001,Fv);return r}findOrReturn(e,t){let i=0;for(const r of t){if(r.path===e.path)return t.splice(i),r;i++}return e}}class nne{}class one{constructor(e,t,i,r,o,s,a){this.injector=e,this.rootComponentType=t,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const e=Lv(this.urlTree.root,[],[],this.config.filter(t=>void 0===t.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,e,At).pipe(ue(t=>{if(null===t)return null;const i=new Av([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},At,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Ia(i,t),o=new KR(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(e){const t=e.value,i=qR(t,this.paramsInheritanceStrategy);t.params=Object.freeze(i.params),t.data=Object.freeze(i.data),e.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(e,t,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(e,t,i):this.processSegment(e,t,i,i.segments,r)}processChildren(e,t,i){return _t(Object.keys(i.children)).pipe(rl(r=>{const o=i.children[r],s=iF(t,r);return this.processSegmentGroup(e,s,o,r)}),Cv((r,o)=>r&&o?(r.push(...o),r):null),function _ee(n,e=!1){return t=>t.lift(new vee(n,e))}(r=>null!==r),Yd(null),MR(),ue(r=>{if(null===r)return null;const o=hF(r);return function sne(n){n.sort((e,t)=>e.value.outlet===At?-1:t.value.outlet===At?1:e.value.outlet.localeCompare(t.value.outlet))}(o),o}))}processSegment(e,t,i,r,o){return _t(t).pipe(rl(s=>this.processSegmentAgainstRoute(s._injector??e,s,i,r,o)),fl(s=>!!s),Ai(s=>{if(VT(s))return lF(i,r,o)?Re([]):Re(null);throw s}))}processSegmentAgainstRoute(e,t,i,r,o){if(t.redirectTo||!aF(t,i,r,o))return Re(null);let s;if("**"===t.path){const a=r.length>0?ER(r).parameters:{},l=pF(i)+r.length;s=Re({snapshot:new Av(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,mF(t),Ro(t),t.component??t._loadedComponent??null,t,fF(i),l,gF(t)),consumedSegments:[],remainingSegments:[]})}else s=sF(i,t,r,e).pipe(ue(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=pF(i)+l.length;return{snapshot:new Av(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,mF(t),Ro(t),t.component??t._loadedComponent??null,t,fF(i),d,gF(t)),consumedSegments:l,remainingSegments:c}}));return s.pipe(ci(a=>{if(null===a)return Re(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;e=t._injector??e;const d=t._loadedInjector??e,h=function ane(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(t),{segmentGroup:f,slicedSegments:p}=Lv(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(ue(g=>null===g?null:[new Ia(l,g)]));if(0===h.length&&0===p.length)return Re([new Ia(l,[])]);const m=Ro(t)===o;return this.processSegment(d,h,f,p,m?At:o).pipe(ue(g=>null===g?null:[new Ia(l,g)]))}))}}function lne(n){const e=n.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function hF(n){const e=[],t=new Set;for(const i of n){if(!lne(i)){e.push(i);continue}const r=e.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),t.add(r)):e.push(i)}for(const i of t){const r=hF(i.children);e.push(new Ia(i.value,r))}return e.filter(i=>!t.has(i))}function fF(n){let e=n;for(;e._sourceSegment;)e=e._sourceSegment;return e}function pF(n){let e=n,t=e._segmentIndexShift??0;for(;e._sourceSegment;)e=e._sourceSegment,t+=e._segmentIndexShift??0;return t-1}function mF(n){return n.data||{}}function gF(n){return n.resolve||{}}function yF(n){return"string"==typeof n.title||null===n.title}function HT(n){return ci(e=>{const t=n(e);return t?_t(t).pipe(ue(()=>e)):Re(e)})}const th=new De("ROUTES");let $T=(()=>{class n{constructor(t,i){this.injector=t,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return Re(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);const i=pl(t.loadComponent()).pipe(ue(vF),Mn(o=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=o}),DT(()=>{this.componentLoaders.delete(t)})),r=new Pu(i,()=>new se).pipe(Jl());return this.componentLoaders.set(t,r),r}loadChildren(t,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Re({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(ue(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(t).injector,c=SR(l.get(th,[],Ze.Self|Ze.Optional)));return{routes:c.map(zT),injector:l}}),DT(()=>{this.childrenLoaders.delete(i)})),s=new Pu(o,()=>new se).pipe(Jl());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(t){return pl(t()).pipe(ue(vF),Xn(r=>r instanceof JA||Array.isArray(r)?Re(r):_t(this.compiler.compileModuleAsync(r))))}}return n.\u0275fac=function(t){return new(t||n)(F(yr),F(Hk))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function vF(n){return function yne(n){return n&&"object"==typeof n&&"default"in n}(n)?n.default:n}let Vv=(()=>{class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new se,this.configLoader=vt($T),this.environmentInjector=vt(Ts),this.urlSerializer=vt(Tp),this.rootContexts=vt(kp),this.navigationId=0,this.afterPreactivation=()=>Re(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new ote(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new rte(r))}complete(){this.transitions?.complete()}handleNavigationRequest(t){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...t,id:i})}setupNavigations(t){return this.transitions=new Wr({id:0,targetPageId:0,currentUrlTree:t.currentUrlTree,currentRawUrl:t.currentUrlTree,extractedUrl:t.urlHandlingStrategy.extract(t.currentUrlTree),urlAfterRedirects:t.urlHandlingStrategy.extract(t.currentUrlTree),rawUrl:t.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Op,restoredState:null,currentSnapshot:t.routerState.snapshot,targetSnapshot:null,currentRouterState:t.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Un(i=>0!==i.id),ue(i=>({...i,extractedUrl:t.urlHandlingStrategy.extract(i.rawUrl)})),ci(i=>{let r=!1,o=!1;return Re(i).pipe(Mn(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),ci(s=>{const a=t.browserUrlTree.toString(),l=!t.navigated||s.extractedUrl.toString()!==a||a!==t.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??t.onSameUrlNavigation)){const u="";return this.events.next(new UR(s.id,t.serializeUrl(i.rawUrl),u,0)),t.rawUrlTree=s.rawUrl,s.resolve(null),ol}if(t.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return bF(s.source)&&(t.browserUrlTree=s.extractedUrl),Re(s).pipe(ci(u=>{const d=this.transitions?.getValue();return this.events.next(new OT(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?ol:Promise.resolve(u)}),function tne(n,e,t,i){return ci(r=>function Xte(n,e,t,i,r){return new ene(n,e,t,i,r).apply()}(n,e,t,r.extractedUrl,i).pipe(ue(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,t.config),Mn(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function une(n,e,t,i,r){return Xn(o=>function rne(n,e,t,i,r,o,s="emptyOnly"){return new one(n,e,t,i,r,s,o).recognize().pipe(ci(a=>null===a?function ine(n){return new Se(e=>e.error(n))}(new nne):Re(a)))}(n,e,t,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(ue(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,t.config,this.urlSerializer,t.paramsInheritanceStrategy),Mn(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===t.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=t.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);t.setBrowserUrl(h,u)}t.browserUrlTree=u.urlAfterRedirects}const d=new Xee(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&t.urlHandlingStrategy.shouldProcessUrl(t.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new OT(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=YR(d,this.rootComponentType).snapshot;return Re(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new UR(s.id,t.serializeUrl(i.extractedUrl),u,1)),t.rawUrlTree=s.rawUrl,s.resolve(null),ol}}),Mn(s=>{const a=new ete(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),ue(s=>i={...s,guards:Ste(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function Fte(n,e){return Xn(t=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return 0===s.length&&0===o.length?Re({...t,guardsResult:!0}):function jte(n,e,t,i){return _t(n).pipe(Xn(r=>function $te(n,e,t,i,r){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return o&&0!==o.length?Re(o.map(a=>{const l=Np(e)??r,c=Xd(a,l);return pl(function Pte(n){return n&&Rp(n.canDeactivate)}(c)?c.canDeactivate(n,e,t,i):l.runInContext(()=>c(n,e,t,i))).pipe(fl())})).pipe(eh()):Re(!0)}(r.component,r.route,t,e,i)),fl(r=>!0!==r,!0))}(s,i,r,n).pipe(Xn(a=>a&&function Ote(n){return"boolean"==typeof n}(a)?function zte(n,e,t,i){return _t(e).pipe(rl(r=>lT(function Bte(n,e){return null!==n&&e&&e(new ste(n)),Re(!0)}(r.route.parent,i),function Vte(n,e){return null!==n&&e&&e(new lte(n)),Re(!0)}(r.route,i),function Hte(n,e,t){const i=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>function Ete(n){const e=n.routeConfig?n.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:n,guards:e}:null}(s)).filter(s=>null!==s).map(s=>CR(()=>Re(s.guards.map(l=>{const c=Np(s.node)??t,u=Xd(l,c);return pl(function Nte(n){return n&&Rp(n.canActivateChild)}(u)?u.canActivateChild(i,n):c.runInContext(()=>u(i,n))).pipe(fl())})).pipe(eh())));return Re(o).pipe(eh())}(n,r.path,t),function Ute(n,e,t){const i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return Re(!0);const r=i.map(o=>CR(()=>{const s=Np(e)??t,a=Xd(o,s);return pl(function kte(n){return n&&Rp(n.canActivate)}(a)?a.canActivate(e,n):s.runInContext(()=>a(e,n))).pipe(fl())}));return Re(r).pipe(eh())}(n,r.route,t))),fl(r=>!0!==r,!0))}(i,o,n,e):Re(a)),ue(a=>({...t,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),Mn(s=>{if(i.guardsResult=s.guardsResult,Fc(s.guardsResult))throw ZR(0,s.guardsResult);const a=new tte(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),Un(s=>!!s.guardsResult||(t.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),HT(s=>{if(s.guards.canActivateChecks.length)return Re(s).pipe(Mn(a=>{const l=new nte(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ci(a=>{let l=!1;return Re(a).pipe(function dne(n,e){return Xn(t=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=t;if(!r.length)return Re(t);let o=0;return _t(r).pipe(rl(s=>function hne(n,e,t,i){const r=n.routeConfig,o=n._resolve;return void 0!==r?.title&&!yF(r)&&(o[Dp]=r.title),function fne(n,e,t,i){const r=function pne(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return Re({});const o={};return _t(r).pipe(Xn(s=>function mne(n,e,t,i){const r=Np(e)??i,o=Xd(n,r);return pl(o.resolve?o.resolve(e,t):r.runInContext(()=>o(e,t)))}(n[s],e,t,i).pipe(fl(),Mn(a=>{o[s]=a}))),Cp(1),function wee(n){return e=>e.lift(new Cee(n))}(o),Ai(s=>VT(s)?ol:ho(s)))}(o,n,e,i).pipe(ue(s=>(n._resolvedData=s,n.data=qR(n,t).resolve,r&&yF(r)&&(n.data[Dp]=r.title),null)))}(s.route,i,n,e)),Mn(()=>o++),Cp(1),Xn(s=>o===r.length?Re(t):ol))})}(t.paramsInheritanceStrategy,this.environmentInjector),Mn({next:()=>l=!0,complete:()=>{l||(t.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),Mn(a=>{const l=new ite(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),HT(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(Mn(u=>{l.component=u}),ue(()=>{})));for(const u of l.children)c.push(...a(u));return c};return CT(a(s.targetSnapshot.root)).pipe(Yd(),Tt(1))}),HT(()=>this.afterPreactivation()),ue(s=>{const a=function mte(n,e,t){const i=Ap(n,e._root,t?t._root:void 0);return new GR(i,e)}(t.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),Mn(s=>{t.currentUrlTree=s.urlAfterRedirects,t.rawUrlTree=t.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),t.routerState=s.targetRouterState,"deferred"===t.urlUpdateStrategy&&(s.extras.skipLocationChange||t.setBrowserUrl(t.rawUrlTree,s),t.browserUrlTree=s.urlAfterRedirects)}),((n,e,t)=>ue(i=>(new Tte(e,i.targetRouterState,i.currentRouterState,t).activate(n),i)))(this.rootContexts,t.routeReuseStrategy,s=>this.events.next(s)),Mn({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,t.navigated=!0,this.events.next(new jc(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(t.currentUrlTree))),t.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),DT(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Ai(s=>{if(o=!0,eF(s)){XR(s)||(t.navigated=!0,t.restoreHistory(i,!0));const a=new Ov(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),XR(s)){const l=t.urlHandlingStrategy.merge(s.url,t.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===t.urlUpdateStrategy||bF(i.source)};t.scheduleNavigation(l,Op,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{t.restoreHistory(i,!0);const a=new HR(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(t.errorHandler(s))}catch(l){i.reject(l)}}return ol}))}))}cancelNavigationTransition(t,i,r){const o=new Ov(t.id,this.urlSerializer.serialize(t.extractedUrl),i,r);this.events.next(o),t.resolve(!1)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function bF(n){return n!==Op}let wF=(()=>{class n{buildTitle(t){let i,r=t.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===At);return i}getResolvedTitleForRoute(t){return t.data[Dp]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return vt(_ne)},providedIn:"root"}),n})(),_ne=(()=>{class n extends wF{constructor(t){super(),this.title=t}updateTitle(t){const i=this.buildTitle(t);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(t){return new(t||n)(F(lP))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),vne=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return vt(wne)},providedIn:"root"}),n})();class bne{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}let wne=(()=>{class n extends bne{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=Oi(n)))(i||n)}}(),n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Bv=new De("",{providedIn:"root",factory:()=>({})});let Dne=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:function(){return vt(Mne)},providedIn:"root"}),n})(),Mne=(()=>{class n{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,i){return t}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Tne(n){throw n}function Sne(n,e,t){return e.parse("/")}const Ene={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},xne={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Tr=(()=>{class n{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=vt(B6),this.isNgZoneEnabled=!1,this.options=vt(Bv,{optional:!0})||{},this.errorHandler=this.options.errorHandler||Tne,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||Sne,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=vt(Dne),this.routeReuseStrategy=vt(vne),this.urlCreationStrategy=vt(hte),this.titleStrategy=vt(wF),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=SR(vt(th,{optional:!0})??[]),this.navigationTransitions=vt(Vv),this.urlSerializer=vt(Tp),this.location=vt(xD),this.isNgZoneEnabled=vt(Jt)instanceof Jt&&Jt.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Lc,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=YR(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(t=>{this.lastSuccessfulId=t.id,this.currentPageId=t.targetPageId},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const t=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Op,t)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const i="popstate"===t.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(t.url,i,t.state)},0)}))}navigateToSyncWithBrowser(t,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(t);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(t){this.config=t.map(zT),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,t,u,c??null)}navigateByUrl(t,i={skipLocationChange:!1}){const r=Fc(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Op,null,i)}navigate(t,i={skipLocationChange:!1}){return function Ine(n){for(let e=0;e{const o=t[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(t,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(t,i){const r=this.urlSerializer.serialize(t),o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",o):this.location.go(r,"",o)}restoreHistory(t,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-t.targetPageId;"popstate"!==t.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,i){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:i}:{navigationId:t}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class DF{}let kne=(()=>{class n{constructor(t,i,r,o,s){this.router=t,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(Un(t=>t instanceof jc),rl(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Zy(o.providers,t,`Route: ${o.path}`));const s=o._injector??t,a=o._loadedInjector??s;o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent?r.push(this.preloadConfig(s,o)):(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return _t(r).pipe($a())}preloadConfig(t,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(t,i):Re(null);const o=r.pipe(Xn(s=>null===s?Re(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??t,s.routes))));return i.loadComponent&&!i._loadedComponent?_t([o,this.loader.loadComponent(i)]).pipe($a()):o})}}return n.\u0275fac=function(t){return new(t||n)(F(Tr),F(Hk),F(Ts),F(DF),F($T))},n.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const GT=new De("");let MF=(()=>{class n{constructor(t,i,r,o,s={}){this.urlSerializer=t,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof OT?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof jc&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof $R&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new $R(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return n.\u0275fac=function(t){!function iO(){throw new Error("invalid")}()},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();function zc(n,e){return{\u0275kind:n,\u0275providers:e}}function SF(){const n=vt(yr);return e=>{const t=n.get(_c);if(e!==t.components[0])return;const i=n.get(Tr),r=n.get(EF);1===n.get(qT)&&i.initialNavigation(),n.get(xF,null,Ze.Optional)?.setUpPreloading(),n.get(GT,null,Ze.Optional)?.init(),i.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const EF=new De("",{factory:()=>new se}),qT=new De("",{providedIn:"root",factory:()=>1});const xF=new De("");function Fne(n){return zc(0,[{provide:xF,useExisting:kne},{provide:DF,useExisting:n}])}const IF=new De("ROUTER_FORROOT_GUARD"),jne=[xD,{provide:Tp,useClass:MT},Tr,kp,{provide:Jd,useFactory:function TF(n){return n.routerState.root},deps:[Tr]},$T,[]];function zne(){return new Qk("Router",Tr)}let OF=(()=>{class n{constructor(t){}static forRoot(t,i){return{ngModule:n,providers:[jne,[],{provide:th,multi:!0,useValue:t},{provide:IF,useFactory:Hne,deps:[[Tr,new Mf,new Tf]]},{provide:Bv,useValue:i||{}},i?.useHash?{provide:bc,useClass:O$}:{provide:bc,useClass:vN},{provide:GT,useFactory:()=>{const n=vt($W),e=vt(Jt),t=vt(Bv),i=vt(Vv),r=vt(Tp);return t.scrollOffset&&n.setOffset(t.scrollOffset),new MF(r,i,n,e,t)}},i?.preloadingStrategy?Fne(i.preloadingStrategy).\u0275providers:[],{provide:Qk,multi:!0,useFactory:zne},i?.initialNavigation?$ne(i):[],[{provide:AF,useFactory:SF},{provide:Bk,multi:!0,useExisting:AF}]]}}static forChild(t){return{ngModule:n,providers:[{provide:th,multi:!0,useValue:t}]}}}return n.\u0275fac=function(t){return new(t||n)(F(IF,8))},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[FT]}),n})();function Hne(n){return"guarded"}function $ne(n){return["disabled"===n.initialNavigation?zc(3,[{provide:t_,multi:!0,useFactory:()=>{const e=vt(Tr);return()=>{e.setUpLocationChangeListener()}}},{provide:qT,useValue:2}]).\u0275providers:[],"enabledBlocking"===n.initialNavigation?zc(2,[{provide:qT,useValue:0},{provide:t_,multi:!0,deps:[yr],useFactory:e=>{const t=e.get(x$,Promise.resolve());return()=>t.then(()=>new Promise(r=>{const o=e.get(Tr),s=e.get(EF);(function i(r){e.get(Tr).events.pipe(Un(s=>s instanceof jc||s instanceof Ov||s instanceof HR),ue(s=>s instanceof jc||s instanceof Ov&&(0===s.code||1===s.code)&&null),Un(s=>null!==s),Tt(1)).subscribe(()=>{r()})})(()=>{r(!0)}),e.get(Vv).afterPreactivation=()=>(r(!0),s.closed?Re(void 0):s),o.initialNavigation()}))}}]).\u0275providers:[]]}const AF=new De("");class Ut{constructor(e,t,i){this.loggerService=e,this.router=t,this.http=i,this.httpErrosSubjects=[]}request(e){e.method||(e.method="GET");const t=this.getRequestOpts(e),i=e.body;return this.http.request(t).pipe(Un(r=>r.type===In.Response),ue(r=>{try{return r.body}catch{return r}}),Ai((r,o)=>{if(r){if(this.emitHttpError(r.status),r.status===Pc.SERVER_ERROR||r.status===Pc.FORBIDDEN)throw r.statusText&&r.statusText.indexOf("ECONNREFUSED")>=0?new bT(1,ree_1,t,r,i):new bT(3,r.error.message,t,r,i);if(r.status===Pc.NOT_FOUND)throw this.loggerService.error("Could not execute request: 404 path not valid.",e.url),new bT(2,r.headers.get("error-message"),t,r,i)}return null}))}requestView(e){let t;return e.method||(e.method="GET"),t=this.getRequestOpts(e),this.http.request(t).pipe(Un(i=>i.type===In.Response),ue(i=>i.body&&i.body.errors&&i.body.errors.length>0?this.handleRequestViewErrors(i):new wT(i)),Ai(i=>(this.emitHttpError(i.status),ho(this.handleResponseHttpErrors(i)))))}subscribeToHttpError(e){return this.httpErrosSubjects[e]||(this.httpErrosSubjects[e]=new se),this.httpErrosSubjects[e].asObservable()}handleRequestViewErrors(e){return 401===e.status&&this.router.navigate(["/public/login"]),new wT(e)}handleResponseHttpErrors(e){return 401===e.status&&this.router.navigate(["/public/login"]),e}emitHttpError(e){this.httpErrosSubjects[e]&&this.httpErrosSubjects[e].next()}getRequestOpts(e){const t=this.getHttpHeaders(e.headers),i=this.getHttpParams(e.params),r=this.getFixedUrl(e.url);return"POST"===e.method||"PUT"===e.method||"PATCH"===e.method||"DELETE"===e.method?new Da(e.method,r,e.body||null,{headers:t,params:i}):new Da(e.method,r,{headers:t,params:i})}getHttpHeaders(e){let t=this.getDefaultRequestHeaders();return e&&Object.keys(e).length&&(Object.keys(e).forEach(i=>{t=t.set(i,e[i])}),"multipart/form-data"===e["Content-Type"]&&(t=t.delete("Content-Type"))),t}getFixedUrl(e){return e?.startsWith("api")?`/${e}`:(e?e.split("/")[0]:"").match(/v[1-9]/g)?`/api/${e}`:e}getHttpParams(e){if(e&&Object.keys(e).length){let t=new cs;return Object.keys(e).forEach(i=>{t=t.set(i,e[i])}),t}return null}getDefaultRequestHeaders(){return(new Cr).set("Accept","*/*").set("Content-Type","application/json")}}Ut.\u0275fac=function(e){return new(e||Ut)(F(mo),F(Tr),F(tr))},Ut.\u0275prov=$({token:Ut,factory:Ut.\u0275fac});class zp{constructor(){this.data=new se}get showDialog$(){return this.data.asObservable()}open(e){this.data.next(e)}}zp.\u0275fac=function(e){return new(e||zp)},zp.\u0275prov=$({token:zp,factory:zp.\u0275fac,providedIn:"root"});class ih{constructor(e){this.router=e}goToMain(){this.router.navigate(["/c"])}goToLogin(e){this.router.navigate(["/public/login"],e)}goToURL(e){this.router.navigate([e])}isPublicUrl(e){return e.startsWith("/public")}isFromCoreUrl(e){return e.startsWith("/fromCore")}isRootUrl(e){return"/"===e}gotoPortlet(e){this.router.navigate([`c/${e.replace(" ","_")}`])}goToForgotPassword(){this.router.navigate(["/public/forgotPassword"])}goToNotLicensed(){this.router.navigate(["c/notLicensed"])}}function Oe(...n){const e=n.length;if(0===e)throw new Error("list of properties cannot be empty.");return t=>ue(function Gne(n,e){return i=>{let r=i;for(let o=0;o!!e))}loadConfig(){this.loggerService.debug("Loading configuration on: ",this.configUrl),this.coreWebService.requestView({url:this.configUrl}).pipe(Oe("entity")).subscribe(e=>{this.loggerService.debug("Configuration Loaded!",e);const t={colors:e.config.colors,emailRegex:e.config.emailRegex,license:e.config.license,logos:e.config.logos,menu:e.menu,paginatorLinks:e.config["dotcms.paginator.links"],paginatorRows:e.config["dotcms.paginator.rows"],releaseInfo:{buildDate:e.config.releaseInfo?.buildDate,version:e.config.releaseInfo?.version},websocket:{websocketReconnectTime:e.config.websocket["dotcms.websocket.reconnect.time"],disabledWebsockets:e.config.websocket["dotcms.websocket.disable"]}};return this.configParamsSubject.next(t),this.loggerService.debug("this.configParams",t),e})}getTimeZones(){return this.coreWebService.requestView({url:this.configUrl}).pipe(Oe("entity","config","timezones"),ue(e=>e.sort((t,i)=>t.label>i.label?1:t.label{this.connect()},0)}destroy(){this._open.complete(),this._close.complete(),this._message.complete(),this._error.complete()}}var Uv=(()=>(function(n){n[n.NORMAL_CLOSE_CODE=1e3]="NORMAL_CLOSE_CODE",n[n.GO_AWAY_CODE=1001]="GO_AWAY_CODE"}(Uv||(Uv={})),Uv))();class NF extends kF{constructor(e,t){if(super(t),this.url=e,this.dataStream=new se,!new RegExp("wss?://").test(e))throw new Error("Invalid url provided ["+e+"]")}connect(){this.errorThrown=!1,this.loggerService.debug("Connecting with Web socket",this.url);try{this.socket=new WebSocket(this.url),this.socket.onopen=e=>{this.loggerService.debug("Web socket connected",this.url),this._open.next(e)},this.socket.onmessage=e=>{this._message.next(JSON.parse(e.data))},this.socket.onclose=e=>{this.errorThrown||(e.code===Uv.NORMAL_CLOSE_CODE?(this._close.next(e),this._message.complete()):this._error.next(e))},this.socket.onerror=e=>{this.errorThrown=!0,this._error.next(e)}}catch(e){this.loggerService.debug("Web EventsSocket connection error",e),this._error.next(e)}}close(){this.socket&&3!==this.socket.readyState&&this.socket.close()}}class Jne extends kF{constructor(e,t,i){super(t),this.url=e,this.coreWebService=i,this.isClosed=!1,this.isAlreadyOpen=!1}connect(){this.connectLongPooling()}close(){this.loggerService.info("destroying long polling"),this.isClosed=!0,this.isAlreadyOpen=!1,this._close.next()}getLastCallback(e){return this.lastCallback=e.length>0?e[e.length-1].creationDate+1:this.lastCallback,this.lastCallback}connectLongPooling(e){this.isClosed=!1,this.loggerService.info("Starting long polling connection"),this.coreWebService.requestView({url:this.url,params:e?{lastCallBack:e}:{}}).pipe(Oe("entity"),Tt(1)).subscribe(t=>{this.loggerService.debug("new Events",t),this.triggerOpen(),t instanceof Array?t.forEach(i=>{this._message.next(i)}):this._message.next(t),this.isClosed||this.connectLongPooling(this.getLastCallback(t))},t=>{this.loggerService.info("A error occur connecting through long polling"),this._error.next(t)})}triggerOpen(){this.isAlreadyOpen||(this._open.next(!0),this.isAlreadyOpen=!0)}}class Xne{constructor(e,t){this.url=e,this.useSSL=t}getWebSocketURL(){return`${this.getWebSocketProtocol()}://${this.url}`}getLongPoolingURL(){return`${this.getHttpProtocol()}://${this.url}`}getWebSocketProtocol(){return this.useSSL?"wss":"ws"}getHttpProtocol(){return this.useSSL?"https":"http"}}var Gr=(()=>(function(n){n[n.NONE=0]="NONE",n[n.CONNECTING=1]="CONNECTING",n[n.RECONNECTING=2]="RECONNECTING",n[n.CONNECTED=3]="CONNECTED",n[n.CLOSED=4]="CLOSED"}(Gr||(Gr={})),Gr))();class rh{constructor(e,t,i,r){this.dotEventsSocketURL=e,this.dotcmsConfigService=t,this.loggerService=i,this.coreWebService=r,this.status=Gr.NONE,this._message=new se,this._open=new se}connect(){return this.init().pipe(Mn(()=>{this.status=Gr.CONNECTING,this.connectProtocol()}))}destroy(){this.protocolImpl&&(this.loggerService.debug("Closing socket"),this.status=Gr.CLOSED,this.protocolImpl.close())}messages(){return this._message.asObservable()}open(){return this._open.asObservable()}isConnected(){return this.status===Gr.CONNECTED}init(){return this.dotcmsConfigService.getConfig().pipe(Oe("websocket"),Mn(e=>{this.webSocketConfigParams=e,this.protocolImpl=this.isWebSocketsBrowserSupport()&&!e.disabledWebsockets?this.getWebSocketProtocol():this.getLongPollingProtocol()}))}connectProtocol(){this.protocolImpl.open$().subscribe(()=>{this.status=Gr.CONNECTED,this._open.next(!0)}),this.protocolImpl.error$().subscribe(()=>{this.shouldTryWithLongPooling()?(this.loggerService.info("Error connecting with Websockets, trying again with long polling"),this.protocolImpl.destroy(),this.protocolImpl=this.getLongPollingProtocol(),this.connectProtocol()):setTimeout(()=>{this.status=this.getAfterErrorStatus(),this.protocolImpl.connect()},this.webSocketConfigParams.websocketReconnectTime)}),this.protocolImpl.close$().subscribe(e=>{this.status=Gr.CLOSED}),this.protocolImpl.message$().subscribe(e=>this._message.next(e),e=>this.loggerService.debug("Error in the System Events service: "+e.message),()=>this.loggerService.debug("Completed")),this.protocolImpl.connect()}getAfterErrorStatus(){return this.status===Gr.CONNECTING?Gr.CONNECTING:Gr.RECONNECTING}shouldTryWithLongPooling(){return this.isWebSocketProtocol()&&this.status!==Gr.CONNECTED&&this.status!==Gr.RECONNECTING}getWebSocketProtocol(){return new NF(this.dotEventsSocketURL.getWebSocketURL(),this.loggerService)}getLongPollingProtocol(){return new Jne(this.dotEventsSocketURL.getLongPoolingURL(),this.loggerService,this.coreWebService)}isWebSocketsBrowserSupport(){return"WebSocket"in window||"MozWebSocket"in window}isWebSocketProtocol(){return this.protocolImpl instanceof NF}}rh.\u0275fac=function(e){return new(e||rh)(F(Xne),F(Vc),F(mo),F(Ut))},rh.\u0275prov=$({token:rh,factory:rh.\u0275fac});class ml{constructor(e,t){this.dotEventsSocket=e,this.loggerService=t,this.subjects=[]}destroy(){this.dotEventsSocket.destroy(),this.messagesSub.unsubscribe()}start(){this.loggerService.debug("start DotcmsEventsService",this.dotEventsSocket.isConnected()),this.dotEventsSocket.isConnected()||(this.loggerService.debug("Connecting with socket"),this.messagesSub=this.dotEventsSocket.connect().pipe(ci(()=>this.dotEventsSocket.messages())).subscribe(({event:e,payload:t})=>{this.subjects[e]||(this.subjects[e]=new se),this.subjects[e].next(t.data)},e=>{this.loggerService.debug("Error in the System Events service: "+e.message)},()=>{this.loggerService.debug("Completed")}))}subscribeTo(e){return this.subjects[e]||(this.subjects[e]=new se),this.subjects[e].asObservable()}subscribeToEvents(e){const t=new se;return e.forEach(i=>{this.subscribeTo(i).subscribe(r=>{t.next({data:r,name:i})})}),t.asObservable()}open(){return this.dotEventsSocket.open()}}ml.\u0275fac=function(e){return new(e||ml)(F(rh),F(mo))},ml.\u0275prov=$({token:ml,factory:ml.\u0275fac});var Vp=(()=>(function(n){n.SHOW_VIDEO_THUMBNAIL="SHOW_VIDEO_THUMBNAIL"}(Vp||(Vp={})),Vp))(),Bp=(()=>(function(n){n.FULFILLED="fulfilled",n.REJECTED="rejected"}(Bp||(Bp={})),Bp))(),Hv=(()=>(function(n){n.EDIT="EDIT_MODE",n.PREVIEW="PREVIEW_MODE",n.LIVE="ADMIN_MODE"}(Hv||(Hv={})),Hv))();class eie{constructor(e){this._params=e}get params(){return this._params}get layout(){return this._params.layout}get page(){return this._params.page}get containers(){return this._params.containers}get containerMap(){return Object.keys(this.containers).reduce((e,t)=>({...e,[t]:this.containers[t].container}),{})}get site(){return this._params.site}get template(){return this._params.template}get canCreateTemplate(){return this._params.canCreateTemplate}get viewAs(){return this._params.viewAs}get numberContents(){return this._params.numberContents}set numberContents(e){this._params.numberContents=e}}getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-20"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-30"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-50"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-70");const Up="variantName";class Uc{constructor(e,t){this.coreWebService=e,this.dotcmsEventsService=t,this.country="",this.lang="",this._auth$=new se,this._logout$=new se,this._loginAsUsersList$=new se,this.urls={changePassword:"v1/changePassword",getAuth:"v1/authentication/logInUser",loginAs:"v1/users/loginas",logout:"v1/logout",logoutAs:"v1/users/logoutas",recoverPassword:"v1/forgotpassword",serverInfo:"v1/loginform",userAuth:"v1/authentication",current:"/api/v1/users/current/"},t.subscribeTo("SESSION_DESTROYED").subscribe(()=>{this.logOutUser(),this.clearExperimentPersistence()}),t.subscribeTo("SESSION_LOGOUT").subscribe(()=>{this.clearExperimentPersistence()})}get auth$(){return this._auth$.asObservable()}get logout$(){return this._logout$.asObservable()}get auth(){return this._auth}get loginAsUsersList$(){return this._loginAsUsersList$.asObservable()}get isLogin$(){return this.auth&&this.auth.user?Re(!0):this.loadAuth().pipe(ue(e=>!!e&&!!e.user))}getCurrentUser(){return this.coreWebService.request({url:this.urls.current}).pipe(ue(e=>e))}loadAuth(){return this.coreWebService.requestView({url:this.urls.getAuth}).pipe(Oe("entity"),Mn(e=>{e.user&&this.setAuth(e)}),ue(e=>this.getFullAuth(e)))}changePassword(e,t){const i=JSON.stringify({password:e,token:t});return this.coreWebService.requestView({body:i,method:"POST",url:this.urls.changePassword}).pipe(Oe("entity"))}getLoginFormInfo(e,t){return this.setLanguage(e),this.coreWebService.requestView({body:{messagesKey:t,language:this.lang,country:this.country},method:"POST",url:this.urls.serverInfo}).pipe(Oe("bodyJsonObject"))}loginAs(e){return this.coreWebService.requestView({body:{password:e.password,userId:e.user.userId},method:"POST",url:this.urls.loginAs}).pipe(ue(t=>{if(!t.entity.loginAs)throw t.errorsMessages;return this.setAuth({loginAsUser:e.user,user:this._auth.user}),t}),Oe("entity","loginAs"))}loginUser({login:e,password:t,rememberMe:i,language:r,backEndLogin:o}){return this.setLanguage(r),this.coreWebService.requestView({body:{userId:e,password:t,rememberMe:i,language:this.lang,country:this.country,backEndLogin:o},method:"POST",url:this.urls.userAuth}).pipe(ue(s=>(this.setAuth({loginAsUser:null,user:s.entity}),this.coreWebService.subscribeToHttpError(Pc.UNAUTHORIZED).subscribe(()=>{this.logOutUser()}),s.entity)))}logoutAs(){return this.coreWebService.requestView({method:"PUT",url:`${this.urls.logoutAs}`}).pipe(ue(e=>(this.setAuth({loginAsUser:null,user:this._auth.user}),e.entity.logoutAs)))}recoverPassword(e){return this.coreWebService.requestView({body:{userId:e},method:"POST",url:this.urls.recoverPassword}).pipe(Oe("entity"))}watchUser(e){this.auth&&e(this.auth),this.auth$.subscribe(t=>{t.user&&e(t)})}setAuth(e){this._auth=this.getFullAuth(e),this._auth$.next(this.getFullAuth(e)),e.user?this.dotcmsEventsService.start():this._logout$.next()}setLanguage(e){if(void 0!==e&&""!==e){const t=e.split("_");this.lang=t[0],this.country=t[1]}else this.lang="",this.country=""}logOutUser(){window.location.href=`/dotAdmin/logout?r=${(new Date).getTime()}`}getFullAuth(e){const t=!!e.loginAsUser||!!Object.keys(e.loginAsUser||{}).length;return{...e,isLoginAs:t}}clearExperimentPersistence(){sessionStorage.removeItem(Up)}}Uc.\u0275fac=function(e){return new(e||Uc)(F(Ut),F(ml))},Uc.\u0275prov=$({token:Uc,factory:Uc.\u0275fac});class Hp{constructor(e,t,i,r){this.router=t,this.coreWebService=i,this._menusChange$=new se,this._portletUrlSource$=new se,this._currentPortlet$=new se,this.urlMenus="v1/CORE_WEB/menu",this.portlets=new Map,e.watchUser(this.loadMenus.bind(this)),r.subscribeTo("UPDATE_PORTLET_LAYOUTS").subscribe(this.loadMenus.bind(this))}get currentPortletId(){return this._currentPortletId}get currentMenu(){return this.menus}get menusChange$(){return this._menusChange$.asObservable()}get portletUrl$(){return this._portletUrlSource$.asObservable()}get firstPortlet(){const e=this.portlets.entries().next().value;return e?e[0]:null}addPortletURL(e,t){this.portlets.set(e.replace(" ","_"),t)}getPortletURL(e){return this.portlets.get(e)}goToPortlet(e){this.router.gotoPortlet(e),this._currentPortletId=e}isPortlet(e){let t=this.getPortletId(e);return t.indexOf("?")>=0&&(t=t.substr(0,t.indexOf("?"))),this.portlets.has(t)}setCurrentPortlet(e){let t=this.getPortletId(e);t.indexOf("?")>=0&&(t=t.substr(0,t.indexOf("?"))),this._currentPortletId=t,this._currentPortlet$.next(t)}get currentPortlet$(){return this._currentPortlet$}setMenus(e){if(this.menus=e,this.menus.length){this.portlets=new Map;for(let t=0;t{this.setMenus(e.entity)},e=>this._menusChange$.error(e))}getPortletId(e){const t=e.split("/");return t[t.length-1]}}Hp.\u0275fac=function(e){return new(e||Hp)(F(Uc),F(ih),F(Ut),F(ml))},Hp.\u0275prov=$({token:Hp,factory:Hp.\u0275fac});class $p{constructor(e,t,i,r){this.coreWebService=i,this.loggerService=r,this.events=["SAVE_SITE","PUBLISH_SITE","UPDATE_SITE_PERMISSIONS","UN_ARCHIVE_SITE","UPDATE_SITE","ARCHIVE_SITE"],this._switchSite$=new se,this._refreshSites$=new se,this.urls={currentSiteUrl:"v1/site/currentSite",sitesUrl:"v1/site",switchSiteUrl:"v1/site/switch"},t.subscribeToEvents(["ARCHIVE_SITE","UPDATE_SITE"]).subscribe(o=>this.eventResponse(o)),t.subscribeToEvents(this.events).subscribe(({data:o})=>this.siteEventsHandler(o)),t.subscribeToEvents(["SWITCH_SITE"]).subscribe(({data:o})=>this.setCurrentSite(o)),e.watchUser(()=>this.loadCurrentSite())}eventResponse({name:e,data:t}){this.loggerService.debug("Capturing Site event",e,t),t.identifier===this.selectedSite.identifier&&("ARCHIVE_SITE"===e?this.switchToDefaultSite().pipe(Tt(1),ci(r=>this.switchSite(r))).subscribe():this.loadCurrentSite())}siteEventsHandler(e){this._refreshSites$.next(e)}get refreshSites$(){return this._refreshSites$.asObservable()}get switchSite$(){return this._switchSite$.asObservable()}get currentSite(){return this.selectedSite}switchToDefaultSite(){return this.coreWebService.requestView({method:"PUT",url:"v1/site/switch"}).pipe(Oe("entity"))}getSiteById(e){return this.coreWebService.requestView({url:`/api/content/render/false/query/+contentType:host%20+identifier:${e}`}).pipe(Oe("contentlets"),ue(t=>t[0]))}switchSiteById(e){return this.loggerService.debug("Applying a Site Switch"),this.getSiteById(e).pipe(ci(t=>t?this.switchSite(t):Re(null)),Tt(1))}switchSite(e){return this.loggerService.debug("Applying a Site Switch",e.identifier),this.coreWebService.requestView({method:"PUT",url:`${this.urls.switchSiteUrl}/${e.identifier}`}).pipe(Tt(1),Mn(()=>this.setCurrentSite(e)),ue(()=>e))}getCurrentSite(){return ys(this.selectedSite?Re(this.selectedSite):this.requestCurrentSite(),this.switchSite$)}requestCurrentSite(){return this.coreWebService.requestView({url:this.urls.currentSiteUrl}).pipe(Oe("entity"))}setCurrentSite(e){this.selectedSite=e,this._switchSite$.next({...e})}loadCurrentSite(){this.getCurrentSite().pipe(Tt(1)).subscribe(e=>{this.setCurrentSite(e)})}}$p.\u0275fac=function(e){return new(e||$p)(F(Uc),F(ml),F(Ut),F(mo))},$p.\u0275prov=$({token:$p,factory:$p.\u0275fac,providedIn:"root"});class Hc{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}Hc.\u0275fac=function(e){return new(e||Hc)},Hc.\u0275prov=$({token:Hc,factory:Hc.\u0275fac});class oh{storeValue(e,t){localStorage.setItem(e,t)}getValue(e){return localStorage.getItem(e)}clearValue(e){localStorage.removeItem(e)}clear(){localStorage.clear()}}oh.\u0275fac=function(e){return new(e||oh)},oh.\u0275prov=$({token:oh,factory:oh.\u0275fac});class Wp{}var Gp;Wp.\u0275fac=function(e){return new(e||Wp)},Wp.\u0275mod=rt({type:Wp}),Wp.\u0275inj=wt({providers:[oh]});let QT=((Gp=class{constructor(e){this.iconPath=e.iconPath}displayErrorMessage(e){this.displayMessage("Error",e,"error")}displaySuccessMessage(e){this.displayMessage("Success",e,"success")}displayInfoMessage(e){this.displayMessage("Info",e,"info")}displayMessage(e,t,i){let r;return r=new Notification(i,{body:t,icon:this.iconPath+"/"+i+".png"}),r}}).\u0275prov=$({token:Gp,factory:Gp.\u0275fac}),Gp);QT=function nie(n,e,t,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o}([wy("config"),function iie(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)}("design:paramtypes",[Hc])],QT);class Yp{}Yp.\u0275fac=function(e){return new(e||Yp)},Yp.\u0275mod=rt({type:Yp}),Yp.\u0275inj=wt({providers:[Hc,QT]});class qp{constructor(e){this._http=e}request(e){e.method||(e.method="GET");const t={params:new cs};return e.params&&Object.keys(e.params).forEach(i=>{t.params=t.params.set(i,e.params[i])}),this._http.request(new Da(e.method,e.url,e.body,{params:t.params})).pipe(Un(i=>i.type===In.Response),ue(i=>{try{return i.body}catch{return i}}))}requestView(e){e.method||(e.method="GET");const t={headers:new Cr,params:new cs};return e.params&&Object.keys(e.params).forEach(i=>{t.params=t.params.set(i,e.params[i])}),this._http.request(new Da(e.method,e.url,e.body,{params:t.params})).pipe(Un(i=>i.type===In.Response),ue(i=>new wT(i)))}subscribeTo(e){return Re({error:e})}}function or(n){this.content=n}qp.\u0275fac=function(e){return new(e||qp)(F(tr))},qp.\u0275prov=$({token:qp,factory:qp.\u0275fac}),or.prototype={constructor:or,find:function(n){for(var e=0;e>1}},or.from=function(n){if(n instanceof or)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new or(e)};const FF=or;function jF(n,e,t){for(let i=0;;i++){if(i==n.childCount||i==e.childCount)return n.childCount==e.childCount?null:t;let r=n.child(i),o=e.child(i);if(r!=o){if(!r.sameMarkup(o))return t;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)t++;return t}if(r.content.size||o.content.size){let s=jF(r.content,o.content,t+1);if(null!=s)return s}t+=r.nodeSize}else t+=r.nodeSize}}function zF(n,e,t,i){for(let r=n.childCount,o=e.childCount;;){if(0==r||0==o)return r==o?null:{a:t,b:i};let s=n.child(--r),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:t,b:i};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ce&&!1!==i(l,r+a,o||null,s)&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),i,r+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,i,r){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{a.isText?(o+=a.text.slice(Math.max(e,l)-l,t-l),s=!i):a.isLeaf?(r?o+="function"==typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),s=!i):!s&&a.isBlock&&(o+=i,s=!0)},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,i=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(i)&&(r[r.length-1]=t.withText(t.text+i.text),o=1);oe)for(let o=0,s=0;se&&((st)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),i.push(a),r+=a.nodeSize),s=l}return new le(i,r)}cutByIndex(e,t){return e==t?le.empty:0==e&&t==this.content.length?this:new le(this.content.slice(e,t))}replaceChild(e,t){let i=this.content[e];if(i==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-i.nodeSize;return r[e]=t,new le(r,o)}addToStart(e){return new le([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new le(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let i=0,r=0;;i++){let s=r+this.child(i).nodeSize;if(s>=e)return s==e||t>0?Wv(i+1,s):Wv(i,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return le.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new le(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return le.empty;let t,i=0;for(let r=0;r{class n{constructor(t,i){this.type=t,this.attrs=i}addToSet(t){let i,r=!1;for(let o=0;othis.type.rank&&(i||(i=t.slice(0,o)),i.push(this),r=!0),i&&i.push(s)}}return i||(i=t.slice()),r||i.push(this),i}removeFromSet(t){for(let i=0;ir.type.rank-o.type.rank),i}}return n.none=[],n})();class Yv extends Error{}class we{constructor(e,t,i){this.content=e,this.openStart=t,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let i=BF(this.content,e+this.openStart,t);return i&&new we(i,this.openStart,this.openEnd)}removeBetween(e,t){return new we(VF(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return we.empty;let i=t.openStart||0,r=t.openEnd||0;if("number"!=typeof i||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new we(le.fromJSON(e,t.content),i,r)}static maxOpen(e,t=!0){let i=0,r=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new we(e,i,r)}}function VF(n,e,t){let{index:i,offset:r}=n.findIndex(e),o=n.maybeChild(i),{index:s,offset:a}=n.findIndex(t);if(r==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(i!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(i,o.copy(VF(o.content,e-r-1,t-r-1)))}function BF(n,e,t,i){let{index:r,offset:o}=n.findIndex(e),s=n.maybeChild(r);if(o==e||s.isText)return i&&!i.canReplace(r,r,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=BF(s.content,e-o-1,t);return a&&n.replaceChild(r,s.copy(a))}function sie(n,e,t){if(t.openStart>n.depth)throw new Yv("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Yv("Inconsistent open depths");return UF(n,e,t,0)}function UF(n,e,t,i){let r=n.index(i),o=n.node(i);if(r==e.index(i)&&i=0;o--)r=e.node(o).copy(le.from(r));return{start:r.resolveNoCache(n.openStart+t),end:r.resolveNoCache(r.content.size-n.openEnd-t)}}(t,n);return Wc(o,$F(n,s,a,e,i))}{let s=n.parent,a=s.content;return Wc(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}}return Wc(o,qv(n,e,i))}function HF(n,e){if(!e.type.compatibleContent(n.type))throw new Yv("Cannot join "+e.type.name+" onto "+n.type.name)}function JT(n,e,t){let i=n.node(t);return HF(i,e.node(t)),i}function $c(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Kp(n,e,t,i){let r=(e||n).node(t),o=0,s=e?e.index(t):r.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&($c(n.nodeAfter,i),o++));for(let a=o;ar&&JT(n,e,r+1),s=i.depth>r&&JT(t,i,r+1),a=[];return Kp(null,n,r,a),o&&s&&e.index(r)==t.index(r)?(HF(o,s),$c(Wc(o,$F(n,e,t,i,r+1)),a)):(o&&$c(Wc(o,qv(n,e,r+1)),a),Kp(e,t,r,a),s&&$c(Wc(s,qv(t,i,r+1)),a)),Kp(i,null,r,a),new le(a)}function qv(n,e,t){let i=[];return Kp(null,n,t,i),n.depth>t&&$c(Wc(JT(n,e,t+1),qv(n,e,t+1)),i),Kp(e,null,t,i),new le(i)}we.empty=new we(le.empty,0,0);class Qp{constructor(e,t,i){this.pos=e,this.path=t,this.parentOffset=i,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=e.child(t);return i?e.child(t).cut(i):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let i=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let o=0;o0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;i--)if(e.pos<=this.end(i)&&(!t||t(this.node(i))))return new Kv(this,e,i);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let i=[],r=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(i.push(s,a,r+l),!c||(s=s.child(a),s.isText))break;o=c-1,r+=l+1}return new Qp(t,i,o)}static resolveCached(e,t){for(let r=0;re&&this.nodesBetween(e,t,o=>(i.isInSet(o.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),WF(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,i=le.empty,r=0,o=i.childCount){let s=this.contentMatchAt(e).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=r;lt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let i=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,i)}let r=le.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,i)}}js.prototype.text=void 0;class Qv extends js{constructor(e,t,i,r){if(super(e,t,null,r),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):WF(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Qv(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Qv(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function WF(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Gc{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let i=new uie(e,t);if(null==i.next)return Gc.empty;let r=GF(i);i.next&&i.err("Unexpected trailing text");let o=function yie(n){let e=Object.create(null);return function t(i){let r=[];i.forEach(s=>{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||r.push([a,c=[]]),-1==c.indexOf(u)&&c.push(u)})})});let o=e[i.join(",")]=new Gc(i.indexOf(n.length-1)>-1);for(let s=0;sl.concat(o(c,a)),[]);if("seq"!=s.type){if("star"==s.type){let l=t();return i(a,l),r(o(s.expr,l),l),[i(l)]}if("plus"==s.type){let l=t();return r(o(s.expr,a),l),r(o(s.expr,l),l),[i(l)]}if("opt"==s.type)return[i(a)].concat(o(s.expr,a));if("range"==s.type){let l=a;for(let c=0;cl.to=a)}}(r));return function _ie(n,e){for(let t=0,i=[n];tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(i){e.push(i);for(let r=0;r{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s"+e.indexOf(i.next[s].next);return o}).join("\n")}}Gc.empty=new Gc(!0);class uie{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function GF(n){let e=[];do{e.push(die(n))}while(n.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function die(n){let e=[];do{e.push(hie(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function hie(n){let e=function mie(n){if(n.eat("(")){let e=GF(n);return n.eat(")")||n.err("Missing closing paren"),e}if(!/\W/.test(n.next)){let e=function pie(n,e){let t=n.nodeTypes,i=t[e];if(i)return[i];let r=[];for(let o in t){let s=t[o];s.groups.indexOf(e)>-1&&r.push(s)}return 0==r.length&&n.err("No node type or group '"+e+"' found"),r}(n,n.next).map(t=>(null==n.inline?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}n.err("Unexpected token '"+n.next+"'")}(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else{if(!n.eat("{"))break;e=fie(n,e)}return e}function YF(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function fie(n,e){let t=YF(n),i=t;return n.eat(",")&&(i="}"!=n.next?YF(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:i,expr:e}}function qF(n,e){return e-n}function KF(n,e){let t=[];return function i(r){let o=n[r];if(1==o.length&&!o[0].term)return i(o[0].to);t.push(r);for(let s=0;s-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;ti[o]=new Zv(o,t,s));let r=t.spec.topNode||"doc";if(!i[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}}class vie{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Jv{constructor(e,t,i,r){this.name=e,this.rank=t,this.schema=i,this.spec=r,this.attrs=JF(r.attrs),this.excluded=null;let o=QF(this.attrs);this.instance=o?new On(this,o):null}create(e=null){return!e&&this.instance?this.instance:new On(this,ZF(this.attrs,e))}static compile(e,t){let i=Object.create(null),r=0;return e.forEach((o,s)=>i[o]=new Jv(o,r++,t,s)),i}removeFromSet(e){for(var t=0;t-1}}class bie{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=FF.from(e.nodes),t.marks=FF.from(e.marks||{}),this.nodes=Zv.compile(this.spec.nodes,this),this.marks=Jv.compile(this.spec.marks,this);let i=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let o=this.nodes[r],s=o.spec.content||"",a=o.spec.marks;o.contentMatch=i[s]||(i[s]=Gc.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?XF(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(let r in this.marks){let o=this.marks[r],s=o.spec.excludes;o.excluded=null==s?[o]:""==s?[]:XF(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,i,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Zv))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,i,r)}text(e,t){let i=this.nodes.text;return new Qv(i,i.defaultAttrs,e,On.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return js.fromJSON(this,e)}markFromJSON(e){return On.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function XF(n,e){let t=[];for(let i=0;i-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[i]+"'")}return t}class sh{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(i=>{i.tag?this.tags.push(i):i.style&&this.styles.push(i)}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let r=e.nodes[i.node];return r.contentMatch.matchType(r)})}parse(e,t={}){let i=new ij(this,t,!1);return i.addAll(e,t.from,t.to),i.finish()}parseSlice(e,t={}){let i=new ij(this,t,!0);return i.addAll(e,t.from,t.to),we.maxOpen(i.finish())}matchTag(e,t,i){for(let r=i?this.tags.indexOf(i)+1:0;re.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(s.getAttrs){let l=s.getAttrs(t);if(!1===l)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let t=[];function i(r){let o=null==r.priority?50:r.priority,s=0;for(;s{i(s=rj(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in e.nodes){let o=e.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=rj(s)),s.node||s.ignore||s.mark||(s.node=r)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new sh(e,sh.schemaRules(e)))}}const ej={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},wie={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tj={ol:!0,ul:!0};function nj(n,e,t){return null!=e?(e?1:0)|("full"===e?2:0):n&&"pre"==n.whitespace?3:-5&t}class tb{constructor(e,t,i,r,o,s,a){this.type=e,this.attrs=t,this.marks=i,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=On.none,this.stashMarks=[],this.match=s||(4&a?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(le.from(e));if(!t){let r,i=this.type.contentMatch;return(r=i.findWrapping(e.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let t=le.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(le.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,i=this.pendingMarks;t{s.clearMark(a)&&(i=a.addToSet(i))}):t=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(t),!1!==s.consuming)break;o=s}return[t,i]}addElementByRule(e,t,i){let r,o,s;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace)):(s=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=e;"string"==typeof t.contentElement?l=e.querySelector(t.contentElement):"function"==typeof t.contentElement?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l)}r&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(e,t,i){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,s=null==i?null:e.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,i;for(let r=this.open;r>=0;r--){let o=this.nodes[r],s=o.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,i=o,!s.length)||o.solid)break}if(!t)return!1;this.sync(i);for(let r=0;rthis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let i=this.nodes[t].content;for(let r=i.length-1;r>=0;r--)e+=i[r].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let i=0;i-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),i=this.options.context,r=!(this.isOpen||i&&i.parent.type!=this.nodes[0].type),o=(r?0:1)-(i?i.depth+1:0),s=(a,l)=>{for(;a>=0;a--){let c=t[a];if(""==c){if(a==t.length-1||0==a)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let u=l>0||0==l&&r?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!u||u.name!=c&&-1==u.groups.indexOf(c))return!1;l--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let t in this.parser.schema.nodes){let i=this.parser.schema.nodes[t];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(e){let t=function Sie(n,e){for(let t=0;t=0;i--){let r=this.nodes[i];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let s=r.popFromStashMark(e);s&&r.type&&r.type.allowsMarkType(s.type)&&(r.activeMarks=s.addToSet(r.activeMarks))}if(r==t)break}}}function Die(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function rj(n){let e={};for(let t in n)e[t]=n[t];return e}function Tie(n,e){let t=e.schema.nodes;for(let i in t){let r=t[i];if(!r.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l{if(o.length||s.marks.length){let a=0,l=0;for(;a=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(e,t,i={}){let r=this.marks[e.type.name];return r&&zs.renderSpec(t1(i),r(e,t))}static renderSpec(e,t,i=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r=t[0],o=r.indexOf(" ");o>0&&(i=r.slice(0,o),r=r.slice(o+1));let s,a=i?e.createElementNS(i,r):e.createElement(r),l=t[1],c=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)){c=2;for(let u in l)if(null!=l[u]){let d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:h,contentDOM:f}=zs.renderSpec(e,d,i);if(a.appendChild(h),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:a,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new zs(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=oj(e.nodes);return t.text||(t.text=i=>i.text),t}static marksFromSchema(e){return oj(e.marks)}}function oj(n){let e={};for(let t in n){let i=n[t].spec.toDOM;i&&(e[t]=i)}return e}function t1(n){return n.document||window.document}const aj=Math.pow(2,16);function Eie(n,e){return n+e*aj}function lj(n){return 65535&n}class n1{constructor(e,t,i){this.pos=e,this.delInfo=t,this.recover=i}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class Fo{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Fo.empty)return Fo.empty}recover(e){let t=0,i=lj(e);if(!this.inverted)for(let r=0;re)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){let f=l+r+((c?e==l?-1:e==d?1:t:t)<0?0:u);if(i)return f;let p=e==(t<0?l:d)?null:Eie(a/3,e-l),m=e==l?2:e==d?1:4;return(t<0?e!=l:e!=d)&&(m|=8),new n1(f,m,p)}r+=u-c}return i?e+r:new n1(e+r,0,null)}touches(e,t){let i=0,r=lj(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;ae)break;let c=this.ranges[a+o];if(e<=l+c&&a==3*r)return!0;i+=this.ranges[a+s]-c}return!1}forEach(e){let t=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?i-r-1:void 0)}}invert(){let e=new ah;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let i=this.from;io&&ls.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,r),t.openStart,t.openEnd);return ui.fromReplace(e,this.from,this.to,o)}invert(){return new Vs(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return t.deleted&&i.deleted||t.pos>=i.pos?null:new gl(t.pos,i.pos,this.mark)}merge(e){return e instanceof gl&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new gl(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new gl(t.from,t.to,e.markFromJSON(t.mark))}}ki.jsonID("addMark",gl);class Vs extends ki{constructor(e,t,i){super(),this.from=e,this.to=t,this.mark=i}apply(e){let t=e.slice(this.from,this.to),i=new we(o1(t.content,r=>r.mark(this.mark.removeFromSet(r.marks)),e),t.openStart,t.openEnd);return ui.fromReplace(e,this.from,this.to,i)}invert(){return new gl(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return t.deleted&&i.deleted||t.pos>=i.pos?null:new Vs(t.pos,i.pos,this.mark)}merge(e){return e instanceof Vs&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Vs(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Vs(t.from,t.to,e.markFromJSON(t.mark))}}ki.jsonID("removeMark",Vs);class yl extends ki{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ui.fail("No node at mark step's position");let i=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ui.fromReplace(e,this.pos,this.pos+1,new we(le.from(i),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let i=this.mark.addToSet(t.marks);if(i.length==t.marks.length){for(let r=0;ri.pos?null:new Ni(t.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ni(t.from,t.to,t.gapFrom,t.gapTo,we.fromJSON(e,t.slice),t.insert,!!t.structure)}}function s1(n,e,t){let i=n.resolve(e),r=t-e,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let s=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function kie(n,e,t){return(0==e||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function ch(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let i=n.depth;;--i){let r=n.$from.node(i),o=n.$from.index(i),s=n.$to.indexAfter(i);if(io;c--,u--){let d=r.node(c),h=r.index(c);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=i&&i[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=i&&i[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(f))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function _l(n,e){let t=n.resolve(e),i=t.index();return fj(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(i,i+1)}function fj(n,e){return!(!n||!e||n.isLeaf||!n.canAppend(e))}function pj(n,e,t=-1){let i=n.resolve(e);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):t>0?(o=i.node(r+1),a++,s=i.node(r).maybeChild(a)):(o=i.node(r).maybeChild(a-1),s=i.node(r+1)),o&&!o.isTextblock&&fj(o,s)&&i.node(r).canReplace(a,a+1))return e;if(0==r)break;e=t<0?i.before(r):i.after(r)}}function mj(n,e,t){let i=n.resolve(e);if(!t.content.size)return e;let r=t.content;for(let o=0;o=0;s--){let a=s==i.depth?0:i.pos<=(i.start(s+1)+i.end(s+1))/2?-1:1,l=i.index(s)+(a>0?1:0),c=i.node(s),u=!1;if(1==o)u=c.canReplace(l,l,r);else{let d=c.contentMatchAt(l).findWrapping(r.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return 0==a?i.pos:a<0?i.before(s+1):i.after(s+1)}return null}function l1(n,e,t=e,i=we.empty){if(e==t&&!i.size)return null;let r=n.resolve(e),o=n.resolve(t);return gj(r,o,i)?new sr(e,t,i):new Hie(r,o,i).fit()}function gj(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}ki.jsonID("replaceAround",Ni);class Hie{constructor(e,t,i){this.$from=e,this.$to=t,this.unplaced=i,this.frontier=[],this.placed=le.empty;for(let r=0;r<=e.depth;r++){let o=e.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=le.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(e<0?this.$to:i.doc.resolve(e));if(!r)return null;let o=this.placed,s=i.depth,a=r.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new we(o,s,a);return e>-1?new Ni(i.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||i.pos!=this.$to.pos?new sr(i.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,i=0,r=this.unplaced.openEnd;i1&&(r=0),o.type.spec.isolating&&r<=i){e=i;break}t=o.content}for(let t=1;t<=2;t++)for(let i=1==t?e:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=c1(this.unplaced.content,i-1).firstChild,r=o.content):r=this.unplaced.content;let s=r.firstChild;for(let a=this.depth;a>=0;a--){let u,{type:l,match:c}=this.frontier[a],d=null;if(1==t&&(s?c.matchType(s.type)||(d=c.fillBefore(le.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(2==t&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:i}=this.unplaced,r=c1(e,t);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new we(e,t+1,Math.max(i,r.size+t>=e.size-i?t+1:0)),0))}dropNode(){let{content:e,openStart:t,openEnd:i}=this.unplaced,r=c1(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new we(Jp(e,t-1,1),t-1,o?t-1:i)}else this.unplaced=new we(Jp(e,t,1),t,i)}placeNodes({sliceDepth:e,frontierDepth:t,parent:i,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let m=0;m1||0==l||m.content.size)&&(d=g,u.push(yj(m.mark(h.allowedMarks(m.marks)),1==c?l:0,c==a.childCount?f:-1)))}let p=c==a.childCount;p||(f=-1),this.placed=Xp(this.placed,t,le.from(u)),this.frontier[t].match=d,p&&f<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=a;m1&&r==this.$to.end(--i);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:i,type:r}=this.frontier[t],o=t=0;a--){let{match:l,type:c}=this.frontier[a],u=u1(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Xp(this.placed,t.depth,t.fit)),e=t.move;for(let i=t.depth+1;i<=e.depth;i++){let r=e.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(i));this.openFrontierNode(r.type,r.attrs,o)}return e}openFrontierNode(e,t=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Xp(this.placed,this.depth,le.from(e.create(t,i))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(le.empty,!0);t.childCount&&(this.placed=Xp(this.placed,this.frontier.length,t))}}function Jp(n,e,t){return 0==e?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Jp(n.firstChild.content,e-1,t)))}function Xp(n,e,t){return 0==e?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Xp(n.lastChild.content,e-1,t)))}function c1(n,e){for(let t=0;t1&&(i=i.replaceChild(0,yj(i.firstChild,e-1,1==i.childCount?t-1:0))),e>0&&(i=n.type.contentMatch.fillBefore(i).append(i),t<=0&&(i=i.append(n.type.contentMatch.matchFragment(i).fillBefore(le.empty,!0)))),n.copy(i)}function u1(n,e,t,i,r){let o=n.node(e),s=r?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!function $ie(n,e,t){for(let i=t;ii){let o=r.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(le.empty,!0))}return n}function vj(n,e){let t=[];for(let r=Math.min(n.depth,e.depth);r>=0;r--){let o=n.start(r);if(oe.pos+(e.depth-r)||n.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==n.depth&&r==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&t.push(r)}return t}class uh extends ki{constructor(e,t,i){super(),this.pos=e,this.attr=t,this.value=i}apply(e){let t=e.nodeAt(this.pos);if(!t)return ui.fail("No node at attribute step's position");let i=Object.create(null);for(let o in t.attrs)i[o]=t.attrs[o];i[this.attr]=this.value;let r=t.type.create(i,null,t.marks);return ui.fromReplace(e,this.pos,this.pos+1,new we(le.from(r),0,t.isLeaf?0:1))}getMap(){return Fo.empty}invert(e){return new uh(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new uh(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new uh(t.pos,t.attr,t.value)}}ki.jsonID("attr",uh);let dh=class extends Error{};dh=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},(dh.prototype=Object.create(Error.prototype)).constructor=dh,dh.prototype.name="TransformError";class d1{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ah}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new dh(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,i=we.empty){let r=l1(this.doc,e,t,i);return r&&this.step(r),this}replaceWith(e,t,i){return this.replace(e,t,new we(le.from(i),0,0))}delete(e,t){return this.replace(e,t,we.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,i){return function Gie(n,e,t,i){if(!i.size)return n.deleteRange(e,t);let r=n.doc.resolve(e),o=n.doc.resolve(t);if(gj(r,o,i))return n.step(new sr(e,t,i));let s=vj(r,n.doc.resolve(t));0==s[s.length-1]&&s.pop();let a=-(r.depth+1);s.unshift(a);for(let h=r.depth,f=r.pos-1;h>0;h--,f--){let p=r.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(h)>-1?a=h:r.before(h)==f&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=i.openStart;for(let h=i.content,f=0;;f++){let p=h.firstChild;if(c.push(p),f==i.openStart)break;h=p.content}for(let h=u-1;h>=0;h--){let f=c[h].type,p=Wie(f);if(p&&r.node(l).type!=f)u=h;else if(p||!f.isTextblock)break}for(let h=i.openStart;h>=0;h--){let f=(h+u+1)%(i.openStart+1),p=c[f];if(p)for(let m=0;m=0&&(n.replace(e,t,i),!(n.steps.length>d));h--){let f=s[h];f<0||(e=r.before(f),t=o.after(f))}}(this,e,t,i),this}replaceRangeWith(e,t,i){return function Yie(n,e,t,i){if(!i.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let r=function Uie(n,e,t){let i=n.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),t))return e;if(0==i.parentOffset)for(let r=i.depth-1;r>=0;r--){let o=i.index(r);if(i.node(r).canReplaceWith(o,o,t))return i.before(r+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let r=i.depth-1;r>=0;r--){let o=i.indexAfter(r);if(i.node(r).canReplaceWith(o,o,t))return i.after(r+1);if(o0&&(l||i.node(a-1).canReplace(i.index(a-1),r.indexAfter(a-1))))return n.delete(i.before(a),r.after(a))}for(let s=1;s<=i.depth&&s<=r.depth;s++)if(e-i.start(s)==i.depth-s&&t>i.end(s)&&r.end(s)-t!=r.depth-s)return n.delete(i.before(s),t);n.delete(e,t)}(this,e,t),this}lift(e,t){return function Nie(n,e,t){let{$from:i,$to:r,depth:o}=e,s=i.before(o+1),a=r.after(o+1),l=s,c=a,u=le.empty,d=0;for(let p=o,m=!1;p>t;p--)m||i.index(p)>0?(m=!0,u=le.from(i.node(p).copy(u)),d++):l--;let h=le.empty,f=0;for(let p=o,m=!1;p>t;p--)m||r.after(p+1)=0;s--){if(i.size){let a=t[s].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=le.from(t[s].type.create(t[s].attrs,i))}let r=e.start,o=e.end;n.step(new Ni(r,o,r,o,new we(i,0,0),t.length,!0))}(this,e,t),this}setBlockType(e,t=e,i,r=null){return function Fie(n,e,t,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(i,r)&&function jie(n,e,t){let i=n.resolve(e),r=i.index();return i.parent.canReplaceWith(r,r+1,t)}(n.doc,n.mapping.slice(o).map(a),i)){n.clearIncompatible(n.mapping.slice(o).map(a,1),i);let l=n.mapping.slice(o),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return n.step(new Ni(c,u,c+1,u-1,new we(le.from(i.create(r,null,s.marks)),0,0),1,!0)),!1}})}(this,e,t,i,r),this}setNodeMarkup(e,t,i=null,r){return function zie(n,e,t,i,r){let o=n.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);let s=t.create(i,null,r||o.marks);if(o.isLeaf)return n.replaceWith(e,e+o.nodeSize,s);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new Ni(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new we(le.from(s),0,0),1,!0))}(this,e,t,i,r),this}setNodeAttribute(e,t,i){return this.step(new uh(e,t,i)),this}addNodeMark(e,t){return this.step(new yl(e,t)),this}removeNodeMark(e,t){if(!(t instanceof On)){let i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(i.marks)))return this}return this.step(new lh(e,t)),this}split(e,t=1,i){return function Vie(n,e,t=1,i){let r=n.doc.resolve(e),o=le.empty,s=le.empty;for(let a=r.depth,l=r.depth-t,c=t-1;a>l;a--,c--){o=le.from(r.node(a).copy(o));let u=i&&i[c];s=le.from(u?u.type.create(u.attrs,s):r.node(a).copy(s))}n.step(new sr(e,e,new we(o.append(s),t,t),!0))}(this,e,t,i),this}addMark(e,t,i){return function Iie(n,e,t,i){let s,a,r=[],o=[];n.doc.nodesBetween(e,t,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&u.type.allowsMarkType(i.type)){let h=Math.max(c,e),f=Math.min(c+l.nodeSize,t),p=i.addToSet(d);for(let m=0;mn.step(l)),o.forEach(l=>n.step(l))}(this,e,t,i),this}removeMark(e,t,i){return function Oie(n,e,t,i){let r=[],o=0;n.doc.nodesBetween(e,t,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof Jv){let u,c=s.marks;for(;u=i.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else i?i.isInSet(s.marks)&&(l=[i]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,t);for(let u=0;un.step(new Vs(s.from,s.to,s.style)))}(this,e,t,i),this}clearIncompatible(e,t,i){return function Aie(n,e,t,i=t.contentMatch){let r=n.doc.nodeAt(e),o=[],s=e+1;for(let a=0;a=0;a--)n.step(o[a])}(this,e,t,i),this}}const h1=Object.create(null);class nt{constructor(e,t,i){this.$anchor=e,this.$head=t,this.ranges=i||[new bj(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;o--){let s=t<0?hh(e.node(0),e.node(o),e.before(o+1),e.index(o),t,i):hh(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,i);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new yo(e.node(0))}static atStart(e){return hh(e,e,0,0,1)||new yo(e)}static atEnd(e){return hh(e,e,e.content.size,e.childCount,-1)||new yo(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=h1[t.type];if(!i)throw new RangeError(`No selection type ${t.type} defined`);return i.fromJSON(e,t)}static jsonID(e,t){if(e in h1)throw new RangeError("Duplicate use of selection JSON ID "+e);return h1[e]=t,t.prototype.jsonID=e,t}getBookmark(){return it.between(this.$anchor,this.$head).getBookmark()}}nt.prototype.visible=!0;class bj{constructor(e,t){this.$from=e,this.$to=t}}let wj=!1;function Cj(n){!wj&&!n.parent.inlineContent&&(wj=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class it extends nt{constructor(e,t=e){Cj(e),Cj(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let i=e.resolve(t.map(this.head));if(!i.parent.inlineContent)return nt.near(i);let r=e.resolve(t.map(this.anchor));return new it(r.parent.inlineContent?r:i,i)}replace(e,t=we.empty){if(super.replace(e,t),t==we.empty){let i=this.$from.marksAcross(this.$to);i&&e.ensureMarks(i)}}eq(e){return e instanceof it&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new ib(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new it(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,i=t){let r=e.resolve(t);return new this(r,i==t?r:e.resolve(i))}static between(e,t,i){let r=e.pos-t.pos;if((!i||r)&&(i=r>=0?1:-1),!t.parent.inlineContent){let o=nt.findFrom(t,i,!0)||nt.findFrom(t,-i,!0);if(!o)return nt.near(t,i);t=o.$head}return e.parent.inlineContent||(0==r||(e=(nt.findFrom(e,-i,!0)||nt.findFrom(e,i,!0)).$anchor).posnew yo(n)};function hh(n,e,t,i,r,o=!1){if(e.inlineContent)return it.create(n,t);for(let s=i-(r>0?0:1);r>0?s=0;s+=r){let a=e.child(s);if(a.isAtom){if(!o&&Ye.isSelectable(a))return Ye.create(n,t-(r<0?a.nodeSize:0))}else{let l=hh(n,a,t+r,r<0?a.childCount:0,r,o);if(l)return l}t+=a.nodeSize*r}return null}function Dj(n,e,t){let i=n.steps.length-1;if(i{null==s&&(s=u)}),n.setSelection(nt.near(n.doc.resolve(s),t)))}class Qie extends d1{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return On.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let i=this.selection;return t&&(e=e.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||On.none))),i.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,i){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==i&&(i=t),i=i??t,!e)return this.deleteRange(t,i);let o=this.storedMarks;if(!o){let s=this.doc.resolve(t);o=i==t?s.marks():s.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(t,i,r.text(e,o)),this.selection.empty||this.setSelection(nt.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Sj(n,e){return e&&n?n.bind(e):n}class em{constructor(e,t,i){this.name=e,this.init=Sj(t.init,i),this.apply=Sj(t.apply,i)}}const Zie=[new em("doc",{init:n=>n.doc||n.schema.topNodeType.createAndFill(),apply:n=>n.doc}),new em("selection",{init:(n,e)=>n.selection||nt.atStart(e.doc),apply:n=>n.selection}),new em("storedMarks",{init:n=>n.storedMarks||null,apply:(n,e,t,i)=>i.selection.$cursor?n.storedMarks:null}),new em("scrollToSelection",{init:()=>0,apply:(n,e)=>n.scrolledIntoView?e+1:e})];class p1{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Zie.slice(),t&&t.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new em(i.key,i.spec.state,i))})}}class fh{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let i=0;ii.toJSON())),e&&"object"==typeof e)for(let i in e){if("doc"==i||"selection"==i)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[i],o=r.spec.state;o&&o.toJSON&&(t[i]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,i){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new p1(e.schema,e.plugins),o=new fh(r);return r.fields.forEach(s=>{if("doc"==s.name)o.doc=js.fromJSON(e.schema,t.doc);else if("selection"==s.name)o.selection=nt.fromJSON(o.doc,t.selection);else if("storedMarks"==s.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,a))return void(o[s.name]=c.fromJSON.call(l,e,t[a],o))}o[s.name]=s.init(e,o)}}),o}}function Ej(n,e,t){for(let i in n){let r=n[i];r instanceof Function?r=r.bind(e):"handleDOMEvents"==i&&(r=Ej(r,e,{})),t[i]=r}return t}class $t{constructor(e){this.spec=e,this.props={},e.props&&Ej(e.props,this,this.props),this.key=e.key?e.key.key:xj("plugin")}getState(e){return e[this.key]}}const m1=Object.create(null);function xj(n){return n in m1?n+"$"+ ++m1[n]:(m1[n]=0,n+"$")}class rn{constructor(e="key"){this.key=xj(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}function _o(n){if(null==n)return window;if("[object Window]"!==n.toString()){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Yc(n){return n instanceof _o(n).Element||n instanceof Element}function jo(n){return n instanceof _o(n).HTMLElement||n instanceof HTMLElement}function g1(n){return!(typeof ShadowRoot>"u")&&(n instanceof _o(n).ShadowRoot||n instanceof ShadowRoot)}var qc=Math.max,ob=Math.min,ph=Math.round;function y1(){var n=navigator.userAgentData;return null!=n&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Ij(){return!/^((?!chrome|android).)*safari/i.test(y1())}function mh(n,e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var i=n.getBoundingClientRect(),r=1,o=1;e&&jo(n)&&(r=n.offsetWidth>0&&ph(i.width)/n.offsetWidth||1,o=n.offsetHeight>0&&ph(i.height)/n.offsetHeight||1);var a=(Yc(n)?_o(n):window).visualViewport,l=!Ij()&&t,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,h=i.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function _1(n){var e=_o(n);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Bs(n){return n?(n.nodeName||"").toLowerCase():null}function vl(n){return((Yc(n)?n.ownerDocument:n.document)||window.document).documentElement}function v1(n){return mh(vl(n)).left+_1(n).scrollLeft}function Na(n){return _o(n).getComputedStyle(n)}function b1(n){var e=Na(n);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function tre(n,e,t){void 0===t&&(t=!1);var i=jo(e),r=jo(e)&&function ere(n){var e=n.getBoundingClientRect(),t=ph(e.width)/n.offsetWidth||1,i=ph(e.height)/n.offsetHeight||1;return 1!==t||1!==i}(e),o=vl(e),s=mh(n,r,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&(("body"!==Bs(e)||b1(o))&&(a=function Xie(n){return n!==_o(n)&&jo(n)?function Jie(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):_1(n)}(e)),jo(e)?((l=mh(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=v1(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function w1(n){var e=mh(n),t=n.offsetWidth,i=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:i}}function sb(n){return"html"===Bs(n)?n:n.assignedSlot||n.parentNode||(g1(n)?n.host:null)||vl(n)}function Oj(n){return["html","body","#document"].indexOf(Bs(n))>=0?n.ownerDocument.body:jo(n)&&b1(n)?n:Oj(sb(n))}function tm(n,e){var t;void 0===e&&(e=[]);var i=Oj(n),r=i===(null==(t=n.ownerDocument)?void 0:t.body),o=_o(i),s=r?[o].concat(o.visualViewport||[],b1(i)?i:[]):i,a=e.concat(s);return r?a:a.concat(tm(sb(s)))}function nre(n){return["table","td","th"].indexOf(Bs(n))>=0}function Aj(n){return jo(n)&&"fixed"!==Na(n).position?n.offsetParent:null}function nm(n){for(var e=_o(n),t=Aj(n);t&&nre(t)&&"static"===Na(t).position;)t=Aj(t);return t&&("html"===Bs(t)||"body"===Bs(t)&&"static"===Na(t).position)?e:t||function ire(n){var e=/firefox/i.test(y1());if(/Trident/i.test(y1())&&jo(n)&&"fixed"===Na(n).position)return null;var r=sb(n);for(g1(r)&&(r=r.host);jo(r)&&["html","body"].indexOf(Bs(r))<0;){var o=Na(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||e&&"filter"===o.willChange||e&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(n)||e}var Yr="top",zo="bottom",Vo="right",qr="left",C1="auto",im=[Yr,zo,Vo,qr],gh="start",rm="end",kj="viewport",om="popper",Nj=im.reduce(function(n,e){return n.concat([e+"-"+gh,e+"-"+rm])},[]),Pj=[].concat(im,[C1]).reduce(function(n,e){return n.concat([e,e+"-"+gh,e+"-"+rm])},[]),mre=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function gre(n){var e=new Map,t=new Set,i=[];function r(o){t.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&r(l)}}),i.push(o)}return n.forEach(function(o){e.set(o.name,o)}),n.forEach(function(o){t.has(o.name)||r(o)}),i}function _re(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}var Lj={placement:"bottom",modifiers:[],strategy:"absolute"};function Rj(){for(var n=arguments.length,e=new Array(n),t=0;t=0?"x":"y"}function Fj(n){var l,e=n.reference,t=n.element,i=n.placement,r=i?Us(i):null,o=i?yh(i):null,s=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2;switch(r){case Yr:l={x:s,y:e.y-t.height};break;case zo:l={x:s,y:e.y+e.height};break;case Vo:l={x:e.x+e.width,y:a};break;case qr:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=r?D1(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case gh:l[c]=l[c]-(e[u]/2-t[u]/2);break;case rm:l[c]=l[c]+(e[u]/2-t[u]/2)}}return l}const Mre={name:"popperOffsets",enabled:!0,phase:"read",fn:function Dre(n){var e=n.state;e.modifiersData[n.name]=Fj({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var Tre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function jj(n){var e,t=n.popper,i=n.popperRect,r=n.placement,o=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,h=s.x,f=void 0===h?0:h,p=s.y,m=void 0===p?0:p,g="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),w=qr,_=Yr,N=window;if(c){var T=nm(t),ne="clientHeight",K="clientWidth";T===_o(t)&&"static"!==Na(T=vl(t)).position&&"absolute"===a&&(ne="scrollHeight",K="scrollWidth"),(r===Yr||(r===qr||r===Vo)&&o===rm)&&(_=zo,m-=(d&&T===N&&N.visualViewport?N.visualViewport.height:T[ne])-i.height,m*=l?1:-1),r!==qr&&(r!==Yr&&r!==zo||o!==rm)||(w=Vo,f-=(d&&T===N&&N.visualViewport?N.visualViewport.width:T[K])-i.width,f*=l?1:-1)}var ot,gt=Object.assign({position:a},c&&Tre),at=!0===u?function Sre(n,e){var i=n.y,r=e.devicePixelRatio||1;return{x:ph(n.x*r)/r||0,y:ph(i*r)/r||0}}({x:f,y:m},_o(t)):{x:f,y:m};return f=at.x,m=at.y,Object.assign({},gt,l?((ot={})[_]=v?"0":"",ot[w]=y?"0":"",ot.transform=(N.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",ot):((e={})[_]=v?m+"px":"",e[w]=y?f+"px":"",e.transform="",e))}const xre={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function Ere(n){var e=n.state,t=n.options,i=t.gpuAcceleration,r=void 0===i||i,o=t.adaptive,s=void 0===o||o,a=t.roundOffsets,l=void 0===a||a,c={placement:Us(e.placement),variation:yh(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,jj(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,jj(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},zj={name:"applyStyles",enabled:!0,phase:"write",fn:function Ire(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},r=e.attributes[t]||{},o=e.elements[t];!jo(o)||!Bs(o)||(Object.assign(o.style,i),Object.keys(r).forEach(function(s){var a=r[s];!1===a?o.removeAttribute(s):o.setAttribute(s,!0===a?"":a)}))})},effect:function Ore(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var r=e.elements[i],o=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]).reduce(function(l,c){return l[c]="",l},{});!jo(r)||!Bs(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}},requires:["computeStyles"]},Nre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function kre(n){var e=n.state,i=n.name,r=n.options.offset,o=void 0===r?[0,0]:r,s=Pj.reduce(function(u,d){return u[d]=function Are(n,e,t){var i=Us(n),r=[qr,Yr].indexOf(i)>=0?-1:1,o="function"==typeof t?t(Object.assign({},e,{placement:n})):t,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[qr,Vo].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,e.rects,o),u},{}),a=s[e.placement],c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a.x,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=s}};var Pre={left:"right",right:"left",bottom:"top",top:"bottom"};function lb(n){return n.replace(/left|right|bottom|top/g,function(e){return Pre[e]})}var Lre={start:"end",end:"start"};function Vj(n){return n.replace(/start|end/g,function(e){return Lre[e]})}function Bj(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&g1(t)){var i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function M1(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Uj(n,e,t){return e===kj?M1(function Rre(n,e){var t=_o(n),i=vl(n),r=t.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=Ij();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+v1(n),y:l}}(n,t)):Yc(e)?function jre(n,e){var t=mh(n,!1,"fixed"===e);return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}(e,t):M1(function Fre(n){var e,t=vl(n),i=_1(n),r=null==(e=n.ownerDocument)?void 0:e.body,o=qc(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=qc(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+v1(n),l=-i.scrollTop;return"rtl"===Na(r||t).direction&&(a+=qc(t.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(vl(n)))}function $j(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function Wj(n,e){return e.reduce(function(t,i){return t[i]=n,t},{})}function sm(n,e){void 0===e&&(e={});var i=e.placement,r=void 0===i?n.placement:i,o=e.strategy,s=void 0===o?n.strategy:o,a=e.boundary,l=void 0===a?"clippingParents":a,c=e.rootBoundary,u=void 0===c?kj:c,d=e.elementContext,h=void 0===d?om:d,f=e.altBoundary,p=void 0!==f&&f,m=e.padding,g=void 0===m?0:m,y=$j("number"!=typeof g?g:Wj(g,im)),w=n.rects.popper,_=n.elements[p?h===om?"reference":om:h],N=function Vre(n,e,t,i){var r="clippingParents"===e?function zre(n){var e=tm(sb(n)),i=["absolute","fixed"].indexOf(Na(n).position)>=0&&jo(n)?nm(n):n;return Yc(i)?e.filter(function(r){return Yc(r)&&Bj(r,i)&&"body"!==Bs(r)}):[]}(n):[].concat(e),o=[].concat(r,[t]),a=o.reduce(function(l,c){var u=Uj(n,c,i);return l.top=qc(u.top,l.top),l.right=ob(u.right,l.right),l.bottom=ob(u.bottom,l.bottom),l.left=qc(u.left,l.left),l},Uj(n,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(Yc(_)?_:_.contextElement||vl(n.elements.popper),l,u,s),T=mh(n.elements.reference),ne=Fj({reference:T,element:w,strategy:"absolute",placement:r}),K=M1(Object.assign({},w,ne)),Ne=h===om?K:T,He={top:N.top-Ne.top+y.top,bottom:Ne.bottom-N.bottom+y.bottom,left:N.left-Ne.left+y.left,right:Ne.right-N.right+y.right},gt=n.modifiersData.offset;if(h===om&>){var at=gt[r];Object.keys(He).forEach(function(ot){var pn=[Vo,zo].indexOf(ot)>=0?1:-1,St=[Yr,zo].indexOf(ot)>=0?"y":"x";He[ot]+=at[St]*pn})}return He}const $re={name:"flip",enabled:!0,phase:"main",fn:function Hre(n){var e=n.state,t=n.options,i=n.name;if(!e.modifiersData[i]._skip){for(var r=t.mainAxis,o=void 0===r||r,s=t.altAxis,a=void 0===s||s,l=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,h=t.altBoundary,f=t.flipVariations,p=void 0===f||f,m=t.allowedAutoPlacements,g=e.options.placement,y=Us(g),w=l||(y!==g&&p?function Ure(n){if(Us(n)===C1)return[];var e=lb(n);return[Vj(n),e,Vj(e)]}(g):[lb(g)]),_=[g].concat(w).reduce(function(Rt,Yi){return Rt.concat(Us(Yi)===C1?function Bre(n,e){void 0===e&&(e={});var r=e.boundary,o=e.rootBoundary,s=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,c=void 0===l?Pj:l,u=yh(e.placement),d=u?a?Nj:Nj.filter(function(p){return yh(p)===u}):im,h=d.filter(function(p){return c.indexOf(p)>=0});0===h.length&&(h=d);var f=h.reduce(function(p,m){return p[m]=sm(n,{placement:m,boundary:r,rootBoundary:o,padding:s})[Us(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}(e,{placement:Yi,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):Yi)},[]),N=e.rects.reference,T=e.rects.popper,ne=new Map,K=!0,Ne=_[0],He=0;He<_.length;He++){var gt=_[He],at=Us(gt),ot=yh(gt)===gh,pn=[Yr,zo].indexOf(at)>=0,St=pn?"width":"height",ae=sm(e,{placement:gt,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),fe=pn?ot?Vo:qr:ot?zo:Yr;N[St]>T[St]&&(fe=lb(fe));var be=lb(fe),Ue=[];if(o&&Ue.push(ae[at]<=0),a&&Ue.push(ae[fe]<=0,ae[be]<=0),Ue.every(function(Rt){return Rt})){Ne=gt,K=!1;break}ne.set(gt,Ue)}if(K)for(var ln=function(Yi){var eo=_.find(function(En){var Wt=ne.get(En);if(Wt)return Wt.slice(0,Yi).every(function(ct){return ct})});if(eo)return Ne=eo,"break"},zt=p?3:1;zt>0&&"break"!==ln(zt);zt--);e.placement!==Ne&&(e.modifiersData[i]._skip=!0,e.placement=Ne,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function am(n,e,t){return qc(n,ob(e,t))}const qre={name:"preventOverflow",enabled:!0,phase:"main",fn:function Yre(n){var e=n.state,t=n.options,i=n.name,r=t.mainAxis,o=void 0===r||r,s=t.altAxis,a=void 0!==s&&s,h=t.tether,f=void 0===h||h,p=t.tetherOffset,m=void 0===p?0:p,g=sm(e,{boundary:t.boundary,rootBoundary:t.rootBoundary,padding:t.padding,altBoundary:t.altBoundary}),y=Us(e.placement),v=yh(e.placement),w=!v,_=D1(y),N=function Wre(n){return"x"===n?"y":"x"}(_),T=e.modifiersData.popperOffsets,ne=e.rects.reference,K=e.rects.popper,Ne="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,He="number"==typeof Ne?{mainAxis:Ne,altAxis:Ne}:Object.assign({mainAxis:0,altAxis:0},Ne),gt=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,at={x:0,y:0};if(T){if(o){var ot,pn="y"===_?Yr:qr,St="y"===_?zo:Vo,ae="y"===_?"height":"width",fe=T[_],be=fe+g[pn],Ue=fe-g[St],It=f?-K[ae]/2:0,ln=v===gh?ne[ae]:K[ae],zt=v===gh?-K[ae]:-ne[ae],Sn=e.elements.arrow,Rt=f&&Sn?w1(Sn):{width:0,height:0},Yi=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},eo=Yi[pn],En=Yi[St],Wt=am(0,ne[ae],Rt[ae]),ct=w?ne[ae]/2-It-Wt-eo-He.mainAxis:ln-Wt-eo-He.mainAxis,Fn=w?-ne[ae]/2+It+Wt+En+He.mainAxis:zt+Wt+En+He.mainAxis,Ar=e.elements.arrow&&nm(e.elements.arrow),ql=null!=(ot=gt?.[_])?ot:0,Au=fe+Fn-ql,Hg=am(f?ob(be,fe+ct-ql-(Ar?"y"===_?Ar.clientTop||0:Ar.clientLeft||0:0)):be,fe,f?qc(Ue,Au):Ue);T[_]=Hg,at[_]=Hg-fe}if(a){var $g,Ua=T[N],Ql="y"===N?"height":"width",Wg=Ua+g["x"===_?Yr:qr],ku=Ua-g["x"===_?zo:Vo],Gg=-1!==[Yr,qr].indexOf(y),q0=null!=($g=gt?.[N])?$g:0,K0=Gg?Wg:Ua-ne[Ql]-K[Ql]-q0+He.altAxis,Q0=Gg?Ua+ne[Ql]+K[Ql]-q0-He.altAxis:ku,Z0=f&&Gg?function Gre(n,e,t){var i=am(n,e,t);return i>t?t:i}(K0,Ua,Q0):am(f?K0:Wg,Ua,f?Q0:ku);T[N]=Z0,at[N]=Z0-Ua}e.modifiersData[i]=at}},requiresIfExists:["offset"]},Jre={name:"arrow",enabled:!0,phase:"main",fn:function Qre(n){var e,t=n.state,i=n.name,r=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,a=Us(t.placement),l=D1(a),u=[qr,Vo].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(e,t){return $j("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Wj(e,im))}(r.padding,t),h=w1(o),f="y"===l?Yr:qr,p="y"===l?zo:Vo,m=t.rects.reference[u]+t.rects.reference[l]-s[l]-t.rects.popper[u],g=s[l]-t.rects.reference[l],y=nm(o),v=y?"y"===l?y.clientHeight||0:y.clientWidth||0:0,T=v/2-h[u]/2+(m/2-g/2),ne=am(d[f],T,v-h[u]-d[p]);t.modifiersData[i]=((e={})[l]=ne,e.centerOffset=ne-T,e)}},effect:function Zre(n){var e=n.state,i=n.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=e.elements.popper.querySelector(r))||Bj(e.elements.popper,r)&&(e.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Gj(n,e,t){return void 0===t&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function Yj(n){return[Yr,Vo,zo,qr].some(function(e){return n[e]>=0})}var eoe=[Cre,Mre,xre,zj,Nre,$re,qre,Jre,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function Xre(n){var e=n.state,t=n.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=sm(e,{elementContext:"reference"}),a=sm(e,{altBoundary:!0}),l=Gj(s,i),c=Gj(a,r,o),u=Yj(l),d=Yj(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],toe=bre({defaultModifiers:eoe}),qj="tippy-content",Qj="tippy-arrow",Zj="tippy-svg-arrow",bl={passive:!0,capture:!0},Jj=function(){return document.body};function T1(n,e,t){return Array.isArray(n)?n[e]??(Array.isArray(t)?t[e]:t):n}function S1(n,e){var t={}.toString.call(n);return 0===t.indexOf("[object")&&t.indexOf(e+"]")>-1}function Xj(n,e){return"function"==typeof n?n.apply(void 0,e):n}function e3(n,e){return 0===e?n:function(i){clearTimeout(t),t=setTimeout(function(){n(i)},e)};var t}function wl(n){return[].concat(n)}function t3(n,e){-1===n.indexOf(e)&&n.push(e)}function _h(n){return[].slice.call(n)}function r3(n){return Object.keys(n).reduce(function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e},{})}function Kc(){return document.createElement("div")}function cb(n){return["Element","Fragment"].some(function(e){return S1(n,e)})}function I1(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function lm(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function O1(n,e,t){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){n[i](r,t)})}function a3(n,e){for(var t=e;t;){var i;if(n.contains(t))return!0;t=null==t.getRootNode||null==(i=t.getRootNode())?void 0:i.host}return!1}var Hs={isTouch:!1},l3=0;function coe(){Hs.isTouch||(Hs.isTouch=!0,window.performance&&document.addEventListener("mousemove",c3))}function c3(){var n=performance.now();n-l3<20&&(Hs.isTouch=!1,document.removeEventListener("mousemove",c3)),l3=n}function uoe(){var n=document.activeElement;(function o3(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var foe=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,Kr=Object.assign({appendTo:Jj,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),yoe=Object.keys(Kr);function p3(n){var t=(n.plugins||[]).reduce(function(i,r){var a,o=r.name;return o&&(i[o]=void 0!==n[o]?n[o]:null!=(a=Kr[o])?a:r.defaultValue),i},{});return Object.assign({},n,t)}function m3(n,e){var t=Object.assign({},e,{content:Xj(e.content,[n])},e.ignoreAttributes?{}:function voe(n,e){return(e?Object.keys(p3(Object.assign({},Kr,{plugins:e}))):yoe).reduce(function(r,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return r;if("content"===o)r[o]=s;else try{r[o]=JSON.parse(s)}catch{r[o]=s}return r},{})}(n,e.plugins));return t.aria=Object.assign({},Kr.aria,t.aria),t.aria={expanded:"auto"===t.aria.expanded?e.interactive:t.aria.expanded,content:"auto"===t.aria.content?e.interactive?null:"describedby":t.aria.content},t}function A1(n,e){n.innerHTML=e}function g3(n){var e=Kc();return!0===n?e.className=Qj:(e.className=Zj,cb(n)?e.appendChild(n):A1(e,n)),e}function y3(n,e){cb(e.content)?(A1(n,""),n.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?A1(n,e.content):n.textContent=e.content)}function ub(n){var e=n.firstElementChild,t=_h(e.children);return{box:e,content:t.find(function(i){return i.classList.contains(qj)}),arrow:t.find(function(i){return i.classList.contains(Qj)||i.classList.contains(Zj)}),backdrop:t.find(function(i){return i.classList.contains("tippy-backdrop")})}}function _3(n){var e=Kc(),t=Kc();t.className="tippy-box",t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var i=Kc();function r(o,s){var a=ub(e),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),"string"==typeof s.animation?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&y3(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(g3(s.arrow))):l.appendChild(g3(s.arrow)):u&&l.removeChild(u)}return i.className=qj,i.setAttribute("data-state","hidden"),y3(i,n.props),e.appendChild(t),t.appendChild(i),r(n.props,n.props),{popper:e,onUpdate:r}}_3.$$tippy=!0;var woe=1,db=[],hb=[];function Coe(n,e){var i,r,o,u,d,h,m,t=m3(n,Object.assign({},Kr,p3(r3(e)))),s=!1,a=!1,l=!1,c=!1,f=[],p=e3(Kl,t.interactiveDebounce),g=woe++,v=function ooe(n){return n.filter(function(e,t){return n.indexOf(e)===t})}(t.plugins),_={id:g,reference:n,popper:Kc(),popperInstance:null,props:t,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function K0(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function Q0(J){if(!_.state.isDestroyed){be("onBeforeUpdate",[_,J]),Ou();var $e=_.props,ut=m3(n,Object.assign({},$e,r3(J),{ignoreAttributes:!0}));_.props=ut,Ar(),$e.interactiveDebounce!==ut.interactiveDebounce&&(ln(),p=e3(Kl,ut.interactiveDebounce)),$e.triggerTarget&&!ut.triggerTarget?wl($e.triggerTarget).forEach(function(wn){wn.removeAttribute("aria-expanded")}):ut.triggerTarget&&n.removeAttribute("aria-expanded"),It(),fe(),ne&&ne($e,ut),_.popperInstance&&(G0(),Ql().forEach(function(wn){requestAnimationFrame(wn._tippy.popperInstance.forceUpdate)})),be("onAfterUpdate",[_,J])}},setContent:function Z0(J){_.setProps({content:J})},show:function ewe(){var J=_.state.isVisible,$e=_.state.isDestroyed,ut=!_.state.isEnabled,wn=Hs.isTouch&&!_.props.touch,cn=T1(_.props.duration,0,Kr.duration);if(!(J||$e||ut||wn||ot().hasAttribute("disabled")||(be("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,at()&&(T.style.visibility="visible"),fe(),Yi(),_.state.isMounted||(T.style.transition="none"),at()){var kr=St();I1([kr.box,kr.content],0)}h=function(){var Nu;if(_.state.isVisible&&!c){if(c=!0,T.style.transition=_.props.moveTransition,at()&&_.props.animation){var SE=St(),J0=SE.box,rf=SE.content;I1([J0,rf],cn),lm([J0,rf],"visible")}Ue(),It(),t3(hb,_),null==(Nu=_.popperInstance)||Nu.forceUpdate(),be("onMount",[_]),_.props.animation&&at()&&function Wt(J,$e){ct(J,$e)}(cn,function(){_.state.isShown=!0,be("onShown",[_])})}},function Ua(){var $e,J=_.props.appendTo,ut=ot();($e=_.props.interactive&&J===Jj||"parent"===J?ut.parentNode:Xj(J,[ut])).contains(T)||$e.appendChild(T),_.state.isMounted=!0,G0()}()}},hide:function twe(){var J=!_.state.isVisible,$e=_.state.isDestroyed,ut=!_.state.isEnabled,wn=T1(_.props.duration,1,Kr.duration);if(!(J||$e||ut)&&(be("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,c=!1,s=!1,at()&&(T.style.visibility="hidden"),ln(),eo(),fe(!0),at()){var cn=St(),kr=cn.box,qo=cn.content;_.props.animation&&(I1([kr,qo],wn),lm([kr,qo],"hidden"))}Ue(),It(),_.props.animation?at()&&function En(J,$e){ct(J,function(){!_.state.isVisible&&T.parentNode&&T.parentNode.contains(T)&&$e()})}(wn,_.unmount):_.unmount()}},hideWithInteractivity:function nwe(J){pn().addEventListener("mousemove",p),t3(db,p),p(J)},enable:function Gg(){_.state.isEnabled=!0},disable:function q0(){_.hide(),_.state.isEnabled=!1},unmount:function iwe(){_.state.isVisible&&_.hide(),_.state.isMounted&&(Y0(),Ql().forEach(function(J){J._tippy.unmount()}),T.parentNode&&T.parentNode.removeChild(T),hb=hb.filter(function(J){return J!==_}),_.state.isMounted=!1,be("onHidden",[_]))},destroy:function rwe(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),Ou(),delete n._tippy,_.state.isDestroyed=!0,be("onDestroy",[_]))}};if(!t.render)return _;var N=t.render(_),T=N.popper,ne=N.onUpdate;T.setAttribute("data-tippy-root",""),T.id="tippy-"+_.id,_.popper=T,n._tippy=_,T._tippy=_;var K=v.map(function(J){return J.fn(_)}),Ne=n.hasAttribute("aria-expanded");return Ar(),It(),fe(),be("onCreate",[_]),t.showOnCreate&&Wg(),T.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),T.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&pn().addEventListener("mousemove",p)}),_;function He(){var J=_.props.touch;return Array.isArray(J)?J:[J,0]}function gt(){return"hold"===He()[0]}function at(){var J;return!(null==(J=_.props.render)||!J.$$tippy)}function ot(){return m||n}function pn(){var J=ot().parentNode;return J?function s3(n){var e,i=wl(n)[0];return null!=i&&null!=(e=i.ownerDocument)&&e.body?i.ownerDocument:document}(J):document}function St(){return ub(T)}function ae(J){return _.state.isMounted&&!_.state.isVisible||Hs.isTouch||u&&"focus"===u.type?0:T1(_.props.delay,J?0:1,Kr.delay)}function fe(J){void 0===J&&(J=!1),T.style.pointerEvents=_.props.interactive&&!J?"":"none",T.style.zIndex=""+_.props.zIndex}function be(J,$e,ut){var wn;void 0===ut&&(ut=!0),K.forEach(function(cn){cn[J]&&cn[J].apply(cn,$e)}),ut&&(wn=_.props)[J].apply(wn,$e)}function Ue(){var J=_.props.aria;if(J.content){var $e="aria-"+J.content,ut=T.id;wl(_.props.triggerTarget||n).forEach(function(cn){var kr=cn.getAttribute($e);if(_.state.isVisible)cn.setAttribute($e,kr?kr+" "+ut:ut);else{var qo=kr&&kr.replace(ut,"").trim();qo?cn.setAttribute($e,qo):cn.removeAttribute($e)}})}}function It(){!Ne&&_.props.aria.expanded&&wl(_.props.triggerTarget||n).forEach(function($e){_.props.interactive?$e.setAttribute("aria-expanded",_.state.isVisible&&$e===ot()?"true":"false"):$e.removeAttribute("aria-expanded")})}function ln(){pn().removeEventListener("mousemove",p),db=db.filter(function(J){return J!==p})}function zt(J){if(!Hs.isTouch||!l&&"mousedown"!==J.type){var $e=J.composedPath&&J.composedPath()[0]||J.target;if(!_.props.interactive||!a3(T,$e)){if(wl(_.props.triggerTarget||n).some(function(ut){return a3(ut,$e)})){if(Hs.isTouch||_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else be("onClickOutside",[_,J]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),a=!0,setTimeout(function(){a=!1}),_.state.isMounted||eo())}}}function Sn(){l=!0}function Rt(){l=!1}function Yi(){var J=pn();J.addEventListener("mousedown",zt,!0),J.addEventListener("touchend",zt,bl),J.addEventListener("touchstart",Rt,bl),J.addEventListener("touchmove",Sn,bl)}function eo(){var J=pn();J.removeEventListener("mousedown",zt,!0),J.removeEventListener("touchend",zt,bl),J.removeEventListener("touchstart",Rt,bl),J.removeEventListener("touchmove",Sn,bl)}function ct(J,$e){var ut=St().box;function wn(cn){cn.target===ut&&(O1(ut,"remove",wn),$e())}if(0===J)return $e();O1(ut,"remove",d),O1(ut,"add",wn),d=wn}function Fn(J,$e,ut){void 0===ut&&(ut=!1),wl(_.props.triggerTarget||n).forEach(function(cn){cn.addEventListener(J,$e,ut),f.push({node:cn,eventType:J,handler:$e,options:ut})})}function Ar(){gt()&&(Fn("touchstart",ql,{passive:!0}),Fn("touchend",Au,{passive:!0})),function roe(n){return n.split(/\s+/).filter(Boolean)}(_.props.trigger).forEach(function(J){if("manual"!==J)switch(Fn(J,ql),J){case"mouseenter":Fn("mouseleave",Au);break;case"focus":Fn(foe?"focusout":"blur",Hg);break;case"focusin":Fn("focusout",Hg)}})}function Ou(){f.forEach(function(J){J.node.removeEventListener(J.eventType,J.handler,J.options)}),f=[]}function ql(J){var $e,ut=!1;if(_.state.isEnabled&&!$g(J)&&!a){var wn="focus"===(null==($e=u)?void 0:$e.type);u=J,m=J.currentTarget,It(),!_.state.isVisible&&function x1(n){return S1(n,"MouseEvent")}(J)&&db.forEach(function(cn){return cn(J)}),"click"===J.type&&(_.props.trigger.indexOf("mouseenter")<0||s)&&!1!==_.props.hideOnClick&&_.state.isVisible?ut=!0:Wg(J),"click"===J.type&&(s=!ut),ut&&!wn&&ku(J)}}function Kl(J){var $e=J.target,ut=ot().contains($e)||T.contains($e);"mousemove"===J.type&&ut||function loe(n,e){var t=e.clientX,i=e.clientY;return n.every(function(r){var o=r.popperRect,s=r.popperState,l=r.props.interactiveBorder,c=function n3(n){return n.split("-")[0]}(s.placement),u=s.modifiersData.offset;return!u||o.top-i+("bottom"===c?u.top.y:0)>l||i-o.bottom-("top"===c?u.bottom.y:0)>l||o.left-t+("right"===c?u.left.x:0)>l||t-o.right-("left"===c?u.right.x:0)>l})}(Ql().concat(T).map(function(cn){var kr,nf=null==(kr=cn._tippy.popperInstance)?void 0:kr.state;return nf?{popperRect:cn.getBoundingClientRect(),popperState:nf,props:t}:null}).filter(Boolean),J)&&(ln(),ku(J))}function Au(J){if(!($g(J)||_.props.trigger.indexOf("click")>=0&&s)){if(_.props.interactive)return void _.hideWithInteractivity(J);ku(J)}}function Hg(J){_.props.trigger.indexOf("focusin")<0&&J.target!==ot()||_.props.interactive&&J.relatedTarget&&T.contains(J.relatedTarget)||ku(J)}function $g(J){return!!Hs.isTouch&>()!==J.type.indexOf("touch")>=0}function G0(){Y0();var J=_.props,$e=J.popperOptions,ut=J.placement,wn=J.offset,cn=J.getReferenceClientRect,kr=J.moveTransition,qo=at()?ub(T).arrow:null,nf=cn?{getBoundingClientRect:cn,contextElement:cn.contextElement||ot()}:n,Nu=[{name:"offset",options:{offset:wn}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!kr}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(J0){var rf=J0.state;if(at()){var EE=St().box;["placement","reference-hidden","escaped"].forEach(function(X0){"placement"===X0?EE.setAttribute("data-placement",rf.placement):rf.attributes.popper["data-popper-"+X0]?EE.setAttribute("data-"+X0,""):EE.removeAttribute("data-"+X0)}),rf.attributes.popper={}}}}];at()&&qo&&Nu.push({name:"arrow",options:{element:qo,padding:3}}),Nu.push.apply(Nu,$e?.modifiers||[]),_.popperInstance=toe(nf,T,Object.assign({},$e,{placement:ut,onFirstUpdate:h,modifiers:Nu}))}function Y0(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function Ql(){return _h(T.querySelectorAll("[data-tippy-root]"))}function Wg(J){_.clearDelayTimeouts(),J&&be("onTrigger",[_,J]),Yi();var $e=ae(!0),ut=He(),cn=ut[1];Hs.isTouch&&"hold"===ut[0]&&cn&&($e=cn),$e?i=setTimeout(function(){_.show()},$e):_.show()}function ku(J){if(_.clearDelayTimeouts(),be("onUntrigger",[_,J]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(J.type)>=0&&s)){var $e=ae(!1);$e?r=setTimeout(function(){_.state.isVisible&&_.hide()},$e):o=requestAnimationFrame(function(){_.hide()})}}else eo()}}function Cl(n,e){void 0===e&&(e={});var t=Kr.plugins.concat(e.plugins||[]);!function doe(){document.addEventListener("touchstart",coe,bl),window.addEventListener("blur",uoe)}();var i=Object.assign({},e,{plugins:t}),a=function aoe(n){return cb(n)?[n]:function soe(n){return S1(n,"NodeList")}(n)?_h(n):Array.isArray(n)?n:_h(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&Coe(c,i);return u&&l.push(u),l},[]);return cb(n)?a[0]:a}Cl.defaultProps=Kr,Cl.setDefaultProps=function(e){Object.keys(e).forEach(function(i){Kr[i]=e[i]})},Cl.currentInput=Hs,Object.assign({},zj,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}}),Cl.setDefaultProps({render:_3});const Bo=Cl,Uo=function(n){for(var e=0;;e++)if(!(n=n.previousSibling))return e},um=function(n){let e=n.assignedSlot||n.parentNode;return e&&11==e.nodeType?e.host:e};let w3=null;const Pa=function(n,e,t){let i=w3||(w3=document.createRange());return i.setEnd(n,t??n.nodeValue.length),i.setStart(n,e||0),i},Qc=function(n,e,t,i){return t&&(C3(n,e,t,i,-1)||C3(n,e,t,i,1))},Ooe=/^(img|br|input|textarea|hr)$/i;function C3(n,e,t,i,r){for(;;){if(n==t&&e==i)return!0;if(e==(r<0?0:$s(n))){let o=n.parentNode;if(!o||1!=o.nodeType||koe(n)||Ooe.test(n.nodeName)||"false"==n.contentEditable)return!1;e=Uo(n)+(r<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[e+(r<0?-1:0)]).contentEditable)return!1;e=r<0?$s(n):0}}}function $s(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function koe(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const pb=function(n){return n.focusNode&&Qc(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Zc(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}const Ws=typeof navigator<"u"?navigator:null,D3=typeof document<"u"?document:null,Dl=Ws&&Ws.userAgent||"",N1=/Edge\/(\d+)/.exec(Dl),M3=/MSIE \d/.exec(Dl),P1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Dl),Qr=!!(M3||P1||N1),Ml=M3?document.documentMode:P1?+P1[1]:N1?+N1[1]:0,hs=!Qr&&/gecko\/(\d+)/i.test(Dl);hs&&/Firefox\/(\d+)/.exec(Dl);const L1=!Qr&&/Chrome\/(\d+)/.exec(Dl),ar=!!L1,Loe=L1?+L1[1]:0,Er=!Qr&&!!Ws&&/Apple Computer/.test(Ws.vendor),vh=Er&&(/Mobile\/\w+/.test(Dl)||!!Ws&&Ws.maxTouchPoints>2),Ho=vh||!!Ws&&/Mac/.test(Ws.platform),Roe=!!Ws&&/Win/.test(Ws.platform),fs=/Android \d/.test(Dl),mb=!!D3&&"webkitFontSmoothing"in D3.documentElement.style,Foe=mb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function joe(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Tl(n,e){return"number"==typeof n?n:n[e]}function zoe(n){let e=n.getBoundingClientRect();return{left:e.left,right:e.left+n.clientWidth*(e.width/n.offsetWidth||1),top:e.top,bottom:e.top+n.clientHeight*(e.height/n.offsetHeight||1)}}function T3(n,e,t){let i=n.someProp("scrollThreshold")||0,r=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=t||n.dom;s;s=um(s)){if(1!=s.nodeType)continue;let a=s,l=a==o.body,c=l?joe(o):zoe(a),u=0,d=0;if(e.topc.bottom-Tl(i,"bottom")&&(d=e.bottom-c.bottom+Tl(r,"bottom")),e.leftc.right-Tl(i,"right")&&(u=e.right-c.right+Tl(r,"right")),u||d)if(l)o.defaultView.scrollBy(u,d);else{let h=a.scrollLeft,f=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let p=a.scrollLeft-h,m=a.scrollTop-f;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(l)break}}function S3(n){let e=[],t=n.ownerDocument;for(let i=n;i&&(e.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),n!=t);i=um(i));return e}function E3(n,e){for(let t=0;t=a){s=Math.max(p.bottom,s),a=Math.min(p.top,a);let m=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(o=d+1)}}return!t&&l&&(t=l,r=c,i=0),t&&3==t.nodeType?function Hoe(n,e){let t=n.nodeValue.length,i=document.createRange();for(let r=0;r=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}(t,r):!t||i&&1==t.nodeType?{node:n,offset:o}:x3(t,r)}function R1(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function I3(n,e,t){let i=n.childNodes.length;if(i&&t.tope.top&&r++}i==n.dom&&r==i.childNodes.length-1&&1==i.lastChild.nodeType&&e.top>i.lastChild.getBoundingClientRect().bottom?a=n.state.doc.content.size:(0==r||1!=i.nodeType||"BR"!=i.childNodes[r-1].nodeName)&&(a=function Goe(n,e,t,i){let r=-1;for(let o=e,s=!1;o!=n.dom;){let a=n.docView.nearestDesc(o,!0);if(!a)return null;if(1==a.dom.nodeType&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,l.left>i.left||l.top>i.top?r=a.posBefore:(l.right-1?r:n.docView.posFromDOM(e,t,-1)}(n,i,r,e))}null==a&&(a=function Woe(n,e,t){let{node:i,offset:r}=x3(e,t),o=-1;if(1==i.nodeType&&!i.firstChild){let s=i.getBoundingClientRect();o=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(i,r,o)}(n,s,e));let l=n.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function O3(n){return n.top=0&&r==i.nodeValue.length?(l--,u=1):t<0?l--:c++,dm(Sl(Pa(i,l,c),u),u<0)}{let l=Sl(Pa(i,r,r),t);if(hs&&r&&/\s/.test(i.nodeValue[r-1])&&r=0)}if(null==o&&r&&(t<0||r==$s(i))){let l=i.childNodes[r-1],c=3==l.nodeType?Pa(l,$s(l)-(s?0:1)):1!=l.nodeType||"BR"==l.nodeName&&l.nextSibling?null:l;if(c)return dm(Sl(c,1),!1)}if(null==o&&r<$s(i)){let l=i.childNodes[r];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?3==l.nodeType?Pa(l,0,s?0:1):1==l.nodeType?l:null:null;if(c)return dm(Sl(c,-1),!0)}return dm(Sl(3==i.nodeType?Pa(i):i,-t),t>=0)}function dm(n,e){if(0==n.width)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function F1(n,e){if(0==n.height)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function k3(n,e,t){let i=n.state,r=n.root.activeElement;i!=e&&n.updateState(e),r!=n.dom&&n.focus();try{return t()}finally{i!=e&&n.updateState(i),r!=n.dom&&r&&r.focus()}}const Qoe=/[\u0590-\u08ac]/;let N3=null,P3=null,L3=!1;class hm{constructor(e,t,i,r){this.parent=e,this.children=t,this.dom=i,this.contentDOM=r,this.dirty=0,i.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,i){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tUo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let o=e;;o=o.parentNode){if(o==this.dom){r=!1;break}if(o.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){r=!0;break}if(o.nextSibling)break}}return r??i>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let i=!0,r=e;r;r=r.parentNode){let s,o=this.getDesc(r);if(o&&(!t||o.node)){if(!i||!(s=o.nodeDOM)||(1==s.nodeType?s.contains(1==e.nodeType?e:e.parentNode):s==e))return o;i=!1}}}getDesc(e){let t=e.pmViewDesc;for(let i=t;i;i=i.parent)if(i==this)return t}posFromDOM(e,t,i){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,i)}return-1}descAt(e){for(let t=0,i=0;te||s instanceof z3){r=e-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,t);for(;i&&!(o=this.children[i-1]).size&&o instanceof F3&&o.side>=0;i--);if(t<=0){let o,s=!0;for(;o=i?this.children[i-1]:null,o&&o.dom.parentNode!=this.contentDOM;i--,s=!1);return o&&t&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,t):{node:this.contentDOM,offset:o?Uo(o.dom)+1:0}}{let o,s=!0;for(;o=i=u&&t<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,u);e=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){r=Uo(h.dom)+1;break}e-=h.size}-1==r&&(r=0)}if(r>-1&&(c>t||a==this.children.length-1)){t=c;for(let u=a+1;uf&&st){let f=a;a=l,l=f}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let i=0,r=0;r=i:ei){let a=i+o.border,l=s-o.border;if(e>=a&&t<=l)return this.dirty=e==i||t==s?2:1,void(e!=a||t!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}i=s}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let i=1==e?2:1;t.dirtyo?o.parent?o.parent.posBeforeChild(o):void 0:r)),!t.type.spec.raw){if(1!=s.nodeType){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Xoe extends hm{constructor(e,t,i,r){super(e,[],t,null),this.textDOM=i,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class Xc extends hm{constructor(e,t,i,r){super(e,[],i,r),this.mark=t}static create(e,t,i,r){let o=r.nodeViews[t.type.name],s=o&&o(t,r,i);return(!s||!s.dom)&&(s=zs.renderSpec(document,t.type.spec.toDOM(t,i))),new Xc(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty0&&(o=V1(o,0,e,i));for(let a=0;al?l.parent?l.parent.posBeforeChild(l):void 0:s,i,r),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(t.text);else u||({dom:u,contentDOM:d}=zs.renderSpec(document,t.type.spec.toDOM(t)));!d&&!t.isText&&"BR"!=u.nodeName&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let h=u;return u=U3(u,i,t),c?l=new ese(e,t,i,r,u,d||null,h,c,o,s+1):t.isText?new gb(e,t,i,r,u,h,o):new El(e,t,i,r,u,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let i=this.children[t];if(this.dom.contains(i.dom.parentNode)){e.contentElement=i.dom.parentNode;break}}e.contentElement||(e.getContent=()=>le.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,i){return 0==this.dirty&&e.eq(this.node)&&z1(t,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let i=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new nse(this,s&&s.node,e);(function ose(n,e,t,i){let r=e.locals(n),o=0;if(0==r.length){for(let c=0;co;)a.push(r[s++]);let h=o+u.nodeSize;if(u.isText){let p=h;s!p.inline):a.slice(),e.forChild(o,u),d),o=h}})(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,i,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?On.none:this.node.child(u).marks,i,e),l.placeWidget(c,e,r)},(c,u,d,h)=>{let f;l.syncToMarks(c.marks,i,e),l.findNodeMatch(c,u,d,h)||a&&e.state.selection.from>r&&e.state.selection.to-1&&l.updateNodeAt(c,u,d,f,e)||l.updateNextNode(c,u,d,e,h,r)||l.addNode(c,u,d,e,r),r+=c.nodeSize}),l.syncToMarks([],i,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),V3(this.contentDOM,this.children,e),vh&&function sse(n){if("UL"==n.nodeName||"OL"==n.nodeName){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n),n.style.cssText=e}}(this.dom))}localCompositionInfo(e,t){let{from:i,to:r}=e.state.selection;if(!(e.state.selection instanceof it)||it+this.node.content.size)return null;let o=e.domSelectionRange(),s=function ase(n,e){for(;;){if(3==n.nodeType)return n;if(1==n.nodeType&&e>0){if(n.childNodes.length>e&&3==n.childNodes[e].nodeType)return n.childNodes[e];e=$s(n=n.childNodes[e-1])}else{if(!(1==n.nodeType&&e=t){let c=a=0&&c+e.length+a>=t)return a+c;if(t==i&&l.length>=i+e.length-a&&l.slice(i-a,i-a+e.length)==e)return i}}return-1}(this.node.content,a,i-t,r-t);return l<0?null:{node:s,pos:l,text:a}}return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:i,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new Xoe(this,o,t,r);e.input.compositionNodes.push(s),this.children=V1(this.children,i,i+r.length,e,s)}update(e,t,i,r){return!(3==this.dirty||!e.sameMarkup(this.node)||(this.updateInner(e,t,i,r),0))}updateInner(e,t,i,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=i,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(z1(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,i=this.dom;this.dom=B3(this.dom,this.nodeDOM,j1(this.outerDeco,this.node,t),j1(e,this.node,t)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function j3(n,e,t,i,r){U3(i,e,n);let o=new El(void 0,n,e,t,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}class gb extends El{constructor(e,t,i,r,o,s,a){super(e,t,i,r,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,i,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node)||(this.updateOuterDeco(t),(0!=this.dirty||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,0))}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,i){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,i)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,i){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new gb(this.parent,r,this.outerDeco,this.innerDeco,o,o,i)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(0==e||t==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}}class z3 extends hm{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class ese extends El{constructor(e,t,i,r,o,s,a,l,c,u){super(e,t,i,r,o,s,a,c,u),this.spec=l}update(e,t,i,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,i);return o&&this.updateInner(e,t,i,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,i,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,i,r){this.spec.setSelection?this.spec.setSelection(e,t,i):super.setSelection(e,t,i,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function V3(n,e,t){let i=n.firstChild,r=!1;for(let o=0;o0;){let a;for(;;)if(i){let c=t.children[i-1];if(!(c instanceof Xc)){a=c,i--;break}t=c,i=c.children.length}else{if(t==e)break e;i=t.parent.children.indexOf(t),t=t.parent}let l=a.node;if(l){if(l!=n.child(r-1))break;--r,o.set(a,r),s.push(a)}}return{index:r,matched:o,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let i=e;i>1,s=Math.min(o,e.length);for(;r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Xc.create(this.top,e[o],t,i);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,i,r){let s,o=-1;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,i))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a=t||u<=e?o.push(l):(ct&&o.push(l.slice(t-c,l.size,i)))}return o}function B1(n,e=null){let t=n.domSelectionRange(),i=n.state.doc;if(!t.focusNode)return null;let r=n.docView.nearestDesc(t.focusNode),o=r&&0==r.size,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let l,c,a=i.resolve(s);if(pb(t)){for(l=a;r&&!r.node;)r=r.parent;let u=r.node;if(r&&u.isAtom&&Ye.isSelectable(u)&&r.parent&&(!u.isInline||!function Aoe(n,e,t){for(let i=0==e,r=e==$s(n);i||r;){if(n==t)return!0;let o=Uo(n);if(!(n=n.parentNode))return!1;i=i&&0==o,r=r&&o==$s(n)}}(t.focusNode,t.focusOffset,r.dom))){let d=r.posBefore;c=new Ye(s==d?a:i.resolve(d))}}else{let u=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}return c||(c=H1(n,l,a,"pointer"==e||n.state.selection.head{(t.anchorNode!=i||t.anchorOffset!=r)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!$3(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const W3=Er||ar&&Loe<63;function G3(n,e){let{node:t,offset:i}=n.docView.domFromPos(e,0),r=ir(n,e,t))||it.between(e,t,i)}function Q3(n){return!(n.editable&&!n.hasFocus())&&Z3(n)}function Z3(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function $1(n,e){let{$anchor:t,$head:i}=n.selection,r=e>0?t.max(i):t.min(i),o=r.parent.inlineContent?r.depth?n.doc.resolve(e>0?r.after():r.before()):null:r;return o&&nt.findFrom(o,e)}function tu(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function J3(n,e,t){let i=n.state.selection;if(!(i instanceof it)){if(i instanceof Ye&&i.node.isInline)return tu(n,new it(e>0?i.$to:i.$from));{let r=$1(n.state,e);return!!r&&tu(n,r)}}if(!i.empty||t.indexOf("s")>-1)return!1;if(n.endOfTextblock(e>0?"forward":"backward")){let r=$1(n.state,e);return!!(r&&r instanceof Ye)&&tu(n,r)}if(!(Ho&&t.indexOf("m")>-1)){let s,r=i.$head,o=r.textOffset?null:e<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText)return!1;let a=e<0?r.pos-o.nodeSize:r.pos;return!!(o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM)&&(Ye.isSelectable(o)?tu(n,new Ye(e<0?n.state.doc.resolve(r.pos-o.nodeSize):r)):!!mb&&tu(n,new it(n.state.doc.resolve(e<0?a:a+o.nodeSize))))}}function yb(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function pm(n){let e=n.pmViewDesc;return e&&0==e.size&&(n.nextSibling||"BR"!=n.nodeName)}function mm(n,e){return e<0?function hse(n){let e=n.domSelectionRange(),t=e.focusNode,i=e.focusOffset;if(!t)return;let r,o,s=!1;for(hs&&1==t.nodeType&&i0){if(1!=t.nodeType)break;{let a=t.childNodes[i-1];if(pm(a))r=t,o=--i;else{if(3!=a.nodeType)break;t=a,i=t.nodeValue.length}}}else{if(e4(t))break;{let a=t.previousSibling;for(;a&&pm(a);)r=t.parentNode,o=Uo(a),a=a.previousSibling;if(a)t=a,i=yb(t);else{if(t=t.parentNode,t==n.dom)break;i=0}}}s?W1(n,t,i):r&&W1(n,r,o)}(n):X3(n)}function X3(n){let e=n.domSelectionRange(),t=e.focusNode,i=e.focusOffset;if(!t)return;let o,s,r=yb(t);for(;;)if(i{n.state==r&&La(n)},50)}function t4(n,e){let t=n.state.doc.resolve(e);if(!ar&&!Roe&&t.parent.inlineContent){let r=n.coordsAtPos(e);if(e>t.start()){let o=n.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>r.top&&s1)return o.leftr.top&&s1)return o.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(n.dom).direction?"rtl":"ltr"}function n4(n,e,t){let i=n.state.selection;if(i instanceof it&&!i.empty||t.indexOf("s")>-1||Ho&&t.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=$1(n.state,e);if(s&&s instanceof Ye)return tu(n,s)}if(!r.parent.inlineContent){let s=e<0?r:o,a=i instanceof yo?nt.near(s,e):nt.findFrom(s,e);return!!a&&tu(n,a)}return!1}function r4(n,e){if(!(n.state.selection instanceof it))return!0;let{$head:t,$anchor:i,empty:r}=n.state.selection;if(!t.sameParent(i))return!0;if(!r)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return e<0?s.delete(t.pos-o.nodeSize,t.pos):s.delete(t.pos,t.pos+o.nodeSize),n.dispatch(s),!0}return!1}function o4(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function s4(n,e){n.someProp("transformCopied",f=>{e=f(e,n)});let t=[],{content:i,openStart:r,openEnd:o}=e;for(;r>1&&o>1&&1==i.childCount&&1==i.firstChild.childCount;){r--,o--;let f=i.firstChild;t.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),i=f.content}let s=n.someProp("clipboardSerializer")||zs.fromSchema(n.state.schema),a=p4(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u,c=l.firstChild,d=0;for(;c&&1==c.nodeType&&(u=h4[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${r} ${o}${d?` -${d}`:""} ${JSON.stringify(t)}`),{dom:l,text:n.someProp("clipboardTextSerializer",f=>f(e,n))||e.content.textBetween(0,e.content.size,"\n\n")}}function a4(n,e,t,i,r){let s,a,o=r.parent.type.spec.code;if(!t&&!e)return null;let l=e&&(i||o||!t);if(l){if(n.someProp("transformPastedText",h=>{e=h(e,o||i,n)}),o)return e?new we(le.from(n.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):we.empty;let d=n.someProp("clipboardTextParser",h=>h(e,r,i,n));if(d)a=d;else{let h=r.marks(),{schema:f}=n.state,p=zs.fromSchema(f);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(f.text(m,h)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),s=function _se(n){let e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let r,t=p4().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(n);if((r=i&&h4[i[1].toLowerCase()])&&(n=r.map(o=>"<"+o+">").join("")+n+r.map(o=>"").reverse().join("")),t.innerHTML=n,r)for(let o=0;o0;d--){let h=s.firstChild;for(;h&&1!=h.nodeType;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||sh.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!(!l&&!u),context:r,ruleFromNode:h=>"BR"!=h.nodeName||h.nextSibling||!h.parentNode||gse.test(h.parentNode.nodeName)?null:{ignore:!0}})),u)a=function bse(n,e){if(!n.size)return n;let i,t=n.content.firstChild.type.schema;try{i=JSON.parse(e)}catch{return n}let{content:r,openStart:o,openEnd:s}=n;for(let a=i.length-2;a>=0;a-=2){let l=t.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=le.from(l.create(i[a+1],r)),o++,s++}return new we(r,o,s)}(d4(a,+u[1],+u[2]),u[4]);else if(a=we.maxOpen(function yse(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let o,r=e.node(t).contentMatchAt(e.index(t)),s=[];if(n.forEach(a=>{if(!s)return;let c,l=r.findWrapping(a.type);if(!l)return s=null;if(c=s.length&&o.length&&c4(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=u4(s[s.length-1],o.length));let u=l4(a,l);s.push(u),r=r.matchType(u.type),o=l}}),s)return le.from(s)}return n}(a.content,r),!0),a.openStart||a.openEnd){let d=0,h=0;for(let f=a.content.firstChild;d{a=d(a,n)}),a}const gse=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function l4(n,e,t=0){for(let i=e.length-1;i>=t;i--)n=e[i].create(null,le.from(n));return n}function c4(n,e,t,i,r){if(r1&&(o=0),r=t&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(le.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(a))}function d4(n,e,t){return e{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=i=>q1(n,i))})}function q1(n,e){return n.someProp("handleDOMEvents",t=>{let i=t[e.type];return!!i&&(i(n,e)||e.defaultPrevented)})}function Tse(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||11==t.nodeType||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function _b(n){return{left:n.clientX,top:n.clientY}}function K1(n,e,t,i,r){if(-1==i)return!1;let o=n.state.doc.resolve(i);for(let s=o.depth+1;s>0;s--)if(n.someProp(e,a=>s>o.depth?a(n,t,o.nodeAfter,o.before(s),r,!0):a(n,t,o.node(s),o.before(s),r,!1)))return!0;return!1}function wh(n,e,t){n.focused||n.focus();let i=n.state.tr.setSelection(e);"pointer"==t&&i.setMeta("pointer",!0),n.dispatch(i)}function Ase(n,e,t,i){return K1(n,"handleDoubleClickOn",e,t,i)||n.someProp("handleDoubleClick",r=>r(n,e,i))}function kse(n,e,t,i){return K1(n,"handleTripleClickOn",e,t,i)||n.someProp("handleTripleClick",r=>r(n,e,i))||function Nse(n,e,t){if(0!=t.button)return!1;let i=n.state.doc;if(-1==e)return!!i.inlineContent&&(wh(n,it.create(i,0,i.content.size),"pointer"),!0);let r=i.resolve(e);for(let o=r.depth+1;o>0;o--){let s=o>r.depth?r.nodeAfter:r.node(o),a=r.before(o);if(s.inlineContent)wh(n,it.create(i,a+1,a+1+s.content.size),"pointer");else{if(!Ye.isSelectable(s))continue;wh(n,Ye.create(i,a),"pointer")}return!0}}(n,t,i)}function Q1(n){return vb(n)}Ir.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=16==t.keyCode||t.shiftKey,!g4(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!fs||!ar||13!=t.keyCode))if(229!=t.keyCode&&n.domObserver.forceFlush(),!vh||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)n.someProp("handleKeyDown",i=>i(n,t))||function mse(n,e){let t=e.keyCode,i=function pse(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}(e);if(8==t||Ho&&72==t&&"c"==i)return r4(n,-1)||mm(n,-1);if(46==t||Ho&&68==t&&"c"==i)return r4(n,1)||mm(n,1);if(13==t||27==t)return!0;if(37==t||Ho&&66==t&&"c"==i){let r=37==t?"ltr"==t4(n,n.state.selection.from)?-1:1:-1;return J3(n,r,i)||mm(n,r)}if(39==t||Ho&&70==t&&"c"==i){let r=39==t?"ltr"==t4(n,n.state.selection.from)?1:-1:1;return J3(n,r,i)||mm(n,r)}return 38==t||Ho&&80==t&&"c"==i?n4(n,-1,i)||mm(n,-1):40==t||Ho&&78==t&&"c"==i?function fse(n){if(!Er||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&1==e.nodeType&&0==t&&e.firstChild&&"false"==e.firstChild.contentEditable){let i=e.firstChild;o4(n,i,"true"),setTimeout(()=>o4(n,i,"false"),20)}return!1}(n)||n4(n,1,i)||X3(n):i==(Ho?"m":"c")&&(66==t||73==t||89==t||90==t)}(n,t)?t.preventDefault():xl(n,"key");else{let i=Date.now();n.input.lastIOSEnter=i,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==i&&(n.someProp("handleKeyDown",r=>r(n,Zc(13,"Enter"))),n.input.lastIOSEnter=0)},200)}},Ir.keyup=(n,e)=>{16==e.keyCode&&(n.input.shiftKey=!1)},Ir.keypress=(n,e)=>{let t=e;if(g4(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Ho&&t.metaKey)return;if(n.someProp("handleKeyPress",r=>r(n,t)))return void t.preventDefault();let i=n.state.selection;if(!(i instanceof it&&i.$from.sameParent(i.$to))){let r=String.fromCharCode(t.charCode);!/[\r\n]/.test(r)&&!n.someProp("handleTextInput",o=>o(n,i.$from.pos,i.$to.pos,r))&&n.dispatch(n.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}};const m4=Ho?"metaKey":"ctrlKey";xr.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let i=Q1(n),r=Date.now(),o="singleClick";r-n.input.lastClick.time<500&&function Ese(n,e){let t=e.x-n.clientX,i=e.y-n.clientY;return t*t+i*i<100}(t,n.input.lastClick)&&!t[m4]&&("singleClick"==n.input.lastClick.type?o="doubleClick":"doubleClick"==n.input.lastClick.type&&(o="tripleClick")),n.input.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};let s=n.posAtCoords(_b(t));s&&("singleClick"==o?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Pse(n,s,t,!!i)):("doubleClick"==o?Ase:kse)(n,s.pos,s.inside,t)?t.preventDefault():xl(n,"pointer"))};class Pse{constructor(e,t,i,r){let o,s;if(this.view=e,this.pos=t,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!i[m4],this.allowDefault=i.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let u=e.state.doc.resolve(t.pos);o=u.parent,s=u.depth?u.before():0}const a=r?null:i.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=e.state;(0==i.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof Ye&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!hs||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),xl(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>La(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(_b(e))),this.updateAllowDefault(e),this.allowDefault||!t?xl(this.view,"pointer"):function Ose(n,e,t,i,r){return K1(n,"handleClickOn",e,t,i)||n.someProp("handleClick",o=>o(n,e,i))||(r?function Ise(n,e){if(-1==e)return!1;let i,r,t=n.state.selection;t instanceof Ye&&(i=t.node);let o=n.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(Ye.isSelectable(a)){r=i&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?o.before(t.$from.depth):o.before(s);break}}return null!=r&&(wh(n,Ye.create(n.state.doc,r),"pointer"),!0)}(n,t):function xse(n,e){if(-1==e)return!1;let t=n.state.doc.resolve(e),i=t.nodeAfter;return!!(i&&i.isAtom&&Ye.isSelectable(i))&&(wh(n,new Ye(t),"pointer"),!0)}(n,t))}(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Er&&this.mightDrag&&!this.mightDrag.node.isAtom||ar&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(wh(this.view,nt.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):xl(this.view,"pointer")}move(e){this.updateAllowDefault(e),xl(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function g4(n,e){return!!n.composing||!!(Er&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500)&&(n.input.compositionEndedAt=-2e8,!0)}xr.touchstart=n=>{n.input.lastTouch=Date.now(),Q1(n),xl(n,"pointer")},xr.touchmove=n=>{n.input.lastTouch=Date.now(),xl(n,"pointer")},xr.contextmenu=n=>Q1(n);const Lse=fs?5e3:-1;function y4(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>vb(n),e))}function _4(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=function Rse(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function vb(n,e=!1){if(!(fs&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),_4(n),e||n.docView&&n.docView.dirty){let t=B1(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}Ir.compositionstart=Ir.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(i=>!1===i.type.spec.inclusive)))n.markCursor=n.state.storedMarks||t.marks(),vb(n,!0),n.markCursor=null;else if(vb(n),hs&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let i=n.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&1==r.nodeType&&0!=o;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(3==s.nodeType){n.domSelection().collapse(s,s.nodeValue.length);break}r=s,o=-1}}n.input.composing=!0}y4(n,Lse)},Ir.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionID++,y4(n,20))};const Ch=Qr&&Ml<15||vh&&Foe<604;function gm(n,e,t,i,r){let o=a4(n,e,t,i,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,r,o||we.empty)))return!0;if(!o)return!1;let s=function jse(n){return 0==n.openStart&&0==n.openEnd&&1==n.content.childCount?n.content.firstChild:null}(o),a=s?n.state.tr.replaceSelectionWith(s,n.input.shiftKey):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}xr.copy=Ir.cut=(n,e)=>{let t=e,i=n.state.selection,r="cut"==t.type;if(i.empty)return;let o=Ch?null:t.clipboardData,s=i.content(),{dom:a,text:l}=s4(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function Fse(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(e),n.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Ir.paste=(n,e)=>{let t=e;if(n.composing&&!fs)return;let i=Ch?null:t.clipboardData;i&&gm(n,i.getData("text/plain"),i.getData("text/html"),n.input.shiftKey,t)?t.preventDefault():function zse(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,i=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{n.focus(),i.parentNode&&i.parentNode.removeChild(i),t?gm(n,i.value,null,n.input.shiftKey,e):gm(n,i.textContent,i.innerHTML,n.input.shiftKey,e)},50)}(n,t)};class Vse{constructor(e,t){this.slice=e,this.move=t}}const v4=Ho?"altKey":"ctrlKey";xr.dragstart=(n,e)=>{let t=e,i=n.input.mouseDown;if(i&&i.done(),!t.dataTransfer)return;let r=n.state.selection,o=r.empty?null:n.posAtCoords(_b(t));if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof Ye?r.to-1:r.to)))if(i&&i.mightDrag)n.dispatch(n.state.tr.setSelection(Ye.create(n.state.doc,i.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){let c=n.docView.nearestDesc(t.target,!0);c&&c.node.type.spec.draggable&&c!=n.docView&&n.dispatch(n.state.tr.setSelection(Ye.create(n.state.doc,c.posBefore)))}let s=n.state.selection.content(),{dom:a,text:l}=s4(n,s);t.dataTransfer.clearData(),t.dataTransfer.setData(Ch?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",Ch||t.dataTransfer.setData("text/plain",l),n.dragging=new Vse(s,!t[v4])},xr.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)},Ir.dragover=Ir.dragenter=(n,e)=>e.preventDefault(),Ir.drop=(n,e)=>{let t=e,i=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let r=n.posAtCoords(_b(t));if(!r)return;let o=n.state.doc.resolve(r.pos),s=i&&i.slice;s?n.someProp("transformPasted",p=>{s=p(s,n)}):s=a4(n,t.dataTransfer.getData(Ch?"Text":"text/plain"),Ch?null:t.dataTransfer.getData("text/html"),!1,o);let a=!(!i||t[v4]);if(n.someProp("handleDrop",p=>p(n,t,s||we.empty,a)))return void t.preventDefault();if(!s)return;t.preventDefault();let l=s?mj(n.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=n.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,h=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let f=c.doc.resolve(u);if(d&&Ye.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Ye(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,g,y,v)=>p=v),c.setSelection(H1(n,f,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},xr.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&La(n)},20))},xr.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},xr.beforeinput=(n,e)=>{if(ar&&fs&&"deleteContentBackward"==e.inputType){n.domObserver.flushSoon();let{domChangeCount:i}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=i||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,Zc(8,"Backspace")))))return;let{$cursor:r}=n.state.selection;r&&r.pos>0&&n.dispatch(n.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let n in Ir)xr[n]=Ir[n];function ym(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class Z1{constructor(e,t){this.toDOM=e,this.spec=t||nu,this.side=this.spec.side||0}map(e,t,i,r){let{pos:o,deleted:s}=e.mapResult(t.from+r,this.side<0?-1:1);return s?null:new Ei(o-i,o-i,this)}valid(){return!0}eq(e){return this==e||e instanceof Z1&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ym(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Il{constructor(e,t){this.attrs=e,this.spec=t||nu}map(e,t,i,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-i,s=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new Ei(o,s,this)}valid(e,t){return t.from=e&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;se){let a=this.children[s]+1;this.children[s+2].findInner(e-a,t-a,i,r+a,o)}}map(e,t,i){return this==lr||0==e.maps.length?this:this.mapInner(e,t,0,0,i||nu)}mapInner(e,t,i,r,o){let s;for(let a=0;a{let g=m-p-(f-h);for(let y=0;yv+u-d)continue;let w=a[y]+u-d;f>=w?a[y+1]=h<=w?-2:-1:p>=r&&g&&(a[y]+=g,a[y+1]+=g)}d+=g}),u=t.maps[c].map(u,-1)}let l=!1;for(let c=0;c=i.content.size){l=!0;continue}let f=t.map(n[c+1]+o,-1)-r,{index:p,offset:m}=i.content.findIndex(d),g=i.maybeChild(p);if(g&&m==d&&m+g.nodeSize==f){let y=a[c+2].mapInner(t,g,u+1,n[c]+o+1,s);y!=lr?(a[c]=d,a[c+1]=f,a[c+2]=y):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=function Use(n,e,t,i,r,o,s){function a(l,c){for(let u=0;u{let u,c=l+i;if(u=w4(t,a,c)){for(r||(r=this.children.slice());oa&&d.to=e){this.children[a]==e&&(i=this.children[a+2]);break}let o=e+1,s=o+t.content.size;for(let a=0;ao&&l.type instanceof Il){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;cr.map(e,t,nu));return Ol.from(i)}forChild(e,t){if(t.isLeaf)return Ln.empty;let i=[];for(let r=0;rt instanceof Ln)?e:e.reduce((t,i)=>t.concat(i instanceof Ln?i:i.members),[]))}}}function b4(n,e){if(!e||!n.length)return n;let t=[];for(let i=0;it&&s.to{let c=w4(n,a,l+t);if(c){o=!0;let u=bb(c,a,t+l+1,i);u!=lr&&r.push(l,l+a.nodeSize,u)}});let s=b4(o?C4(n):n,-t).sort(iu);for(let a=0;a0;)e++;n.splice(e,0,t)}function eS(n){let e=[];return n.someProp("decorations",t=>{let i=t(n.state);i&&i!=lr&&e.push(i)}),n.cursorWrapper&&e.push(Ln.create(n.state.doc,[n.cursorWrapper.deco])),Ol.from(e)}const Hse={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},$se=Qr&&Ml<=11;class Wse{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Gse{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Wse,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let r=0;r"childList"==r.type&&r.removedNodes.length||"characterData"==r.type&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),$se&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Hse)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Q3(this.view)){if(this.suppressingSelectionUpdates)return La(this.view);if(Qr&&Ml<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Qc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let i,t=new Set;for(let o=e.focusNode;o;o=um(o))t.add(o);for(let o=e.anchorNode;o;o=um(o))if(t.has(o)){i=o;break}let r=i&&this.view.docView.nearestDesc(i);return r&&r.ignoreMutation({type:"selection",target:3==i.nodeType?i.parentNode:i})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let i=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&Q3(e)&&!this.ignoreSelectionChange(i),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let u=0;u1){let u=l.filter(d=>"BR"==d.nodeName);if(2==u.length){let d=u[0],h=u[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let c=null;o<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||r)&&(o>-1&&(e.docView.markDirty(o,s),function Yse(n){if(!M4.has(n)&&(M4.set(n,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace))){if(n.requiresGeckoHackNode=hs,T4)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),T4=!0}}(e)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(i)||La(e),this.currentSelection.set(i))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let i=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(i==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!i||i.ignoreMutation(e))return null;if("childList"==e.type){for(let u=0;ue.content.size?null:H1(n,e.resolve(t.anchor),e.resolve(t.head))}function tS(n,e,t){let i=n.depth,r=e?n.end():n.pos;for(;i>0&&(e||n.indexAfter(i)==n.node(i).childCount);)i--,r++,e=!1;if(t){let o=n.node(i).maybeChild(n.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,r++}return r}class nae{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Cse,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(A4),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=I4(this),x4(this),this.nodeViews=O4(this),this.docView=j3(this.state.doc,E4(this),eS(this),this.dom,this),this.domObserver=new Gse(this,(i,r,o,s)=>function Jse(n,e,t,i,r){if(e<0){let K=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,Ne=B1(n,K);if(Ne&&!n.state.selection.eq(Ne)){if(ar&&fs&&13===n.input.lastKeyCode&&Date.now()-100gt(n,Zc(13,"Enter"))))return;let He=n.state.tr.setSelection(Ne);"pointer"==K?He.setMeta("pointer",!0):"key"==K&&He.scrollIntoView(),n.composing&&He.setMeta("composition",n.input.compositionID),n.dispatch(He)}return}let o=n.state.doc.resolve(e),s=o.sharedDepth(t);e=o.before(s+1),t=n.state.doc.resolve(t).after(s+1);let d,h,a=n.state.selection,l=function Kse(n,e,t){let c,{node:i,fromOffset:r,toOffset:o,from:s,to:a}=n.docView.parseRange(e,t),l=n.domSelectionRange(),u=l.anchorNode;if(u&&n.dom.contains(1==u.nodeType?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],pb(l)||c.push({node:l.focusNode,offset:l.focusOffset})),ar&&8===n.input.lastKeyCode)for(let g=o;g>r;g--){let y=i.childNodes[g-1],v=y.pmViewDesc;if("BR"==y.nodeName&&!v){o=g;break}if(!v||v.size)break}let d=n.state.doc,h=n.someProp("domParser")||sh.fromSchema(n.state.schema),f=d.resolve(s),p=null,m=h.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:r,to:o,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:c,ruleFromNode:Qse,context:f});if(c&&null!=c[0].pos){let g=c[0].pos,y=c[1]&&c[1].pos;null==y&&(y=g),p={anchor:g+s,head:y+s}}return{doc:m,sel:p,from:s,to:a}}(n,e,t),c=n.state.doc,u=c.slice(l.from,l.to);8===n.input.lastKeyCode&&Date.now()-100=s?o-i:0,a=o+(a-s),s=o):a=a?o-i:0,s=o+(s-a),a=o),{start:o,endA:s,endB:a}}(u.content,l.doc.content,l.from,d,h);if((vh&&n.input.lastIOSEnter>Date.now()-225||fs)&&r.some(K=>1==K.nodeType&&!Zse.test(K.nodeName))&&(!f||f.endA>=f.endB)&&n.someProp("handleKeyDown",K=>K(n,Zc(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(!f){if(!(i&&a instanceof it&&!a.empty&&a.$head.sameParent(a.$anchor))||n.composing||l.sel&&l.sel.anchor!=l.sel.head){if(l.sel){let K=S4(n,n.state.doc,l.sel);if(K&&!K.eq(n.state.selection)){let Ne=n.state.tr.setSelection(K);n.composing&&Ne.setMeta("composition",n.input.compositionID),n.dispatch(Ne)}}return}f={start:a.from,endA:a.to,endB:a.to}}if(ar&&n.cursorWrapper&&l.sel&&l.sel.anchor==n.cursorWrapper.deco.from&&l.sel.head==l.sel.anchor){let K=f.endB-f.start;l.sel={anchor:l.sel.anchor+K,head:l.sel.anchor+K}}n.input.domChangeCount++,n.state.selection.fromn.state.selection.from&&f.start<=n.state.selection.from+2&&n.state.selection.from>=l.from?f.start=n.state.selection.from:f.endA=n.state.selection.to-2&&n.state.selection.to<=l.to&&(f.endB+=n.state.selection.to-f.endA,f.endA=n.state.selection.to)),Qr&&Ml<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>l.from&&" \xa0"==l.doc.textBetween(f.start-l.from-1,f.start-l.from+1)&&(f.start--,f.endA--,f.endB--);let v,p=l.doc.resolveNoCache(f.start-l.from),m=l.doc.resolveNoCache(f.endB-l.from),g=c.resolve(f.start),y=p.sameParent(m)&&p.parent.inlineContent&&g.end()>=f.endA;if((vh&&n.input.lastIOSEnter>Date.now()-225&&(!y||r.some(K=>"DIV"==K.nodeName||"P"==K.nodeName))||!y&&p.posK(n,Zc(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(n.state.selection.anchor>f.start&&function eae(n,e,t,i,r){if(!i.parent.isTextblock||t-e<=r.pos-i.pos||tS(i,!0,!1)t||tS(s,!0,!1)K(n,Zc(8,"Backspace"))))return void(fs&&ar&&n.domObserver.suppressSelectionUpdates());ar&&fs&&f.endB==f.start&&(n.input.lastAndroidDelete=Date.now()),fs&&!y&&p.start()!=m.start()&&0==m.parentOffset&&p.depth==m.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==f.endA&&(f.endB-=2,m=l.doc.resolveNoCache(f.endB-l.from),setTimeout(()=>{n.someProp("handleKeyDown",function(K){return K(n,Zc(13,"Enter"))})},20));let N,T,ne,w=f.start,_=f.endA;if(y)if(p.pos==m.pos)Qr&&Ml<=11&&0==p.parentOffset&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>La(n),20)),N=n.state.tr.delete(w,_),T=c.resolve(f.start).marksAcross(c.resolve(f.endA));else if(f.endA==f.endB&&(ne=function Xse(n,e){let s,a,l,t=n.firstChild.marks,i=e.firstChild.marks,r=t,o=i;for(let u=0;uu.mark(a.addToSet(u.marks));else{if(0!=r.length||1!=o.length)return null;a=o[0],s="remove",l=u=>u.mark(a.removeFromSet(u.marks))}let c=[];for(let u=0;uNe(n,w,_,K)))return;N=n.state.tr.insertText(K,w,_)}if(N||(N=n.state.tr.replace(w,_,l.doc.slice(f.start-l.from,f.endB-l.from))),l.sel){let K=S4(n,N.doc,l.sel);K&&!(ar&&fs&&n.composing&&K.empty&&(f.start!=f.endB||n.input.lastAndroidDelete{Tse(n,i)&&!q1(n,i)&&(n.editable||!(i.type in Ir))&&t(n,i)},wse[e]?{passive:!0}:void 0)}Er&&n.dom.addEventListener("input",()=>null),Y1(n)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Y1(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(A4),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let i in this._props)t[i]=this._props[i];t.state=this.state;for(let i in e)t[i]=e[i];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let i=this.state,r=!1,o=!1;e.storedMarks&&this.composing&&(_4(this),o=!0),this.state=e;let s=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(s||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=O4(this);(function rae(n,e){let t=0,i=0;for(let r in n){if(n[r]!=e[r])return!0;t++}for(let r in e)i++;return t!=i})(h,this.nodeViews)&&(this.nodeViews=h,r=!0)}(s||t.handleDOMEvents!=this._props.handleDOMEvents)&&Y1(this),this.editable=I4(this),x4(this);let a=eS(this),l=E4(this),c=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",u=r||!this.docView.matchesNode(e.doc,l,a);(u||!e.selection.eq(i.selection))&&(o=!0);let d="preserve"==c&&o&&null==this.dom.style.overflowAnchor&&function Voe(n){let i,r,e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top);for(let o=(e.left+e.right)/2,s=t+1;s=t-20){i=a,r=l.top;break}}return{refDOM:i,refTop:r,stack:S3(n.dom)}}(this);if(o){this.domObserver.stop();let h=u&&(Qr||ar)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&function iae(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}(i.selection,e.selection);if(u){let f=ar?this.trackWrites=this.domSelectionRange().focusNode:null;(r||!this.docView.update(e.doc,l,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=j3(e.doc,l,a,this.dom,this)),f&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function dse(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Qc(e.node,e.offset,t.anchorNode,t.anchorOffset)}(this))?La(this,h):(q3(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():d&&function Boe({refDOM:n,refTop:e,stack:t}){let i=n?n.getBoundingClientRect().top:0;E3(t,0==i?0:i-e)}(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Ye){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&T3(this,t.getBoundingClientRect(),e)}else T3(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;tt.ownerDocument.getSelection()),this._root=t;return e||document}posAtCoords(e){return Yoe(this,e)}coordsAtPos(e,t=1){return A3(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,i=-1){let r=this.docView.posFromDOM(e,t,i);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function Joe(n,e,t){return N3==e&&P3==t?L3:(N3=e,P3=t,L3="up"==t||"down"==t?function Koe(n,e,t){let i=e.selection,r="up"==t?i.$from:i.$to;return k3(n,e,()=>{let{node:o}=n.docView.domFromPos(r.pos,"up"==t?-1:1);for(;;){let a=n.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=A3(n,r.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(1==a.nodeType)l=a.getClientRects();else{if(3!=a.nodeType)continue;l=Pa(a,0,a.nodeValue.length).getClientRects()}for(let c=0;cu.top+1&&("up"==t?s.top-u.top>2*(u.bottom-s.top):u.bottom-s.bottom>2*(s.bottom-u.top)))return!1}}return!0})}(n,e,t):function Zoe(n,e,t){let{$head:i}=e.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=!r,s=r==i.parent.content.size,a=n.domSelection();return Qoe.test(i.parent.textContent)&&a.modify?k3(n,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",t,"character");let f=i.depth?n.docView.domAfterPos(i.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),g=p&&!f.contains(1==p.nodeType?p:p.parentNode)||l==p&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return null!=h&&(a.caretBidiLevel=h),g}):"left"==t||"backward"==t?o:s}(n,e,t))}(this,t||this.state,e)}pasteHTML(e,t){return gm(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return gm(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(function Mse(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],eS(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function Sse(n,e){!q1(n,e)&&xr[e.type]&&(n.editable||!(e.type in Ir))&&xr[e.type](n,e)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return Er&&11===this.root.nodeType&&function Noe(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom?function qse(n){let e;function t(l){l.preventDefault(),l.stopImmediatePropagation(),e=l.getTargetRanges()[0]}n.dom.addEventListener("beforeinput",t,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",t,!0);let i=e.startContainer,r=e.startOffset,o=e.endContainer,s=e.endOffset,a=n.domAtPos(n.state.selection.anchor);return Qc(a.node,a.offset,o,s)&&([i,r,o,s]=[o,s,i,r]),{anchorNode:i,anchorOffset:r,focusNode:o,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function E4(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if("function"==typeof t&&(t=t(n.state)),t)for(let i in t)"class"==i?e.class+=" "+t[i]:"style"==i?e.style=(e.style?e.style+";":"")+t[i]:!e[i]&&"contenteditable"!=i&&"nodeName"!=i&&(e[i]=String(t[i]))}),e.translate||(e.translate="no"),[Ei.node(0,n.state.doc.content.size,e)]}function x4(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:Ei.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function I4(n){return!n.someProp("editable",e=>!1===e(n.state))}function O4(n){let e=Object.create(null);function t(i){for(let r in i)Object.prototype.hasOwnProperty.call(e,r)||(e[r]=i[r])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function A4(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Al={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},wb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},oae=typeof navigator<"u"&&/Mac/.test(navigator.platform),sae=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Hi=0;Hi<10;Hi++)Al[48+Hi]=Al[96+Hi]=String(Hi);for(Hi=1;Hi<=24;Hi++)Al[Hi+111]="F"+Hi;for(Hi=65;Hi<=90;Hi++)Al[Hi]=String.fromCharCode(Hi+32),wb[Hi]=String.fromCharCode(Hi);for(var nS in Al)wb.hasOwnProperty(nS)||(wb[nS]=Al[nS]);const lae=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function cae(n){let i,r,o,s,e=n.split(/-(?!$)/),t=e[e.length-1];"Space"==t&&(t=" ");for(let a=0;a127)&&(o=Al[i.keyCode])&&o!=r){let a=e[iS(o,i)];if(a&&a(t.state,t.dispatch,t))return!0}}return!1}}const oS=(n,e)=>!n.selection.empty&&(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);const N4=(n,e,t)=>{let i=function k4(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}(n,t);if(!i)return!1;let r=sS(i);if(!r){let s=i.blockRange(),a=s&&ch(s);return null!=a&&(e&&e(n.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(!o.type.spec.isolating&&$4(n,r,e))return!0;if(0==i.parent.content.size&&(Mh(o,"end")||Ye.isSelectable(o))){let s=l1(n.doc,i.before(),i.after(),we.empty);if(s&&s.slice.size{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):i.parentOffset>0)return!1;o=sS(i)}let s=o&&o.nodeBefore;return!(!s||!Ye.isSelectable(s)||(e&&e(n.tr.setSelection(Ye.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),0))};function sS(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}const F4=(n,e,t)=>{let i=function R4(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):i.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let{$head:t,$anchor:i}=n.selection;return!(!t.parent.type.spec.code||!t.sameParent(i)||(e&&e(n.tr.insertText("\n").scrollIntoView()),0))};function lS(n){for(let e=0;e{let{$head:t,$anchor:i}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(i))return!1;let r=t.node(-1),o=t.indexAfter(-1),s=lS(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(e){let a=t.after(),l=n.tr.replaceWith(a,a,s.createAndFill());l.setSelection(nt.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},B4=(n,e)=>{let t=n.selection,{$from:i,$to:r}=t;if(t instanceof yo||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=lS(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!i.parentOffset&&r.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let o=t.before();if(ka(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let i=t.blockRange(),r=i&&ch(i);return null!=r&&(e&&e(n.tr.lift(i,r).scrollIntoView()),!0)},H4=function mae(n){return(e,t)=>{let{$from:i,$to:r}=e.selection;if(e.selection instanceof Ye&&e.selection.node.isBlock)return!(!i.parentOffset||!ka(e.doc,i.pos)||(t&&t(e.tr.split(i.pos).scrollIntoView()),0));if(!i.parent.isBlock)return!1;if(t){let o=r.parentOffset==r.parent.content.size,s=e.tr;(e.selection instanceof it||e.selection instanceof yo)&&s.deleteSelection();let a=0==i.depth?null:lS(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=n&&n(r.parent,o),c=l?[l]:o&&a?[{type:a}]:void 0,u=ka(s.doc,s.mapping.map(i.pos),1,c);if(!c&&!u&&ka(s.doc,s.mapping.map(i.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(i.pos),1,c),!o&&!i.parentOffset&&i.parent.type!=a)){let d=s.mapping.map(i.before()),h=s.doc.resolve(d);a&&i.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&s.setNodeMarkup(s.mapping.map(i.before()),a)}t(s.scrollIntoView())}return!0}}();function $4(n,e,t){let o,s,i=e.nodeBefore,r=e.nodeAfter;if(i.type.spec.isolating||r.type.spec.isolating)return!1;if(function _ae(n,e,t){let i=e.nodeBefore,r=e.nodeAfter,o=e.index();return!(!(i&&r&&i.type.compatibleContent(r.type))||(!i.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-i.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(o,o+1)||!r.isTextblock&&!_l(n.doc,e.pos)||(t&&t(n.tr.clearIncompatible(e.pos,i.type,i.contentMatchAt(i.childCount)).join(e.pos).scrollIntoView()),0)))}(n,e,t))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(r.type))&&s.matchType(o[0]||r.type).validEnd){if(t){let d=e.pos+r.nodeSize,h=le.empty;for(let m=o.length-1;m>=0;m--)h=le.from(o[m].create(null,h));h=le.from(i.copy(h));let f=n.tr.step(new Ni(e.pos-1,d,e.pos,d,new we(h,1,0),o.length,!0)),p=d+2*o.length;_l(f.doc,p)&&f.join(p),t(f.scrollIntoView())}return!0}let l=nt.findFrom(e,1),c=l&&l.$from.blockRange(l.$to),u=c&&ch(c);if(null!=u&&u>=e.depth)return t&&t(n.tr.lift(c,u).scrollIntoView()),!0;if(a&&Mh(r,"start",!0)&&Mh(i,"end")){let d=i,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let f=r,p=1;for(;!f.isTextblock;f=f.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,f.content)){if(t){let m=le.empty;for(let y=h.length-1;y>=0;y--)m=le.from(h[y].copy(m));t(n.tr.step(new Ni(e.pos-h.length,e.pos+r.nodeSize,e.pos+p,e.pos+r.nodeSize-p,new we(m,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function W4(n){return function(e,t){let i=e.selection,r=n<0?i.$from:i.$to,o=r.depth;for(;r.node(o).isInline;){if(!o)return!1;o--}return!!r.node(o).isTextblock&&(t&&t(e.tr.setSelection(it.create(e.doc,n<0?r.start(o):r.end(o)))),!0)}}const G4=W4(-1),Y4=W4(1);function q4(n,e=null){return function(t,i){let r=!1;for(let o=0;o{if(r)return!1;if(l.isTextblock&&!l.hasMarkup(n,e))if(l.type==n)r=!0;else{let u=t.doc.resolve(c),d=u.index();r=u.parent.canReplaceWith(d,d+1,n)}})}if(!r)return!1;if(i){let o=t.tr;for(let s=0;s(e&&e(n.tr.setSelection(new yo(n.doc))),!0)},Cae={"Ctrl-h":kl.Backspace,"Alt-Backspace":kl["Mod-Backspace"],"Ctrl-d":kl.Delete,"Ctrl-Alt-Backspace":kl["Mod-Delete"],"Alt-Delete":kl["Mod-Delete"],"Alt-d":kl["Mod-Delete"],"Ctrl-a":G4,"Ctrl-e":Y4};for(let n in kl)Cae[n]=kl[n];function Cb(n){const{state:e,transaction:t}=n;let{selection:i}=t,{doc:r}=t,{storedMarks:o}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),filterTransaction:e.filterTransaction,plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=t.selection,r=t.doc,o=t.storedMarks,t}}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform();class Db{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:i}=this,{view:r}=t,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>{const d=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!e,c=e||o.tr,d={...Object.fromEntries(Object.entries(i).map(([h,f])=>[h,(...m)=>{const g=this.buildProps(c,t),y=f(...m)(g);return a.push(y),d}])),run:()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(h=>!0===h))};return d}createCan(e){const{rawCommands:t,state:i}=this,o=e||i.tr,s=this.buildProps(o,!1);return{...Object.fromEntries(Object.entries(t).map(([l,c])=>[l,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,!1)}}buildProps(e,t=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r;o.storedMarks&&e.setStoredMarks(o.storedMarks);const a={tr:e,editor:r,view:s,state:Cb({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(i).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class Lae{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const i=this.callbacks[e];return i&&i.forEach(r=>r.apply(this,t)),this}off(e,t){const i=this.callbacks[e];return i&&(t?this.callbacks[e]=i.filter(r=>r!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function Ve(n,e,t){return void 0===n.config[e]&&n.parent?Ve(n.parent,e,t):"function"==typeof n.config[e]?n.config[e].bind({...t,parent:n.parent?Ve(n.parent,e,t):null}):n.config[e]}function Mb(n){return{baseExtensions:n.filter(r=>"extension"===r.type),nodeExtensions:n.filter(r=>"node"===r.type),markExtensions:n.filter(r=>"mark"===r.type)}}function Q4(n){const e=[],{nodeExtensions:t,markExtensions:i}=Mb(n),r=[...t,...i],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(s=>{const l=Ve(s,"addGlobalAttributes",{name:s.name,options:s.options,storage:s.storage});l&&l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([h,f])=>{e.push({type:d,name:h,attribute:{...o,...f}})})})})}),r.forEach(s=>{const l=Ve(s,"addAttributes",{name:s.name,options:s.options,storage:s.storage});if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const h={...o,...d};"function"==typeof h?.default&&(h.default=h.default()),h?.isRequired&&void 0===h?.default&&delete h.default,e.push({type:s.name,name:u,attribute:h})})}),e}function Pi(n,e){if("string"==typeof n){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function Xt(...n){return n.filter(e=>!!e).reduce((e,t)=>{const i={...e};return Object.entries(t).forEach(([r,o])=>{i[r]=i[r]?"class"===r?[i[r],o].join(" "):"style"===r?[i[r],o].join("; "):o:o}),i},{})}function hS(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,i)=>Xt(t,i),{})}function Z4(n){return"function"==typeof n}function bt(n,e,...t){return Z4(n)?e?n.bind(e)(...t):n(...t):n}function J4(n,e){return n.style?n:{...n,getAttrs:t=>{const i=n.getAttrs?n.getAttrs(t):n.attrs;if(!1===i)return!1;const r=e.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(t):function Fae(n){return"string"!=typeof n?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):"true"===n||"false"!==n&&n}(t.getAttribute(s.name));return null==a?o:{...o,[s.name]:a}},{});return{...i,...r}}}}function X4(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>("attrs"!==e||!function Rae(n={}){return 0===Object.keys(n).length&&n.constructor===Object}(t))&&null!=t))}function fS(n,e){return e.nodes[n]||e.marks[n]||null}function t5(n,e){return Array.isArray(e)?e.some(t=>("string"==typeof t?t:t.name)===n.name):e}function pS(n){return"[object RegExp]"===Object.prototype.toString.call(n)}class _m{constructor(e){this.find=e.find,this.handler=e.handler}}function mS(n){var e;const{editor:t,from:i,to:r,text:o,rules:s,plugin:a}=n,{view:l}=t;if(l.composing)return!1;const c=l.state.doc.resolve(i);if(c.parent.type.spec.code||null!==(e=c.nodeBefore||c.nodeAfter)&&void 0!==e&&e.marks.find(h=>h.type.spec.code))return!1;let u=!1;const d=((n,e=500)=>{let t="";const i=n.parentOffset;return n.parent.nodesBetween(Math.max(0,i-e),i,(r,o,s,a)=>{var l,c;const u=(null===(c=(l=r.type.spec).toText)||void 0===c?void 0:c.call(l,{node:r,pos:o,parent:s,index:a}))||r.textContent||"%leaf%";t+=u.slice(0,Math.max(0,i-o))}),t})(c)+o;return s.forEach(h=>{if(u)return;const f=((n,e)=>{if(pS(e))return e.exec(n);const t=e(n);if(!t)return null;const i=[t.text];return i.index=t.index,i.input=n,i.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(t.replaceWith)),i})(d,h.find);if(!f)return;const p=l.state.tr,m=Cb({state:l.state,transaction:p}),g={from:i-(f[0].length-o.length),to:r},{commands:y,chain:v,can:w}=new Db({editor:t,state:m});null===h.handler({state:m,range:g,match:f,commands:y,chain:v,can:w})||!p.steps.length||(p.setMeta(a,{transform:p,from:i,to:r,text:o}),l.dispatch(p),u=!0)}),u}function Vae(n){const{editor:e,rules:t}=n,i=new $t({state:{init:()=>null,apply:(r,o)=>r.getMeta(i)||(r.selectionSet||r.docChanged?null:o)},props:{handleTextInput:(r,o,s,a)=>mS({editor:e,from:o,to:s,text:a,rules:t,plugin:i}),handleDOMEvents:{compositionend:r=>(setTimeout(()=>{const{$cursor:o}=r.state.selection;o&&mS({editor:e,from:o.pos,to:o.pos,text:"",rules:t,plugin:i})}),!1)},handleKeyDown(r,o){if("Enter"!==o.key)return!1;const{$cursor:s}=r.state.selection;return!!s&&mS({editor:e,from:s.pos,to:s.pos,text:"\n",rules:t,plugin:i})}},isInputRules:!0});return i}class gS{constructor(e){this.find=e.find,this.handler=e.handler}}function $ae(n){const{editor:e,rules:t}=n;let i=null,r=!1,o=!1;return t.map(a=>new $t({view(l){const c=u=>{var d;i=null!==(d=l.dom.parentElement)&&void 0!==d&&d.contains(u.target)?l.dom.parentElement:null};return window.addEventListener("dragstart",c),{destroy(){window.removeEventListener("dragstart",c)}}},props:{handleDOMEvents:{drop:l=>(o=i===l.dom.parentElement,!1),paste:(l,c)=>{var u;const d=null===(u=c.clipboardData)||void 0===u?void 0:u.getData("text/html");return r=!!d?.includes("data-pm-slice"),!1}}},appendTransaction:(l,c,u)=>{const d=l[0],h="paste"===d.getMeta("uiEvent")&&!r,f="drop"===d.getMeta("uiEvent")&&!o;if(!h&&!f)return;const p=c.doc.content.findDiffStart(u.doc.content),m=c.doc.content.findDiffEnd(u.doc.content);if(!function Bae(n){return"number"==typeof n}(p)||!m||p===m.b)return;const g=u.tr,y=Cb({state:u,transaction:g});return function Hae(n){const{editor:e,state:t,from:i,to:r,rule:o}=n,{commands:s,chain:a,can:l}=new Db({editor:e,state:t}),c=[];return t.doc.nodesBetween(i,r,(d,h)=>{if(!d.isTextblock||d.type.spec.code)return;const f=Math.max(i,h),p=Math.min(r,h+d.content.size);((n,e)=>{if(pS(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(i=>{const r=[i.text];return r.index=i.index,r.input=n,r.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),r.push(i.replaceWith)),r}):[]})(d.textBetween(f-h,p-h,void 0,"\ufffc"),o.find).forEach(y=>{if(void 0===y.index)return;const v=f+y.index+1,w=v+y[0].length,_={from:t.tr.mapping.map(v),to:t.tr.mapping.map(w)},N=o.handler({state:t,range:_,match:y,commands:s,chain:a,can:l});c.push(N)})}),c.every(d=>null!==d)}({editor:e,state:y,from:Math.max(p-1,0),to:m.b-1,rule:a})&&g.steps.length?g:void 0}}))}class ru{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=ru.resolve(e),this.schema=function e5(n,e){var t;const i=Q4(n),{nodeExtensions:r,markExtensions:o}=Mb(n),s=null===(t=r.find(c=>Ve(c,"topNode")))||void 0===t?void 0:t.name,a=Object.fromEntries(r.map(c=>{const u=i.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=X4({...n.reduce((y,v)=>{const w=Ve(v,"extendNodeSchema",d);return{...y,...w?w(c):{}}},{}),content:bt(Ve(c,"content",d)),marks:bt(Ve(c,"marks",d)),group:bt(Ve(c,"group",d)),inline:bt(Ve(c,"inline",d)),atom:bt(Ve(c,"atom",d)),selectable:bt(Ve(c,"selectable",d)),draggable:bt(Ve(c,"draggable",d)),code:bt(Ve(c,"code",d)),defining:bt(Ve(c,"defining",d)),isolating:bt(Ve(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var v;return[y.name,{default:null===(v=y?.attribute)||void 0===v?void 0:v.default}]}))}),p=bt(Ve(c,"parseHTML",d));p&&(f.parseDOM=p.map(y=>J4(y,u)));const m=Ve(c,"renderHTML",d);m&&(f.toDOM=y=>m({node:y,HTMLAttributes:hS(y,u)}));const g=Ve(c,"renderText",d);return g&&(f.toText=g),[c.name,f]})),l=Object.fromEntries(o.map(c=>{const u=i.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=X4({...n.reduce((g,y)=>{const v=Ve(y,"extendMarkSchema",d);return{...g,...v?v(c):{}}},{}),inclusive:bt(Ve(c,"inclusive",d)),excludes:bt(Ve(c,"excludes",d)),group:bt(Ve(c,"group",d)),spanning:bt(Ve(c,"spanning",d)),code:bt(Ve(c,"code",d)),attrs:Object.fromEntries(u.map(g=>{var y;return[g.name,{default:null===(y=g?.attribute)||void 0===y?void 0:y.default}]}))}),p=bt(Ve(c,"parseHTML",d));p&&(f.parseDOM=p.map(g=>J4(g,u)));const m=Ve(c,"renderHTML",d);return m&&(f.toDOM=g=>m({mark:g,HTMLAttributes:hS(g,u)})),[c.name,f]}));return new bie({topNode:s,nodes:a,marks:l})}(this.extensions,t),this.extensions.forEach(i=>{var r;this.editor.extensionStorage[i.name]=i.storage;const o={name:i.name,options:i.options,storage:i.storage,editor:this.editor,type:fS(i.name,this.schema)};"mark"===i.type&&(null===(r=bt(Ve(i,"keepOnSplit",o)))||void 0===r||r)&&this.splittableMarks.push(i.name);const s=Ve(i,"onBeforeCreate",o);s&&this.editor.on("beforeCreate",s);const a=Ve(i,"onCreate",o);a&&this.editor.on("create",a);const l=Ve(i,"onUpdate",o);l&&this.editor.on("update",l);const c=Ve(i,"onSelectionUpdate",o);c&&this.editor.on("selectionUpdate",c);const u=Ve(i,"onTransaction",o);u&&this.editor.on("transaction",u);const d=Ve(i,"onFocus",o);d&&this.editor.on("focus",d);const h=Ve(i,"onBlur",o);h&&this.editor.on("blur",h);const f=Ve(i,"onDestroy",o);f&&this.editor.on("destroy",f)})}static resolve(e){const t=ru.sort(ru.flatten(e)),i=function Wae(n){const e=n.filter((t,i)=>n.indexOf(t)!==i);return[...new Set(e)]}(t.map(r=>r.name));return i.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${i.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r=Ve(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return r?[t,...this.flatten(r())]:t}).flat(10)}static sort(e){return e.sort((i,r)=>{const o=Ve(i,"priority")||100,s=Ve(r,"priority")||100;return o>s?-1:o{const r=Ve(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:fS(t.name,this.schema)});return r?{...e,...r()}:e},{})}get plugins(){const{editor:e}=this,t=ru.sort([...this.extensions].reverse()),i=[],r=[],o=t.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:fS(s.name,this.schema)},l=[],c=Ve(s,"addKeyboardShortcuts",a);let u={};if("mark"===s.type&&s.config.exitable&&(u.ArrowRight=()=>Or.handleExit({editor:e,mark:s})),c){const m=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:e})]));u={...u,...m}}const d=function dae(n){return new $t({props:{handleKeyDown:rS(n)}})}(u);l.push(d);const h=Ve(s,"addInputRules",a);t5(s,e.options.enableInputRules)&&h&&i.push(...h());const f=Ve(s,"addPasteRules",a);t5(s,e.options.enablePasteRules)&&f&&r.push(...f());const p=Ve(s,"addProseMirrorPlugins",a);if(p){const m=p();l.push(...m)}return l}).flat();return[Vae({editor:e,rules:i}),...$ae({editor:e,rules:r}),...o]}get attributes(){return Q4(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Mb(this.extensions);return Object.fromEntries(t.filter(i=>!!Ve(i,"addNodeView")).map(i=>{const r=this.attributes.filter(l=>l.type===i.name),o={name:i.name,options:i.options,storage:i.storage,editor:e,type:Pi(i.name,this.schema)},s=Ve(i,"addNodeView",o);return s?[i.name,(l,c,u,d)=>{const h=hS(l,r);return s()({editor:e,node:l,getPos:u,decorations:d,HTMLAttributes:h,extension:i})}]:[]}))}}function yS(n){return"Object"===function Gae(n){return Object.prototype.toString.call(n).slice(8,-1)}(n)&&n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Tb(n,e){const t={...n};return yS(n)&&yS(e)&&Object.keys(e).forEach(i=>{yS(e[i])?i in n?t[i]=Tb(n[i],e[i]):Object.assign(t,{[i]:e[i]}):Object.assign(t,{[i]:e[i]})}),t}class vn{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=bt(Ve(this,"addOptions",{name:this.name}))),this.storage=bt(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new vn(e)}configure(e={}){const t=this.extend();return t.options=Tb(this.options,e),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new vn(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=bt(Ve(t,"addOptions",{name:t.name})),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}}function n5(n,e,t){const{from:i,to:r}=e,{blockSeparator:o="\n\n",textSerializers:s={}}=t||{};let a="",l=!0;return n.nodesBetween(i,r,(c,u,d,h)=>{var f;const p=s?.[c.type.name];p?(c.isBlock&&!l&&(a+=o,l=!0),d&&(a+=p({node:c,pos:u,parent:d,index:h,range:e}))):c.isText?(a+=null===(f=c?.text)||void 0===f?void 0:f.slice(Math.max(i,u)-u,r-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}function _S(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const Yae=vn.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new $t({key:new rn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:i,selection:r}=e,{ranges:o}=r;return n5(i,{from:Math.min(...o.map(u=>u.$from.pos)),to:Math.max(...o.map(u=>u.$to.pos))},{textSerializers:_S(t)})}}})]}});function Sb(n,e,t={strict:!0}){const i=Object.keys(e);return!i.length||i.every(r=>t.strict?e[r]===n[r]:pS(e[r])?e[r].test(n[r]):e[r]===n[r])}function vS(n,e,t={}){return n.find(i=>i.type===e&&Sb(i.attrs,t))}function ole(n,e,t={}){return!!vS(n,e,t)}function bS(n,e,t={}){if(!n||!e)return;let i=n.parent.childAfter(n.parentOffset);if(n.parentOffset===i.offset&&0!==i.offset&&(i=n.parent.childBefore(n.parentOffset)),!i.node)return;const r=vS([...i.node.marks],e,t);if(!r)return;let o=i.index,s=n.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(vS([...i.node.marks],e,t);o>0&&r.isInSet(n.parent.child(o-1).marks);)o-=1,s-=n.parent.child(o).nodeSize;for(;a${n}`;return(new window.DOMParser).parseFromString(e,"text/html").body}function Ib(n,e,t){if(t={slice:!0,parseOptions:{},...t},"object"==typeof n&&null!==n)try{return Array.isArray(n)&&n.length>0?le.fromArray(n.map(i=>e.nodeFromJSON(i))):e.nodeFromJSON(n)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),Ib("",e,t)}if("string"==typeof n){const i=sh.fromSchema(e);return t.slice?i.parseSlice(wS(n),t.parseOptions).content:i.parse(wS(n),t.parseOptions)}return Ib("",e,t)}function o5(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)}function vm(n,e,t={}){const{from:i,to:r,empty:o}=n.selection,s=e?Pi(e,n.schema):null,a=[];n.doc.nodesBetween(i,r,(d,h)=>{if(d.isText)return;const f=Math.max(i,h),p=Math.min(r,h+d.nodeSize);a.push({node:d,from:f,to:p})});const l=r-i,c=a.filter(d=>!s||s.name===d.node.type.name).filter(d=>Sb(d.node.attrs,t,{strict:!1}));return o?!!c.length:c.reduce((d,h)=>d+h.to-h.from,0)>=l}function Ob(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function s5(n,e){const t="string"==typeof e?[e]:e;return Object.keys(n).reduce((i,r)=>(t.includes(r)||(i[r]=n[r]),i),{})}function a5(n,e,t={}){return Ib(n,e,{slice:!1,parseOptions:t})}function l5(n,e){for(let t=n.depth;t>0;t-=1){const i=n.node(t);if(e(i))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:i}}}function CS(n){return e=>l5(e.$from,n)}function Ab(n,e){const t=Nl(e,n.schema),{from:i,to:r,empty:o}=n.selection,s=[];o?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(i,r,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===t.name);return a?{...a.attrs}:{}}function d5(n,e){const t=Ob("string"==typeof e?e:e.name,n.schema);return"node"===t?function Rle(n,e){const t=Pi(e,n.schema),{from:i,to:r}=n.selection,o=[];n.doc.nodesBetween(i,r,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===t.name);return s?{...s.attrs}:{}}(n,e):"mark"===t?Ab(n,e):{}}function kb(n,e,t){const i=[];return n===e?t.resolve(n).marks().forEach(r=>{const s=bS(t.resolve(n-1),r.type);s&&i.push({mark:r,...s})}):t.nodesBetween(n,e,(r,o)=>{i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}function Nb(n,e,t){return Object.fromEntries(Object.entries(t).filter(([i])=>{const r=n.find(o=>o.type===e&&o.name===i);return!!r&&r.attribute.keepOnSplit}))}function MS(n,e,t={}){const{empty:i,ranges:r}=n.selection,o=e?Nl(e,n.schema):null;if(i)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>!o||o.name===d.type.name).find(d=>Sb(d.attrs,t,{strict:!1}));let s=0;const a=[];if(r.forEach(({$from:d,$to:h})=>{const f=d.pos,p=h.pos;n.doc.nodesBetween(f,p,(m,g)=>{if(!m.isText&&!m.marks.length)return;const y=Math.max(f,g),v=Math.min(p,g+m.nodeSize);s+=v-y,a.push(...m.marks.map(_=>({mark:_,from:y,to:v})))})}),0===s)return!1;const l=a.filter(d=>!o||o.name===d.mark.type.name).filter(d=>Sb(d.mark.attrs,t,{strict:!1})).reduce((d,h)=>d+h.to-h.from,0),c=a.filter(d=>!o||d.mark.type!==o&&d.mark.type.excludes(o)).reduce((d,h)=>d+h.to-h.from,0);return(l>0?l+c:l)>=s}function h5(n,e){const{nodeExtensions:t}=Mb(e),i=t.find(s=>s.name===n);if(!i)return!1;const o=bt(Ve(i,"group",{name:i.name,options:i.options,storage:i.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function ou(n,e,t){const r=n.state.doc.content.size,o=Ra(e,0,r),s=Ra(t,0,r),a=n.coordsAtPos(o),l=n.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),h=Math.max(a.right,l.right),y={top:c,bottom:u,left:d,right:h,width:h-d,height:u-c,x:d,y:c};return{...y,toJSON:()=>y}}function f5(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const i=t.filter(r=>e?.includes(r.type.name));n.tr.ensureMarks(i)}}const TS=(n,e)=>{const t=CS(s=>s.type===e)(n.selection);if(!t)return!0;const i=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return t.node.type===r?.type&&_l(n.doc,t.pos)&&n.join(t.pos),!0},SS=(n,e)=>{const t=CS(s=>s.type===e)(n.selection);if(!t)return!0;const i=n.doc.resolve(t.start).after(t.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return t.node.type===r?.type&&_l(n.doc,i)&&n.join(i),!0};var Xle=Object.freeze({__proto__:null,blur:()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),null===(t=window?.getSelection())||void 0===t||t.removeAllRanges())}),!0),clearContent:(n=!1)=>({commands:e})=>e.setContent("",n),clearNodes:()=>({state:n,tr:e,dispatch:t})=>{const{selection:i}=e,{ranges:r}=i;return t&&r.forEach(({$from:o,$to:s})=>{n.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),f=d.blockRange(h);if(!f)return;const p=ch(f);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(f.start,m)}(p||0===p)&&e.lift(f,p)})}),!0},command:n=>e=>n(e),createParagraphNear:()=>({state:n,dispatch:e})=>B4(n,e),deleteCurrentNode:()=>({tr:n,dispatch:e})=>{const{selection:t}=n,i=t.$anchor.node();if(i.content.size>0)return!1;const r=n.selection.$anchor;for(let o=r.depth;o>0;o-=1)if(r.node(o).type===i.type){if(e){const a=r.before(o),l=r.after(o);n.delete(a,l).scrollIntoView()}return!0}return!1},deleteNode:n=>({tr:e,state:t,dispatch:i})=>{const r=Pi(n,t.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r){if(i){const l=o.before(s),c=o.after(s);e.delete(l,c).scrollIntoView()}return!0}return!1},deleteRange:n=>({tr:e,dispatch:t})=>{const{from:i,to:r}=n;return t&&e.delete(i,r),!0},deleteSelection:()=>({state:n,dispatch:e})=>oS(n,e),enter:()=>({commands:n})=>n.keyboardShortcut("Enter"),exitCode:()=>({state:n,dispatch:e})=>V4(n,e),extendMarkRange:(n,e={})=>({tr:t,state:i,dispatch:r})=>{const o=Nl(n,i.schema),{doc:s,selection:a}=t,{$from:l,from:c,to:u}=a;if(r){const d=bS(l,o,e);if(d&&d.from<=c&&d.to>=u){const h=it.create(s,d.from,d.to);t.setSelection(h)}}return!0},first:n=>e=>{const t="function"==typeof n?n(e):n;for(let i=0;i({editor:t,view:i,tr:r,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{xb()&&i.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(i.focus(),e?.scrollIntoView&&t.commands.scrollIntoView())})};if(i.hasFocus()&&null===n||!1===n)return!0;if(o&&null===n&&!Eb(t.state.selection))return s(),!0;const a=r5(r.doc,n)||t.state.selection,l=t.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},forEach:(n,e)=>t=>n.every((i,r)=>e(i,{...t,index:r})),insertContent:(n,e)=>({tr:t,commands:i})=>i.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),insertContentAt:(n,e,t)=>({tr:i,dispatch:r,editor:o})=>{if(r){t={parseOptions:{},updateSelection:!0,...t};const s=Ib(e,o.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions}});if("<>"===s.toString())return!0;let{from:a,to:l}="number"==typeof n?{from:n,to:n}:n,c=!0,u=!0;if(((n=>n.toString().startsWith("<"))(s)?s:[s]).forEach(h=>{h.check(),c=!!c&&h.isText&&0===h.marks.length,u=!!u&&h.isBlock}),a===l&&u){const{parent:h}=i.doc.resolve(a);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(a-=1,l+=1)}c?Array.isArray(e)?i.insertText(e.map(h=>h.text||"").join(""),a,l):i.insertText("object"==typeof e&&e&&e.text?e.text:e,a,l):i.replaceWith(a,l,s),t.updateSelection&&function dle(n,e,t){const i=n.steps.length-1;if(i{0===s&&(s=u)}),n.setSelection(nt.near(n.doc.resolve(s),t))}(i,i.steps.length-1,-1)}return!0},joinUp:()=>({state:n,dispatch:e})=>((n,e)=>{let r,t=n.selection,i=t instanceof Ye;if(i){if(t.node.isTextblock||!_l(n.doc,t.from))return!1;r=t.from}else if(r=pj(n.doc,t.from,-1),null==r)return!1;if(e){let o=n.tr.join(r);i&&o.setSelection(Ye.create(o.doc,r-n.doc.resolve(r).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0})(n,e),joinDown:()=>({state:n,dispatch:e})=>((n,e)=>{let i,t=n.selection;if(t instanceof Ye){if(t.node.isTextblock||!_l(n.doc,t.to))return!1;i=t.to}else if(i=pj(n.doc,t.to,1),null==i)return!1;return e&&e(n.tr.join(i).scrollIntoView()),!0})(n,e),joinBackward:()=>({state:n,dispatch:e})=>N4(n,e),joinForward:()=>({state:n,dispatch:e})=>F4(n,e),keyboardShortcut:n=>({editor:e,view:t,tr:i,dispatch:r})=>{const o=function _le(n){const e=n.split(/-(?!$)/);let i,r,o,s,t=e[e.length-1];"Space"===t&&(t=" ");for(let a=0;a!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0});return e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,a))})?.steps.forEach(c=>{const u=c.map(i.mapping);u&&r&&i.maybeStep(u)}),!0},lift:(n,e={})=>({state:t,dispatch:i})=>!!vm(t,Pi(n,t.schema),e)&&((n,e)=>{let{$from:t,$to:i}=n.selection,r=t.blockRange(i),o=r&&ch(r);return null!=o&&(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)})(t,i),liftEmptyBlock:()=>({state:n,dispatch:e})=>U4(n,e),liftListItem:n=>({state:e,dispatch:t})=>function Aae(n){return function(e,t){let{$from:i,$to:r}=e.selection,o=i.blockRange(r,s=>s.childCount>0&&s.firstChild.type==n);return!!o&&(!t||(i.node(o.depth-1).type==n?function kae(n,e,t,i){let r=n.tr,o=i.end,s=i.$to.end(i.depth);om;p--)f-=r.child(p).nodeSize,i.delete(f-1,f+1);let o=i.doc.resolve(t.start),s=o.nodeAfter;if(i.mapping.map(t.end)!=t.start+o.nodeAfter.nodeSize)return!1;let a=0==t.startIndex,l=t.endIndex==r.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?le.empty:le.from(r))))return!1;let d=o.pos,h=d+s.nodeSize;return i.step(new Ni(d-(a?1:0),h+(l?1:0),d+1,h-1,new we((a?le.empty:le.from(r.copy(le.empty))).append(l?le.empty:le.from(r.copy(le.empty))),a?0:1,l?0:1),a?0:1)),e(i.scrollIntoView()),!0}(e,t,o)))}}(Pi(n,e.schema))(e,t),newlineInCode:()=>({state:n,dispatch:e})=>z4(n,e),resetAttributes:(n,e)=>({tr:t,state:i,dispatch:r})=>{let o=null,s=null;const a=Ob("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=Pi(n,i.schema)),"mark"===a&&(s=Nl(n,i.schema)),r&&t.selection.ranges.forEach(l=>{i.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&t.setNodeMarkup(u,void 0,s5(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(s5(d.attrs,e)))})})}),!0)},scrollIntoView:()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),selectAll:()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),selectNodeBackward:()=>({state:n,dispatch:e})=>L4(n,e),selectNodeForward:()=>({state:n,dispatch:e})=>j4(n,e),selectParentNode:()=>({state:n,dispatch:e})=>((n,e)=>{let r,{$from:t,to:i}=n.selection,o=t.sharedDepth(i);return 0!=o&&(r=t.before(o),e&&e(n.tr.setSelection(Ye.create(n.doc,r))),!0)})(n,e),selectTextblockEnd:()=>({state:n,dispatch:e})=>Y4(n,e),selectTextblockStart:()=>({state:n,dispatch:e})=>G4(n,e),setContent:(n,e=!1,t={})=>({tr:i,editor:r,dispatch:o})=>{const{doc:s}=i,a=a5(n,r.schema,t);return o&&i.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!e),!0},setMark:(n,e={})=>({tr:t,state:i,dispatch:r})=>{const{selection:o}=t,{empty:s,ranges:a}=o,l=Nl(n,i.schema);if(r)if(s){const c=Ab(i,l);t.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;i.doc.nodesBetween(u,d,(h,f)=>{const p=Math.max(f,u),m=Math.min(f+h.nodeSize,d);h.marks.find(y=>y.type===l)?h.marks.forEach(y=>{l===y.type&&t.addMark(p,m,l.create({...y.attrs,...e}))}):t.addMark(p,m,l.create(e))})});return function $le(n,e,t){var i;const{selection:r}=e;let o=null;if(Eb(r)&&(o=r.$cursor),o){const a=null!==(i=n.storedMarks)&&void 0!==i?i:o.marks();return!!t.isInSet(a)||!a.some(l=>l.type.excludes(t))}const{ranges:s}=r;return s.some(({$from:a,$to:l})=>{let c=0===a.depth&&n.doc.inlineContent&&n.doc.type.allowsMarkType(t);return n.doc.nodesBetween(a.pos,l.pos,(u,d,h)=>{if(c)return!1;if(u.isInline){const f=!h||h.type.allowsMarkType(t),p=!!t.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(t));c=f&&p}return!c}),c})}(i,t,l)},setMeta:(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),setNode:(n,e={})=>({state:t,dispatch:i,chain:r})=>{const o=Pi(n,t.schema);return o.isTextblock?r().command(({commands:s})=>!!q4(o,e)(t)||s.clearNodes()).command(({state:s})=>q4(o,e)(s,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:i}=e,r=Ra(n,0,i.content.size),o=Ye.create(i,r);e.setSelection(o)}return!0},setTextSelection:n=>({tr:e,dispatch:t})=>{if(t){const{doc:i}=e,{from:r,to:o}="number"==typeof n?{from:n,to:n}:n,s=it.atStart(i).from,a=it.atEnd(i).to,l=Ra(r,s,a),c=Ra(o,s,a),u=it.create(i,l,c);e.setSelection(u)}return!0},sinkListItem:n=>({state:e,dispatch:t})=>function Pae(n){return function(e,t){let{$from:i,$to:r}=e.selection,o=i.blockRange(r,c=>c.childCount>0&&c.firstChild.type==n);if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=n)return!1;if(t){let c=l.lastChild&&l.lastChild.type==a.type,u=le.from(c?n.create():null),d=new we(le.from(n.create(null,le.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;t(e.tr.step(new Ni(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}(Pi(n,e.schema))(e,t),splitBlock:({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:i,editor:r})=>{const{selection:o,doc:s}=e,{$from:a,$to:l}=o,u=Nb(r.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof Ye&&o.node.isBlock)return!(!a.parentOffset||!ka(s,a.pos)||(i&&(n&&f5(t,r.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(i){const d=l.parentOffset===l.parent.content.size;o instanceof it&&e.deleteSelection();const h=0===a.depth?void 0:function Ple(n){for(let e=0;e({tr:e,state:t,dispatch:i,editor:r})=>{var o;const s=Pi(n,t.schema),{$from:a,$to:l}=t.selection,c=t.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=r.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let g=le.empty;const y=a.index(-1)?1:a.index(-2)?2:3;for(let ne=a.depth-y;ne>=a.depth-3;ne-=1)g=le.from(a.node(ne).copy(g));const v=a.indexAfter(-1){if(T>-1)return!1;ne.isTextblock&&0===ne.content.size&&(T=K+1)}),T>-1&&e.setSelection(it.near(e.doc.resolve(T))),e.scrollIntoView()}return!0}const h=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,f=Nb(d,u.type.name,u.attrs),p=Nb(d,a.node().type.name,a.node().attrs);e.delete(a.pos,l.pos);const m=h?[{type:s,attrs:f},{type:h,attrs:p}]:[{type:s,attrs:f}];if(!ka(e.doc,a.pos,2))return!1;if(i){const{selection:g,storedMarks:y}=t,{splittableMarks:v}=r.extensionManager,w=y||g.$to.parentOffset&&g.$from.marks();if(e.split(a.pos,2,m).scrollIntoView(),!w||!i)return!0;const _=w.filter(N=>v.includes(N.type.name));e.ensureMarks(_)}return!0},toggleList:(n,e,t,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:h}=r.extensionManager,f=Pi(n,s.schema),p=Pi(e,s.schema),{selection:m,storedMarks:g}=s,{$from:y,$to:v}=m,w=y.blockRange(v),_=g||m.$to.parentOffset&&m.$from.marks();if(!w)return!1;const N=CS(T=>h5(T.type.name,d))(m);if(w.depth>=1&&N&&w.depth-N.depth<=1){if(N.node.type===f)return c.liftListItem(p);if(h5(N.node.type.name,d)&&f.validContent(N.node.content)&&a)return l().command(()=>(o.setNodeMarkup(N.pos,f),!0)).command(()=>TS(o,f)).command(()=>SS(o,f)).run()}return t&&_&&a?l().command(()=>{const T=u().wrapInList(f,i),ne=_.filter(K=>h.includes(K.type.name));return o.ensureMarks(ne),!!T||c.clearNodes()}).wrapInList(f,i).command(()=>TS(o,f)).command(()=>SS(o,f)).run():l().command(()=>!!u().wrapInList(f,i)||c.clearNodes()).wrapInList(f,i).command(()=>TS(o,f)).command(()=>SS(o,f)).run()},toggleMark:(n,e={},t={})=>({state:i,commands:r})=>{const{extendEmptyMarkRange:o=!1}=t,s=Nl(n,i.schema);return MS(i,s,e)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,e)},toggleNode:(n,e,t={})=>({state:i,commands:r})=>{const o=Pi(n,i.schema),s=Pi(e,i.schema);return vm(i,o,t)?r.setNode(s):r.setNode(o,t)},toggleWrap:(n,e={})=>({state:t,commands:i})=>{const r=Pi(n,t.schema);return vm(t,r,e)?i.lift(r):i.wrapIn(r,e)},undoInputRule:()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let i=0;i=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:i,ranges:r}=t;return i||e&&r.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0},unsetMark:(n,e={})=>({tr:t,state:i,dispatch:r})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=t,l=Nl(n,i.schema),{$from:c,empty:u,ranges:d}=a;if(!r)return!0;if(u&&s){let{from:h,to:f}=a;const p=null===(o=c.marks().find(g=>g.type===l))||void 0===o?void 0:o.attrs,m=bS(c,l,p);m&&(h=m.from,f=m.to),t.removeMark(h,f,l)}else d.forEach(h=>{t.removeMark(h.$from.pos,h.$to.pos,l)});return t.removeStoredMark(l),!0},updateAttributes:(n,e={})=>({tr:t,state:i,dispatch:r})=>{let o=null,s=null;const a=Ob("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=Pi(n,i.schema)),"mark"===a&&(s=Nl(n,i.schema)),r&&t.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;i.doc.nodesBetween(c,u,(d,h)=>{o&&o===d.type&&t.setNodeMarkup(h,void 0,{...d.attrs,...e}),s&&d.marks.length&&d.marks.forEach(f=>{if(s===f.type){const p=Math.max(h,c),m=Math.min(h+d.nodeSize,u);t.addMark(p,m,s.create({...f.attrs,...e}))}})})}),!0)},wrapIn:(n,e={})=>({state:t,dispatch:i})=>function vae(n,e=null){return function(t,i){let{$from:r,$to:o}=t.selection,s=r.blockRange(o),a=s&&a1(s,n,e);return!!a&&(i&&i(t.tr.wrap(s,a).scrollIntoView()),!0)}}(Pi(n,t.schema),e)(t,i),wrapInList:(n,e={})=>({state:t,dispatch:i})=>function Iae(n,e=null){return function(t,i){let{$from:r,$to:o}=t.selection,s=r.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&r.node(s.depth-1).type.compatibleContent(n)&&0==s.startIndex){if(0==r.index(s.depth-1))return!1;let u=t.doc.resolve(s.start-2);l=new Kv(u,u,s.depth),s.endIndex=0;u--)o=le.from(t[u].type.create(t[u].attrs,o));n.step(new Ni(e.start-(i?2:0),e.end,e.start,e.end,new we(o,0,0),t.length,!0));let s=0;for(let u=0;u({...Xle})}),tce=vn.create({name:"editable",addProseMirrorPlugins(){return[new $t({key:new rn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),nce=vn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new $t({key:new rn("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const i=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(i),!1},blur:(e,t)=>{n.isFocused=!1;const i=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(i),!1}}}})]}}),ice=vn.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:h,parent:f}=d,p=nt.atStart(c).from===h;return!(!(u&&p&&f.type.isTextblock)||f.textContent.length)&&s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),i={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},r={...i},o={...i,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return xb()||o5()?o:r},addProseMirrorPlugins(){return[new $t({key:new rn("clearDocument"),appendTransaction:(n,e,t)=>{if(!n.some(p=>p.docChanged)||e.doc.eq(t.doc))return;const{empty:r,from:o,to:s}=e.selection,a=nt.atStart(e.doc).from,l=nt.atEnd(e.doc).to;if(r||o!==a||s!==l||0!==t.doc.textBetween(0,t.doc.content.size," "," ").length)return;const d=t.tr,h=Cb({state:t,transaction:d}),{commands:f}=new Db({editor:this.editor,state:h});return f.clearNodes(),d.steps.length?d:void 0}})]}}),rce=vn.create({name:"tabindex",addProseMirrorPlugins(){return[new $t({key:new rn("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var oce=Object.freeze({__proto__:null,ClipboardTextSerializer:Yae,Commands:ece,Editable:tce,FocusEvents:nce,Keymap:ice,Tabindex:rce});class lce extends Lae{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function ace(n,e){const t=document.querySelector("style[data-tiptap-style]");if(null!==t)return t;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(i),i}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const i=Z4(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:i});this.view.updateState(r)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,i=this.state.reconfigure({plugins:this.state.plugins.filter(r=>!r.key.startsWith(t))});this.view.updateState(i)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(oce):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new ru(t,this)}createCommandManager(){this.commandManager=new Db({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=a5(this.options.content,this.schema,this.options.parseOptions),t=r5(e,this.options.autofocus);this.view=new nae(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:fh.create({doc:e,selection:t||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach(s=>{var a;return null===(a=this.capturedTransaction)||void 0===a?void 0:a.step(s)}):void(this.capturedTransaction=e);const t=this.state.apply(e),i=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),i&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),o=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return d5(this.state,e)}isActive(e,t){return function Ble(n,e,t={}){if(!e)return vm(n,null,t)||MS(n,null,t);const i=Ob(e,n.schema);return"node"===i?vm(n,e,t):"mark"===i&&MS(n,e,t)}(this.state,"string"==typeof e?e:null,"string"==typeof e?t:e)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function c5(n,e){const t=zs.fromSchema(e).serializeFragment(n),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(t),r.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:i={}}=e||{};return function u5(n,e){return n5(n,{from:0,to:n.content.size},e)}(this.state.doc,{blockSeparator:t,textSerializers:{..._S(this.schema),...i}})}get isEmpty(){return function Ule(n){var e;const t=null===(e=n.type.createAndFill())||void 0===e?void 0:e.toJSON(),i=n.toJSON();return JSON.stringify(t)===JSON.stringify(i)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null!==(e=this.view)&&void 0!==e&&e.docView)}}function su(n){return new _m({find:n.find,handler:({state:e,range:t,match:i})=>{const r=bt(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=e,s=i[i.length-1],a=i[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(kb(t.from,t.to,e.doc).filter(f=>f.mark.type.excluded.find(m=>m===n.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function p5(n){return new _m({find:n.find,handler:({state:e,range:t,match:i})=>{const r=bt(n.getAttributes,void 0,i)||{},{tr:o}=e,s=t.from;let a=t.to;if(i[1]){let c=s+i[0].lastIndexOf(i[1]);c>a?c=a:a=c+i[1].length,o.insertText(i[0][i[0].length-1],s+i[0].length-1),o.replaceWith(c,a,n.type.create(r))}else i[0]&&o.replaceWith(s,a,n.type.create(r))}})}function ES(n){return new _m({find:n.find,handler:({state:e,range:t,match:i})=>{const r=e.doc.resolve(t.from),o=bt(n.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,o)}})}function bm(n){return new _m({find:n.find,handler:({state:e,range:t,match:i,chain:r})=>{const o=bt(n.getAttributes,void 0,i)||{},s=e.tr.delete(t.from,t.to),l=s.doc.resolve(t.from).blockRange(),c=l&&a1(l,n.type,o);if(!c)return null;if(s.wrap(l,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:h}=e,{splittableMarks:f}=n.editor.extensionManager,p=h||d.$to.parentOffset&&d.$from.marks();if(p){const m=p.filter(g=>f.includes(g.type.name));s.ensureMarks(m)}}if(n.keepAttributes){const d="bulletList"===n.type.name||"orderedList"===n.type.name?"listItem":"taskList";r().updateAttributes(d,o).run()}const u=s.doc.resolve(t.from-1).nodeBefore;u&&u.type===n.type&&_l(s.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(i,u))&&s.join(t.from-1)}})}class Or{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=bt(Ve(this,"addOptions",{name:this.name}))),this.storage=bt(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Or(e)}configure(e={}){const t=this.extend();return t.options=Tb(this.options,e),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Or(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=bt(Ve(t,"addOptions",{name:t.name})),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:i}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const s=r.marks();if(!s.find(c=>c?.type.name===t.name))return!1;const l=s.find(c=>c?.type.name===t.name);return l&&i.removeStoredMark(l),i.insertText(" ",r.pos),e.view.dispatch(i),!0}return!1}}class Rn{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=bt(Ve(this,"addOptions",{name:this.name}))),this.storage=bt(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Rn(e)}configure(e={}){const t=this.extend();return t.options=Tb(this.options,e),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Rn(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=bt(Ve(t,"addOptions",{name:t.name})),t.storage=bt(Ve(t,"addStorage",{name:t.name,options:t.options})),t}}class cce{constructor(e,t,i){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...i},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,i,r,o,s,a,l;const{view:c}=this.editor,u=e.target,d=3===u.nodeType?null===(t=u.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||null!==(i=this.contentDOM)&&void 0!==i&&i.contains(u)||!d)return;let h=0,f=0;if(this.dom!==d){const g=this.dom.getBoundingClientRect(),y=d.getBoundingClientRect(),v=null!==(r=e.offsetX)&&void 0!==r?r:null===(o=e.nativeEvent)||void 0===o?void 0:o.offsetX,w=null!==(s=e.offsetY)&&void 0!==s?s:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;h=y.x-g.x+v,f=y.y-g.y+w}null===(l=e.dataTransfer)||void 0===l||l.setDragImage(this.dom,h,f);const p=Ye.create(c.state.doc,this.getPos()),m=c.state.tr.setSelection(p);c.dispatch(m)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const i=e.target;if(!this.dom.contains(i)||null!==(t=this.contentDOM)&&void 0!==t&&t.contains(i))return!1;const o=e.type.startsWith("drag"),s="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(i.tagName)||i.isContentEditable)&&!s&&!o)return!0;const{isEditable:l}=this.editor,{isDragging:c}=this,u=!!this.node.type.spec.draggable,d=Ye.isSelectable(this.node),h="copy"===e.type,f="paste"===e.type,p="cut"===e.type,m="mousedown"===e.type;if(!u&&d&&o&&e.preventDefault(),u&&o&&!c)return e.preventDefault(),!1;if(u&&l&&!c&&m){const g=i.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||s||h||f||p||m&&d)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!(!this.node.isLeaf&&!this.node.isAtom&&("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&xb()&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(i=>i.isContentEditable)||(this.contentDOM!==e.target||"attributes"!==e.type)&&this.contentDOM.contains(e.target))))}updateAttributes(e){this.editor.commands.command(({tr:t})=>{const i=this.getPos();return t.setNodeMarkup(i,void 0,{...this.node.attrs,...e}),!0})}deleteNode(){const e=this.getPos();this.editor.commands.deleteRange({from:e,to:e+this.node.nodeSize})}}function Pl(n){return new gS({find:n.find,handler:({state:e,range:t,match:i})=>{const r=bt(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=e,s=i[i.length-1],a=i[0];let l=t.to;if(s){const c=a.search(/\S/),u=t.from+a.indexOf(s),d=u+s.length;if(kb(t.from,t.to,e.doc).filter(f=>f.mark.type.excluded.find(m=>m===n.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;dt.from&&o.delete(t.from+c,u),l=t.from+c+s.length,o.addMark(t.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function dce(n){return new gS({find:n.find,handler({match:e,chain:t,range:i}){const r=bt(n.getAttributes,void 0,e);if(!1===r||null===r)return null;e.input&&t().deleteRange(i).insertContentAt(i.from,{type:n.type.name,attrs:r})}})}function m5(n,e,t,i,r,o,s){try{var a=n[o](s),l=a.value}catch(c){return void t(c)}a.done?e(l):Promise.resolve(l).then(i,r)}function au(n){return function(){var e=this,t=arguments;return new Promise(function(i,r){var o=n.apply(e,t);function s(l){m5(o,i,r,s,a,"next",l)}function a(l){m5(o,i,r,s,a,"throw",l)}s(void 0)})}}const fce=new rn("suggestion");function pce({pluginKey:n=fce,editor:e,char:t="@",allowSpaces:i=!1,allowedPrefixes:r=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:d=(()=>!0)}){let h;const f=u?.(),p=new $t({key:n,view(){var g,m=this;return{update:(g=au(function*(y,v){var w,_,N,T,ne,K,Ne;const He=null===(w=m.key)||void 0===w?void 0:w.getState(v),gt=null===(_=m.key)||void 0===_?void 0:_.getState(y.state),at=He.active&>.active&&He.range.from!==gt.range.from,ot=!He.active&>.active,pn=He.active&&!gt.active,ae=ot||at,fe=!ot&&!pn&&He.query!==gt.query&&!at,be=pn||at;if(!ae&&!fe&&!be)return;const Ue=be&&!ae?He:gt,It=y.dom.querySelector(`[data-decoration-id="${Ue.decorationId}"]`);h={editor:e,range:Ue.range,query:Ue.query,text:Ue.text,items:[],command:ln=>{l({editor:e,range:Ue.range,props:ln})},decorationNode:It,clientRect:It?()=>{var ln;const{decorationId:zt}=null===(ln=m.key)||void 0===ln?void 0:ln.getState(e.state);return y.dom.querySelector(`[data-decoration-id="${zt}"]`)?.getBoundingClientRect()||null}:null},ae&&(null===(N=f?.onBeforeStart)||void 0===N||N.call(f,h)),fe&&(null===(T=f?.onBeforeUpdate)||void 0===T||T.call(f,h)),(fe||ae)&&(h.items=yield c({editor:e,query:Ue.query})),be&&(null===(ne=f?.onExit)||void 0===ne||ne.call(f,h)),fe&&(null===(K=f?.onUpdate)||void 0===K||K.call(f,h)),ae&&(null===(Ne=f?.onStart)||void 0===Ne||Ne.call(f,h))}),function(v,w){return g.apply(this,arguments)}),destroy:()=>{var g;h&&(null===(g=f?.onExit)||void 0===g||g.call(f,h))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(m,g,y,v){const{isEditable:w}=e,{composing:_}=e.view,{selection:N}=m,{empty:T,from:ne}=N,K={...g};if(K.composing=_,w&&(T||e.view.composing)){(neg.range.to)&&!_&&!g.composing&&(K.active=!1);const Ne=function hce(n){var e;const{char:t,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:s}=n,a=function uce(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}(t),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=i?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),d=(null===(e=s.nodeBefore)||void 0===e?void 0:e.isText)&&s.nodeBefore.text;if(!d)return null;const h=s.pos-d.length,f=Array.from(d.matchAll(u)).pop();if(!f||void 0===f.input||void 0===f.index)return null;const p=f.input.slice(Math.max(0,f.index-1),f.index),m=new RegExp(`^[${r?.join("")}\0]?$`).test(p);if(null!==r&&!m)return null;const g=h+f.index;let y=g+f[0].length;return i&&l.test(d.slice(y-1,y+1))&&(f[0]+=" ",y+=1),g=s.pos?{range:{from:g,to:y},query:f[0].slice(t.length),text:f[0]}:null}({char:t,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:N.$from}),He=`id_${Math.floor(4294967295*Math.random())}`;Ne&&d({editor:e,state:v,range:Ne.range})?(K.active=!0,K.decorationId=g.decorationId?g.decorationId:He,K.range=Ne.range,K.query=Ne.query,K.text=Ne.text):K.active=!1}else K.active=!1;return K.active||(K.decorationId=null,K.range={from:0,to:0},K.query=null,K.text=null),K}},props:{handleKeyDown(m,g){var y;const{active:v,range:w}=p.getState(m.state);return v&&(null===(y=f?.onKeyDown)||void 0===y?void 0:y.call(f,{view:m,event:g,range:w}))||!1},decorations(m){const{active:g,range:y,decorationId:v}=p.getState(m);return g?Ln.create(m.doc,[Ei.inline(y.from,y.to,{nodeName:s,class:a,"data-decoration-id":v})]):null}}});return p}const mce=function(){return{padding:".75rem 2rem",borderRadius:"2px"}};function gce(n,e){if(1&n){const t=Qe();I(0,"button",2),de("mousedown",function(){return ge(t),ye(M().back.emit())}),A()}2&n&&qn(uo(2,mce))}class Th{constructor(){this.title="No Results",this.showBackBtn=!1,this.back=new re}}function yce(n,e){if(1&n&&(I(0,"i",7),Te(1),A()),2&n){const t=M();C(1),Ot(t.url)}}function _ce(n,e){1&n&&_e(0,"dot-contentlet-thumbnail",9),2&n&&b("contentlet",M(2).data.contentlet)("width",42)("height",42)("iconSize","42px")}function vce(n,e){if(1&n&&E(0,_ce,1,4,"dot-contentlet-thumbnail",8),2&n){const t=M(),i=Cn(10);b("ngIf",null==t.data?null:t.data.contentlet)("ngIfElse",i)}}function bce(n,e){if(1&n&&(I(0,"span",10),Te(1),A()),2&n){const t=M();C(1),Ot(t.data.contentlet.url)}}function wce(n,e){if(1&n&&(I(0,"div",11),_e(1,"dot-state-icon",12),I(2,"dot-badge",13),Te(3),Eo(4,"lowercase"),A()()),2&n){const t=M();C(1),b("state",t.data.contentlet),C(2),Ot(xo(4,2,t.data.contentlet.language))}}function Cce(n,e){1&n&&_e(0,"img",14),2&n&&b("src",M().url,Ja)}Th.\u0275fac=function(e){return new(e||Th)},Th.\u0275cmp=xe({type:Th,selectors:[["dot-empty-message"]],inputs:{title:"title",showBackBtn:"showBackBtn"},outputs:{back:"back"},decls:2,vars:2,consts:[[3,"innerHTML"],["pButton","","class","p-button-outlined","label","Back","type","submit",3,"style","mousedown",4,"ngIf"],["pButton","","label","Back","type","submit",1,"p-button-outlined",3,"mousedown"]],template:function(e,t){1&e&&(_e(0,"p",0),E(1,gce,1,3,"button",1)),2&e&&(b("innerHTML",t.title,kf),C(1),b("ngIf",t.showBackBtn))},dependencies:[nn,ds],styles:["[_nghost-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:16px;height:240px}"]});class lu{constructor(e){this.element=e,this.role="list-item",this.tabindex="-1",this.disabled=!1,this.label="",this.url="",this.page=!1,this.data=null,this.icon=!1}onMouseDown(e){e.preventDefault(),this.disabled||this.command()}ngOnInit(){this.icon=this.icon="string"==typeof this.url&&!(this.url.split("/").length>1)}getLabel(){return this.element.nativeElement.innerText}focus(){this.element.nativeElement.style="background: #eee"}unfocus(){this.element.nativeElement.style=""}scrollIntoView(){if(!this.isIntoView()){const e=this.element.nativeElement,t=e.parentElement,{top:i,top:r,height:o}=t.getBoundingClientRect(),{top:s,bottom:a}=e.getBoundingClientRect(),l=s-i,c=a-r;t.scrollTop+=this.alignToTop()?l:c-o}}isIntoView(){const{bottom:e,top:t}=this.element.nativeElement.getBoundingClientRect(),i=this.element.nativeElement.parentElement.getBoundingClientRect();return t>=i.top&&e<=i.bottom}alignToTop(){const{top:e}=this.element.nativeElement.getBoundingClientRect(),{top:t}=this.element.nativeElement.parentElement.getBoundingClientRect();return e span[_ngcontent-%COMP%]{overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;margin-bottom:4px}.data-wrapper[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{color:#afb3c0;font-size:14.4px}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:8px;display:flex;align-items:flex-end}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] dot-state-icon[_ngcontent-%COMP%]{margin-right:8px}"]});class Sh{constructor(){this.id="editor-suggestion-list",this.suggestionItems=[],this.destroy$=new se,this.mouseMove=!0}onMouseMove(){this.mouseMove=!0}onMouseOver(e){const t=e.target,i=t.dataset?.index;if(isNaN(i)||!this.mouseMove)return;const r=Number(t?.dataset.index);t.getAttribute("disabled")?this.keyManager.activeItem?.unfocus():this.updateActiveItem(r)}onMouseDownHandler(e){e.preventDefault()}ngAfterViewInit(){this.keyManager=new HL(this.items).withWrap(),requestAnimationFrame(()=>this.setFirstItemActive()),this.items.changes.pipe(Tn(this.destroy$)).subscribe(()=>requestAnimationFrame(()=>this.setFirstItemActive()))}ngOnDestroy(){this.destroy$.next(!0)}updateSelection(e){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(e),this.keyManager.activeItem?.scrollIntoView(),this.mouseMove=!1}execCommand(){this.keyManager.activeItem.command()}setFirstItemActive(){this.keyManager.activeItem?.unfocus(),this.keyManager.setFirstItemActive(),this.keyManager.activeItem?.focus()}resetKeyManager(){this.keyManager.activeItem?.unfocus(),this.keyManager=new HL(this.items).withWrap(),this.setFirstItemActive()}updateActiveItem(e){this.keyManager.activeItem?.unfocus(),this.keyManager.setActiveItem(e)}}function Mce(n,e){1&n&&(I(0,"div",1),_e(1,"div",2),I(2,"div",3)(3,"div",4)(4,"div"),_e(5,"span",5)(6,"span",6),A(),I(7,"div",7),_e(8,"span",8)(9,"span",9),A()()()())}Sh.\u0275fac=function(e){return new(e||Sh)},Sh.\u0275cmp=xe({type:Sh,selectors:[["dot-suggestion-list"]],contentQueries:function(e,t,i){if(1&e&&pi(i,lu,4),2&e){let r;Xe(r=et())&&(t.items=r)}},hostVars:1,hostBindings:function(e,t){1&e&&de("mousemove",function(r){return t.onMouseMove(r)})("mouseover",function(r){return t.onMouseOver(r)})("mousedown",function(r){return t.onMouseDownHandler(r)}),2&e&&Yt("id",t.id)},inputs:{suggestionItems:"suggestionItems"},ngContentSelectors:["*"],decls:1,vars:0,template:function(e,t){1&e&&(So(),_r(0))},styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}"]});class wm{constructor(){this.items=Array(4).fill(0)}}wm.\u0275fac=function(e){return new(e||wm)},wm.\u0275cmp=xe({type:wm,selectors:[["dot-suggestion-loading-list"]],decls:1,vars:1,consts:[["class","card",4,"ngFor","ngForOf"],[1,"card"],[1,"image","skeleton"],[1,"body"],[1,"data-wrapper"],[1,"title","skeleton"],[1,"subtitle","skeleton"],[1,"state"],[1,"circle","skeleton"],[1,"meta","skeleton"]],template:function(e,t){1&e&&E(0,Mce,10,0,"div",0),2&e&&b("ngForOf",t.items)},dependencies:[Hr],styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.skeleton[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_skeleton-loading 1s linear infinite alternate}.card[_ngcontent-%COMP%]{width:100%;max-height:80px;box-sizing:border-box;display:flex;gap:1rem;padding:8px;background-color:#fff;cursor:pointer}.image[_ngcontent-%COMP%]{min-width:64px;min-height:64px;background:#14151a}.body[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%]{overflow:hidden;height:100%;display:flex;flex-direction:column;justify-content:space-between}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:80%;overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;background-color:#14151a;height:12px;border-radius:5px;margin-bottom:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:85%;height:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;align-items:center}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]{width:16px;height:16px;background:#000;border-radius:100%;margin-right:.5rem}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{width:30px;height:10px;background:#000;border-radius:4px}@keyframes _ngcontent-%COMP%_skeleton-loading{0%{background-color:#ccc}to{background-color:#f2f2f2}}"]});class Ll{constructor(e){this.http=e}get defaultHeaders(){const e=new Cr;return e.set("Accept","*/*").set("Content-Type","application/json"),e}getLanguages(){return this.languages?Re(this.languages):this.http.get("/api/v2/languages",{headers:this.defaultHeaders}).pipe(Oe("entity"),ue(e=>{const t=this.getDotLanguageObject(e);return this.languages=t,t}))}getDotLanguageObject(e){return e.reduce((t,i)=>Object.assign(t,{[i.id]:i}),{})}}Ll.\u0275fac=function(e){return new(e||Ll)(F(tr))},Ll.\u0275prov=$({token:Ll,factory:Ll.\u0275fac,providedIn:"root"});const Tce={SHOW_VIDEO_THUMBNAIL:!0};class cu{constructor(){this.config=Tce}get configObject(){return this.config}setProperty(e,t){this.config={...this.config,[e]:t}}getProperty(e){return this.config[e]||!1}}function g5(n,e){return n.replace(/{(\d+)}/g,(t,i)=>typeof e[i]<"u"?e[i]:t)}cu.\u0275fac=function(e){return new(e||cu)},cu.\u0275prov=$({token:cu,factory:cu.\u0275fac,providedIn:"root"});class Cm{constructor(){this.display=!1}show(){this.display=!0}hide(){this.display=!1}}Cm.\u0275fac=function(e){return new(e||Cm)},Cm.\u0275prov=$({token:Cm,factory:Cm.\u0275fac,providedIn:"root"});class Eh{constructor(e){this.coreWebService=e,this.currentUsersUrl="v1/users/current/",this.userPermissionsUrl="v1/permissions/_bypermissiontype?userid={0}",this.porletAccessUrl="v1/portlet/{0}/_doesuserhaveaccess"}getCurrentUser(){return this.coreWebService.request({url:this.currentUsersUrl}).pipe(ue(e=>e))}getUserPermissions(e,t=[],i=[]){let r=t.length?`${this.userPermissionsUrl}&permission={1}`:this.userPermissionsUrl;r=i.length?`${r}&permissiontype={2}`:r;const o=g5(r,[e,t.join(","),i.join(",")]);return this.coreWebService.requestView({url:o}).pipe(Tt(1),Oe("entity"))}hasAccessToPortlet(e){return this.coreWebService.requestView({url:this.porletAccessUrl.replace("{0}",e)}).pipe(Tt(1),Oe("entity","response"))}}Eh.\u0275fac=function(e){return new(e||Eh)(F(Ut))},Eh.\u0275prov=$({token:Eh,factory:Eh.\u0275fac});class Dm{constructor(e,t){this.coreWebService=e,this.currentUser=t,this.bundleUrl="api/bundle/getunsendbundles/userid",this.addToBundleUrl="/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle"}getBundles(){return this.currentUser.getCurrentUser().pipe(Xn(e=>this.coreWebService.requestView({url:`${this.bundleUrl}/${e.userId}`}).pipe(Oe("bodyJsonObject","items"))))}addToBundle(e,t){return this.coreWebService.request({body:`assetIdentifier=${e}&bundleName=${t.name}&bundleSelect=${t.id}`,headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"POST",url:this.addToBundleUrl}).pipe(ue(i=>i))}}Dm.\u0275fac=function(e){return new(e||Dm)(F(Ut),F(Eh))},Dm.\u0275prov=$({token:Dm,factory:Dm.\u0275fac});const _5=n=>{const e=parseInt(n,0);if(e)return e;try{return JSON.parse(n)}catch{return n}};class xh{setItem(e,t){let i;i="object"==typeof t?JSON.stringify(t):t,localStorage.setItem(e,i)}getItem(e){const t=localStorage.getItem(e);return _5(t)}removeItem(e){localStorage.removeItem(e)}clear(){localStorage.clear()}listen(e){return dv(window,"storage").pipe(Un(({key:t})=>t===e),ue(t=>_5(t.newValue)))}}xh.\u0275fac=function(e){return new(e||xh)},xh.\u0275prov=$({token:xh,factory:xh.\u0275fac,providedIn:"root"});class ps{constructor(e,t){this.http=e,this.dotLocalstorageService=t,this.messageMap={},this.MESSAGES_LOCALSTORAGE_KEY="dotMessagesKeys",this.BUILDATE_LOCALSTORAGE_KEY="buildDate"}init(e){if(e&&(this.dotLocalstorageService.getItem(this.BUILDATE_LOCALSTORAGE_KEY)!==e?.buildDate||e.language))this.getAll(e.language||"default"),e.buildDate&&this.dotLocalstorageService.setItem(this.BUILDATE_LOCALSTORAGE_KEY,e.buildDate);else{const t=this.dotLocalstorageService.getItem(this.MESSAGES_LOCALSTORAGE_KEY);t?this.messageMap=t:this.getAll(e?.language||"default")}}get(e,...t){return this.messageMap[e]?t.length?g5(this.messageMap[e],t):this.messageMap[e]:e}getAll(e){this.http.get(this.geti18nURL(e)).pipe(Tt(1),Oe("entity")).subscribe(t=>{this.messageMap=t,this.dotLocalstorageService.setItem(this.MESSAGES_LOCALSTORAGE_KEY,this.messageMap)})}geti18nURL(e){return`/api/v2/languages/${e||"default"}/keys`}}ps.\u0275fac=function(e){return new(e||ps)(F(tr),F(xh))},ps.\u0275prov=$({token:ps,factory:ps.\u0275fac,providedIn:"root"});class Mm{constructor(e,t){this.confirmationService=e,this.dotMessageService=t,this.alertModel=null,this.confirmModel=null,this._confirmDialogOpened$=new se}get confirmDialogOpened$(){return this._confirmDialogOpened$.asObservable()}confirm(e){e.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),reject:this.dotMessageService.get("dot.common.dialog.reject"),...e.footerLabel},this.confirmModel=e,setTimeout(()=>{this.confirmationService.confirm(e),this._confirmDialogOpened$.next(!0)},0)}alert(e){e.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),...e.footerLabel},this.alertModel=e,setTimeout(()=>{this._confirmDialogOpened$.next(!0)},0)}alertAccept(e){this.alertModel.accept&&this.alertModel.accept(e),this.alertModel=null}alertReject(e){this.alertModel.reject&&this.alertModel.reject(e),this.alertModel=null}clearConfirm(){this.confirmModel=null}}Mm.\u0275fac=function(e){return new(e||Mm)(F(DL),F(ps))},Mm.\u0275prov=$({token:Mm,factory:Mm.\u0275fac});class Ih{constructor(e){this.http=e}getFiltered(e,t,i=!1){return this.http.get(`/api/v1/containers/?filter=${e}&perPage=${t}&system=${i}`).pipe(Oe("entity"))}}function Oce(n,e,t){return 0===t?[e]:(n.push(e),n)}Ih.\u0275fac=function(e){return new(e||Ih)(F(tr))},Ih.\u0275prov=$({token:Ih,factory:Ih.\u0275fac});class Tm{constructor(e){this.coreWebService=e}getContentType(e){return this.coreWebService.requestView({url:`v1/contenttype/id/${e}`}).pipe(Tt(1),Oe("entity"))}getContentTypes({filter:e="",page:t=40,type:i=""}){return this.coreWebService.requestView({url:`/api/v1/contenttype?filter=${e}&orderby=name&direction=ASC&per_page=${t}${i?`&type=${i}`:""}`}).pipe(Oe("entity"))}getAllContentTypes(){return this.getBaseTypes().pipe(sf(e=>e),Un(e=>!this.isRecentContentType(e))).pipe(function Ace(){return function Ice(n,e){return arguments.length>=2?function(i){return he(Cv(n,e),Cp(1),Yd(e))(i)}:function(i){return he(Cv((r,o,s)=>n(r,o,s+1)),Cp(1))(i)}}(Oce,[])}())}filterContentTypes(e="",t=""){return this.coreWebService.requestView({body:{filter:{types:t,query:e},orderBy:"name",direction:"ASC",perPage:40},method:"POST",url:"/api/v1/contenttype/_filter"}).pipe(Oe("entity"))}getUrlById(e){return this.getBaseTypes().pipe(sf(t=>t),Oe("types"),sf(t=>t),Un(t=>t.variable.toLocaleLowerCase()===e),Oe("action"))}isContentTypeInMenu(e){return this.getUrlById(e).pipe(ue(t=>!!t),Yd(!1))}saveCopyContentType(e,t){return this.coreWebService.requestView({body:{...t},method:"POST",url:`/api/v1/contenttype/${e}/_copy`}).pipe(Oe("entity"))}isRecentContentType(e){return e.name.startsWith("RECENT")}getBaseTypes(){return this.coreWebService.requestView({url:"v1/contenttype/basetypes"}).pipe(Oe("entity"))}}Tm.\u0275fac=function(e){return new(e||Tm)(F(Ut))},Tm.\u0275prov=$({token:Tm,factory:Tm.\u0275fac});class Sm{constructor(){this.contentTypeInfoCollection=[{clazz:"com.dotcms.contenttype.model.type.ImmutableSimpleContentType",icon:"event_note",label:"content"},{clazz:"com.dotcms.contenttype.model.type.ImmutableWidgetContentType",icon:"settings",label:"widget"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFileAssetContentType",icon:"insert_drive_file",label:"fileasset"},{clazz:"com.dotcms.contenttype.model.type.ImmutableDotAssetContentType",icon:"file_copy",label:"dotasset"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePageContentType",icon:"description",label:"htmlpage"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePersonaContentType",icon:"person",label:"persona"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFormContentType",icon:"format_list_bulleted",label:"form"},{clazz:"com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType",icon:"format_strikethrough",label:"vanity_url"},{clazz:"com.dotcms.contenttype.model.type.ImmutableKeyValueContentType",icon:"public",label:"key_value"},{clazz:"com.dotcms.contenttype.model.type.ImmutableSimpleContentType",icon:"fa fa-newspaper-o",label:"content_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableWidgetContentType",icon:"fa fa-cog",label:"widget_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFileAssetContentType",icon:"fa fa-file-o",label:"fileasset_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableDotAssetContentType",icon:"fa fa-files-o",label:"dotasset_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePageContentType",icon:"fa fa-file-text-o",label:"htmlpage_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutablePersonaContentType",icon:"fa fa-user",label:"persona_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableFormContentType",icon:"fa fa-list",label:"form_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableVanityUrlContentType",icon:"fa fa-map-signs",label:"vanity_url_old"},{clazz:"com.dotcms.contenttype.model.type.ImmutableKeyValueContentType",icon:"fa fa-globe",label:"key_value_old"}]}getIcon(e){return this.getItem(e,"icon")}getClazz(e){return this.getItem(e,"clazz")}getLabel(e){return this.getItem(e,"label")}getItem(e,t){let i,r=!1;if(e.indexOf("_old")>0&&(r=!0,e=e.replace("_old","")),e){e=this.getTypeName(e);for(let o=0;or.lift(function kce({bufferSize:n=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:t,scheduler:i}){let r,s,o=0,a=!1,l=!1;return function(u){let d;o++,!r||a?(a=!1,r=new A_(n,e,i),d=r.subscribe(this),s=u.subscribe({next(h){r.next(h)},error(h){a=!0,r.error(h)},complete(){l=!0,s=void 0,r.complete()}}),l&&(s=void 0)):d=r.subscribe(this),this.add(()=>{o--,d.unsubscribe(),d=void 0,s&&!l&&t&&0===o&&(s.unsubscribe(),s=void 0,r=void 0)})}}(i))}xm.\u0275fac=function(e){return new(e||xm)(F(Ut))},xm.\u0275prov=$({token:xm,factory:xm.\u0275fac});class Im{constructor(e){this.http=e}copyInPage(e){const t={...e,personalization:e?.personalization||"dot:default"};return this.http.put("/api/v1/page/copyContent",t).pipe(v5(),Oe("entity"))}}Im.\u0275fac=function(e){return new(e||Im)(F(tr))},Im.\u0275prov=$({token:Im,factory:Im.\u0275fac,providedIn:"root"});class Om{constructor(e){this.coreWebService=e}postData(e,t){return this.coreWebService.requestView({body:t,method:"POST",url:`${e}`}).pipe(Oe("entity"))}putData(e,t){return this.coreWebService.requestView({body:t,method:"PUT",url:`${e}`}).pipe(Oe("entity"))}getDataById(e,t,i="entity"){return this.coreWebService.requestView({url:`${e}/id/${t}`}).pipe(Oe(i))}delete(e,t){return this.coreWebService.requestView({method:"DELETE",url:`${e}/${t}`}).pipe(Oe("entity"))}}Om.\u0275fac=function(e){return new(e||Om)(F(Ut))},Om.\u0275prov=$({token:Om,factory:Om.\u0275fac});class Am{constructor(e){this.coreWebService=e}get(){return this.coreWebService.requestView({url:["api","content","respectFrontendRoles/false","render/false","query/+contentType:previewDevice +live:true +deleted:false +working:true","limit/40/orderby/title"].join("/")}).pipe(Oe("contentlets"))}}Am.\u0275fac=function(e){return new(e||Am)(F(Ut))},Am.\u0275prov=$({token:Am,factory:Am.\u0275fac});class Fa{setVariationId(e){sessionStorage.setItem(Up,e)}getVariationId(){return sessionStorage.getItem(Up)||"DEFAULT"}removeVariantId(){sessionStorage.removeItem(Up)}}Fa.\u0275fac=function(e){return new(e||Fa)},Fa.\u0275prov=$({token:Fa,factory:Fa.\u0275fac});class km{constructor(e,t){this.coreWebService=e,this.dotSessionStorageService=t}save(e,t){const i={method:"POST",body:t,url:`v1/page/${e}/content`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Oe("entity"))}whatChange(e,t){return this.coreWebService.requestView({url:`v1/page/${e}/render/versions?langId=${t}`}).pipe(Oe("entity"))}}km.\u0275fac=function(e){return new(e||km)(F(Ut),F(Fa))},km.\u0275prov=$({token:km,factory:km.\u0275fac});var Pb=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(Pb||(Pb={})),Pb))();class Nm{constructor(e){this.coreWebService=e,this._paginationPerPage=40,this._offset="0",this._url="/api/content/_search",this._defaultQueryParams={"+languageId":"1","+deleted":"false","+working":"true"},this._sortField="modDate",this._sortOrder=Pb.DESC,this._extraParams=new Map(Object.entries(this._defaultQueryParams))}get(e){this.setBaseParams(e);const t=this.getESQuery(e,this.getObjectFromMap(this._extraParams));return this.coreWebService.requestView({body:JSON.stringify(t),method:"POST",url:this._url}).pipe(Oe("entity"),Tt(1))}setExtraParams(e,t){null!=t&&this._extraParams.set(e,t.toString())}getESQuery(e,t){return{query:`${e.query} ${JSON.stringify(t).replace(/["{},]/g," ")}`,sort:`${this._sortField||""} ${this._sortOrder||""}`,limit:this._paginationPerPage,offset:this._offset}}setBaseParams(e){this._extraParams.clear(),this._paginationPerPage=e.itemsPerPage||this._paginationPerPage,this._sortField=e.sortField||this._sortField,this._sortOrder=e.sortOrder||this._sortOrder,this._offset=e.offset||this._offset,e.lang&&this.setExtraParams("+languageId",e.lang);let t=e.filter||"";t&&t.indexOf(" ")>0&&(t=`'${t.replace(/'/g,"\\'")}'`),t&&this.setExtraParams("+title",`${t}*`)}getObjectFromMap(e){return Array.from(e).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}}Nm.\u0275fac=function(e){return new(e||Nm)(F(Ut))},Nm.\u0275prov=$({token:Nm,factory:Nm.\u0275fac});class Oh{constructor(){this.subject=new se}listen(e){return this.subject.asObservable().pipe(Un(t=>t.name===e))}notify(e,t){this.subject.next({name:e,data:t})}}Oh.\u0275fac=function(e){return new(e||Oh)},Oh.\u0275prov=$({token:Oh,factory:Oh.\u0275fac});class Pm{constructor(){this.data=new se}get showDialog$(){return this.data.asObservable()}open(e){this.data.next(e)}}Pm.\u0275fac=function(e){return new(e||Pm)},Pm.\u0275prov=$({token:Pm,factory:Pm.\u0275fac});class Lm{constructor(e){this.coreWebService=e}get(e){return this.coreWebService.requestView({url:e?`v2/languages?contentInode=${e}`:"v2/languages"}).pipe(Oe("entity"))}}Lm.\u0275fac=function(e){return new(e||Lm)(F(Ut))},Lm.\u0275prov=$({token:Lm,factory:Lm.\u0275fac});const Lce=[{icon:"tune",titleKey:"com.dotcms.repackage.javax.portlet.title.rules",url:"/rules"},{icon:"cloud_upload",titleKey:"com.dotcms.repackage.javax.portlet.title.publishing-queue",url:"/c/publishing-queue"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.site-search",url:"/c/site-search"},{icon:"person",titleKey:"com.dotcms.repackage.javax.portlet.title.personas",url:"/c/c_Personas"},{icon:"update",titleKey:"com.dotcms.repackage.javax.portlet.title.time-machine",url:"/c/time-machine"},{icon:"device_hub",titleKey:"com.dotcms.repackage.javax.portlet.title.workflow-schemes",url:"/c/workflow-schemes"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.es-search",url:"/c/es-search"},{icon:"business",titleKey:"Forms-and-Form-Builder",url:"/forms"},{icon:"apps",titleKey:"com.dotcms.repackage.javax.portlet.title.apps",url:"/apps"},{icon:"integration_instructions",titleKey:"com.dotcms.repackage.javax.portlet.title.velocity",url:"/c/velocity_playground"}];class Rm{constructor(e){this.coreWebService=e,this.unlicenseData=new Wr({icon:"",titleKey:"",url:""}),this.licenseURL="v1/appconfiguration"}isEnterprise(){return this.getLicense().pipe(ue(e=>e.level>=200))}canAccessEnterprisePortlet(e){return this.isEnterprise().pipe(Tt(1),ue(t=>{const i=this.checksIfEnterpriseUrl(e);return!i||i&&t}))}checksIfEnterpriseUrl(e){const t=Lce.filter(i=>0===e.indexOf(i.url));return t.length&&this.unlicenseData.next(...t),!!t.length}getLicense(){return this.license?Re(this.license):this.coreWebService.requestView({url:this.licenseURL}).pipe(Oe("entity","config","license"),Mn(e=>{this.setLicense(e)}))}updateLicense(){this.coreWebService.requestView({url:this.licenseURL}).pipe(Oe("entity","config","license")).subscribe(e=>{this.setLicense(e)})}setLicense(e){this.license={...e}}}Rm.\u0275fac=function(e){return new(e||Rm)(F(Ut))},Rm.\u0275prov=$({token:Rm,factory:Rm.\u0275fac});class Fm{constructor(e,t){this.coreWebService=e,this.dotSessionStorageService=t}save(e,t){const i={body:t,method:"POST",url:`v1/page/${e}/layout`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Oe("entity"),ue(o=>new eie(o)))}}Fm.\u0275fac=function(e){return new(e||Fm)(F(Ut),F(Fa))},Fm.\u0275prov=$({token:Fm,factory:Fm.\u0275fac});class jm{constructor(e,t){this.coreWebService=e,this.dotSessionStorageService=t}checkPermission(e){return this.coreWebService.requestView({body:{...e},method:"POST",url:"v1/page/_check-permission"}).pipe(Oe("entity"))}get({viewAs:e,mode:t,url:i},r){const o=this.getOptionalViewAsParams(e,t);return this.coreWebService.requestView({url:`v1/page/render/${i?.replace(/^\//,"")}`,params:{...r,...o}}).pipe(Oe("entity"))}getOptionalViewAsParams(e={},t=Hv.PREVIEW){return{...this.getPersonaParam(e.persona),...this.getDeviceParam(e.device),...this.getLanguageParam(e.language),...this.getModeParam(t),variantName:this.dotSessionStorageService.getVariationId()}}getModeParam(e){return e?{mode:e}:{}}getPersonaParam(e){return e?{"com.dotmarketing.persona.id":e.identifier||""}:{}}getDeviceParam(e){return e?{device_inode:e.inode}:{}}getLanguageParam(e){return e?{language_id:e.toString()}:{}}}jm.\u0275fac=function(e){return new(e||jm)(F(Ut),F(Fa))},jm.\u0275prov=$({token:jm,factory:jm.\u0275fac});class zm{constructor(e){this.coreWebService=e}getPages(e=""){return this.coreWebService.requestView({url:`/api/v1/page/types?filter=${e}`}).pipe(Tt(1),Oe("entity"))}}zm.\u0275fac=function(e){return new(e||zm)(F(Ut))},zm.\u0275prov=$({token:zm,factory:zm.\u0275fac});class Vm{constructor(e){this.http=e}getByUrl(e){return this.http.post("/api/v1/page/actions",{host_id:e.host_id,language_id:e.language_id,url:e.url,renderMode:e.renderMode}).pipe(Oe("entity"))}}Vm.\u0275fac=function(e){return new(e||Vm)(F(tr))},Vm.\u0275prov=$({token:Vm,factory:Vm.\u0275fac});class Bm{constructor(e,t){this.coreWebService=e,this.dotSessionStorageService=t}personalized(e,t){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"POST",url:"/api/v1/personalization/pagepersonas",params:{variantName:i},body:{pageId:e,personaTag:t}}).pipe(Oe("entity"))}despersonalized(e,t){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"DELETE",url:`/api/v1/personalization/pagepersonas/page/${e}/personalization/${t}`,params:{variantName:i}}).pipe(Oe("entity"))}}Bm.\u0275fac=function(e){return new(e||Bm)(F(Ut),F(Fa))},Bm.\u0275prov=$({token:Bm,factory:Bm.\u0275fac});class Um{constructor(e){this.coreWebService=e}get(){return this.coreWebService.requestView({url:"content/respectFrontendRoles/false/render/false/query/+contentType:persona +live:true +deleted:false +working:true"}).pipe(Oe("contentlets"))}}Um.\u0275fac=function(e){return new(e||Um)(F(Ut))},Um.\u0275prov=$({token:Um,factory:Um.\u0275fac});class Hm{constructor(e){this.http=e}getKey(e){return this.http.get("/api/v1/configuration/config",{params:{keys:e}}).pipe(Tt(1),Oe("entity",e))}getKeys(e){return this.http.get("/api/v1/configuration/config",{params:{keys:e.join()}}).pipe(Tt(1),Oe("entity"))}getKeyAsList(e){return this.http.get("/api/v1/configuration/config",{params:{keys:`list:${e}`}}).pipe(Tt(1),Oe("entity",e))}getFeatureFlag(e){return this.getKey(e).pipe(ue(t=>"true"===t))}getFeatureFlags(e){return this.getKeys(e).pipe(ue(t=>Object.keys(t).reduce((i,r)=>(i[r]="true"===t[r],i),{})))}}Hm.\u0275fac=function(e){return new(e||Hm)(F(tr))},Hm.\u0275prov=$({token:Hm,factory:Hm.\u0275fac,providedIn:"root"});class $m{constructor(e){this.coreWebService=e}get(){return this.coreWebService.requestView({url:"/api/v1/pushpublish/filters/"}).pipe(Oe("entity"))}}$m.\u0275fac=function(e){return new(e||$m)(F(Ut))},$m.\u0275prov=$({token:$m,factory:$m.\u0275fac});class Wm{constructor(e,t){this.dotMessageService=e,this.coreWebService=t}get(e,t){return this.coreWebService.requestView({url:`/api/v1/roles/${e}/rolehierarchyanduserroles?roleHierarchyForAssign=${t}`}).pipe(Oe("entity"),ue(this.processRolesResponse.bind(this)))}search(){return this.coreWebService.requestView({url:"/api/v1/roles/_search"}).pipe(Oe("entity"),ue(this.processRolesResponse.bind(this)))}processRolesResponse(e){return e.filter(t=>"anonymous"!==t.roleKey).map(t=>("CMS Anonymous"===t.roleKey?t.name=this.dotMessageService.get("current-user"):t.user&&(t.name=`${t.name}`),t))}}Wm.\u0275fac=function(e){return new(e||Wm)(F(ps),F(Ut))},Wm.\u0275prov=$({token:Wm,factory:Wm.\u0275fac});class Ah{constructor(e){this.http=e,this.BASE_SITE_URL="/api/v1/site",this.params={archived:!1,live:!0,system:!0},this.defaultPerpage=10}set searchParam(e){this.params=e}getSites(e="*",t){return this.http.get(this.siteURL(e,t)).pipe(Oe("entity"))}siteURL(e,t){const r=`filter=${e}&perPage=${t||this.defaultPerpage}&${this.getQueryParams()}`;return`${this.BASE_SITE_URL}?${r}`}getQueryParams(){return Object.keys(this.params).map(e=>`${e}=${this.params[e]}`).join("&")}}Ah.\u0275fac=function(e){return new(e||Ah)(F(tr))},Ah.\u0275prov=$({token:Ah,factory:Ah.\u0275fac,providedIn:"root"});class Gm{constructor(e){this.coreWebService=e}setSelectedFolder(e){return this.coreWebService.requestView({body:{path:e},method:"PUT",url:"/api/v1/browser/selectedfolder"}).pipe(Tt(1))}}Gm.\u0275fac=function(e){return new(e||Gm)(F(Ut))},Gm.\u0275prov=$({token:Gm,factory:Gm.\u0275fac});class Ym{constructor(e){this.coreWebService=e}getSuggestions(e){return this.coreWebService.requestView({url:"v1/tags"+(e?`?name=${e}`:"")}).pipe(Oe("bodyJsonObject"),ue(t=>Object.entries(t).map(([i,r])=>r)))}}Ym.\u0275fac=function(e){return new(e||Ym)(F(Ut))},Ym.\u0275prov=$({token:Ym,factory:Ym.\u0275fac});class qm{constructor(e){this.coreWebService=e}get(e){return this.coreWebService.requestView({url:"v1/themes/id/"+e}).pipe(Oe("entity"))}}qm.\u0275fac=function(e){return new(e||qm)(F(Ut))},qm.\u0275prov=$({token:qm,factory:qm.\u0275fac});const Fce={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"};class kh{uploadFile({file:e,maxSize:t,signal:i}){return"string"==typeof e?this.uploadFileByURL(e,i):this.uploadBinaryFile({file:e,maxSize:t,signal:i})}uploadFileByURL(e,t){return fetch("/api/v1/temp/byUrl",{method:"POST",signal:t,headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:e})}).then(function(){var r=au(function*(o){if(200===o.status)return(yield o.json()).tempFiles[0];throw{message:(yield o.json()).message,status:o.status}});return function(o){return r.apply(this,arguments)}}()).catch(r=>{const{message:o,response:s}=r,a="string"==typeof s?JSON.parse(s):s;throw this.errorHandler(a||{message:o},r.status)})}uploadBinaryFile({file:e,maxSize:t,signal:i}){let r="/api/v1/temp";r+=t?`?maxFileLength=${t}`:"";const o=new FormData;return o.append("file",e),fetch(r,{method:"POST",signal:i,headers:{Origin:window.location.hostname},body:o}).then(function(){var s=au(function*(a){if(200===a.status)return(yield a.json()).tempFiles[0];throw{message:(yield a.json()).message,status:a.status}});return function(a){return s.apply(this,arguments)}}()).catch(s=>{throw this.errorHandler(JSON.parse(s.response),s.status)})}errorHandler(e,t){let i="";try{i=e.message||e.errors[0].message}catch{i=Fce[t||500]}return{message:i,status:500|t}}}kh.\u0275fac=function(e){return new(e||kh)},kh.\u0275prov=$({token:kh,factory:kh.\u0275fac,providedIn:"root"});class Km{constructor(e){this.coreWebService=e}bringBack(e){return this.coreWebService.requestView({method:"PUT",url:`/api/v1/versionables/${e}/_bringback`}).pipe(Oe("entity"))}}Km.\u0275fac=function(e){return new(e||Km)(F(Ut))},Km.\u0275prov=$({token:Km,factory:Km.\u0275fac});var uu=(()=>(function(n){n.NEW="NEW",n.DESTROY="DESTROY",n.PUBLISH="PUBLISH",n.EDIT="EDIT"}(uu||(uu={})),uu))();class Qm{constructor(e){this.coreWebService=e}fireTo(e,t,i){return this.coreWebService.requestView({body:i,method:"PUT",url:`v1/workflow/actions/${t}/fire?inode=${e}&indexPolicy=WAIT_FOR`}).pipe(Oe("entity"))}bulkFire(e){return this.coreWebService.requestView({body:e,method:"PUT",url:"/api/v1/workflow/contentlet/actions/bulk/fire"}).pipe(Oe("entity"))}newContentlet(e,t){return this.request({contentType:e,data:t,action:uu.NEW})}publishContentlet(e,t,i){return this.request({contentType:e,data:t,action:uu.PUBLISH,individualPermissions:i})}saveContentlet(e){return this.request({data:e,action:uu.EDIT})}deleteContentlet(e){return this.request({data:e,action:uu.DESTROY})}publishContentletAndWaitForIndex(e,t,i){return this.publishContentlet(e,{...t,indexPolicy:"WAIT_FOR"},i)}request({contentType:e,data:t,action:i,individualPermissions:r}){const o=e?{contentType:e,...t}:t;return this.coreWebService.requestView({method:"PUT",url:`v1/workflow/actions/default/fire/${i}${t.inode?`?inode=${t.inode}`:""}`,body:r?{contentlet:o,individualPermissions:r}:{contentlet:o}}).pipe(Tt(1),Oe("entity"))}}Qm.\u0275fac=function(e){return new(e||Qm)(F(Ut))},Qm.\u0275prov=$({token:Qm,factory:Qm.\u0275fac});class Zm{constructor(e){this.coreWebService=e}get(){return this.coreWebService.requestView({url:"v1/workflow/schemes"}).pipe(Oe("entity"))}getSystem(){return this.get().pipe(ci(e=>e.filter(t=>t.system)),Tt(1))}}Zm.\u0275fac=function(e){return new(e||Zm)(F(Ut))},Zm.\u0275prov=$({token:Zm,factory:Zm.\u0275fac});class Jm{constructor(e){this.coreWebService=e}getByWorkflows(e=[]){return this.coreWebService.requestView({method:"POST",url:"/api/v1/workflow/schemes/actions/NEW",body:{schemes:e.map(this.getWorkFlowId)}}).pipe(Oe("entity"))}getByInode(e,t){return this.coreWebService.requestView({url:`v1/workflow/contentlet/${e}/actions${t?`?renderMode=${t}`:""}`}).pipe(Oe("entity"))}getWorkFlowId(e){return e&&e.id}}Jm.\u0275fac=function(e){return new(e||Jm)(F(Ut))},Jm.\u0275prov=$({token:Jm,factory:Jm.\u0275fac});var Lb=(()=>(function(n){n[n.ASC=1]="ASC",n[n.DESC=-1]="DESC"}(Lb||(Lb={})),Lb))();class $i{constructor(e){this.coreWebService=e,this.links={},this.paginationPerPage=40,this._extraParams=new Map}get url(){return this._url}set url(e){this._url!==e&&(this.links={},this._url=e)}get filter(){return this._filter}set filter(e){this._filter!==e&&(this.links={},this._filter=e)}set searchParam(e){this._searchParam!==e&&(this.links=e.length>0?{}:this.links,this._searchParam=e)}get searchParam(){return this._searchParam}setExtraParams(e,t){null!=t&&(this.extraParams.set(e,t.toString()),this.links={})}deleteExtraParams(e){this.extraParams.delete(e)}resetExtraParams(){this.extraParams.clear()}get extraParams(){return this._extraParams}get sortField(){return this._sortField}set sortField(e){this._sortField!==e&&(this.links={},this._sortField=e)}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder!==e&&(this.links={},this._sortOrder=e)}get(e){const t={...this.getParams(),...this.getObjectFromMap(this.extraParams)},i=this.sanitizeQueryParams(e,t);return this.coreWebService.requestView({params:t,url:i||this.url}).pipe(ue(r=>(this.setLinks(r.header($i.LINK_HEADER_NAME)),this.paginationPerPage=parseInt(r.header($i.PAGINATION_PER_PAGE_HEADER_NAME),10),this.currentPage=parseInt(r.header($i.PAGINATION_CURRENT_PAGE_HEADER_NAME),10),this.maxLinksPage=parseInt(r.header($i.PAGINATION_MAX_LINK_PAGES_HEADER_NAME),10),this.totalRecords=parseInt(r.header($i.PAGINATION_TOTAL_ENTRIES_HEADER_NAME),10),r.entity)),Tt(1))}getLastPage(){return this.get(this.links.last)}getFirstPage(){return this.get(this.links.first)}getPage(e=1){const t=this.links["x-page"]?this.links["x-page"].replace("pageValue",String(e)):void 0;return this.get(t)}getCurrentPage(){return this.getPage(this.currentPage)}getNextPage(){return this.get(this.links.next)}getPrevPage(){return this.get(this.links.prev)}getWithOffset(e){const t=this.getPageFromOffset(e);return this.getPage(t)}getPageFromOffset(e){return parseInt(String(e/this.paginationPerPage),10)+1}setLinks(e){(e?.split(",")||[]).forEach(i=>{const r=i.split(";"),o=r[0].substring(1,r[0].length-1),s=r[1].split("="),a=s[1].substring(1,s[1].length-1);this.links[a]=o.trim()})}getParams(){const e=new Map;return this.filter&&e.set("filter",this.filter),this.searchParam&&e.set("searchParam",this.searchParam),this.sortField&&e.set("orderby",this.sortField),this.sortOrder&&e.set("direction",Lb[this.sortOrder]),this.paginationPerPage&&e.set("per_page",String(this.paginationPerPage)),this.getObjectFromMap(e)}getObjectFromMap(e){return Array.from(e).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}sanitizeQueryParams(e="",t){const i=e?.split("?"),r=i[0],o=i[1];if(!o)return e;const s=new URLSearchParams(o);for(const a in t)s.delete(a);return s.toString()?`${r}?${s.toString()}`:r}}$i.LINK_HEADER_NAME="Link",$i.PAGINATION_PER_PAGE_HEADER_NAME="X-Pagination-Per-Page",$i.PAGINATION_CURRENT_PAGE_HEADER_NAME="X-Pagination-Current-Page",$i.PAGINATION_MAX_LINK_PAGES_HEADER_NAME="X-Pagination-Link-Pages",$i.PAGINATION_TOTAL_ENTRIES_HEADER_NAME="X-Pagination-Total-Entries",$i.\u0275fac=function(e){return new(e||$i)(F(Ut))},$i.\u0275prov=$({token:$i,factory:$i.\u0275fac});class Xm{constructor(e){this.http=e,this.seoToolsUrl="assets/seo/page-tools.json"}get(){return this.http.get(this.seoToolsUrl).pipe(Oe("pageTools"))}}Xm.\u0275fac=function(e){return new(e||Xm)(F(tr))},Xm.\u0275prov=$({token:Xm,factory:Xm.\u0275fac});var Rl=(()=>(function(n){n.DOWNLOAD="DOWNLOADING",n.IMPORT="IMPORTING",n.COMPLETED="COMPLETED",n.ERROR="ERROR"}(Rl||(Rl={})),Rl))();class Ys{constructor(e,t){this.http=e,this.dotUploadService=t}publishContent({data:e,maxSize:t,statusCallback:i=(o=>{}),signal:r}){return i(Rl.DOWNLOAD),this.setTempResource({data:e,maxSize:t,signal:r}).pipe(ci(o=>{const s=Array.isArray(o)?o:[o],a=[];return s.forEach(l=>{a.push({baseType:"dotAsset",asset:l.id,hostFolder:"",indexPolicy:"WAIT_FOR"})}),i(Rl.IMPORT),this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:a}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(Oe("entity","results"))}),Ai(o=>ho(o)))}setTempResource({data:e,maxSize:t,signal:i}){return _t(this.dotUploadService.uploadFile({file:e,maxSize:t,signal:i}))}}Ys.\u0275fac=function(e){return new(e||Ys)(F(tr),F(kh))},Ys.\u0275prov=$({token:Ys,factory:Ys.\u0275fac});var Rb=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(Rb||(Rb={})),Rb))();class Nh{constructor(e){this.http=e}get({query:e,limit:t=0,offset:i=0}){return this.http.post("/api/content/_search",{query:e,sort:"score,modDate desc",limit:t,offset:i}).pipe(Oe("entity"))}}Nh.\u0275fac=function(e){return new(e||Nh)(F(tr))},Nh.\u0275prov=$({token:Nh,factory:Nh.\u0275fac,providedIn:"root"});class Fl{constructor(e){this.http=e}get defaultHeaders(){const e=new Cr;return e.set("Accept","*/*").set("Content-Type","application/json"),e}getContentTypes(e="",t=""){return this.http.post("/api/v1/contenttype/_filter",{filter:{types:t,query:e},orderBy:"name",direction:"ASC",perPage:40}).pipe(Oe("entity"))}getContentlets({contentType:e,filter:t,currentLanguage:i,contentletIdentifier:r}){const o=r?`-identifier:${r}`:"",s=t.includes("-")?t:`*${t}*`;return this.http.post("/api/content/_search",{query:`+contentType:${e} ${o} +languageId:${i} +deleted:false +working:true +catchall:${s} title:'${t}'^15`,sort:"modDate desc",offset:0,limit:40}).pipe(Oe("entity","jsonObjectView","contentlets"))}getContentletsByLink({link:e,currentLanguage:t=ng}){return this.http.post("/api/content/_search",{query:`+languageId:${t} +deleted:false +working:true +(urlmap:*${e}* OR (contentType:(dotAsset OR htmlpageasset OR fileAsset) AND +path:*${e}*))`,sort:"modDate desc",offset:0,limit:40}).pipe(Oe("entity","jsonObjectView","contentlets"))}}Fl.\u0275fac=function(e){return new(e||Fl)(F(tr))},Fl.\u0275prov=$({token:Fl,factory:Fl.\u0275fac});class jl{constructor(e){this.http=e}generateContent(e){const i=JSON.stringify({prompt:e}),r=new Cr({"Content-Type":"application/json"});return this.http.post("/api/v1/ai/text/generate",i,{headers:r}).pipe(Ai(()=>ho("Error fetching AI content")),ue(({response:o})=>o))}generateImage(e){const i=JSON.stringify({prompt:e}),r=new Cr({"Content-Type":"application/json"});return this.http.post("/api/v1/ai/image/generate",i,{headers:r}).pipe(Ai(()=>ho("Error fetching AI content")),ue(({response:o})=>o))}createAndPublishContentlet(e){return this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:[{contentType:"dotAsset",asset:e,hostFolder:"",indexPolicy:"WAIT_FOR"}]}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(Oe("entity","results"),Ai(i=>ho(i)))}}jl.\u0275fac=function(e){return new(e||jl)(F(tr))},jl.\u0275prov=$({token:jl,factory:jl.\u0275fac});const jce=["list"];function zce(n,e){if(1&n&&(I(0,"h3"),Te(1),A()),2&n){const t=M(2);C(1),Ot(t.title)}}function Vce(n,e){if(1&n&&_e(0,"dot-suggestions-list-item",7),2&n){const t=M(),i=t.$implicit,r=t.index;b("command",i.command)("index",i.tabindex||r)("label",i.label)("url",i.icon)("data",i.data)("disabled",i.disabled)}}function Bce(n,e){1&n&&_e(0,"div",8)}function Uce(n,e){if(1&n&&(pt(0),E(1,Vce,1,6,"dot-suggestions-list-item",5),E(2,Bce,1,0,"ng-template",null,6,Bn),mt()),2&n){const t=e.$implicit,i=Cn(3);C(1),b("ngIf","divider"!==t.id)("ngIfElse",i)}}function Hce(n,e){if(1&n&&(I(0,"div"),E(1,zce,2,1,"h3",2),I(2,"dot-suggestion-list",null,3),E(4,Uce,4,2,"ng-container",4),A()()),2&n){const t=M();C(1),b("ngIf",!!t.title),C(3),b("ngForOf",t.items)}}function $ce(n,e){if(1&n){const t=Qe();I(0,"dot-empty-message",9),de("back",function(){return ge(t),ye(M().handleBackButton())}),A()}if(2&n){const t=M();b("title",t.noResultsMessage)("showBackBtn",!t.isFilterActive)}}var cr=(()=>(function(n){n.BLOCK="block",n.CONTENTTYPE="contentType",n.CONTENT="content"}(cr||(cr={})),cr))();class zl{constructor(e,t,i){this.suggestionsService=e,this.dotLanguageService=t,this.cd=i,this.items=[],this.title="Select a block",this.noResultsMessage="No Results",this.currentLanguage=ng,this.allowedContentTypes="",this.contentletIdentifier="",this.isFilterActive=!1}onMouseDownHandler(e){e.preventDefault()}ngOnInit(){this.initialItems=this.items,this.itemsLoaded=cr.BLOCK,this.dotLanguageService.getLanguages().pipe(Tt(1)).subscribe(e=>this.dotLangs=e)}addContentletItem(){this.items=[{label:"Contentlets",icon:"receipt",command:()=>this.loadContentTypes()},...this.items],this.initialItems=this.items}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(e){this.list.updateSelection(e)}handleBackButton(){return this.itemsLoaded=this.itemsLoaded===cr.CONTENT?cr.CONTENTTYPE:cr.BLOCK,this.filterItems(),!1}filterItems(e=""){switch(this.itemsLoaded){case cr.BLOCK:this.items=this.initialItems.filter(t=>t.label.toLowerCase().includes(e.trim().toLowerCase()));break;case cr.CONTENTTYPE:this.loadContentTypes(e);break;case cr.CONTENT:this.loadContentlets(this.selectedContentType,e)}this.isFilterActive=!!e.length}loadContentTypes(e=""){this.suggestionsService.getContentTypes(e,this.allowedContentTypes).pipe(ue(t=>t.map(i=>({label:i.name,icon:i.icon,command:()=>{this.selectedContentType=i,this.itemsLoaded=cr.CONTENT,this.loadContentlets(i)}}))),Tt(1)).subscribe(t=>{this.items=t,this.itemsLoaded=cr.CONTENTTYPE,this.items.length?this.title="Select a content type":this.noResultsMessage="No results",this.cd.detectChanges()})}loadContentlets(e,t=""){this.suggestionsService.getContentlets({contentType:e.variable,filter:t,currentLanguage:this.currentLanguage,contentletIdentifier:this.contentletIdentifier}).pipe(Tt(1)).subscribe(i=>{this.items=i.map(r=>{const{languageId:o}=r;return r.language=this.getContentletLanguage(o),{label:r.title,icon:"contentlet/image",data:{contentlet:r},command:()=>{this.onSelectContentlet({payload:r,type:{name:"dotContent"}})}}}),this.items.length?this.title="Select a contentlet":this.noResultsMessage=`No results for ${e.name}`,this.cd.detectChanges()})}getContentletLanguage(e){const{languageCode:t,countryCode:i}=this.dotLangs[e];return t&&i?`${t}-${i}`:""}}zl.\u0275fac=function(e){return new(e||zl)(O(Fl),O(Ll),O(Kn))},zl.\u0275cmp=xe({type:zl,selectors:[["dot-suggestions"]],viewQuery:function(e,t){if(1&e&&hn(jce,5),2&e){let i;Xe(i=et())&&(t.list=i.first)}},hostBindings:function(e,t){1&e&&de("mousedown",function(r){return t.onMouseDownHandler(r)})},inputs:{onSelectContentlet:"onSelectContentlet",items:"items",title:"title",noResultsMessage:"noResultsMessage",currentLanguage:"currentLanguage",allowedContentTypes:"allowedContentTypes",contentletIdentifier:"contentletIdentifier"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["emptyBlock",""],[4,"ngIf"],["list",""],[4,"ngFor","ngForOf"],[3,"command","index","label","url","data","disabled",4,"ngIf","ngIfElse"],["divider",""],[3,"command","index","label","url","data","disabled"],[1,"divider"],[3,"title","showBackBtn","back"]],template:function(e,t){if(1&e&&(E(0,Hce,5,2,"div",0),E(1,$ce,1,2,"ng-template",null,1,Bn)),2&e){const i=Cn(2);b("ngIf",t.items.length)("ngIfElse",i)}},styles:['[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#ffffff;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-size:16px;margin:8px 16px;color:#999}.suggestion-list-container[_ngcontent-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.material-icons[_ngcontent-%COMP%]{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.divider[_ngcontent-%COMP%]{border-top:#afb3c0 solid 1px;margin:.5rem 0}']});class xS{constructor({editor:e,element:t,view:i,tippyOptions:r={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:c,to:u})=>{const{doc:d,selection:h}=l,{empty:f}=h,p=!d.textBetween(c,u).length&&Eb(l.selection),m=this.element.contains(document.activeElement);return!(!a.hasFocus()&&!m||f||p||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;this.preventHide?this.preventHide=!1:a?.relatedTarget&&null!==(l=this.element.parentNode)&&void 0!==l&&l.contains(a.relatedTarget)||this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const c=!l?.selection.eq(a.state.selection),u=!l?.doc.eq(a.state.doc);!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,c,u,l)},this.updateDelay))},this.updateHandler=(a,l,c,u)=>{var d,h,f;const{state:p,composing:m}=a,{selection:g}=p;if(m||!l&&!c)return;this.createTooltip();const{ranges:v}=g,w=Math.min(...v.map(T=>T.$from.pos)),_=Math.max(...v.map(T=>T.$to.pos));(null===(d=this.shouldShow)||void 0===d?void 0:d.call(this,{editor:this.editor,view:a,state:p,oldState:u,from:w,to:_}))?(null===(h=this.tippy)||void 0===h||h.setProps({getReferenceClientRect:(null===(f=this.tippyOptions)||void 0===f?void 0:f.getReferenceClientRect)||(()=>{if(function Hle(n){return n instanceof Ye}(p.selection)){let T=a.nodeDOM(w);const ne=T.dataset.nodeViewWrapper?T:T.querySelector("[data-node-view-wrapper]");if(ne&&(T=ne.firstChild),T)return T.getBoundingClientRect()}return ou(a,w,_)})}),this.show()):this.hide()},this.editor=e,this.element=t,this.view=i,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Bo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:i}=e;if(this.updateDelay>0&&i.selection.$from.pos!==i.selection.$to.pos)return void this.handleDebouncedUpdate(e,t);const o=!t?.selection.eq(e.state.selection),s=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,s,t)}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;!(null===(e=this.tippy)||void 0===e)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const b5=n=>new $t({key:"string"==typeof n.pluginKey?new rn(n.pluginKey):n.pluginKey,view:e=>new xS({view:e,...n})}),IS=vn.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[b5({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class Fb{constructor(e){this._el=e,this.pluginKey="NgxTiptapBubbleMenu",this.tippyOptions={},this.shouldShow=null}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");this.editor.registerPlugin(b5({pluginKey:this.pluginKey,editor:this.editor,element:this._el.nativeElement,tippyOptions:this.tippyOptions,shouldShow:this.shouldShow}))}ngOnDestroy(){this.editor.unregisterPlugin(this.pluginKey)}}Fb.\u0275fac=function(e){return new(e||Fb)(O(kt))},Fb.\u0275dir=Me({type:Fb,selectors:[["tiptap-bubble-menu","editor",""],["","tiptapBubbleMenu","","editor",""]],inputs:{pluginKey:"pluginKey",editor:"editor",tippyOptions:"tippyOptions",shouldShow:"shouldShow"}});class jb{constructor(){this.draggable=!0,this.handle=""}}jb.\u0275fac=function(e){return new(e||jb)},jb.\u0275dir=Me({type:jb,selectors:[["","tiptapDraggable",""]],hostVars:2,hostBindings:function(e,t){2&e&&Yt("draggable",t.draggable)("data-drag-handle",t.handle)}});class Ph{constructor(e,t){this.el=e,this._renderer=t,this.onChange=()=>{},this.onTouched=()=>{},this.handleChange=({transaction:i})=>{i.docChanged&&this.onChange(this.editor.getJSON())}}writeValue(e){e&&this.editor.chain().setContent(e,!0).run()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.editor.setEditable(!e),this._renderer.setProperty(this.el.nativeElement,"disabled",e)}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");const e=this.el.nativeElement.innerHTML;this.el.nativeElement.innerHTML="",this.el.nativeElement.appendChild(this.editor.options.element.firstChild),this.editor.setOptions({element:this.el.nativeElement}),e&&this.editor.chain().setContent(e,!1).run(),this.editor.on("blur",()=>{this.onTouched()}),this.editor.on("transaction",this.handleChange)}ngOnDestroy(){this.editor.destroy()}}Ph.\u0275fac=function(e){return new(e||Ph)(O(kt),O(Vr))},Ph.\u0275dir=Me({type:Ph,selectors:[["tiptap","editor",""],["","tiptap","","editor",""],["tiptap-editor","editor",""],["","tiptapEditor","","editor",""]],inputs:{editor:"editor"},features:[Nt([{provide:Dr,useExisting:Bt(()=>Ph),multi:!0}])]});class Wce{constructor({editor:e,element:t,view:i,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a})=>{const{selection:l}=a,{$anchor:c,empty:u}=l,d=1===c.depth,h=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!!(s.hasFocus()&&u&&d&&h&&this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;this.preventHide?this.preventHide=!1:s?.relatedTarget&&null!==(a=this.element.parentNode)&&void 0!==a&&a.contains(s.relatedTarget)||this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=e,this.element=t,this.view=i,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Bo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var i,r,o;const{state:s}=e,{doc:a,selection:l}=s,{from:c,to:u}=l;t&&t.doc.eq(a)&&t.selection.eq(l)||(this.createTooltip(),(null===(i=this.shouldShow)||void 0===i?void 0:i.call(this,{editor:this.editor,view:e,state:s,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>ou(e,c,u))}),this.show()):this.hide())}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;!(null===(e=this.tippy)||void 0===e)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const w5=n=>new $t({key:"string"==typeof n.pluginKey?new rn(n.pluginKey):n.pluginKey,view:e=>new Wce({view:e,...n})});vn.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[w5({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class zb{constructor(e){this._el=e,this.pluginKey="NgxTiptapFloatingMenu",this.tippyOptions={},this.shouldShow=null}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");this.editor.registerPlugin(w5({pluginKey:this.pluginKey,editor:this.editor,element:this._el.nativeElement,tippyOptions:this.tippyOptions,shouldShow:this.shouldShow}))}ngOnDestroy(){this.editor.unregisterPlugin(this.pluginKey)}}zb.\u0275fac=function(e){return new(e||zb)(O(kt))},zb.\u0275dir=Me({type:zb,selectors:[["tiptap-floating-menu","editor",""],["","tiptapFloatingMenu","","editor",""]],inputs:{pluginKey:"pluginKey",editor:"editor",tippyOptions:"tippyOptions",shouldShow:"shouldShow"}});class Vb{constructor(){this.handle=""}}Vb.\u0275fac=function(e){return new(e||Vb)},Vb.\u0275dir=Me({type:Vb,selectors:[["","tiptapNodeViewContent",""]],hostVars:1,hostBindings:function(e,t){2&e&&Yt("data-node-view-content",t.handle)}});const C5={inode:"14dd5ad9-55ae-42a8-a5a7-e259b6d0901a",variantId:"DEFAULT",locked:!1,stInode:"d5ea385d-32ee-4f35-8172-d37f58d9cd7a",contentType:"Image",height:4e3,identifier:"93ca45e0-06d2-4eef-be1d-79bd6bf0fc99",hasTitleImage:!0,sortOrder:0,hostName:"demo.dotcms.com",extension:"jpg",isContent:!0,baseType:"FILEASSETS",archived:!1,working:!0,live:!0,isContentlet:!0,languageId:1,titleImage:"fileAsset",hasLiveVersion:!0,deleted:!1,folder:"",host:"",modDate:"",modUser:"",modUserName:"",owner:"",title:"",url:"",contentTypeIcon:"assessment",__icon__:"Icon"};class tg{transform({live:e,working:t,deleted:i,hasLiveVersion:r}){return{live:e,working:t,deleted:i,hasLiveVersion:r}}}tg.\u0275fac=function(e){return new(e||tg)},tg.\u0275pipe=Gn({name:"contentletState",type:tg,pure:!0});const OS="menuFloating";class qce{constructor({editor:e,view:t,render:i,command:r,key:o}){this.invalidNodes=["codeBlock","blockquote"],this.editor=e,this.view=t,this.editor.on("focus",()=>{this.update(this.editor.view)}),this.render=i,this.command=r,this.key=o}update(e,t){const i=this.key?.getState(e.state),r=t?this.key?.getState(t):null;if(i.open){const{from:o,to:s}=this.editor.state.selection,a=ou(this.view,o,s);this.render().onStart({clientRect:()=>a,range:{from:o,to:s},editor:this.editor,command:this.command})}else r&&r.open&&this.render().onExit(null)}}const D5=new rn(OS),Kce=n=>new $t({key:D5,view:e=>new qce({key:D5,view:e,...n}),state:{init:()=>({open:!1}),apply(e){const t=e.getMeta(OS);return t?.open?{open:t?.open}:{open:!1}}},props:{handleKeyDown(e,t){const{open:i,range:r}=this.getState(e.state);return!!i&&n.render().onKeyDown({event:t,range:r,view:e})}}}),tue={paragrah:!0,text:!0,doc:!0},M5={image:{image:!0,dotImage:!0},table:{table:!0,tableRow:!0,tableHeader:!0,tableCell:!0},orderedList:{orderedList:!0,listItem:!0},bulletList:{bulletList:!0,listItem:!0},video:{dotVideo:!0,youtube:!0}},nue=(n,e)=>{const{type:t,attrs:i}=n;return"heading"===t&&e[t+i.level]},T5=(n,e)=>{if(!n?.length)return n;const t=[];for(const i in n){const r=n[i];(e[r.type]||nue(r,e))&&t.push({...r,content:T5(r.content,e)})}return t},oue=new RegExp(/]*)>(\s|\n|]*src="[^"]*"[^>]*>)*?<\/a>/gm),AS=new RegExp(/]*src="[^"]*"[^>]*>/gm),du=(n,e)=>{let i,t=n.depth;do{if(i=n.node(t),i){if(Array.isArray(e)&&e.includes(i.type.name))break;t--}}while(t>0&&i);return i},Bb=n=>{const e=n.match(AS)||[];return(new DOMParser).parseFromString(n,"text/html").documentElement.textContent.trim().length>0?n.replace(AS,"")+e.join(""):e.join("")},S5=n=>{const{state:e}=n,{doc:t}=e.tr,i=e.selection.to,r=it.create(t,i,i);n.dispatch(e.tr.setSelection(r))},E5=n=>/^https?:\/\/.+\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(n);class hu extends ki{constructor(e,t){super(),this.STEP_TYPE="setDocAttr",this.key=e,this.value=t}get stepType(){return this.STEP_TYPE}static fromJSON(e,t){return new hu(t.key,t.value)}static register(){try{ki.jsonID(this.prototype.STEP_TYPE,hu)}catch(e){if(e.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw e}return!0}apply(e){return this.prevValue=e.attrs[this.key],e.attrs===e.type.defaultAttrs&&(e.attrs=Object.assign({},e.attrs)),e.attrs[this.key]=this.value,ui.ok(e)}invert(){return new hu(this.key,this.prevValue)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}}class Ub extends ki{constructor(){super(),this.STEP_TYPE="restoreDefaultDOMAttrs"}get stepType(){return this.STEP_TYPE}static register(){try{ki.jsonID(this.prototype.STEP_TYPE,Ub)}catch(e){if(e.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw e}return!0}apply(e){return e.attrs=Object.assign({},e.type.defaultAttrs),ui.ok(e)}invert(){return new Ub}map(){return this}toJSON(){return{stepType:this.stepType}}}const ng=1;var Wi=(()=>(function(n){n.DOT_IMAGE="dotImage",n.LIST_ITEM="listItem",n.BULLET_LIST="bulletList",n.ORDERED_LIST="orderedList",n.BLOCKQUOTE="blockquote",n.CODE_BLOCK="codeBlock",n.DOC="doc",n.DOT_CONTENT="dotContent",n.PARAGRAPH="paragraph",n.HARD_BREAK="hardBreak",n.HEADING="heading",n.HORIZONTAL_RULE="horizontalRule",n.TEXT="text",n.TABLE_CELL="tableCell"}(Wi||(Wi={})),Wi))();const mue=[Wi.DOT_IMAGE,Wi.DOT_CONTENT];function x5({editor:n,range:e,props:t,customBlocks:i}){const{type:r,payload:o}=t,s={dotContent:()=>{n.chain().addContentletBlock({range:e,payload:o}).addNextLine().run()},heading:()=>{n.chain().addHeading({range:e,type:r}).run()},table:()=>{n.commands.openForm([{key:"rows",label:"Rows",required:!0,value:"3",controlType:"number",type:"number",min:1},{key:"columns",label:"Columns",required:!0,value:"3",controlType:"number",type:"number",min:1},{key:"header",label:"Add Row Header",required:!1,value:!0,controlType:"text",type:"checkbox"}],{customClass:"dotTableForm"}).pipe(Tt(1),Un(a=>!!a)).subscribe(a=>{requestAnimationFrame(()=>{n.chain().insertTable({rows:a.rows,cols:a.columns,withHeaderRow:!!a.header}).focus().run()})})},orderedList:()=>{n.chain().deleteRange(e).toggleOrderedList().focus().run()},bulletList:()=>{n.chain().deleteRange(e).toggleBulletList().focus().run()},blockquote:()=>{n.chain().deleteRange(e).setBlockquote().focus().run()},codeBlock:()=>{n.chain().deleteRange(e).setCodeBlock().focus().run()},horizontalRule:()=>{n.chain().deleteRange(e).setHorizontalRule().focus().run()},image:()=>n.commands.openAssetForm({type:"image"}),subscript:()=>n.chain().setSubscript().focus().run(),superscript:()=>n.chain().setSuperscript().focus().run(),video:()=>n.commands.openAssetForm({type:"video"}),aiContentPrompt:()=>n.commands.openAIPrompt(),aiContent:()=>n.commands.insertAINode(),aiImagePrompt:()=>n.commands.openImagePrompt()};I5(i).forEach(a=>{s[a.id]=()=>{try{n.commands[a.commandKey]()}catch{console.warn(`Custom command ${a.commandKey} does not exists.`)}}}),s[r.name]?s[r.name]():n.chain().setTextSelection(e).focus().run()}function I5(n){return n.extensions.map(e=>function yue(n){return n.map(e=>({icon:e.icon,label:e.menuLabel,commandKey:e.command,id:`${e.command}-id`}))}(e.actions||[])).flat()}const _ue=(n,e)=>{let t,i;const r=new rn("suggestionPlugin"),o=new se;let s=!0;function a({editor:g,range:y,clientRect:v}){s&&(function c(g,y){const{allowedBlocks:v,allowedContentTypes:w,lang:_,contentletIdentifier:N}=g.storage.dotConfig,ne=function u({allowedBlocks:g=[],editor:y,range:v}){const _=[...g.length?bv.filter(N=>g.includes(N.id)):bv,...I5(e)];return _.forEach(N=>N.command=()=>function d({item:g,editor:y,range:v}){const{id:w,attributes:_}=g,N={type:{name:w.includes("heading")?"heading":w,..._}};gR({type:cr.BLOCK,editor:y,range:v,suggestionKey:r,ItemsType:cr}),h({editor:y,range:v,props:N})}({item:N,editor:y,range:v})),_}({allowedBlocks:v.length>1?v:[],editor:g,range:y});i=n.createComponent(zl),i.instance.items=ne,i.instance.currentLanguage=_,i.instance.allowedContentTypes=w,i.instance.contentletIdentifier=N,i.instance.onSelectContentlet=K=>{gR({type:cr.CONTENT,editor:g,range:y,suggestionKey:r,ItemsType:cr}),h({editor:g,range:y,props:K})},i.changeDetectorRef.detectChanges(),(v.length<=1||v.includes("dotContent"))&&i.instance.addContentletItem()}(g,y),t=function gue({element:n,content:e,rect:t,onHide:i}){return Bo(n,{content:e,placement:"bottom",popperOptions:{modifiers:YX},getReferenceClientRect:t,showOnCreate:!0,interactive:!0,offset:[120,10],trigger:"manual",maxWidth:"none",onHide:i})}({element:g.options.element.parentElement,content:i.location.nativeElement,rect:v,onHide:()=>{g.commands.focus();const w=f({editor:g,range:y});"/"===g.state.doc.textBetween(w.from,w.to," ")&&g.commands.deleteRange(w);const N=g.state.tr.setMeta(OS,{open:!1});g.view.dispatch(N),g.commands.freezeScroll(!1)}}))}function l({editor:g}){g.commands.freezeScroll(!0);const y=du(g.view.state.selection.$from,[Wi.TABLE_CELL])?.type.name===Wi.TABLE_CELL,v=du(g.view.state.selection.$from,[Wi.CODE_BLOCK])?.type.name===Wi.CODE_BLOCK;s=!y&&!v}function h({editor:g,range:y,props:v}){x5({editor:g,range:f({editor:g,range:y}),props:v,customBlocks:e})}function f({editor:g,range:y}){const v=r.getState(g.view.state).query?.length||0;return y.to=y.to+v,y}function p({event:g}){const{key:y}=g;return"Escape"===y?(g.stopImmediatePropagation(),t.hide(),!0):"Enter"===y?(i.instance.execCommand(),!0):("ArrowDown"===y||"ArrowUp"===y)&&(i.instance.updateSelection(g),!0)}function m({editor:g}){t?.destroy(),g.commands.freezeScroll(!1),i?.destroy(),i=null,o.next(!0),o.complete()}return vn.create({name:"actionsMenu",addOptions:()=>({pluginKey:"actionsMenu",element:null,suggestion:{char:"/",pluginKey:r,allowSpaces:!0,startOfLine:!0,render:()=>({onBeforeStart:l,onStart:a,onKeyDown:p,onExit:m}),items:({query:g})=>(i&&i.instance.filterItems(g),[])}}),addCommands:()=>({addHeading:({range:g,type:y})=>({chain:v})=>v().focus().deleteRange(g).toggleHeading({level:y.level}).focus().run(),addContentletBlock:({range:g,payload:y})=>({chain:v})=>v().deleteRange(g).command(w=>{const _=w.editor.schema.nodes.dotContent.create({data:y});return w.tr.replaceSelectionWith(_),!0}).run(),addNextLine:()=>({chain:g})=>g().command(y=>{const{selection:v}=y.state;return y.commands.insertContentAt(v.head,{type:"paragraph"}),!0}).focus().run()}),addProseMirrorPlugins(){return[Kce({command:x5,editor:this.editor,render:()=>({onStart:a,onKeyDown:p,onExit:m})}),pce({editor:this.editor,...this.options.suggestion})]}})};function vue(n,e){if(1&n){const t=Qe();I(0,"div",5)(1,"dot-asset-search",6),de("addAsset",function(r){return ge(t),ye(M().onSelectAsset(r))}),A()()}if(2&n){const t=M();C(1),b("type",t.type)("languageId",t.languageId)}}function bue(n,e){if(1&n){const t=Qe();I(0,"div",5)(1,"dot-upload-asset",7),de("uploadedFile",function(r){return ge(t),ye(M().onSelectAsset(r))})("preventClose",function(r){return ge(t),ye(M().onPreventClose(r))})("hide",function(r){return ge(t),ye(M().onHide(r))}),A()()}if(2&n){const t=M();C(1),b("type",t.type)}}function wue(n,e){if(1&n){const t=Qe();I(0,"div",5)(1,"dot-external-asset",8),de("addAsset",function(r){return ge(t),ye(M().onSelectAsset(r))}),A()()}if(2&n){const t=M();C(1),b("type",t.type)}}class Lh{constructor(){this.languageId=ng,this.disableTabs=!1}onPreventClose(e){this.preventClose(e),this.disableTabs=e}}Lh.\u0275fac=function(e){return new(e||Lh)},Lh.\u0275cmp=xe({type:Lh,selectors:[["dot-asset-form"]],inputs:{languageId:"languageId",type:"type",onSelectAsset:"onSelectAsset",preventClose:"preventClose",onHide:"onHide"},decls:8,vars:8,consts:[[1,"tabview-container"],["header","Library","leftIcon","pi pi-images",3,"cache","disabled"],["pTemplate","content"],["leftIcon","pi pi-folder",3,"cache","header","disabled"],["leftIcon","pi pi-link",3,"cache","header","disabled"],[1,"wrapper"],[3,"type","languageId","addAsset"],[3,"type","uploadedFile","preventClose","hide"],[3,"type","addAsset"]],template:function(e,t){1&e&&(I(0,"div",0)(1,"p-tabView")(2,"p-tabPanel",1),E(3,vue,2,2,"ng-template",2),A(),I(4,"p-tabPanel",3),E(5,bue,2,1,"ng-template",2),A(),I(6,"p-tabPanel",4),E(7,wue,2,1,"ng-template",2),A()()()),2&e&&(C(2),b("cache",!1)("disabled",t.disableTabs),C(2),b("cache",!1)("header","Upload "+t.type)("disabled",t.disableTabs),C(2),b("cache",!1)("header",t.type+" URL")("disabled",t.disableTabs))},styles:["[_nghost-%COMP%]{border:1px solid #afb3c0;display:block}.tabview-container[_ngcontent-%COMP%]{width:720px;background:#ffffff}.wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .p-tabview-nav{padding:0 2rem}[_nghost-%COMP%] .p-tabview-panel{height:25rem}"],changeDetection:0});class Cue{constructor({editor:e,view:t,pluginKey:i,render:r}){this.editor=e,this.view=t,this.pluginKey=i,this.render=r,this.editor.on("focus",()=>this.render().onHide(this.editor))}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1},{state:o}=e,{selection:s}=o;i?.open!==r?.open&&(i?.open?this.render().onStart({editor:this.editor,type:i.type,getPosition:()=>{const{from:a,to:l}=s;return ou(e,a,l)}}):this.render().onHide(this.editor))}destroy(){this.render().onDestroy()}}const Due=n=>new $t({key:n.pluginKey,view:e=>new Cue({view:e,...n}),state:{init:()=>({open:!1,type:null}),apply(e,t,i){const{open:r,type:o}=e.getMeta(n.pluginKey)||{},s=n.pluginKey?.getState(i);return"boolean"==typeof r?{open:r,type:o}:s||t}}}),Hb=new rn("bubble-image-form"),Mue={interactive:!0,duration:0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},Tue=n=>{let e,t,i,r=!1;function o({editor:d,type:h,getPosition:f}){(function l(d){const{element:h}=d.options;e||!!!h.parentElement||(e=Bo(h.parentElement,Mue))})(d),function c(d,h){t=n.createComponent(Lh),t.instance.languageId=d.storage.dotConfig.lang,t.instance.type=h,t.instance.onSelectAsset=f=>{u(d,!1),d.chain().insertAsset({type:h,payload:f}).addNextLine().closeAssetForm().run()},t.instance.preventClose=f=>u(d,f),t.instance.onHide=()=>{u(d,!1),s(d)},i=t.location.nativeElement,t.changeDetectorRef.detectChanges()}(d,h),e.setProps({content:i,getReferenceClientRect:f,onClickOutside:()=>s(d)}),e.show()}function s(d){r||(d.commands.closeAssetForm(),e?.hide(),t?.destroy())}function a(){e?.destroy(),t?.destroy()}function u(d,h){r=h,d.setOptions({editable:!h})}return IS.extend({name:"bubbleAssetForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Hb}),addCommands:()=>({openAssetForm:({type:d})=>({chain:h})=>h().command(({tr:f})=>(f.setMeta(Hb,{open:!0,type:d}),!0)).freezeScroll(!0).run(),closeAssetForm:()=>({chain:d})=>d().command(({tr:h})=>(h.setMeta(Hb,{open:!1}),!0)).freezeScroll(!1).run(),insertAsset:({type:d,payload:h,position:f})=>({chain:p})=>{switch(d){case"video":return"string"==typeof h&&p().setYoutubeVideo({src:h}).run()||p().insertVideo(h,f).run();case"image":return p().insertImage(h,f).run()}}}),addProseMirrorPlugins(){return[Due({pluginKey:Hb,editor:this.editor,render:()=>({onStart:o,onHide:s,onDestroy:a})})]}})};class ig{}ig.\u0275fac=function(e){return new(e||ig)},ig.\u0275mod=rt({type:ig}),ig.\u0275inj=wt({imports:[zn]});class fu{}fu.\u0275fac=function(e){return new(e||fu)},fu.\u0275mod=rt({type:fu}),fu.\u0275inj=wt({imports:[zn]});const Sue=function(n,e,t){return{"border-width":n,width:e,height:t}};class Rh{constructor(){this.borderSize="",this.size=""}}Rh.\u0275fac=function(e){return new(e||Rh)},Rh.\u0275cmp=xe({type:Rh,selectors:[["dot-spinner"]],inputs:{borderSize:"borderSize",size:"size"},decls:1,vars:5,consts:[[3,"ngStyle"]],template:function(e,t){1&e&&_e(0,"div",0),2&e&&b("ngStyle",tl(1,Sue,t.borderSize,t.size,t.size))},dependencies:[wr],styles:["div[_ngcontent-%COMP%]{border-radius:50%;width:2.5rem;height:2.5rem;display:inline-block;vertical-align:middle;font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid var(--color-palette-primary-op-20);border-left-color:var(--color-palette-primary-500);transform:translateZ(0);animation:_ngcontent-%COMP%_load8 1.1s infinite linear;overflow:hidden}.edit-page-variant-mode [_nghost-%COMP%] div[_ngcontent-%COMP%]{border:.5rem solid var(--color-palette-white-op-20);border-left-color:var(--color-palette-white-op-90)}@keyframes _ngcontent-%COMP%_load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]});class $b{constructor(){this.fileDropped=new re,this.fileDragEnter=new re,this.fileDragOver=new re,this.fileDragLeave=new re,this._accept=[],this._validity={fileTypeMismatch:!1,maxFileSizeExceeded:!1,multipleFilesDropped:!1,valid:!0}}set accept(e){this._accept=e?.filter(t=>"*/*"!==t).map(t=>t.toLowerCase().replace(/\*/g,""))}get validity(){return this._validity}onDrop(e){e.stopPropagation(),e.preventDefault();const{dataTransfer:t}=e,i=this.getFiles(t),r=1===i?.length?i[0]:null;0!==i.length&&(this.setValidity(i),t.items?.clear(),t.clearData(),this.fileDropped.emit({file:r,validity:this._validity}))}onDragEnter(e){e.stopPropagation(),e.preventDefault(),this.fileDragEnter.emit(!0)}onDragOver(e){e.stopPropagation(),e.preventDefault(),this.fileDragOver.emit(!0)}onDragLeave(e){e.stopPropagation(),e.preventDefault(),this.fileDragLeave.emit(!0)}typeMatch(e){if(!this._accept.length)return!0;const t=e.name.split(".").pop().toLowerCase(),i=e.type.toLowerCase();return this._accept.some(o=>i.includes(o)||o.includes(`.${t}`))}getFiles(e){const{items:t,files:i}=e;return t?Array.from(t).filter(r=>"file"===r.kind).map(r=>r.getAsFile()):Array.from(i)||[]}isFileTooLong(e){return!!this.maxFileSize&&e.size>this.maxFileSize}setValidity(e){const t=e[0],i=e.length>1,r=!this.typeMatch(t),o=this.isFileTooLong(t);this._validity={...this._validity,multipleFilesDropped:i,fileTypeMismatch:r,maxFileSizeExceeded:o,valid:!r&&!o&&!i}}}$b.\u0275fac=function(e){return new(e||$b)},$b.\u0275cmp=xe({type:$b,selectors:[["dot-drop-zone"]],hostBindings:function(e,t){1&e&&de("drop",function(r){return t.onDrop(r)})("dragenter",function(r){return t.onDragEnter(r)})("dragover",function(r){return t.onDragOver(r)})("dragleave",function(r){return t.onDragLeave(r)})},inputs:{maxFileSize:"maxFileSize",accept:"accept"},outputs:{fileDropped:"fileDropped",fileDragEnter:"fileDragEnter",fileDragOver:"fileDragOver",fileDragLeave:"fileDragLeave"},standalone:!0,features:[el],ngContentSelectors:["*"],decls:1,vars:0,template:function(e,t){1&e&&(So(),_r(0))},dependencies:[zn],changeDetection:0});class Wb{}Wb.\u0275fac=function(e){return new(e||Wb)},Wb.\u0275cmp=xe({type:Wb,selectors:[["dot-icon"]],inputs:{name:"name",size:"size"},decls:2,vars:3,consts:[[1,"material-icons"]],template:function(e,t){1&e&&(I(0,"i",0),Te(1),A()),2&e&&(gc("font-size",t.size,"px"),C(1),Ot(t.name))},styles:["[_nghost-%COMP%]{display:inline-flex}[tiny][_nghost-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}[big][_nghost-%COMP%] i[_ngcontent-%COMP%]{font-size:24px}[inverted][_nghost-%COMP%] i[_ngcontent-%COMP%]{color:#fff}[_nghost-%COMP%] i[_ngcontent-%COMP%]{font-size:1.571428571rem;-webkit-user-select:none;user-select:none}"]});class pu{constructor(e){this.dotMessageService=e}transform(e,t=[]){return e?this.dotMessageService.get(e,...t):""}}pu.\u0275fac=function(e){return new(e||pu)(O(ps,16))},pu.\u0275pipe=Gn({name:"dm",type:pu,pure:!0,standalone:!0});const xue=function(n){return[n]};function Iue(n,e){if(1&n&&_e(0,"i",6),2&n){const t=M();b("ngClass",xt(1,xue,t.configuration.icon))}}function Oue(n,e){if(1&n&&(I(0,"h2",7),Te(1),A()),2&n){const t=M();C(1),Vi(" ",null==t.configuration?null:t.configuration.subtitle," ")}}function Aue(n,e){if(1&n){const t=Qe();I(0,"p-button",10),de("onClick",function(){return ge(t),ye(M(2).buttonAction.emit())}),A()}2&n&&b("label",M(2).buttonLabel)}function kue(n,e){1&n&&(I(0,"span"),Te(1),Eo(2,"dm"),A()),2&n&&(C(1),Ot(xo(2,1,"dot.common.or.text")))}function Nue(n,e){if(1&n&&(pt(0),E(1,kue,3,3,"span",5),I(2,"a",11),Te(3),Eo(4,"dm"),A(),mt()),2&n){const t=M(2);C(1),b("ngIf",!t.hideContactUsLink&&t.buttonLabel),C(2),Ot(xo(4,2,"Contact-Us-for-more-Information"))}}function Pue(n,e){if(1&n&&(pt(0),I(1,"div",8),E(2,Aue,1,1,"p-button",9),E(3,Nue,5,4,"ng-container",5),A(),mt()),2&n){const t=M();C(2),b("ngIf",t.buttonLabel),C(1),b("ngIf",!t.hideContactUsLink)}}class Gb{constructor(){this.hideContactUsLink=!1,this.buttonAction=new re}}Gb.\u0275fac=function(e){return new(e||Gb)},Gb.\u0275cmp=xe({type:Gb,selectors:[["dot-empty-container"]],inputs:{configuration:"configuration",buttonLabel:"buttonLabel",hideContactUsLink:"hideContactUsLink"},outputs:{buttonAction:"buttonAction"},standalone:!0,features:[el],decls:7,vars:4,consts:[[1,"message__wrapper","flex","gap-4","flex-column","w-30rem"],["data-Testid","message-principal",1,"message__principal-wrapper","flex","align-items-center","flex-column","gap-2"],["class","message__icon pi","data-Testid","message-icon",3,"ngClass",4,"ngIf"],["data-Testid","message-title",1,"message__title"],["class","message__subtitle","data-Testid","message-subtitle",4,"ngIf"],[4,"ngIf"],["data-Testid","message-icon",1,"message__icon","pi",3,"ngClass"],["data-Testid","message-subtitle",1,"message__subtitle"],["data-Testid","message-extra",1,"message__extra-wrapper","flex","align-items-center","flex-column","gap-2"],["data-Testid","message-button",3,"label","onClick",4,"ngIf"],["data-Testid","message-button",3,"label","onClick"],["data-Testid","message-contact-link","href","https://dotcms.com/contact-us/","target","_blank",1,"message__external-link"]],template:function(e,t){1&e&&(I(0,"div",0)(1,"div",1),E(2,Iue,1,3,"i",2),I(3,"h1",3),Te(4),A(),E(5,Oue,2,1,"h2",4),A(),E(6,Pue,4,2,"ng-container",5),A()),2&e&&(C(2),b("ngIf",null==t.configuration?null:t.configuration.icon),C(2),Ot(null==t.configuration?null:t.configuration.title),C(1),b("ngIf",null==t.configuration?null:t.configuration.subtitle),C(1),b("ngIf",!t.hideContactUsLink||t.buttonLabel))},dependencies:[ks,iT,nn,yi,pu],styles:["[_nghost-%COMP%]{height:100%;display:flex;justify-content:center;align-content:center;flex-wrap:wrap}.message__title[_ngcontent-%COMP%], .message__subtitle[_ngcontent-%COMP%]{margin:0;text-align:center;line-height:140%}.message__title[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:700;color:#14151a}.message__subtitle[_ngcontent-%COMP%]{font-size:1rem;font-weight:400;color:#6c7389}.message__icon[_ngcontent-%COMP%]{font-size:3rem;padding:.75rem;color:#6c7389}.message__external-link[_ngcontent-%COMP%]{color:#14151a;text-align:center;font-size:1rem;font-weight:400}"],changeDetection:0});let rg=(()=>{class n{constructor(t,i,r,o,s){this.el=t,this.zone=i,this.config=r,this.renderer=o,this.changeDetector=s,this.escape=!0,this.autoHide=!0,this.fitContent=!0,this._tooltipOptions={tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",tooltipZIndex:"auto",escape:!0,positionTop:0,positionLeft:0,autoHide:!0}}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this.deactivate()}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{if("hover"===this.getOption("tooltipEvent"))this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener);else if("focus"===this.getOption("tooltipEvent")){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let t=this.getTarget(this.el.nativeElement);t.addEventListener("focus",this.focusListener),t.addEventListener("blur",this.blurListener)}})}ngOnChanges(t){t.tooltipPosition&&this.setOption({tooltipPosition:t.tooltipPosition.currentValue}),t.tooltipEvent&&this.setOption({tooltipEvent:t.tooltipEvent.currentValue}),t.appendTo&&this.setOption({appendTo:t.appendTo.currentValue}),t.positionStyle&&this.setOption({positionStyle:t.positionStyle.currentValue}),t.tooltipStyleClass&&this.setOption({tooltipStyleClass:t.tooltipStyleClass.currentValue}),t.tooltipZIndex&&this.setOption({tooltipZIndex:t.tooltipZIndex.currentValue}),t.escape&&this.setOption({escape:t.escape.currentValue}),t.showDelay&&this.setOption({showDelay:t.showDelay.currentValue}),t.hideDelay&&this.setOption({hideDelay:t.hideDelay.currentValue}),t.life&&this.setOption({life:t.life.currentValue}),t.positionTop&&this.setOption({positionTop:t.positionTop.currentValue}),t.positionLeft&&this.setOption({positionLeft:t.positionLeft.currentValue}),t.disabled&&this.setOption({disabled:t.disabled.currentValue}),t.text&&(this.setOption({tooltipLabel:t.text.currentValue}),this.active&&(t.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),t.autoHide&&this.setOption({autoHide:t.autoHide.currentValue}),t.tooltipOptions&&(this._tooltipOptions={...this._tooltipOptions,...t.tooltipOptions.currentValue},this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(t){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(t){(this.isAutoHide()||!(ce.hasClass(t.toElement,"p-tooltip")||ce.hasClass(t.toElement,"p-tooltip-arrow")||ce.hasClass(t.toElement,"p-tooltip-text")||ce.hasClass(t.relatedTarget,"p-tooltip")))&&this.deactivate()}onFocus(t){this.activate()}onBlur(t){this.deactivate()}onInputClick(t){this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let t=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},t)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div");let t=document.createElement("div");t.className="p-tooltip-arrow",this.container.appendChild(t),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),"body"===this.getOption("appendTo")?document.body.appendChild(this.container):"target"===this.getOption("appendTo")?ce.appendChild(this.container,this.el.nativeElement):ce.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()||this.bindContainerMouseleaveListener()}bindContainerMouseleaveListener(){this.containerMouseleaveListener||(this.containerMouseleaveListener=this.renderer.listen(this.container??this.container.nativeElement,"mouseleave",i=>{this.deactivate()}))}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),ce.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?zd.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&&zd.clear(this.container),this.remove()}updateText(){this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(this.getOption("tooltipLabel")))):this.tooltipText.innerHTML=this.getOption("tooltipLabel")}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()))}}getHostOffset(){if("body"===this.getOption("appendTo")||"target"===this.getOption("appendTo")){let t=this.el.nativeElement.getBoundingClientRect();return{left:t.left+ce.getWindowScrollLeft(),top:t.top+ce.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let t=this.getHostOffset(),i=t.left+ce.getOuterWidth(this.el.nativeElement),r=t.top+(ce.getOuterHeight(this.el.nativeElement)-ce.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let t=this.getHostOffset(),i=t.left-ce.getOuterWidth(this.container),r=t.top+(ce.getOuterHeight(this.el.nativeElement)-ce.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let t=this.getHostOffset(),i=t.left+(ce.getOuterWidth(this.el.nativeElement)-ce.getOuterWidth(this.container))/2,r=t.top-ce.getOuterHeight(this.container);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let t=this.getHostOffset(),i=t.left+(ce.getOuterWidth(this.el.nativeElement)-ce.getOuterWidth(this.container))/2,r=t.top+ce.getOuterHeight(this.el.nativeElement);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(t){this._tooltipOptions={...this._tooltipOptions,...t}}getOption(t){return this._tooltipOptions[t]}getTarget(t){return ce.hasClass(t,"p-inputwrapper")?ce.findSingle(t,"input"):t}preAlign(t){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+t;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let t=this.container.getBoundingClientRect(),i=t.top,r=t.left,o=ce.getOuterWidth(this.container),s=ce.getOuterHeight(this.container),a=ce.getViewport();return r+o>a.width||r<0||i<0||i+s>a.height}onWindowResize(t){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new EL(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){if("hover"===this.getOption("tooltipEvent"))this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener);else if("focus"===this.getOption("tooltipEvent")){let t=this.getTarget(this.el.nativeElement);t.removeEventListener("focus",this.focusListener),t.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&("body"===this.getOption("appendTo")?document.body.removeChild(this.container):"target"===this.getOption("appendTo")?this.el.nativeElement.removeChild(this.container):ce.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&zd.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(Jt),O(Vd),O(Vr),O(Kn))},n.\u0275dir=Me({type:n,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",autoHide:"autoHide",fitContent:"fitContent",text:["pTooltip","text"],disabled:["tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[Ji]}),n})(),og=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();const Lue=function(n){return{"dot-tab-dropdown--active":n}};function Rue(n,e){if(1&n){const t=Qe();I(0,"button",7),de("click",function(r){ge(t);const o=M().$implicit;return ye(M().onClickDropdown(r,o.value.id))}),_e(1,"i",8),A()}if(2&n){const t=M().$implicit,i=M();b("disabled",t.disabled)("aria-disabled",t.disabled)("ngClass",xt(5,Lue,i.activeId===t.value.id)),C(1),Dn(t.value.toggle?i.dropDownOpenIcon:i.dropDownCloseIcon)}}function Fue(n,e){1&n&&_e(0,"div",9)}const jue=function(n,e){return{"dot-tab--active":n,"dot-tab__button--right":e}};function zue(n,e){if(1&n){const t=Qe();I(0,"div",2)(1,"div",3)(2,"button",4),de("click",function(r){const s=ge(t).$implicit;return ye(M().onClickOption(r,s.value.id))}),Eo(3,"dm"),Te(4),A(),E(5,Rue,2,7,"button",5),A(),E(6,Fue,1,0,"div",6),A()}if(2&n){const t=e.$implicit,i=M();C(2),b("ngClass",Mi(10,jue,i.activeId===t.value.id,t.value.showDropdownButton))("value",t.value.id)("disabled",t.disabled)("item.disabled",t.disabled)("pTooltip",xo(3,8,"editpage.toolbar."+t.label.toLowerCase()+".page.clipboard")),C(2),Vi(" ",t.label," "),C(1),b("ngIf",t.value.showDropdownButton),C(1),b("ngIf",i.activeId===t.value.id)}}class Yb{constructor(){this.openMenu=new re,this.clickOption=new re,this.dropdownClick=new re,this._options=[],this.dropDownOpenIcon="pi pi-angle-up",this.dropDownCloseIcon="pi pi-angle-down"}ngOnChanges(e){e.options&&(this._options=this.options.map(t=>({...t,value:{...t.value,toggle:!t.value.showDropdownButton&&void 0}})))}onClickOption(e,t){t!==this.activeId&&this.clickOption.emit({event:e,optionId:t})}onClickDropdown(e,t){if(!this.shouldOpenMenu(t))return;this._options=this._options.map(o=>(t.includes(o.value.id)&&(o.value.toggle=!o.value.toggle),o));const r=e?.target?.closest(".dot-tab");this.openMenu.emit({event:e,menuId:t,target:r})}resetDropdowns(){this._options=this._options.map(e=>(e.value.toggle=!1,e))}resetDropdownById(e){this._options=this._options.map(t=>(t.value.id===e&&(t.value.toggle=!1),t))}shouldOpenMenu(e){return Boolean(this._options.find(t=>t.value.id===e&&t.value.showDropdownButton))}}function Vue(n,e){if(1&n&&(I(0,"small",1),Te(1),Eo(2,"dm"),A()),2&n){const t=M();C(1),Vi(" ",xo(2,1,t.errorMsg),"\n")}}Yb.\u0275fac=function(e){return new(e||Yb)},Yb.\u0275cmp=xe({type:Yb,selectors:[["dot-tab-buttons"]],inputs:{activeId:"activeId",options:"options"},outputs:{openMenu:"openMenu",clickOption:"clickOption",dropdownClick:"dropdownClick"},standalone:!0,features:[Ji,el],decls:2,vars:1,consts:[[1,"dot-tab-buttons"],["class","dot-tab-buttons__container",4,"ngFor","ngForOf"],[1,"dot-tab-buttons__container"],["data-testId","dot-tab-container",1,"dot-tab"],["data-testId","dot-tab-button-text","tooltipPosition","bottom",1,"dot-tab__button",3,"ngClass","value","disabled","item.disabled","pTooltip","click"],["class","dot-tab__dropdown","data-testId","dot-tab-button-dropdown",3,"disabled","aria-disabled","ngClass","click",4,"ngIf"],["class","dot-tab-indicator","data-testId","dot-tab-button",4,"ngIf"],["data-testId","dot-tab-button-dropdown",1,"dot-tab__dropdown",3,"disabled","aria-disabled","ngClass","click"],["data-testId","dot-tab-icon",1,"dot-tab-dropdown__icon","pi"],["data-testId","dot-tab-button",1,"dot-tab-indicator"]],template:function(e,t){1&e&&(I(0,"div",0),E(1,zue,7,13,"div",1),A()),2&e&&(C(1),b("ngForOf",t._options))},dependencies:[Hr,ks,nn,yi,og,rg,pu],styles:[".dot-tab-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;margin-right:2rem;font-size:1rem}.dot-tab-buttons__container[_ngcontent-%COMP%]{position:relative}.dot-tab[_ngcontent-%COMP%]{display:flex;position:relative}.dot-tab[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1rem;cursor:pointer}.dot-tab__button[_ngcontent-%COMP%]{border:1.5px solid #f3f3f4;color:var(--color-palette-primary-500);background-color:transparent;padding:.5rem 1rem;border-radius:.375rem;height:2.5rem;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}.dot-tab__button[_ngcontent-%COMP%]:hover{background:var(--color-palette-primary-100)}.dot-tab__button[_ngcontent-%COMP%]:disabled{cursor:not-allowed;background-color:#fafafb;color:#afb3c0}.dot-tab__button--right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0;border-right:0}.dot-tab__dropdown[_ngcontent-%COMP%]{background-color:transparent;border:1.5px solid #f3f3f4;height:2.5rem;border-top-right-radius:.375rem;border-bottom-right-radius:.375rem;border-left:0;padding:.5rem;color:var(--color-palette-primary-500)}.dot-tab__dropdown[_ngcontent-%COMP%]:hover{background:var(--color-palette-primary-200)}.dot-tab__dropdown[_ngcontent-%COMP%]:disabled{cursor:not-allowed;background-color:#fafafb;color:#afb3c0}.dot-tab-indicator[_ngcontent-%COMP%]{height:.25rem;border-radius:1rem;width:auto;background-color:var(--color-palette-primary-500);left:0;right:0;bottom:-.6rem;position:absolute}.dot-tab--active[_ngcontent-%COMP%]{background:var(--color-palette-primary-100);border-radius:.375rem;border-color:#fff}.dot-tab--active.dot-tab__button--right[_ngcontent-%COMP%]{border-color:#fff;border-top-right-radius:0;border-bottom-right-radius:0}.dot-tab-dropdown--active[_ngcontent-%COMP%]{background:var(--color-palette-primary-200);border-color:#fff}.dot-tab-dropdown__icon[_ngcontent-%COMP%]{width:1.5rem;display:flex;align-items:center;justify-content:center}"]});const qb={maxlength:"error.form.validator.maxlength",required:"error.form.validator.required",pattern:"error.form.validator.pattern"};class Kb{constructor(e,t){this.cd=e,this.dotMessageService=t,this.errorMsg="",this.destroy$=new se}set message(e){this.defaultMessage=e,this.cd.markForCheck()}set field(e){e&&(this._field=e,e.statusChanges.pipe(Tn(this.destroy$)).subscribe(()=>{this.errorMsg=this.getErrors(e.errors),this.cd.detectChanges()}))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getErrors(e){let t=[];return e&&(t=[...this.getMsgDefaultValidators(e),...this.getMsgCustomsValidators(e)]),this.defaultMessage?this.defaultMessage:t.slice(0,1)[0]}getMsgDefaultValidators(e){let t=[];return Object.entries(e).forEach(([i,r])=>{if(i in qb){let o="";const{requiredLength:s,requiredPattern:a}=r;switch(i){case"maxlength":o=this.dotMessageService.get(qb[i],s);break;case"pattern":o=this.dotMessageService.get(this.patternErrorMessage||qb[i],a);break;default:o=qb[i]}t=[...t,o]}}),t}getMsgCustomsValidators(e){let t=[];return Object.entries(e).forEach(([,i])=>{"string"==typeof i&&(t=[...t,i])}),t}}Kb.\u0275fac=function(e){return new(e||Kb)(O(Kn),O(ps))},Kb.\u0275cmp=xe({type:Kb,selectors:[["dot-field-validation-message"]],inputs:{patternErrorMessage:"patternErrorMessage",message:"message",field:"field"},standalone:!0,features:[el],decls:1,vars:1,consts:[["class","p-invalid","data-testId","error-msg",4,"ngIf"],["data-testId","error-msg",1,"p-invalid"]],template:function(e,t){1&e&&E(0,Vue,3,3,"small",0),2&e&&b("ngIf",t._field&&t._field.enabled&&t._field.dirty&&!t._field.valid)},dependencies:[nn,pu],encapsulation:2,changeDetection:0});class mu{copy(e){const t=document.createElement("textarea");let i;return t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.opacity="0",t.value=e,document.body.appendChild(t),t.select(),new Promise((r,o)=>{try{i=document.execCommand("copy"),r(i)}catch{o(i)}document.body.removeChild(t)})}}function Bue(n,e){if(1&n&&(I(0,"span",3),Te(1),A()),2&n){const t=M();C(1),Ot(t.label)}}mu.\u0275fac=function(e){return new(e||mu)},mu.\u0275prov=$({token:mu,factory:mu.\u0275fac});class Qb{constructor(e,t){this.dotClipboardUtil=e,this.dotMessageService=t,this.copy=""}ngOnInit(){this.tooltipText=this.tooltipText||this.dotMessageService.get("Copy")}copyUrlToClipboard(e){e.stopPropagation(),this.dotClipboardUtil.copy(this.copy).then(()=>{const t=this.tooltipText;this.tooltipText=this.dotMessageService.get("Copied"),setTimeout(()=>{this.tooltipText=t},1e3)}).catch(()=>{this.tooltipText="Error"})}}Qb.\u0275fac=function(e){return new(e||Qb)(O(mu),O(ps))},Qb.\u0275cmp=xe({type:Qb,selectors:[["dot-copy-button"]],inputs:{copy:"copy",label:"label",tooltipText:"tooltipText"},standalone:!0,features:[Nt([mu]),el],decls:3,vars:2,consts:[["pButton","","type","button","appendTo","body","hideDelay","800","tooltipPosition","bottom",1,"p-button-sm","p-button-text",3,"pTooltip","click"],[1,"pi","pi-copy"],["class","p-button-label",4,"ngIf"],[1,"p-button-label"]],template:function(e,t){1&e&&(I(0,"button",0),de("click",function(r){return t.copyUrlToClipboard(r)}),_e(1,"i",1),E(2,Bue,2,1,"span",2),A()),2&e&&(b("pTooltip",t.tooltipText),C(2),b("ngIf",!!t.label))},dependencies:[og,rg,ks,ds,nn],changeDetection:0});class sg{constructor(e,t,i){this.el=e,this.renderer=t,this.formGroupDirective=i,t.addClass(this.el.nativeElement,"p-label-input-required")}set checkIsRequiredControl(e){this.isRequiredControl(e)||this.renderer.removeClass(this.el.nativeElement,"p-label-input-required")}isRequiredControl(e){const t=this.formGroupDirective.control?.get(e);return!(!t||!t.hasValidator(Cc.required))}}sg.\u0275fac=function(e){return new(e||sg)(O(kt),O(Vr),O(Ta))},sg.\u0275dir=Me({type:sg,selectors:[["","dotFieldRequired",""]],inputs:{checkIsRequiredControl:"checkIsRequiredControl"},standalone:!0});class Zb{constructor(){this.confirmationService=vt(DL)}onPressEscape(){this.confirmationService.close()}}Zb.\u0275fac=function(e){return new(e||Zb)},Zb.\u0275dir=Me({type:Zb,selectors:[["p-confirmPopup","dotRemoveConfirmPopupWithEscape",""]],hostBindings:function(e,t){1&e&&de("keydown.escape",function(r){return t.onPressEscape(r)},0,jI)},standalone:!0});let Uue=(()=>{class n{constructor(t){this.host=t,this.focused=!1}ngAfterViewChecked(){if(!this.focused&&this.autofocus){const t=ce.getFocusableElements(this.host.nativeElement);0===t.length&&this.host.nativeElement.focus(),t.length>0&&t[0].focus(),this.focused=!0}}}return n.\u0275fac=function(t){return new(t||n)(O(kt))},n.\u0275dir=Me({type:n,selectors:[["","pAutoFocus",""]],hostAttrs:[1,"p-element"],inputs:{autofocus:"autofocus"}}),n})();const Hue=["overlay"],$ue=["content"];function Wue(n,e){1&n&&Dt(0)}const Gue=function(n,e,t){return{showTransitionParams:n,hideTransitionParams:e,transform:t}},Yue=function(n){return{value:"visible",params:n}},que=function(n){return{mode:n}},Kue=function(n){return{$implicit:n}};function Que(n,e){if(1&n){const t=Qe();I(0,"div",1,3),de("click",function(r){return ge(t),ye(M(2).onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){return ge(t),ye(M(2).onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){return ge(t),ye(M(2).onOverlayContentAnimationDone(r))}),_r(2),E(3,Wue,1,0,"ng-container",4),A()}if(2&n){const t=M(2);Dn(t.contentStyleClass),b("ngStyle",t.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",xt(11,Yue,tl(7,Gue,t.showTransitionOptions,t.hideTransitionOptions,t.transformOptions[t.modal?t.overlayResponsiveDirection:"default"]))),C(3),b("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",xt(15,Kue,xt(13,que,t.overlayMode)))}}const Zue=function(n,e,t,i,r,o,s,a,l,c,u,d,h,f){return{"p-overlay p-component":!0,"p-overlay-modal p-component-overlay p-component-overlay-enter":n,"p-overlay-center":e,"p-overlay-top":t,"p-overlay-top-start":i,"p-overlay-top-end":r,"p-overlay-bottom":o,"p-overlay-bottom-start":s,"p-overlay-bottom-end":a,"p-overlay-left":l,"p-overlay-left-start":c,"p-overlay-left-end":u,"p-overlay-right":d,"p-overlay-right-start":h,"p-overlay-right-end":f}};function Jue(n,e){if(1&n){const t=Qe();I(0,"div",1,2),de("click",function(r){return ge(t),ye(M().onOverlayClick(r))}),E(2,Que,4,17,"div",0),A()}if(2&n){const t=M();Dn(t.styleClass),b("ngStyle",t.style)("ngClass",ak(5,Zue,[t.modal,t.modal&&"center"===t.overlayResponsiveDirection,t.modal&&"top"===t.overlayResponsiveDirection,t.modal&&"top-start"===t.overlayResponsiveDirection,t.modal&&"top-end"===t.overlayResponsiveDirection,t.modal&&"bottom"===t.overlayResponsiveDirection,t.modal&&"bottom-start"===t.overlayResponsiveDirection,t.modal&&"bottom-end"===t.overlayResponsiveDirection,t.modal&&"left"===t.overlayResponsiveDirection,t.modal&&"left-start"===t.overlayResponsiveDirection,t.modal&&"left-end"===t.overlayResponsiveDirection,t.modal&&"right"===t.overlayResponsiveDirection,t.modal&&"right-start"===t.overlayResponsiveDirection,t.modal&&"right-end"===t.overlayResponsiveDirection])),C(2),b("ngIf",t.visible)}}const Xue=["*"],ede={provide:Dr,useExisting:Bt(()=>O5),multi:!0},tde=P2([Bi({transform:"{{transform}}",opacity:0}),cp("{{showTransitionParams}}")]),nde=P2([cp("{{hideTransitionParams}}",Bi({transform:"{{transform}}",opacity:0}))]);let O5=(()=>{class n{constructor(t,i,r,o,s,a){this.document=t,this.el=i,this.renderer=r,this.config=o,this.overlayService=s,this.zone=a,this.visibleChange=new re,this.onBeforeShow=new re,this.onShow=new re,this.onBeforeHide=new re,this.onHide=new re,this.onAnimationStart=new re,this.onAnimationDone=new re,this._visible=!1,this.modalVisible=!1,this.isOverlayClicked=!1,this.isOverlayContentClicked=!1,this.transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"},this.window=this.document.defaultView}get visible(){return this._visible}set visible(t){this._visible=t,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(t){this._mode=t}get style(){return Pt.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(t){this._style=t}get styleClass(){return Pt.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(t){this._styleClass=t}get contentStyle(){return Pt.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(t){this._contentStyle=t}get contentStyleClass(){return Pt.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(t){this._contentStyleClass=t}get target(){const t=this._target||this.overlayOptions?.target;return void 0===t?"@prev":t}set target(t){this._target=t}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(t){this._appendTo=t}get autoZIndex(){const t=this._autoZIndex||this.overlayOptions?.autoZIndex;return void 0===t||t}set autoZIndex(t){this._autoZIndex=t}get baseZIndex(){const t=this._baseZIndex||this.overlayOptions?.baseZIndex;return void 0===t?0:t}set baseZIndex(t){this._baseZIndex=t}get showTransitionOptions(){const t=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return void 0===t?".12s cubic-bezier(0, 0, 0.2, 1)":t}set showTransitionOptions(t){this._showTransitionOptions=t}get hideTransitionOptions(){const t=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return void 0===t?".1s linear":t}set hideTransitionOptions(t){this._hideTransitionOptions=t}get listener(){return this._listener||this.overlayOptions?.listener}set listener(t){this._listener=t}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(t){this._responsive=t}get options(){return this._options}set options(t){this._options=t}get modal(){return"modal"===this.mode||this.overlayResponsiveOptions&&this.window?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return{...this.config?.overlayOptions,...this.options}}get overlayResponsiveOptions(){return{...this.overlayOptions?.responsive,...this.responsive}}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return ce.getTargetElement(this.target,this.el?.nativeElement)}ngAfterContentInit(){this.templates?.forEach(t=>{t.getType(),this.contentTemplate=t.template})}show(t,i=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&ce.focus(this.targetEl),this.modal&&ce.addClass(this.document?.body,"p-overflow-hidden")}hide(t,i=!1){this.visible&&(this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&ce.focus(this.targetEl),this.modal&&ce.removeClass(this.document?.body,"p-overflow-hidden"))}alignOverlay(){!this.modal&&ce.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(t){this._visible=t,this.visibleChange.emit(t)}onOverlayClick(t){this.isOverlayClicked=!0}onOverlayContentClick(t){this.overlayService.add({originalEvent:t,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(t){switch(t.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&zd.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),ce.appendOverlay(this.overlayEl,"body"===this.appendTo?this.document.body:this.appendTo,this.appendTo),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&ce.addClass(this.overlayEl,"p-component-overlay-leave")}this.handleEvents("onAnimationStart",t)}onOverlayContentAnimationDone(t){const i=this.overlayEl||t.element.parentElement;switch(t.toState){case"visible":this.show(i,!0),this.bindListeners();break;case"void":this.hide(i,!0),this.unbindListeners(),ce.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),zd.clear(i),this.modalVisible=!1}this.handleEvents("onAnimationDone",t)}handleEvents(t,i){this[t].emit(i),this.options&&this.options[t]&&this.options[t](i),this.config?.overlayOptions&&this.config?.overlayOptions[t]&&this.config?.overlayOptions[t](i)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new EL(this.targetEl,t=>{(!this.listener||this.listener(t,{type:"scroll",mode:this.overlayMode,valid:!0}))&&this.hide(t,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",t=>{const r=!(this.targetEl&&(this.targetEl.isSameNode(t.target)||!this.isOverlayClicked&&this.targetEl.contains(t.target))||this.isOverlayContentClicked);(this.listener?this.listener(t,{type:"outside",mode:this.overlayMode,valid:3!==t.which&&r}):r)&&this.hide(t),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",t=>{(this.listener?this.listener(t,{type:"resize",mode:this.overlayMode,valid:!ce.isTouchDevice()}):!ce.isTouchDevice())&&this.hide(t,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.window,"keydown",t=>{this.overlayOptions.hideOnEscape&&27===t.keyCode&&(this.listener?this.listener(t,{type:"keydown",mode:this.overlayMode,valid:!ce.isTouchDevice()}):!ce.isTouchDevice())&&this.zone.run(()=>{this.hide(t,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(ce.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),zd.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners()}}return n.\u0275fac=function(t){return new(t||n)(O(Nn),O(kt),O(Vr),O(Vd),O(GQ),O(Jt))},n.\u0275cmp=xe({type:n,selectors:[["p-overlay"]],contentQueries:function(t,i,r){if(1&t&&pi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},viewQuery:function(t,i){if(1&t&&(hn(Hue,5),hn($ue,5)),2&t){let r;Xe(r=et())&&(i.overlayViewChild=r.first),Xe(r=et())&&(i.contentViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options"},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[Nt([ede])],ngContentSelectors:Xue,decls:1,vars:1,consts:[[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"ngStyle","ngClass","click"],["overlay",""],["content",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,i){1&t&&(So(),E(0,Jue,3,20,"div",0)),2&t&&b("ngIf",i.modalVisible)},dependencies:[yi,nn,ko,wr],styles:[".p-overlay{position:absolute;top:0;left:0}.p-overlay-modal{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%}.p-overlay-content{transform-origin:inherit}.p-overlay-modal>.p-overlay-content{z-index:1;width:90%}.p-overlay-top{align-items:flex-start}.p-overlay-top-start{align-items:flex-start;justify-content:flex-start}.p-overlay-top-end{align-items:flex-start;justify-content:flex-end}.p-overlay-bottom{align-items:flex-end}.p-overlay-bottom-start{align-items:flex-end;justify-content:flex-start}.p-overlay-bottom-end{align-items:flex-end;justify-content:flex-end}.p-overlay-left{justify-content:flex-start}.p-overlay-left-start{justify-content:flex-start;align-items:flex-start}.p-overlay-left-end{justify-content:flex-start;align-items:flex-end}.p-overlay-right{justify-content:flex-end}.p-overlay-right-start{justify-content:flex-end;align-items:flex-start}.p-overlay-right-end{justify-content:flex-end;align-items:flex-end}\n"],encapsulation:2,data:{animation:[xM("overlayContentAnimation",[up(":enter",[L2(tde)]),up(":leave",[L2(nde)])])]},changeDetection:0}),n})();const ide=["element"],rde=["content"];function ode(n,e){1&n&&Dt(0)}const kS=function(n,e){return{$implicit:n,options:e}};function sde(n,e){if(1&n&&(pt(0),E(1,ode,1,0,"ng-container",7),mt()),2&n){const t=M(2);C(1),b("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",Mi(2,kS,t.loadedItems,t.getContentOptions()))}}function ade(n,e){1&n&&Dt(0)}function lde(n,e){if(1&n&&(pt(0),E(1,ade,1,0,"ng-container",7),mt()),2&n){const t=e.$implicit,i=e.index,r=M(3);C(1),b("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",Mi(2,kS,t,r.getOptions(i)))}}const cde=function(n){return{"p-scroller-loading":n}};function ude(n,e){if(1&n&&(I(0,"div",8,9),E(2,lde,2,5,"ng-container",10),A()),2&n){const t=M(2);b("ngClass",xt(4,cde,t.d_loading))("ngStyle",t.contentStyle),C(2),b("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy||t.index)}}function dde(n,e){1&n&&_e(0,"div",11),2&n&&b("ngStyle",M(2).spacerStyle)}function hde(n,e){1&n&&Dt(0)}const fde=function(n){return{numCols:n}},A5=function(n){return{options:n}};function pde(n,e){if(1&n&&(pt(0),E(1,hde,1,0,"ng-container",7),mt()),2&n){const t=e.index,i=M(4);C(1),b("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",xt(4,A5,i.getLoaderOptions(t,i.both&&xt(2,fde,i._numItemsInViewport.cols))))}}function mde(n,e){if(1&n&&(pt(0),E(1,pde,2,6,"ng-container",14),mt()),2&n){const t=M(3);C(1),b("ngForOf",t.loaderArr)}}function gde(n,e){1&n&&Dt(0)}const yde=function(){return{styleClass:"p-scroller-loading-icon"}};function _de(n,e){if(1&n&&(pt(0),E(1,gde,1,0,"ng-container",7),mt()),2&n){const t=M(4);C(1),b("ngTemplateOutlet",t.loaderIconTemplate)("ngTemplateOutletContext",xt(3,A5,uo(2,yde)))}}function vde(n,e){1&n&&_e(0,"i",16)}function bde(n,e){if(1&n&&(E(0,_de,2,5,"ng-container",0),E(1,vde,1,0,"ng-template",null,15,Bn)),2&n){const t=Cn(2);b("ngIf",M(3).loaderIconTemplate)("ngIfElse",t)}}const wde=function(n){return{"p-component-overlay":n}};function Cde(n,e){if(1&n&&(I(0,"div",12),E(1,mde,2,1,"ng-container",0),E(2,bde,3,2,"ng-template",null,13,Bn),A()),2&n){const t=Cn(3),i=M(2);b("ngClass",xt(3,wde,!i.loaderTemplate)),C(1),b("ngIf",i.loaderTemplate)("ngIfElse",t)}}const Dde=function(n,e,t){return{"p-scroller":!0,"p-scroller-inline":n,"p-both-scroll":e,"p-horizontal-scroll":t}};function Mde(n,e){if(1&n){const t=Qe();pt(0),I(1,"div",2,3),de("scroll",function(r){return ge(t),ye(M().onContainerScroll(r))}),E(3,sde,2,5,"ng-container",0),E(4,ude,3,6,"ng-template",null,4,Bn),E(6,dde,1,1,"div",5),E(7,Cde,4,5,"div",6),A(),mt()}if(2&n){const t=Cn(5),i=M();C(1),Dn(i._styleClass),b("ngStyle",i._style)("ngClass",tl(10,Dde,i.inline,i.both,i.horizontal)),Yt("id",i._id)("tabindex",i.tabindex),C(2),b("ngIf",i.contentTemplate)("ngIfElse",t),C(3),b("ngIf",i._showSpacer),C(1),b("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function Tde(n,e){1&n&&Dt(0)}const Sde=function(n,e){return{rows:n,columns:e}};function Ede(n,e){if(1&n&&(pt(0),E(1,Tde,1,0,"ng-container",7),mt()),2&n){const t=M(2);C(1),b("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",Mi(5,kS,t.items,Mi(2,Sde,t._items,t.loadedColumns)))}}function xde(n,e){if(1&n&&(_r(0),E(1,Ede,2,8,"ng-container",17)),2&n){const t=M();C(1),b("ngIf",t.contentTemplate)}}const Ide=["*"];let k5=(()=>{class n{constructor(t,i){this.cd=t,this.zone=i,this.onLazyLoad=new re,this.onScroll=new re,this.onScrollIndexChange=new re,this._tabindex=0,this._itemSize=0,this._orientation="vertical",this._step=0,this._delay=0,this._resizeDelay=10,this._appendOnly=!1,this._inline=!1,this._lazy=!1,this._disabled=!1,this._loaderDisabled=!1,this._showSpacer=!0,this._showLoader=!1,this._autoSize=!1,this.d_loading=!1,this.first=0,this.last=0,this.page=0,this.isRangeChanged=!1,this.numItemsInViewport=0,this.lastScrollPos=0,this.lazyLoadState={},this.loaderArr=[],this.spacerStyle={},this.contentStyle={},this.initialized=!1}get id(){return this._id}set id(t){this._id=t}get style(){return this._style}set style(t){this._style=t}get styleClass(){return this._styleClass}set styleClass(t){this._styleClass=t}get tabindex(){return this._tabindex}set tabindex(t){this._tabindex=t}get items(){return this._items}set items(t){this._items=t}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=t}get scrollHeight(){return this._scrollHeight}set scrollHeight(t){this._scrollHeight=t}get scrollWidth(){return this._scrollWidth}set scrollWidth(t){this._scrollWidth=t}get orientation(){return this._orientation}set orientation(t){this._orientation=t}get step(){return this._step}set step(t){this._step=t}get delay(){return this._delay}set delay(t){this._delay=t}get resizeDelay(){return this._resizeDelay}set resizeDelay(t){this._resizeDelay=t}get appendOnly(){return this._appendOnly}set appendOnly(t){this._appendOnly=t}get inline(){return this._inline}set inline(t){this._inline=t}get lazy(){return this._lazy}set lazy(t){this._lazy=t}get disabled(){return this._disabled}set disabled(t){this._disabled=t}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(t){this._loaderDisabled=t}get columns(){return this._columns}set columns(t){this._columns=t}get showSpacer(){return this._showSpacer}set showSpacer(t){this._showSpacer=t}get showLoader(){return this._showLoader}set showLoader(t){this._showLoader=t}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(t){this._numToleratedItems=t}get loading(){return this._loading}set loading(t){this._loading=t}get autoSize(){return this._autoSize}set autoSize(t){this._autoSize=t}get trackBy(){return this._trackBy}set trackBy(t){this._trackBy=t}get options(){return this._options}set options(t){this._options=t,t&&"object"==typeof t&&Object.entries(t).forEach(([i,r])=>this[`_${i}`]!==r&&(this[`_${i}`]=r))}get vertical(){return"vertical"===this._orientation}get horizontal(){return"horizontal"===this._orientation}get both(){return"both"===this._orientation}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(t=>this._columns?t:t.slice(this._appendOnly?0:this.first.cols,this.last.cols)):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}get isPageChanged(){return!this._step||this.page!==this.getPageByFirst()}ngOnInit(){this.setInitialState()}ngOnChanges(t){let i=!1;if(t.loading){const{previousValue:r,currentValue:o}=t.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,i=!0)}if(t.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),t.numToleratedItems){const{previousValue:r,currentValue:o}=t.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(t.options){const{previousValue:r,currentValue:o}=t.options;this.lazy&&r?.loading!==o?.loading&&o?.loading!==this.d_loading&&(this.d_loading=o.loading,i=!0),r?.numToleratedItems!==o?.numToleratedItems&&o?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=o.numToleratedItems)}this.initialized&&!i&&(t.items?.previousValue?.length!==t.items?.currentValue?.length||t.itemSize||t.scrollHeight||t.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"content":this.contentTemplate=t.template;break;case"item":default:this.itemTemplate=t.template;break;case"loader":this.loaderTemplate=t.template;break;case"loadericon":this.loaderIconTemplate=t.template}})}ngAfterViewInit(){this.viewInit()}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1}viewInit(){ce.isVisible(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=ce.getWidth(this.elementViewChild.nativeElement),this.defaultHeight=ce.getHeight(this.elementViewChild.nativeElement),this.defaultContentWidth=ce.getWidth(this.contentEl),this.defaultContentHeight=ce.getHeight(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(t){this.contentEl=t||this.contentViewChild?.nativeElement||ce.findSingle(this.elementViewChild?.nativeElement,".p-scroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,this.d_loading=this._loading||!1,this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=[],this.spacerStyle={},this.contentStyle={}}getElementRef(){return this.elementViewChild}getPageByFirst(){return Math.floor((this.first+4*this.d_numToleratedItems)/(this._step||1))}scrollTo(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.elementViewChild?.nativeElement?.scrollTo(t)}scrollToIndex(t,i="auto"){const{numToleratedItems:r}=this.calculateNumItems(),o=this.getContentPosition(),s=(u=0,d)=>u<=d?0:u,a=(u,d,h)=>u*d+h,l=(u=0,d=0)=>this.scrollTo({left:u,top:d,behavior:i});let c=0;this.both?(c={rows:s(t[0],r[0]),cols:s(t[1],r[1])},l(a(c.cols,this._itemSize[1],o.left),a(c.rows,this._itemSize[0],o.top))):(c=s(t,r),this.horizontal?l(a(c,this._itemSize,o.left),0):l(0,a(c,this._itemSize,o.top))),this.isRangeChanged=this.first!==c,this.first=c}scrollInView(t,i,r="auto"){if(i){const{first:o,viewport:s}=this.getRenderedRange(),a=(u=0,d=0)=>this.scrollTo({left:u,top:d,behavior:r}),c="to-end"===i;if("to-start"===i){if(this.both)s.first.rows-o.rows>t[0]?a(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-o.cols>t[1]&&a((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-o>t){const u=(s.first-1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else if(c)if(this.both)s.last.rows-o.rows<=t[0]+1?a(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-o.cols<=t[1]+1&&a((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-o<=t+1){const u=(s.first+1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else this.scrollToIndex(t,r)}getRenderedRange(){const t=(o,s)=>Math.floor(o/(s||o));let i=this.first,r=0;if(this.elementViewChild?.nativeElement){const{scrollTop:o,scrollLeft:s}=this.elementViewChild.nativeElement;this.both?(i={rows:t(o,this._itemSize[0]),cols:t(s,this._itemSize[1])},r={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols}):(i=t(this.horizontal?s:o,this._itemSize),r=i+this.numItemsInViewport)}return{first:this.first,last:this.last,viewport:{first:i,last:r}}}calculateNumItems(){const t=this.getContentPosition(),i=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-t.left:0,r=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-t.top:0,o=(c,u)=>Math.ceil(c/(u||c)),s=c=>Math.ceil(c/2),a=this.both?{rows:o(r,this._itemSize[0]),cols:o(i,this._itemSize[1])}:o(this.horizontal?i:r,this._itemSize);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(this.both?[s(a.rows),s(a.cols)]:s(a))}}calculateOptions(){const{numItemsInViewport:t,numToleratedItems:i}=this.calculateNumItems(),r=(a,l,c,u=!1)=>this.getLast(a+l+(aArray.from({length:t.cols})):Array.from({length:t})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:o.cols}:0:o,last:Math.min(this._step?this._step:this.last,this.items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";const[t,i]=[ce.getWidth(this.contentEl),ce.getHeight(this.contentEl)];t!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");const[r,o]=[ce.getWidth(this.elementViewChild.nativeElement),ce.getHeight(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=rthis.elementViewChild.nativeElement.style[s]=a;this.both||this.horizontal?(o("height",r),o("width",i)):o("height",r)}}setSpacerSize(){if(this._items){const t=this.getContentPosition(),i=(r,o,s,a=0)=>this.spacerStyle={...this.spacerStyle,[`${r}`]:(o||[]).length*s+a+"px"};this.both?(i("height",this._items,this._itemSize[0],t.y),i("width",this._columns||this._items[1],this._itemSize[1],t.x)):this.horizontal?i("width",this._columns||this._items,this._itemSize,t.x):i("height",this._items,this._itemSize,t.y)}}setContentPosition(t){if(this.contentEl&&!this._appendOnly){const i=t?t.first:this.first,r=(s,a)=>s*a,o=(s=0,a=0)=>this.contentStyle={...this.contentStyle,transform:`translate3d(${s}px, ${a}px, 0)`};if(this.both)o(r(i.cols,this._itemSize[1]),r(i.rows,this._itemSize[0]));else{const s=r(i,this._itemSize);this.horizontal?o(s,0):o(0,s)}}}onScrollPositionChange(t){const i=t.target,r=this.getContentPosition(),o=(g,y)=>g?g>y?g-y:g:0,s=(g,y)=>Math.floor(g/(y||g)),a=(g,y,v,w,_,N)=>g<=_?_:N?v-w-_:y+_-1,l=(g,y,v,w,_,N,T)=>g<=N?0:Math.max(0,T?gy?v:g-2*N),c=(g,y,v,w,_,N=!1)=>{let T=y+w+2*_;return g>=_&&(T+=_+1),this.getLast(T,N)},u=o(i.scrollTop,r.top),d=o(i.scrollLeft,r.left);let h=this.both?{rows:0,cols:0}:0,f=this.last,p=!1,m=this.lastScrollPos;if(this.both){const g=this.lastScrollPos.top<=u,y=this.lastScrollPos.left<=d;if(!this._appendOnly||this._appendOnly&&(g||y)){const v={rows:s(u,this._itemSize[0]),cols:s(d,this._itemSize[1])},w={rows:a(v.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],g),cols:a(v.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],y)};h={rows:l(v.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],g),cols:l(v.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],y)},f={rows:c(v.rows,h.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(v.cols,h.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=h.rows!==this.first.rows||f.rows!==this.last.rows||h.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,m={top:u,left:d}}}else{const g=this.horizontal?d:u,y=this.lastScrollPos<=g;if(!this._appendOnly||this._appendOnly&&y){const v=s(g,this._itemSize);h=l(v,a(v,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,y),this.first,0,0,this.d_numToleratedItems,y),f=c(v,h,0,this.numItemsInViewport,this.d_numToleratedItems),p=h!==this.first||f!==this.last||this.isRangeChanged,m=g}}return{first:h,last:f,isRangeChanged:p,scrollPos:m}}onScrollChange(t){const{first:i,last:r,isRangeChanged:o,scrollPos:s}=this.onScrollPositionChange(t);if(o){const a={first:i,last:r};if(this.setContentPosition(a),this.first=i,this.last=r,this.lastScrollPos=s,this.handleEvents("onScrollIndexChange",a),this._lazy&&this.isPageChanged){const l={first:this._step?Math.min(this.getPageByFirst()*this._step,this.items.length-this._step):i,last:Math.min(this._step?(this.getPageByFirst()+1)*this._step:r,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.handleEvents("onLazyLoad",l),this.lazyLoadState=l}}}onContainerScroll(t){if(this.handleEvents("onScroll",{originalEvent:t}),this._delay&&this.isPageChanged){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:i}=this.onScrollPositionChange(t);(i||this._step&&this.isPageChanged)&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&(!this._lazy||void 0===this._loading)&&(this.d_loading=!1,this.page=this.getPageByFirst(),this.cd.detectChanges())},this._delay)}else!this.d_loading&&this.onScrollChange(t)}bindResizeListener(){this.windowResizeListener||this.zone.runOutsideAngular(()=>{this.windowResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.windowResizeListener),window.addEventListener("orientationchange",this.windowResizeListener)})}unbindResizeListener(){this.windowResizeListener&&(window.removeEventListener("resize",this.windowResizeListener),window.removeEventListener("orientationchange",this.windowResizeListener),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(ce.isVisible(this.elementViewChild?.nativeElement)){const[t,i]=[ce.getWidth(this.elementViewChild.nativeElement),ce.getHeight(this.elementViewChild.nativeElement)],[r,o]=[t!==this.defaultWidth,i!==this.defaultHeight];(this.both?r||o:this.horizontal?r:this.vertical&&o)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=t,this.defaultHeight=i,this.defaultContentWidth=ce.getWidth(this.contentEl),this.defaultContentHeight=ce.getHeight(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(t,i){return this.options&&this.options[t]?this.options[t](i):this[t].emit(i)}getContentOptions(){return{contentStyleClass:"p-scroller-content "+(this.d_loading?"p-scroller-loading":""),items:this.loadedItems,getItemOptions:t=>this.getOptions(t),loading:this.d_loading,getLoaderOptions:(t,i)=>this.getLoaderOptions(t,i),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both}}getOptions(t){const i=(this._items||[]).length,r=this.both?this.first.rows+t:this.first+t;return{index:r,count:i,first:0===r,last:r===i-1,even:r%2==0,odd:r%2!=0}}getLoaderOptions(t,i){const r=this.loaderArr.length;return{index:t,count:r,first:0===t,last:t===r-1,even:t%2==0,odd:t%2!=0,...i}}}return n.\u0275fac=function(t){return new(t||n)(O(Kn),O(Jt))},n.\u0275cmp=xe({type:n,selectors:[["p-scroller"]],contentQueries:function(t,i,r){if(1&t&&pi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},viewQuery:function(t,i){if(1&t&&(hn(ide,5),hn(rde,5)),2&t){let r;Xe(r=et())&&(i.elementViewChild=r.first),Xe(r=et())&&(i.contentViewChild=r.first)}},hostAttrs:[1,"p-scroller-viewport","p-element"],inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[Ji],ngContentSelectors:Ide,decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["disabledContainer",""],[3,"ngStyle","ngClass","scroll"],["element",""],["buildInContent",""],["class","p-scroller-spacer",3,"ngStyle",4,"ngIf"],["class","p-scroller-loader",3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-scroller-content",3,"ngClass","ngStyle"],["content",""],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"p-scroller-spacer",3,"ngStyle"],[1,"p-scroller-loader",3,"ngClass"],["buildInLoader",""],[4,"ngFor","ngForOf"],["buildInLoaderIcon",""],[1,"p-scroller-loading-icon","pi","pi-spinner","pi-spin"],[4,"ngIf"]],template:function(t,i){if(1&t&&(So(),E(0,Mde,8,14,"ng-container",0),E(1,xde,2,1,"ng-template",null,1,Bn)),2&t){const r=Cn(2);b("ngIf",!i._disabled)("ngIfElse",r)}},dependencies:[yi,Hr,nn,ko,wr],styles:["p-scroller{flex:1;outline:0 none}.p-scroller{position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;outline:0 none}.p-scroller-content{position:absolute;top:0;left:0;min-height:100%;min-width:100%;will-change:transform}.p-scroller-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;pointer-events:none}.p-scroller-loader{position:sticky;top:0;left:0;width:100%;height:100%}.p-scroller-loader.p-component-overlay{display:flex;align-items:center;justify-content:center}.p-scroller-loading-icon{font-size:2rem}.p-scroller-inline .p-scroller-content{position:static}\n"],encapsulation:2}),n})(),N5=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();function Ode(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M();let i;C(1),Ot(null!==(i=t.label)&&void 0!==i?i:"empty")}}function Ade(n,e){1&n&&Dt(0)}const ag=function(n){return{height:n}},kde=function(n,e){return{"p-dropdown-item":!0,"p-highlight":n,"p-disabled":e}},NS=function(n){return{$implicit:n}},Nde=["container"],Pde=["filter"],Lde=["in"],Rde=["editableInput"],Fde=["items"],jde=["scroller"],zde=["overlay"];function Vde(n,e){if(1&n&&(pt(0),Te(1),mt()),2&n){const t=M(2);C(1),Ot(t.label||"empty")}}function Bde(n,e){1&n&&Dt(0)}const Ude=function(n){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":n}};function Hde(n,e){if(1&n&&(I(0,"span",14),E(1,Vde,2,1,"ng-container",15),E(2,Bde,1,0,"ng-container",16),A()),2&n){const t=M();b("ngClass",xt(9,Ude,null==t.label||0===t.label.length))("pTooltip",t.tooltip)("tooltipPosition",t.tooltipPosition)("positionStyle",t.tooltipPositionStyle)("tooltipStyleClass",t.tooltipStyleClass),Yt("id",t.labelId),C(1),b("ngIf",!t.selectedItemTemplate),C(1),b("ngTemplateOutlet",t.selectedItemTemplate)("ngTemplateOutletContext",xt(11,NS,t.selectedOption))}}const $de=function(n){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":n}};function Wde(n,e){if(1&n&&(I(0,"span",17),Te(1),A()),2&n){const t=M();b("ngClass",xt(2,$de,null==t.placeholder||0===t.placeholder.length)),C(1),Ot(t.placeholder||"empty")}}function Gde(n,e){if(1&n){const t=Qe();I(0,"input",18,19),de("input",function(r){return ge(t),ye(M().onEditableInputChange(r))})("focus",function(r){return ge(t),ye(M().onEditableInputFocus(r))})("blur",function(r){return ge(t),ye(M().onInputBlur(r))}),A()}if(2&n){const t=M();b("disabled",t.disabled),Yt("maxlength",t.maxlength)("placeholder",t.placeholder)("aria-expanded",t.overlayVisible)}}function Yde(n,e){if(1&n){const t=Qe();I(0,"i",20),de("click",function(r){return ge(t),ye(M().clear(r))}),A()}}function qde(n,e){1&n&&Dt(0)}function Kde(n,e){1&n&&Dt(0)}const P5=function(n){return{options:n}};function Qde(n,e){if(1&n&&(pt(0),E(1,Kde,1,0,"ng-container",16),mt()),2&n){const t=M(3);C(1),b("ngTemplateOutlet",t.filterTemplate)("ngTemplateOutletContext",xt(2,P5,t.filterOptions))}}function Zde(n,e){if(1&n){const t=Qe();I(0,"div",30)(1,"input",31,32),de("keydown.enter",function(r){return r.preventDefault()})("keydown",function(r){return ge(t),ye(M(3).onKeydown(r,!1))})("input",function(r){return ge(t),ye(M(3).onFilterInputChange(r))}),A(),_e(3,"span",33),A()}if(2&n){const t=M(3);C(1),b("value",t.filterValue||""),Yt("placeholder",t.filterPlaceholder)("aria-label",t.ariaFilterLabel)("aria-activedescendant",t.overlayVisible?"p-highlighted-option":t.labelId)}}function Jde(n,e){if(1&n&&(I(0,"div",27),de("click",function(i){return i.stopPropagation()}),E(1,Qde,2,4,"ng-container",28),E(2,Zde,4,4,"ng-template",null,29,Bn),A()),2&n){const t=Cn(3),i=M(2);C(1),b("ngIf",i.filterTemplate)("ngIfElse",t)}}function Xde(n,e){1&n&&Dt(0)}const L5=function(n,e){return{$implicit:n,options:e}};function ehe(n,e){if(1&n&&E(0,Xde,1,0,"ng-container",16),2&n){const t=e.$implicit,i=e.options;M(2),b("ngTemplateOutlet",Cn(7))("ngTemplateOutletContext",Mi(2,L5,t,i))}}function the(n,e){1&n&&Dt(0)}function nhe(n,e){if(1&n&&E(0,the,1,0,"ng-container",16),2&n){const t=e.options;b("ngTemplateOutlet",M(4).loaderTemplate)("ngTemplateOutletContext",xt(2,P5,t))}}function ihe(n,e){1&n&&(pt(0),E(1,nhe,1,4,"ng-template",36),mt())}function rhe(n,e){if(1&n){const t=Qe();I(0,"p-scroller",34,35),de("onLazyLoad",function(r){return ge(t),ye(M(2).onLazyLoad.emit(r))}),E(2,ehe,1,5,"ng-template",13),E(3,ihe,2,0,"ng-container",15),A()}if(2&n){const t=M(2);qn(xt(8,ag,t.scrollHeight)),b("items",t.optionsToDisplay)("itemSize",t.virtualScrollItemSize||t._itemSize)("autoSize",!0)("lazy",t.lazy)("options",t.virtualScrollOptions),C(3),b("ngIf",t.loaderTemplate)}}function ohe(n,e){1&n&&Dt(0)}const she=function(){return{}};function ahe(n,e){if(1&n&&(pt(0),E(1,ohe,1,0,"ng-container",16),mt()),2&n){M();const t=Cn(7),i=M();C(1),b("ngTemplateOutlet",t)("ngTemplateOutletContext",Mi(3,L5,i.optionsToDisplay,uo(2,she)))}}function lhe(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M().$implicit,i=M(4);C(1),Ot(i.getOptionGroupLabel(t)||"empty")}}function che(n,e){1&n&&Dt(0)}function uhe(n,e){1&n&&Dt(0)}const R5=function(n,e){return{$implicit:n,selectedOption:e}};function dhe(n,e){if(1&n&&(I(0,"li",42),E(1,lhe,2,1,"span",15),E(2,che,1,0,"ng-container",16),A(),E(3,uhe,1,0,"ng-container",16)),2&n){const t=e.$implicit,i=M(2).options,r=Cn(5),o=M(2);b("ngStyle",xt(6,ag,i.itemSize+"px")),C(1),b("ngIf",!o.groupTemplate),C(1),b("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",xt(8,NS,t)),C(1),b("ngTemplateOutlet",r)("ngTemplateOutletContext",Mi(10,R5,o.getOptionGroupChildren(t),o.selectedOption))}}function hhe(n,e){if(1&n&&(pt(0),E(1,dhe,4,13,"ng-template",41),mt()),2&n){const t=M().$implicit;C(1),b("ngForOf",t)}}function fhe(n,e){1&n&&Dt(0)}function phe(n,e){if(1&n&&(pt(0),E(1,fhe,1,0,"ng-container",16),mt()),2&n){const t=M().$implicit,i=Cn(5),r=M(2);C(1),b("ngTemplateOutlet",i)("ngTemplateOutletContext",Mi(2,R5,t,r.selectedOption))}}function mhe(n,e){if(1&n){const t=Qe();I(0,"p-dropdownItem",43),de("onClick",function(r){return ge(t),ye(M(4).onItemClick(r))}),A()}if(2&n){const t=e.$implicit,i=M().selectedOption,r=M(3);b("option",t)("selected",i==t)("label",r.getOptionLabel(t))("disabled",r.isOptionDisabled(t))("template",r.itemTemplate)}}function ghe(n,e){1&n&&E(0,mhe,1,5,"ng-template",41),2&n&&b("ngForOf",e.$implicit)}function yhe(n,e){if(1&n&&(pt(0),Te(1),mt()),2&n){const t=M(4);C(1),Vi(" ",t.emptyFilterMessageLabel," ")}}function _he(n,e){1&n&&Dt(0,null,45)}function vhe(n,e){if(1&n&&(I(0,"li",44),E(1,yhe,2,1,"ng-container",28),E(2,_he,2,0,"ng-container",22),A()),2&n){const t=M().options,i=M(2);b("ngStyle",xt(4,ag,t.itemSize+"px")),C(1),b("ngIf",!i.emptyFilterTemplate&&!i.emptyTemplate)("ngIfElse",i.emptyFilter),C(1),b("ngTemplateOutlet",i.emptyFilterTemplate||i.emptyTemplate)}}function bhe(n,e){if(1&n&&(pt(0),Te(1),mt()),2&n){const t=M(4);C(1),Vi(" ",t.emptyMessageLabel," ")}}function whe(n,e){1&n&&Dt(0,null,46)}function Che(n,e){if(1&n&&(I(0,"li",44),E(1,bhe,2,1,"ng-container",28),E(2,whe,2,0,"ng-container",22),A()),2&n){const t=M().options,i=M(2);b("ngStyle",xt(4,ag,t.itemSize+"px")),C(1),b("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),C(1),b("ngTemplateOutlet",i.emptyTemplate)}}function Dhe(n,e){if(1&n&&(I(0,"ul",37,38),E(2,hhe,2,1,"ng-container",15),E(3,phe,2,5,"ng-container",15),E(4,ghe,1,1,"ng-template",null,39,Bn),E(6,vhe,3,6,"li",40),E(7,Che,3,6,"li",40),A()),2&n){const t=e.options,i=M(2);qn(t.contentStyle),b("ngClass",t.contentStyleClass),Yt("id",i.listId),C(2),b("ngIf",i.group),C(1),b("ngIf",!i.group),C(3),b("ngIf",i.filterValue&&i.isEmpty()),C(1),b("ngIf",!i.filterValue&&i.isEmpty())}}function Mhe(n,e){1&n&&Dt(0)}function The(n,e){if(1&n&&(I(0,"div",21),E(1,qde,1,0,"ng-container",22),E(2,Jde,4,2,"div",23),I(3,"div",24),E(4,rhe,4,10,"p-scroller",25),E(5,ahe,2,6,"ng-container",15),E(6,Dhe,8,8,"ng-template",null,26,Bn),A(),E(8,Mhe,1,0,"ng-container",22),A()),2&n){const t=M();Dn(t.panelStyleClass),b("ngClass","p-dropdown-panel p-component")("ngStyle",t.panelStyle),C(1),b("ngTemplateOutlet",t.headerTemplate),C(1),b("ngIf",t.filter),C(1),gc("max-height",t.virtualScroll?"auto":t.scrollHeight||"auto"),C(1),b("ngIf",t.virtualScroll),C(1),b("ngIf",!t.virtualScroll),C(3),b("ngTemplateOutlet",t.footerTemplate)}}const She=function(n,e,t,i){return{"p-dropdown p-component":!0,"p-disabled":n,"p-dropdown-open":e,"p-focus":t,"p-dropdown-clearable":i}},Ehe={provide:Dr,useExisting:Bt(()=>PS),multi:!0};let xhe=(()=>{class n{constructor(){this.onClick=new re}onOptionClick(t){this.onClick.emit({originalEvent:t,option:this.option})}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick"},decls:3,vars:15,consts:[["role","option","pRipple","",3,"ngStyle","id","ngClass","click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,i){1&t&&(I(0,"li",0),de("click",function(o){return i.onOptionClick(o)}),E(1,Ode,2,1,"span",1),E(2,Ade,1,0,"ng-container",2),A()),2&t&&(b("ngStyle",xt(8,ag,i.itemSize+"px"))("id",i.selected?"p-highlighted-option":"")("ngClass",Mi(10,kde,i.selected,i.disabled)),Yt("aria-label",i.label)("aria-selected",i.selected),C(1),b("ngIf",!i.template),C(1),b("ngTemplateOutlet",i.template)("ngTemplateOutletContext",xt(13,NS,i.option)))},dependencies:[yi,nn,ko,wr,Bd],encapsulation:2}),n})(),PS=(()=>{class n{constructor(t,i,r,o,s,a){this.el=t,this.renderer=i,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.scrollHeight="200px",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.autoDisplayFirst=!0,this.emptyFilterMessage="",this.emptyMessage="",this.lazy=!1,this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.overlayDirection="end",this.onChange=new re,this.onFilter=new re,this.onFocus=new re,this.onBlur=new re,this.onClick=new re,this.onShow=new re,this.onHide=new re,this.onClear=new re,this.onLazyLoad=new re,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.id=function HQ(){return"pr_id_"+ ++wL}()}get disabled(){return this._disabled}set disabled(t){t&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=t,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=t,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get autoZIndex(){return this._autoZIndex}set autoZIndex(t){this._autoZIndex=t,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(t){this._baseZIndex=t,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(t){this._showTransitionOptions=t,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(t){this._hideTransitionOptions=t,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":default:this.itemTemplate=t.template;break;case"selectedItem":this.selectedItemTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"filter":this.filterTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"emptyfilter":this.emptyFilterTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"loader":this.loaderTemplate=t.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list",this.filterBy&&(this.filterOptions={filter:t=>this.onFilterInputChange(t),reset:()=>this.resetFilter()})}get options(){return this._options}set options(t){this._options=t,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.selectedOption=this.findOption(this.value,this.optionsToDisplay),!this.selectedOption&&Pt.isNotEmpty(this.value)&&!this.editable&&(this.value=null,this.onModelChange(this.value)),this.optionsChanged=!0,this._filterValue&&this._filterValue.length&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(t){this._filterValue=t,this.activateFilter()}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}get label(){return"number"==typeof this.selectedOption&&(this.selectedOption=this.selectedOption.toString()),this.selectedOption?this.getOptionLabel(this.selectedOption):null}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ic.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ic.EMPTY_FILTER_MESSAGE)}get filled(){return"string"==typeof this.value?!!this.value:this.value||null!=this.value||null!=this.value}get isVisibleClearIcon(){return null!=this.value&&""!==this.value&&this.showClear&&!this.disabled}updateEditableLabel(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.getOptionLabel(this.selectedOption):this.value||"")}getOptionLabel(t){return this.optionLabel?Pt.resolveFieldData(t,this.optionLabel):t&&void 0!==t.label?t.label:t}getOptionValue(t){return this.optionValue?Pt.resolveFieldData(t,this.optionValue):!this.optionLabel&&t&&void 0!==t.value?t.value:t}isOptionDisabled(t){return this.optionDisabled?Pt.resolveFieldData(t,this.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}getOptionGroupLabel(t){return this.optionGroupLabel?Pt.resolveFieldData(t,this.optionGroupLabel):t&&void 0!==t.label?t.label:t}getOptionGroupChildren(t){return this.optionGroupChildren?Pt.resolveFieldData(t,this.optionGroupChildren):t.items}onItemClick(t){const i=t.option;this.isOptionDisabled(i)||(this.selectItem(t.originalEvent,i),this.accessibleViewChild.nativeElement.focus({preventScroll:!0})),setTimeout(()=>{this.hide()},1)}selectItem(t,i){this.selectedOption!=i&&(this.selectedOption=i,this.value=this.getOptionValue(i),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:t,value:this.value}))}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let t=ce.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,"li.p-highlight");t&&ce.scrollInView(this.itemsWrapper,t),this.selectedOptionUpdated=!1}}writeValue(t){this.filter&&this.resetFilter(),this.value=t,this.updateSelectedOption(t),this.updateEditableLabel(),this.cd.markForCheck()}resetFilter(){this._filterValue=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this.optionsToDisplay=this.options}updateSelectedOption(t){this.selectedOption=this.findOption(t,this.optionsToDisplay),this.autoDisplayFirst&&!this.placeholder&&!this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&!this.editable&&(this.selectedOption=this.group?this.optionsToDisplay[0].items[0]:this.optionsToDisplay[0],this.value=this.getOptionValue(this.selectedOption),this.onModelChange(this.value)),this.selectedOptionUpdated=!0}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onMouseclick(t){this.disabled||this.readonly||this.isInputClick(t)||(this.onClick.emit(t),this.accessibleViewChild.nativeElement.focus({preventScroll:!0}),this.overlayVisible?this.hide():this.show(),this.cd.detectChanges())}isInputClick(t){return ce.hasClass(t.target,"p-dropdown-clear-icon")||t.target.isSameNode(this.accessibleViewChild.nativeElement)||this.editableInputViewChild&&t.target.isSameNode(this.editableInputViewChild.nativeElement)}isEmpty(){return!this.optionsToDisplay||this.optionsToDisplay&&0===this.optionsToDisplay.length}onEditableInputFocus(t){this.focused=!0,this.hide(),this.onFocus.emit(t)}onEditableInputChange(t){this.value=t.target.value,this.updateSelectedOption(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:t,value:this.value})}show(){this.overlayVisible=!0,this.cd.markForCheck()}onOverlayAnimationStart(t){if("visible"===t.toState){if(this.itemsWrapper=ce.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,this.virtualScroll?".p-scroller":".p-dropdown-items-wrapper"),this.virtualScroll&&this.scroller.setContentEl(this.itemsViewChild.nativeElement),this.options&&this.options.length)if(this.virtualScroll){const i=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;-1!==i&&this.scroller.scrollToIndex(i)}else{let i=ce.findSingle(this.itemsWrapper,".p-dropdown-item.p-highlight");i&&i.scrollIntoView({block:"nearest",inline:"center"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(t)}"void"===t.toState&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(t))}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.cd.markForCheck()}onInputFocus(t){this.focused=!0,this.onFocus.emit(t)}onInputBlur(t){this.focused=!1,this.onBlur.emit(t),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(t){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=t-1;0<=r;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}if(!i)for(let r=this.optionsToDisplay.length-1;r>=t;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}}return i}findNextEnabledOption(t){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=t+1;r0&&this.selectItem(t,this.getOptionGroupChildren(this.optionsToDisplay[0])[0])}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findNextEnabledOption(r);o&&(this.selectItem(t,o),this.selectedOptionUpdated=!0)}t.preventDefault();break;case 38:if(this.group){let r=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==r){let o=r.itemIndex-1;if(o>=0)this.selectItem(t,this.getOptionGroupChildren(this.optionsToDisplay[r.groupIndex])[o]),this.selectedOptionUpdated=!0;else if(o<0){let s=this.optionsToDisplay[r.groupIndex-1];s&&(this.selectItem(t,this.getOptionGroupChildren(s)[this.getOptionGroupChildren(s).length-1]),this.selectedOptionUpdated=!0)}}}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findPrevEnabledOption(r);o&&(this.selectItem(t,o),this.selectedOptionUpdated=!0)}t.preventDefault();break;case 32:i&&(this.overlayVisible?this.hide():this.show(),t.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),t.preventDefault();break;case 27:case 9:this.hide();break;default:i&&!t.metaKey&&17!==t.which&&this.search(t)}}search(t){this.searchTimeout&&clearTimeout(this.searchTimeout);const i=t.key;let r;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=i,this.searchValue=this.previousSearchChar===this.currentSearchChar?this.currentSearchChar:this.searchValue?this.searchValue+i:i,this.group){let o=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):{groupIndex:0,itemIndex:0};r=this.searchOptionWithinGroup(o)}else{let o=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;r=this.searchOption(++o)}r&&!this.isOptionDisabled(r)&&(this.selectItem(t,r),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(t){let i;return this.searchValue&&(i=this.searchOptionInRange(t,this.optionsToDisplay.length),i||(i=this.searchOptionInRange(0,t))),i}searchOptionInRange(t,i){for(let r=t;r{this.getSitesList(o.filter)}):console.warn("ContainerOptionsDirective is for use with PrimeNg Dropdown")}ngOnInit(){this.getSitesList(),this.dotEvents.forEach(e=>{this.dotEventsService.listen(e).pipe(Tn(this.destroy$)).subscribe(()=>this.getSitesList())})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}setOptions(e){this.primeDropdown.options=[...e],this.cd.detectChanges()}getSitesList(e=""){this.dotSiteService.getSites(e,this.pageSize).pipe(Tt(1)).subscribe(t=>this.setOptions(t))}}Jb.\u0275fac=function(e){return new(e||Jb)(O(PS,10),O(Oh),O(Ah),O(Kn))},Jb.\u0275dir=Me({type:Jb,selectors:[["","dotSiteSelector",""]],inputs:{archive:"archive",live:"live",system:"system",pageSize:"pageSize"},standalone:!0,features:[Nt([$i])]});class Xb{constructor(e){this.el=e}ngOnInit(){this.el.nativeElement.disabled||setTimeout(()=>{this.el.nativeElement.focus()},100)}}Xb.\u0275fac=function(e){return new(e||Xb)(O(kt))},Xb.\u0275dir=Me({type:Xb,selectors:[["","dotAutofocus",""]],standalone:!0});class e0{constructor(e,t){this.ngControl=e,this.el=t}onBlur(){this.ngControl.control.setValue(this.ngControl.value.trim())}ngAfterViewInit(){"input"!==this.el.nativeElement.tagName.toLowerCase()&&console.warn("DotTrimInputDirective is for use with Inputs")}}e0.\u0275fac=function(e){return new(e||e0)(O(Ma,10),O(kt))},e0.\u0275dir=Me({type:e0,selectors:[["","dotTrimInput",""]],hostBindings:function(e,t){1&e&&de("blur",function(){return t.onBlur()})},standalone:!0});class t0{constructor(e,t,i,r){this.primeDropdown=e,this.dotContainersService=t,this.dotMessageService=i,this.changeDetectorRef=r,this.maxOptions=10,this.destroy$=new se,this.control=this.primeDropdown,this.loadErrorMessage=this.dotMessageService.get("dot.template.builder.box.containers.error"),this.control?(this.control.group=!0,this.control.optionLabel="label",this.control.optionValue="value",this.control.optionDisabled="inactive",this.control.filterBy="value.friendlyName,value.title"):console.warn("ContainerOptionsDirective is for use with PrimeNg Dropdown")}ngOnInit(){this.fetchContainerOptions().subscribe(e=>{this.control.options=this.control.options||e}),this.control.onFilter.pipe(Tn(this.destroy$),$d(500),ci(e=>this.fetchContainerOptions(e.filter))).subscribe(e=>this.setOptions(e))}fetchContainerOptions(e=""){return this.dotContainersService.getFiltered(e,this.maxOptions,!0).pipe(ue(t=>{const i=t.map(r=>({label:r.title,value:r,inactive:!1})).sort((r,o)=>r.label.localeCompare(o.label));return this.getOptionsGroupedByHost(i)}),Ai(()=>this.handleContainersLoadError()))}handleContainersLoadError(){return this.control.disabled=!0,Re([])}setOptions(e){this.control.options=[...e],this.changeDetectorRef.detectChanges()}getOptionsGroupedByHost(e){const t=this.getContainerGroupedByHost(e);return Object.keys(t).map(i=>({label:i,items:t[i].items}))}getContainerGroupedByHost(e){return e.reduce((t,i)=>{const{hostname:r}=i.value.parentPermissionable;return t[r]||(t[r]={items:[]}),t[r].items.push(i),t},{})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}function ja(n){return(ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(n)}function $n(n,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function Ahe(n){return $n(1,arguments),n instanceof Date||"object"===ja(n)&&"[object Date]"===Object.prototype.toString.call(n)}function Zn(n){$n(1,arguments);var e=Object.prototype.toString.call(n);return n instanceof Date||"object"===ja(n)&&"[object Date]"===e?new Date(n.getTime()):"number"==typeof n||"[object Number]"===e?new Date(n):(("string"==typeof n||"[object String]"===e)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function F5(n){if($n(1,arguments),!Ahe(n)&&"number"!=typeof n)return!1;var e=Zn(n);return!isNaN(Number(e))}function j5(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(c){throw c},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){t=t.call(n)},n:function(){var c=t.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&null!=t.return&&t.return()}finally{if(s)throw a}}}}t0.\u0275fac=function(e){return new(e||t0)(O(PS,10),O(Ih),O(ps),O(Kn))},t0.\u0275dir=Me({type:t0,selectors:[["p-dropdown","dotContainerOptions",""]],standalone:!0});const LS=x(61348).default;function Zr(n){if(null===n||!0===n||!1===n)return NaN;var e=Number(n);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Phe(n,e){$n(2,arguments);var t=Zn(n).getTime(),i=Zr(e);return new Date(t+i)}function V5(n,e){$n(2,arguments);var t=Zr(e);return Phe(n,-t)}function RS(n,e){if(null==n)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}var B5=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},U5=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const FS={p:U5,P:function(e,t){var s,i=e.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return B5(e,t);switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;default:s=t.dateTime({width:"full"})}return s.replace("{{date}}",B5(r,t)).replace("{{time}}",U5(o,t))}};function Fh(n){var e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),n.getTime()-e.getTime()}var Fhe=["D","DD"],jhe=["YY","YYYY"];function H5(n){return-1!==Fhe.indexOf(n)}function $5(n){return-1!==jhe.indexOf(n)}function n0(n,e,t){if("YYYY"===n)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===n)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===n)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===n)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}function Fe(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jS(n,e){return(jS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i})(n,e)}function on(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&jS(n,e)}function r0(n){return(r0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(n)}function Vhe(n,e){if(e&&("object"===ja(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Fe(n)}function sn(n){var e=function zhe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,i=r0(n);if(e){var o=r0(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Vhe(this,r)}}function qt(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function W5(n){var e=function Bhe(n,e){if("object"!==ja(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var i=t.call(n,e||"default");if("object"!==ja(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===ja(e)?e:String(e)}function G5(n,e){for(var t=0;t0,i=t?e:1-e;if(i<=50)r=n||100;else{var o=i+50;r=n+100*Math.floor(o/100)-(n>=o%100?100:0)}return t?r:1-r}function Z5(n){return n%400==0||n%4==0&&n%100!=0}var efe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s0}},{key:"set",value:function(r,o,s){var a=r.getUTCFullYear();if(s.isTwoDigitYear){var l=Q5(s.year,a);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}return r.setUTCFullYear("era"in o&&1!==o.era?1-s.year:s.year,0,1),r.setUTCHours(0,0,0,0),r}}]),t}(fn),J5={};function gu(){return J5}function yu(n,e){var t,i,r,o,s,a,l,c;$n(1,arguments);var u=gu(),d=Zr(null!==(t=null!==(i=null!==(r=null!==(o=e?.weekStartsOn)&&void 0!==o?o:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:u.weekStartsOn)&&void 0!==i?i:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==t?t:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Zn(n),f=h.getUTCDay(),p=(f=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var m=yu(p,e),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var y=yu(g,e);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}var tfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s0}},{key:"set",value:function(r,o,s,a){var l=VS(r,a);if(s.isTwoDigitYear){var c=Q5(s.year,l);return r.setUTCFullYear(c,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),yu(r,a)}return r.setUTCFullYear("era"in o&&1!==o.era?1-s.year:s.year,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),yu(r,a)}}]),t}(fn);function jh(n){$n(1,arguments);var e=1,t=Zn(n),i=t.getUTCDay(),r=(i=1&&o<=4}},{key:"set",value:function(r,o,s){return r.setUTCMonth(3*(s-1),1),r.setUTCHours(0,0,0,0),r}}]),t}(fn),ofe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=4}},{key:"set",value:function(r,o,s){return r.setUTCMonth(3*(s-1),1),r.setUTCHours(0,0,0,0),r}}]),t}(fn),sfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=11}},{key:"set",value:function(r,o,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),t}(fn),afe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=11}},{key:"set",value:function(r,o,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),t}(fn);function lfe(n,e){var t,i,r,o,s,a,l,c;$n(1,arguments);var u=gu(),d=Zr(null!==(t=null!==(i=null!==(r=null!==(o=e?.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(s=e.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==i?i:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==t?t:1),h=VS(n,e),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=yu(f,e);return p}function X5(n,e){$n(1,arguments);var t=Zn(n),i=yu(t,e).getTime()-lfe(t,e).getTime();return Math.round(i/6048e5)+1}var dfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=53}},{key:"set",value:function(r,o,s,a){return yu(function ufe(n,e,t){$n(2,arguments);var i=Zn(n),r=Zr(e),o=X5(i,t)-r;return i.setUTCDate(i.getUTCDate()-7*o),i}(r,s,a),a)}}]),t}(fn);function ez(n){$n(1,arguments);var e=Zn(n),t=e.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(t+1,0,4),i.setUTCHours(0,0,0,0);var r=jh(i),o=new Date(0);o.setUTCFullYear(t,0,4),o.setUTCHours(0,0,0,0);var s=jh(o);return e.getTime()>=r.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function hfe(n){$n(1,arguments);var e=ez(n),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var i=jh(t);return i}function tz(n){$n(1,arguments);var e=Zn(n),t=jh(e).getTime()-hfe(e).getTime();return Math.round(t/6048e5)+1}var mfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=53}},{key:"set",value:function(r,o,s){return jh(function pfe(n,e){$n(2,arguments);var t=Zn(n),i=Zr(e),r=tz(t)-i;return t.setUTCDate(t.getUTCDate()-7*r),t}(r,s))}}]),t}(fn),gfe=[31,28,31,30,31,30,31,31,30,31,30,31],yfe=[31,29,31,30,31,30,31,31,30,31,30,31],_fe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=yfe[l]:o>=1&&o<=gfe[l]}},{key:"set",value:function(r,o,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),t}(fn),vfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(r,o,s){return r.setUTCMonth(0,s),r.setUTCHours(0,0,0,0),r}}]),t}(fn);function BS(n,e,t){var i,r,o,s,a,l,c,u;$n(2,arguments);var d=gu(),h=Zr(null!==(i=null!==(r=null!==(o=null!==(s=t?.weekStartsOn)&&void 0!==s?s:null==t||null===(a=t.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:d.weekStartsOn)&&void 0!==r?r:null===(c=d.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Zn(n),p=Zr(e),m=f.getUTCDay(),g=p%7,y=(g+7)%7,v=(y=0&&o<=6}},{key:"set",value:function(r,o,s,a){return(r=BS(r,s,a)).setUTCHours(0,0,0,0),r}}]),t}(fn),wfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=6}},{key:"set",value:function(r,o,s,a){return(r=BS(r,s,a)).setUTCHours(0,0,0,0),r}}]),t}(fn),Cfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=6}},{key:"set",value:function(r,o,s,a){return(r=BS(r,s,a)).setUTCHours(0,0,0,0),r}}]),t}(fn),Mfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=7}},{key:"set",value:function(r,o,s){return r=function Dfe(n,e){$n(2,arguments);var t=Zr(e);t%7==0&&(t-=7);var i=1,r=Zn(n),o=r.getUTCDay(),s=t%7,a=(s+7)%7,l=(a=1&&o<=12}},{key:"set",value:function(r,o,s){var a=r.getUTCHours()>=12;return r.setUTCHours(a&&s<12?s+12:a||12!==s?s:0,0,0,0),r}}]),t}(fn),Ife=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=23}},{key:"set",value:function(r,o,s){return r.setUTCHours(s,0,0,0),r}}]),t}(fn),Ofe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=11}},{key:"set",value:function(r,o,s){var a=r.getUTCHours()>=12;return r.setUTCHours(a&&s<12?s+12:s,0,0,0),r}}]),t}(fn),Afe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=24}},{key:"set",value:function(r,o,s){return r.setUTCHours(s<=24?s%24:s,0,0,0),r}}]),t}(fn),kfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=59}},{key:"set",value:function(r,o,s){return r.setUTCMinutes(s,0,0),r}}]),t}(fn),Nfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s=0&&o<=59}},{key:"set",value:function(r,o,s){return r.setUTCSeconds(s,0),r}}]),t}(fn),Pfe=function(n){on(t,n);var e=sn(t);function t(){var i;qt(this,t);for(var r=arguments.length,o=new Array(r),s=0;s0?i:1-i;return bn("yy"===t?r%100:r,t.length)},Vl_M=function(e,t){var i=e.getUTCMonth();return"M"===t?String(i+1):bn(i+1,2)},Vl_d=function(e,t){return bn(e.getUTCDate(),t.length)},Vl_h=function(e,t){return bn(e.getUTCHours()%12||12,t.length)},Vl_H=function(e,t){return bn(e.getUTCHours(),t.length)},Vl_m=function(e,t){return bn(e.getUTCMinutes(),t.length)},Vl_s=function(e,t){return bn(e.getUTCSeconds(),t.length)},Vl_S=function(e,t){var i=t.length,r=e.getUTCMilliseconds();return bn(Math.floor(r*Math.pow(10,i-3)),t.length)};var Xfe={G:function(e,t,i){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});default:return i.era(r,{width:"wide"})}},y:function(e,t,i){if("yo"===t){var r=e.getUTCFullYear();return i.ordinalNumber(r>0?r:1-r,{unit:"year"})}return Vl_y(e,t)},Y:function(e,t,i,r){var o=VS(e,r),s=o>0?o:1-o;return"YY"===t?bn(s%100,2):"Yo"===t?i.ordinalNumber(s,{unit:"year"}):bn(s,t.length)},R:function(e,t){return bn(ez(e),t.length)},u:function(e,t){return bn(e.getUTCFullYear(),t.length)},Q:function(e,t,i){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return bn(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,i){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return bn(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,i){var r=e.getUTCMonth();switch(t){case"M":case"MM":return Vl_M(e,t);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,i){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return bn(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,i,r){var o=X5(e,r);return"wo"===t?i.ordinalNumber(o,{unit:"week"}):bn(o,t.length)},I:function(e,t,i){var r=tz(e);return"Io"===t?i.ordinalNumber(r,{unit:"week"}):bn(r,t.length)},d:function(e,t,i){return"do"===t?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):Vl_d(e,t)},D:function(e,t,i){var r=function Zfe(n){$n(1,arguments);var e=Zn(n),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime(),r=t-i;return Math.floor(r/864e5)+1}(e);return"Do"===t?i.ordinalNumber(r,{unit:"dayOfYear"}):bn(r,t.length)},E:function(e,t,i){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,i,r){var o=e.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return bn(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,i,r){var o=e.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return bn(s,t.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,i){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return bn(o,t.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,i){var o=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,i){var o,r=e.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,i){var o,r=e.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,i){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return Vl_h(e,t)},H:function(e,t,i){return"Ho"===t?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Vl_H(e,t)},K:function(e,t,i){var r=e.getUTCHours()%12;return"Ko"===t?i.ordinalNumber(r,{unit:"hour"}):bn(r,t.length)},k:function(e,t,i){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?i.ordinalNumber(r,{unit:"hour"}):bn(r,t.length)},m:function(e,t,i){return"mo"===t?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Vl_m(e,t)},s:function(e,t,i){return"so"===t?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Vl_s(e,t)},S:function(e,t){return Vl_S(e,t)},X:function(e,t,i,r){var s=(r._originalDate||e).getTimezoneOffset();if(0===s)return"Z";switch(t){case"X":return rz(s);case"XXXX":case"XX":return _u(s);default:return _u(s,":")}},x:function(e,t,i,r){var s=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return rz(s);case"xxxx":case"xx":return _u(s);default:return _u(s,":")}},O:function(e,t,i,r){var s=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+iz(s,":");default:return"GMT"+_u(s,":")}},z:function(e,t,i,r){var s=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+iz(s,":");default:return"GMT"+_u(s,":")}},t:function(e,t,i,r){return bn(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,i,r){return bn((r._originalDate||e).getTime(),t.length)}};function iz(n,e){var t=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),o=i%60;if(0===o)return t+String(r);var s=e||"";return t+String(r)+s+bn(o,2)}function rz(n,e){return n%60==0?(n>0?"-":"+")+bn(Math.abs(n)/60,2):_u(n,e)}function _u(n,e){var t=e||"",i=n>0?"-":"+",r=Math.abs(n);return i+bn(Math.floor(r/60),2)+t+bn(r%60,2)}const epe=Xfe;var tpe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,npe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ipe=/^'([^]*?)'?$/,rpe=/''/g,ope=/[a-zA-Z]/;function ape(n){var e=n.match(ipe);return e?e[1].replace(rpe,"'"):n}function lpe(n,e){$n(2,arguments);var t=Zn(n),i=Zn(e),r=t.getTime()-i.getTime();return r<0?-1:r>0?1:r}function cpe(n){return RS({},n)}var oz=6e4,sz=43200,az=525600,lz=x(30298);class Vh{constructor(e){e.getSystemTimeZone().subscribe(t=>this._systemTimeZone=t)}get localeOptions(){return this._localeOptions}set localeOptions(e){this._localeOptions=e}setLang(e){var t=this;return au(function*(){let o,[i,r]=e.replace("_","-").split("-");i=i?.toLowerCase()||"en",r=r?.toLocaleUpperCase()||"US";try{o=yield x(13131)(`./${i}-${r}/index.js`)}catch{try{o=yield x(71213)(`./${i}/index.js`)}catch{o=yield Promise.resolve().then(x.bind(x,61348))}}t.localeOptions={locale:o.default}})()}differenceInCalendarDays(e,t){return function Kfe(n,e){$n(2,arguments);var t=nz(n),i=nz(e),r=t.getTime()-Fh(t),o=i.getTime()-Fh(i);return Math.round((r-o)/864e5)}(e,t)}isValid(e,t){return function dpe(n,e){return F5(function Gfe(n,e,t,i){var r,o,s,a,l,c,u,d,h,f,p,m,g,y,v,w,_,N;$n(3,arguments);var T=String(n),ne=String(e),K=gu(),Ne=null!==(r=null!==(o=i?.locale)&&void 0!==o?o:K.locale)&&void 0!==r?r:LS;if(!Ne.match)throw new RangeError("locale must contain match property");var He=Zr(null!==(s=null!==(a=null!==(l=null!==(c=i?.firstWeekContainsDate)&&void 0!==c?c:null==i||null===(u=i.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==l?l:K.firstWeekContainsDate)&&void 0!==a?a:null===(h=K.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==s?s:1);if(!(He>=1&&He<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var gt=Zr(null!==(p=null!==(m=null!==(g=null!==(y=i?.weekStartsOn)&&void 0!==y?y:null==i||null===(v=i.locale)||void 0===v||null===(w=v.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==g?g:K.weekStartsOn)&&void 0!==m?m:null===(_=K.locale)||void 0===_||null===(N=_.options)||void 0===N?void 0:N.weekStartsOn)&&void 0!==p?p:0);if(!(gt>=0&><=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===ne)return""===T?Zn(t):new Date(NaN);var fe,at={firstWeekContainsDate:He,weekStartsOn:gt,locale:Ne},ot=[new $he],pn=ne.match(Bfe).map(function(Wt){var ct=Wt[0];return ct in FS?(0,FS[ct])(Wt,Ne.formatLong):Wt}).join("").match(Vfe),St=[],ae=z5(pn);try{var be=function(){var ct=fe.value;!(null!=i&&i.useAdditionalWeekYearTokens)&&$5(ct)&&n0(ct,ne,n),(null==i||!i.useAdditionalDayOfYearTokens)&&H5(ct)&&n0(ct,ne,n);var Fn=ct[0],Ar=zfe[Fn];if(Ar){var Ou=Ar.incompatibleTokens;if(Array.isArray(Ou)){var ql=St.find(function(Au){return Ou.includes(Au.token)||Au.token===Fn});if(ql)throw new RangeError("The format string mustn't contain `".concat(ql.fullToken,"` and `").concat(ct,"` at the same time"))}else if("*"===Ar.incompatibleTokens&&St.length>0)throw new RangeError("The format string mustn't contain `".concat(ct,"` and any other token at the same time"));St.push({token:Fn,fullToken:ct});var Kl=Ar.run(T,ct,Ne.match,at);if(!Kl)return{v:new Date(NaN)};ot.push(Kl.setter),T=Kl.rest}else{if(Fn.match(Wfe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Fn+"`");if("''"===ct?ct="'":"'"===Fn&&(ct=Yfe(ct)),0!==T.indexOf(ct))return{v:new Date(NaN)};T=T.slice(ct.length)}};for(ae.s();!(fe=ae.n()).done;){var Ue=be();if("object"===ja(Ue))return Ue.v}}catch(Wt){ae.e(Wt)}finally{ae.f()}if(T.length>0&&$fe.test(T))return new Date(NaN);var It=ot.map(function(Wt){return Wt.priority}).sort(function(Wt,ct){return ct-Wt}).filter(function(Wt,ct,Fn){return Fn.indexOf(Wt)===ct}).map(function(Wt){return ot.filter(function(ct){return ct.priority===Wt}).sort(function(ct,Fn){return Fn.subPriority-ct.subPriority})}).map(function(Wt){return Wt[0]}),ln=Zn(t);if(isNaN(ln.getTime()))return new Date(NaN);var Yi,zt=V5(ln,Fh(ln)),Sn={},Rt=z5(It);try{for(Rt.s();!(Yi=Rt.n()).done;){var eo=Yi.value;if(!eo.validate(zt,at))return new Date(NaN);var En=eo.set(zt,Sn,at);Array.isArray(En)?(zt=En[0],RS(Sn,En[1])):zt=En}}catch(Wt){Rt.e(Wt)}finally{Rt.f()}return zt}(n,e,new Date))}(e,t)}format(e,t){return function spe(n,e,t){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,y,v,w,_;$n(2,arguments);var N=String(e),T=gu(),ne=null!==(i=null!==(r=t?.locale)&&void 0!==r?r:T.locale)&&void 0!==i?i:LS,K=Zr(null!==(o=null!==(s=null!==(a=null!==(l=t?.firstWeekContainsDate)&&void 0!==l?l:null==t||null===(c=t.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:T.firstWeekContainsDate)&&void 0!==s?s:null===(d=T.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==o?o:1);if(!(K>=1&&K<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Ne=Zr(null!==(f=null!==(p=null!==(m=null!==(g=t?.weekStartsOn)&&void 0!==g?g:null==t||null===(y=t.locale)||void 0===y||null===(v=y.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:T.weekStartsOn)&&void 0!==p?p:null===(w=T.locale)||void 0===w||null===(_=w.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==f?f:0);if(!(Ne>=0&&Ne<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!ne.localize)throw new RangeError("locale must contain localize property");if(!ne.formatLong)throw new RangeError("locale must contain formatLong property");var He=Zn(n);if(!F5(He))throw new RangeError("Invalid time value");var gt=Fh(He),at=V5(He,gt),ot={firstWeekContainsDate:K,weekStartsOn:Ne,locale:ne,_originalDate:He},pn=N.match(npe).map(function(St){var ae=St[0];return"p"===ae||"P"===ae?(0,FS[ae])(St,ne.formatLong):St}).join("").match(tpe).map(function(St){if("''"===St)return"'";var ae=St[0];if("'"===ae)return ape(St);var fe=epe[ae];if(fe)return!(null!=t&&t.useAdditionalWeekYearTokens)&&$5(St)&&n0(St,e,String(n)),!(null!=t&&t.useAdditionalDayOfYearTokens)&&H5(St)&&n0(St,e,String(n)),fe(at,St,ne.localize,ot);if(ae.match(ope))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ae+"`");return St}).join("");return pn}(e,t,{...this.localeOptions})}formatTZ(e,t){const i=(0,lz.utcToZonedTime)(e,this._systemTimeZone.id);return(0,lz.format)(i,t,{timeZone:this._systemTimeZone.id})}getRelative(e,t=this.getUTC()){return function upe(n,e,t){var i,r,o;$n(2,arguments);var s=gu(),a=null!==(i=null!==(r=t?.locale)&&void 0!==r?r:s.locale)&&void 0!==i?i:LS;if(!a.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var l=lpe(n,e);if(isNaN(l))throw new RangeError("Invalid time value");var u,d,c=RS(cpe(t),{addSuffix:Boolean(t?.addSuffix),comparison:l});l>0?(u=Zn(e),d=Zn(n)):(u=Zn(n),d=Zn(e));var f,h=String(null!==(o=t?.roundingMethod)&&void 0!==o?o:"round");if("floor"===h)f=Math.floor;else if("ceil"===h)f=Math.ceil;else{if("round"!==h)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");f=Math.round}var w,p=d.getTime()-u.getTime(),m=p/oz,g=Fh(d)-Fh(u),y=(p-g)/oz,v=t?.unit;if("second"===(w=v?String(v):m<1?"second":m<60?"minute":m<1440?"hour":yi?this.dotFormatDateService.format(s,t):this.dotFormatDateService.getRelative(s)}}a0.\u0275fac=function(e){return new(e||a0)(O(Vh,16))},a0.\u0275pipe=Gn({name:"dotRelativeDate",type:a0,pure:!0,standalone:!0});class l0{transform(e,t){return t.forEach((i,r)=>{e=e.replace(`{${r}}`,i)}),e}}function hpe(n,e){if(1&n){const t=Qe();I(0,"div",3)(1,"div",4),_e(2,"video",5),A(),I(3,"div",6)(4,"div"),_e(5,"dot-spinner",7),Te(6," Uploading video, wait until finished. "),A(),I(7,"button",8),de("click",function(){return ge(t),ye(M().cancel.emit(!0))}),A()()()}}function fpe(n,e){1&n&&(I(0,"span",9),Te(1,"Uploading..."),A())}l0.\u0275fac=function(e){return new(e||l0)},l0.\u0275pipe=Gn({name:"dotStringFormat",type:l0,pure:!0,standalone:!0});class Bh{constructor(){this.cancel=new re}}Bh.\u0275fac=function(e){return new(e||Bh)},Bh.\u0275cmp=xe({type:Bh,selectors:[["dot-upload-placeholder"]],inputs:{type:"type"},outputs:{cancel:"cancel"},standalone:!0,features:[el],decls:3,vars:2,consts:[[3,"ngSwitch"],["class","placeholder-container",4,"ngSwitchCase"],["class","default-message",4,"ngSwitchDefault"],[1,"placeholder-container"],[1,"preview-container__video"],["src","","controls","",1,"video"],[1,"preview-container__loading"],["size","30px"],["pButton","","label","Cancel",1,"p-button-md","p-button-outlined",3,"click"],[1,"default-message"]],template:function(e,t){1&e&&(pt(0,0),E(1,hpe,8,0,"div",1),E(2,fpe,2,0,"span",2),mt()),2&e&&(b("ngSwitch",t.type),C(1),b("ngSwitchCase","video"))},dependencies:[zn,Od,__,v_,ks,ds,fu,Rh],styles:[".placeholder-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;width:-moz-fit-content;width:fit-content;padding:0}.preview-container__video[_ngcontent-%COMP%]{aspect-ratio:16/9;height:300px}.preview-container__video[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%}.preview-container__loading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:1rem 0}.default-message[_ngcontent-%COMP%]{background-color:#f3f3f4;display:block;padding:16px;font-size:1.25rem;width:100%}"],changeDetection:0});const US=new $t({state:{init:()=>Ln.empty,apply(n,e){e=e.map(n.mapping,n.doc);const t=n.getMeta(this);if(t&&t.add){const r=Ei.widget(t.add.pos,t.add.element,{key:t.add.id});e=e.add(n.doc,[r])}else t&&t.remove&&(e=e.remove(e.find(null,null,i=>i.key==t.remove.id)));return e}},props:{decorations(n){return this.getState(n)}}});class ppe{constructor(e,t,i){this.applicationRef=t.get(_c),this.componentRef=function M$(n,e){const t=gn(n),i=e.elementInjector||Ny();return new Ff(t).create(i,e.projectableNodes,e.hostElement,e.environmentInjector)}(e,{environmentInjector:this.applicationRef.injector}),this.updateProps(i),this.applicationRef.attachView(this.componentRef.hostView)}get instance(){return this.componentRef.instance}get elementRef(){return this.componentRef.injector.get(kt)}get dom(){return this.elementRef.nativeElement}updateProps(e){Object.entries(e).forEach(([t,i])=>{this.instance[t]=i})}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy(),this.applicationRef.detachView(this.componentRef.hostView)}}class lg{}lg.\u0275fac=function(e){return new(e||lg)},lg.\u0275cmp=xe({type:lg,selectors:[["ng-component"]],inputs:{editor:"editor",node:"node",decorations:"decorations",selected:"selected",extension:"extension",getPos:"getPos",updateAttributes:"updateAttributes",deleteNode:"deleteNode"},decls:0,vars:0,template:function(e,t){},encapsulation:2});class mpe extends cce{mount(){this.renderer=new ppe(this.component,this.options.injector,{editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(i={})=>this.updateAttributes(i),deleteNode:()=>this.deleteNode()}),this.extension.config.draggable&&(this.renderer.elementRef.nativeElement.ondragstart=i=>{this.onDragStart(i)}),this.contentDOMElement=this.node.isLeaf?null:document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit",this.renderer.detectChanges())}get dom(){return this.renderer.dom}get contentDOM(){return this.node.isLeaf?null:(this.maybeMoveContentDOM(),this.contentDOMElement)}maybeMoveContentDOM(){const e=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&e&&!e.contains(this.contentDOMElement)&&e.appendChild(this.contentDOMElement)}update(e,t){return this.options.update?this.options.update(e,t):e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.renderer.updateProps({node:e,decorations:t}),this.maybeMoveContentDOM()),!0)}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy()}}function ype(n,e){1&n&&Dt(0)}function _pe(n,e){if(1&n&&(I(0,"div",8),_r(1,1),E(2,ype,1,0,"ng-container",6),A()),2&n){const t=M();C(2),b("ngTemplateOutlet",t.headerTemplate)}}function vpe(n,e){1&n&&Dt(0)}function bpe(n,e){if(1&n&&(I(0,"div",9),Te(1),E(2,vpe,1,0,"ng-container",6),A()),2&n){const t=M();C(1),Vi(" ",t.header," "),C(1),b("ngTemplateOutlet",t.titleTemplate)}}function wpe(n,e){1&n&&Dt(0)}function Cpe(n,e){if(1&n&&(I(0,"div",10),Te(1),E(2,wpe,1,0,"ng-container",6),A()),2&n){const t=M();C(1),Vi(" ",t.subheader," "),C(1),b("ngTemplateOutlet",t.subtitleTemplate)}}function Dpe(n,e){1&n&&Dt(0)}function Mpe(n,e){1&n&&Dt(0)}function Tpe(n,e){if(1&n&&(I(0,"div",11),_r(1,2),E(2,Mpe,1,0,"ng-container",6),A()),2&n){const t=M();C(2),b("ngTemplateOutlet",t.footerTemplate)}}const Spe=["*",[["p-header"]],[["p-footer"]]],Epe=["*","p-header","p-footer"];let HS=(()=>{class n{constructor(t){this.el=t}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"title":this.titleTemplate=t.template;break;case"subtitle":this.subtitleTemplate=t.template;break;case"content":default:this.contentTemplate=t.template;break;case"footer":this.footerTemplate=t.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return n.\u0275fac=function(t){return new(t||n)(O(kt))},n.\u0275cmp=xe({type:n,selectors:[["p-card"]],contentQueries:function(t,i,r){if(1&t&&(pi(r,TL,5),pi(r,SL,5),pi(r,rr,4)),2&t){let o;Xe(o=et())&&(i.headerFacet=o.first),Xe(o=et())&&(i.footerFacet=o.first),Xe(o=et())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:Epe,decls:9,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(t,i){1&t&&(So(Spe),I(0,"div",0),E(1,_pe,3,1,"div",1),I(2,"div",2),E(3,bpe,3,2,"div",3),E(4,Cpe,3,2,"div",4),I(5,"div",5),_r(6),E(7,Dpe,1,0,"ng-container",6),A(),E(8,Tpe,3,1,"div",7),A()()),2&t&&(Dn(i.styleClass),b("ngClass","p-card p-component")("ngStyle",i.style),C(1),b("ngIf",i.headerFacet||i.headerTemplate),C(2),b("ngIf",i.header||i.titleTemplate),C(1),b("ngIf",i.subheader||i.subtitleTemplate),C(3),b("ngTemplateOutlet",i.contentTemplate),C(1),b("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[yi,nn,ko,wr],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),cz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,xa]}),n})();function xpe(n,e){if(1&n&&_e(0,"dot-contentlet-thumbnail",4),2&n){const t=M();b("width",94)("height",94)("iconSize","72px")("contentlet",t.data)}}function Ipe(n,e){if(1&n&&(I(0,"h3",5),Te(1),A()),2&n){const t=M();C(1),Ot(t.data.title)}}function Ope(n,e){if(1&n&&(I(0,"span"),Te(1),A()),2&n){const t=M();C(1),Ot(t.data.contentType)}}function Ape(n,e){if(1&n&&(I(0,"div",6),_e(1,"dot-state-icon",7),Eo(2,"contentletState"),I(3,"dot-badge",8),Te(4),Eo(5,"lowercase"),A()()),2&n){const t=M();C(1),b("state",xo(2,3,t.data)),C(2),b("bordered",!0),C(1),Ot(xo(5,5,t.data.language))}}class Uh extends lg{ngOnInit(){this.data=this.node.attrs.data}}Uh.\u0275fac=function(){let n;return function(t){return(n||(n=Oi(Uh)))(t||Uh)}}(),Uh.\u0275cmp=xe({type:Uh,selectors:[["dot-contentlet-block"]],features:[yn],decls:5,vars:2,consts:[["pTemplate","header"],["class","title",4,"pTemplate"],[4,"pTemplate"],["pTemplate","footer"],[3,"width","height","iconSize","contentlet"],[1,"title"],[1,"state"],["size","16px",3,"state"],[3,"bordered"]],template:function(e,t){1&e&&(I(0,"p-card"),E(1,xpe,1,4,"ng-template",0),E(2,Ipe,2,1,"h3",1),E(3,Ope,2,1,"span",2),E(4,Ape,6,7,"ng-template",3),A()),2&e&&(C(2),b("pTemplate","title"),C(1),b("pTemplate","subtitle"))},dependencies:[HS,rr,BD,tg],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;box-sizing:border-box;margin-bottom:1rem}[_nghost-%COMP%] .p-card{background:#ffffff;border:1px solid #afb3c0;color:#14151a;display:flex}[_nghost-%COMP%] .p-card .p-card-header{box-sizing:border-box;padding:1rem;padding-right:0}[_nghost-%COMP%] .p-card .p-card-body{box-sizing:border-box;min-width:100px;padding:1rem 1.5rem 1rem 1rem;flex:1}[_nghost-%COMP%] .p-card .p-card-body .p-card-content{padding:0}[_nghost-%COMP%] .p-card .p-card-body .p-card-subtitle{color:#6c7389;font-size:.813rem;font-weight:regular;margin-bottom:.75rem}[_nghost-%COMP%] .p-card .p-card-body .p-card-title{overflow:hidden;width:100%;margin:0}[_nghost-%COMP%] .p-card .p-card-body .p-card-title h3{font-weight:700;margin-bottom:.5rem;margin:0;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap;font-size:1.5rem}[_nghost-%COMP%] dot-contentlet-thumbnail[_ngcontent-%COMP%]{align-items:center;display:block;position:relative;width:94px;height:94px}[_nghost-%COMP%] .state[_ngcontent-%COMP%]{align-items:center;display:flex}[_nghost-%COMP%] .state[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:.5rem}[_nghost-%COMP%] .state[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{margin-right:0}"]});const kpe=n=>Rn.create({name:"dotContent",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:e=>({data:e.getAttribute("data")}),renderHTML:e=>({data:e.data})}}),parseHTML:()=>[{tag:"dotcms-contentlet-block"}],renderHTML({HTMLAttributes:e}){let t=["span",{}];return e.data.hasTitleImage&&(t=["img",{src:e.data.image}]),["div",["h3",{class:e.data.title},e.data.title],["div",e.data.identifier],t,["div",{},e.data.language]]},addNodeView:()=>((n,e)=>t=>new mpe(n,t,e))(Uh,{injector:n})}),Npe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ppe=Rn.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",Xt(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[p5({find:Npe,type:this.type,getAttributes:n=>{const[,,e,t,i]=n;return{src:t,alt:e,title:i}}})]}}),uz="language_id",Lpe=(n,e)=>{const{href:t=null,target:i}=e;return["a",{href:t,target:i},dz(n,e)]},dz=(n,e)=>["img",Xt(n,e)],hz=(n,e)=>n.includes(uz)?n:`${n}?${uz}=${e}`,Rpe=n=>{if("string"==typeof n)return{src:n,data:"null"};const{fileAsset:e,asset:t,title:i,languageId:r}=n;return{data:n,src:hz(e||t,r),title:i,alt:i}},Jr=Ppe.extend({name:"dotImage",addOptions:()=>({inline:!1,allowBase64:!0,HTMLAttributes:{}}),addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:hz(n.src||n.data?.asset,n.data?.languageId)})},alt:{default:null,parseHTML:n=>n.getAttribute("alt"),renderHTML:n=>({alt:n.alt||n.data?.title})},title:{default:null,parseHTML:n=>n.getAttribute("title"),renderHTML:n=>({title:n.title||n.data?.title})},href:{default:null,parseHTML:n=>n.getAttribute("href"),renderHTML:n=>({href:n.href})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})},target:{default:null,parseHTML:n=>n.getAttribute("target"),renderHTML:n=>({target:n.target})}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},addCommands(){return{...this.parent?.(),setImageLink:n=>({commands:e})=>e.updateAttributes(this.name,n),unsetImageLink:()=>({commands:n})=>n.updateAttributes(this.name,{href:""}),insertImage:(n,e)=>({chain:t,state:i})=>{const{selection:r}=i,{head:o}=r,s={attrs:Rpe(n),type:Jr.name};return t().insertContentAt(e??o,s).run()}}},renderHTML({HTMLAttributes:n}){const{href:e=null,style:t}=n||{};return["div",{class:"image-container",style:t},e?Lpe(this.options.HTMLAttributes,n):dz(this.options.HTMLAttributes,n)]}}),Fpe=Rn.create({name:"dotVideo",addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:n.src})},mimeType:{default:null,parseHTML:n=>n.getAttribute("mimeType"),renderHTML:n=>({mimeType:n.mimeType})},width:{default:null,parseHTML:n=>n.getAttribute("width"),renderHTML:n=>({width:n.width})},height:{default:null,parseHTML:n=>n.getAttribute("height"),renderHTML:n=>({height:n.height})},orientation:{default:null,parseHTML:n=>n.getAttribute("orientation"),renderHTML:({height:n,width:e})=>({orientation:n>e?"vertical":"horizontal"})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})}}),parseHTML:()=>[{tag:"video"}],addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group:()=>"block",draggable:!0,addCommands(){return{...this.parent?.(),insertVideo:(n,e)=>({commands:t,state:i})=>{const{selection:r}=i,{head:o}=r;return t.insertContentAt(e??o,{type:this.name,attrs:jpe(n)})}}},renderHTML:({HTMLAttributes:n})=>["div",{class:"video-container"},["video",Xt(n,{controls:!0})]]}),jpe=n=>{if("string"==typeof n)return{src:n};const{assetMetaData:e,asset:t,mimeType:i,fileAsset:r}=n,{width:o="auto",height:s="auto",contentType:a}=e||{},l=s>o?"vertical":"horizontal";return{src:r||t,data:{...n},width:o,height:s,mimeType:i||a,orientation:l}},zpe=Rn.create({name:"aiContent",addAttributes:()=>({content:{default:""}}),parseHTML:()=>[{tag:"div[ai-content]"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertAINode:n=>({commands:e})=>e.insertContent({type:this.name,attrs:{content:n}})}},renderHTML:()=>["div[ai-content]"],addNodeView:()=>({node:n})=>{const e=document.createElement("div"),t=document.createElement("div");return t.innerHTML=n.attrs.content||"",e.contentEditable="true",e.classList.add("ai-content-container"),e.append(t),{dom:e}}}),Vpe=Rn.create({name:"loader",addAttributes:()=>({isLoading:{default:!0}}),parseHTML:()=>[{tag:"div.p-d-flex.p-jc-center"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertLoaderNode:n=>({commands:e})=>e.insertContent({type:this.name,attrs:{isLoading:n}})}},renderHTML:()=>["div",{class:"p-d-flex p-jc-center"}],addNodeView:()=>({node:n})=>{const e=document.createElement("div");if(e.classList.add("loader-style"),n.attrs.isLoading){const t=document.createElement("div");t.classList.add("p-progress-spinner"),e.append(t)}return{dom:e}}}),Bpe={video:"dotVideo",image:"dotImage"},Upe=(n,e)=>vn.create({name:"assetUploader",addProseMirrorPlugins(){const t=n.get(Ys),i=this.editor;let r,o;function s(m){return m?.type.split("/")[0]||""}function a(m){alert(`Can drop just one ${m} at a time`)}function c(m){const{view:g}=i,{state:y}=g;g.dispatch(y.tr.setMeta(US,{remove:{id:m}})),S5(g)}function u({view:m,file:g,position:y}){const v=s(g),w=g.name;(function l({view:m,position:g,id:y,type:v}){const w=e.createComponent(Bh),_=m.state.tr;w.instance.type=v,w.instance.cancel.subscribe(()=>{c(y),o.abort(),r.unsubscribe()}),w.changeDetectorRef.detectChanges(),_.setMeta(US,{add:{id:y,pos:g,element:w.location.nativeElement}}),m.dispatch(_)})({view:m,position:y,id:w,type:v}),o=new AbortController;const{signal:_}=o;r=t.publishContent({data:g,signal:_}).pipe(Tt(1)).subscribe(N=>{const T=N[0][Object.keys(N[0])[0]];i.commands.insertAsset({type:v,payload:T,position:y})},N=>alert(N.message),()=>c(w))}function d(m){return i.commands.isNodeRegistered(Bpe[m])}return[US,new $t({key:new rn("assetUploader"),props:{handleDOMEvents:{click(m,g){!function h(m,g){const{doc:y,selection:v}=m.state,{ranges:w}=v,_=Math.min(...w.map(ne=>ne.$from.pos)),N=y.nodeAt(_);if(g.target?.closest("a")&&N.type.name===Jr.name)g.preventDefault(),g.stopPropagation()}(m,g)},paste(m,g){!function f(m,g){const{clipboardData:y}=g,{files:v}=y,w=y.getData("Text")||"",_=s(v[0]),N=d(_);if(_&&!N)return void a(_);if(w&&!E5(w))return;const{from:T}=(n=>{const{state:e}=n,{selection:t}=e,{ranges:i}=t;return{from:Math.min(...i.map(s=>s.$from.pos)),to:Math.max(...i.map(s=>s.$to.pos))}})(m);E5(w)&&d("image")?i.chain().insertImage(w,T).addNextLine().run():u({view:m,file:v[0],position:T}),g.preventDefault(),g.stopPropagation()}(m,g)},drop(m,g){!function p(m,g){const{files:y}=g.dataTransfer,{length:v}=y,w=y[0],_=s(w);if(!d(_))return;if(v>1)return void a(_);g.preventDefault(),g.stopPropagation();const{clientX:N,clientY:T}=g,{pos:ne}=m.posAtCoords({left:N,top:T});u({view:m,file:w,position:ne})}(m,g)}}}})]}}),Hpe=["cb"],$pe=function(n,e,t){return{"p-checkbox-label":!0,"p-checkbox-label-active":n,"p-disabled":e,"p-checkbox-label-focus":t}};function Wpe(n,e){if(1&n){const t=Qe();I(0,"label",7),de("click",function(r){ge(t);const o=M(),s=Cn(3);return ye(o.onClick(r,s,!0))}),Te(1),A()}if(2&n){const t=M();Dn(t.labelStyleClass),b("ngClass",tl(5,$pe,t.checked(),t.disabled,t.focused)),Yt("for",t.inputId),C(1),Ot(t.label)}}const Gpe=function(n,e,t){return{"p-checkbox p-component":!0,"p-checkbox-checked":n,"p-checkbox-disabled":e,"p-checkbox-focused":t}},Ype=function(n,e,t){return{"p-highlight":n,"p-disabled":e,"p-focus":t}},qpe={provide:Dr,useExisting:Bt(()=>$S),multi:!0};let $S=(()=>{class n{constructor(t){this.cd=t,this.checkboxIcon="pi pi-check",this.trueValue=!0,this.falseValue=!1,this.onChange=new re,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.focused=!1}onClick(t,i,r){t.preventDefault(),!this.disabled&&!this.readonly&&(this.updateModel(t),r&&i.focus())}updateModel(t){let i;this.binary?(i=this.checked()?this.falseValue:this.trueValue,this.model=i,this.onModelChange(i)):(i=this.checked()?this.model.filter(r=>!Pt.equals(r,this.value)):this.model?[...this.model,this.value]:[this.value],this.onModelChange(i),this.model=i,this.formControl&&this.formControl.setValue(i)),this.onChange.emit({checked:i,originalEvent:t})}handleChange(t){this.readonly||this.updateModel(t)}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(t){this.model=t,this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:Pt.contains(this.value,this.model)}}return n.\u0275fac=function(t){return new(t||n)(O(Kn))},n.\u0275cmp=xe({type:n,selectors:[["p-checkbox"]],viewQuery:function(t,i){if(1&t&&hn(Hpe,5),2&t){let r;Xe(r=et())&&(i.inputViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",name:"name",disabled:"disabled",binary:"binary",label:"label",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:"readonly",required:"required",trueValue:"trueValue",falseValue:"falseValue"},outputs:{onChange:"onChange"},features:[Nt([qpe])],decls:7,vars:26,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","checkbox",3,"readonly","value","checked","disabled","focus","blur","change"],["cb",""],[1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[3,"class","ngClass","click",4,"ngIf"],[3,"ngClass","click"]],template:function(t,i){if(1&t){const r=Qe();I(0,"div",0)(1,"div",1)(2,"input",2,3),de("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("change",function(s){return i.handleChange(s)}),A()(),I(4,"div",4),de("click",function(s){ge(r);const a=Cn(3);return ye(i.onClick(s,a,!0))}),_e(5,"span",5),A()(),E(6,Wpe,2,9,"label",6)}2&t&&(Dn(i.styleClass),b("ngStyle",i.style)("ngClass",tl(18,Gpe,i.checked(),i.disabled,i.focused)),C(2),b("readonly",i.readonly)("value",i.value)("checked",i.checked())("disabled",i.disabled),Yt("id",i.inputId)("name",i.name)("tabindex",i.tabindex)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel)("aria-checked",i.checked())("required",i.required),C(2),b("ngClass",tl(22,Ype,i.checked(),i.disabled,i.focused)),C(1),b("ngClass",i.checked()?i.checkboxIcon:null),C(1),b("ngIf",i.label))},dependencies:[yi,nn,wr],styles:[".p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative}.p-checkbox-disabled{cursor:default!important;pointer-events:none}.p-checkbox-box{display:flex;justify-content:center;align-items:center}p-checkbox{display:inline-flex;vertical-align:bottom;align-items:center}.p-checkbox-label{line-height:1}\n"],encapsulation:2,changeDetection:0}),n})(),fz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})(),cg=(()=>{class n{constructor(t,i,r){this.el=t,this.ngModel=i,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(t){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(W_,8),O(Kn))},n.\u0275dir=Me({type:n,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(t,i){1&t&&de("input",function(o){return i.onInput(o)}),2&t&&ns("p-filled",i.filled)}}),n})(),pz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();const Kpe=["group"];function Qpe(n,e){if(1&n&&(pt(0),_e(1,"p-checkbox",11),I(2,"label",12),Te(3),Eo(4,"titlecase"),A(),mt()),2&n){const t=M().$implicit;C(1),b("formControlName",t.key)("binary",!0)("id",t.key),C(1),b("checkIsRequiredControl",t.key)("for",t.key),C(1),Ot(xo(4,6,t.label))}}const Zpe=function(){return{width:"100%",fontSize:"14px",height:"40px"}};function Jpe(n,e){if(1&n&&_e(0,"input",15,16),2&n){const t=M(2).$implicit;qn(uo(6,Zpe)),b("formControlName",t.key)("id",t.key)("type",t.type)("min",t.min)}}const Xpe=function(n){return{"p-label-input-required":n}};function eme(n,e){if(1&n&&(pt(0),I(1,"label",13),Te(2),Eo(3,"titlecase"),A(),E(4,Jpe,2,7,"input",14),mt()),2&n){const t=M().$implicit;C(1),b("ngClass",xt(5,Xpe,t.required))("for",t.key),C(1),Ot(xo(3,3,t.label))}}function tme(n,e){1&n&&(I(0,"span",17),Te(1,"This field is required"),A())}function nme(n,e){if(1&n&&(I(0,"div",6),pt(1,7),E(2,Qpe,5,8,"ng-container",8),E(3,eme,5,7,"ng-container",9),mt(),E(4,tme,2,0,"span",10),A()),2&n){const t=e.$implicit,i=M(2);b("ngClass",t.type),C(1),b("ngSwitch",t.type),C(1),b("ngSwitchCase","checkbox"),C(2),b("ngIf",i.form.controls[t.key].invalid&&i.form.controls[t.key].dirty)}}const ime=function(){return{width:"120px"}},rme=function(){return{padding:"11.5px 24px"}};function ome(n,e){if(1&n){const t=Qe();I(0,"form",1),de("ngSubmit",function(){return ge(t),ye(M().onSubmit())}),E(1,nme,5,4,"div",2),I(2,"div",3)(3,"button",4),de("click",function(){return ge(t),ye(M().hide.emit(!0))}),A(),_e(4,"button",5),A()()}if(2&n){const t=M();b("ngClass",null==t.options?null:t.options.customClass)("formGroup",t.form),C(1),b("ngForOf",t.dynamicControls),C(2),qn(uo(8,ime)),C(1),qn(uo(9,rme)),b("disabled",t.form.invalid)}}class ug{constructor(e){this.fb=e,this.formValues=new re,this.hide=new re,this.options=null,this.dynamicControls=[]}onSubmit(){this.formValues.emit({...this.form.value})}setFormValues(e){this.form.setValue(e)}buildForm(e){this.dynamicControls=e,this.form=this.fb.group({}),this.dynamicControls.forEach(t=>{this.form.addControl(t.key,this.fb.control(t.value||null,t.required?Cc.required:[]))})}cleanForm(){this.form=null}}ug.\u0275fac=function(e){return new(e||ug)(O(G_))},ug.\u0275cmp=xe({type:ug,selectors:[["dot-bubble-form"]],viewQuery:function(e,t){if(1&e&&hn(Kpe,5),2&e){let i;Xe(i=et())&&(t.inputs=i)}},outputs:{formValues:"formValues",hide:"hide"},decls:1,vars:1,consts:[[3,"ngClass","formGroup","ngSubmit",4,"ngIf"],[3,"ngClass","formGroup","ngSubmit"],["class","field form-row",3,"ngClass",4,"ngFor","ngForOf"],[1,"form-action"],["pButton","","type","button","label","CANCEL",1,"p-button-outlined",3,"click"],["pButton","","type","submit","label","APPLY",1,"p-button",3,"disabled"],[1,"field","form-row",3,"ngClass"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","error-message",4,"ngIf"],[3,"formControlName","binary","id"],["dotFieldRequired","",3,"checkIsRequiredControl","for"],[3,"ngClass","for"],["pInputText","","type","control.type",3,"formControlName","id","type","min","style",4,"ngSwitchDefault"],["pInputText","","type","control.type",3,"formControlName","id","type","min"],["group",""],[1,"error-message"]],template:function(e,t){1&e&&E(0,ome,5,10,"form",0),2&e&&b("ngIf",t.form)},dependencies:[yi,Hr,nn,Od,__,v_,Fd,sl,Dc,kd,Ta,Mc,$S,ds,cg,sg,RN],styles:["[_nghost-%COMP%]{background:#ffffff;border-radius:.125rem;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;padding:16px}form[_ngcontent-%COMP%]{width:400px;display:flex;flex-direction:column;gap:16px}form.dotTableForm[_ngcontent-%COMP%]{width:200px}form.dotTableForm[_ngcontent-%COMP%] .p-button-outlined[_ngcontent-%COMP%]{display:none}.form-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.form-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:12px}.form-row.checkbox[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.form-action[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-top:16px;width:100%;gap:10px}.error-message[_ngcontent-%COMP%]{color:#d82b2e;font-size:.625rem;text-align:left}"]});const sme=["list"];function ame(n,e){if(1&n&&_e(0,"dot-suggestions-list-item",5),2&n){const t=e.$implicit,i=e.index;b("command",t.command)("index",i)("label",t.label)("url",t.icon)("data",t.data)("page",!0)}}function lme(n,e){if(1&n&&(I(0,"div")(1,"dot-suggestion-list",null,3),E(3,ame,1,6,"dot-suggestions-list-item",4),A()()),2&n){const t=M();C(3),b("ngForOf",t.items)}}function cme(n,e){1&n&&_e(0,"dot-suggestion-loading-list")}function ume(n,e){if(1&n){const t=Qe();I(0,"dot-empty-message",6),de("back",function(){return ge(t),ye(M().handleBackButton())}),A()}2&n&&b("title",M().title)("showBackBtn",!0)}class Hh{constructor(){this.items=[],this.loading=!1,this.back=new re}handleBackButton(){return this.back.emit(!0),!1}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(e){this.list.updateSelection(e)}}Hh.\u0275fac=function(e){return new(e||Hh)},Hh.\u0275cmp=xe({type:Hh,selectors:[["dot-suggestion-page"]],viewQuery:function(e,t){if(1&e&&hn(sme,5),2&e){let i;Xe(i=et())&&(t.list=i.first)}},inputs:{items:"items",loading:"loading",title:"title"},outputs:{back:"back"},decls:5,vars:2,consts:[[4,"ngIf","ngIfElse"],["loadingBlock",""],["emptyBlock",""],["list",""],[3,"command","index","label","url","data","page",4,"ngFor","ngForOf"],[3,"command","index","label","url","data","page"],[3,"title","showBackBtn","back"]],template:function(e,t){if(1&e&&(E(0,lme,4,1,"div",0),E(1,cme,1,0,"ng-template",null,1,Bn),E(3,ume,1,2,"ng-template",null,2,Bn)),2&e){const i=Cn(2),r=Cn(4);b("ngIf",t.items.length)("ngIfElse",t.loading?i:r)}},styles:["[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#ffffff}[_nghost-%COMP%] {width:100%;box-shadow:none;padding:0}[_nghost-%COMP%] dotcms-suggestions-list-item{padding:8px}"]});const dme=["input"],hme=["suggestions"];function fme(n,e){1&n&&_e(0,"hr",11)}const pme=function(){return{fontSize:"32px"}};function mme(n,e){if(1&n&&(I(0,"div",12)(1,"a",13)(2,"span",14),Te(3,"language"),A(),I(4,"span",15),Te(5),A()(),I(6,"div",16)(7,"div",17),_e(8,"p-checkbox",18),A(),I(9,"label",19),Te(10,"Open link in new window"),A()()()),2&n){const t=M();C(1),b("href",t.currentLink,Ja),C(1),qn(uo(5,pme)),C(3),Ot(t.currentLink),C(3),b("binary",!0)}}function gme(n,e){if(1&n){const t=Qe();I(0,"dot-suggestion-page",20,21),de("back",function(){return ge(t),ye(M().resetForm())}),A()}if(2&n){const t=M();b("items",t.items)("loading",t.loading)("title",t.noResultsTitle)}}function yme(n,e){if(1&n){const t=Qe();I(0,"dot-form-actions",22),de("hide",function(r){return ge(t),ye(M().hide.emit(r))})("remove",function(r){return ge(t),ye(M().removeLink.emit(r))}),A()}2&n&&b("link",M().currentLink)}const _me=function(){return{width:"5rem",padding:".75rem 1rem",borderRadius:"0 2px 2px 0"}};class $h{constructor(e,t,i){this.fb=e,this.suggestionsService=t,this.dotLanguageService=i,this.hide=new re(!1),this.removeLink=new re(!1),this.isSuggestionOpen=new re(!1),this.setNodeProps=new re,this.showSuggestions=!1,this.languageId=ng,this.initialValues={link:"",blank:!0},this.minChars=3,this.loading=!1,this.items=[]}onMouseDownHandler(e){const{target:t}=e;t!==this.input.nativeElement&&e.preventDefault()}get noResultsTitle(){return`No results for ${this.newLink}`}get currentLink(){return this.initialValues.link}get newLink(){return this.form.get("link").value}ngOnInit(){this.form=this.fb.group({...this.initialValues}),this.form.get("link").valueChanges.pipe($d(500)).subscribe(e=>{e.lengththis.setNodeProps.emit({link:this.currentLink,blank:e})),this.dotLanguageService.getLanguages().pipe(Tt(1)).subscribe(e=>this.dotLangs=e)}submitForm(){this.setNodeProps.emit(this.form.value),this.hide.emit(!0)}setLoading(){const e=this.newLink.length>=this.minChars&&!c0(this.newLink);this.items=e?this.items:[],this.showSuggestions=e,this.loading=e,e&&requestAnimationFrame(()=>this.isSuggestionOpen.emit(!0))}setFormValue({link:e="",blank:t=!0}){this.form.setValue({link:e,blank:t},{emitEvent:!1})}focusInput(){this.input.nativeElement.focus()}onKeyDownEvent(e){const t=this.suggestionsComponent?.items;if(e.stopImmediatePropagation(),"Escape"===e.key)return this.hide.emit(!0),!0;if(!this.showSuggestions||!t?.length)return!0;switch(e.key){case"Enter":return this.suggestionsComponent?.execCommand(),!1;case"ArrowUp":case"ArrowDown":this.suggestionsComponent?.updateSelection(e)}}resetForm(){this.showSuggestions=!1,this.setFormValue({...this.initialValues})}onSelection({payload:{url:e}}){this.setFormValue({...this.form.value,link:e}),this.submitForm()}searchContentlets({link:e=""}){this.loading=!0,this.suggestionsService.getContentletsByLink({link:e,currentLanguage:this.languageId}).pipe(Tt(1)).subscribe(t=>{this.items=t.map(i=>{const{languageId:r}=i;return i.language=this.getContentletLanguage(r),{label:i.title,icon:"contentlet/image",data:{contentlet:i},command:()=>{this.onSelection({payload:i,type:{name:"dotContent"}})}}}),this.loading=!1})}getContentletLanguage(e){const{languageCode:t,countryCode:i}=this.dotLangs[e];return t&&i?`${t}-${i}`:""}}$h.\u0275fac=function(e){return new(e||$h)(O(G_),O(Fl),O(Ll))},$h.\u0275cmp=xe({type:$h,selectors:[["dot-bubble-link-form"]],viewQuery:function(e,t){if(1&e&&(hn(dme,5),hn(hme,5)),2&e){let i;Xe(i=et())&&(t.input=i.first),Xe(i=et())&&(t.suggestionsComponent=i.first)}},hostBindings:function(e,t){1&e&&de("mousedown",function(r){return t.onMouseDownHandler(r)})},inputs:{showSuggestions:"showSuggestions",languageId:"languageId",initialValues:"initialValues"},outputs:{hide:"hide",removeLink:"removeLink",isSuggestionOpen:"isSuggestionOpen",setNodeProps:"setNodeProps"},decls:11,vars:8,consts:[[1,"form-container"],["autocomplete","off",3,"formGroup","keydown","ngSubmit"],[1,"p-inputgroup","search-container"],[1,"p-inputgroup"],["id","editor-input-link","pInputText","","type","text","placeholder","Paste link or search for pages","formControlName","link",3,"input"],["input",""],["pButton","","type","submit","label","ADD",1,"p-button"],["class","divider",4,"ngIf"],["class","info-container",4,"ngIf"],[3,"items","loading","title","back",4,"ngIf"],[3,"link","hide","remove",4,"ngIf"],[1,"divider"],[1,"info-container"],["target","_blank",1,"url-container",3,"href"],[1,"material-icons"],[1,"truncate"],[1,"field-checkbox"],[1,"checkbox-container"],["id","editor-input-checkbox","formControlName","blank",3,"binary"],["for","editor-input-checkbox"],[3,"items","loading","title","back"],["suggestions",""],[3,"link","hide","remove"]],template:function(e,t){1&e&&(I(0,"div",0)(1,"form",1),de("keydown",function(r){return t.onKeyDownEvent(r)})("ngSubmit",function(){return t.submitForm()}),I(2,"div",2)(3,"div",3)(4,"input",4,5),de("input",function(){return t.setLoading()}),A(),_e(6,"button",6),A()(),E(7,fme,1,0,"hr",7),E(8,mme,11,6,"div",8),A(),E(9,gme,2,3,"dot-suggestion-page",9),E(10,yme,1,1,"dot-form-actions",10),A()),2&e&&(C(1),b("formGroup",t.form),C(5),qn(uo(7,_me)),C(1),b("ngIf",t.showSuggestions||t.currentLink),C(1),b("ngIf",t.currentLink&&!t.showSuggestions),C(1),b("ngIf",t.showSuggestions),C(1),b("ngIf",!t.showSuggestions&&t.currentLink))},styles:[".form-container[_ngcontent-%COMP%]{background:#ffffff;border-radius:.125rem;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;width:400px}.form-container[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;max-width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%]{padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{background:#ffffff;border:1px solid #afb3c0}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .url-container[_ngcontent-%COMP%]{cursor:pointer;white-space:nowrap;font-size:16px;width:100%;word-wrap:normal;display:flex;align-items:center;text-decoration:none;gap:8px;color:#14151a}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%]{display:flex;gap:3.2px;min-width:100%;font-size:16px}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%]{cursor:pointer;width:32px;display:flex;align-items:center;justify-content:center}.divider[_ngcontent-%COMP%]{border:0;border-top:1px solid #ebecef;width:100%;margin:0}.truncate[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]});var vme=x(88222),bme=x.n(vme);const mz=({editor:n,view:e,pos:t})=>{const i=e.state.doc?.resolve(t),r=((n,e)=>{const t=e-n?.textOffset;return{to:t,from:n.index(){const{state:l}=this.editor,{to:c}=l.selection,{openOnClick:u}=za.getState(l);this.pluginKey.getState(l).isOpen&&(u?(this.editor.commands.closeLinkForm(),requestAnimationFrame(()=>this.editor.commands.setTextSelection(c))):this.editor.commands.closeLinkForm())},this.editor=e,this.element=t,this.view=i,this.languageId=a,this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible",this.pluginKey=o,this.component=s,this.editor.on("focus",this.focusHandler),this.setComponentEvents(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){const i=this.pluginKey.getState(e.state),r=this.pluginKey.getState(t);i.isOpen!==r.isOpen?(this.createTooltip(),i.isOpen?this.show():this.hide(),this.detectLinkFormChanges()):this.detectLinkFormChanges()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Bo(e.parentElement,{...this.tippyOptions,...yR,getReferenceClientRect:()=>this.setTippyPosition(),content:this.element,onHide:()=>{this.editor.commands.closeLinkForm()}}))}show(){this.tippy?.show(),this.component.instance.showSuggestions=!1,this.setInputValues(),this.component.instance.focusInput()}hide(){this.tippy?.hide(),this.editor.view.focus()}setTippyPosition(){const{view:e}=this.editor,{state:t}=e,{doc:i,selection:r}=t,{ranges:o}=r,s=Math.min(...o.map(m=>m.$from.pos)),l=ou(e,s,Math.max(...o.map(m=>m.$to.pos))),{element:c}=this.editor.options,u=c.parentElement.getBoundingClientRect(),d=document.querySelector("#bubble-menu")?.getBoundingClientRect()||l,h=u.bottomthis.hide()),this.component.instance.removeLink.pipe(Tn(this.$destroy)).subscribe(()=>this.removeLink()),this.component.instance.isSuggestionOpen.pipe(Tn(this.$destroy)).subscribe(()=>this.tippy.popperInstance.update()),this.component.instance.setNodeProps.pipe(Tn(this.$destroy)).subscribe(e=>this.setLinkValues(e))}detectLinkFormChanges(){this.component.changeDetectorRef.detectChanges(),requestAnimationFrame(()=>this.tippy?.popperInstance?.forceUpdate())}getLinkProps(){const{href:e="",target:t="_top"}=this.editor.isActive("link")?this.editor.getAttributes("link"):this.editor.getAttributes(Jr.name);return{link:e,blank:"_blank"===t}}getLinkSelect(){const{state:e}=this.editor,{from:t,to:i}=e.selection,r=e.doc.textBetween(t,i," ");return c0(r)?r:""}isImageNode(){const{type:e}=this.editor.state.doc.nodeAt(this.editor.state.selection.from)||{};return e?.name===Jr.name}destroy(){this.tippy?.destroy(),this.editor.off("focus",this.focusHandler),this.$destroy.next(!0),this.component.destroy()}hanlderScroll(e){if(!this.tippy?.state.isMounted)return;const t=e.target,i=t?.parentElement?.parentElement;this.scrollElementMap[t.id]||this.scrollElementMap[i.id]||this.hide()}}const Cme=n=>{let e;return new $t({key:n.pluginKey,view:t=>new wme({view:t,...n}),state:{init:()=>({isOpen:!1,openOnClick:!1}),apply(t,i,r){const{isOpen:o,openOnClick:s}=t.getMeta(za)||{},a=za.getState(r);return"boolean"==typeof o?{isOpen:o,openOnClick:s}:a||i}},props:{handleDOMEvents:{mousedown(t,i){const r=n.editor,o=((n,e)=>{const{clientX:t,clientY:i}=e,{pos:r}=n.posAtCoords({left:t,top:i});return r})(t,i),{isOpen:s,openOnClick:a}=za.getState(r.state);s&&a&&r.chain().unsetHighlight().setTextSelection(o).run()}},handleClickOn(t,i,r){const o=n.editor;if(o.isActive("link")&&i){if(!bme()(e,r))return mz({editor:o,view:t,pos:i}),e=r,!0;o.chain().setTextSelection(i).closeLinkForm().run()}else e=r},handleDoubleClickOn(t,i){const r=n.editor;if(r.isActive("link"))return mz({editor:r,view:t,pos:i}),!0}}})},za=new rn("addLink"),Dme=(n,e)=>vn.create({name:"bubbleLinkForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:za}),addCommands:()=>({openLinkForm:({openOnClick:t})=>({chain:i})=>i().setMeta("preventAutolink",!0).setHighlight().command(({tr:r})=>(r.setMeta(za,{isOpen:!0,openOnClick:t}),!0)).freezeScroll(!0).run(),closeLinkForm:()=>({chain:t})=>t().setMeta("preventAutolink",!0).unsetHighlight().command(({tr:i})=>(i.setMeta(za,{isOpen:!1,openOnClick:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const t=n.createComponent($h);return t.changeDetectorRef.detectChanges(),[Cme({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,component:t,languageId:e})]}}),gz={tableCell:!0,table:!0,youtube:!0,dotVideo:!0,aiContent:!0,loader:!0},Mme=({editor:n,state:e,from:t,to:i})=>{const{doc:r,selection:o}=e,{view:s}=n,{empty:a}=o,{isOpen:l,openOnClick:c}=za.getState(e),u=n.state.doc.nodeAt(n.state.selection.from),d=du(n.state.selection.$from),h=!r.textBetween(t,i).length&&Eb(e.selection);return"text"===u?.type.name&&"table"===d?.type.name&&!h||!(!l&&(!s.hasFocus()||a||h||gz[d?.type.name]||gz[u?.type.name])||l&&c)},c0=n=>!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(n),yz=(n,e)=>e===Jr.name&&n?.firstElementChild?n.firstElementChild.getBoundingClientRect():n.getBoundingClientRect(),_z=n=>n.isActive("bulletList")||n.isActive("orderedList"),vz=[{icon:"format_bold",markAction:"bold",active:!1},{icon:"format_underlined",markAction:"underline",active:!1},{icon:"format_italic",markAction:"italic",active:!1},{icon:"strikethrough_s",markAction:"strike",active:!1},{icon:"superscript",markAction:"superscript",active:!1},{icon:"subscript",markAction:"subscript",active:!1,divider:!0}],WS=[{icon:"format_align_left",markAction:"left",active:!1},{icon:"format_align_center",markAction:"center",active:!1},{icon:"format_align_right",markAction:"right",active:!1,divider:!0}],Eme=[...vz,...WS,{icon:"format_list_bulleted",markAction:"bulletList",active:!1},{icon:"format_list_numbered",markAction:"orderedList",active:!1},{icon:"format_indent_decrease",markAction:"outdent",active:!1},{icon:"format_indent_increase",markAction:"indent",active:!1,divider:!0},{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],xme=[...WS,{icon:"link",markAction:"link",active:!1,divider:!0},{text:"Properties",markAction:"properties",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],Ime=[...vz,...WS,{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],Ome=[{icon:"delete",markAction:"deleteNode",active:!1}],bz=[{name:"offset",options:{offset:[0,5]}},{name:"flip",options:{fallbackPlacements:["bottom-start","top-start"]}},{name:"preventOverflow",options:{altAxis:!0,tether:!0}}],kme=[{key:"src",label:"path",required:!0,controlType:"text",type:"text"},{key:"alt",label:"alt",controlType:"text",type:"text"},{key:"title",label:"caption",controlType:"text",type:"text"}];class Nme extends xS{constructor(e){const{editor:t,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=e;super(e),this.$destroy=new se,this.focusHandler=()=>{this.editor.commands.closeForm(),setTimeout(()=>this.update(this.editor.view))},this.editor=t,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible",this.pluginKey=s,this.component=a,this.component.instance.buildForm(kme),this.component.instance.formValues.pipe(Tn(this.$destroy)).subscribe(l=>{this.editor.commands.updateValue(l)}),this.component.instance.hide.pipe(Tn(this.$destroy)).subscribe(()=>{this.editor.commands.closeForm()}),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1},{state:o}=e,{doc:s,selection:a}=o,{ranges:l}=a,c=Math.min(...l.map(d=>d.$from.pos)),u=Math.max(...l.map(d=>d.$to.pos));i?.open!==r?.open?(i.open&&i.form?(this.component.instance.buildForm(i.form),this.component.instance.options=i.options):this.component.instance.cleanForm(),this.createTooltip(),this.tippy?.setProps({getReferenceClientRect:()=>{if(a instanceof Ye){const d=e.nodeDOM(c);if(d)return this.node=s.nodeAt(c),this.tippyRect(d,this.node.type.name)}return ou(e,c,u)}}),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Bo(e.parentElement,{...this.tippyOptions,...yR,content:this.element,onShow:()=>{requestAnimationFrame(()=>{this.component.instance.inputs.first.nativeElement.focus()})}}))}show(){this.tippy?.show()}destroy(){this.tippy?.destroy(),this.editor.off("focus",this.focusHandler),this.$destroy.next(!0),this.component.destroy(),this.component.instance.formValues.unsubscribe()}hanlderScroll(e){if(!this.shouldHideOnScroll(e.target))return!0;setTimeout(()=>this.update(this.editor.view))}tippyRect(e,t){return document.querySelector("#bubble-menu")?.getBoundingClientRect()||((n,e)=>e===Jr.name&&n.getElementsByTagName("img")[0]?.getBoundingClientRect()||n.getBoundingClientRect())(e,t)}shouldHideOnScroll(e){return this.tippy?.state.isMounted&&this.tippy?.popper.contains(e)}}const Pme=n=>new $t({key:n.pluginKey,view:e=>new Nme({view:e,...n}),state:{init:()=>({open:!1,form:[],options:null}),apply(e,t,i){const{open:r,form:o,options:s}=e.getMeta(vu)||{},a=vu?.getState(i);return"boolean"==typeof r?{open:r,form:o,options:s}:a||t}}}),vu=new rn("bubble-form"),Lme={interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},Rme=n=>{const e=new se;return IS.extend({name:"bubbleForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:vu,shouldShow:()=>!0}),addCommands:()=>({openForm:(t,i)=>({chain:r})=>(r().command(({tr:o})=>(o.setMeta(vu,{form:t,options:i,open:!0}),!0)).freezeScroll(!0).run(),e),closeForm:()=>({chain:t})=>(e.next(null),t().command(({tr:i})=>(i.setMeta(vu,{open:!1}),!0)).freezeScroll(!1).run()),updateValue:t=>({editor:i})=>{e.next(t),i.commands.closeForm()}}),addProseMirrorPlugins(){const t=n.createComponent(ug),i=t.location.nativeElement;return t.changeDetectorRef.detectChanges(),[Pme({pluginKey:vu,editor:this.editor,element:i,tippyOptions:Lme,component:t,form$:e})]}})},wz=function(){return{width:"50%"}};function Fme(n,e){if(1&n){const t=Qe();I(0,"div")(1,"div",1)(2,"button",2),de("click",function(){return ge(t),ye(M().copy())}),A(),I(3,"button",3),de("click",function(){return ge(t),ye(M().remove.emit(!0))}),A()()()}2&n&&(C(2),qn(uo(4,wz)),C(1),qn(uo(5,wz)))}class dg{constructor(){this.remove=new re(!1),this.hide=new re(!1),this.link=""}copy(){navigator.clipboard.writeText(this.link).then(()=>this.hide.emit(!0)).catch(()=>alert("Could not copy link"))}}function jme(n,e){if(1&n){const t=Qe();pt(0),I(1,"button",3),de("click",function(){return ge(t),ye(M().toggleChangeTo.emit())}),Te(2),A(),_e(3,"div",4),mt()}if(2&n){const t=M();C(2),Ot(t.selected)}}function zme(n,e){1&n&&_e(0,"div",4)}function Vme(n,e){if(1&n){const t=Qe();pt(0),I(1,"dot-bubble-menu-button",5),de("click",function(){const o=ge(t).$implicit;return ye(M().command.emit(o))}),A(),E(2,zme,1,0,"div",6),mt()}if(2&n){const t=e.$implicit;C(1),b("active",t.active)("item",t),C(1),b("ngIf",t.divider)}}dg.\u0275fac=function(e){return new(e||dg)},dg.\u0275cmp=xe({type:dg,selectors:[["dot-form-actions"]],inputs:{link:"link"},outputs:{remove:"remove",hide:"hide"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"form-actions"],["pButton","","type","button","label","COPY LINK",1,"p-button-outlined",3,"click"],["pButton","","type","button","label","REMOVE LINK",1,"p-button-outlined","p-button-danger",3,"click"]],template:function(e,t){1&e&&E(0,Fme,4,6,"div",0),2&e&&b("ngIf",t.link.length)},dependencies:[nn,ds],styles:[".form-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;padding:1rem;gap:.5rem}"]});class Wh{constructor(){this.items=[],this.command=new re,this.toggleChangeTo=new re}preventDeSelection(e){e.preventDefault()}}Wh.\u0275fac=function(e){return new(e||Wh)},Wh.\u0275cmp=xe({type:Wh,selectors:[["dot-bubble-menu"]],inputs:{items:"items",selected:"selected"},outputs:{command:"command",toggleChangeTo:"toggleChangeTo"},decls:3,vars:2,consts:[["id","bubble-menu",1,"bubble-menu",3,"mousedown"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"btn-dropdown",3,"click"],[1,"divider"],[3,"active","item","click"],["class","divider",4,"ngIf"]],template:function(e,t){1&e&&(I(0,"div",0),de("mousedown",function(r){return t.preventDeSelection(r)}),E(1,jme,4,1,"ng-container",1),E(2,Vme,3,3,"ng-container",2),A()),2&e&&(C(1),b("ngIf",t.selected),C(1),b("ngForOf",t.items))},styles:['[_nghost-%COMP%]{height:100%;width:100%}.bubble-menu[_ngcontent-%COMP%]{box-sizing:border-box;align-items:center;background:#ffffff;border-radius:.125rem;box-shadow:0 10px 24px 0 var(--color-palette-black-op-20);display:flex;justify-content:center;padding:5.6px;height:40px}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]{background:none;border:none;outline:none;padding:4px;cursor:pointer}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:hover{background:#f3f3f4}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:after{content:"";border:solid #14151a;border-width:0 2px 2px 0;display:inline-block;padding:3.2px;transform:rotate(45deg);margin-left:12px}.bubble-menu[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #f3f3f4;height:100%;margin:0 8px}']});const Bme=function(n,e){return{"btn-bubble-menu":!0,"btn-icon":n,"btn-active":e}},Ume=function(n){return{"material-icons":n}};class hg{constructor(){this.active=!1}}hg.\u0275fac=function(e){return new(e||hg)},hg.\u0275cmp=xe({type:hg,selectors:[["dot-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:8,consts:[[3,"ngClass"]],template:function(e,t){1&e&&(I(0,"button",0)(1,"span",0),Te(2),A()()),2&e&&(b("ngClass",Mi(3,Bme,t.item.icon,t.active)),C(1),b("ngClass",xt(6,Ume,t.item.icon)),C(1),Ot(t.item.icon||t.item.text))},dependencies:[yi],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}.btn-bubble-menu[_ngcontent-%COMP%]{background:#ffffff;border:none;color:#14151a;display:flex;justify-content:center;align-items:center;cursor:pointer;max-width:auto;width:100%;height:32px;border-radius:.125rem}.btn-bubble-menu[_ngcontent-%COMP%]:hover{background:#f3f3f4}.btn-bubble-menu.btn-active[_ngcontent-%COMP%]{background:#f3f3f4;color:#14151a;border:1px solid #afb3c0}.btn-icon[_ngcontent-%COMP%]{width:32px}"]});const Hme=n=>{const e=n.component.instance,t=n.changeToComponent.instance;return new $t({key:n.pluginKey,view:i=>new $me({view:i,...n}),props:{handleKeyDown(i,r){const{key:o}=r,{changeToIsOpen:s}=n.editor?.storage.bubbleMenu||{};if(s){if("Escape"===o)return e.toggleChangeTo.emit(),!0;if("Enter"===o)return t.execCommand(),!0;if("ArrowDown"===o||"ArrowUp"===o)return t.updateSelection(r),!0}return!1}}})};class $me extends xS{constructor(e){super(e),this.shouldShowProp=!1,this.updateActiveItems=(r=[],o)=>r.map(s=>(s.active=o.includes(s.markAction),s)),this.enabledMarks=()=>[...Object.keys(this.editor.schema.marks),...Object.keys(this.editor.schema.nodes)],this.getActiveMarks=(r=[])=>[...this.enabledMarks().filter(o=>this.editor.isActive(o)),...r.filter(o=>this.editor.isActive({textAlign:o}))];const{component:t,changeToComponent:i}=e;this.component=t,this.changeTo=i,this.changeToElement=this.changeTo.location.nativeElement,this.component.instance.command.subscribe(this.exeCommand.bind(this)),this.component.instance.toggleChangeTo.subscribe(this.toggleChangeTo.bind(this)),this.changeTo.instance.items=this.changeToItems(),this.changeTo.instance.title="Change To",this.changeToElement.remove(),this.changeTo.changeDetectorRef.detectChanges(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0),document.body.addEventListener("mouseup",this.showMenu.bind(this),!0),document.body.addEventListener("keyup",this.showMenu.bind(this),!0),this.editor.off("blur",this.blurHandler)}showMenu(){this.shouldShowProp&&(this.tippyChangeTo?.setProps({getReferenceClientRect:()=>this.tippy?.popper.getBoundingClientRect()}),this.show())}update(e,t){const{state:i,composing:r}=e,{doc:o,selection:s}=i,a=t&&t.doc.eq(o)&&t.selection.eq(s);if(r||a)return;this.createTooltip(),this.createChangeToTooltip();const{ranges:l}=s;this.selectionRange=l[0],this.selectionNodesCount=0,o.nodesBetween(this.selectionRange.$from.pos,this.selectionRange.$to.pos,d=>{d.isBlock&&this.selectionNodesCount++});const c=Math.min(...l.map(d=>d.$from.pos)),u=Math.max(...l.map(d=>d.$to.pos));if(this.shouldShowProp=this.shouldShow?.({editor:this.editor,view:e,state:i,oldState:t,from:c,to:u}),!this.shouldShowProp)return this.hide(),void this.tippyChangeTo?.hide();this.tippy?.setProps({getReferenceClientRect:()=>{const d=e.nodeDOM(c),h=o.nodeAt(c)?.type.name;return(({viewCoords:n,nodeCoords:e,padding:t})=>{const{top:i,bottom:r}=e,{top:o,bottom:s}=n,a=Math.ceil(i-o){this.changeTo.instance.list.updateActiveItem(e),this.changeTo.changeDetectorRef.detectChanges()})}setMenuItems(e,t){const i=e.nodeAt(t),o="table"===du(this.editor.state.selection.$from).type.name?"table":i?.type.name;this.selectionNode=i,this.component.instance.items=((n="")=>{switch(n){case"dotImage":return xme;case"dotContent":return Ome;case"table":return Ime;default:return Eme}})(o)}openImageProperties(){const{open:e}=vu.getState(this.editor.state),{alt:t,src:i,title:r,data:o}=this.editor.getAttributes(Jr.name),{title:s="",asset:a}=o||{};e?this.editor.commands.closeForm():this.editor.commands.openForm([{value:i||a,key:"src",label:"path",required:!0,controlType:"text",type:"text"},{value:t||s,key:"alt",label:"alt",controlType:"text",type:"text"},{value:r||s,key:"title",label:"caption",controlType:"text",type:"text"}]).pipe(Tt(1),Un(l=>null!=l)).subscribe(l=>{requestAnimationFrame(()=>{this.editor.commands.updateAttributes(Jr.name,{...l}),this.editor.commands.closeForm()})})}exeCommand(e){const{markAction:t,active:i}=e;switch(t){case"bold":this.editor.commands.toggleBold();break;case"italic":this.editor.commands.toggleItalic();break;case"strike":this.editor.commands.toggleStrike();break;case"underline":this.editor.commands.toggleUnderline();break;case"left":case"center":case"right":this.toggleTextAlign(t,i);break;case"bulletList":this.editor.commands.toggleBulletList();break;case"orderedList":this.editor.commands.toggleOrderedList();break;case"indent":_z(this.editor)&&this.editor.commands.sinkListItem("listItem");break;case"outdent":_z(this.editor)&&this.editor.commands.liftListItem("listItem");break;case"link":const{isOpen:r}=za.getState(this.editor.state);r?this.editor.view.focus():this.editor.commands.openLinkForm({openOnClick:!1});break;case"properties":this.openImageProperties();break;case"deleteNode":this.selectionNodesCount>1?((n,e)=>{const t=e.$from.pos,i=e.$to.pos+1;this.editor.chain().deleteRange({from:t,to:i}).blur().run()})(0,this.selectionRange):(({editor:n,nodeType:e,selectionRange:t})=>{mue.includes(e)?((n,e)=>{const t=e.$from.pos,i=t+1;n.chain().deleteRange({from:t,to:i}).blur().run()})(n,t):((n,e)=>{const t=du(e.$from),i=t.type.name,r=du(e.$from,[Wi.ORDERED_LIST,Wi.BULLET_LIST]),{childCount:o}=r;switch(i){case Wi.ORDERED_LIST:case Wi.BULLET_LIST:o>1?n.chain().deleteNode(Wi.LIST_ITEM).blur().run():n.chain().deleteNode(r.type).blur().run();break;default:n.chain().deleteNode(t.type).blur().run()}})(n,t)})({editor:this.editor,nodeType:this.selectionNode.type.name,selectionRange:this.selectionRange});break;case"clearAll":this.editor.commands.unsetAllMarks(),this.editor.commands.clearNodes();break;case"superscript":this.editor.commands.toggleSuperscript();break;case"subscript":this.editor.commands.toggleSubscript()}}toggleTextAlign(e,t){t?this.editor.commands.unsetTextAlign():this.editor.commands.setTextAlign(e)}changeToItems(){const e=this.editor.storage.dotConfig.allowedBlocks;let i="table"===du(this.editor.state.selection.$from).type.name?GX:QX;e.length>1&&(i=i.filter(o=>e.includes(o.id)));const r={heading1:()=>{this.editor.chain().focus().clearNodes().setHeading({level:1}).run()},heading2:()=>{this.editor.chain().focus().clearNodes().setHeading({level:2}).run()},heading3:()=>{this.editor.chain().focus().clearNodes().setHeading({level:3}).run()},heading4:()=>{this.editor.chain().focus().clearNodes().setHeading({level:4}).run()},heading5:()=>{this.editor.chain().focus().clearNodes().setHeading({level:5}).run()},heading6:()=>{this.editor.chain().focus().clearNodes().setHeading({level:6}).run()},paragraph:()=>{this.editor.chain().focus().clearNodes().run()},orderedList:()=>{this.editor.chain().focus().clearNodes().toggleOrderedList().run()},bulletList:()=>{this.editor.chain().focus().clearNodes().toggleBulletList().run()},blockquote:()=>{this.editor.chain().focus().clearNodes().toggleBlockquote().run()},codeBlock:()=>{this.editor.chain().focus().clearNodes().toggleCodeBlock().run()}};return i.forEach(o=>{o.isActive=()=>o.id.includes("heading")?this.editor.isActive("heading",o.attributes):this.editor.isActive(o.id),o.command=()=>{r[o.id](),this.tippyChangeTo.hide(),this.getActiveNode()}}),i}getActiveNode(){const e=this.changeToItems(),t=e.filter(o=>o?.isActive()),i=t.length>1?t[1]:t[0],r=e.findIndex(o=>o===i);return{activeItem:i,index:r}}createChangeToTooltip(){const{element:e}=this.editor.options;this.tippyChangeTo||(this.tippyChangeTo=Bo(e,{...this.tippyOptions,appendTo:document.body,getReferenceClientRect:null,content:this.changeToElement,placement:"bottom-start",duration:0,hideOnClick:!1,popperOptions:{modifiers:bz},onHide:()=>{this.editor.storage.bubbleMenu.changeToIsOpen=!1,this.changeTo.instance.items=[],this.changeTo.changeDetectorRef.detectChanges(),this.editor.commands.freezeScroll(!1)},onShow:()=>{this.editor.storage.bubbleMenu.changeToIsOpen=!0,this.editor.commands.freezeScroll(!0),this.updateChangeTo()}}))}toggleChangeTo(){const{changeToIsOpen:e}=this.editor?.storage.bubbleMenu||{};e?this.tippyChangeTo?.hide():this.tippyChangeTo?.show()}hanlderScroll(){this.tippyChangeTo?.state.isVisible&&this.tippyChangeTo?.hide()}}const Wme={duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0},Gme=new rn("bubble-menu");function Yme(n){const e=n.createComponent(Wh),t=e.location.nativeElement,i=n.createComponent(zl),r=i.location.nativeElement;return IS.extend({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:Wme,pluginKey:"bubbleMenu",shouldShow:Mme}),addStorage:()=>({changeToIsOpen:!1}),addProseMirrorPlugins(){return t?[Hme({...this.options,component:e,changeToComponent:i,pluginKey:Gme,editor:this.editor,element:t,changeToElement:r})]:[]}})}const qme=vn.create({name:"dotComands",addCommands:()=>({isNodeRegistered:n=>({view:e})=>{const{schema:t}=e.state,{nodes:i}=t;return Boolean(i[n])}})}),Kme=n=>vn.create({name:"dotConfig",addStorage:()=>({...n})}),Qme=Rn.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:n}){return["td",Xt(this.options.HTMLAttributes,n),0]}});class Jme{constructor(e,t){this.tippy=t}init(){}update(){}destroy(){this.tippy.destroy()}}const Xme=n=>{let e;function t(s){return Ei.node(s.$to.before(3),s.$to.after(3),{class:"focus"})}function i(s){s.preventDefault(),s.stopPropagation(),e?.setProps({getReferenceClientRect:()=>s.target.getBoundingClientRect()}),e.show()}function o(s){return"tableCell"===s?.type.name||"tableHeader"===s?.type.name||"tableRow"===s?.type.name}return new $t({key:new rn("dotTableCell"),state:{apply:()=>{},init:()=>{const{editor:s,viewContainerRef:a}=n,l=a.createComponent(zl),c=l.location.nativeElement;l.instance.currentLanguage=s.storage.dotConfig.lang;const{element:d}=s.options;e=Bo(d,{duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0,appendTo:document.body,getReferenceClientRect:null,content:c,placement:"bottom-start",duration:0,hideOnClick:!0,popperOptions:{modifiers:bz},onShow:()=>{s.commands.freezeScroll(!0);const h=l.instance.items.find(p=>"mergeCells"==p.id),f=l.instance.items.find(p=>"splitCells"==p.id);h.disabled=!s.can().mergeCells(),f.disabled=!s.can().splitCell(),setTimeout(()=>{l.changeDetectorRef.detectChanges()})},onHide:()=>s.commands.freezeScroll(!1)}),l.instance.items=((n,e)=>[{label:"Toggle row Header",icon:"check",id:"toggleRowHeader",command:()=>{n.commands.toggleHeaderRow(),e.hide()},tabindex:"0"},{label:"Toggle column Header",icon:"check",id:"toggleColumnHeader",command:()=>{n.commands.toggleHeaderColumn(),e.hide()},tabindex:"1"},{id:"divider"},{label:"Merge Cells",icon:"call_merge",id:"mergeCells",command:()=>{n.commands.mergeCells(),e.hide()},disabled:!0,tabindex:"2"},{label:"Split Cells",icon:"call_split",id:"splitCells",command:()=>{n.commands.splitCell(),e.hide()},disabled:!0,tabindex:"3"},{id:"divider"},{label:"Insert row above",icon:"arrow_upward",id:"insertAbove",command:()=>{n.commands.addRowBefore(),e.hide()},tabindex:"4"},{label:"Insert row below",icon:"arrow_downward",id:"insertBellow",command:()=>{n.commands.addRowAfter(),e.hide()},tabindex:"5"},{label:"Insert column left",icon:"arrow_back",id:"insertLeft",command:()=>{n.commands.addColumnBefore(),e.hide()},tabindex:"6"},{label:"Insert column right",icon:"arrow_forward",id:"insertRight",command:()=>{n.commands.addColumnAfter(),e.hide()},tabindex:"7"},{id:"divider"},{label:"Delete row",icon:"delete",id:"deleteRow",command:()=>{n.commands.deleteRow(),e.hide()},tabindex:"8"},{label:"Delete Column",icon:"delete",id:"deleteColumn",command:()=>{n.commands.deleteColumn(),e.hide()},tabindex:"9"},{label:"Delete Table",icon:"delete",id:"deleteTable",command:()=>{n.commands.deleteTable(),e.hide()},tabindex:"10"}])(n.editor,e),l.instance.title="",l.changeDetectorRef.detectChanges()}},view:s=>new Jme(s,e),props:{decorations(s){const a=s.selection.$from.depth>3?s.selection.$from.node(3):null;return"tableCell"==a?.type?.name||"tableHeader"==a?.type?.name?Ln.create(s.doc,[t(s.selection)]):null},handleDOMEvents:{contextmenu:(s,a)=>{o(s.state.selection.$from.node(s.state.selection.$from.depth-1))&&i(a)},mousedown:(s,a)=>{const l=s.state.selection.$from.node(s.state.selection.$from.depth-1);!function r(s){return s?.classList.contains("dot-cell-arrow")}(a.target)?2===a.button&&o(l)&&a.preventDefault():i(a)}}}})};function ege(n){return Qme.extend({renderHTML({HTMLAttributes:e}){return["td",Xt(this.options.HTMLAttributes,e),["button",{class:"dot-cell-arrow"}],["p",0]]},addProseMirrorPlugins(){return[Xme({editor:this.editor,viewContainerRef:n})]}})}const tge=Rn.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:n}){return["th",Xt(this.options.HTMLAttributes,n),0]}});var GS,YS;if(typeof WeakMap<"u"){let n=new WeakMap;GS=e=>n.get(e),YS=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;GS=i=>{for(let r=0;r(10==t&&(t=0),n[t++]=i,n[t++]=r)}var Wn=class{constructor(n,e,t,i){this.width=n,this.height=e,this.map=t,this.problems=i}findCell(n){for(let e=0;ei&&(o+=c.attrs.colspan)}}for(let s=0;s1&&(t=!0)}-1==e?e=o:e!=o&&(e=Math.max(e,o))}return e}(n),t=n.childCount,i=[];let r=0,o=null;const s=[];for(let c=0,u=e*t;c=t){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:y-w});break}const _=r+w*e;for(let N=0;N0;e--)if("row"==n.node(e).type.spec.tableRole)return n.node(0).resolve(n.before(e+1));return null}function ms(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return!0;return!1}function u0(n){const e=n.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;const t=Gh(e.$head)||function lge(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const i=e.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const i=e.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(t-e.nodeSize)}}(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function qS(n){return"row"==n.parent.type.spec.tableRole&&!!n.nodeAfter}function KS(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function Mz(n,e,t){const i=n.node(-1),r=Wn.get(i),o=n.start(-1),s=r.nextCell(n.pos-o,e,t);return null==s?null:n.node(0).resolve(o+s)}function bu(n,e,t=1){const i={...n,colspan:n.colspan-t};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(e,t),i.colwidth.some(r=>r>0)||(i.colwidth=null)),i}function Tz(n,e,t=1){const i={...n,colspan:n.colspan+t};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let r=0;rc!=e.pos-r);a.unshift(e.pos-r);const l=a.map(c=>{const u=t.nodeAt(c);if(!u)throw RangeError(`No cell with offset ${c} found`);const d=r+c+1;return new bj(s.resolve(d),s.resolve(d+u.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=n,this.$headCell=e}map(n,e){const t=n.resolve(e.map(this.$anchorCell.pos)),i=n.resolve(e.map(this.$headCell.pos));if(qS(t)&&qS(i)&&KS(t,i)){const r=this.$anchorCell.node(-1)!=t.node(-1);return r&&this.isRowSelection()?en.rowSelection(t,i):r&&this.isColSelection()?en.colSelection(t,i):new en(t,i)}return it.between(t,i)}content(){const n=this.$anchorCell.node(-1),e=Wn.get(n),t=this.$anchorCell.start(-1),i=e.rectBetween(this.$anchorCell.pos-t,this.$headCell.pos-t),r={},o=[];for(let a=i.top;a0||m>0){let g=f.attrs;if(p>0&&(g=bu(g,0,p)),m>0&&(g=bu(g,g.colspan-m,m)),h.lefti.bottom){const g={...f.attrs,rowspan:Math.min(h.bottom,i.bottom)-Math.max(h.top,i.top)};f=h.top0)&&Math.max(n+this.$anchorCell.nodeAfter.attrs.rowspan,e+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(n,e=n){const t=n.node(-1),i=Wn.get(t),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(e.pos-r),a=n.node(0);return o.top<=s.top?(o.top>0&&(n=a.resolve(r+i.map[o.left])),s.bottom0&&(e=a.resolve(r+i.map[s.left])),o.bottom0)&&Math.max(i+this.$anchorCell.nodeAfter.attrs.colspan,r+this.$headCell.nodeAfter.attrs.colspan)==e.width}eq(n){return n instanceof en&&n.$anchorCell.pos==this.$anchorCell.pos&&n.$headCell.pos==this.$headCell.pos}static rowSelection(n,e=n){const t=n.node(-1),i=Wn.get(t),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(e.pos-r),a=n.node(0);return o.left<=s.left?(o.left>0&&(n=a.resolve(r+i.map[o.top*i.width])),s.right0&&(e=a.resolve(r+i.map[s.top*i.width])),o.right{e.push(Ei.node(i,i+t.nodeSize,{class:"selectedCell"}))}),Ln.create(n.doc,e)}var mge=new rn("fix-tables");function Ez(n,e,t,i){const r=n.childCount,o=e.childCount;e:for(let s=0,a=0;s{"table"==r.type.spec.tableRole&&(t=function gge(n,e,t,i){const r=Wn.get(e);if(!r.problems)return i;i||(i=n.tr);const o=[];for(let l=0;l0){let f="cell";u.firstChild&&(f=u.firstChild.type.spec.tableRole);const p=[];for(let g=0;ge.width)for(let d=0,h=0;de.height){const d=[];for(let p=0,m=(e.height-1)*e.width;p=e.width)&&t.nodeAt(e.map[m+p]).type==l.header_cell;d.push(g?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,le.from(d)),f=[];for(let p=e.height;p{if(!r)return!1;const o=t.selection;if(o instanceof en)return d0(t,i,nt.near(o.$headCell,e));if("horiz"!=n&&!o.empty)return!1;const s=kz(r,n,e);if(null==s)return!1;if("horiz"==n)return d0(t,i,nt.near(t.doc.resolve(o.head+e),e));{const a=t.doc.resolve(s),l=Mz(a,n,e);let c;return c=l?nt.near(l,1):e<0?nt.near(t.doc.resolve(a.before(-1)),-1):nt.near(t.doc.resolve(a.after(-1)),1),d0(t,i,c)}}}function f0(n,e){return(t,i,r)=>{if(!r)return!1;const o=t.selection;let s;if(o instanceof en)s=o;else{const l=kz(r,n,e);if(null==l)return!1;s=new en(t.doc.resolve(l))}const a=Mz(s.$headCell,n,e);return!!a&&d0(t,i,new en(s.$anchorCell,a))}}function p0(n,e){const t=n.selection;if(!(t instanceof en))return!1;if(e){const i=n.tr,r=ur(n.schema).cell.createAndFill().content;t.forEachCell((o,s)=>{o.content.eq(r)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new we(r,0,0))}),i.docChanged&&e(i)}return!0}function Cge(n,e){const i=Gh(n.state.doc.resolve(e));return!!i&&(n.dispatch(n.state.tr.setSelection(new en(i))),!0)}function Dge(n,e,t){if(!ms(n.state))return!1;let i=function yge(n){if(!n.size)return null;let{content:e,openStart:t,openEnd:i}=n;for(;1==e.childCount&&(t>0&&i>0||"table"==e.child(0).type.spec.tableRole);)t--,i--,e=e.child(0).content;const r=e.child(0),o=r.type.spec.tableRole,s=r.type.schema,a=[];if("row"==o)for(let l=0;l=0;s--){const{rowspan:a,colspan:l}=o.child(s).attrs;for(let c=r;c=e.length&&e.push(le.empty),t[r]i&&(h=h.type.createChecked(bu(h.attrs,h.attrs.colspan,u+h.attrs.colspan-i),h.content)),c.push(h),u+=h.attrs.colspan;for(let f=1;fr&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,r-d.attrs.rowspan)},d.content)),l.push(d)}o.push(le.from(l))}t=o,e=r}return{width:n,height:e,rows:t}}(i,a.right-a.left,a.bottom-a.top),Az(n.state,n.dispatch,s,a,i),!0}if(i){const o=u0(n.state),s=o.start(-1);return Az(n.state,n.dispatch,s,Wn.get(o.node(-1)).findCell(o.pos-s),i),!0}return!1}function Mge(n,e){var t;if(e.ctrlKey||e.metaKey)return;const i=Nz(n,e.target);let r;if(e.shiftKey&&n.state.selection instanceof en)o(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&i&&null!=(r=Gh(n.state.selection.$anchor))&&(null==(t=ZS(n,e))?void 0:t.pos)!=r.pos)o(r,e),e.preventDefault();else if(!i)return;function o(l,c){let u=ZS(n,c);const d=null==Bl.getState(n.state);if(!u||!KS(l,u)){if(!d)return;u=l}const h=new en(l,u);if(d||!n.state.selection.eq(h)){const f=n.state.tr.setSelection(h);d&&f.setMeta(Bl,l.pos),n.dispatch(f)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",a),null!=Bl.getState(n.state)&&n.dispatch(n.state.tr.setMeta(Bl,-1))}function a(l){const c=l,u=Bl.getState(n.state);let d;if(null!=u)d=n.state.doc.resolve(u);else if(Nz(n,c.target)!=i&&(d=ZS(n,e),!d))return s();d&&o(d,c)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",a)}function kz(n,e,t){if(!(n.state.selection instanceof it))return null;const{$head:i}=n.state.selection;for(let r=i.depth-1;r>=0;r--){const o=i.node(r);if((t<0?i.index(r):i.indexAfter(r))!=(t<0?0:o.childCount))return null;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){const a=i.before(r);return n.endOfTextblock("vert"==e?t>0?"down":"up":t>0?"right":"left")?a:null}}return null}function Nz(n,e){for(;e&&e!=n.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function ZS(n,e){const t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?Gh(n.state.doc.resolve(t.pos)):null}var Tge=class{constructor(n,e){this.node=n,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),JS(n,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type==this.node.type&&(this.node=n,JS(n,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(n){return"attributes"==n.type&&(n.target==this.table||this.colgroup.contains(n.target))}};function JS(n,e,t,i,r,o){var s;let a=0,l=!0,c=e.firstChild;const u=n.firstChild;if(u){for(let d=0,h=0;d(r.spec.props.nodeViews[ur(s.schema).table.name]=(a,l)=>new t(a,e,l),new m0(-1,!1)),apply:(o,s)=>s.apply(o)},props:{attributes:o=>{const s=Wo.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{!function Ege(n,e,t,i,r){const o=Wo.getState(n.state);if(o&&!o.dragging){const s=function Age(n){for(;n&&"TD"!=n.nodeName&&"TH"!=n.nodeName;)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}(e.target);let a=-1;if(s){const{left:l,right:c}=s.getBoundingClientRect();e.clientX-l<=t?a=Pz(n,e,"left"):c-e.clientX<=t&&(a=Pz(n,e,"right"))}if(a!=o.activeHandle){if(!r&&-1!==a){const l=n.state.doc.resolve(a),c=l.node(-1),u=Wn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}Rz(n,a)}}}(o,s,n,0,i)},mouseleave:o=>{!function xge(n){const e=Wo.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&Rz(n,-1)}(o)},mousedown:(o,s)=>{!function Ige(n,e,t){const i=Wo.getState(n.state);if(!i||-1==i.activeHandle||i.dragging)return!1;const r=n.state.doc.nodeAt(i.activeHandle),o=function Oge(n,e,{colspan:t,colwidth:i}){const r=i&&i[i.length-1];if(r)return r;const o=n.domAtPos(e);let a=o.node.childNodes[o.offset].offsetWidth,l=t;if(i)for(let c=0;c{const s=Wo.getState(o);if(s&&s.activeHandle>-1)return function Lge(n,e){const t=[],i=n.doc.resolve(e),r=i.node(-1);if(!r)return Ln.empty;const o=Wn.get(r),s=i.start(-1),a=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan;for(let l=0;l-1&&n.docChanged){let i=n.mapping.map(e.activeHandle,-1);return qS(n.doc.resolve(i))||(i=-1),new m0(i,e.dragging)}return e}};function Pz(n,e,t){const i=n.posAtCoords({left:e.clientX,top:e.clientY});if(!i)return-1;const{pos:r}=i,o=Gh(n.state.doc.resolve(r));if(!o)return-1;if("right"==t)return o.pos;const s=Wn.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function Lz(n,e,t){return Math.max(t,n.startWidth+(e.clientX-n.startX))}function Rz(n,e){n.dispatch(n.state.tr.setMeta(Wo,{setHandle:e}))}function Pge(n){return Array(n).fill(0)}function Qs(n){const e=n.selection,t=u0(n),i=t.node(-1),r=t.start(-1),o=Wn.get(i);return{...e instanceof en?o.rectBetween(e.$anchorCell.pos-r,e.$headCell.pos-r):o.findCell(t.pos-r),tableStart:r,map:o,table:i}}function Fz(n,{map:e,tableStart:t,table:i},r){let o=r>0?-1:0;(function uge(n,e,t){const i=ur(e.type.schema).header_cell;for(let r=0;r0&&r0&&e.map[a-1]==l||r0?-1:0;(function Vge(n,e,t){var i;const r=ur(e.type.schema).header_cell;for(let o=0;o0&&r0&&u==e.map[c-e.width]){const d=t.nodeAt(u).attrs;n.setNodeMarkup(n.mapping.slice(a).map(u+i),null,{...d,rowspan:d.rowspan-1}),l+=d.colspan-1}else if(r0&&t[o]==t[o-1]||i.right0&&t[r]==t[r-n]||i.bottom{var i;const r=e.selection;let o,s;if(r instanceof en){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{if(o=function age(n){for(let e=n.depth;e>0;e--){const t=n.node(e).type.spec.tableRole;if("cell"===t||"header_cell"===t)return n.node(e)}return null}(r.$from),!o)return!1;s=null==(i=Gh(r.$from))?void 0:i.pos}if(null==o||null==s||1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(t){let a=o.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const u=Qs(e),d=e.tr;for(let f=0;ft[i.type.spec.tableRole])(n,e)}function Uz(n,e,t){const i=e.map.cellsInRect({left:0,top:0,right:"row"==n?e.map.width:1,bottom:"column"==n?e.map.height:1});for(let r=0;rr.table.nodeAt(l));for(let l=0;l{const p=f+o.tableStart,m=s.doc.nodeAt(p);m&&s.setNodeMarkup(p,h,m.attrs)}),i(s)}return!0}}fg("row",{useDeprecatedLogic:!0}),fg("column",{useDeprecatedLogic:!0});var Kge=fg("cell",{useDeprecatedLogic:!0});function Hz(n){return function(e,t){if(!ms(e))return!1;const i=function Qge(n,e){if(e<0){const t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let i=n.index(-1)-1,r=n.before();i>=0;i--){const o=n.node(-1).child(i),s=o.lastChild;if(s)return r-1-s.nodeSize;r-=o.nodeSize}}else{if(n.index()null,apply(e,t){const i=e.getMeta(Bl);if(null!=i)return-1==i?null:i;if(null==t||!e.docChanged)return t;const{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:dge,handleDOMEvents:{mousedown:Mge},createSelectionBetween:e=>null!=Bl.getState(e.state)?e.state.selection:null,handleTripleClick:Cge,handleKeyDown:wge,handlePaste:Dge},appendTransaction:(e,t,i)=>function pge(n,e,t){const i=(e||n).selection,r=(e||n).doc;let o,s;if(i instanceof Ye&&(s=i.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)o=en.create(r,i.from);else if("row"==s){const a=r.resolve(i.from+1);o=en.rowSelection(a,a)}else if(!t){const a=Wn.get(i.node),l=i.from+1;o=en.create(r,l+1,l+a.map[a.width*a.height-1])}}else i instanceof it&&function hge({$from:n,$to:e}){if(n.pos==e.pos||n.pos=0&&!(n.after(r+1)=0&&!(e.before(o+1)>e.start(o));o--,i--);return t==i&&/row|table/.test(n.node(r).type.spec.tableRole)}(i)?o=it.create(r,i.from):i instanceof it&&function fge({$from:n,$to:e}){let t,i;for(let r=n.depth;r>0;r--){const o=n.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){t=o;break}}for(let r=e.depth;r>0;r--){const o=e.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){i=o;break}}return t!==i&&0===e.parentOffset}(i)&&(o=it.create(r,i.$from.start(),i.$from.end()));return o&&(e||(e=n.tr)).setSelection(o),e}(i,xz(i,t),n)})}function $z(n,e,t,i,r,o){let s=0,a=!0,l=e.firstChild;const c=n.firstChild;for(let u=0,d=0;u{const{selection:e}=n.state;if(!function nye(n){return n instanceof en}(e))return!1;let t=0;return l5(e.ranges[0].$from,o=>"table"===o.type.name)?.node.descendants(o=>{if("table"===o.type.name)return!1;["tableCell","tableHeader"].includes(o.type.name)&&(t+=1)}),t===e.ranges.length&&(n.commands.deleteTable(),!0)},iye=Rn.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Xge,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:n}){return["table",Xt(this.options.HTMLAttributes,n),["tbody",0]]},addCommands:()=>({insertTable:({rows:n=3,cols:e=3,withHeaderRow:t=!0}={})=>({tr:i,dispatch:r,editor:o})=>{const s=function tye(n,e,t,i,r){const o=function eye(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const e={};return Object.keys(n.nodes).forEach(t=>{const i=n.nodes[t];i.spec.tableRole&&(e[i.spec.tableRole]=i)}),n.cached.tableNodeTypes=e,e}(n),s=[],a=[];for(let c=0;c({state:n,dispatch:e})=>function Rge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n);e(Fz(n.tr,t,t.left))}return!0}(n,e),addColumnAfter:()=>({state:n,dispatch:e})=>function Fge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n);e(Fz(n.tr,t,t.right))}return!0}(n,e),deleteColumn:()=>({state:n,dispatch:e})=>function zge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n),i=n.tr;if(0==t.left&&t.right==t.map.width)return!1;for(let r=t.right-1;jge(i,t,r),r!=t.left;r--){const o=t.tableStart?i.doc.nodeAt(t.tableStart-1):i.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=Wn.get(o)}e(i)}return!0}(n,e),addRowBefore:()=>({state:n,dispatch:e})=>function Bge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n);e(jz(n.tr,t,t.top))}return!0}(n,e),addRowAfter:()=>({state:n,dispatch:e})=>function Uge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n);e(jz(n.tr,t,t.bottom))}return!0}(n,e),deleteRow:()=>({state:n,dispatch:e})=>function $ge(n,e){if(!ms(n))return!1;if(e){const t=Qs(n),i=n.tr;if(0==t.top&&t.bottom==t.map.height)return!1;for(let r=t.bottom-1;Hge(i,t,r),r!=t.top;r--){const o=t.tableStart?i.doc.nodeAt(t.tableStart-1):i.doc;if(!o)throw RangeError("No table found");t.table=o,t.map=Wn.get(t.table)}e(i)}return!0}(n,e),deleteTable:()=>({state:n,dispatch:e})=>function Zge(n,e){const t=n.selection.$anchor;for(let i=t.depth;i>0;i--)if("table"==t.node(i).type.spec.tableRole)return e&&e(n.tr.delete(t.before(i),t.after(i)).scrollIntoView()),!0;return!1}(n,e),mergeCells:()=>({state:n,dispatch:e})=>Vz(n,e),splitCell:()=>({state:n,dispatch:e})=>Bz(n,e),toggleHeaderColumn:()=>({state:n,dispatch:e})=>fg("column")(n,e),toggleHeaderRow:()=>({state:n,dispatch:e})=>fg("row")(n,e),toggleHeaderCell:()=>({state:n,dispatch:e})=>Kge(n,e),mergeOrSplit:()=>({state:n,dispatch:e})=>!!Vz(n,e)||Bz(n,e),setCellAttribute:(n,e)=>({state:t,dispatch:i})=>function Yge(n,e){return function(t,i){if(!ms(t))return!1;const r=u0(t);if(r.nodeAfter.attrs[n]===e)return!1;if(i){const o=t.tr;t.selection instanceof en?t.selection.forEachCell((s,a)=>{s.attrs[n]!==e&&o.setNodeMarkup(a,null,{...s.attrs,[n]:e})}):o.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[n]:e}),i(o)}return!0}}(n,e)(t,i),goToNextCell:()=>({state:n,dispatch:e})=>Hz(1)(n,e),goToPreviousCell:()=>({state:n,dispatch:e})=>Hz(-1)(n,e),fixTables:()=>({state:n,dispatch:e})=>(e&&xz(n),!0),setCellSelection:n=>({tr:e,dispatch:t})=>{if(t){const i=en.create(e.doc,n.anchorCell,n.headCell);e.setSelection(i)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:g0,"Mod-Backspace":g0,Delete:g0,"Mod-Delete":g0}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Sge({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Jge({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema:n=>({tableRole:bt(Ve(n,"tableRole",{name:n.name,options:n.options,storage:n.storage}))})});class pg{}pg.\u0275fac=function(e){return new(e||pg)},pg.\u0275cmp=xe({type:pg,selectors:[["dot-drag-handler"]],decls:2,vars:0,consts:[[1,"material-icons"]],template:function(e,t){1&e&&(I(0,"i",0),Te(1,"drag_indicator"),A())},styles:["[_nghost-%COMP%]{position:absolute;cursor:grab;z-index:1;opacity:0;color:var(--color-palette-primary-800);transition:opacity .25s,top .15s;pointer-events:none}.visible[_nghost-%COMP%]{opacity:1;pointer-events:auto}"]});const oye=n=>vn.create({name:"dragHandler",addProseMirrorPlugins(){let e=null;const r=n.createComponent(pg).location.nativeElement;function s(m){m&&m.parentNode&&m.parentNode.removeChild(m)}function c(m){for(;m&&m.parentNode&&!m.classList?.contains("ProseMirror")&&!m.parentNode.classList?.contains("ProseMirror");)m=m.parentNode;return m}function h(){r.classList.remove("visible")}return[new $t({key:new rn("dragHandler"),view:m=>(requestAnimationFrame(()=>function d(m){r.setAttribute("draggable","true"),r.addEventListener("dragstart",g=>function l(m,g){if(!m.dataTransfer)return;const v=function a(m,g){const y=g.posAtCoords(m);if(y){const v=c(g.nodeDOM(y.inside));if(v&&1===v.nodeType){const w=g.docView.nearestDesc(v,!0);if(w&&w!==g.docView)return w.posBefore}}return null}({left:m.clientX+50,top:m.clientY},g);if(null!=v){g.dispatch(g.state.tr.setSelection(Ye.create(g.state.doc,v)));const w=g.state.selection.content();m.dataTransfer.clearData(),m?.dataTransfer?.setDragImage(e,10,10),g.dragging={slice:w,move:!0}}}(g,m)),r.classList.remove("visible"),m.dom.parentElement.appendChild(r)}(m)),document.body.addEventListener("scroll",h,!0),{destroy(){s(r),document.body.removeEventListener("scroll",h,!0)}}),props:{handleDOMEvents:{drop:(m,g)=>"TABLE"===c(g.target).nodeName||(requestAnimationFrame(()=>{(function p(){document.querySelector(".ProseMirror-hideselection")?.classList.remove("ProseMirror-hideselection"),r.classList.remove("visible")})(),S5(m),"TABLE"===e.nodeName&&s(e)}),!1),mousemove(m,g){const v=m.posAtCoords({left:g.clientX+50,top:g.clientY});if(v&&function u(m,g){const y=m.nodeDOM(g);return!(!y?.hasChildNodes()||1===y.childNodes.length&&"BR"==y.childNodes[0].nodeName)}(m,v.inside))if(e=c(m.nodeDOM(v.inside)),function f(m){return m&&!m.classList?.contains("ProseMirror")&&!m.innerText.startsWith("/")}(e)){const{top:w,left:_}=function o(m,g){return{top:g.getBoundingClientRect().top-m.getBoundingClientRect().top,left:g.getBoundingClientRect().left-m.getBoundingClientRect().left}}(m.dom.parentElement,e);r.style.left=_-25+"px",r.style.top=w<0?0:w+"px",r.classList.add("visible")}else r.classList.remove("visible");else e=null,r.classList.remove("visible");return!1}}}})]}}),sye=function(n){return{completed:n}};function aye(n,e){if(1&n){const t=Qe();I(0,"button",2),de("click",function(){return ge(t),ye(M().byClick.emit())}),A()}if(2&n){const t=M();b("disabled",t.isCompleted||t.isLoading)("icon",t.isCompleted?"pi pi-check":null)("label",t.title)("loading",t.isLoading)("ngClass",xt(5,sye,t.isCompleted))}}function lye(n,e){1&n&&(I(0,"div",3),_e(1,"i",4),I(2,"span"),Te(3,"Something went wrong, please try again later or "),I(4,"a",5),Te(5," contact support "),A()()())}class mg{constructor(){this.label="",this.isLoading=!1,this.byClick=new re,this.status=Rl}get title(){return this.label?this.label[0].toUpperCase()+this.label?.substring(1).toLowerCase():""}get isCompleted(){return this.label===this.status.COMPLETED}}mg.\u0275fac=function(e){return new(e||mg)},mg.\u0275cmp=xe({type:mg,selectors:[["dot-floating-button"]],inputs:{label:"label",isLoading:"isLoading"},outputs:{byClick:"byClick"},decls:3,vars:2,consts:[["pButton","","iconPos","left",3,"disabled","icon","label","loading","ngClass","click",4,"ngIf","ngIfElse"],["error",""],["pButton","","iconPos","left",3,"disabled","icon","label","loading","ngClass","click"],[1,"alert"],[1,"pi","pi-exclamation-circle"],["href","https://www.dotcms.com/contact-us/"]],template:function(e,t){if(1&e&&(E(0,aye,1,7,"button",0),E(1,lye,6,0,"ng-template",null,1,Bn)),2&e){const i=Cn(2);b("ngIf",t.label!==t.status.ERROR)("ngIfElse",i)}},dependencies:[yi,nn,ds],styles:["[_nghost-%COMP%] .p-button-label{text-transform:unset}[_nghost-%COMP%] .p-button{display:inline-block}[_nghost-%COMP%] .p-button:enabled:hover, [_nghost-%COMP%] .p-button:enabled:active, [_nghost-%COMP%] .p-button:enabled:focus{background:var(--color-palette-primary-500)}[_nghost-%COMP%] .p-button:disabled{background-color:#000!important;color:#fff!important;opacity:1}[_nghost-%COMP%] .p-button.completed{background:var(--color-palette-primary-500)!important}.alert[_ngcontent-%COMP%]{background:#ffffff;color:#d82b2e;border:1px solid #d82b2e;border-radius:.125rem;padding:10px;display:flex;align-items:center;justify-content:center;gap:5px}.alert[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#d82b2e}"]});const uye=n=>new $t({key:n.pluginKey,view:e=>new dye({view:e,...n})});class dye{constructor({dotUploadFileService:e,editor:t,component:i,element:r,view:o}){this.preventHide=!1,this.$destroy=new se,this.initialLabel="Import to dotCMS",this.offset=10,this.editor=t,this.element=r,this.view=o,this.component=i,this.dotUploadFileService=e,this.component.instance.byClick.pipe(Tn(this.$destroy)).subscribe(()=>this.uploadImagedotCMS()),this.element.remove(),this.element.style.visibility="visible"}update(e,t){const{state:i,composing:r}=e,{doc:o,selection:s}=i,{empty:a,ranges:l}=s,c=t&&t.doc.eq(o)&&t.selection.eq(s);if(r||c||this.preventHide)return void(this.preventHide=!1);const u=Math.min(...l.map(g=>g.$from.pos)),d=o.nodeAt(u)?.type.name,h=this.editor.getAttributes(Jr.name);if(a||d!==Jr.name||h?.data)return void this.hide();const p=e.nodeDOM(u),m=p.querySelector("img");this.imageUrl=h?.src,this.updateButtonLabel(this.initialLabel),this.createTooltip(),this.tippy?.setProps({maxWidth:m?.width-this.offset||250,getReferenceClientRect:()=>(({viewCoords:n,nodeCoords:e})=>{const{bottom:i,left:r,top:o}=e,{bottom:s}=n,l=Math.ceil(s-i)<0?s:o-65,c=othis.updateButtonLabel(e)}).pipe(Tt(1),Mn(()=>this.updateButtonLoading(!1))).subscribe(e=>{const t=e[0];this.updateButtonLabel(Rl.COMPLETED),this.updateImageNode(t[Object.keys(t)[0]])},()=>{this.updateButtonLoading(!1),this.updateButtonLabel(Rl.ERROR),this.setPreventHide()})}updateButtonLabel(e){this.component.instance.label=e,this.component.changeDetectorRef.detectChanges()}updateButtonLoading(e){this.component.instance.isLoading=e,this.component.changeDetectorRef.detectChanges()}}const hye=new rn("floating-button");function fye(n,e){const t=e.createComponent(mg),i=t.location.nativeElement,r=n.get(Ys);return vn.create({addProseMirrorPlugins(){return i?[uye({...this.options,dotUploadFileService:r,component:t,pluginKey:hye,editor:this.editor,element:i})]:[]}})}const gg=new rn("freeze-scroll"),pye=vn.create({name:"freezeScroll",addCommands:()=>({freezeScroll:n=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(gg,{freezeScroll:n}),!0)).run()}),addProseMirrorPlugins:()=>[mye]}),mye=new $t({key:gg,state:{init:()=>({freezeScroll:!1}),apply(n,e,t){const{freezeScroll:i}=n.getMeta(gg)||{},r=gg?.getState(t);return"boolean"==typeof i?{freezeScroll:i}:r||e}}});function Gz(n){return!!n&&(n instanceof Se||"function"==typeof n.lift&&"function"==typeof n.subscribe)}function XS(...n){return e=>{let t;return"function"==typeof n[n.length-1]&&(t=n.pop()),e.lift(new gye(n,t))}}class gye{constructor(e,t){this.observables=e,this.project=t}call(e,t){return t.subscribe(new yye(e,this.observables,this.project))}}class yye extends vR{constructor(e,t,i){super(e),this.observables=t,this.project=i,this.toRespond=[];const r=t.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(e){if(0===this.toRespond.length){const t=[e,...this.values];this.project?this._tryProject(t):this.destination.next(t)}}_tryProject(e){let t;try{t=this.project.apply(this,e)}catch(i){return void this.destination.error(i)}this.destination.next(t)}}class vye{constructor(e,t){this.compare=e,this.keySelector=t}call(e,t){return t.subscribe(new bye(e,this.compare,this.keySelector))}}class bye extends ee{constructor(e,t,i){super(e),this.keySelector=i,this.hasKey=!1,"function"==typeof t&&(this.compare=t)}compare(e,t){return e===t}_next(e){let t;try{const{keySelector:r}=this;t=r?r(e):e}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,t)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=t,this.destination.next(e))}}const Cye=new De("@ngrx/component-store Initial State");let Yz=(()=>{class n{constructor(t){this.destroySubject$=new A_(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new A_(1),this.isInitialized=!1,this.state$=this.select(i=>i),this.\u0275hasProvider=!1,t&&this.initState(t),this.checkProviderForHooks()}ngOnDestroy(){this.stateSubject$.complete(),this.destroySubject$.next()}updater(t){return i=>{let o,r=!0;const a=(Gz(i)?i:Re(i)).pipe(function TY(n,e=0){return function(i){return i.lift(new SY(n,e))}}(aM),Mn(()=>this.assertStateIsInitialized()),XS(this.stateSubject$),ue(([l,c])=>t(c,l)),Mn(l=>this.stateSubject$.next(l)),Ai(l=>r?(o=l,ol):ho(()=>l)),Tn(this.destroy$)).subscribe();if(o)throw o;return r=!1,a}}initState(t){Pr([t],aM).subscribe(i=>{this.isInitialized=!0,this.stateSubject$.next(i)})}setState(t){"function"!=typeof t?this.initState(t):this.updater(t)()}patchState(t){const i="function"==typeof t?t(this.get()):t;this.updater((r,o)=>({...r,...o}))(i)}get(t){let i;return this.assertStateIsInitialized(),this.stateSubject$.pipe(Tt(1)).subscribe(r=>{i=t?t(r):r}),i}select(...t){const{observablesOrSelectorsObject:i,projector:r,config:o}=function Dye(n){const e=Array.from(n);let t={debounce:!1};if(function Mye(n){return typeof n.debounce<"u"}(e[e.length-1])&&(t={...t,...e.pop()}),1===e.length&&"function"!=typeof e[0])return{observablesOrSelectorsObject:e[0],projector:void 0,config:t};const i=e.pop();return{observablesOrSelectorsObject:e,projector:i,config:t}}(t);return(function Tye(n,e){return Array.isArray(n)&&0===n.length&&e}(i,r)?this.stateSubject$:CT(i)).pipe(o.debounce?function wye(){return n=>new Se(e=>{let t,i;const r=new oe;return r.add(n.subscribe({complete:()=>{t&&e.next(i),e.complete()},error:o=>{e.error(o)},next:o=>{i=o,t||(t=rT.schedule(()=>{e.next(i),t=void 0}),r.add(t))}})),r})}():n=>n,r?ue(a=>i.length>0&&Array.isArray(a)?r(...a):r(a)):n=>n,function _ye(n,e){return t=>t.lift(new vye(n,e))}(),v5({refCount:!0,bufferSize:1}),Tn(this.destroy$))}effect(t){const i=new se;return t(i).pipe(Tn(this.destroy$)).subscribe(),r=>(Gz(r)?r:Re(r)).pipe(Tn(this.destroy$)).subscribe(s=>{i.next(s)})}checkProviderForHooks(){rT.schedule(()=>{})}assertStateIsInitialized(){if(!this.isInitialized)throw new Error(`${this.constructor.name} has not been initialized yet. Please make sure it is initialized before updating/getting.`)}}return n.\u0275fac=function(t){return new(t||n)(F(Cye,8))},n.\u0275prov=$({token:n,factory:n.\u0275fac}),n})();class Ul extends Yz{constructor(e){super({prompt:"",loading:!1,content:"",open:!1,acceptContent:!1}),this.dotAiService=e,this.prompt$=this.select(t=>t.prompt),this.content$=this.select(t=>t.content),this.open$=this.select(t=>t.open),this.vm$=this.select(t=>t),this.setOpen=this.updater((t,i)=>({...t,open:i})),this.setAcceptContent=this.updater((t,i)=>({...t,acceptContent:i})),this.generateContent=this.effect(t=>t.pipe(ci(i=>(this.patchState({loading:!0,prompt:i}),this.dotAiService.generateContent(i).pipe(Mn(r=>this.patchState({loading:!1,content:r})),Ai(()=>Re(null)))))))}reGenerateContent(){this.generateContent(this.prompt$)}}Ul.\u0275fac=function(e){return new(e||Ul)(F(jl))},Ul.\u0275prov=$({token:Ul,factory:Ul.\u0275fac,providedIn:"root"});const Sye=["input"];function Eye(n,e){1&n&&(pt(0),I(1,"span",7),Te(2,"Pending"),A(),mt())}function xye(n,e){1&n&&_e(0,"button",8)}function Iye(n,e){if(1&n){const t=Qe();pt(0),I(1,"form",1),de("ngSubmit",function(){return ge(t),ye(M().onSubmit())}),I(2,"span",2),_e(3,"input",3,4),E(5,Eye,3,0,"ng-container",5),E(6,xye,1,0,"ng-template",null,6,Bn),A()(),mt()}if(2&n){const t=e.ngIf,i=Cn(7),r=M();C(1),b("formGroup",r.form),C(2),b("disabled",t.loading),C(2),b("ngIf",t.loading)("ngIfElse",i)}}class yg{constructor(e){this.aiContentPromptStore=e,this.vm$=this.aiContentPromptStore.vm$,this.destroy$=new se,this.form=new Pd({textPrompt:new Rd("",Cc.required)})}ngOnInit(){this.aiContentPromptStore.open$.pipe(Tn(this.destroy$)).subscribe(e=>{e?this.input.nativeElement.focus():this.form.reset()})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onSubmit(){const e=this.form.value.textPrompt;e&&this.aiContentPromptStore.generateContent(e)}}yg.\u0275fac=function(e){return new(e||yg)(O(Ul))},yg.\u0275cmp=xe({type:yg,selectors:[["dot-ai-content-prompt"]],viewQuery:function(e,t){if(1&e&&hn(Sye,5),2&e){let i;Xe(i=et())&&(t.input=i.first)}},decls:2,vars:3,consts:[[4,"ngIf"],["id","ai-text-prompt","autocomplete","off",3,"formGroup","ngSubmit"],[1,"p-input-icon-right"],["formControlName","textPrompt","type","text","pInputText","","autofocus","","placeholder","Ask AI to write something",3,"disabled"],["input",""],[4,"ngIf","ngIfElse"],["submitButton",""],[1,"pending-label"],["pButton","","type","submit","icon","pi pi-send",1,"p-button-rounded","p-button-text"]],template:function(e,t){1&e&&(E(0,Iye,8,4,"ng-container",0),Eo(1,"async")),2&e&&b("ngIf",xo(1,1,t.vm$))},dependencies:[nn,Fd,sl,Dc,kd,Ta,Mc,ds,cg,VD],styles:["form[_ngcontent-%COMP%]{margin:1.5rem}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%]{width:100%;position:relative}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] button[_ngcontent-%COMP%], form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] .pending-label[_ngcontent-%COMP%]{position:absolute;right:0;top:0;bottom:0;margin:auto 0;background:none}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] .pending-label[_ngcontent-%COMP%]{height:-moz-fit-content;height:fit-content;font-size:.625rem;margin-right:.5rem}"],changeDetection:0});const Oye={duration:[500,0],interactive:!0,maxWidth:"100%",trigger:"manual",hideOnClick:!0,placement:"top",popperOptions:{modifiers:[{name:"flip",enabled:!1},{name:"preventOverflow",options:{altAxis:!0}}]}};class Aye{constructor(e){this.destroy$=new se;const{editor:t,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=e;this.editor=t,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.componentStore=this.component.injector.get(Ul),this.componentStore.content$.pipe(Tn(this.destroy$),Un(l=>!!l)).subscribe(l=>{this.editor.chain().closeAIPrompt().deleteSelection().insertAINode(l).openAIContentActions(y0).run()}),this.componentStore.vm$.pipe(Tn(this.destroy$),Un(l=>l.acceptContent)).subscribe(l=>{this.editor.commands.insertContent(l.content),this.componentStore.setAcceptContent(!1)})}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1};i?.open!==r?.open?(i.open||this.componentStore.setOpen(!0),this.createTooltip(),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Bo(e,{...Oye,...this.tippyOptions,content:this.element,onHide:()=>{this.editor.commands.closeAIPrompt()},onShow:i=>{i.popper.style.width="100%"}}))}show(){this.tippy?.show(),this.componentStore.setOpen(!0)}hide(){this.tippy?.hide(),this.componentStore.setOpen(!1),this.editor.view.focus()}destroy(){this.tippy?.destroy(),this.destroy$.next(!0),this.destroy$.complete()}}const kye=n=>new $t({key:n.pluginKey,view:e=>new Aye({view:e,...n}),state:{init:()=>({open:!1}),apply(e,t,i){const{open:r}=e.getMeta(_g)||{},o=_g.getState(i);return"boolean"==typeof r?{open:r}:o||t}}}),y0="dotAITextContent",_g=new rn(y0),Nye=n=>vn.create({name:"aiContentPrompt",addOptions:()=>({element:null,tippyOptions:{},pluginKey:_g}),addCommands:()=>({openAIPrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(_g,{open:!0}),!0)).freezeScroll(!0).run(),closeAIPrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(_g,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const e=n.createComponent(yg);return e.changeDetectorRef.detectChanges(),[kye({pluginKey:this.options.pluginKey,editor:this.editor,element:e.location.nativeElement,tippyOptions:this.options.tippyOptions,component:e})]}});function Pye(n,e){if(1&n&&(I(0,"div",2),_e(1,"i"),Te(2),A()),2&n){const t=e.$implicit;C(1),Dn(t.icon),C(1),Vi(" ",t.label," ")}}var Va=(()=>(function(n){n.ACCEPT="ACCEPT",n.DELETE="DELETE",n.REGENERATE="REGENERATE"}(Va||(Va={})),Va))();class vg{constructor(){this.actionEmitter=new re,this.tooltipContent="Describe the size, color palette, style, mood, etc."}ngOnInit(){this.actionOptions=[{label:"Accept",icon:"pi pi-check",callback:()=>this.emitAction(Va.ACCEPT),selectedOption:!0},{label:"Regenerate",icon:"pi pi-sync",callback:()=>this.emitAction(Va.REGENERATE),selectedOption:!1},{label:"Delete",icon:"pi pi-trash",callback:()=>this.emitAction(Va.DELETE),selectedOption:!1}]}emitAction(e){this.actionEmitter.emit(e)}}vg.\u0275fac=function(e){return new(e||vg)},vg.\u0275cmp=xe({type:vg,selectors:[["dot-ai-content-actions"]],outputs:{actionEmitter:"actionEmitter"},decls:2,vars:1,consts:[[3,"options","onClick"],["pTemplate","item"],[1,"action-content"]],template:function(e,t){1&e&&(I(0,"p-listbox",0),de("onClick",function(r){return r.value.callback()}),E(1,Pye,3,3,"ng-template",1),A()),2&e&&b("options",t.actionOptions)},dependencies:[rr,OL],styles:["[_nghost-%COMP%] .p-listbox{display:block;width:12.5rem;padding:.5rem;margin-left:4rem}[_nghost-%COMP%] .p-listbox li{padding:.75rem 1rem}[_nghost-%COMP%] .p-listbox li:first-child{background-color:var(--color-palette-primary-200)}[_nghost-%COMP%] .p-listbox li:nth-child(2){padding:1rem;background-color:#fff}[_nghost-%COMP%] .p-listbox li:last-child{border-top:1px solid #ebecef;background-color:#fff}[_nghost-%COMP%] .p-listbox li:hover{background-color:var(--color-palette-primary-100)}.action-content[_ngcontent-%COMP%]{display:flex;align-items:center;color:#14151a}.action-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:.25rem;color:#8d92a5}"],changeDetection:0});const Lye={duration:[500,0],interactive:!0,maxWidth:200,trigger:"manual",hideOnClick:!1,placement:"bottom-start",popperOptions:{modifiers:[{name:"preventOverflow",options:{altAxis:!0}}]}};class Rye{constructor(e){this.destroy$=new se;const{editor:t,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=e;this.editor=t,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.aiContentPromptStore=this.component.injector.get(Ul),this.component.instance.actionEmitter.pipe(Tn(this.destroy$)).subscribe(l=>{switch(l){case Va.ACCEPT:this.acceptContent();break;case Va.REGENERATE:this.generateContent();break;case Va.DELETE:this.deleteContent()}}),this.view.dom.addEventListener("keydown",this.handleKeyDown.bind(this))}acceptContent(){const e=this.pluginKey?.getState(this.view.state);this.editor.commands.closeAIContentActions(),e.nodeType===y0&&this.aiContentPromptStore.setAcceptContent(!0)}generateContent(){const e=this.pluginKey?.getState(this.view.state);this.editor.commands.closeAIContentActions(),e.nodeType===y0&&this.aiContentPromptStore.reGenerateContent()}deleteContent(){this.editor.commands.closeAIContentActions(),this.editor.commands.deleteSelection()}handleKeyDown(e){"Backspace"===e.key&&this.editor.commands.closeAIContentActions()}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1};i?.open!==r?.open?(this.createTooltip(),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Bo(e.parentElement,{...Lye,...this.tippyOptions,content:this.element}))}show(){this.tippy?.show()}hide(){this.tippy?.hide(),this.editor.view.focus()}destroy(){this.tippy?.destroy(),this.destroy$.next(!0),this.destroy$.complete(),this.view.dom.removeEventListener("keydown",this.handleKeyDown)}}const Fye=n=>new $t({key:n.pluginKey,view:e=>new Rye({view:e,...n}),state:{init:()=>({open:!1,nodeType:null}),apply(e,t,i){const{open:r,nodeType:o}=e.getMeta(bg)||{},s=bg?.getState(i);return"boolean"==typeof r?{open:r,nodeType:o}:s||t}}}),bg=new rn("aiContentActions-form"),jye=n=>vn.create({name:"aiContentActions",addOptions:()=>({element:null,tippyOptions:{},pluginKey:bg}),addCommands:()=>({openAIContentActions:e=>({chain:t})=>t().command(({tr:i})=>(i.setMeta(bg,{open:!0,nodeType:e}),!0)).freezeScroll(!0).run(),closeAIContentActions:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(bg,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const e=n.createComponent(vg);return e.changeDetectorRef.detectChanges(),[Fye({pluginKey:this.options.pluginKey,editor:this.editor,element:e.location.nativeElement,tippyOptions:this.options.tippyOptions,component:e})]}});function zye(n,e){if(1&n){const t=Qe();I(0,"form",17),de("ngSubmit",function(){return ge(t),ye(M().onSubmit())}),I(1,"div",18),_e(2,"textarea",19),A(),I(3,"div",20),_e(4,"p-button",21),A()()}2&n&&b("formGroup",M().form)}function Vye(n,e){if(1&n){const t=Qe();I(0,"form",17),de("ngSubmit",function(){return ge(t),ye(M().onSubmit())}),I(1,"div",18),_e(2,"textarea",22),A(),I(3,"div",20),_e(4,"p-button",23),A()()}2&n&&b("formGroup",M().form)}const Kz=function(){return{"background-color":"white",color:"#426BF0",height:"unset",width:"unset",padding:"0",margin:"0",outline:"none"}};class wg{constructor(e,t){this.fb=e,this.aiContentService=t,this.form=this.fb.group({promptGenerate:["",Cc.required],promptAutoGenerate:["",Cc.required]}),this.isFormSubmitting=!1,this.showFormOne=!0,this.showFormTwo=!1,this.formSubmission=new re,this.aiResponse=new re}onSubmit(){this.isFormSubmitting=!0;const i=`${this.form.value.promptGenerate} ${this.form.value.promptAutoGenerate}`;this.isFormSubmitting=!1,this.formSubmission.emit(!0),prompt&&this.aiContentService.generateImage(i).pipe(Ai(()=>Re(null)),ci(r=>r?this.aiContentService.createAndPublishContentlet(r):Re(null))).subscribe(r=>{this.aiResponse.emit(r)})}openFormOne(){this.showFormOne=!0,this.showFormTwo=!1}openFormTwo(){this.showFormTwo=!0,this.showFormOne=!1}cleanForm(){this.form.reset(),this.showFormOne=!0,this.showFormTwo=!1}}wg.\u0275fac=function(e){return new(e||wg)(O(G_),O(jl))},wg.\u0275cmp=xe({type:wg,selectors:[["dot-ai-image-prompt"]],outputs:{formSubmission:"formSubmission",aiResponse:"aiResponse"},decls:30,vars:8,consts:[[1,"ai-image-dialog"],[1,"title"],[1,"choice-div-container"],[1,"choice-div",3,"click"],[1,"icon-wrapper"],["width","40","height","40","viewBox","0 0 40 40","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.02857 11C3.69491 11 2.41587 11.5234 1.47283 12.455C0.529794 13.3866 0 14.6502 0 15.9677V34.0323C0 35.3498 0.529794 36.6133 1.47283 37.545C2.41587 38.4766 3.69491 39 5.02857 39H26.9714C28.3051 39 29.5841 38.4766 30.5272 37.545C31.4702 36.6133 32 35.3498 32 34.0323V34L32 33.4L29.2571 30.7626L24.2834 25.849C24.1534 25.7117 23.994 25.6048 23.8169 25.5361C23.6397 25.4673 23.4493 25.4385 23.2594 25.4516C23.0674 25.4627 22.8795 25.5115 22.7068 25.5952C22.5341 25.679 22.38 25.796 22.2537 25.9394L19.8949 28.7394L11.4834 20.4297C11.3595 20.2996 11.209 20.1969 11.042 20.1284C10.8749 20.0598 10.6951 20.0271 10.5143 20.0323C10.3222 20.0433 10.1343 20.0921 9.96162 20.1759C9.78891 20.2596 9.63488 20.3766 9.50857 20.52L2.74286 28.4865V15.9677C2.74286 15.3689 2.98367 14.7945 3.41233 14.371C3.84098 13.9476 4.42236 13.7097 5.02857 13.7097H14.2194V12.3548V11H5.02857ZM2.74316 34.0326V32.7139L10.606 23.3926L18.1397 30.8352L13.5317 36.2545H5.02888C4.42895 36.2546 3.85305 36.0217 3.42543 35.606C2.99781 35.1903 2.75276 34.6252 2.74316 34.0326ZM17.0975 36.2906L23.406 28.8119L29.166 34.5023C29.0649 35.0045 28.7913 35.4568 28.3914 35.7827C27.9916 36.1086 27.4901 36.288 26.9717 36.2906H22.0346H17.0975Z","fill","#8D92A5"],["d","M28.6935 19.2671L22.8007 21.0668C22.6478 21.1134 22.5136 21.2101 22.4181 21.3425C22.3227 21.4749 22.2711 21.6357 22.2711 21.8011C22.2711 21.9664 22.3227 22.1273 22.4181 22.2597C22.5136 22.392 22.6478 22.4887 22.8007 22.5353L28.6935 24.3351L30.4277 30.4505C30.4726 30.6091 30.5658 30.7484 30.6933 30.8474C30.8209 30.9465 30.9759 31 31.1352 31C31.2945 31 31.4495 30.9465 31.577 30.8474C31.7045 30.7484 31.7977 30.6091 31.8427 30.4505L33.5776 24.3351L39.4704 22.5353C39.6233 22.4887 39.7575 22.392 39.8529 22.2597C39.9484 22.1273 40 21.9664 40 21.8011C40 21.6357 39.9484 21.4749 39.8529 21.3425C39.7575 21.2101 39.6233 21.1134 39.4704 21.0668L33.5776 19.2671L31.8427 13.1517C31.7978 12.993 31.7046 12.8538 31.577 12.7547C31.4495 12.6556 31.2945 12.6021 31.1352 12.6021C30.9759 12.6021 30.8208 12.6556 30.6933 12.7547C30.5658 12.8538 30.4726 12.993 30.4277 13.1517L28.6935 19.2671Z","fill","#7042F0"],["d","M35.9026 8.29011L39.0994 7.31284C39.2522 7.26623 39.3864 7.16951 39.4819 7.03716C39.5773 6.9048 39.6289 6.74394 39.6289 6.57862C39.6289 6.41331 39.5773 6.25244 39.4819 6.12008C39.3864 5.98773 39.2522 5.89101 39.0994 5.8444L35.9026 4.8679L34.9609 1.54959C34.916 1.39096 34.8228 1.25169 34.6953 1.15262C34.5677 1.05354 34.4127 1 34.2534 1C34.0941 1 33.9391 1.05354 33.8115 1.15262C33.684 1.25169 33.5908 1.39096 33.5459 1.54959L32.6049 4.8679L29.4075 5.8444C29.2546 5.891 29.1204 5.98771 29.025 6.12006C28.9295 6.25241 28.8779 6.41329 28.8779 6.57862C28.8779 6.74395 28.9295 6.90483 29.025 7.03718C29.1204 7.16953 29.2546 7.26624 29.4075 7.31284L32.6049 8.29011L33.5459 11.6076C33.5908 11.7663 33.684 11.9056 33.8115 12.0046C33.9391 12.1037 34.0941 12.1572 34.2534 12.1572C34.4127 12.1572 34.5677 12.1037 34.6953 12.0046C34.8228 11.9056 34.916 11.7663 34.9609 11.6076L35.9026 8.29011Z","fill","#7042F0"],["d","M19.6845 9.67937L16.459 11.0447C16.3233 11.1021 16.2072 11.2002 16.1254 11.3265C16.0437 11.4527 16 11.6014 16 11.7535C16 11.9056 16.0437 12.0542 16.1254 12.1805C16.2072 12.3067 16.3233 12.4048 16.459 12.4623L19.6845 13.8276L21.0001 17.175C21.0555 17.3159 21.1501 17.4364 21.2717 17.5212C21.3934 17.606 21.5366 17.6514 21.6832 17.6514C21.8297 17.6514 21.973 17.606 22.0946 17.5212C22.2163 17.4364 22.3108 17.3159 22.3662 17.175L23.6818 13.8276L26.9067 12.4623C27.0424 12.4048 27.1585 12.3067 27.2402 12.1805C27.322 12.0542 27.3656 11.9056 27.3656 11.7535C27.3656 11.6014 27.322 11.4527 27.2402 11.3265C27.1585 11.2002 27.0424 11.1021 26.9067 11.0447L23.6818 9.67937L22.3662 6.33266C22.3108 6.19183 22.2163 6.07132 22.0946 5.98648C21.973 5.90165 21.8297 5.85635 21.6832 5.85635C21.5366 5.85635 21.3934 5.90165 21.2717 5.98648C21.1501 6.07132 21.0555 6.19183 21.0001 6.33266L19.6845 9.67937Z","fill","#7042F0"],["pTooltip","Describe the type of image you want to generate.","tooltipPosition","top","icon","pi pi-info-circle","tooltipZIndex","999999"],["autocomplete","off",3,"formGroup","ngSubmit",4,"ngIf"],["width","34","height","42","viewBox","0 0 34 42","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M17.9594 25.5195L9.80768 28.0091C9.59623 28.0736 9.41058 28.2074 9.27852 28.3905C9.14646 28.5736 9.07509 28.7961 9.07509 29.0248C9.07509 29.2535 9.14646 29.4761 9.27852 29.6592C9.41058 29.8423 9.59623 29.9761 9.80768 30.0405L17.9594 32.5302L20.3584 40.9899C20.4205 41.2093 20.5494 41.4019 20.7259 41.5389C20.9023 41.6759 21.1167 41.75 21.3371 41.75C21.5574 41.75 21.7719 41.6759 21.9483 41.5389C22.1247 41.4019 22.2536 41.2093 22.3158 40.9899L24.7158 32.5302L32.8675 30.0405C33.079 29.9761 33.2646 29.8423 33.3967 29.6592C33.5287 29.4761 33.6001 29.2535 33.6001 29.0248C33.6001 28.7961 33.5287 28.5736 33.3967 28.3905C33.2646 28.2074 33.079 28.0736 32.8675 28.0091L24.7158 25.5195L22.3158 17.0598C22.2537 16.8404 22.1248 16.6477 21.9483 16.5107C21.7719 16.3736 21.5575 16.2995 21.3371 16.2995C21.1167 16.2995 20.9023 16.3736 20.7258 16.5107C20.5494 16.6477 20.4205 16.8404 20.3584 17.0598L17.9594 25.5195Z","fill","#7042F0"],["d","M27.9321 10.3346L32.3543 8.98276C32.5657 8.91828 32.7513 8.78449 32.8833 8.6014C33.0154 8.41831 33.0867 8.19578 33.0867 7.96709C33.0867 7.73841 33.0154 7.51587 32.8833 7.33278C32.7513 7.1497 32.5657 7.0159 32.3543 6.95143L27.9321 5.60059L26.6294 1.01027C26.5673 0.790829 26.4383 0.598168 26.2619 0.461118C26.0855 0.324068 25.871 0.25 25.6506 0.25C25.4303 0.25 25.2158 0.324068 25.0394 0.461118C24.8629 0.598168 24.734 0.790829 24.6719 1.01027L23.3702 5.60059L18.9471 6.95143C18.7357 7.01588 18.55 7.14966 18.418 7.33275C18.2859 7.51584 18.2146 7.73839 18.2146 7.96709C18.2146 8.19579 18.2859 8.41834 18.418 8.60143C18.55 8.78452 18.7357 8.91831 18.9471 8.98276L23.3702 10.3346L24.6719 14.9239C24.734 15.1434 24.8629 15.336 25.0394 15.4731C25.2158 15.6101 25.4303 15.6842 25.6506 15.6842C25.871 15.6842 26.0855 15.6101 26.2619 15.4731C26.4383 15.336 26.5673 15.1434 26.6294 14.9239L27.9321 10.3346Z","fill","#7042F0"],["d","M5.49703 12.2565L1.03503 14.1451C0.847305 14.2246 0.686661 14.3603 0.573578 14.535C0.460491 14.7096 0.400097 14.9152 0.400097 15.1256C0.400097 15.336 0.460491 15.5417 0.573578 15.7163C0.686661 15.8909 0.847305 16.0267 1.03503 16.1061L5.49703 17.9948L7.31694 22.6255C7.39355 22.8203 7.52433 22.987 7.69262 23.1043C7.8609 23.2217 8.05905 23.2844 8.2618 23.2844C8.46454 23.2844 8.66269 23.2217 8.83098 23.1043C8.99926 22.987 9.13005 22.8203 9.20666 22.6255L11.0266 17.9948L15.4876 16.1061C15.6754 16.0266 15.836 15.8909 15.9491 15.7163C16.0622 15.5417 16.1225 15.336 16.1225 15.1256C16.1225 14.9152 16.0622 14.7096 15.9491 14.535C15.836 14.3603 15.6754 14.2246 15.4876 14.1451L11.0266 12.2565L9.20666 7.62684C9.13005 7.43204 8.99926 7.26532 8.83098 7.14797C8.66269 7.03062 8.46454 6.96795 8.2618 6.96795C8.05905 6.96795 7.8609 7.03062 7.69262 7.14797C7.52433 7.26532 7.39355 7.43204 7.31694 7.62684L5.49703 12.2565Z","fill","#7042F0"],["tooltipZIndex","999999","icon","pi pi-info-circle","pTooltip","Describe the size, color palette, style, mood, etc.","tooltipPosition","top"],["autocomplete","off",3,"formGroup","ngSubmit"],[1,"input-field-wrapper"],["placeholder","Create a realistic image of a cow in the snow.","formControlName","promptGenerate",1,"input-field"],[1,"submit-btn-container"],["icon","pi pi-send","type","submit","label","Generate"],["placeholder","E.g. 1200x800px, vibrant colors, impressionistic, adventurous.","formControlName","promptAutoGenerate",1,"input-field"],["icon","pi pi-send","type","submit","label","Auto Generate"]],template:function(e,t){1&e&&(I(0,"div",0)(1,"p",1),Te(2,"Generate AI Image"),A(),I(3,"div",2)(4,"div",3),de("click",function(){return t.openFormOne()}),I(5,"div",4),Ew(),I(6,"svg",5),_e(7,"path",6)(8,"path",7)(9,"path",8)(10,"path",9),A()(),xw(),I(11,"span")(12,"span")(13,"strong"),Te(14,"Generate"),A(),Te(15," an AI image based on your input and requests. "),A(),_e(16,"p-button",10),A(),E(17,zye,5,1,"form",11),A(),I(18,"div",3),de("click",function(){return t.openFormTwo()}),I(19,"div",4),Ew(),I(20,"svg",12),_e(21,"path",13)(22,"path",14)(23,"path",15),A()(),xw(),I(24,"span")(25,"strong"),Te(26,"Auto-Generate"),A(),Te(27," an Image based on the content created within the block editor. "),_e(28,"p-button",16),A(),E(29,Vye,5,1,"form",11),A()()()),2&e&&(C(16),qn(uo(6,Kz)),C(1),b("ngIf",t.showFormOne),C(11),qn(uo(7,Kz)),C(1),b("ngIf",t.showFormTwo))},dependencies:[nn,Fd,sl,Dc,kd,Ta,Mc,rg,iT],styles:[".ai-image-dialog[_ngcontent-%COMP%]{position:fixed;top:0%;left:0%;transform:translate(-55%,-5%);width:90vw;height:75vh;padding:1.5rem;margin:2rem;border:2px solid #d1d4db;box-shadow:0 8px 16px #14151a14;border-radius:.5rem;z-index:9999;background:#ffffff}.title[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:500;margin-bottom:1rem 0}form[_ngcontent-%COMP%]{width:100%}.input-field-wrapper[_ngcontent-%COMP%]{width:100%;height:7rem;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:1rem 0}.input-field-wrapper[_ngcontent-%COMP%] .input-field[_ngcontent-%COMP%]{width:100%;height:100%;padding:.5rem;line-height:normal;background-color:#fff;border:1px solid #ccc;border-radius:.25rem;color:#6c7389}.choice-div-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;height:80%;margin-bottom:.5rem}.choice-div[_ngcontent-%COMP%]{height:100%;width:48%;padding:.75rem;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:.5rem;border:2px solid #d1d4db;cursor:pointer}.choice-div[_ngcontent-%COMP%]:hover{border:2px solid #c6b3f9}.choice-div[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%], .submit-btn-container[_ngcontent-%COMP%]{margin-bottom:1rem;display:flex;justify-content:center;align-items:center}span[_ngcontent-%COMP%]{text-align:center}.icon-wrapper[_ngcontent-%COMP%]{background-color:#fff}"]});const Bye={duration:[500,0],interactive:!0,maxWidth:"100%",trigger:"manual",hideOnClick:!0,placement:"top",popperOptions:{modifiers:[{name:"preventOverflow",options:{altAxis:!0}}]}};class Uye{constructor(e){this.destroy$=new se;const{editor:t,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=e;this.editor=t,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.view.dom.addEventListener("keydown",this.handleKeyDown.bind(this)),this.component.instance.formSubmission.pipe(Tn(this.destroy$)).subscribe(()=>{this.editor.commands.closeImagePrompt(),this.editor.commands.insertLoaderNode()}),this.component.instance.aiResponse.pipe(Tn(this.destroy$)).subscribe(l=>{this.editor.commands.deleteSelection();const c=Object.values(l[0])[0];c&&(this.editor.commands.insertImage(c),this.editor.commands.openAIContentActions("image"))})}handleKeyDown(e){"Backspace"===e.key&&this.editor.commands.closeAIContentActions()}update(e,t){const i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1};i?.open!==r?.open?(i.open||this.component.instance.cleanForm(),this.createTooltip(),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:e}=this.editor.options;this.tippy||!e.parentElement||(this.tippy=Bo(document.body,{...Bye,...this.tippyOptions,content:this.element,onHide:()=>{this.editor.commands.closeImagePrompt()}}))}show(){this.tippy?.show()}hide(){this.tippy?.hide(),this.editor.view.focus()}destroy(){this.tippy?.destroy(),this.destroy$.next(!0),this.destroy$.complete()}}const Hye=n=>new $t({key:n.pluginKey,view:e=>new Uye({view:e,...n}),state:{init:()=>({open:!1,form:[]}),apply(e,t,i){const{open:r,form:o}=e.getMeta(Cg)||{},s=Cg.getState(i);return"boolean"==typeof r?{open:r,form:o}:s||t}}}),Cg=new rn("aiImagePrompt-form"),$ye=n=>vn.create({name:"aiImagePrompt",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Cg}),addCommands:()=>({openImagePrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(Cg,{open:!0}),!0)).freezeScroll(!0).run(),closeImagePrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(Cg,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const e=n.createComponent(wg);return e.changeDetectorRef.detectChanges(),[Hye({pluginKey:this.options.pluginKey,editor:this.editor,element:e.location.nativeElement,tippyOptions:this.options.tippyOptions,component:e})]}});class Gye{constructor(e){this.total=e}call(e,t){return t.subscribe(new Yye(e,this.total))}}class Yye extends ee{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){++this.count>this.total&&this.destination.next(e)}}const Qz={leading:!0,trailing:!1};class Zye{constructor(e,t,i,r){this.duration=e,this.scheduler=t,this.leading=i,this.trailing=r}call(e,t){return t.subscribe(new Jye(e,this.duration,this.scheduler,this.leading,this.trailing))}}class Jye extends ee{constructor(e,t,i,r,o){super(e),this.duration=t,this.scheduler=i,this.leading=r,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}_next(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Xye,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)}}function Xye(n){const{subscriber:e}=n;e.clearThrottle()}const e_e={loading:!0,preventScroll:!1,contentlets:[],languageId:1,search:"",assetType:null};class wu extends Yz{constructor(e,t){super(e_e),this.searchService=e,this.dotLanguageService=t,this.vm$=this.select(({contentlets:i,loading:r,preventScroll:o})=>({contentlets:i,loading:r,preventScroll:o})),this.updateContentlets=this.updater((i,r)=>({...i,contentlets:r})),this.updateAssetType=this.updater((i,r)=>({...i,assetType:r})),this.updatelanguageId=this.updater((i,r)=>({...i,languageId:r})),this.updateLoading=this.updater((i,r)=>({...i,loading:r})),this.updatePreventScroll=this.updater((i,r)=>({...i,preventScroll:r})),this.updateSearch=this.updater((i,r)=>({...i,search:r})),this.searchContentlet=this.effect(i=>i.pipe(Mn(r=>{this.updateLoading(!0),this.updateSearch(r)}),XS(this.state$),ue(([r,o])=>({...o,search:r})),Xn(r=>this.searchContentletsRequest(this.params({...r}),[])))),this.nextBatch=this.effect(i=>i.pipe(XS(this.state$),ue(([r,o])=>({...o,offset:r})),Xn(({contentlets:r,...o})=>this.searchContentletsRequest(this.params(o),r)))),this.dotLanguageService.getLanguages().subscribe(i=>{this.languages=i})}searchContentletsRequest(e,t){return this.searchService.get(e).pipe(ue(({jsonObjectView:{contentlets:i}})=>{const r=this.setContentletLanguage(i);return this.updateLoading(!1),this.updatePreventScroll(!i?.length),this.updateContentlets([...t,...r])}))}params({search:e,assetType:t,offset:i=0,languageId:r}){return{query:`+catchall:${e.includes("-")?e:`${e}*`} title:'${e}'^15 +languageId:${r} +baseType:(4 OR 9) +metadata.contenttype:${t||""}/* +deleted:false +working:true`,sortOrder:Rb.ASC,limit:20,offset:i}}setContentletLanguage(e){return e.map(t=>({...t,language:this.getLanguage(t.languageId)}))}getLanguage(e){const{languageCode:t,countryCode:i}=this.languages[e];return t&&i?`${t}-${i}`:""}}function t_e(n,e){if(1&n&&(I(0,"div",3),_e(1,"dot-contentlet-thumbnail",4),A()),2&n){const t=M();C(1),b("contentlet",t.contentlet)("cover",!1)("iconSize","72px")("showVideoThumbnail",t.showVideoThumbnail)}}function n_e(n,e){if(1&n&&(I(0,"h2",5),Te(1),A()),2&n){const t=M();C(1),Ot((null==t.contentlet?null:t.contentlet.fileName)||(null==t.contentlet?null:t.contentlet.title))}}function i_e(n,e){if(1&n&&(I(0,"div",6)(1,"span",7),Te(2),A(),_e(3,"dot-state-icon",8),A()),2&n){const t=M();C(2),Ot(t.contentlet.language),C(1),b("state",t.contentlet)}}wu.\u0275fac=function(e){return new(e||wu)(F(Nh),F(Ll))},wu.\u0275prov=$({token:wu,factory:wu.\u0275fac});class Dg{constructor(e){this.dotMarketingConfigService=e,this.showVideoThumbnail=!0}ngOnInit(){this.showVideoThumbnail=this.dotMarketingConfigService.getProperty(Vp.SHOW_VIDEO_THUMBNAIL)}getImage(e){return`/dA/${e}/500w/50q`}getContentletIcon(){return"FILEASSET"!==this.contentlet?.baseType?this.contentlet?.contentTypeIcon:this.contentlet?.__icon__}}Dg.\u0275fac=function(e){return new(e||Dg)(O(cu))},Dg.\u0275cmp=xe({type:Dg,selectors:[["dot-asset-card"]],inputs:{contentlet:"contentlet"},decls:4,vars:1,consts:[["pTemplate","header"],["class","title",4,"pTemplate"],["pTemplate","footer"],[1,"thumbnail-container"],[3,"contentlet","cover","iconSize","showVideoThumbnail"],[1,"title"],[1,"state"],[1,"badge"],["size","16px",3,"state"]],template:function(e,t){1&e&&(I(0,"p-card"),E(1,t_e,2,4,"ng-template",0),E(2,n_e,2,1,"h2",1),E(3,i_e,4,2,"ng-template",2),A()),2&e&&(C(2),b("pTemplate","title"))},dependencies:[HS,rr],styles:["[_nghost-%COMP%] .p-card{border:none;box-shadow:0 1px 3px var(--color-palette-black-op-10),0 1px 2px var(--color-palette-black-op-20);cursor:pointer;display:flex;gap:1rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0;height:94px;width:94px;min-height:94px;min-width:94px;border-radius:.25rem 0 0 .25rem}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container{padding:10px;width:100%;height:100%;background:#f3f3f4}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail{width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail img{object-fit:contain;width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-body{flex-grow:1;display:flex;flex-direction:column;overflow:hidden;padding:.75rem .75rem .75rem 0}[_nghost-%COMP%] .p-card .p-card-body .p-card-title{flex-grow:1}[_nghost-%COMP%] .p-card .p-card-body .p-card-title h2{font-size:16px;line-height:140%;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}[_nghost-%COMP%] .badge{background:var(--color-palette-primary-100);border-radius:.125rem;color:#14151a;font-size:12px;line-height:140%;padding:.2rem .5rem;display:flex;align-items:center}"],changeDetection:0});let r_e=(()=>{class n{constructor(){this.shape="rectangle",this.animation="wave",this.borderRadius=null,this.size=null,this.width="100%",this.height="1rem"}containerClass(){return{"p-skeleton p-component":!0,"p-skeleton-circle":"circle"===this.shape,"p-skeleton-none":"none"===this.animation}}containerStyle(){return this.size?{...this.style,width:this.size,height:this.size,borderRadius:this.borderRadius}:{...this.style,width:this.width,height:this.height,borderRadius:this.borderRadius}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-skeleton"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},decls:1,vars:4,consts:[[3,"ngClass","ngStyle"]],template:function(t,i){1&t&&_e(0,"div",0),2&t&&(Dn(i.styleClass),b("ngClass",i.containerClass())("ngStyle",i.containerStyle()))},dependencies:[yi,wr],styles:['.p-skeleton{position:relative;overflow:hidden}.p-skeleton:after{content:"";animation:p-skeleton-animation 1.2s infinite;height:100%;left:0;position:absolute;right:0;top:0;transform:translate(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}@keyframes p-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n'],encapsulation:2,changeDetection:0}),n})(),Zz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();function o_e(n,e){1&n&&_e(0,"p-skeleton",3)}function s_e(n,e){1&n&&(I(0,"div",4),_e(1,"p-skeleton",5)(2,"p-skeleton",6),A())}class Mg{}function a_e(n,e){if(1&n){const t=Qe();I(0,"dot-asset-card",7),de("click",function(){ge(t);const r=M().$implicit;return ye(M(2).selectedItem.emit(r[0]))}),A()}2&n&&b("contentlet",M().$implicit[0])}function l_e(n,e){if(1&n){const t=Qe();I(0,"dot-asset-card",7),de("click",function(){ge(t);const r=M().$implicit;return ye(M(2).selectedItem.emit(r[1]))}),A()}2&n&&b("contentlet",M().$implicit[1])}function c_e(n,e){if(1&n&&(I(0,"div",5),E(1,a_e,1,1,"dot-asset-card",6),E(2,l_e,1,1,"dot-asset-card",6),A()),2&n){const t=e.$implicit;C(1),b("ngIf",t[0]),C(1),b("ngIf",t[1])}}function u_e(n,e){if(1&n){const t=Qe();I(0,"p-scroller",3),de("onScrollIndexChange",function(r){return ge(t),ye(M().onScrollIndexChange(r))}),E(1,c_e,3,2,"ng-template",4),A()}if(2&n){const t=M();b("itemSize",110)("items",t.rows)("lazy",!0)}}function d_e(n,e){1&n&&(I(0,"div",5),_e(1,"dot-asset-card-skeleton")(2,"dot-asset-card-skeleton"),A())}function h_e(n,e){if(1&n&&(I(0,"div",8),E(1,d_e,3,0,"div",9),A()),2&n){const t=M();C(1),b("ngForOf",t.loadingItems)}}function f_e(n,e){if(1&n&&(I(0,"div",10),_e(1,"img",11),I(2,"p"),Te(3,"No results found, try searching again"),A()()),2&n){const t=M();C(1),b("src",t.icon,Ja)}}Mg.\u0275fac=function(e){return new(e||Mg)},Mg.\u0275cmp=xe({type:Mg,selectors:[["dot-asset-card-skeleton"]],decls:4,vars:0,consts:[["pTemplate","header"],["height","1rem"],["pTemplate","footer"],["shape","square","size","94px"],[1,"state"],["width","2rem","height","1rem"],["shape","circle","size","16px"]],template:function(e,t){1&e&&(I(0,"p-card"),E(1,o_e,1,0,"ng-template",0),_e(2,"p-skeleton",1),E(3,s_e,3,0,"ng-template",2),A())},dependencies:[HS,rr,r_e],styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%] .p-card{border:none;box-shadow:0 1px 3px var(--color-palette-black-op-10),0 1px 2px var(--color-palette-black-op-20);cursor:pointer;display:flex;gap:.5rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0}[_nghost-%COMP%] .p-card .p-card-body{flex:1;overflow:hidden;padding:.75rem .5rem .75rem 0;display:flex;flex-direction:column}[_nghost-%COMP%] .p-card .p-card-body .p-card-content{flex-grow:1}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}"],changeDetection:0});class Tg{constructor(){this.nextBatch=new re,this.selectedItem=new re,this.done=!1,this.loading=!0,this.loadingItems=[null,null,null],this.icon=Ns("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDEiIHZpZXdCb3g9IjAgMCA0MCA0MSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuMDc2MTcgOC41NTcxMkgwLjA5NTIxNDhWMzYuNDIzOEMwLjA5NTIxNDggMzguNjEzMyAxLjg4NjY0IDQwLjQwNDcgNC4wNzYxNyA0MC40MDQ3SDMxLjk0MjhWMzYuNDIzOEg0LjA3NjE3VjguNTU3MTJaTTM1LjkyMzggMC41OTUyMTVIMTIuMDM4MUM5Ljg0ODU1IDAuNTk1MjE1IDguMDU3MTIgMi4zODY2NCA4LjA1NzEyIDQuNTc2MTdWMjguNDYxOUM4LjA1NzEyIDMwLjY1MTQgOS44NDg1NSAzMi40NDI4IDEyLjAzODEgMzIuNDQyOEgzNS45MjM4QzM4LjExMzMgMzIuNDQyOCAzOS45MDQ3IDMwLjY1MTQgMzkuOTA0NyAyOC40NjE5VjQuNTc2MTdDMzkuOTA0NyAyLjM4NjY0IDM4LjExMzMgMC41OTUyMTUgMzUuOTIzOCAwLjU5NTIxNVpNMzUuOTIzOCAyOC40NjE5SDEyLjAzODFWNC41NzYxN0gzNS45MjM4VjI4LjQ2MTlaTTIxLjk5MDUgMjQuNDgwOUgyNS45NzE0VjE4LjUwOTVIMzEuOTQyOFYxNC41Mjg1SDI1Ljk3MTRWOC41NTcxMkgyMS45OTA1VjE0LjUyODVIMTYuMDE5VjE4LjUwOTVIMjEuOTkwNVYyNC40ODA5WiIgZmlsbD0iIzU3NkJFOCIvPgo8L3N2Zz4K"),this._itemRows=[],this._offset=0}set contentlets(e){this._offset=e?.length||0,this._itemRows=this.createRowItem(e)}get rows(){return[...this._itemRows]}onScrollIndexChange(e){this.done||e.last===this.rows.length&&this.nextBatch.emit(this._offset)}createRowItem(e=[]){const t=[];return e.forEach(i=>{const r=t.length-1;t[r]?.length<2?t[r].push(i):t.push([i])}),t}}Tg.\u0275fac=function(e){return new(e||Tg)},Tg.\u0275cmp=xe({type:Tg,selectors:[["dot-asset-card-list"]],inputs:{done:"done",loading:"loading",contentlets:"contentlets"},outputs:{nextBatch:"nextBatch",selectedItem:"selectedItem"},decls:5,vars:2,consts:[["scrollHeight","20rem",3,"itemSize","items","lazy","onScrollIndexChange",4,"ngIf","ngIfElse"],["loadingBlock",""],["emptyBlock",""],["scrollHeight","20rem",3,"itemSize","items","lazy","onScrollIndexChange"],["pTemplate","item"],[1,"card-list-row"],[3,"contentlet","click",4,"ngIf"],[3,"contentlet","click"],[1,"wrapper","justify-start"],["class","card-list-row",4,"ngFor","ngForOf"],[1,"wrapper"],["width","42px","alt","No results found",3,"src"]],template:function(e,t){if(1&e&&(E(0,u_e,2,3,"p-scroller",0),E(1,h_e,2,1,"ng-template",null,1,Bn),E(3,f_e,4,1,"ng-template",null,2,Bn)),2&e){const i=Cn(2),r=Cn(4);b("ngIf",(null==t.rows?null:t.rows.length)&&!t.loading)("ngIfElse",t.loading?i:r)}},dependencies:[Hr,nn,rr,k5,Dg,Mg],styles:["[_nghost-%COMP%]{display:flex;width:100%;height:20rem;flex-direction:column}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%]{padding:0 2rem;display:flex;align-items:center;justify-content:center;flex-direction:column;flex-grow:1;height:250px;gap:0 1rem;overflow:hidden}[_nghost-%COMP%] .justify-start[_ngcontent-%COMP%]{justify-content:flex-start}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:1rem 0;font-size:18px}[_nghost-%COMP%] dot-asset-card, [_nghost-%COMP%] dot-asset-card-skeleton{width:calc(50% - .5rem)}[_nghost-%COMP%] .p-scroller-content{padding:0 2rem;max-width:100%}[_nghost-%COMP%] .card-list-row{display:flex;justify-content:space-between;width:100%;min-height:110px;gap:1rem}"],changeDetection:0});const p_e=["input"];function m_e(n,e){if(1&n){const t=Qe();pt(0),I(1,"dot-asset-card-list",6),de("selectedItem",function(r){return ge(t),ye(M().addAsset.emit(r))})("nextBatch",function(r){return ge(t),ye(M().offset$.next(r))}),A(),mt()}if(2&n){const t=e.ngIf;C(1),b("contentlets",t.contentlets)("done",t.preventScroll)("loading",t.loading)}}class Sg{constructor(e){this.store=e,this.addAsset=new re,this.vm$=this.store.vm$,this.offset$=new Wr(0),this.destroy$=new se}set languageId(e){this.store.updatelanguageId(e)}set type(e){this.store.updateAssetType(e)}ngOnInit(){this.store.searchContentlet(""),this.offset$.pipe(Tn(this.destroy$),function Wye(n){return e=>e.lift(new Gye(n))}(1),function Qye(n,e=Ud,t=Qz){return i=>i.lift(new Zye(n,e,t.leading,t.trailing))}(450)).subscribe(this.store.nextBatch),requestAnimationFrame(()=>this.input.nativeElement.focus())}ngAfterViewInit(){dv(this.input.nativeElement,"input").pipe(Tn(this.destroy$),$d(450)).subscribe(({target:e})=>{this.store.searchContentlet(e.value)})}ngOnDestroy(){this.destroy$.next(!0)}}Sg.\u0275fac=function(e){return new(e||Sg)(O(wu))},Sg.\u0275cmp=xe({type:Sg,selectors:[["dot-asset-search"]],viewQuery:function(e,t){if(1&e&&hn(p_e,5),2&e){let i;Xe(i=et())&&(t.input=i.first)}},inputs:{languageId:"languageId",type:"type"},outputs:{addAsset:"addAsset"},features:[Nt([wu])],decls:8,vars:3,consts:[[1,"search-box"],[1,"p-input-icon-right"],["autofocus","","type","text","pInputText","","placeholder","Search",1,"search"],["input",""],[1,"pi","pi-search"],[4,"ngIf"],[3,"contentlets","done","loading","selectedItem","nextBatch"]],template:function(e,t){1&e&&(pt(0),I(1,"div",0)(2,"span",1),_e(3,"input",2,3)(5,"i",4),A()(),mt(),E(6,m_e,2,3,"ng-container",5),Eo(7,"async")),2&e&&(C(6),b("ngIf",xo(7,1,t.vm$)))},dependencies:[nn,cg,Tg,VD],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.search-box[_ngcontent-%COMP%]{padding:0 2rem;flex-grow:1;display:flex;align-items:center}.search-box[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{width:100%}"],changeDetection:0});const g_e=n=>{switch(n.target.error.code){case n.target.error.MEDIA_ERR_ABORTED:return"You aborted the video playback.";case n.target.error.MEDIA_ERR_NETWORK:return"A network error caused the video download to fail part-way.";case n.target.error.MEDIA_ERR_DECODE:return'Video playback aborted due to browser compatibility issues. Try a different browser or visit MDN Video Support for more information.';case n.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:return'Invalid URL. Please provide a URL to a .mp4, .webm, .ogv video file, or a YouTube video link. For more info on supported video formats and containers, visit MDN Video Format Support.';default:return'An unknown error occurred. Please contact support'}},y_e=["input"],v_e=/(youtube\.com\/watch\?v=.*)|(youtu\.be\/.*)/;class Eg{constructor(e,t){this.fb=e,this.cd=t,this.addAsset=new re,this.disableAction=!1,this.form=this.fb.group({url:["",[Cc.required,Cc.pattern("^((http|https)://)[-a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)$")]]}),this.form.valueChanges.subscribe(({url:i})=>{this.disableAction=!1,"video"===this.type&&!this.isInvalid&&!i.match(v_e)&&this.tryToPlayVideo(i)}),requestAnimationFrame(()=>this.input.nativeElement.focus())}get placerHolder(){return"https://example.com/"+("video"===this.type?"video.mp4":"image.jpg")}get error(){return this.form.controls.url?.errors?.message||""}get isInvalid(){return this.form.controls.url?.invalid}onSubmit({url:e}){this.addAsset.emit(e)}tryToPlayVideo(e){const t=document.createElement("video");this.disableAction=!0,t.addEventListener("error",i=>{this.form.controls.url.setErrors({message:g_e(i)}),this.cd.detectChanges()}),t.addEventListener("canplay",()=>{this.form.controls.url.setErrors(null),this.disableAction=!1,this.cd.detectChanges()}),t.src=`${e}#t=0.1`}}Eg.\u0275fac=function(e){return new(e||Eg)(O(G_),O(Kn))},Eg.\u0275cmp=xe({type:Eg,selectors:[["dot-external-asset"]],viewQuery:function(e,t){if(1&e&&hn(y_e,5),2&e){let i;Xe(i=et())&&(t.input=i.first)}},inputs:{type:"type"},outputs:{addAsset:"addAsset"},decls:10,vars:7,consts:[[1,"wrapper",3,"formGroup","ngSubmit"],[1,"form-control"],["dotFieldRequired","","for","url"],["id","url","formControlName","url","autocomplete","off","type","text","pInputText","",3,"placeholder"],["input",""],[1,"footer"],[1,"error-message",3,"innerHTML"],["type","submit","pButton","",3,"disabled"]],template:function(e,t){1&e&&(I(0,"form",0),de("ngSubmit",function(){return t.onSubmit(t.form.value)}),I(1,"div",1)(2,"label",2),Te(3),A(),_e(4,"input",3,4),A(),I(6,"div",5),_e(7,"span",6),I(8,"button",7),Te(9,"Insert"),A()()()),2&e&&(b("formGroup",t.form),C(3),Vi("Insert ",t.type," URL"),C(1),b("placeholder",t.placerHolder),C(3),ns("hide",!t.isInvalid||t.form.pristine),b("innerHTML",t.error||"Enter a valid url",kf),C(1),b("disabled",t.form.invalid||t.disableAction))},dependencies:[Fd,sl,Dc,kd,Ta,Mc,ds,cg],styles:["[_nghost-%COMP%]{width:100%}.wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-end;flex-direction:column;padding:2rem;gap:1rem}.form-control[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.75rem}.footer[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}.error-message[_ngcontent-%COMP%]{color:#d82b2e;font-size:.813rem;text-align:left;max-width:30rem}.hide[_ngcontent-%COMP%]{visibility:hidden}"],changeDetection:0});const b_e=xM("shakeit",[N2("shakestart",Bi({transform:"scale(1.1)"})),N2("shakeend",Bi({transform:"scale(1)"})),up("shakestart => shakeend",cp("1000ms ease-in",function Hq(n){return{type:5,steps:n}}([Bi({transform:"translate3d(-2px, 0, 0)",offset:.1}),Bi({transform:"translate3d(4px, 0, 0)",offset:.2}),Bi({transform:"translate3d(-4px, 0, 0)",offset:.3}),Bi({transform:"translate3d(4px, 0, 0)",offset:.4}),Bi({transform:"translate3d(-4px, 0, 0)",offset:.5}),Bi({transform:"translate3d(4px, 0, 0)",offset:.6}),Bi({transform:"translate3d(-4px, 0, 0)",offset:.7}),Bi({transform:"translate3d(4px, 0, 0)",offset:.8}),Bi({transform:"translate3d(-2px, 0, 0)",offset:.9})])))]);function w_e(n,e){1&n&&_e(0,"span",11),2&n&&b("innerHTML",M(2).$implicit.summary,kf)}function C_e(n,e){1&n&&_e(0,"span",12),2&n&&b("innerHTML",M(2).$implicit.detail,kf)}function D_e(n,e){if(1&n&&(pt(0),E(1,w_e,1,1,"span",9),E(2,C_e,1,1,"span",10),mt()),2&n){const t=M().$implicit;C(1),b("ngIf",t.summary),C(1),b("ngIf",t.detail)}}function M_e(n,e){if(1&n&&(I(0,"span",15),Te(1),A()),2&n){const t=M(2).$implicit;C(1),Ot(t.summary)}}function T_e(n,e){if(1&n&&(I(0,"span",16),Te(1),A()),2&n){const t=M(2).$implicit;C(1),Ot(t.detail)}}function S_e(n,e){if(1&n&&(E(0,M_e,2,1,"span",13),E(1,T_e,2,1,"span",14)),2&n){const t=M().$implicit;b("ngIf",t.summary),C(1),b("ngIf",t.detail)}}function E_e(n,e){if(1&n){const t=Qe();I(0,"button",17),de("click",function(){ge(t);const r=M().index;return ye(M(2).removeMessage(r))}),_e(1,"i",18),A()}}const x_e=function(n,e){return{showTransitionParams:n,hideTransitionParams:e}},I_e=function(n){return{value:"visible",params:n}},O_e=function(n,e,t,i){return{"pi-info-circle":n,"pi-check":e,"pi-exclamation-triangle":t,"pi-times-circle":i}};function A_e(n,e){if(1&n&&(I(0,"div",4)(1,"div",5),_e(2,"span",6),E(3,D_e,3,2,"ng-container",1),E(4,S_e,2,2,"ng-template",null,7,Bn),E(6,E_e,2,0,"button",8),A()()),2&n){const t=e.$implicit,i=Cn(5),r=M(2);Dn("p-message p-message-"+t.severity),b("@messageAnimation",xt(12,I_e,Mi(9,x_e,r.showTransitionOptions,r.hideTransitionOptions))),C(2),Dn("p-message-icon pi"+(t.icon?" "+t.icon:"")),b("ngClass",Gf(14,O_e,"info"===t.severity,"success"===t.severity,"warn"===t.severity,"error"===t.severity)),C(1),b("ngIf",!r.escape)("ngIfElse",i),C(3),b("ngIf",r.closable)}}function k_e(n,e){if(1&n&&(pt(0),E(1,A_e,7,19,"div",3),mt()),2&n){const t=M();C(1),b("ngForOf",t.messages)}}function N_e(n,e){1&n&&Dt(0)}function P_e(n,e){if(1&n&&(I(0,"div",19)(1,"div",5),E(2,N_e,1,0,"ng-container",20),A()()),2&n){const t=M();b("ngClass","p-message p-message-"+t.severity),C(2),b("ngTemplateOutlet",t.contentTemplate)}}let L_e=(()=>{class n{constructor(t,i,r){this.messageService=t,this.el=i,this.cd=r,this.closable=!0,this.enableService=!0,this.escape=!0,this.showTransitionOptions="300ms ease-out",this.hideTransitionOptions="200ms cubic-bezier(0.86, 0, 0.07, 1)",this.valueChange=new re,this.timerSubscriptions=[]}set value(t){this.messages=t,this.startMessageLifes(this.messages)}ngAfterContentInit(){this.templates.forEach(t=>{t.getType(),this.contentTemplate=t.template}),this.messageService&&this.enableService&&!this.contentTemplate&&(this.messageSubscription=this.messageService.messageObserver.subscribe(t=>{if(t){t instanceof Array||(t=[t]);const i=t.filter(r=>this.key===r.key);this.messages=this.messages?[...this.messages,...i]:[...i],this.startMessageLifes(i),this.cd.markForCheck()}}),this.clearSubscription=this.messageService.clearObserver.subscribe(t=>{t?this.key===t&&(this.messages=null):this.messages=null,this.cd.markForCheck()}))}hasMessages(){let t=this.el.nativeElement.parentElement;return!(!t||!t.offsetParent)&&(null!=this.contentTemplate||this.messages&&this.messages.length>0)}clear(){this.messages=[],this.valueChange.emit(this.messages)}removeMessage(t){this.messages=this.messages.filter((i,r)=>r!==t),this.valueChange.emit(this.messages)}get icon(){const t=this.severity||(this.hasMessages()?this.messages[0].severity:null);if(this.hasMessages())switch(t){case"success":return"pi-check";case"info":default:return"pi-info-circle";case"error":return"pi-times";case"warn":return"pi-exclamation-triangle"}return null}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.timerSubscriptions?.forEach(t=>t.unsubscribe())}startMessageLifes(t){t?.forEach(i=>i.life&&this.startMessageLife(i))}startMessageLife(t){const i=RL(t.life).subscribe(()=>{this.messages=this.messages?.filter(r=>r!==t),this.timerSubscriptions=this.timerSubscriptions?.filter(r=>r!==i),this.valueChange.emit(this.messages),this.cd.markForCheck()});this.timerSubscriptions.push(i)}}return n.\u0275fac=function(t){return new(t||n)(O(WQ,8),O(kt),O(Kn))},n.\u0275cmp=xe({type:n,selectors:[["p-messages"]],contentQueries:function(t,i,r){if(1&t&&pi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{value:"value",closable:"closable",style:"style",styleClass:"styleClass",enableService:"enableService",key:"key",escape:"escape",severity:"severity",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{valueChange:"valueChange"},decls:4,vars:5,consts:[["role","alert",1,"p-messages","p-component",3,"ngStyle"],[4,"ngIf","ngIfElse"],["staticMessage",""],["role","alert",3,"class",4,"ngFor","ngForOf"],["role","alert"],[1,"p-message-wrapper"],[3,"ngClass"],["escapeOut",""],["class","p-message-close p-link","type","button","pRipple","",3,"click",4,"ngIf"],["class","p-message-summary",3,"innerHTML",4,"ngIf"],["class","p-message-detail",3,"innerHTML",4,"ngIf"],[1,"p-message-summary",3,"innerHTML"],[1,"p-message-detail",3,"innerHTML"],["class","p-message-summary",4,"ngIf"],["class","p-message-detail",4,"ngIf"],[1,"p-message-summary"],[1,"p-message-detail"],["type","button","pRipple","",1,"p-message-close","p-link",3,"click"],[1,"p-message-close-icon","pi","pi-times"],["role","alert",3,"ngClass"],[4,"ngTemplateOutlet"]],template:function(t,i){if(1&t&&(I(0,"div",0),E(1,k_e,2,1,"ng-container",1),E(2,P_e,3,2,"ng-template",null,2,Bn),A()),2&t){const r=Cn(3);Dn(i.styleClass),b("ngStyle",i.style),C(1),b("ngIf",!i.contentTemplate)("ngIfElse",r)}},dependencies:[yi,Hr,nn,ko,wr,Bd],styles:[".p-message-wrapper{display:flex;align-items:center}.p-message-close{display:flex;align-items:center;justify-content:center}.p-message-close.p-link{margin-left:auto;overflow:hidden;position:relative}.p-messages .p-message.ng-animating{overflow:hidden}\n"],encapsulation:2,data:{animation:[xM("messageAnimation",[up(":enter",[Bi({opacity:0,transform:"translateY(-25%)"}),cp("{{showTransitionParams}}")]),up(":leave",[cp("{{hideTransitionParams}}",Bi({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0}),n})(),Jz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,Oc]}),n})();function R_e(n,e){if(1&n&&(I(0,"div",5),Te(1),A()),2&n){const t=M(2);gc("display",null!=t.value&&0!==t.value?"flex":"none"),C(1),Gy("",t.value,"",t.unit,"")}}function F_e(n,e){if(1&n&&(I(0,"div",3),E(1,R_e,2,4,"div",4),A()),2&n){const t=M();gc("width",t.value+"%")("background",t.color),C(1),b("ngIf",t.showValue)}}function j_e(n,e){if(1&n&&(I(0,"div",6),_e(1,"div",7),A()),2&n){const t=M();C(1),gc("background",t.color)}}const z_e=function(n,e){return{"p-progressbar p-component":!0,"p-progressbar-determinate":n,"p-progressbar-indeterminate":e}};let V_e=(()=>{class n{constructor(){this.showValue=!0,this.unit="%",this.mode="determinate"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=xe({type:n,selectors:[["p-progressBar"]],hostAttrs:[1,"p-element"],inputs:{value:"value",showValue:"showValue",style:"style",styleClass:"styleClass",unit:"unit",mode:"mode",color:"color"},decls:3,vars:10,consts:[["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle","ngClass"],["class","p-progressbar-value p-progressbar-value-animate","style","display:flex",3,"width","background",4,"ngIf"],["class","p-progressbar-indeterminate-container",4,"ngIf"],[1,"p-progressbar-value","p-progressbar-value-animate",2,"display","flex"],["class","p-progressbar-label",3,"display",4,"ngIf"],[1,"p-progressbar-label"],[1,"p-progressbar-indeterminate-container"],[1,"p-progressbar-value","p-progressbar-value-animate"]],template:function(t,i){1&t&&(I(0,"div",0),E(1,F_e,2,5,"div",1),E(2,j_e,2,2,"div",2),A()),2&t&&(Dn(i.styleClass),b("ngStyle",i.style)("ngClass",Mi(7,z_e,"determinate"===i.mode,"indeterminate"===i.mode)),Yt("aria-valuenow",i.value),C(1),b("ngIf","determinate"===i.mode),C(1),b("ngIf","indeterminate"===i.mode))},dependencies:[yi,nn,wr],styles:['.p-progressbar{position:relative;overflow:hidden}.p-progressbar-determinate .p-progressbar-value{height:100%;width:0%;position:absolute;display:none;border:0 none;display:flex;align-items:center;justify-content:center;overflow:hidden}.p-progressbar-determinate .p-progressbar-label{display:inline-flex}.p-progressbar-determinate .p-progressbar-value-animate{transition:width 1s ease-in-out}.p-progressbar-indeterminate .p-progressbar-value:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.p-progressbar-indeterminate .p-progressbar-value:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}\n'],encapsulation:2,changeDetection:0}),n})(),Xz=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn]}),n})();const B_e=["advancedfileinput"],U_e=["basicfileinput"],H_e=["content"];function $_e(n,e){if(1&n){const t=Qe();I(0,"p-button",17),de("onClick",function(){return ge(t),ye(M(2).upload())}),A()}if(2&n){const t=M(2);b("label",t.uploadButtonLabel)("icon",t.uploadIcon)("disabled",!t.hasFiles()||t.isFileLimitExceeded())("styleClass",t.uploadStyleClass)}}function W_e(n,e){if(1&n){const t=Qe();I(0,"p-button",17),de("onClick",function(){return ge(t),ye(M(2).clear())}),A()}if(2&n){const t=M(2);b("label",t.cancelButtonLabel)("icon",t.cancelIcon)("disabled",!t.hasFiles()||t.uploading)("styleClass",t.cancelStyleClass)}}function G_e(n,e){1&n&&Dt(0)}function Y_e(n,e){1&n&&_e(0,"p-progressBar",18),2&n&&b("value",M(2).progress)("showValue",!1)}function q_e(n,e){if(1&n){const t=Qe();I(0,"img",26),de("error",function(r){return ge(t),ye(M(5).imageError(r))}),A()}if(2&n){const t=M().$implicit,i=M(4);b("src",t.objectURL,Ja)("width",i.previewWidth)}}function K_e(n,e){if(1&n){const t=Qe();I(0,"div",22)(1,"div"),E(2,q_e,1,2,"img",23),A(),I(3,"div",24),Te(4),A(),I(5,"div"),Te(6),A(),I(7,"div")(8,"button",25),de("click",function(r){const s=ge(t).index;return ye(M(4).remove(r,s))}),A()()()}if(2&n){const t=e.$implicit,i=M(4);C(2),b("ngIf",i.isImage(t)),C(2),Ot(t.name),C(2),Ot(i.formatSize(t.size)),C(2),Dn(i.removeStyleClass),b("disabled",i.uploading)}}function Q_e(n,e){if(1&n&&(I(0,"div"),E(1,K_e,9,6,"div",21),A()),2&n){const t=M(3);C(1),b("ngForOf",t.files)}}function Z_e(n,e){}function J_e(n,e){if(1&n&&(I(0,"div"),E(1,Z_e,0,0,"ng-template",27),A()),2&n){const t=M(3);C(1),b("ngForOf",t.files)("ngForTemplate",t.fileTemplate)}}function X_e(n,e){if(1&n&&(I(0,"div",19),E(1,Q_e,2,1,"div",20),E(2,J_e,2,2,"div",20),A()),2&n){const t=M(2);C(1),b("ngIf",!t.fileTemplate),C(1),b("ngIf",t.fileTemplate)}}function eve(n,e){1&n&&Dt(0)}const tve=function(n,e){return{"p-focus":n,"p-disabled":e}},nve=function(n){return{$implicit:n}};function ive(n,e){if(1&n){const t=Qe();I(0,"div",2)(1,"div",3)(2,"span",4),de("focus",function(){return ge(t),ye(M().onFocus())})("blur",function(){return ge(t),ye(M().onBlur())})("click",function(){return ge(t),ye(M().choose())})("keydown.enter",function(){return ge(t),ye(M().choose())}),I(3,"input",5,6),de("change",function(r){return ge(t),ye(M().onFileSelect(r))}),A(),_e(5,"span",7),I(6,"span",8),Te(7),A()(),E(8,$_e,1,4,"p-button",9),E(9,W_e,1,4,"p-button",9),E(10,G_e,1,0,"ng-container",10),A(),I(11,"div",11,12),de("dragenter",function(r){return ge(t),ye(M().onDragEnter(r))})("dragleave",function(r){return ge(t),ye(M().onDragLeave(r))})("drop",function(r){return ge(t),ye(M().onDrop(r))}),E(13,Y_e,1,2,"p-progressBar",13),_e(14,"p-messages",14),E(15,X_e,3,2,"div",15),E(16,eve,1,0,"ng-container",16),A()()}if(2&n){const t=M();Dn(t.styleClass),b("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",t.style),C(2),Dn(t.chooseStyleClass),b("ngClass",Mi(24,tve,t.focus,t.disabled||t.isChooseDisabled())),C(1),b("multiple",t.multiple)("accept",t.accept)("disabled",t.disabled||t.isChooseDisabled()),Yt("title",""),C(2),Dn(t.chooseIcon),b("ngClass","p-button-icon p-button-icon-left"),C(2),Ot(t.chooseButtonLabel),C(1),b("ngIf",!t.auto&&t.showUploadButton),C(1),b("ngIf",!t.auto&&t.showCancelButton),C(1),b("ngTemplateOutlet",t.toolbarTemplate),C(3),b("ngIf",t.hasFiles()),C(1),b("value",t.msgs)("enableService",!1),C(1),b("ngIf",t.hasFiles()),C(1),b("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",xt(27,nve,t.files))}}function rve(n,e){if(1&n&&(I(0,"span",8),Te(1),A()),2&n){const t=M(2);C(1),Ot(t.basicButtonLabel)}}function ove(n,e){if(1&n){const t=Qe();I(0,"input",33,34),de("change",function(r){return ge(t),ye(M(2).onFileSelect(r))})("focus",function(){return ge(t),ye(M(2).onFocus())})("blur",function(){return ge(t),ye(M(2).onBlur())}),A()}if(2&n){const t=M(2);b("accept",t.accept)("multiple",t.multiple)("disabled",t.disabled)}}const sve=function(n,e,t,i){return{"p-button p-component p-fileupload-choose":!0,"p-button-icon-only":n,"p-fileupload-choose-selected":e,"p-focus":t,"p-disabled":i}};function ave(n,e){if(1&n){const t=Qe();I(0,"div",28),_e(1,"p-messages",14),I(2,"span",29),de("mouseup",function(){return ge(t),ye(M().onBasicUploaderClick())})("keydown",function(r){return ge(t),ye(M().onBasicKeydown(r))}),_e(3,"span",30),E(4,rve,2,1,"span",31),E(5,ove,2,3,"input",32),A()()}if(2&n){const t=M();C(1),b("value",t.msgs)("enableService",!1),C(1),Dn(t.styleClass),b("ngClass",Gf(9,sve,!t.basicButtonLabel,t.hasFiles(),t.focus,t.disabled))("ngStyle",t.style),C(1),b("ngClass",t.hasFiles()&&!t.auto?t.uploadIcon:t.chooseIcon),C(1),b("ngIf",t.basicButtonLabel),C(1),b("ngIf",!t.hasFiles())}}let lve=(()=>{class n{constructor(t,i,r,o,s,a){this.el=t,this.sanitizer=i,this.zone=r,this.http=o,this.cd=s,this.config=a,this.method="post",this.invalidFileSizeMessageSummary="{0}: Invalid file size, ",this.invalidFileSizeMessageDetail="maximum upload size is {0}.",this.invalidFileTypeMessageSummary="{0}: Invalid file type, ",this.invalidFileTypeMessageDetail="allowed file types: {0}.",this.invalidFileLimitMessageDetail="limit is {0} at most.",this.invalidFileLimitMessageSummary="Maximum number of files exceeded, ",this.previewWidth=50,this.chooseIcon="pi pi-plus",this.uploadIcon="pi pi-upload",this.cancelIcon="pi pi-times",this.showUploadButton=!0,this.showCancelButton=!0,this.mode="advanced",this.onBeforeUpload=new re,this.onSend=new re,this.onUpload=new re,this.onError=new re,this.onClear=new re,this.onRemove=new re,this.onSelect=new re,this.onProgress=new re,this.uploadHandler=new re,this.onImageError=new re,this._files=[],this.progress=0,this.uploadedFileCount=0}set files(t){this._files=[];for(let i=0;i{switch(t.getType()){case"file":default:this.fileTemplate=t.template;break;case"content":this.contentTemplate=t.template;break;case"toolbar":this.toolbarTemplate=t.template}})}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterViewInit(){"advanced"===this.mode&&this.zone.runOutsideAngular(()=>{this.content&&this.content.nativeElement.addEventListener("dragover",this.onDragOver.bind(this))})}choose(){this.advancedFileInput.nativeElement.click()}onFileSelect(t){if("drop"!==t.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.msgs=[],this.multiple||(this.files=[]);let i=t.dataTransfer?t.dataTransfer.files:t.target.files;for(let r=0;rthis.maxFileSize&&(this.msgs.push({severity:"error",summary:this.invalidFileSizeMessageSummary.replace("{0}",t.name),detail:this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}),1))}isFileTypeValid(t){let i=this.accept.split(",").map(r=>r.trim());for(let r of i)if(this.isWildcard(r)?this.getTypeClass(t.type)===this.getTypeClass(r):t.type==r||this.getFileExtension(t).toLowerCase()===r.toLowerCase())return!0;return!1}getTypeClass(t){return t.substring(0,t.indexOf("/"))}isWildcard(t){return-1!==t.indexOf("*")}getFileExtension(t){return"."+t.name.split(".").pop()}isImage(t){return/^image\//.test(t.type)}onImageLoad(t){window.URL.revokeObjectURL(t.src)}upload(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let t=new FormData;this.onBeforeUpload.emit({formData:t});for(let i=0;i{switch(i.type){case In.Sent:this.onSend.emit({originalEvent:i,formData:t});break;case In.Response:this.uploading=!1,this.progress=0,i.status>=200&&i.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:i,files:this.files})):this.onError.emit({files:this.files}),this.clear();break;case In.UploadProgress:i.loaded&&(this.progress=Math.round(100*i.loaded/i.total)),this.onProgress.emit({originalEvent:i,progress:this.progress})}this.cd.markForCheck()},i=>{this.uploading=!1,this.onError.emit({files:this.files,error:i})})}}clear(){this.files=[],this.onClear.emit(),this.clearInputElement(),this.cd.markForCheck()}remove(t,i){this.clearInputElement(),this.onRemove.emit({originalEvent:t,file:this.files[i]}),this.files.splice(i,1),this.checkFileLimit()}isFileLimitExceeded(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit0}onDragEnter(t){this.disabled||(t.stopPropagation(),t.preventDefault())}onDragOver(t){this.disabled||(ce.addClass(this.content.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,t.stopPropagation(),t.preventDefault())}onDragLeave(t){this.disabled||ce.removeClass(this.content.nativeElement,"p-fileupload-highlight")}onDrop(t){if(!this.disabled){ce.removeClass(this.content.nativeElement,"p-fileupload-highlight"),t.stopPropagation(),t.preventDefault();let i=t.dataTransfer?t.dataTransfer.files:t.target.files;(this.multiple||i&&1===i.length)&&this.onFileSelect(t)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(t){if(0==t)return"0 B";let s=Math.floor(Math.log(t)/Math.log(1e3));return parseFloat((t/Math.pow(1e3,s)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][s]}onBasicUploaderClick(){this.hasFiles()?this.upload():this.basicFileInput.nativeElement.click()}onBasicKeydown(t){switch(t.code){case"Space":case"Enter":this.onBasicUploaderClick(),t.preventDefault()}}imageError(t){this.onImageError.emit(t)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(Ic.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(Ic.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(Ic.CANCEL)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.content.nativeElement.removeEventListener("dragover",this.onDragOver),this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(XD),O(Jt),O(tr),O(Kn),O(Vd))},n.\u0275cmp=xe({type:n,selectors:[["p-fileUpload"]],contentQueries:function(t,i,r){if(1&t&&pi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},viewQuery:function(t,i){if(1&t&&(hn(B_e,5),hn(U_e,5),hn(H_e,5)),2&t){let r;Xe(r=et())&&(i.advancedFileInput=r.first),Xe(r=et())&&(i.basicFileInput=r.first),Xe(r=et())&&(i.content=r.first)}},hostAttrs:[1,"p-element"],inputs:{name:"name",url:"url",method:"method",multiple:"multiple",accept:"accept",disabled:"disabled",auto:"auto",withCredentials:"withCredentials",maxFileSize:"maxFileSize",invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:"previewWidth",chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:"showUploadButton",showCancelButton:"showCancelButton",mode:"mode",headers:"headers",customUpload:"customUpload",fileLimit:"fileLimit",uploadStyleClass:"uploadStyleClass",cancelStyleClass:"cancelStyleClass",removeStyleClass:"removeStyleClass",chooseStyleClass:"chooseStyleClass",files:"files"},outputs:{onBeforeUpload:"onBeforeUpload",onSend:"onSend",onUpload:"onUpload",onError:"onError",onClear:"onClear",onRemove:"onRemove",onSelect:"onSelect",onProgress:"onProgress",uploadHandler:"uploadHandler",onImageError:"onImageError"},decls:2,vars:2,consts:[[3,"ngClass","ngStyle","class",4,"ngIf"],["class","p-fileupload p-fileupload-basic p-component",4,"ngIf"],[3,"ngClass","ngStyle"],[1,"p-fileupload-buttonbar"],["pRipple","","tabindex","0",1,"p-button","p-component","p-fileupload-choose",3,"ngClass","focus","blur","click","keydown.enter"],["type","file",3,"multiple","accept","disabled","change"],["advancedfileinput",""],[3,"ngClass"],[1,"p-button-label"],["type","button",3,"label","icon","disabled","styleClass","onClick",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"p-fileupload-content",3,"dragenter","dragleave","drop"],["content",""],[3,"value","showValue",4,"ngIf"],[3,"value","enableService"],["class","p-fileupload-files",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"label","icon","disabled","styleClass","onClick"],[3,"value","showValue"],[1,"p-fileupload-files"],[4,"ngIf"],["class","p-fileupload-row",4,"ngFor","ngForOf"],[1,"p-fileupload-row"],[3,"src","width","error",4,"ngIf"],[1,"p-fileupload-filename"],["type","button","icon","pi pi-times","pButton","",3,"disabled","click"],[3,"src","width","error"],["ngFor","",3,"ngForOf","ngForTemplate"],[1,"p-fileupload","p-fileupload-basic","p-component"],["tabindex","0","pRipple","",3,"ngClass","ngStyle","mouseup","keydown"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"],["class","p-button-label",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur"],["basicfileinput",""]],template:function(t,i){1&t&&(E(0,ive,17,29,"div",0),E(1,ave,6,14,"div",1)),2&t&&(b("ngIf","advanced"===i.mode),C(1),b("ngIf","basic"===i.mode))},dependencies:[yi,Hr,nn,ko,wr,ds,iT,V_e,L_e,Bd],styles:[".p-fileupload-content{position:relative}.p-fileupload-row{display:flex;align-items:center}.p-fileupload-row>div{flex:1 1 auto;width:25%}.p-fileupload-row>div:last-child{text-align:right}.p-fileupload-content .p-progressbar{width:100%;position:absolute;top:0;left:0}.p-button.p-fileupload-choose{position:relative;overflow:hidden}.p-button.p-fileupload-choose input[type=file],.p-fileupload-choose.p-fileupload-choose-selected input[type=file]{display:none}.p-fluid .p-fileupload .p-button{width:auto}.p-fileupload-filename{word-break:break-all}\n"],encapsulation:2,changeDetection:0}),n})(),eV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,xa,ks,Xz,Jz,Oc,xa,ks,Xz,Jz]}),n})();function cve(n,e){if(1&n&&(pt(0),_e(1,"img",3),mt()),2&n){const t=M();C(1),b("src",t.src||t.file.objectURL,Ja)("alt",t.file.name)}}function uve(n,e){if(1&n&&(pt(0),I(1,"video",4),_e(2,"source",5),A(),mt()),2&n){const t=M();C(2),b("src",t.src||t.file.objectURL,Ja)}}function dve(n,e){1&n&&(I(0,"p"),Te(1,"Select an accepted asset type"),A())}class xg{}function hve(n,e){if(1&n){const t=Qe();I(0,"p-fileUpload",2),de("onSelect",function(r){return ge(t),ye(M().onSelectFile(r.files))}),A()}2&n&&b("accept",M().type+"/*")("customUpload",!0)}function fve(n,e){if(1&n&&_e(0,"dot-asset-preview",11),2&n){const t=M(2);b("type",t.type)("file",t.file)("src",t.src)}}function pve(n,e){if(1&n&&(I(0,"span",13),Te(1),A()),2&n){const t=M(3);C(1),Ot(t.error)}}function mve(n,e){1&n&&E(0,pve,2,1,"ng-template",null,12,Bn)}function gve(n,e){if(1&n){const t=Qe();I(0,"div",3),E(1,fve,1,3,"dot-asset-preview",4),E(2,mve,2,0,null,5),A(),I(3,"div",6)(4,"div",7),_e(5,"dot-spinner",8),I(6,"span",9),de("@shakeit.done",function(r){return ge(t),ye(M().shakeEnd(r))}),Te(7),A()(),I(8,"button",10),de("click",function(){return ge(t),ye(M().cancelAction())}),Te(9," Cancel "),A()()}if(2&n){const t=M();C(1),b("ngIf","UPLOAD"===t.status),C(1),b("ngIf","ERROR"===t.status),C(3),b("size","30px"),C(1),b("@shakeit",t.animation),C(1),Vi(" ",t.errorMessage," ")}}xg.\u0275fac=function(e){return new(e||xg)},xg.\u0275cmp=xe({type:xg,selectors:[["dot-asset-preview"]],inputs:{type:"type",file:"file",src:"src"},decls:4,vars:3,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"src","alt"],["controls","","preload","metadata"],[3,"src"]],template:function(e,t){1&e&&(pt(0,0),E(1,cve,2,2,"ng-container",1),E(2,uve,3,1,"ng-container",1),E(3,dve,2,0,"p",2),mt()),2&e&&(b("ngSwitch",t.type),C(1),b("ngSwitchCase","image"),C(1),b("ngSwitchCase","video"))},dependencies:[Od,__,v_],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;align-items:center}[_nghost-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;max-height:100%;max-width:100%;object-fit:contain}"],changeDetection:0});var Zs=(()=>(function(n){n.SELECT="SELECT",n.PREVIEW="PREVIEW",n.UPLOAD="UPLOAD",n.ERROR="ERROR"}(Zs||(Zs={})),Zs))();class Ig{constructor(e,t,i,r){this.sanitizer=e,this.dotUploadFileService=t,this.cd=i,this.el=r,this.uploadedFile=new re,this.preventClose=new re,this.hide=new re,this.status=Zs.SELECT,this.animation="shakeend"}get errorMessage(){return` Don't close this window while the ${this.type} uploads`}onClick(e){const t=!this.el.nativeElement.contains(e);this.status===Zs.UPLOAD&&t&&this.shakeMe()}ngOnDestroy(){this.preventClose.emit(!1)}onSelectFile(e){const t=e[0],i=new FileReader;this.preventClose.emit(!0),i.onload=r=>this.setFile(t,r.target.result),i.readAsArrayBuffer(t)}cancelAction(){this.file=null,this.status=Zs.SELECT,this.cancelUploading(),this.hide.emit(!0)}shakeEnd(){this.animation="shakeend"}shakeMe(){"shakestart"!==this.animation&&(this.animation="shakestart")}uploadFile(){this.controller=new AbortController,this.status=Zs.UPLOAD,this.$uploadRequestSubs=this.dotUploadFileService.publishContent({data:this.file,signal:this.controller.signal}).pipe(Tt(1),Ai(e=>this.handleError(e))).subscribe(e=>{const t=e[0];this.uploadedFile.emit(t[Object.keys(t)[0]]),this.status=Zs.SELECT})}setFile(e,t){const i=new Blob([new Uint8Array(t)],{type:"video/mp4"});this.src=this.sanitizer.bypassSecurityTrustResourceUrl(URL.createObjectURL(i)),this.file=e,this.status=Zs.UPLOAD,this.uploadFile(),this.cd.markForCheck()}handleError(e){return this.status=Zs.ERROR,this.preventClose.emit(!1),this.error=e?.error?.errors[0]||e.error,console.error(e),ho(e)}cancelUploading(){this.$uploadRequestSubs.unsubscribe(),this.controller?.abort()}}Ig.\u0275fac=function(e){return new(e||Ig)(O(XD),O(Ys),O(Kn),O(kt))},Ig.\u0275cmp=xe({type:Ig,selectors:[["dot-upload-asset"]],hostBindings:function(e,t){1&e&&de("click",function(r){return t.onClick(r.target)},0,FI)},inputs:{type:"type"},outputs:{uploadedFile:"uploadedFile",preventClose:"preventClose",hide:"hide"},decls:3,vars:2,consts:[["chooseLabel","browse files","mode","basic",3,"accept","customUpload","onSelect",4,"ngIf","ngIfElse"],["preview",""],["chooseLabel","browse files","mode","basic",3,"accept","customUpload","onSelect"],[1,"preview-container"],[3,"type","file","src",4,"ngIf"],[4,"ngIf"],[1,"action-container"],[1,"loading-message"],[3,"size"],[1,"warning"],["data-test-id","back-btn","pButton","",1,"p-button-outlined",3,"click"],[3,"type","file","src"],["errorTemplate",""],[1,"error"]],template:function(e,t){if(1&e&&(E(0,hve,1,2,"p-fileUpload",0),E(1,gve,10,5,"ng-template",null,1,Bn)),2&e){const i=Cn(2);b("ngIf","SELECT"===t.status)("ngIfElse",i)}},dependencies:[nn,Rh,ds,lve,xg],styles:["[_nghost-%COMP%]{height:100%;width:100%;padding:1rem;gap:1rem;display:flex;justify-content:center;align-items:center;flex-direction:column}[_nghost-%COMP%] .error[_ngcontent-%COMP%]{color:#d82b2e;font-size:1.25rem;max-width:100%;white-space:pre-wrap}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-grow:1;justify-content:center;overflow:hidden;width:100%;flex-direction:column}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] .action-container[_ngcontent-%COMP%]{display:flex;height:-moz-fit-content;height:fit-content;justify-content:space-between;width:100%}[_nghost-%COMP%] .loading-message[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:1rem}[_nghost-%COMP%] .warning[_ngcontent-%COMP%]{display:block;font-style:normal;text-align:center;color:#14151a}"],data:{animation:[b_e]},changeDetection:0});let nV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,OF,Oc,og,OF,og]}),n})();function Hve(n,e){1&n&&Dt(0)}function $ve(n,e){if(1&n&&(pt(0),E(1,Hve,1,0,"ng-container",3),mt()),2&n){const t=M(2);C(1),b("ngTemplateOutlet",t.contentTemplate)}}function Wve(n,e){if(1&n&&(I(0,"div",1),_r(1),E(2,$ve,2,1,"ng-container",2),A()),2&n){const t=M();b("hidden",!t.selected),Yt("id",t.id)("aria-hidden",!t.selected)("aria-labelledby",t.id+"-label"),C(2),b("ngIf",t.contentTemplate&&(t.cache?t.loaded:t.selected))}}const iV=["*"],Gve=["content"],Yve=["navbar"],qve=["prevBtn"],Kve=["nextBtn"],Qve=["inkbar"];function Zve(n,e){if(1&n){const t=Qe();I(0,"button",12,13),de("click",function(){return ge(t),ye(M().navBackward())}),_e(2,"span",14),A()}}function Jve(n,e){1&n&&_e(0,"span",24),2&n&&b("ngClass",M(3).$implicit.leftIcon)}function Xve(n,e){1&n&&_e(0,"span",25),2&n&&b("ngClass",M(3).$implicit.rightIcon)}function ebe(n,e){if(1&n&&(pt(0),E(1,Jve,1,1,"span",21),I(2,"span",22),Te(3),A(),E(4,Xve,1,1,"span",23),mt()),2&n){const t=M(2).$implicit;C(1),b("ngIf",t.leftIcon),C(2),Ot(t.header),C(1),b("ngIf",t.rightIcon)}}function tbe(n,e){1&n&&Dt(0)}function nbe(n,e){if(1&n){const t=Qe();I(0,"span",26),de("click",function(r){ge(t);const o=M(2).$implicit;return ye(M().close(r,o))}),A()}}const ibe=function(n,e){return{"p-highlight":n,"p-disabled":e}};function rbe(n,e){if(1&n){const t=Qe();I(0,"li",16)(1,"a",17),de("click",function(r){ge(t);const o=M().$implicit;return ye(M().open(r,o))})("keydown.enter",function(r){ge(t);const o=M().$implicit;return ye(M().open(r,o))}),E(2,ebe,5,3,"ng-container",18),E(3,tbe,1,0,"ng-container",19),E(4,nbe,1,0,"span",20),A()()}if(2&n){const t=M().$implicit;Dn(t.headerStyleClass),b("ngClass",Mi(16,ibe,t.selected,t.disabled))("ngStyle",t.headerStyle),C(1),b("pTooltip",t.tooltip)("tooltipPosition",t.tooltipPosition)("positionStyle",t.tooltipPositionStyle)("tooltipStyleClass",t.tooltipStyleClass),Yt("id",t.id+"-label")("aria-selected",t.selected)("aria-controls",t.id)("aria-selected",t.selected)("tabindex",t.disabled?null:"0"),C(1),b("ngIf",!t.headerTemplate),C(1),b("ngTemplateOutlet",t.headerTemplate),C(1),b("ngIf",t.closable)}}function obe(n,e){1&n&&E(0,rbe,5,19,"li",15),2&n&&b("ngIf",!e.$implicit.closed)}function sbe(n,e){if(1&n){const t=Qe();I(0,"button",27,28),de("click",function(){return ge(t),ye(M().navForward())}),_e(2,"span",29),A()}}const abe=function(n){return{"p-tabview p-component":!0,"p-tabview-scrollable":n}};let lbe=0,rV=(()=>{class n{constructor(t,i,r){this.viewContainer=i,this.cd=r,this.cache=!0,this.tooltipPosition="top",this.tooltipPositionStyle="absolute",this.id="p-tabpanel-"+lbe++,this.tabView=t}ngAfterContentInit(){this.templates.forEach(t=>{"header"===t.getType()?this.headerTemplate=t.template:this.contentTemplate=t.template})}get selected(){return this._selected}set selected(t){this._selected=t,this.loaded||this.cd.detectChanges(),t&&(this.loaded=!0)}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this.tabView.cd.markForCheck()}get header(){return this._header}set header(t){this._header=t,Promise.resolve().then(()=>{this.tabView.updateInkBar(),this.tabView.cd.markForCheck()})}get leftIcon(){return this._leftIcon}set leftIcon(t){this._leftIcon=t,this.tabView.cd.markForCheck()}get rightIcon(){return this._rightIcon}set rightIcon(t){this._rightIcon=t,this.tabView.cd.markForCheck()}ngOnDestroy(){this.view=null}}return n.\u0275fac=function(t){return new(t||n)(O(Bt(()=>oV)),O(Br),O(Kn))},n.\u0275cmp=xe({type:n,selectors:[["p-tabPanel"]],contentQueries:function(t,i,r){if(1&t&&pi(r,rr,4),2&t){let o;Xe(o=et())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{closable:"closable",headerStyle:"headerStyle",headerStyleClass:"headerStyleClass",cache:"cache",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",selected:"selected",disabled:"disabled",header:"header",leftIcon:"leftIcon",rightIcon:"rightIcon"},ngContentSelectors:iV,decls:1,vars:1,consts:[["class","p-tabview-panel","role","tabpanel",3,"hidden",4,"ngIf"],["role","tabpanel",1,"p-tabview-panel",3,"hidden"],[4,"ngIf"],[4,"ngTemplateOutlet"]],template:function(t,i){1&t&&(So(),E(0,Wve,3,5,"div",0)),2&t&&b("ngIf",!i.closed)},dependencies:[nn,ko],encapsulation:2}),n})(),oV=(()=>{class n{constructor(t,i){this.el=t,this.cd=i,this.orientation="top",this.onChange=new re,this.onClose=new re,this.activeIndexChange=new re,this.backwardIsDisabled=!0,this.forwardIsDisabled=!1}ngAfterContentInit(){this.initTabs(),this.tabChangesSubscription=this.tabPanels.changes.subscribe(t=>{this.initTabs()})}ngAfterViewChecked(){this.tabChanged&&(this.updateInkBar(),this.tabChanged=!1)}ngOnDestroy(){this.tabChangesSubscription&&this.tabChangesSubscription.unsubscribe()}initTabs(){this.tabs=this.tabPanels.toArray(),!this.findSelectedTab()&&this.tabs.length&&(null!=this.activeIndex&&this.tabs.length>this.activeIndex?this.tabs[this.activeIndex].selected=!0:this.tabs[0].selected=!0,this.tabChanged=!0),this.cd.markForCheck()}open(t,i){if(i.disabled)t&&t.preventDefault();else{if(!i.selected){let r=this.findSelectedTab();r&&(r.selected=!1),this.tabChanged=!0,i.selected=!0;let o=this.findTabIndex(i);this.preventActiveIndexPropagation=!0,this.activeIndexChange.emit(o),this.onChange.emit({originalEvent:t,index:o}),this.updateScrollBar(o)}t&&t.preventDefault()}}close(t,i){this.controlClose?this.onClose.emit({originalEvent:t,index:this.findTabIndex(i),close:()=>{this.closeTab(i)}}):(this.closeTab(i),this.onClose.emit({originalEvent:t,index:this.findTabIndex(i)})),t.stopPropagation()}closeTab(t){if(!t.disabled){if(t.selected){this.tabChanged=!0,t.selected=!1;for(let i=0;ithis._activeIndex&&(this.findSelectedTab().selected=!1,this.tabs[this._activeIndex].selected=!0,this.tabChanged=!0,this.updateScrollBar(t))}updateInkBar(){if(this.navbar){const t=ce.findSingle(this.navbar.nativeElement,"li.p-highlight");if(!t)return;this.inkbar.nativeElement.style.width=ce.getWidth(t)+"px",this.inkbar.nativeElement.style.left=ce.getOffset(t).left-ce.getOffset(this.navbar.nativeElement).left+"px"}}updateScrollBar(t){this.navbar.nativeElement.children[t].scrollIntoView({block:"nearest"})}updateButtonState(){const t=this.content.nativeElement,{scrollLeft:i,scrollWidth:r}=t,o=ce.getWidth(t);this.backwardIsDisabled=0===i,this.forwardIsDisabled=parseInt(i)===r-o}onScroll(t){this.scrollable&&this.updateButtonState(),t.preventDefault()}getVisibleButtonWidths(){return[this.prevBtn?.nativeElement,this.nextBtn?.nativeElement].reduce((t,i)=>i?t+ce.getWidth(i):t,0)}navBackward(){const t=this.content.nativeElement,i=ce.getWidth(t)-this.getVisibleButtonWidths(),r=t.scrollLeft-i;t.scrollLeft=r<=0?0:r}navForward(){const t=this.content.nativeElement,i=ce.getWidth(t)-this.getVisibleButtonWidths(),r=t.scrollLeft+i,o=t.scrollWidth-i;t.scrollLeft=r>=o?o:r}}return n.\u0275fac=function(t){return new(t||n)(O(kt),O(Kn))},n.\u0275cmp=xe({type:n,selectors:[["p-tabView"]],contentQueries:function(t,i,r){if(1&t&&pi(r,rV,4),2&t){let o;Xe(o=et())&&(i.tabPanels=o)}},viewQuery:function(t,i){if(1&t&&(hn(Gve,5),hn(Yve,5),hn(qve,5),hn(Kve,5),hn(Qve,5)),2&t){let r;Xe(r=et())&&(i.content=r.first),Xe(r=et())&&(i.navbar=r.first),Xe(r=et())&&(i.prevBtn=r.first),Xe(r=et())&&(i.nextBtn=r.first),Xe(r=et())&&(i.inkbar=r.first)}},hostAttrs:[1,"p-element"],inputs:{orientation:"orientation",style:"style",styleClass:"styleClass",controlClose:"controlClose",scrollable:"scrollable",activeIndex:"activeIndex"},outputs:{onChange:"onChange",onClose:"onClose",activeIndexChange:"activeIndexChange"},ngContentSelectors:iV,decls:13,vars:9,consts:[[3,"ngClass","ngStyle"],[1,"p-tabview-nav-container"],["class","p-tabview-nav-prev p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-nav-content",3,"scroll"],["content",""],["role","tablist",1,"p-tabview-nav"],["navbar",""],["ngFor","",3,"ngForOf"],[1,"p-tabview-ink-bar"],["inkbar",""],["class","p-tabview-nav-next p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-panels"],["type","button","pRipple","",1,"p-tabview-nav-prev","p-tabview-nav-btn","p-link",3,"click"],["prevBtn",""],[1,"pi","pi-chevron-left"],["role","presentation",3,"ngClass","ngStyle","class",4,"ngIf"],["role","presentation",3,"ngClass","ngStyle"],["role","tab","pRipple","",1,"p-tabview-nav-link",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","click","keydown.enter"],[4,"ngIf"],[4,"ngTemplateOutlet"],["class","p-tabview-close pi pi-times",3,"click",4,"ngIf"],["class","p-tabview-left-icon",3,"ngClass",4,"ngIf"],[1,"p-tabview-title"],["class","p-tabview-right-icon",3,"ngClass",4,"ngIf"],[1,"p-tabview-left-icon",3,"ngClass"],[1,"p-tabview-right-icon",3,"ngClass"],[1,"p-tabview-close","pi","pi-times",3,"click"],["type","button","pRipple","",1,"p-tabview-nav-next","p-tabview-nav-btn","p-link",3,"click"],["nextBtn",""],[1,"pi","pi-chevron-right"]],template:function(t,i){1&t&&(So(),I(0,"div",0)(1,"div",1),E(2,Zve,3,0,"button",2),I(3,"div",3,4),de("scroll",function(o){return i.onScroll(o)}),I(5,"ul",5,6),E(7,obe,1,1,"ng-template",7),_e(8,"li",8,9),A()(),E(10,sbe,3,0,"button",10),A(),I(11,"div",11),_r(12),A()()),2&t&&(Dn(i.styleClass),b("ngClass",xt(7,abe,i.scrollable))("ngStyle",i.style),C(2),b("ngIf",i.scrollable&&!i.backwardIsDisabled),C(5),b("ngForOf",i.tabs),C(3),b("ngIf",i.scrollable&&!i.forwardIsDisabled))},dependencies:[yi,Hr,nn,ko,wr,rg,Bd],styles:[".p-tabview-nav-container{position:relative}.p-tabview-scrollable .p-tabview-nav-container{overflow:hidden}.p-tabview-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior:contain auto}.p-tabview-nav{display:flex;margin:0;padding:0;list-style-type:none;flex:1 1 auto}.p-tabview-nav-link{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabview-ink-bar{display:none;z-index:1}.p-tabview-nav-link:focus{z-index:1}.p-tabview-title{line-height:1;white-space:nowrap}.p-tabview-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabview-nav-prev{left:0}.p-tabview-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabview-close{z-index:1}\n"],encapsulation:2,changeDetection:0}),n})(),sV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=rt({type:n}),n.\u0275inj=wt({imports:[zn,xa,og,Oc,xa]}),n})();class Cu{}Cu.\u0275fac=function(e){return new(e||Cu)},Cu.\u0275mod=rt({type:Cu}),Cu.\u0275inj=wt({imports:[nV,fz,ks,pz,cz,_T,nT,sV,Zz,N5,eV,sM,nV,fz,ks,pz,cz,_T,nT,sV,Zz,N5,eV,sM]});class Yh{}Yh.\u0275fac=function(e){return new(e||Yh)},Yh.\u0275mod=rt({type:Yh}),Yh.\u0275inj=wt({providers:[Ys],imports:[zn,Y_,q_,fu,Cu]}),wi(Lh,[rr,oV,rV,Eg,Sg,Ig],[]);class Du{}Du.\u0275fac=function(e){return new(e||Du)},Du.\u0275mod=rt({type:Du}),Du.\u0275inj=wt({providers:[Fl],imports:[zn,Y_,q_,ks]}),wi(zl,[Hr,nn,Sh,lu,Th],[]);class qh{}qh.\u0275fac=function(e){return new(e||qh)},qh.\u0275mod=rt({type:qh}),qh.\u0275inj=wt({providers:[Ys,mo,Nc,jl],imports:[zn,Y_,q_,Du,Cu,Yh,Bh,q_,Du]}),wi(Wh,[Hr,nn,hg],[]),wi($h,[nn,Fd,sl,Dc,kd,Ta,Mc,$S,ds,cg,dg,Hh],[]),wi(Hh,[Hr,nn,Sh,lu,wm,Th],[]);class cbe extends TypeError{constructor(e,t){let i;const{message:r,explanation:o,...s}=e,{path:a}=e,l=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(o??l),null!=o&&(this.cause=l),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>i??(i=[e,...t()])}}function Go(n){return"object"==typeof n&&null!=n}function xi(n){return"symbol"==typeof n?n.toString():"string"==typeof n?JSON.stringify(n):`${n}`}function hbe(n,e,t,i){if(!0===n)return;!1===n?n={}:"string"==typeof n&&(n={message:n});const{path:r,branch:o}=e,{type:s}=t,{refinement:a,message:l=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${xi(i)}\``}=n;return{value:i,type:s,refinement:a,key:r[r.length-1],path:r,branch:o,...n,message:l}}function*nE(n,e,t,i){(function ube(n){return Go(n)&&"function"==typeof n[Symbol.iterator]})(n)||(n=[n]);for(const r of n){const o=hbe(r,e,t,i);o&&(yield o)}}function*iE(n,e,t={}){const{path:i=[],branch:r=[n],coerce:o=!1,mask:s=!1}=t,a={path:i,branch:r};if(o&&(n=e.coercer(n,a),s&&"type"!==e.type&&Go(e.schema)&&Go(n)&&!Array.isArray(n)))for(const c in n)void 0===e.schema[c]&&delete n[c];let l="valid";for(const c of e.validator(n,a))c.explanation=t.message,l="not_valid",yield[c,void 0];for(let[c,u,d]of e.entries(n,a)){const h=iE(u,d,{path:void 0===c?i:[...i,c],branch:void 0===c?r:[...r,u],coerce:o,mask:s,message:t.message});for(const f of h)f[0]?(l=null!=f[0].refinement?"not_refined":"not_valid",yield[f[0],void 0]):o&&(u=f[1],void 0===c?n=u:n instanceof Map?n.set(c,u):n instanceof Set?n.add(u):Go(n)&&(void 0!==u||c in n)&&(n[c]=u))}if("not_valid"!==l)for(const c of e.refiner(n,a))c.explanation=t.message,l="not_refined",yield[c,void 0];"valid"===l&&(yield[void 0,n])}class _i{constructor(e){const{type:t,schema:i,validator:r,refiner:o,coercer:s=(l=>l),entries:a=function*(){}}=e;this.type=t,this.schema=i,this.entries=a,this.coercer=s,this.validator=r?(l,c)=>nE(r(l,c),c,this,l):()=>[],this.refiner=o?(l,c)=>nE(o(l,c),c,this,l):()=>[]}assert(e,t){return lV(e,this,t)}create(e,t){return function fbe(n,e,t){const i=Ag(n,e,{coerce:!0,message:t});if(i[0])throw i[0];return i[1]}(e,this,t)}is(e){return function cV(n,e){return!Ag(n,e)[0]}(e,this)}mask(e,t){return function pbe(n,e,t){const i=Ag(n,e,{coerce:!0,mask:!0,message:t});if(i[0])throw i[0];return i[1]}(e,this,t)}validate(e,t={}){return Ag(e,this,t)}}function lV(n,e,t){const i=Ag(n,e,{message:t});if(i[0])throw i[0]}function Ag(n,e,t={}){const i=iE(n,e,t),r=function dbe(n){const{done:e,value:t}=n.next();return e?void 0:t}(i);return r[0]?[new cbe(r[0],function*(){for(const s of i)s[0]&&(yield s[0])}),void 0]:[void 0,r[1]]}function vo(n,e){return new _i({type:n,schema:null,validator:e})}function uV(n){return new _i({type:"array",schema:n,*entries(e){if(n&&Array.isArray(e))for(const[t,i]of e.entries())yield[t,i,n]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${xi(e)}`})}function Mu(n){const e=n?Object.keys(n):[],t=function dV(){return vo("never",()=>!1)}();return new _i({type:"object",schema:n||null,*entries(i){if(n&&Go(i)){const r=new Set(Object.keys(i));for(const o of e)r.delete(o),yield[o,i[o],n[o]];for(const o of r)yield[o,i[o],t]}},validator:i=>Go(i)||`Expected an object, but received: ${xi(i)}`,coercer:i=>Go(i)?{...i}:i})}function hV(n){return new _i({...n,validator:(e,t)=>void 0===e||n.validator(e,t),refiner:(e,t)=>void 0===e||n.refiner(e,t)})}function kg(){return vo("string",n=>"string"==typeof n||`Expected a string, but received: ${xi(n)}`)}const gbe=vn.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=n=>{const e=n?.node||this.editor.state.doc;return"textSize"===(n?.mode||this.options.mode)?e.textBetween(0,e.content.size,void 0," ").length:e.nodeSize},this.storage.words=n=>{const e=n?.node||this.editor.state.doc;return e.textBetween(0,e.content.size," "," ").split(" ").filter(r=>""!==r).length}},addProseMirrorPlugins(){return[new $t({key:new rn("characterCount"),filterTransaction:(n,e)=>{const t=this.options.limit;if(!n.docChanged||0===t||null==t)return!0;const i=this.storage.characters({node:e.doc}),r=this.storage.characters({node:n.doc});if(r<=t||i>t&&r>t&&r<=i)return!0;if(i>t&&r>t&&r>i||!n.getMeta("paste"))return!1;const s=n.selection.$head.pos;return n.deleteRange(s-(r-t),s),!(this.storage.characters({node:n.doc})>t)}})]}}),ybe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,_be=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,vbe=Or.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:n}){return["mark",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[su({find:ybe,type:this.type})]},addPasteRules(){return[Pl({find:_be,type:this.type})]}}),Tu=(n,e)=>{for(const t in e)n[t]=e[t];return n},rE="numeric",oE="ascii",sE="alpha",_0="asciinumeric",v0="alphanumeric",aE="domain",yV="whitespace";function Mbe(n,e){return n in e||(e[n]=[]),e[n]}function Su(n,e,t){e[rE]&&(e[_0]=!0,e[v0]=!0),e[oE]&&(e[_0]=!0,e[sE]=!0),e[_0]&&(e[v0]=!0),e[sE]&&(e[v0]=!0),e[v0]&&(e[aE]=!0),e.emoji&&(e[aE]=!0);for(const i in e){const r=Mbe(i,t);r.indexOf(n)<0&&r.push(n)}}function Xr(n){void 0===n&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}Xr.groups={},Xr.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let i=0;i=0&&(t[i]=!0);return t}(s.t,i),t);Su(o,l,i)}else t&&Su(o,t,i);s.t=o}return r.j[n]=s,s}};const We=(n,e,t,i,r)=>n.ta(e,t,i,r),Yo=(n,e,t,i,r)=>n.tr(e,t,i,r),_V=(n,e,t,i,r)=>n.ts(e,t,i,r),pe=(n,e,t,i,r)=>n.tt(e,t,i,r),Ba="WORD",lE="UWORD",Ng="LOCALHOST",uE="UTLD",b0="SCHEME",Qh="SLASH_SCHEME",Zh="OPENBRACE",Pg="OPENBRACKET",Lg="OPENANGLEBRACKET",Rg="OPENPAREN",Eu="CLOSEBRACE",Jh="CLOSEBRACKET",Xh="CLOSEANGLEBRACKET",xu="CLOSEPAREN",w0="AMPERSAND",C0="APOSTROPHE",D0="ASTERISK",Hl="AT",M0="BACKSLASH",T0="BACKTICK",S0="CARET",$l="COLON",fE="COMMA",E0="DOLLAR",Js="DOT",x0="EQUALS",pE="EXCLAMATION",Xs="HYPHEN",I0="PERCENT",O0="PIPE",A0="PLUS",k0="POUND",N0="QUERY",mE="QUOTE",gE="SEMI",ea="SLASH",Fg="TILDE",P0="UNDERSCORE",L0="SYM";var wV=Object.freeze({__proto__:null,WORD:Ba,UWORD:lE,LOCALHOST:Ng,TLD:"TLD",UTLD:uE,SCHEME:b0,SLASH_SCHEME:Qh,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:Zh,OPENBRACKET:Pg,OPENANGLEBRACKET:Lg,OPENPAREN:Rg,CLOSEBRACE:Eu,CLOSEBRACKET:Jh,CLOSEANGLEBRACKET:Xh,CLOSEPAREN:xu,AMPERSAND:w0,APOSTROPHE:C0,ASTERISK:D0,AT:Hl,BACKSLASH:M0,BACKTICK:T0,CARET:S0,COLON:$l,COMMA:fE,DOLLAR:E0,DOT:Js,EQUALS:x0,EXCLAMATION:pE,HYPHEN:Xs,PERCENT:I0,PIPE:O0,PLUS:A0,POUND:k0,QUERY:N0,QUOTE:mE,SEMI:gE,SLASH:ea,TILDE:Fg,UNDERSCORE:P0,EMOJI:"EMOJI",SYM:L0});const Iu=/[a-z]/,R0=/\p{L}/u,F0=/\p{Emoji}/u,j0=/\d/,yE=/\s/;let z0=null,V0=null;function Wl(n,e,t,i,r){let o;const s=e.length;for(let a=0;a=0;)o++;if(o>0){e.push(t.join(""));for(let s=parseInt(n.substring(i,i+o),10);s>0;s--)t.pop();i+=o}else t.push(n[i]),i++}return e}const ef={defaultProtocol:"http",events:null,format:MV,formatHref:MV,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function B0(n,e){void 0===e&&(e=null);let t=Tu({},ef);n&&(t=Tu(t,n instanceof B0?n.o:n));const i=t.ignoreTags,r=[];for(let o=0;on,check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const i=null!=e;let r=this.o[n];return r&&("object"==typeof r?(r=t.t in r?r[t.t]:ef[n],"function"==typeof r&&i&&(r=r(e,t))):"function"==typeof r&&i&&(r=r(e,t.t,t)),r)},getObj(n,e,t){let i=this.o[n];return"function"==typeof i&&null!=e&&(i=i(e,t.t,t)),i},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}},U0.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),i=n.get("format",e,this);return t&&i.length>t?i.substring(0,t)+"\u2026":i},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return void 0===n&&(n=ef.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),i=n.get("formatHref",t,this),r=n.get("tagName",t,e),o=this.toFormattedString(n),s={},a=n.get("className",t,e),l=n.get("target",t,e),c=n.get("rel",t,e),u=n.getObj("attributes",t,e),d=n.getObj("events",t,e);return s.href=i,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&Tu(s,u),{tagName:r,attributes:s,content:o,eventListeners:d}}};const _E=jg("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),vE=jg("text"),TV=jg("nl"),Gl=jg("url",{isLink:!0,toHref(n){return void 0===n&&(n=ef.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==Ng&&n[1].t===$l}}),Li=n=>new Xr(n);function bE(n,e,t){return new n(e.slice(t[0].s,t[t.length-1].e),t)}const zg=typeof console<"u"&&console&&console.warn||(()=>{}),an={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function SV(n,e){if(void 0===e&&(e=!1),an.initialized&&zg(`linkifyjs: already initialized - will not register custom scheme "${n}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error('linkifyjs: incorrect scheme format.\n 1. Must only contain digits, lowercase ASCII letters or "-"\n 2. Cannot start or end with "-"\n 3. "-" cannot repeat');an.customSchemes.push([n,e])}function EV(n){return an.initialized||function Lbe(){an.scanner=function Ibe(n){void 0===n&&(n=[]);const e={};Xr.groups=e;const t=new Xr;null==z0&&(z0=DV("aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==V0&&(V0=DV("\u03b5\u03bb1\u03c52\u0431\u04331\u0435\u043b3\u0434\u0435\u0442\u04384\u0435\u044e2\u043a\u0430\u0442\u043e\u043b\u0438\u043a6\u043e\u043c3\u043c\u043a\u04342\u043e\u043d1\u0441\u043a\u0432\u04306\u043e\u043d\u043b\u0430\u0439\u043d5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043a\u04403\u049b\u0430\u04373\u0570\u0561\u05753\u05d9\u05e9\u05e8\u05d0\u05dc5\u05e7\u05d5\u05dd3\u0627\u0628\u0648\u0638\u0628\u064a5\u062a\u0635\u0627\u0644\u0627\u062a6\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062f\u06464\u0628\u062d\u0631\u064a\u06465\u062c\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062f\u064a\u06296\u0639\u0644\u064a\u0627\u06465\u0645\u063a\u0631\u06285\u0645\u0627\u0631\u0627\u062a5\u06cc\u0631\u0627\u06465\u0628\u0627\u0631\u062a2\u0632\u0627\u06314\u064a\u062a\u06433\u06be\u0627\u0631\u062a5\u062a\u0648\u0646\u06334\u0633\u0648\u062f\u0627\u06463\u0631\u064a\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064a\u06466\u0642\u0637\u06313\u0643\u0627\u062b\u0648\u0644\u064a\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064a\u0633\u064a\u06275\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067e\u0627\u06a9\u0633\u062a\u0627\u06467\u0680\u0627\u0631\u062a4\u0915\u0949\u092e3\u0928\u0947\u091f3\u092d\u093e\u0930\u09240\u092e\u094d3\u094b\u09245\u0938\u0902\u0917\u0920\u09285\u09ac\u09be\u0982\u09b2\u09be5\u09ad\u09be\u09b0\u09a42\u09f0\u09a44\u0a2d\u0a3e\u0a30\u0a244\u0aad\u0abe\u0ab0\u0aa44\u0b2d\u0b3e\u0b30\u0b244\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe6\u0bb2\u0b99\u0bcd\u0b95\u0bc86\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd11\u0c2d\u0c3e\u0c30\u0c24\u0c4d5\u0cad\u0cbe\u0cb0\u0ca44\u0d2d\u0d3e\u0d30\u0d24\u0d025\u0dbd\u0d82\u0d9a\u0dcf4\u0e04\u0e2d\u0e213\u0e44\u0e17\u0e223\u0ea5\u0eb2\u0ea73\u10d2\u10d42\u307f\u3093\u306a3\u30a2\u30de\u30be\u30f34\u30af\u30e9\u30a6\u30c94\u30b0\u30fc\u30b0\u30eb4\u30b3\u30e02\u30b9\u30c8\u30a23\u30bb\u30fc\u30eb3\u30d5\u30a1\u30c3\u30b7\u30e7\u30f36\u30dd\u30a4\u30f3\u30c84\u4e16\u754c2\u4e2d\u4fe11\u56fd1\u570b1\u6587\u7f513\u4e9a\u9a6c\u900a3\u4f01\u4e1a2\u4f5b\u5c712\u4fe1\u606f2\u5065\u5eb72\u516b\u53662\u516c\u53f81\u76ca2\u53f0\u6e7e1\u70632\u5546\u57ce1\u5e971\u68072\u5609\u91cc0\u5927\u9152\u5e975\u5728\u7ebf2\u5927\u62ff2\u5929\u4e3b\u65593\u5a31\u4e502\u5bb6\u96fb2\u5e7f\u4e1c2\u5fae\u535a2\u6148\u55842\u6211\u7231\u4f603\u624b\u673a2\u62db\u80582\u653f\u52a11\u5e9c2\u65b0\u52a0\u57612\u95fb2\u65f6\u5c1a2\u66f8\u7c4d2\u673a\u67842\u6de1\u9a6c\u95213\u6e38\u620f2\u6fb3\u95802\u70b9\u770b2\u79fb\u52a82\u7ec4\u7ec7\u673a\u67844\u7f51\u57401\u5e971\u7ad91\u7edc2\u8054\u901a2\u8c37\u6b4c2\u8d2d\u72692\u901a\u8ca92\u96c6\u56e22\u96fb\u8a0a\u76c8\u79d14\u98de\u5229\u6d663\u98df\u54c12\u9910\u53852\u9999\u683c\u91cc\u62c93\u6e2f2\ub2f7\ub1371\ucef42\uc0bc\uc1312\ud55c\uad6d2")),pe(t,"'",C0),pe(t,"{",Zh),pe(t,"[",Pg),pe(t,"<",Lg),pe(t,"(",Rg),pe(t,"}",Eu),pe(t,"]",Jh),pe(t,">",Xh),pe(t,")",xu),pe(t,"&",w0),pe(t,"*",D0),pe(t,"@",Hl),pe(t,"`",T0),pe(t,"^",S0),pe(t,":",$l),pe(t,",",fE),pe(t,"$",E0),pe(t,".",Js),pe(t,"=",x0),pe(t,"!",pE),pe(t,"-",Xs),pe(t,"%",I0),pe(t,"|",O0),pe(t,"+",A0),pe(t,"#",k0),pe(t,"?",N0),pe(t,'"',mE),pe(t,"/",ea),pe(t,";",gE),pe(t,"~",Fg),pe(t,"_",P0),pe(t,"\\",M0);const i=Yo(t,j0,"NUM",{[rE]:!0});Yo(i,j0,i);const r=Yo(t,Iu,Ba,{[oE]:!0});Yo(r,Iu,r);const o=Yo(t,R0,lE,{[sE]:!0});Yo(o,Iu),Yo(o,R0,o);const s=Yo(t,yE,"WS",{[yV]:!0});pe(t,"\n","NL",{[yV]:!0}),pe(s,"\n"),Yo(s,yE,s);const a=Yo(t,F0,"EMOJI",{emoji:!0});Yo(a,F0,a),pe(a,"\ufe0f",a);const l=pe(a,"\u200d");Yo(l,F0,a);const c=[[Iu,r]],u=[[Iu,null],[R0,o]];for(let d=0;dd[0]>h[0]?1:-1);for(let d=0;d=0?p[aE]=!0:Iu.test(h)?j0.test(h)?p[_0]=!0:p[oE]=!0:p[rE]=!0,_V(t,h,h,p)}return _V(t,"localhost",Ng,{ascii:!0}),t.jd=new Xr(L0),{start:t,tokens:Tu({groups:e},wV)}}(an.customSchemes);for(let n=0;n=0&&h++,r++,u++;if(h<0)r-=u,r0&&(o.push(bE(vE,e,s)),s=[]),r-=h,u-=h;const f=d.t,p=t.slice(r-u,r);o.push(bE(f,e,p))}}return s.length>0&&o.push(bE(vE,e,s)),o}(an.parser.start,n,function Obe(n,e){const t=function Abe(n){const e=[],t=n.length;let i=0;for(;i56319||i+1===t||(o=n.charCodeAt(i+1))<56320||o>57343?n[i]:n.slice(i,i+2);e.push(s),i+=s.length}return e}(e.replace(/[A-Z]/g,a=>a.toLowerCase())),i=t.length,r=[];let o=0,s=0;for(;s=0&&(d+=t[s].length,h++),c+=t[s].length,o+=t[s].length,s++;o-=d,s-=h,c-=d,r.push({t:u.t,v:e.slice(o-c,o),s:o-c,e:o})}return r}(an.scanner.start,n))}function CE(n,e,t){if(void 0===e&&(e=null),void 0===t&&(t=null),e&&"object"==typeof e){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const i=new B0(t),r=EV(n),o=[];for(let s=0;s{const r=e.some(u=>u.docChanged)&&!t.doc.eq(i.doc),o=e.some(u=>u.getMeta("preventAutolink"));if(!r||o)return;const{tr:s}=i,a=function Nle(n,e){const t=new d1(n);return e.forEach(i=>{i.steps.forEach(r=>{t.step(r)})}),t}(t.doc,[...e]),{mapping:l}=a;return function zle(n){const{mapping:e,steps:t}=n,i=[];return e.maps.forEach((r,o)=>{const s=[];if(r.ranges.length)r.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=t[o];if(void 0===a||void 0===l)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=e.slice(o).map(a,-1),u=e.slice(o).map(l),d=e.invert().map(c,-1),h=e.invert().map(u);i.push({oldRange:{from:d,to:h},newRange:{from:c,to:u}})})}),function jle(n){const e=function Fle(n,e=JSON.stringify){const t={};return n.filter(i=>{const r=e(i);return!Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=!0)})}(n);return 1===e.length?e:e.filter((t,i)=>!e.filter((o,s)=>s!==i).some(o=>t.oldRange.from>=o.oldRange.from&&t.oldRange.to<=o.oldRange.to&&t.newRange.from>=o.newRange.from&&t.newRange.to<=o.newRange.to))}(i)}(a).forEach(({oldRange:u,newRange:d})=>{kb(u.from,u.to,t.doc).filter(m=>m.mark.type===n.type).forEach(m=>{const v=kb(l.map(m.from),l.map(m.to),i.doc).filter(K=>K.mark.type===n.type);if(!v.length)return;const w=v[0],_=t.doc.textBetween(m.from,m.to,void 0," "),N=i.doc.textBetween(w.from,w.to,void 0," "),T=xV(_),ne=xV(N);T&&!ne&&s.removeMark(w.from,w.to,n.type)});const h=function Lle(n,e,t){const i=[];return n.nodesBetween(e.from,e.to,(r,o)=>{t(r)&&i.push({node:r,pos:o})}),i}(i.doc,d,m=>m.isTextblock);let f,p;if(h.length>1?(f=h[0],p=i.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):h.length&&i.doc.textBetween(d.from,d.to," "," ").endsWith(" ")&&(f=h[0],p=i.doc.textBetween(f.pos,d.to,void 0," ")),f&&p){const m=p.split(" ").filter(v=>""!==v);if(m.length<=0)return!1;const g=m[m.length-1],y=f.pos+p.lastIndexOf(g);if(!g)return!1;CE(g).filter(v=>v.isLink).filter(v=>!n.validate||n.validate(v.value)).map(v=>({...v,from:y+v.start+1,to:y+v.end+1})).forEach(v=>{s.addMark(v.from,v.to,n.type.create({href:v.href}))})}}),s.steps.length?s:void 0}})}const zbe=Or.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{"string"!=typeof n?SV(n.scheme,n.optionalSlashes):SV(n)})},onDestroy(){!function Pbe(){Xr.groups={},an.scanner=null,an.parser=null,an.tokenQueue=[],an.pluginQueue=[],an.customSchemes=[],an.initialized=!1}()},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:n}){return["a",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Pl({find:n=>CE(n).filter(e=>!this.options.validate||this.options.validate(e.value)).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:n=>{var e;return{href:null===(e=n.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(Rbe({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(function Fbe(n){return new $t({key:new rn("handleClickLink"),props:{handleClick:(e,t,i)=>{var r,o,s;if(0!==i.button)return!1;const a=d5(e.state,n.type.name),l=null===(r=i.target)||void 0===r?void 0:r.closest("a"),c=null!==(o=l?.href)&&void 0!==o?o:a.href,u=null!==(s=l?.target)&&void 0!==s?s:a.target;return!(!l||!c||(window.open(c,u),0))}}})}({type:this.type})),this.options.linkOnPaste&&n.push(function jbe(n){return new $t({key:new rn("handlePasteLink"),props:{handlePaste:(e,t,i)=>{const{state:r}=e,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach(c=>{a+=c.textContent});const l=CE(a).find(c=>c.isLink&&c.value===a);return!(!a||!l||(n.editor.commands.setMark(n.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),n}}),Vbe=Or.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:n=>"sub"===n&&null}],renderHTML({HTMLAttributes:n}){return["sub",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Bbe=Or.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:n=>"super"===n&&null}],renderHTML({HTMLAttributes:n}){return["sup",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Ube=Rn.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:n}){return["tr",Xt(this.options.HTMLAttributes,n),0]}}),Hbe=vn.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>!!this.options.alignments.includes(n)&&this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})),unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),$be=Or.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("underline")&&{}}],renderHTML({HTMLAttributes:n}){return["u",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Wbe=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/,Gbe=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/g,IV=n=>n?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",Kbe=Rn.create({name:"youtube",addOptions:()=>({addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML:()=>[{tag:"div[data-youtube-video] iframe"}],addCommands(){return{setYoutubeVideo:n=>({commands:e})=>!!(n=>n.match(Wbe))(n.src)&&e.insertContent({type:this.name,attrs:n})}},addPasteRules(){return this.options.addPasteHandler?[dce({find:Gbe,type:this.type,getAttributes:n=>({src:n.input})})]:[]},renderHTML({HTMLAttributes:n}){const e=(n=>{const{url:e,allowFullscreen:t,autoplay:i,ccLanguage:r,ccLoadPolicy:o,controls:s,disableKBcontrols:a,enableIFrameApi:l,endTime:c,interfaceLanguage:u,ivLoadPolicy:d,loop:h,modestBranding:f,nocookie:p,origin:m,playlist:g,progressBarColor:y,startAt:v}=n;if(e.includes("/embed/"))return e;if(e.includes("youtu.be")){const ne=e.split("/").pop();return ne?`${IV(p)}${ne}`:null}const _=/v=([-\w]+)/gm.exec(e);if(!_||!_[1])return null;let N=`${IV(p)}${_[1]}`;const T=[];return!1===t&&T.push("fs=0"),i&&T.push("autoplay=1"),r&&T.push(`cc_lang_pref=${r}`),o&&T.push("cc_load_policy=1"),s||T.push("controls=0"),a&&T.push("disablekb=1"),l&&T.push("enablejsapi=1"),c&&T.push(`end=${c}`),u&&T.push(`hl=${u}`),d&&T.push(`iv_load_policy=${d}`),h&&T.push("loop=1"),f&&T.push("modestbranding=1"),m&&T.push(`origin=${m}`),g&&T.push(`playlist=${g}`),v&&T.push(`start=${v}`),y&&T.push(`color=${y}`),T.length&&(N+=`?${T.join("&")}`),N})({url:n.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:n.start||0});return n.src=e,["div",{"data-youtube-video":""},["iframe",Xt(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor},n)]]}}),Qbe=/^\s*>\s$/,Zbe=Rn.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:n}){return["blockquote",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[bm({find:Qbe,type:this.type})]}}),Jbe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,Xbe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,e0e=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,t0e=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,n0e=Or.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:n=>"normal"!==n.style.fontWeight&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}],renderHTML({HTMLAttributes:n}){return["strong",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[su({find:Jbe,type:this.type}),su({find:e0e,type:this.type})]},addPasteRules(){return[Pl({find:Xbe,type:this.type}),Pl({find:t0e,type:this.type})]}}),i0e=Rn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",Xt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),OV=Or.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ab(n,this.type);return!!Object.entries(t).some(([,r])=>!!r)||e.unsetMark(this.name)}}}}),AV=/^\s*([-+*])\s$/,r0e=Rn.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:n}){return["ul",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(i0e.name,this.editor.getAttributes(OV.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=bm({find:AV,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=bm({find:AV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(OV.name),editor:this.editor})),[n]}}),o0e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,s0e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,a0e=Or.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:n}){return["code",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[su({find:o0e,type:this.type})]},addPasteRules(){return[Pl({find:s0e,type:this.type})]}}),l0e=/^```([a-z]+)?[\s\n]$/,c0e=/^~~~([a-z]+)?[\s\n]$/,u0e=Rn.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:n=>{var e;const{languageClassPrefix:t}=this.options;return[...(null===(e=n.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter(s=>s.startsWith(t)).map(s=>s.replace(t,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:n,HTMLAttributes:e}){return["pre",Xt(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:e}=this.editor.state.selection;return!(!n||e.parent.type.name!==this.name)&&!(1!==e.pos&&e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=n,{selection:t}=e,{$from:i,empty:r}=t;if(!r||i.parent.type!==this.type)return!1;const o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!(!o||!s)&&n.chain().command(({tr:a})=>(a.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:i}=e,{$from:r,empty:o}=t;if(!o||r.parent.type!==this.type||r.parentOffset!==r.parent.nodeSize-2)return!1;const a=r.after();return void 0!==a&&!i.nodeAt(a)&&n.commands.exitCode()}}},addInputRules(){return[ES({find:l0e,type:this.type,getAttributes:n=>({language:n[1]})}),ES({find:c0e,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new $t({key:new rn("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),i=e.clipboardData.getData("vscode-editor-data"),o=(i?JSON.parse(i):void 0)?.mode;if(!t||!o)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(it.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(t.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),d0e=Rn.create({name:"doc",topNode:!0,content:"block+"});function h0e(n={}){return new $t({view:e=>new f0e(e,n)})}class f0e{constructor(e,t){var i;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(i=t.width)&&void 0!==i?i:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=s=>{this[r](s)};return e.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let i,e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent;if(t){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=a?u.bottom:u.top;a&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!i){let a=this.editorView.coordsAtPos(this.cursorPos);i={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let o,s,r=this.editorView.dom.offsetParent;if(this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t),!r||r==document.body&&"static"==getComputedStyle(r).position)o=-pageXOffset,s=-pageYOffset;else{let a=r.getBoundingClientRect();o=a.left-r.scrollLeft,s=a.top-r.scrollTop}this.element.style.left=i.left-o+"px",this.element.style.top=i.top-s+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),i=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=i&&i.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t,e):r;if(t&&!o){let s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=mj(this.editorView.state.doc,s,this.editorView.dragging.slice);null!=a&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const p0e=vn.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[h0e(this.options)]}});class ri extends nt{constructor(e){super(e,e)}map(e,t){let i=e.resolve(t.map(this.head));return ri.valid(i)?new ri(i):nt.near(i)}content(){return we.empty}eq(e){return e instanceof ri&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new ri(e.resolve(t.pos))}getBookmark(){return new DE(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function m0e(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),i=n.node(e);if(0!=t)for(let r=i.child(t-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(e)||!function g0e(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),i=n.node(e);if(t!=i.childCount)for(let r=i.child(t);;r=r.firstChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(e))return!1;let i=t.type.spec.allowGapCursor;if(null!=i)return i;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,i=!1){e:for(;;){if(!i&&ri.valid(e))return e;let r=e.pos,o=null;for(let s=e.depth;;s--){let a=e.node(s);if(t>0?e.indexAfter(s)0){o=a.child(t>0?e.indexAfter(s):e.index(s)-1);break}if(0==s)return null;r+=t;let l=e.doc.resolve(r);if(ri.valid(l))return l}for(;;){let s=t>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!Ye.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),i=!1;continue e}break}o=s,r+=t;let a=e.doc.resolve(r);if(ri.valid(a))return a}return null}}}ri.prototype.visible=!1,ri.findFrom=ri.findGapCursorFrom,nt.jsonID("gapcursor",ri);class DE{constructor(e){this.pos=e}map(e){return new DE(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return ri.valid(t)?new ri(t):nt.near(t)}}const _0e=rS({ArrowLeft:H0("horiz",-1),ArrowRight:H0("horiz",1),ArrowUp:H0("vert",-1),ArrowDown:H0("vert",1)});function H0(n,e){const t="vert"==n?e>0?"down":"up":e>0?"right":"left";return function(i,r,o){let s=i.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof it){if(!o.endOfTextblock(t)||0==a.depth)return!1;l=!1,a=i.doc.resolve(e>0?a.after():a.before())}let c=ri.findGapCursorFrom(a,e,l);return!!c&&(r&&r(i.tr.setSelection(new ri(c))),!0)}}function v0e(n,e,t){if(!n||!n.editable)return!1;let i=n.state.doc.resolve(e);if(!ri.valid(i))return!1;let r=n.posAtCoords({left:t.clientX,top:t.clientY});return!(r&&r.inside>-1&&Ye.isSelectable(n.state.doc.nodeAt(r.inside))||(n.dispatch(n.state.tr.setSelection(new ri(i))),0))}function b0e(n,e){if("insertCompositionText"!=e.inputType||!(n.state.selection instanceof ri))return!1;let{$from:t}=n.state.selection,i=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;let r=le.empty;for(let s=i.length-1;s>=0;s--)r=le.from(i[s].createAndFill(null,r));let o=n.state.tr.replace(t.pos,t.pos,new we(r,0,0));return o.setSelection(it.near(o.doc.resolve(t.pos+1))),n.dispatch(o),!1}function w0e(n){if(!(n.selection instanceof ri))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ln.create(n.doc,[Ei.widget(n.selection.head,e,{key:"gapcursor"})])}const C0e=vn.create({name:"gapCursor",addProseMirrorPlugins:()=>[new $t({props:{decorations:w0e,createSelectionBetween:(n,e,t)=>e.pos==t.pos&&ri.valid(t)?new ri(t):null,handleClick:v0e,handleKeyDown:_0e,handleDOMEvents:{beforeinput:b0e}}})],extendNodeSchema(n){var e;return{allowGapCursor:null!==(e=bt(Ve(n,"allowGapCursor",{name:n.name,options:n.options,storage:n.storage})))&&void 0!==e?e:null}}}),D0e=Rn.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:n}){return["br",Xt(this.options.HTMLAttributes,n)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:i})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:r,storedMarks:o}=t;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=i.extensionManager,l=o||r.$to.parentOffset&&r.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const d=l.filter(h=>a.includes(h.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),M0e=Rn.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,Xt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.setNode(this.name,n),toggleHeading:n=>({commands:e})=>!!this.options.levels.includes(n.level)&&e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>ES({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Gi=function(){};Gi.prototype.append=function(e){return e.length?(e=Gi.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Gi.prototype.prepend=function(e){return e.length?Gi.from(e).append(this):this},Gi.prototype.appendInner=function(e){return new T0e(this,e)},Gi.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Gi.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Gi.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Gi.prototype.forEach=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=this.length),t<=i?this.forEachInner(e,t,i,0):this.forEachInvertedInner(e,t,i,0)},Gi.prototype.map=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(e(o,s))},t,i),r},Gi.from=function(e){return e instanceof Gi?e:e&&e.length?new kV(e):Gi.empty};var kV=function(n){function e(i){n.call(this),this.values=i}n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,o){return 0==r&&o==this.length?this:new e(this.values.slice(r,o))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,o,s,a){for(var l=o;l=s;l--)if(!1===r(this.values[l],a+l))return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=200)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=200)return new e(r.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(Gi);Gi.empty=new kV([]);var T0e=function(n){function e(t,i){n.call(this),this.left=t,this.right=i,this.length=t.length+i.length,this.depth=Math.max(t.depth,i.depth)+1}return n&&(e.__proto__=n),(e.prototype=Object.create(n&&n.prototype)).constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(i){return ia&&!1===this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,o)-a,s+a))return!1},e.prototype.forEachInvertedInner=function(i,r,o,s){var a=this.left.length;if(r>a&&!1===this.right.forEachInvertedInner(i,r-a,Math.max(o,a)-a,s+a)||o=o?this.right.slice(i-o,r-o):this.left.slice(i,o).append(this.right.slice(0,r-o))},e.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new e(r,this.right)},e.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new e(this.left,new e(this.right,i)):new e(this,i)},e}(Gi);const NV=Gi;class gs{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let r,o,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}t&&(r=this.remapping(i,this.items.length),o=r.maps.length);let a,l,s=e.tr,c=[],u=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(i,h+1),o=r.maps.length),o--,void u.push(d);if(r){u.push(new ta(d.map));let p,f=d.step.map(r.slice(o));f&&s.maybeStep(f).doc&&(p=s.mapping.maps[s.mapping.maps.length-1],c.push(new ta(p,void 0,void 0,c.length+u.length))),o--,p&&r.appendMap(p,o)}else s.maybeStep(d.step);return d.selection?(a=r?d.selection.map(r.slice(o)):d.selection,l=new gs(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,t,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let u=0;ux0e&&(a=function E0e(n,e){let t;return n.forEach((i,r)=>{if(i.selection&&0==e--)return t=r,!1}),n.slice(t)}(a,c),s-=c),new gs(a.append(o),s)}remapping(e,t){let i=new ah;return this.items.forEach((r,o)=>{i.appendMap(r.map,null!=r.mirrorOffset&&o-r.mirrorOffset>=e?i.maps.length-r.mirrorOffset:void 0)},e,t),i}addMaps(e){return 0==this.eventCount?this:new gs(this.items.append(e.map(t=>new ta(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},r);let l=t;this.items.forEach(h=>{let f=o.getMirror(--l);if(null==f)return;s=Math.min(s,f);let p=o.maps[f];if(h.step){let m=e.steps[f].invert(e.docs[f]),g=h.selection&&h.selection.map(o.slice(l+1,f));g&&a++,i.push(new ta(p,m,g))}else i.push(new ta(p))},r);let c=[];for(let h=t;h500&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),i=t.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(t.slice(i)),c=l&&l.getMap();if(i--,c&&t.appendMap(c,i),l){let u=s.selection&&s.selection.map(t.slice(i));u&&o++;let h,d=new ta(c.invert(),l,u),f=r.length-1;(h=r.length&&r[f].merge(d))?r[f]=h:r.push(d)}}else s.map&&i--},this.items.length,0),new gs(NV.from(r.reverse()),o)}}gs.empty=new gs(NV.empty,0);class ta{constructor(e,t,i,r){this.map=e,this.step=t,this.selection=i,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new ta(t.getMap().invert(),t,this.selection)}}}class Yl{constructor(e,t,i,r,o){this.done=e,this.undone=t,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}}const x0e=20;function PV(n){let e=[];return n.forEach((t,i,r,o)=>e.push(r,o)),e}function ME(n,e){if(!n)return null;let t=[];for(let i=0;inew Yl(gs.empty,gs.empty,null,0,-1),apply:(e,t,i)=>function I0e(n,e,t,i){let o,r=t.getMeta(na);if(r)return r.historyState;t.getMeta(FV)&&(n=new Yl(n.done,n.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(0==t.steps.length)return n;if(s&&s.getMeta(na))return s.getMeta(na).redo?new Yl(n.done.addTransform(t,void 0,i,W0(e)),n.undone,PV(t.mapping.maps[t.steps.length-1]),n.prevTime,n.prevComposition):new Yl(n.done,n.undone.addTransform(t,void 0,i,W0(e)),null,n.prevTime,n.prevComposition);if(!1===t.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=t.getMeta("rebased"))?new Yl(n.done.rebased(t,o),n.undone.rebased(t,o),ME(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Yl(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),ME(n.prevRanges,t.mapping),n.prevTime,n.prevComposition);{let a=t.getMeta("composition"),l=0==n.prevTime||!s&&n.prevComposition!=a&&(n.prevTime<(t.time||0)-i.newGroupDelay||!function O0e(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((i,r)=>{for(let o=0;o=e[o]&&(t=!0)}),t}(t,n.prevRanges)),c=s?ME(n.prevRanges,t.mapping):PV(t.mapping.maps[t.steps.length-1]);return new Yl(n.done.addTransform(t,l?e.selection.getBookmark():void 0,i,W0(e)),gs.empty,c,t.time,a??n.prevComposition)}}(t,i,e,n)},config:n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},props:{handleDOMEvents:{beforeinput(e,t){let i=t.inputType,r="historyUndo"==i?jV:"historyRedo"==i?zV:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const jV=(n,e)=>{let t=na.getState(n);return!(!t||0==t.done.eventCount||(e&&LV(t,n,e,!1),0))},zV=(n,e)=>{let t=na.getState(n);return!(!t||0==t.undone.eventCount||(e&&LV(t,n,e,!0),0))},k0e=vn.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:n,dispatch:e})=>jV(n,e),redo:()=>({state:n,dispatch:e})=>zV(n,e)}),addProseMirrorPlugins(){return[A0e(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-\u044f":()=>this.editor.commands.undo(),"Shift-Mod-\u044f":()=>this.editor.commands.redo()}}}),N0e=Rn.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:n}){return["hr",Xt(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{var i;if(t){const{$to:r}=e.selection,o=r.end();if(r.nodeAfter)e.setSelection(it.create(e.doc,r.pos));else{const s=null===(i=r.parent.type.contentMatch.defaultType)||void 0===i?void 0:i.create();s&&(e.insert(o,s),e.setSelection(it.create(e.doc,o)))}e.scrollIntoView()}return!0}).run()}},addInputRules(){return[p5({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),P0e=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,L0e=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,R0e=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,F0e=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,j0e=Or.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:n=>"normal"!==n.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:n}){return["em",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[su({find:P0e,type:this.type}),su({find:R0e,type:this.type})]},addPasteRules(){return[Pl({find:L0e,type:this.type}),Pl({find:F0e,type:this.type})]}}),z0e=Rn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",Xt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),V0e=Rn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",Xt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),VV=Or.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ab(n,this.type);return!!Object.entries(t).some(([,r])=>!!r)||e.unsetMark(this.name)}}}}),BV=/^(\d+)\.\s$/,B0e=Rn.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return 1===e?["ol",Xt(this.options.HTMLAttributes,t),0]:["ol",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(V0e.name,this.editor.getAttributes(VV.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=bm({find:BV,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=bm({find:BV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(VV.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),U0e=Rn.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:n}){return["p",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),H0e=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,$0e=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,W0e=Or.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("line-through")&&{}}],renderHTML({HTMLAttributes:n}){return["s",Xt(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[su({find:H0e,type:this.type})]},addPasteRules(){return[Pl({find:$0e,type:this.type})]}}),G0e=Rn.create({name:"text",group:"inline"}),UV=vn.create({name:"starterKit",addExtensions(){var n,e,t,i,r,o,s,a,l,c,u,d,h,f,p,m,g,y;const v=[];return!1!==this.options.blockquote&&v.push(Zbe.configure(null===(n=this.options)||void 0===n?void 0:n.blockquote)),!1!==this.options.bold&&v.push(n0e.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.bulletList&&v.push(r0e.configure(null===(t=this.options)||void 0===t?void 0:t.bulletList)),!1!==this.options.code&&v.push(a0e.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&v.push(u0e.configure(null===(r=this.options)||void 0===r?void 0:r.codeBlock)),!1!==this.options.document&&v.push(d0e.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&v.push(p0e.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&v.push(C0e.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&v.push(D0e.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&v.push(M0e.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&v.push(k0e.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&v.push(N0e.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&v.push(j0e.configure(null===(h=this.options)||void 0===h?void 0:h.italic)),!1!==this.options.listItem&&v.push(z0e.configure(null===(f=this.options)||void 0===f?void 0:f.listItem)),!1!==this.options.orderedList&&v.push(B0e.configure(null===(p=this.options)||void 0===p?void 0:p.orderedList)),!1!==this.options.paragraph&&v.push(U0e.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&v.push(W0e.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&v.push(G0e.configure(null===(y=this.options)||void 0===y?void 0:y.text)),v}});var Vg=(()=>(function(n){n.TOP_INITIAL="40px",n.TOP_CURRENT="26px"}(Vg||(Vg={})),Vg))();function Y0e(n){return n.replace(/\p{L}+('\p{L}+)?/gu,function(e){return e.charAt(0).toUpperCase()+e.slice(1)})}const K0e=vn.create({name:"dotPlaceholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new $t({key:new rn("dotPlaceholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=e,r=[];if(!t)return null;const o=n.type.createAndFill(),s=o?.sameMarkup(n)&&null===o.content.findDiffStart(n.content);return n.descendants((a,l)=>{if((i>=l&&i<=l+a.nodeSize||!this.options.showOnlyCurrent)&&!a.isLeaf&&!a.childCount){const d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);const h=Ei.widget(l,((n,e,t)=>{const i=document.createElement("button");i.classList.add("add-button"),i.style.position="absolute",i.style.left="-45px",i.style.top="-2px";const r=document.createElement("div");return r.style.position="relative",r.setAttribute("draggable","false"),0===n&&e.type.name===Wi.HEADING&&(i.style.top=Vg.TOP_INITIAL),0!==n&&e.type.name===Wi.HEADING&&(i.style.top=Vg.TOP_CURRENT),i.innerHTML='',i.setAttribute("draggable","false"),i.addEventListener("mousedown",o=>{o.preventDefault(),t.chain().insertContent("/").run()},{once:!0}),r.appendChild(i),r})(l,a,this.editor)),f=Ei.node(l,l+a.nodeSize,{class:d.join(" "),"data-placeholder":a.type.name===Wi.HEADING?`${Y0e(a.type.name)} ${a.attrs.level}`:this.options.placeholder});r.push(f),r.push(h)}return this.options.includeChildren}),Ln.create(n,r)}}})]}});class Bg{constructor(){}}function Q0e(n,e){if(1&n&&_e(0,"dot-editor-count-bar",4),2&n){const t=M(2);b("characterCount",t.characterCount)("charLimit",t.charLimit)("readingTime",t.readingTime)}}Bg.\u0275fac=function(e){return new(e||Bg)},Bg.\u0275cmp=xe({type:Bg,selectors:[["dot-editor-count-bar"]],inputs:{characterCount:"characterCount",charLimit:"charLimit",readingTime:"readingTime"},decls:8,vars:6,template:function(e,t){1&e&&(I(0,"span"),Te(1),A(),I(2,"span"),Te(3,"\u25cf"),A(),Te(4),I(5,"span"),Te(6,"\u25cf"),A(),Te(7)),2&e&&(ns("error-message",t.charLimit&&t.characterCount.characters()>t.charLimit),C(1),Gy(" ",t.characterCount.characters(),"",t.charLimit?"/"+t.charLimit:""," chars\n"),C(3),Vi("\n",t.characterCount.words()," words\n"),C(3),Vi("\n",t.readingTime,"m read\n"))},styles:["[_nghost-%COMP%]{display:flex;justify-content:flex-end;align-items:flex-end;color:#afb3c0;margin-top:1rem;gap:.65rem;font-size:16px}[_nghost-%COMP%] .error-message[_ngcontent-%COMP%]{color:#d82b2e}"]});const Z0e=function(n,e){return{"editor-wrapper--fullscreen":n,"editor-wrapper--default":e}},J0e=function(n){return{"overflow-hidden":n}};function X0e(n,e){if(1&n){const t=Qe();pt(0),I(1,"div",1)(2,"tiptap-editor",2),de("ngModelChange",function(r){return ge(t),ye(M().onChange(r))})("keyup",function(){return ge(t),ye(M().subject.next())}),A()(),E(3,Q0e,1,3,"dot-editor-count-bar",3),mt()}if(2&n){const t=M();C(1),qn(t.customStyles),b("ngClass",Mi(7,Z0e,"true"===t.isFullscreen,"true"!==t.isFullscreen)),C(1),b("ngModel",t.content)("editor",t.editor)("ngClass",xt(10,J0e,t.freezeScroll)),C(1),b("ngIf",t.showCharData)}}class Ug{constructor(e,t,i){this.injector=e,this.viewContainerRef=t,this.dotMarketingConfigService=i,this.lang=ng,this.displayCountBar=!0,this.customBlocks="",this.content="",this.isFullscreen=!1,this.valueChange=new re,this.subject=new se,this.freezeScroll=!0,this._allowedBlocks=["paragraph"],this._customNodes=new Map([["dotContent",kpe(this.injector)],["image",Jr],["video",Fpe],["table",iye.extend({resizable:!0})],["aiContent",zpe],["loader",Vpe]]),this.destroy$=new se}set showVideoThumbnail(e){this.dotMarketingConfigService.setProperty(Vp.SHOW_VIDEO_THUMBNAIL,e)}set allowedBlocks(e){const t=e?e.replace(/ /g,"").split(",").filter(Boolean):[];this._allowedBlocks=[...this._allowedBlocks,...t]}set value(e){"string"!=typeof e?this.setEditorJSONContent(e):this.content=(n=>{const e=new RegExp(/]*)>(.|\n)*?<\/p>/gm),t=new RegExp(/]*)>(.|\n)*?<\/h\d+>/gm),i=new RegExp(/]*)>(.|\n)*?<\/li>/gm),r=new RegExp(/<(ul|ol)(|\s+[^>]*)>(.|\n)*?<\/(ul|ol)>/gm);return n.replace(oue,o=>(n=>{const e=document.createElement("div");e.innerHTML=n;const t=e.querySelector("a").getAttribute("href"),i=e.querySelector("a").getAttribute("href"),r=e.querySelector("a").getAttribute("alt");return n.replace(/]*)>/gm,"").replace(//gm,"").replace(AS,o=>o.replace(/img/gm,`img href="${t}" title="${i}" alt="${r}"`))})(o)).replace(e,o=>Bb(o)).replace(t,o=>Bb(o)).replace(i,o=>Bb(o)).replace(r,o=>Bb(o))})(e)}get characterCount(){return this.editor?.storage.characterCount}get showCharData(){try{return JSON.parse(this.displayCountBar)}catch{return!0}}get readingTime(){return Math.ceil(this.characterCount.words()/265)}loadCustomBlocks(e){return au(function*(){return Promise.allSettled(e.map(function(){var t=au(function*(i){return import(i)});return function(i){return t.apply(this,arguments)}}()))})()}ngOnInit(){_t(this.getCustomRemoteExtensions()).pipe(Tt(1)).subscribe(e=>{this.editor=new lce({extensions:[...this.getEditorExtensions(),...this.getEditorMarks(),...this.getEditorNodes(),...e]}),this.editor.on("create",()=>this.updateCharCount()),this.subject.pipe(Tn(this.destroy$),$d(250)).subscribe(()=>this.updateCharCount()),this.editor.on("transaction",({editor:t})=>{this.freezeScroll=gg.getState(t.view.state)?.freezeScroll})})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onChange(e){this.valueChange.emit(e)}updateCharCount(){const e=this.editor.state.tr.setMeta("addToHistory",!1);0!=this.characterCount.characters()?e.step(new hu("charCount",this.characterCount.characters())).step(new hu("wordCount",this.characterCount.words())).step(new hu("readingTime",this.readingTime)):e.step(new Ub),this.editor.view.dispatch(e)}isValidSchema(e){lV(e,Mu({extensions:uV(Mu({url:kg(),actions:hV(uV(Mu({command:kg(),menuLabel:kg(),icon:kg()})))}))}))}getParsedCustomBlocks(){if(!this.customBlocks?.length)return{extensions:[]};try{const t=JSON.parse(this.customBlocks);return this.isValidSchema(t),t}catch(t){return console.warn("JSON parse fails, please check the JSON format.",t),{extensions:[]}}}parsedCustomModules(e,t){return t.status===Bp.REJECTED&&console.warn("Failed to load the module",t.reason),t.status===Bp.FULFILLED?{...e,...t?.value}:{...e}}getCustomRemoteExtensions(){var e=this;return au(function*(){const t=e.getParsedCustomBlocks(),i=t?.extensions?.map(a=>a.url),r=yield e.loadCustomBlocks(i),o=[];t.extensions.forEach(a=>{o.push(...a.actions?.map(l=>l.name)||[])});const s=r.reduce(e.parsedCustomModules,{});return Object.values(s)})()}getEditorNodes(){return[this._allowedBlocks?.length>1?UV.configure(this.starterConfig()):UV,...this.getAllowedCustomNodes()]}starterConfig(){const i=["heading1","heading2","heading3","heading4","heading5","heading6"].filter(o=>this._allowedBlocks?.includes(o)).map(o=>+o.slice(-1)),r=["orderedList","bulletList","blockquote","codeBlock","horizontalRule"].filter(o=>!this._allowedBlocks?.includes(o)).reduce((o,s)=>({...o,[s]:!1}),{});return{heading:!!i?.length&&{levels:i,HTMLAttributes:{}},...r}}getAllowedCustomNodes(){const e=[];if(this._allowedBlocks.length<=1)return[...this._customNodes.values()];for(const t of this._allowedBlocks){const i=this._customNodes.get(t);i&&e.push(i)}return e}getEditorExtensions(){return[Kme({lang:this.lang,allowedContentTypes:this.allowedContentTypes,allowedBlocks:this._allowedBlocks,contentletIdentifier:this.contentletIdentifier}),qme,K0e.configure({placeholder:'Type "/" for commands'}),Kbe.configure({height:300,width:400,interfaceLanguage:"us",nocookie:!0,modestBranding:!0}),Vbe,Bbe,_ue(this.viewContainerRef,this.getParsedCustomBlocks()),oye(this.viewContainerRef),Dme(this.viewContainerRef,this.lang),Yme(this.viewContainerRef),Rme(this.viewContainerRef),Nye(this.viewContainerRef),$ye(this.viewContainerRef),jye(this.viewContainerRef),fye(this.injector,this.viewContainerRef),ege(this.viewContainerRef),Tue(this.viewContainerRef),tge.extend({renderHTML({HTMLAttributes:n}){return["th",Xt(this.options.HTMLAttributes,n),["button",{class:"dot-cell-arrow"}],["p",0]]}}),Ube,pye,gbe,Upe(this.injector,this.viewContainerRef)]}getEditorMarks(){return[$be,Hbe.configure({types:["heading","paragraph","listItem","dotImage"]}),vbe.configure({HTMLAttributes:{style:"background: #accef7;"}}),zbe.configure({autolink:!1,openOnClick:!1})]}setEditorJSONContent(e){this.content=this._allowedBlocks?.length>1?((n,e)=>{const t=(n=>n.reduce((e,t)=>M5[t]?{...e,...M5[t]}:{...e,[t]:!0},tue))(this._allowedBlocks),i=Array.isArray(n)?[...n]:[...n.content];return T5(i,t)})(e):e}}Ug.\u0275fac=function(e){return new(e||Ug)(O(yr),O(Br),O(cu))},Ug.\u0275cmp=xe({type:Ug,selectors:[["dot-block-editor"]],inputs:{lang:"lang",allowedContentTypes:"allowedContentTypes",customStyles:"customStyles",displayCountBar:"displayCountBar",charLimit:"charLimit",customBlocks:"customBlocks",content:"content",contentletIdentifier:"contentletIdentifier",showVideoThumbnail:"showVideoThumbnail",isFullscreen:"isFullscreen",allowedBlocks:"allowedBlocks",value:"value"},outputs:{valueChange:"valueChange"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"editor-wrapper",3,"ngClass"],[3,"ngModel","editor","ngClass","ngModelChange","keyup"],[3,"characterCount","charLimit","readingTime",4,"ngIf"],[3,"characterCount","charLimit","readingTime"]],template:function(e,t){1&e&&E(0,X0e,4,12,"ng-container",0),2&e&&b("ngIf",t.editor)},dependencies:[yi,nn,Dc,W_,Ph,Bg],styles:['[_nghost-%COMP%]{position:relative;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;height:100%;display:block}[_nghost-%COMP%] .editor-wrapper[_ngcontent-%COMP%]{display:block;border-radius:.25rem;overflow:hidden;position:relative;resize:vertical;outline:#afb3c0 solid 1px}[_nghost-%COMP%] .editor-wrapper--default[_ngcontent-%COMP%]{height:500px}[_nghost-%COMP%] .editor-wrapper--fullscreen[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]:focus-within{outline-color:var(--color-palette-primary-500)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] {display:block;height:100%;overflow-y:auto;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror{box-sizing:border-box;display:block;min-height:100%;outline:none;padding:16px 64px;font:16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror img{max-width:100%;max-height:100%;position:relative}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror img:before{align-items:center;background:#f3f3f4;border-radius:3px;border:1px solid #afb3c0;color:#6c7389;content:"The image URL " attr(src) " seems to be broken, please double check the URL.";display:flex;height:100%;left:0;padding:1rem;position:absolute;text-align:center;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol{padding-inline-start:16px;margin:0 0 0 16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol li{list-style-type:decimal}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul li{list-style-type:disc}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li{padding-top:4.576px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li p{padding:0;margin:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h1{font-size:38.88px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h2{font-size:30.88px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h3{font-size:25.12px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h4{font-size:20.64px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h5{font-size:17.12px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h6{font-size:16px;font-weight:700;font-style:normal}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h1, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h2, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h3, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h4, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h5, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h6{margin:48px 0 22.08px;line-height:1.3}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror p{font-size:16px;line-height:20.64px;padding-top:4.576px;margin-bottom:16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror p.is-empty{padding-top:4.576px;margin:0 0 5px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror blockquote{margin:16px;border-left:3px solid var(--color-palette-black-op-10);padding-left:16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre{background:#14151a;border-radius:8px;color:#fff;padding:12px 16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre code{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background:none;color:inherit;padding:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror .is-empty:before{color:#afb3c0;content:attr(data-placeholder);float:left;height:0;pointer-events:none}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror .add-button{all:unset;cursor:pointer;border:solid 1px #eee;width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:#666;background:#ffffff}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table td, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th{border:2px solid #afb3c0;box-sizing:border-box;min-width:1rem;padding:3px 20px 3px 5px;position:relative;vertical-align:top}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th{background-clip:padding-box}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table td>*, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th>*{margin-bottom:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th{background-color:#f3f3f4;font-weight:700;text-align:left}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .selectedCell{background-color:#ebecef}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .selectedCell:after{content:"";inset:0;pointer-events:none;position:absolute}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .column-resize-handle{bottom:-2px;position:absolute;right:-2px;pointer-events:none;top:0;width:4px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table p{margin:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .tableWrapper{padding:1rem 0;overflow-x:auto}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .resize-cursor{cursor:ew-resize;cursor:col-resize}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .dot-cell-arrow{position:absolute;display:none;top:3px;right:5px;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg);background:transparent;cursor:pointer;z-index:100}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .selectedCell .dot-cell-arrow{display:block}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table td.focus .dot-cell-arrow, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th.focus .dot-cell-arrow{display:block}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .video-container{margin-bottom:1rem;aspect-ratio:16/9;height:300px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .video-container video{width:100%;height:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .image-container{margin-bottom:1rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .image-container img{width:auto;max-height:300px;max-width:50%;padding:.5rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .image-container.ProseMirror-selectednode img{outline:1px solid var(--color-palette-primary-500)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ai-content-container.ProseMirror-selectednode{background-color:var(--color-palette-primary-op-20);border:1px solid var(--color-palette-primary-300)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .loader-style{display:flex;justify-content:center;flex-direction:column;align-items:center;min-height:12.5rem;min-width:25rem;width:25.5625rem;height:17.375rem;padding:.5rem;border-radius:.5rem;border:1.5px solid #d1d4db}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .p-progress-spinner{border:5px solid #ebecef;border-radius:50%;border-top:5px solid var(--color-palette-primary-500);width:2.4rem;height:2.4rem;animation:_ngcontent-%COMP%_spin 1s linear infinite}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%]{scrollbar-gutter:stable}[_nghost-%COMP%] .overflow-hidden[_ngcontent-%COMP%]{overflow-y:hidden}']});class tf{constructor(e){this.injector=e}ngDoBootstrap(){if(void 0===customElements.get("dotcms-block-editor")){const e=function $Y(n,e){const t=function FY(n,e){return e.get(hc).resolveComponentFactory(n).inputs}(n,e.injector),i=e.strategyFactory||new BY(n,e.injector),r=function RY(n){const e={};return n.forEach(({propName:t,templateName:i})=>{e[function AY(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}(i)]=t}),e}(t);class o extends HY{get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=i.create(this.injector||e.injector);t.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const c=this[l];delete this[l],a.setInputValue(l,c)})}return this._ngElementStrategy}constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,u){this.ngElementStrategy.setInputValue(r[a],c)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return o.observedAttributes=Object.keys(r),t.forEach(({propName:s})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(a){this.ngElementStrategy.setInputValue(s,a)},configurable:!0,enumerable:!0})}),o}(Ug,{injector:this.injector});customElements.define("dotcms-block-editor",e)}}}tf.\u0275fac=function(e){return new(e||tf)(F(yr))},tf.\u0275mod=rt({type:tf}),tf.\u0275inj=wt({imports:[aP,UQ,zn,Y_,qh,_T,nT,sM]}),VG().bootstrapModule(tf).catch(n=>console.error(n))},10152:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k,V){for(var B=k<0?"-":"",G=Math.abs(k).toString();G.length{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k,V){if(null==k)throw new TypeError("assign requires that input parameter not be null or undefined");for(var B in V)Object.prototype.hasOwnProperty.call(V,B)&&(k[B]=V[B]);return k},q.exports=S.default},42926:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function B(G){return(0,V.default)({},G)};var V=k(x(32963));q.exports=S.default},73215:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(33338));S.default=V.default,q.exports=S.default},40150:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.getDefaultOptions=function k(){return x},S.setDefaultOptions=function V(B){x=B};var x={}},1635:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(90448)),B=k(x(71074)),G=k(x(23122)),H=k(x(8622)),R=k(x(68450)),P=k(x(10152)),Y=k(x(21393));function ze(Z,U){var W=Z>0?"-":"+",j=Math.abs(Z),z=Math.floor(j/60),he=j%60;if(0===he)return W+String(z);var Le=U||"";return W+String(z)+Le+(0,P.default)(he,2)}function me(Z,U){return Z%60==0?(Z>0?"-":"+")+(0,P.default)(Math.abs(Z)/60,2):je(Z,U)}function je(Z,U){var W=U||"",j=Z>0?"-":"+",z=Math.abs(Z);return j+(0,P.default)(Math.floor(z/60),2)+W+(0,P.default)(z%60,2)}S.default={G:function(U,W,j){var z=U.getUTCFullYear()>0?1:0;switch(W){case"G":case"GG":case"GGG":return j.era(z,{width:"abbreviated"});case"GGGGG":return j.era(z,{width:"narrow"});default:return j.era(z,{width:"wide"})}},y:function(U,W,j){if("yo"===W){var z=U.getUTCFullYear();return j.ordinalNumber(z>0?z:1-z,{unit:"year"})}return Y.default.y(U,W)},Y:function(U,W,j,z){var he=(0,R.default)(U,z),Le=he>0?he:1-he;return"YY"===W?(0,P.default)(Le%100,2):"Yo"===W?j.ordinalNumber(Le,{unit:"year"}):(0,P.default)(Le,W.length)},R:function(U,W){var j=(0,G.default)(U);return(0,P.default)(j,W.length)},u:function(U,W){var j=U.getUTCFullYear();return(0,P.default)(j,W.length)},Q:function(U,W,j){var z=Math.ceil((U.getUTCMonth()+1)/3);switch(W){case"Q":return String(z);case"QQ":return(0,P.default)(z,2);case"Qo":return j.ordinalNumber(z,{unit:"quarter"});case"QQQ":return j.quarter(z,{width:"abbreviated",context:"formatting"});case"QQQQQ":return j.quarter(z,{width:"narrow",context:"formatting"});default:return j.quarter(z,{width:"wide",context:"formatting"})}},q:function(U,W,j){var z=Math.ceil((U.getUTCMonth()+1)/3);switch(W){case"q":return String(z);case"qq":return(0,P.default)(z,2);case"qo":return j.ordinalNumber(z,{unit:"quarter"});case"qqq":return j.quarter(z,{width:"abbreviated",context:"standalone"});case"qqqqq":return j.quarter(z,{width:"narrow",context:"standalone"});default:return j.quarter(z,{width:"wide",context:"standalone"})}},M:function(U,W,j){var z=U.getUTCMonth();switch(W){case"M":case"MM":return Y.default.M(U,W);case"Mo":return j.ordinalNumber(z+1,{unit:"month"});case"MMM":return j.month(z,{width:"abbreviated",context:"formatting"});case"MMMMM":return j.month(z,{width:"narrow",context:"formatting"});default:return j.month(z,{width:"wide",context:"formatting"})}},L:function(U,W,j){var z=U.getUTCMonth();switch(W){case"L":return String(z+1);case"LL":return(0,P.default)(z+1,2);case"Lo":return j.ordinalNumber(z+1,{unit:"month"});case"LLL":return j.month(z,{width:"abbreviated",context:"standalone"});case"LLLLL":return j.month(z,{width:"narrow",context:"standalone"});default:return j.month(z,{width:"wide",context:"standalone"})}},w:function(U,W,j,z){var he=(0,H.default)(U,z);return"wo"===W?j.ordinalNumber(he,{unit:"week"}):(0,P.default)(he,W.length)},I:function(U,W,j){var z=(0,B.default)(U);return"Io"===W?j.ordinalNumber(z,{unit:"week"}):(0,P.default)(z,W.length)},d:function(U,W,j){return"do"===W?j.ordinalNumber(U.getUTCDate(),{unit:"date"}):Y.default.d(U,W)},D:function(U,W,j){var z=(0,V.default)(U);return"Do"===W?j.ordinalNumber(z,{unit:"dayOfYear"}):(0,P.default)(z,W.length)},E:function(U,W,j){var z=U.getUTCDay();switch(W){case"E":case"EE":case"EEE":return j.day(z,{width:"abbreviated",context:"formatting"});case"EEEEE":return j.day(z,{width:"narrow",context:"formatting"});case"EEEEEE":return j.day(z,{width:"short",context:"formatting"});default:return j.day(z,{width:"wide",context:"formatting"})}},e:function(U,W,j,z){var he=U.getUTCDay(),Le=(he-z.weekStartsOn+8)%7||7;switch(W){case"e":return String(Le);case"ee":return(0,P.default)(Le,2);case"eo":return j.ordinalNumber(Le,{unit:"day"});case"eee":return j.day(he,{width:"abbreviated",context:"formatting"});case"eeeee":return j.day(he,{width:"narrow",context:"formatting"});case"eeeeee":return j.day(he,{width:"short",context:"formatting"});default:return j.day(he,{width:"wide",context:"formatting"})}},c:function(U,W,j,z){var he=U.getUTCDay(),Le=(he-z.weekStartsOn+8)%7||7;switch(W){case"c":return String(Le);case"cc":return(0,P.default)(Le,W.length);case"co":return j.ordinalNumber(Le,{unit:"day"});case"ccc":return j.day(he,{width:"abbreviated",context:"standalone"});case"ccccc":return j.day(he,{width:"narrow",context:"standalone"});case"cccccc":return j.day(he,{width:"short",context:"standalone"});default:return j.day(he,{width:"wide",context:"standalone"})}},i:function(U,W,j){var z=U.getUTCDay(),he=0===z?7:z;switch(W){case"i":return String(he);case"ii":return(0,P.default)(he,W.length);case"io":return j.ordinalNumber(he,{unit:"day"});case"iii":return j.day(z,{width:"abbreviated",context:"formatting"});case"iiiii":return j.day(z,{width:"narrow",context:"formatting"});case"iiiiii":return j.day(z,{width:"short",context:"formatting"});default:return j.day(z,{width:"wide",context:"formatting"})}},a:function(U,W,j){var he=U.getUTCHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"});case"aaa":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return j.dayPeriod(he,{width:"narrow",context:"formatting"});default:return j.dayPeriod(he,{width:"wide",context:"formatting"})}},b:function(U,W,j){var he,z=U.getUTCHours();switch(he=12===z?"noon":0===z?"midnight":z/12>=1?"pm":"am",W){case"b":case"bb":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"});case"bbb":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return j.dayPeriod(he,{width:"narrow",context:"formatting"});default:return j.dayPeriod(he,{width:"wide",context:"formatting"})}},B:function(U,W,j){var he,z=U.getUTCHours();switch(he=z>=17?"evening":z>=12?"afternoon":z>=4?"morning":"night",W){case"B":case"BB":case"BBB":return j.dayPeriod(he,{width:"abbreviated",context:"formatting"});case"BBBBB":return j.dayPeriod(he,{width:"narrow",context:"formatting"});default:return j.dayPeriod(he,{width:"wide",context:"formatting"})}},h:function(U,W,j){if("ho"===W){var z=U.getUTCHours()%12;return 0===z&&(z=12),j.ordinalNumber(z,{unit:"hour"})}return Y.default.h(U,W)},H:function(U,W,j){return"Ho"===W?j.ordinalNumber(U.getUTCHours(),{unit:"hour"}):Y.default.H(U,W)},K:function(U,W,j){var z=U.getUTCHours()%12;return"Ko"===W?j.ordinalNumber(z,{unit:"hour"}):(0,P.default)(z,W.length)},k:function(U,W,j){var z=U.getUTCHours();return 0===z&&(z=24),"ko"===W?j.ordinalNumber(z,{unit:"hour"}):(0,P.default)(z,W.length)},m:function(U,W,j){return"mo"===W?j.ordinalNumber(U.getUTCMinutes(),{unit:"minute"}):Y.default.m(U,W)},s:function(U,W,j){return"so"===W?j.ordinalNumber(U.getUTCSeconds(),{unit:"second"}):Y.default.s(U,W)},S:function(U,W){return Y.default.S(U,W)},X:function(U,W,j,z){var Le=(z._originalDate||U).getTimezoneOffset();if(0===Le)return"Z";switch(W){case"X":return me(Le);case"XXXX":case"XX":return je(Le);default:return je(Le,":")}},x:function(U,W,j,z){var Le=(z._originalDate||U).getTimezoneOffset();switch(W){case"x":return me(Le);case"xxxx":case"xx":return je(Le);default:return je(Le,":")}},O:function(U,W,j,z){var Le=(z._originalDate||U).getTimezoneOffset();switch(W){case"O":case"OO":case"OOO":return"GMT"+ze(Le,":");default:return"GMT"+je(Le,":")}},z:function(U,W,j,z){var Le=(z._originalDate||U).getTimezoneOffset();switch(W){case"z":case"zz":case"zzz":return"GMT"+ze(Le,":");default:return"GMT"+je(Le,":")}},t:function(U,W,j,z){var Le=Math.floor((z._originalDate||U).getTime()/1e3);return(0,P.default)(Le,W.length)},T:function(U,W,j,z){var Le=(z._originalDate||U).getTime();return(0,P.default)(Le,W.length)}},q.exports=S.default},21393:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(10152));S.default={y:function(R,P){var Y=R.getUTCFullYear(),X=Y>0?Y:1-Y;return(0,V.default)("yy"===P?X%100:X,P.length)},M:function(R,P){var Y=R.getUTCMonth();return"M"===P?String(Y+1):(0,V.default)(Y+1,2)},d:function(R,P){return(0,V.default)(R.getUTCDate(),P.length)},a:function(R,P){var Y=R.getUTCHours()/12>=1?"pm":"am";switch(P){case"a":case"aa":return Y.toUpperCase();case"aaa":return Y;case"aaaaa":return Y[0];default:return"am"===Y?"a.m.":"p.m."}},h:function(R,P){return(0,V.default)(R.getUTCHours()%12||12,P.length)},H:function(R,P){return(0,V.default)(R.getUTCHours(),P.length)},m:function(R,P){return(0,V.default)(R.getUTCMinutes(),P.length)},s:function(R,P){return(0,V.default)(R.getUTCSeconds(),P.length)},S:function(R,P){var Y=P.length,X=R.getUTCMilliseconds(),oe=Math.floor(X*Math.pow(10,Y-3));return(0,V.default)(oe,P.length)}},q.exports=S.default},75852:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var x=function(R,P){switch(R){case"P":return P.date({width:"short"});case"PP":return P.date({width:"medium"});case"PPP":return P.date({width:"long"});default:return P.date({width:"full"})}},k=function(R,P){switch(R){case"p":return P.time({width:"short"});case"pp":return P.time({width:"medium"});case"ppp":return P.time({width:"long"});default:return P.time({width:"full"})}};S.default={p:k,P:function(R,P){var ze,Y=R.match(/(P+)(p+)?/)||[],X=Y[1],oe=Y[2];if(!oe)return x(R,P);switch(X){case"P":ze=P.dateTime({width:"short"});break;case"PP":ze=P.dateTime({width:"medium"});break;case"PPP":ze=P.dateTime({width:"long"});break;default:ze=P.dateTime({width:"full"})}return ze.replace("{{date}}",x(X,P)).replace("{{time}}",k(oe,P))}},q.exports=S.default},47664:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){var V=new Date(Date.UTC(k.getFullYear(),k.getMonth(),k.getDate(),k.getHours(),k.getMinutes(),k.getSeconds(),k.getMilliseconds()));return V.setUTCFullYear(k.getFullYear()),k.getTime()-V.getTime()},q.exports=S.default},90448:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R){(0,B.default)(1,arguments);var P=(0,V.default)(R),Y=P.getTime();P.setUTCMonth(0,1),P.setUTCHours(0,0,0,0);var X=P.getTime(),oe=Y-X;return Math.floor(oe/G)+1};var V=k(x(90798)),B=k(x(61886)),G=864e5;q.exports=S.default},71074:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y){(0,H.default)(1,arguments);var X=(0,V.default)(Y),oe=(0,B.default)(X).getTime()-(0,G.default)(X).getTime();return Math.round(oe/R)+1};var V=k(x(90798)),B=k(x(96729)),G=k(x(50525)),H=k(x(61886)),R=6048e5;q.exports=S.default},23122:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R){(0,B.default)(1,arguments);var P=(0,V.default)(R),Y=P.getUTCFullYear(),X=new Date(0);X.setUTCFullYear(Y+1,0,4),X.setUTCHours(0,0,0,0);var oe=(0,G.default)(X),ze=new Date(0);ze.setUTCFullYear(Y,0,4),ze.setUTCHours(0,0,0,0);var me=(0,G.default)(ze);return P.getTime()>=oe.getTime()?Y+1:P.getTime()>=me.getTime()?Y:Y-1};var V=k(x(90798)),B=k(x(61886)),G=k(x(96729));q.exports=S.default},8622:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y,X){(0,H.default)(1,arguments);var oe=(0,V.default)(Y),ze=(0,B.default)(oe,X).getTime()-(0,G.default)(oe,X).getTime();return Math.round(ze/R)+1};var V=k(x(90798)),B=k(x(88314)),G=k(x(72447)),H=k(x(61886)),R=6048e5;q.exports=S.default},68450:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y,X){var oe,ze,me,je,ee,Z,U,W;(0,B.default)(1,arguments);var j=(0,V.default)(Y),z=j.getUTCFullYear(),he=(0,R.getDefaultOptions)(),Le=(0,H.default)(null!==(oe=null!==(ze=null!==(me=null!==(je=X?.firstWeekContainsDate)&&void 0!==je?je:null==X||null===(ee=X.locale)||void 0===ee||null===(Z=ee.options)||void 0===Z?void 0:Z.firstWeekContainsDate)&&void 0!==me?me:he.firstWeekContainsDate)&&void 0!==ze?ze:null===(U=he.locale)||void 0===U||null===(W=U.options)||void 0===W?void 0:W.firstWeekContainsDate)&&void 0!==oe?oe:1);if(!(Le>=1&&Le<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Se=new Date(0);Se.setUTCFullYear(z+1,0,Le),Se.setUTCHours(0,0,0,0);var Ee=(0,G.default)(Se,X),Ae=new Date(0);Ae.setUTCFullYear(z,0,Le),Ae.setUTCHours(0,0,0,0);var ve=(0,G.default)(Ae,X);return j.getTime()>=Ee.getTime()?z+1:j.getTime()>=ve.getTime()?z:z-1};var V=k(x(90798)),B=k(x(61886)),G=k(x(88314)),H=k(x(6092)),R=x(40150);q.exports=S.default},70183:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.isProtectedDayOfYearToken=function V(H){return-1!==x.indexOf(H)},S.isProtectedWeekYearToken=function B(H){return-1!==k.indexOf(H)},S.throwProtectedError=function G(H,R,P){if("YYYY"===H)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(R,"`) for formatting years to the input `").concat(P,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===H)throw new RangeError("Use `yy` instead of `YY` (in `".concat(R,"`) for formatting years to the input `").concat(P,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===H)throw new RangeError("Use `d` instead of `D` (in `".concat(R,"`) for formatting days of the month to the input `").concat(P,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===H)throw new RangeError("Use `dd` instead of `DD` (in `".concat(R,"`) for formatting days of the month to the input `").concat(P,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))};var x=["D","DD"],k=["YY","YYYY"]},61886:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k,V){if(V.length1?"s":"")+" required, but only "+V.length+" present")},q.exports=S.default},96729:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function G(H){(0,B.default)(1,arguments);var R=1,P=(0,V.default)(H),Y=P.getUTCDay(),X=(Y{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R){(0,G.default)(1,arguments);var P=(0,V.default)(R),Y=new Date(0);Y.setUTCFullYear(P,0,4),Y.setUTCHours(0,0,0,0);var X=(0,B.default)(Y);return X};var V=k(x(23122)),B=k(x(96729)),G=k(x(61886));q.exports=S.default},88314:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function R(P,Y){var X,oe,ze,me,je,ee,Z,U;(0,B.default)(1,arguments);var W=(0,H.getDefaultOptions)(),j=(0,G.default)(null!==(X=null!==(oe=null!==(ze=null!==(me=Y?.weekStartsOn)&&void 0!==me?me:null==Y||null===(je=Y.locale)||void 0===je||null===(ee=je.options)||void 0===ee?void 0:ee.weekStartsOn)&&void 0!==ze?ze:W.weekStartsOn)&&void 0!==oe?oe:null===(Z=W.locale)||void 0===Z||null===(U=Z.options)||void 0===U?void 0:U.weekStartsOn)&&void 0!==X?X:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var z=(0,V.default)(P),he=z.getUTCDay(),Le=(he{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y,X){var oe,ze,me,je,ee,Z,U,W;(0,B.default)(1,arguments);var j=(0,R.getDefaultOptions)(),z=(0,H.default)(null!==(oe=null!==(ze=null!==(me=null!==(je=X?.firstWeekContainsDate)&&void 0!==je?je:null==X||null===(ee=X.locale)||void 0===ee||null===(Z=ee.options)||void 0===Z?void 0:Z.firstWeekContainsDate)&&void 0!==me?me:j.firstWeekContainsDate)&&void 0!==ze?ze:null===(U=j.locale)||void 0===U||null===(W=U.options)||void 0===W?void 0:W.firstWeekContainsDate)&&void 0!==oe?oe:1),he=(0,V.default)(Y,X),Le=new Date(0);Le.setUTCFullYear(he,0,z),Le.setUTCHours(0,0,0,0);var Se=(0,G.default)(Le,X);return Se};var V=k(x(68450)),B=k(x(61886)),G=k(x(88314)),H=k(x(6092)),R=x(40150);q.exports=S.default},6092:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){if(null===k||!0===k||!1===k)return NaN;var V=Number(k);return isNaN(V)?V:V<0?Math.ceil(V):Math.floor(V)},q.exports=S.default},50405:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R,P){(0,G.default)(2,arguments);var Y=(0,B.default)(R).getTime(),X=(0,V.default)(P);return new Date(Y+X)};var V=k(x(6092)),B=k(x(90798)),G=k(x(61886));q.exports=S.default},61348:(q,S,x)=>{"use strict";x.r(S),x.d(S,{default:()=>wo});var k={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function G(Be){return function(){var Ft=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},dt=Ft.width?String(Ft.width):Be.defaultWidth,Vt=Be.formats[dt]||Be.formats[Be.defaultWidth];return Vt}}var Y={date:G({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:G({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:G({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},oe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function je(Be){return function(Ft,dt){var xn;if("formatting"===(null!=dt&&dt.context?String(dt.context):"standalone")&&Be.formattingValues){var oi=Be.defaultFormattingWidth||Be.defaultWidth,Fi=null!=dt&&dt.width?String(dt.width):oi;xn=Be.formattingValues[Fi]||Be.formattingValues[oi]}else{var Pr=Be.defaultWidth,_t=null!=dt&&dt.width?String(dt.width):Be.defaultWidth;xn=Be.values[_t]||Be.values[Pr]}return xn[Be.argumentCallback?Be.argumentCallback(Ft):Ft]}}function Ee(Be){return function(Ft){var dt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Vt=dt.width,xn=Vt&&Be.matchPatterns[Vt]||Be.matchPatterns[Be.defaultMatchWidth],oi=Ft.match(xn);if(!oi)return null;var Vn,Fi=oi[0],Pr=Vt&&Be.parsePatterns[Vt]||Be.parsePatterns[Be.defaultParseWidth],_t=Array.isArray(Pr)?ve(Pr,function(Ko){return Ko.test(Fi)}):Ae(Pr,function(Ko){return Ko.test(Fi)});Vn=Be.valueCallback?Be.valueCallback(_t):_t,Vn=dt.valueCallback?dt.valueCallback(Vn):Vn;var aa=Ft.slice(Fi.length);return{value:Vn,rest:aa}}}function Ae(Be,Ft){for(var dt in Be)if(Be.hasOwnProperty(dt)&&Ft(Be[dt]))return dt}function ve(Be,Ft){for(var dt=0;dt0?"in "+xn:xn+" ago":xn},formatLong:Y,formatRelative:function(Ft,dt,Vt,xn){return oe[Ft]},localize:{ordinalNumber:function(Ft,dt){var Vt=Number(Ft),xn=Vt%100;if(xn>20||xn<10)switch(xn%10){case 1:return Vt+"st";case 2:return Vt+"nd";case 3:return Vt+"rd"}return Vt+"th"},era:je({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:je({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(Ft){return Ft-1}}),month:je({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:je({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:je({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:function qe(Be){return function(Ft){var dt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Vt=Ft.match(Be.matchPattern);if(!Vt)return null;var xn=Vt[0],oi=Ft.match(Be.parsePattern);if(!oi)return null;var Fi=Be.valueCallback?Be.valueCallback(oi[0]):oi[0];Fi=dt.valueCallback?dt.valueCallback(Fi):Fi;var Pr=Ft.slice(xn.length);return{value:Fi,rest:Pr}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(Ft){return parseInt(Ft,10)}}),era:Ee({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ee({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(Ft){return Ft+1}}),month:Ee({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Ee({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Ee({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}}},27868:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function j(he,Le,Se){var Ee,Ae,ve,qe,yt,se,Ii,vi,ue,Nr,qi,Ri,ia,ra,bo,Ha,oa,un;(0,oe.default)(2,arguments);var sa=String(Le),wo=(0,ze.getDefaultOptions)(),Be=null!==(Ee=null!==(Ae=Se?.locale)&&void 0!==Ae?Ae:wo.locale)&&void 0!==Ee?Ee:me.default,Ft=(0,X.default)(null!==(ve=null!==(qe=null!==(yt=null!==(se=Se?.firstWeekContainsDate)&&void 0!==se?se:null==Se||null===(Ii=Se.locale)||void 0===Ii||null===(vi=Ii.options)||void 0===vi?void 0:vi.firstWeekContainsDate)&&void 0!==yt?yt:wo.firstWeekContainsDate)&&void 0!==qe?qe:null===(ue=wo.locale)||void 0===ue||null===(Nr=ue.options)||void 0===Nr?void 0:Nr.firstWeekContainsDate)&&void 0!==ve?ve:1);if(!(Ft>=1&&Ft<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var dt=(0,X.default)(null!==(qi=null!==(Ri=null!==(ia=null!==(ra=Se?.weekStartsOn)&&void 0!==ra?ra:null==Se||null===(bo=Se.locale)||void 0===bo||null===(Ha=bo.options)||void 0===Ha?void 0:Ha.weekStartsOn)&&void 0!==ia?ia:wo.weekStartsOn)&&void 0!==Ri?Ri:null===(oa=wo.locale)||void 0===oa||null===(un=oa.options)||void 0===un?void 0:un.weekStartsOn)&&void 0!==qi?qi:0);if(!(dt>=0&&dt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Be.localize)throw new RangeError("locale must contain localize property");if(!Be.formatLong)throw new RangeError("locale must contain formatLong property");var Vt=(0,G.default)(he);if(!(0,V.default)(Vt))throw new RangeError("Invalid time value");var xn=(0,P.default)(Vt),oi=(0,B.default)(Vt,xn),Fi={firstWeekContainsDate:Ft,weekStartsOn:dt,locale:Be,_originalDate:Vt},Pr=sa.match(ee).map(function(_t){var Vn=_t[0];return"p"===Vn||"P"===Vn?(0,R.default[Vn])(_t,Be.formatLong):_t}).join("").match(je).map(function(_t){if("''"===_t)return"'";var Vn=_t[0];if("'"===Vn)return z(_t);var aa=H.default[Vn];if(aa)return!(null!=Se&&Se.useAdditionalWeekYearTokens)&&(0,Y.isProtectedWeekYearToken)(_t)&&(0,Y.throwProtectedError)(_t,Le,String(he)),!(null!=Se&&Se.useAdditionalDayOfYearTokens)&&(0,Y.isProtectedDayOfYearToken)(_t)&&(0,Y.throwProtectedError)(_t,Le,String(he)),aa(oi,_t,Be.localize,Fi);if(Vn.match(W))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Vn+"`");return _t}).join("");return Pr};var V=k(x(88830)),B=k(x(65726)),G=k(x(90798)),H=k(x(1635)),R=k(x(75852)),P=k(x(47664)),Y=x(70183),X=k(x(6092)),oe=k(x(61886)),ze=x(40150),me=k(x(73215)),je=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Z=/^'([^]*?)'?$/,U=/''/g,W=/[a-zA-Z]/;function z(he){var Le=he.match(Z);return Le?Le[1].replace(U,"'"):he}q.exports=S.default},73085:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function G(H){return(0,B.default)(1,arguments),H instanceof Date||"object"===(0,V.default)(H)&&"[object Date]"===Object.prototype.toString.call(H)};var V=k(x(50590)),B=k(x(61886));q.exports=S.default},88830:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R){if((0,G.default)(1,arguments),!(0,V.default)(R)&&"number"!=typeof R)return!1;var P=(0,B.default)(R);return!isNaN(Number(P))};var V=k(x(73085)),B=k(x(90798)),G=k(x(61886));q.exports=S.default},88995:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){return function(){var V=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},B=V.width?String(V.width):k.defaultWidth,G=k.formats[B]||k.formats[k.defaultWidth];return G}},q.exports=S.default},77579:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){return function(V,B){var H;if("formatting"===(null!=B&&B.context?String(B.context):"standalone")&&k.formattingValues){var R=k.defaultFormattingWidth||k.defaultWidth,P=null!=B&&B.width?String(B.width):R;H=k.formattingValues[P]||k.formattingValues[R]}else{var Y=k.defaultWidth,X=null!=B&&B.width?String(B.width):k.defaultWidth;H=k.values[X]||k.values[Y]}return H[k.argumentCallback?k.argumentCallback(V):V]}},q.exports=S.default},84728:(q,S)=>{"use strict";function k(B,G){for(var H in B)if(B.hasOwnProperty(H)&&G(B[H]))return H}function V(B,G){for(var H=0;H1&&void 0!==arguments[1]?arguments[1]:{},R=H.width,P=R&&B.matchPatterns[R]||B.matchPatterns[B.defaultMatchWidth],Y=G.match(P);if(!Y)return null;var me,X=Y[0],oe=R&&B.parsePatterns[R]||B.parsePatterns[B.defaultParseWidth],ze=Array.isArray(oe)?V(oe,function(ee){return ee.test(X)}):k(oe,function(ee){return ee.test(X)});me=B.valueCallback?B.valueCallback(ze):ze,me=H.valueCallback?H.valueCallback(me):me;var je=G.slice(X.length);return{value:me,rest:je}}},q.exports=S.default},27223:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k){return function(V){var B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},G=V.match(k.matchPattern);if(!G)return null;var H=G[0],R=V.match(k.parsePattern);if(!R)return null;var P=k.valueCallback?k.valueCallback(R[0]):R[0];P=B.valueCallback?B.valueCallback(P):P;var Y=V.slice(H.length);return{value:P,rest:Y}}},q.exports=S.default},39563:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var x={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};S.default=function(G,H,R){var P,Y=x[G];return P="string"==typeof Y?Y:1===H?Y.one:Y.other.replace("{{count}}",H.toString()),null!=R&&R.addSuffix?R.comparison&&R.comparison>0?"in "+P:P+" ago":P},q.exports=S.default},66929:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(88995)),R={date:(0,V.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,V.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,V.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};S.default=R,q.exports=S.default},21656:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var x={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};S.default=function(G,H,R,P){return x[G]},q.exports=S.default},31098:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(77579)),oe={ordinalNumber:function(je,ee){var Z=Number(je),U=Z%100;if(U>20||U<10)switch(U%10){case 1:return Z+"st";case 2:return Z+"nd";case 3:return Z+"rd"}return Z+"th"},era:(0,V.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,V.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(je){return je-1}}),month:(0,V.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,V.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,V.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};S.default=oe,q.exports=S.default},53239:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(84728)),U={ordinalNumber:(0,k(x(27223)).default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(z){return parseInt(z,10)}}),era:(0,V.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,V.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(z){return z+1}}),month:(0,V.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,V.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,V.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};S.default=U,q.exports=S.default},33338:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var V=k(x(39563)),B=k(x(66929)),G=k(x(21656)),H=k(x(31098)),R=k(x(53239));S.default={code:"en-US",formatDistance:V.default,formatLong:B.default,formatRelative:G.default,localize:H.default,match:R.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},q.exports=S.default},65726:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R,P){(0,B.default)(2,arguments);var Y=(0,G.default)(P);return(0,V.default)(R,-Y)};var V=k(x(50405)),B=k(x(61886)),G=k(x(6092));q.exports=S.default},90798:(q,S,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(S,"__esModule",{value:!0}),S.default=function G(H){(0,B.default)(1,arguments);var R=Object.prototype.toString.call(H);return H instanceof Date||"object"===(0,V.default)(H)&&"[object Date]"===R?new Date(H.getTime()):"number"==typeof H||"[object Number]"===R?new Date(H):(("string"==typeof H||"[object String]"===R)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))};var V=k(x(50590)),B=k(x(61886));q.exports=S.default},88222:(q,S,x)=>{q=x.nmd(q);var V="__lodash_hash_undefined__",H=9007199254740991,R="[object Arguments]",P="[object Array]",X="[object Boolean]",oe="[object Date]",ze="[object Error]",me="[object Function]",ee="[object Map]",Z="[object Number]",W="[object Object]",j="[object Promise]",he="[object RegExp]",Le="[object Set]",Se="[object String]",ve="[object WeakMap]",qe="[object ArrayBuffer]",yt="[object DataView]",Ha=/^\[object .+?Constructor\]$/,oa=/^(?:0|[1-9]\d*)$/,un={};un["[object Float32Array]"]=un["[object Float64Array]"]=un["[object Int8Array]"]=un["[object Int16Array]"]=un["[object Int32Array]"]=un["[object Uint8Array]"]=un["[object Uint8ClampedArray]"]=un["[object Uint16Array]"]=un["[object Uint32Array]"]=!0,un[R]=un[P]=un[qe]=un[X]=un[yt]=un[oe]=un[ze]=un[me]=un[ee]=un[Z]=un[W]=un[he]=un[Le]=un[Se]=un[ve]=!1;var sa="object"==typeof global&&global&&global.Object===Object&&global,wo="object"==typeof self&&self&&self.Object===Object&&self,Be=sa||wo||Function("return this")(),Ft=S&&!S.nodeType&&S,dt=Ft&&q&&!q.nodeType&&q,Vt=dt&&dt.exports===Ft,xn=Vt&&sa.process,oi=function(){try{return xn&&xn.binding&&xn.binding("util")}catch{}}(),Fi=oi&&oi.isTypedArray;function Vn(D,L){for(var te=-1,Ce=null==D?0:D.length;++teei))return!1;var tn=lt.get(D);if(tn&<.get(L))return tn==L;var bi=-1,no=!0,xe=2&te?new Gt:void 0;for(lt.set(D,L),lt.set(L,D);++bi-1},Qo.prototype.set=function LE(D,L){var te=this.__data__,Ce=zu(te,D);return Ce<0?(++this.size,te.push([D,L])):te[Ce][1]=L,this},Ga.prototype.clear=function ow(){this.size=0,this.__data__={hash:new da,map:new(ca||Qo),string:new da}},Ga.prototype.delete=function RE(D){var L=dn(this,D).delete(D);return this.size-=L?1:0,L},Ga.prototype.get=function sw(D){return dn(this,D).get(D)},Ga.prototype.has=function FE(D){return dn(this,D).has(D)},Ga.prototype.set=function Lr(D,L){var te=dn(this,D),Ce=te.size;return te.set(D,L),this.size+=te.size==Ce?0:1,this},Gt.prototype.add=Gt.prototype.push=function jE(D){return this.__data__.set(D,V),this},Gt.prototype.has=function zE(D){return this.__data__.has(D)},ha.prototype.clear=function $(){this.__data__=new Qo,this.size=0},ha.prototype.delete=function VE(D){var L=this.__data__,te=L.delete(D);return this.size=L.size,te},ha.prototype.get=function wt(D){return this.__data__.get(D)},ha.prototype.has=function ju(D){return this.__data__.has(D)},ha.prototype.set=function aw(D,L){var te=this.__data__;if(te instanceof Qo){var Ce=te.__data__;if(!ca||Ce.length<199)return Ce.push([D,L]),this.size=++te.size,this;te=this.__data__=new Ga(Ce)}return te.set(D,L),this.size=te.size,this};var UE=Zg?function(D){return null==D?[]:(D=Object(D),function Pr(D,L){for(var te=-1,Ce=null==D?0:D.length,Ge=0,lt=[];++te-1&&D%1==0&&D-1&&D%1==0&&D<=H}function Qa(D){var L=typeof D;return null!=D&&("object"==L||"function"==L)}function nc(D){return null!=D&&"object"==typeof D}var ny=Fi?function Ko(D){return function(L){return D(L)}}(Fi):function Ze(D){return nc(D)&&$u(D.length)&&!!un[Ya(D)]};function pw(D){return function F(D){return null!=D&&$u(D.length)&&!tc(D)}(D)?function Jg(D,L){var te=Uu(D),Ce=!te&&Ka(D),Ge=!te&&!Ce&&Hu(D),lt=!te&&!Ce&&!Ge&&ny(D),An=te||Ce||Ge||lt,ei=An?function aa(D,L){for(var te=-1,Ce=Array(D);++te{var k={"./ar-DZ/_lib/formatDistance/index.js":[28066,8592],"./ar-DZ/_lib/formatLong/index.js":[86369,8592],"./ar-DZ/_lib/formatRelative/index.js":[89786,8592],"./ar-DZ/_lib/localize/index.js":[36207,8592],"./ar-DZ/_lib/match/index.js":[53371,8592],"./ar-DZ/index.js":[76327,8592,6327],"./ar-EG/_lib/formatDistance/index.js":[95932,8592],"./ar-EG/_lib/formatLong/index.js":[46023,8592],"./ar-EG/_lib/formatRelative/index.js":[74621,8592],"./ar-EG/_lib/localize/index.js":[93376,8592],"./ar-EG/_lib/match/index.js":[76456,8592],"./ar-EG/index.js":[30830,8592,830],"./ar-MA/_lib/formatDistance/index.js":[25565,8592],"./ar-MA/_lib/formatLong/index.js":[81783,8592],"./ar-MA/_lib/formatRelative/index.js":[90030,8592],"./ar-MA/_lib/localize/index.js":[60503,8592],"./ar-MA/_lib/match/index.js":[83427,8592],"./ar-MA/index.js":[96094,8592,6094],"./ar-SA/_lib/formatDistance/index.js":[3797,8592],"./ar-SA/_lib/formatLong/index.js":[73212,8592],"./ar-SA/_lib/formatRelative/index.js":[79009,8592],"./ar-SA/_lib/localize/index.js":[12535,8592],"./ar-SA/_lib/match/index.js":[14710,8592],"./ar-SA/index.js":[54370,8592,4370],"./ar-TN/_lib/formatDistance/index.js":[56566,8592],"./ar-TN/_lib/formatLong/index.js":[4585,8592],"./ar-TN/_lib/formatRelative/index.js":[5374,8592],"./ar-TN/_lib/localize/index.js":[85963,8592],"./ar-TN/_lib/match/index.js":[13401,8592],"./ar-TN/index.js":[37373,8592,7373],"./be-tarask/_lib/formatDistance/index.js":[82665,8592],"./be-tarask/_lib/formatLong/index.js":[9662,8592],"./be-tarask/_lib/formatRelative/index.js":[4653,4,8592],"./be-tarask/_lib/localize/index.js":[40591,8592],"./be-tarask/_lib/match/index.js":[34412,8592],"./be-tarask/index.js":[27840,4,8592,7840],"./de-AT/_lib/localize/index.js":[44821,8592],"./de-AT/index.js":[21782,8592,1782],"./en-AU/_lib/formatLong/index.js":[65493,8592],"./en-AU/index.js":[87747,8592,7747],"./en-CA/_lib/formatDistance/index.js":[80780,8592],"./en-CA/_lib/formatLong/index.js":[26153,8592],"./en-CA/index.js":[21413,8592,1413],"./en-GB/_lib/formatLong/index.js":[33819,8592],"./en-GB/index.js":[33035,8592,3035],"./en-IE/index.js":[61959,8592,1959],"./en-IN/_lib/formatLong/index.js":[20862,8592],"./en-IN/index.js":[82873,8592,2873],"./en-NZ/_lib/formatLong/index.js":[36336,8592],"./en-NZ/index.js":[26041,8592,6041],"./en-US/_lib/formatDistance/index.js":[39563],"./en-US/_lib/formatLong/index.js":[66929],"./en-US/_lib/formatRelative/index.js":[21656],"./en-US/_lib/localize/index.js":[31098],"./en-US/_lib/match/index.js":[53239],"./en-US/index.js":[33338],"./en-ZA/_lib/formatLong/index.js":[9221,8592],"./en-ZA/index.js":[11543,8592,1543],"./fa-IR/_lib/formatDistance/index.js":[76726,8592],"./fa-IR/_lib/formatLong/index.js":[10749,8592],"./fa-IR/_lib/formatRelative/index.js":[7220,8592],"./fa-IR/_lib/localize/index.js":[72441,8592],"./fa-IR/_lib/match/index.js":[81488,8592],"./fa-IR/index.js":[84996,8592,4996],"./fr-CA/_lib/formatLong/index.js":[85947,8592],"./fr-CA/index.js":[73723,8592,3723],"./fr-CH/_lib/formatLong/index.js":[27414,8592],"./fr-CH/_lib/formatRelative/index.js":[66155,8592],"./fr-CH/index.js":[24565,8592,4565],"./it-CH/_lib/formatLong/index.js":[31519,8592],"./it-CH/index.js":[87736,8592,469],"./ja-Hira/_lib/formatDistance/index.js":[84703,8592],"./ja-Hira/_lib/formatLong/index.js":[56574,8592],"./ja-Hira/_lib/formatRelative/index.js":[93381,8592],"./ja-Hira/_lib/localize/index.js":[35710,8592],"./ja-Hira/_lib/match/index.js":[69417,8592],"./ja-Hira/index.js":[12944,8592,2944],"./nl-BE/_lib/formatDistance/index.js":[16129,8592],"./nl-BE/_lib/formatLong/index.js":[17657,8592],"./nl-BE/_lib/formatRelative/index.js":[89811,8592],"./nl-BE/_lib/localize/index.js":[58816,8592],"./nl-BE/_lib/match/index.js":[28333,8592],"./nl-BE/index.js":[70296,8592,296],"./pt-BR/_lib/formatDistance/index.js":[52638,8592],"./pt-BR/_lib/formatLong/index.js":[33247,8592],"./pt-BR/_lib/formatRelative/index.js":[25492,8592],"./pt-BR/_lib/localize/index.js":[81046,8592],"./pt-BR/_lib/match/index.js":[63770,8592],"./pt-BR/index.js":[47569,8592,7569],"./sr-Latn/_lib/formatDistance/index.js":[69014,8592],"./sr-Latn/_lib/formatLong/index.js":[99257,8592],"./sr-Latn/_lib/formatRelative/index.js":[42428,8592],"./sr-Latn/_lib/localize/index.js":[92773,8592],"./sr-Latn/_lib/match/index.js":[7766,8592],"./sr-Latn/index.js":[99064,8592,9064],"./uz-Cyrl/_lib/formatDistance/index.js":[67778,8592],"./uz-Cyrl/_lib/formatLong/index.js":[64095,8592],"./uz-Cyrl/_lib/formatRelative/index.js":[83734,8592],"./uz-Cyrl/_lib/localize/index.js":[17670,8592],"./uz-Cyrl/_lib/match/index.js":[75798,8592],"./uz-Cyrl/index.js":[14527,8592,4527],"./zh-CN/_lib/formatDistance/index.js":[33437,8592],"./zh-CN/_lib/formatLong/index.js":[91583,8592],"./zh-CN/_lib/formatRelative/index.js":[95629,8592,5441],"./zh-CN/_lib/localize/index.js":[17939,8592],"./zh-CN/_lib/match/index.js":[71362,8592],"./zh-CN/index.js":[86335,8592,2007],"./zh-HK/_lib/formatDistance/index.js":[37348,8592],"./zh-HK/_lib/formatLong/index.js":[60924,8592],"./zh-HK/_lib/formatRelative/index.js":[22164,8592],"./zh-HK/_lib/localize/index.js":[39264,8592],"./zh-HK/_lib/match/index.js":[50358,8592],"./zh-HK/index.js":[59277,8592,9277],"./zh-TW/_lib/formatDistance/index.js":[31613,8592],"./zh-TW/_lib/formatLong/index.js":[1239,8592],"./zh-TW/_lib/formatRelative/index.js":[13240,8592],"./zh-TW/_lib/localize/index.js":[29850,8592],"./zh-TW/_lib/match/index.js":[38819,8592],"./zh-TW/index.js":[74565,8592,3793]};function V(B){if(!x.o(k,B))return Promise.resolve().then(()=>{var R=new Error("Cannot find module '"+B+"'");throw R.code="MODULE_NOT_FOUND",R});var G=k[B],H=G[0];return Promise.all(G.slice(1).map(x.e)).then(()=>x.t(H,23))}V.keys=()=>Object.keys(k),V.id=13131,q.exports=V},71213:(q,S,x)=>{var k={"./_lib/buildFormatLongFn/index.js":[88995,7],"./_lib/buildLocalizeFn/index.js":[77579,7],"./_lib/buildMatchFn/index.js":[84728,7],"./_lib/buildMatchPatternFn/index.js":[27223,7],"./af/_lib/formatDistance/index.js":[55864,7,8592],"./af/_lib/formatLong/index.js":[25358,7,8592],"./af/_lib/formatRelative/index.js":[25892,7,8592],"./af/_lib/localize/index.js":[18874,7,8592],"./af/_lib/match/index.js":[22146,7,8592],"./af/index.js":[72399,7,8592,2399],"./ar-DZ/_lib/formatDistance/index.js":[28066,7,8592],"./ar-DZ/_lib/formatLong/index.js":[86369,7,8592],"./ar-DZ/_lib/formatRelative/index.js":[89786,7,8592],"./ar-DZ/_lib/localize/index.js":[36207,7,8592],"./ar-DZ/_lib/match/index.js":[53371,7,8592],"./ar-DZ/index.js":[76327,7,8592,6327],"./ar-EG/_lib/formatDistance/index.js":[95932,7,8592],"./ar-EG/_lib/formatLong/index.js":[46023,7,8592],"./ar-EG/_lib/formatRelative/index.js":[74621,7,8592],"./ar-EG/_lib/localize/index.js":[93376,7,8592],"./ar-EG/_lib/match/index.js":[76456,7,8592],"./ar-EG/index.js":[30830,7,8592,830],"./ar-MA/_lib/formatDistance/index.js":[25565,7,8592],"./ar-MA/_lib/formatLong/index.js":[81783,7,8592],"./ar-MA/_lib/formatRelative/index.js":[90030,7,8592],"./ar-MA/_lib/localize/index.js":[60503,7,8592],"./ar-MA/_lib/match/index.js":[83427,7,8592],"./ar-MA/index.js":[96094,7,8592,6094],"./ar-SA/_lib/formatDistance/index.js":[3797,7,8592],"./ar-SA/_lib/formatLong/index.js":[73212,7,8592],"./ar-SA/_lib/formatRelative/index.js":[79009,7,8592],"./ar-SA/_lib/localize/index.js":[12535,7,8592],"./ar-SA/_lib/match/index.js":[14710,7,8592],"./ar-SA/index.js":[54370,7,8592,4370],"./ar-TN/_lib/formatDistance/index.js":[56566,7,8592],"./ar-TN/_lib/formatLong/index.js":[4585,7,8592],"./ar-TN/_lib/formatRelative/index.js":[5374,7,8592],"./ar-TN/_lib/localize/index.js":[85963,7,8592],"./ar-TN/_lib/match/index.js":[13401,7,8592],"./ar-TN/index.js":[37373,7,8592,7373],"./ar/_lib/formatDistance/index.js":[91118,7,8592],"./ar/_lib/formatLong/index.js":[90899,7,8592],"./ar/_lib/formatRelative/index.js":[18739,7,8592],"./ar/_lib/localize/index.js":[64620,7,8592],"./ar/_lib/match/index.js":[32101,7,8592],"./ar/index.js":[91780,7,8592,1780],"./az/_lib/formatDistance/index.js":[2541,7,8592],"./az/_lib/formatLong/index.js":[6246,7,8592],"./az/_lib/formatRelative/index.js":[33557,7,8592],"./az/_lib/localize/index.js":[89347,7,8592],"./az/_lib/match/index.js":[75242,7,8592],"./az/index.js":[170,7,8592,170],"./be-tarask/_lib/formatDistance/index.js":[82665,7,8592],"./be-tarask/_lib/formatLong/index.js":[9662,7,8592],"./be-tarask/_lib/formatRelative/index.js":[4653,7,4,8592],"./be-tarask/_lib/localize/index.js":[40591,7,8592],"./be-tarask/_lib/match/index.js":[34412,7,8592],"./be-tarask/index.js":[27840,7,4,8592,7840],"./be/_lib/formatDistance/index.js":[9006,7,8592],"./be/_lib/formatLong/index.js":[58343,7,8592],"./be/_lib/formatRelative/index.js":[20369,7,4,8592],"./be/_lib/localize/index.js":[30768,7,8592],"./be/_lib/match/index.js":[35637,7,8592],"./be/index.js":[94646,7,4,8592,4646],"./bg/_lib/formatDistance/index.js":[54037,7,8592],"./bg/_lib/formatLong/index.js":[44221,7,8592],"./bg/_lib/formatRelative/index.js":[24925,7,8592,9491],"./bg/_lib/localize/index.js":[60958,7,8592],"./bg/_lib/match/index.js":[99124,7,8592],"./bg/index.js":[90948,7,8592,6922],"./bn/_lib/formatDistance/index.js":[5190,7,8592],"./bn/_lib/formatLong/index.js":[10846,7,8592],"./bn/_lib/formatRelative/index.js":[90009,7,8592],"./bn/_lib/localize/index.js":[32143,9,8592],"./bn/_lib/match/index.js":[71701,7,8592],"./bn/index.js":[76982,7,8592,6982],"./bs/_lib/formatDistance/index.js":[3504,7,8592],"./bs/_lib/formatLong/index.js":[47625,7,8592],"./bs/_lib/formatRelative/index.js":[69642,7,8592],"./bs/_lib/localize/index.js":[19781,7,8592],"./bs/_lib/match/index.js":[98469,7,8592],"./bs/index.js":[21670,7,8592,1670],"./ca/_lib/formatDistance/index.js":[78470,7,8592],"./ca/_lib/formatLong/index.js":[37682,7,8592],"./ca/_lib/formatRelative/index.js":[73019,7,8592],"./ca/_lib/localize/index.js":[94354,7,8592],"./ca/_lib/match/index.js":[87821,7,8592],"./ca/index.js":[59800,7,8592,9800],"./cs/_lib/formatDistance/index.js":[84712,7,8592],"./cs/_lib/formatLong/index.js":[25366,7,8592],"./cs/_lib/formatRelative/index.js":[30404,7,8592],"./cs/_lib/localize/index.js":[1944,7,8592],"./cs/_lib/match/index.js":[8302,7,8592],"./cs/index.js":[27463,7,8592,7463],"./cy/_lib/formatDistance/index.js":[53860,7,8592],"./cy/_lib/formatLong/index.js":[5355,7,8592],"./cy/_lib/formatRelative/index.js":[11612,7,8592],"./cy/_lib/localize/index.js":[79008,7,8592],"./cy/_lib/match/index.js":[69946,7,8592],"./cy/index.js":[87955,7,8592,7955],"./da/_lib/formatDistance/index.js":[32439,7,8592],"./da/_lib/formatLong/index.js":[40114,7,8592],"./da/_lib/formatRelative/index.js":[33452,7,8592],"./da/_lib/localize/index.js":[22653,7,8592],"./da/_lib/match/index.js":[1416,7,8592],"./da/index.js":[11295,7,8592,1295],"./de-AT/_lib/localize/index.js":[44821,7,8592],"./de-AT/index.js":[21782,7,8592,1782],"./de/_lib/formatDistance/index.js":[98815,7,8592],"./de/_lib/formatLong/index.js":[47173,7,8592],"./de/_lib/formatRelative/index.js":[5278,7,8592],"./de/_lib/localize/index.js":[54552,7,8592],"./de/_lib/match/index.js":[31871,7,8592],"./de/index.js":[94086,7,8592,4086],"./el/_lib/formatDistance/index.js":[39298,7,8592],"./el/_lib/formatLong/index.js":[94460,7,8592],"./el/_lib/formatRelative/index.js":[72435,7,8592],"./el/_lib/localize/index.js":[674,7,8592],"./el/_lib/match/index.js":[40588,7,8592],"./el/index.js":[26106,7,8592,6106],"./en-AU/_lib/formatLong/index.js":[65493,7,8592],"./en-AU/index.js":[87747,7,8592,7747],"./en-CA/_lib/formatDistance/index.js":[80780,7,8592],"./en-CA/_lib/formatLong/index.js":[26153,7,8592],"./en-CA/index.js":[21413,7,8592,1413],"./en-GB/_lib/formatLong/index.js":[33819,7,8592],"./en-GB/index.js":[33035,7,8592,3035],"./en-IE/index.js":[61959,7,8592,1959],"./en-IN/_lib/formatLong/index.js":[20862,7,8592],"./en-IN/index.js":[82873,7,8592,2873],"./en-NZ/_lib/formatLong/index.js":[36336,7,8592],"./en-NZ/index.js":[26041,7,8592,6041],"./en-US/_lib/formatDistance/index.js":[39563,7],"./en-US/_lib/formatLong/index.js":[66929,7],"./en-US/_lib/formatRelative/index.js":[21656,7],"./en-US/_lib/localize/index.js":[31098,7],"./en-US/_lib/match/index.js":[53239,7],"./en-US/index.js":[33338,7],"./en-ZA/_lib/formatLong/index.js":[9221,7,8592],"./en-ZA/index.js":[11543,7,8592,1543],"./eo/_lib/formatDistance/index.js":[43549,7,8592],"./eo/_lib/formatLong/index.js":[25567,7,8592],"./eo/_lib/formatRelative/index.js":[30410,7,8592],"./eo/_lib/localize/index.js":[27249,7,8592],"./eo/_lib/match/index.js":[75687,7,8592],"./eo/index.js":[63574,7,8592,3574],"./es/_lib/formatDistance/index.js":[66660,7,8592],"./es/_lib/formatLong/index.js":[39055,7,8592],"./es/_lib/formatRelative/index.js":[63774,7,8592],"./es/_lib/localize/index.js":[38835,7,8592],"./es/_lib/match/index.js":[38662,7,8592],"./es/index.js":[23413,7,8592,3413],"./et/_lib/formatDistance/index.js":[64334,7,8592],"./et/_lib/formatLong/index.js":[32045,7,8592],"./et/_lib/formatRelative/index.js":[47074,7,8592],"./et/_lib/localize/index.js":[42462,7,8592],"./et/_lib/match/index.js":[85999,7,8592],"./et/index.js":[65861,7,8592,5861],"./eu/_lib/formatDistance/index.js":[91793,7,8592],"./eu/_lib/formatLong/index.js":[17350,7,8592],"./eu/_lib/formatRelative/index.js":[25688,7,8592],"./eu/_lib/localize/index.js":[28061,7,8592],"./eu/_lib/match/index.js":[11113,7,8592],"./eu/index.js":[29618,7,8592,9618],"./fa-IR/_lib/formatDistance/index.js":[76726,7,8592],"./fa-IR/_lib/formatLong/index.js":[10749,7,8592],"./fa-IR/_lib/formatRelative/index.js":[7220,7,8592],"./fa-IR/_lib/localize/index.js":[72441,7,8592],"./fa-IR/_lib/match/index.js":[81488,7,8592],"./fa-IR/index.js":[84996,7,8592,4996],"./fi/_lib/formatDistance/index.js":[97929,7,8592],"./fi/_lib/formatLong/index.js":[63741,7,8592],"./fi/_lib/formatRelative/index.js":[23234,7,8592],"./fi/_lib/localize/index.js":[5936,7,8592],"./fi/_lib/match/index.js":[157,7,8592],"./fi/index.js":[3596,7,8592,3596],"./fr-CA/_lib/formatLong/index.js":[85947,7,8592],"./fr-CA/index.js":[73723,7,8592,3723],"./fr-CH/_lib/formatLong/index.js":[27414,7,8592],"./fr-CH/_lib/formatRelative/index.js":[66155,7,8592],"./fr-CH/index.js":[24565,7,8592,4565],"./fr/_lib/formatDistance/index.js":[26839,7,8592],"./fr/_lib/formatLong/index.js":[32554,7,8592],"./fr/_lib/formatRelative/index.js":[15328,7,8592],"./fr/_lib/localize/index.js":[29821,7,8592],"./fr/_lib/match/index.js":[57047,7,8592],"./fr/index.js":[34153,7,8592,4153],"./fy/_lib/formatDistance/index.js":[60373,7,8592],"./fy/_lib/formatLong/index.js":[97771,7,8592],"./fy/_lib/formatRelative/index.js":[33851,7,8592],"./fy/_lib/localize/index.js":[86993,7,8592],"./fy/_lib/match/index.js":[48603,7,8592],"./fy/index.js":[73434,7,8592,3434],"./gd/_lib/formatDistance/index.js":[45690,7,8592],"./gd/_lib/formatLong/index.js":[2660,7,8592],"./gd/_lib/formatRelative/index.js":[30700,7,8592],"./gd/_lib/localize/index.js":[40751,7,8592],"./gd/_lib/match/index.js":[40421,7,8592],"./gd/index.js":[48569,7,8592,8569],"./gl/_lib/formatDistance/index.js":[35871,7,8592],"./gl/_lib/formatLong/index.js":[30449,7,8592],"./gl/_lib/formatRelative/index.js":[95563,7,8592],"./gl/_lib/localize/index.js":[61905,7,8592],"./gl/_lib/match/index.js":[33150,7,8592],"./gl/index.js":[96508,7,8592,6508],"./gu/_lib/formatDistance/index.js":[88210,7,8592],"./gu/_lib/formatLong/index.js":[63333,7,8592],"./gu/_lib/formatRelative/index.js":[89348,7,8592],"./gu/_lib/localize/index.js":[50143,7,8592],"./gu/_lib/match/index.js":[50932,7,8592],"./gu/index.js":[75732,7,8592,5732],"./he/_lib/formatDistance/index.js":[42191,7,8592],"./he/_lib/formatLong/index.js":[13925,7,8592],"./he/_lib/formatRelative/index.js":[11481,7,8592],"./he/_lib/localize/index.js":[19661,7,8592],"./he/_lib/match/index.js":[41291,7,8592],"./he/index.js":[86517,7,8592,6517],"./hi/_lib/formatDistance/index.js":[52573,7,8592],"./hi/_lib/formatLong/index.js":[30535,7,8592],"./hi/_lib/formatRelative/index.js":[65379,7,8592],"./hi/_lib/localize/index.js":[35423,9,8592],"./hi/_lib/match/index.js":[78198,7,8592],"./hi/index.js":[29562,7,8592,9562],"./hr/_lib/formatDistance/index.js":[7652,7,8592],"./hr/_lib/formatLong/index.js":[29577,7,8592],"./hr/_lib/formatRelative/index.js":[27603,7,8592],"./hr/_lib/localize/index.js":[12512,7,8592],"./hr/_lib/match/index.js":[83880,7,8592],"./hr/index.js":[41499,7,8592,1499],"./ht/_lib/formatDistance/index.js":[17743,7,8592],"./ht/_lib/formatLong/index.js":[50596,7,8592],"./ht/_lib/formatRelative/index.js":[66473,7,8592],"./ht/_lib/localize/index.js":[98942,7,8592],"./ht/_lib/match/index.js":[18649,7,8592],"./ht/index.js":[91792,7,8592,1792],"./hu/_lib/formatDistance/index.js":[74406,7,8592],"./hu/_lib/formatLong/index.js":[53971,7,8592],"./hu/_lib/formatRelative/index.js":[48580,7,8592],"./hu/_lib/localize/index.js":[6998,7,8592],"./hu/_lib/match/index.js":[69897,7,8592],"./hu/index.js":[85980,7,8592,5980],"./hy/_lib/formatDistance/index.js":[50897,7,8592],"./hy/_lib/formatLong/index.js":[11837,7,8592],"./hy/_lib/formatRelative/index.js":[3543,7,8592],"./hy/_lib/localize/index.js":[90151,7,8592],"./hy/_lib/match/index.js":[97177,7,8592],"./hy/index.js":[83268,7,8592,3268],"./id/_lib/formatDistance/index.js":[70846,7,8592],"./id/_lib/formatLong/index.js":[53405,7,8592],"./id/_lib/formatRelative/index.js":[97180,7,8592],"./id/_lib/localize/index.js":[35645,7,8592],"./id/_lib/match/index.js":[87601,7,8592],"./id/index.js":[90146,7,8592,146],"./is/_lib/formatDistance/index.js":[2370,7,8592],"./is/_lib/formatLong/index.js":[74096,7,8592],"./is/_lib/formatRelative/index.js":[42141,7,8592],"./is/_lib/localize/index.js":[12161,7,8592],"./is/_lib/match/index.js":[20798,7,8592],"./is/index.js":[84111,7,8592,4111],"./it-CH/_lib/formatLong/index.js":[31519,7,8592],"./it-CH/index.js":[87736,7,8592,469],"./it/_lib/formatDistance/index.js":[40358,7,8592],"./it/_lib/formatLong/index.js":[29588,7,8592],"./it/_lib/formatRelative/index.js":[91403,7,8592,5096],"./it/_lib/localize/index.js":[62007,7,8592],"./it/_lib/match/index.js":[94070,7,8592],"./it/index.js":[93722,7,8592,2039],"./ja-Hira/_lib/formatDistance/index.js":[84703,7,8592],"./ja-Hira/_lib/formatLong/index.js":[56574,7,8592],"./ja-Hira/_lib/formatRelative/index.js":[93381,7,8592],"./ja-Hira/_lib/localize/index.js":[35710,7,8592],"./ja-Hira/_lib/match/index.js":[69417,7,8592],"./ja-Hira/index.js":[12944,7,8592,2944],"./ja/_lib/formatDistance/index.js":[68018,7,8592],"./ja/_lib/formatLong/index.js":[45602,7,8592],"./ja/_lib/formatRelative/index.js":[65297,7,8592],"./ja/_lib/localize/index.js":[77420,7,8592],"./ja/_lib/match/index.js":[83926,7,8592],"./ja/index.js":[89251,7,8592,9251],"./ka/_lib/formatDistance/index.js":[39442,7,8592],"./ka/_lib/formatLong/index.js":[960,7,8592],"./ka/_lib/formatRelative/index.js":[18861,7,8592],"./ka/_lib/localize/index.js":[85798,7,8592],"./ka/_lib/match/index.js":[55077,7,8592],"./ka/index.js":[34010,7,8592,4010],"./kk/_lib/formatDistance/index.js":[44502,7,8592],"./kk/_lib/formatLong/index.js":[79591,7,8592],"./kk/_lib/formatRelative/index.js":[80876,7,8592,1098],"./kk/_lib/localize/index.js":[16163,7,8592],"./kk/_lib/match/index.js":[11079,7,8592],"./kk/index.js":[61615,7,8592,3387],"./km/_lib/formatDistance/index.js":[69355,7,8592],"./km/_lib/formatLong/index.js":[64335,7,8592],"./km/_lib/formatRelative/index.js":[68462,7,8592],"./km/_lib/localize/index.js":[32885,7,8592],"./km/_lib/match/index.js":[49242,7,8592],"./km/index.js":[98510,7,8592,8510],"./kn/_lib/formatDistance/index.js":[93557,7,8592],"./kn/_lib/formatLong/index.js":[19335,7,8592],"./kn/_lib/formatRelative/index.js":[19080,7,8592],"./kn/_lib/localize/index.js":[83848,7,8592],"./kn/_lib/match/index.js":[36809,7,8592],"./kn/index.js":[99517,7,8592,9517],"./ko/_lib/formatDistance/index.js":[21540,7,8592],"./ko/_lib/formatLong/index.js":[47237,7,8592],"./ko/_lib/formatRelative/index.js":[91078,7,8592],"./ko/_lib/localize/index.js":[89409,7,8592],"./ko/_lib/match/index.js":[38567,7,8592],"./ko/index.js":[15058,7,8592,5058],"./lb/_lib/formatDistance/index.js":[81904,7,8592],"./lb/_lib/formatLong/index.js":[53103,7,8592],"./lb/_lib/formatRelative/index.js":[64861,7,8592],"./lb/_lib/localize/index.js":[13317,7,8592],"./lb/_lib/match/index.js":[72652,7,8592],"./lb/index.js":[61953,7,8592,1953],"./lt/_lib/formatDistance/index.js":[55348,7,8592],"./lt/_lib/formatLong/index.js":[18290,7,8592],"./lt/_lib/formatRelative/index.js":[53257,7,8592],"./lt/_lib/localize/index.js":[62395,7,8592],"./lt/_lib/match/index.js":[5825,7,8592],"./lt/index.js":[35901,7,8592,5901],"./lv/_lib/formatDistance/index.js":[28910,7,8592],"./lv/_lib/formatLong/index.js":[86421,7,8592],"./lv/_lib/formatRelative/index.js":[60151,7,8592,3746],"./lv/_lib/localize/index.js":[44960,7,8592],"./lv/_lib/match/index.js":[4876,7,8592],"./lv/index.js":[82008,7,8592,6752],"./mk/_lib/formatDistance/index.js":[38992,7,8592],"./mk/_lib/formatLong/index.js":[7479,7,8592],"./mk/_lib/formatRelative/index.js":[41655,7,8592,903],"./mk/_lib/localize/index.js":[23458,7,8592],"./mk/_lib/match/index.js":[82975,7,8592],"./mk/index.js":[21880,7,8592,3593],"./mn/_lib/formatDistance/index.js":[61341,7,8592],"./mn/_lib/formatLong/index.js":[19732,7,8592],"./mn/_lib/formatRelative/index.js":[98225,7,8592],"./mn/_lib/localize/index.js":[89576,7,8592],"./mn/_lib/match/index.js":[33306,7,8592],"./mn/index.js":[31937,7,8592,1937],"./ms/_lib/formatDistance/index.js":[97808,7,8592],"./ms/_lib/formatLong/index.js":[61962,7,8592],"./ms/_lib/formatRelative/index.js":[68530,7,8592],"./ms/_lib/localize/index.js":[13241,7,8592],"./ms/_lib/match/index.js":[67079,7,8592],"./ms/index.js":[25098,7,8592,5098],"./mt/_lib/formatDistance/index.js":[14611,7,8592],"./mt/_lib/formatLong/index.js":[65011,7,8592],"./mt/_lib/formatRelative/index.js":[44521,7,8592],"./mt/_lib/localize/index.js":[69408,7,8592],"./mt/_lib/match/index.js":[29726,7,8592],"./mt/index.js":[12811,7,8592,2811],"./nb/_lib/formatDistance/index.js":[59968,7,8592],"./nb/_lib/formatLong/index.js":[20511,7,8592],"./nb/_lib/formatRelative/index.js":[11639,7,8592],"./nb/_lib/localize/index.js":[94249,7,8592],"./nb/_lib/match/index.js":[63498,7,8592],"./nb/index.js":[61295,7,8592,8226],"./nl-BE/_lib/formatDistance/index.js":[16129,7,8592],"./nl-BE/_lib/formatLong/index.js":[17657,7,8592],"./nl-BE/_lib/formatRelative/index.js":[89811,7,8592],"./nl-BE/_lib/localize/index.js":[58816,7,8592],"./nl-BE/_lib/match/index.js":[28333,7,8592],"./nl-BE/index.js":[70296,7,8592,296],"./nl/_lib/formatDistance/index.js":[57117,7,8592],"./nl/_lib/formatLong/index.js":[57197,7,8592],"./nl/_lib/formatRelative/index.js":[62818,7,8592],"./nl/_lib/localize/index.js":[67706,7,8592],"./nl/_lib/match/index.js":[61430,7,8592],"./nl/index.js":[80775,7,8592,775],"./nn/_lib/formatDistance/index.js":[4563,7,8592],"./nn/_lib/formatLong/index.js":[89212,7,8592],"./nn/_lib/formatRelative/index.js":[2565,7,8592],"./nn/_lib/localize/index.js":[28456,7,8592],"./nn/_lib/match/index.js":[51571,7,8592],"./nn/index.js":[34632,7,8592,4632],"./oc/_lib/formatDistance/index.js":[16585,7,8592],"./oc/_lib/formatLong/index.js":[96725,7,8592],"./oc/_lib/formatRelative/index.js":[7548,7,8592],"./oc/_lib/localize/index.js":[93417,7,8592],"./oc/_lib/match/index.js":[18145,7,8592],"./oc/index.js":[68311,7,8592,8311],"./pl/_lib/formatDistance/index.js":[62056,7,8592],"./pl/_lib/formatLong/index.js":[47448,7,8592],"./pl/_lib/formatRelative/index.js":[65991,7,8592,6160],"./pl/_lib/localize/index.js":[4306,7,8592],"./pl/_lib/match/index.js":[76075,7,8592],"./pl/index.js":[8554,7,8592,715],"./pt-BR/_lib/formatDistance/index.js":[52638,7,8592],"./pt-BR/_lib/formatLong/index.js":[33247,7,8592],"./pt-BR/_lib/formatRelative/index.js":[25492,7,8592],"./pt-BR/_lib/localize/index.js":[81046,7,8592],"./pt-BR/_lib/match/index.js":[63770,7,8592],"./pt-BR/index.js":[47569,7,8592,7569],"./pt/_lib/formatDistance/index.js":[55488,7,8592],"./pt/_lib/formatLong/index.js":[5133,7,8592],"./pt/_lib/formatRelative/index.js":[7493,7,8592],"./pt/_lib/localize/index.js":[58360,7,8592],"./pt/_lib/match/index.js":[37200,7,8592],"./pt/index.js":[24239,7,8592,4239],"./ro/_lib/formatDistance/index.js":[18199,7,8592],"./ro/_lib/formatLong/index.js":[84311,7,8592],"./ro/_lib/formatRelative/index.js":[97974,7,8592],"./ro/_lib/localize/index.js":[64729,7,8592],"./ro/_lib/match/index.js":[9202,7,8592],"./ro/index.js":[51055,7,8592,1055],"./ru/_lib/formatDistance/index.js":[90650,7,8592],"./ru/_lib/formatLong/index.js":[12580,7,8592],"./ru/_lib/formatRelative/index.js":[15994,7,8592,1338],"./ru/_lib/localize/index.js":[66943,7,8592],"./ru/_lib/match/index.js":[86374,7,8592],"./ru/index.js":[27413,7,8592,5287],"./sk/_lib/formatDistance/index.js":[32882,7,8592],"./sk/_lib/formatLong/index.js":[95087,7,8592],"./sk/_lib/formatRelative/index.js":[35507,7,8592,3951],"./sk/_lib/localize/index.js":[37369,7,8592],"./sk/_lib/match/index.js":[74329,7,8592],"./sk/index.js":[17065,7,8592,4586],"./sl/_lib/formatDistance/index.js":[57613,7,8592],"./sl/_lib/formatLong/index.js":[66302,7,8592],"./sl/_lib/formatRelative/index.js":[92131,7,8592],"./sl/_lib/localize/index.js":[2942,7,8592],"./sl/_lib/match/index.js":[36326,7,8592],"./sl/index.js":[62166,7,8592,2166],"./sq/_lib/formatDistance/index.js":[82569,7,8592],"./sq/_lib/formatLong/index.js":[32784,7,8592],"./sq/_lib/formatRelative/index.js":[44390,7,8592],"./sq/_lib/localize/index.js":[26425,7,8592],"./sq/_lib/match/index.js":[72140,7,8592],"./sq/index.js":[70797,7,8592,797],"./sr-Latn/_lib/formatDistance/index.js":[69014,7,8592],"./sr-Latn/_lib/formatLong/index.js":[99257,7,8592],"./sr-Latn/_lib/formatRelative/index.js":[42428,7,8592],"./sr-Latn/_lib/localize/index.js":[92773,7,8592],"./sr-Latn/_lib/match/index.js":[7766,7,8592],"./sr-Latn/index.js":[99064,7,8592,9064],"./sr/_lib/formatDistance/index.js":[55503,7,8592],"./sr/_lib/formatLong/index.js":[13465,7,8592],"./sr/_lib/formatRelative/index.js":[25743,7,8592],"./sr/_lib/localize/index.js":[30172,7,8592],"./sr/_lib/match/index.js":[81613,7,8592],"./sr/index.js":[15930,7,8592,5930],"./sv/_lib/formatDistance/index.js":[81387,7,8592],"./sv/_lib/formatLong/index.js":[20660,7,8592],"./sv/_lib/formatRelative/index.js":[43502,7,8592],"./sv/_lib/localize/index.js":[32384,7,8592],"./sv/_lib/match/index.js":[69940,7,8592],"./sv/index.js":[81413,7,8592,2135],"./ta/_lib/formatDistance/index.js":[66840,7,8592],"./ta/_lib/formatLong/index.js":[49391,7,8592],"./ta/_lib/formatRelative/index.js":[99284,7,8592],"./ta/_lib/localize/index.js":[61290,7,8592],"./ta/_lib/match/index.js":[33749,7,8592],"./ta/index.js":[21486,7,8592,1486],"./te/_lib/formatDistance/index.js":[38,7,8592],"./te/_lib/formatLong/index.js":[34703,7,8592],"./te/_lib/formatRelative/index.js":[46611,7,8592],"./te/_lib/localize/index.js":[86184,7,8592],"./te/_lib/match/index.js":[17208,7,8592],"./te/index.js":[52492,7,8592,2492],"./th/_lib/formatDistance/index.js":[32939,7,8592],"./th/_lib/formatLong/index.js":[96146,7,8592],"./th/_lib/formatRelative/index.js":[97294,7,8592],"./th/_lib/localize/index.js":[44204,7,8592],"./th/_lib/match/index.js":[59829,7,8592],"./th/index.js":[74785,7,8592,4785],"./tr/_lib/formatDistance/index.js":[77216,7,8592],"./tr/_lib/formatLong/index.js":[68379,7,8592],"./tr/_lib/formatRelative/index.js":[93999,7,8592],"./tr/_lib/localize/index.js":[8830,7,8592],"./tr/_lib/match/index.js":[58828,7,8592],"./tr/index.js":[63131,7,8592,3131],"./ug/_lib/formatDistance/index.js":[69442,7,8592],"./ug/_lib/formatLong/index.js":[36922,7,8592],"./ug/_lib/formatRelative/index.js":[20290,7,8592],"./ug/_lib/localize/index.js":[82490,7,8592],"./ug/_lib/match/index.js":[85282,7,8592],"./ug/index.js":[60182,7,8592,182],"./uk/_lib/formatDistance/index.js":[10017,7,8592],"./uk/_lib/formatLong/index.js":[26136,7,8592],"./uk/_lib/formatRelative/index.js":[88271,7,4,8592],"./uk/_lib/localize/index.js":[10954,7,8592],"./uk/_lib/match/index.js":[71680,7,8592],"./uk/index.js":[12509,7,4,8592,2509],"./uz-Cyrl/_lib/formatDistance/index.js":[67778,7,8592],"./uz-Cyrl/_lib/formatLong/index.js":[64095,7,8592],"./uz-Cyrl/_lib/formatRelative/index.js":[83734,7,8592],"./uz-Cyrl/_lib/localize/index.js":[17670,7,8592],"./uz-Cyrl/_lib/match/index.js":[75798,7,8592],"./uz-Cyrl/index.js":[14527,7,8592,4527],"./uz/_lib/formatDistance/index.js":[27197,7,8592],"./uz/_lib/formatLong/index.js":[27810,7,8592],"./uz/_lib/formatRelative/index.js":[22175,7,8592],"./uz/_lib/localize/index.js":[6881,7,8592],"./uz/_lib/match/index.js":[19263,7,8592],"./uz/index.js":[44203,7,8592,4203],"./vi/_lib/formatDistance/index.js":[61664,7,8592],"./vi/_lib/formatLong/index.js":[42296,7,8592],"./vi/_lib/formatRelative/index.js":[55191,7,8592],"./vi/_lib/localize/index.js":[67431,7,8592],"./vi/_lib/match/index.js":[98442,7,8592],"./vi/index.js":[48875,7,8592,8875],"./zh-CN/_lib/formatDistance/index.js":[33437,7,8592],"./zh-CN/_lib/formatLong/index.js":[91583,7,8592],"./zh-CN/_lib/formatRelative/index.js":[95629,7,8592,5441],"./zh-CN/_lib/localize/index.js":[17939,7,8592],"./zh-CN/_lib/match/index.js":[71362,7,8592],"./zh-CN/index.js":[86335,7,8592,2007],"./zh-HK/_lib/formatDistance/index.js":[37348,7,8592],"./zh-HK/_lib/formatLong/index.js":[60924,7,8592],"./zh-HK/_lib/formatRelative/index.js":[22164,7,8592],"./zh-HK/_lib/localize/index.js":[39264,7,8592],"./zh-HK/_lib/match/index.js":[50358,7,8592],"./zh-HK/index.js":[59277,7,8592,9277],"./zh-TW/_lib/formatDistance/index.js":[31613,7,8592],"./zh-TW/_lib/formatLong/index.js":[1239,7,8592],"./zh-TW/_lib/formatRelative/index.js":[13240,7,8592],"./zh-TW/_lib/localize/index.js":[29850,7,8592],"./zh-TW/_lib/match/index.js":[38819,7,8592],"./zh-TW/index.js":[74565,7,8592,3793]};function V(B){if(!x.o(k,B))return Promise.resolve().then(()=>{var R=new Error("Cannot find module '"+B+"'");throw R.code="MODULE_NOT_FOUND",R});var G=k[B],H=G[0];return Promise.all(G.slice(2).map(x.e)).then(()=>x.t(H,16|G[1]))}V.keys=()=>Object.keys(k),V.id=71213,q.exports=V},36930:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(k,V,B,G,H,R,P){var Y=new Date(0);return Y.setUTCFullYear(k,V,B),Y.setUTCHours(G,H,R,P),Y},q.exports=S.default},47:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(G,H,R){var P=function B(G,H,R){if(R&&!R.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(R?[R.code,"en-US"]:void 0,{timeZone:H,timeZoneName:G})}(G,R.timeZone,R.locale);return P.formatToParts?function k(G,H){for(var R=G.formatToParts(H),P=R.length-1;P>=0;--P)if("timeZoneName"===R[P].type)return R[P].value}(P,H):function V(G,H){var R=G.format(H).replace(/\u200E/g,""),P=/ [\w-+ ]+$/.exec(R);return P?P[0].substr(1):""}(P,H)},q.exports=S.default},1870:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(ee,Z,U){var W,j,z;if(!ee||(W=R.timezoneZ.exec(ee)))return 0;if(W=R.timezoneHH.exec(ee))return ze(z=parseInt(W[1],10))?-z*G:NaN;if(W=R.timezoneHHMM.exec(ee)){z=parseInt(W[1],10);var he=parseInt(W[2],10);return ze(z,he)?(j=Math.abs(z)*G+6e4*he,z>0?-j:j):NaN}if(function je(ee){if(me[ee])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:ee}),me[ee]=!0,!0}catch{return!1}}(ee)){Z=new Date(Z||Date.now());var Le=U?Z:function Y(ee){return(0,V.default)(ee.getFullYear(),ee.getMonth(),ee.getDate(),ee.getHours(),ee.getMinutes(),ee.getSeconds(),ee.getMilliseconds())}(Z),Se=X(Le,ee),Ee=U?Se:function oe(ee,Z,U){var j=ee.getTime()-Z,z=X(new Date(j),U);if(Z===z)return Z;j-=z-Z;var he=X(new Date(j),U);return z===he?z:Math.max(z,he)}(Z,Se,ee);return-Ee}return NaN};var k=B(x(78598)),V=B(x(36930));function B(ee){return ee&&ee.__esModule?ee:{default:ee}}var G=36e5,R={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function X(ee,Z){var U=(0,k.default)(ee,Z),W=(0,V.default)(U[0],U[1]-1,U[2],U[3]%24,U[4],U[5],0).getTime(),j=ee.getTime(),z=j%1e3;return W-(j-(z>=0?z:1e3+z))}function ze(ee,Z){return-23<=ee&&ee<=23&&(null==Z||0<=Z&&Z<=59)}var me={};q.exports=S.default},32121:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0,S.default=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,q.exports=S.default},78598:(q,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function x(R,P){var Y=function H(R){if(!G[R]){var P=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z"));G[R]="06/25/2014, 00:00:00"===P||"\u200e06\u200e/\u200e25\u200e/\u200e2014\u200e \u200e00\u200e:\u200e00\u200e:\u200e00"===P?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:R,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:R,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return G[R]}(P);return Y.formatToParts?function V(R,P){try{for(var Y=R.formatToParts(P),X=[],oe=0;oe=0&&(X[ze]=parseInt(Y[oe].value,10))}return X}catch(me){if(me instanceof RangeError)return[NaN];throw me}}(Y,R):function B(R,P){var Y=R.format(P).replace(/\u200E/g,""),X=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(Y);return[X[3],X[1],X[2],X[4],X[5],X[6]]}(Y,R)};var k={year:0,month:1,day:2,hour:3,minute:4,second:5},G={};q.exports=S.default},65660:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=void 0;var k=B(x(47)),V=B(x(1870));function B(me){return me&&me.__esModule?me:{default:me}}function R(me,je){var ee=me?(0,V.default)(me,je,!0)/6e4:je.getTimezoneOffset();if(Number.isNaN(ee))throw new RangeError("Invalid time zone specified: "+me);return ee}function P(me,je){for(var ee=me<0?"-":"",Z=Math.abs(me).toString();Z.length0?"-":"+",U=Math.abs(me);return Z+P(Math.floor(U/60),2)+ee+P(Math.floor(U%60),2)}function X(me,je){return me%60==0?(me>0?"-":"+")+P(Math.abs(me)/60,2):Y(me,je)}S.default={X:function(me,je,ee,Z){var U=R(Z.timeZone,Z._originalDate||me);if(0===U)return"Z";switch(je){case"X":return X(U);case"XXXX":case"XX":return Y(U);default:return Y(U,":")}},x:function(me,je,ee,Z){var U=R(Z.timeZone,Z._originalDate||me);switch(je){case"x":return X(U);case"xxxx":case"xx":return Y(U);default:return Y(U,":")}},O:function(me,je,ee,Z){var U=R(Z.timeZone,Z._originalDate||me);switch(je){case"O":case"OO":case"OOO":return"GMT"+function oe(me,je){var ee=me>0?"-":"+",Z=Math.abs(me),U=Math.floor(Z/60),W=Z%60;if(0===W)return ee+String(U);var j=je||"";return ee+String(U)+j+P(W,2)}(U,":");default:return"GMT"+Y(U,":")}},z:function(me,je,ee,Z){var U=Z._originalDate||me;switch(je){case"z":case"zz":case"zzz":return(0,k.default)("short",U,Z);default:return(0,k.default)("long",U,Z)}}},q.exports=S.default},34294:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function R(P,Y,X){var oe=String(Y),ze=X||{},me=oe.match(H);if(me){var je=(0,B.default)(P,ze);oe=me.reduce(function(ee,Z){if("'"===Z[0])return ee;var U=ee.indexOf(Z),W="'"===ee[U-1],j=ee.replace(Z,"'"+V.default[Z[0]](je,Z,null,ze)+"'");return W?j.substring(0,U-1)+j.substring(U+1):j},oe)}return(0,k.default)(P,oe,ze)};var k=G(x(27868)),V=G(x(65660)),B=G(x(29018));function G(P){return P&&P.__esModule?P:{default:P}}var H=/([xXOz]+)|''|'(''|[^'])+('|$)/g;q.exports=S.default},28032:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function H(R,P,Y,X){var oe=(0,k.default)(X);return oe.timeZone=P,(0,V.default)((0,B.default)(R,P),Y,oe)};var k=G(x(42926)),V=G(x(34294)),B=G(x(17318));function G(R){return R&&R.__esModule?R:{default:R}}q.exports=S.default},46167:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function B(G,H){return-(0,k.default)(G,H)};var k=function V(G){return G&&G.__esModule?G:{default:G}}(x(1870));q.exports=S.default},30298:(q,S,x)=>{"use strict";q.exports={format:x(34294),formatInTimeZone:x(28032),getTimezoneOffset:x(46167),toDate:x(29018),utcToZonedTime:x(17318),zonedTimeToUtc:x(99679)}},29018:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function oe(Ee,Ae){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===Ee)return new Date(NaN);var ve=Ae||{},qe=null==ve.additionalDigits?2:(0,k.default)(ve.additionalDigits);if(2!==qe&&1!==qe&&0!==qe)throw new RangeError("additionalDigits must be 0, 1 or 2");if(Ee instanceof Date||"object"==typeof Ee&&"[object Date]"===Object.prototype.toString.call(Ee))return new Date(Ee.getTime());if("number"==typeof Ee||"[object Number]"===Object.prototype.toString.call(Ee))return new Date(Ee);if("string"!=typeof Ee&&"[object String]"!==Object.prototype.toString.call(Ee))return new Date(NaN);var yt=ze(Ee),se=me(yt.date,qe),Ii=se.year,vi=se.restDateString,ue=je(vi,Ii);if(isNaN(ue))return new Date(NaN);if(ue){var Ri,Nr=ue.getTime(),qi=0;if(yt.time&&(qi=ee(yt.time),isNaN(qi)))return new Date(NaN);if(yt.timeZone||ve.timeZone){if(Ri=(0,B.default)(yt.timeZone||ve.timeZone,new Date(Nr+qi)),isNaN(Ri))return new Date(NaN)}else Ri=(0,V.default)(new Date(Nr+qi)),Ri=(0,V.default)(new Date(Nr+qi+Ri));return new Date(Nr+qi+Ri)}return new Date(NaN)};var k=H(x(6092)),V=H(x(47664)),B=H(x(1870)),G=H(x(32121));function H(Ee){return Ee&&Ee.__esModule?Ee:{default:Ee}}var R=36e5,X={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:G.default};function ze(Ee){var qe,Ae={},ve=X.dateTimePattern.exec(Ee);if(ve?(Ae.date=ve[1],qe=ve[3]):(ve=X.datePattern.exec(Ee))?(Ae.date=ve[1],qe=ve[2]):(Ae.date=null,qe=Ee),qe){var yt=X.timeZone.exec(qe);yt?(Ae.time=qe.replace(yt[1],""),Ae.timeZone=yt[1].trim()):Ae.time=qe}return Ae}function me(Ee,Ae){var yt,ve=X.YYY[Ae],qe=X.YYYYY[Ae];if(yt=X.YYYY.exec(Ee)||qe.exec(Ee)){var se=yt[1];return{year:parseInt(se,10),restDateString:Ee.slice(se.length)}}if(yt=X.YY.exec(Ee)||ve.exec(Ee)){var Ii=yt[1];return{year:100*parseInt(Ii,10),restDateString:Ee.slice(Ii.length)}}return{year:null}}function je(Ee,Ae){if(null===Ae)return null;var ve,qe,yt,se;if(0===Ee.length)return(qe=new Date(0)).setUTCFullYear(Ae),qe;if(ve=X.MM.exec(Ee))return qe=new Date(0),z(Ae,yt=parseInt(ve[1],10)-1)?(qe.setUTCFullYear(Ae,yt),qe):new Date(NaN);if(ve=X.DDD.exec(Ee)){qe=new Date(0);var Ii=parseInt(ve[1],10);return function he(Ee,Ae){if(Ae<1)return!1;var ve=j(Ee);return!(ve&&Ae>366||!ve&&Ae>365)}(Ae,Ii)?(qe.setUTCFullYear(Ae,0,Ii),qe):new Date(NaN)}if(ve=X.MMDD.exec(Ee)){qe=new Date(0),yt=parseInt(ve[1],10)-1;var vi=parseInt(ve[2],10);return z(Ae,yt,vi)?(qe.setUTCFullYear(Ae,yt,vi),qe):new Date(NaN)}if(ve=X.Www.exec(Ee))return Le(0,se=parseInt(ve[1],10)-1)?Z(Ae,se):new Date(NaN);if(ve=X.WwwD.exec(Ee)){se=parseInt(ve[1],10)-1;var ue=parseInt(ve[2],10)-1;return Le(0,se,ue)?Z(Ae,se,ue):new Date(NaN)}return null}function ee(Ee){var Ae,ve,qe;if(Ae=X.HH.exec(Ee))return Se(ve=parseFloat(Ae[1].replace(",",".")))?ve%24*R:NaN;if(Ae=X.HHMM.exec(Ee))return Se(ve=parseInt(Ae[1],10),qe=parseFloat(Ae[2].replace(",",".")))?ve%24*R+6e4*qe:NaN;if(Ae=X.HHMMSS.exec(Ee)){ve=parseInt(Ae[1],10),qe=parseInt(Ae[2],10);var yt=parseFloat(Ae[3].replace(",","."));return Se(ve,qe,yt)?ve%24*R+6e4*qe+1e3*yt:NaN}return null}function Z(Ee,Ae,ve){Ae=Ae||0,ve=ve||0;var qe=new Date(0);qe.setUTCFullYear(Ee,0,4);var se=7*Ae+ve+1-(qe.getUTCDay()||7);return qe.setUTCDate(qe.getUTCDate()+se),qe}var U=[31,28,31,30,31,30,31,31,30,31,30,31],W=[31,29,31,30,31,30,31,31,30,31,30,31];function j(Ee){return Ee%400==0||Ee%4==0&&Ee%100!=0}function z(Ee,Ae,ve){if(Ae<0||Ae>11)return!1;if(null!=ve){if(ve<1)return!1;var qe=j(Ee);if(qe&&ve>W[Ae]||!qe&&ve>U[Ae])return!1}return!0}function Le(Ee,Ae,ve){return!(Ae<0||Ae>52||null!=ve&&(ve<0||ve>6))}function Se(Ee,Ae,ve){return!(null!=Ee&&(Ee<0||Ee>=25)||null!=Ae&&(Ae<0||Ae>=60)||null!=ve&&(ve<0||ve>=60))}q.exports=S.default},17318:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function G(H,R,P){var Y=(0,V.default)(H,P),X=(0,k.default)(R,Y,!0),oe=new Date(Y.getTime()-X),ze=new Date(0);return ze.setFullYear(oe.getUTCFullYear(),oe.getUTCMonth(),oe.getUTCDate()),ze.setHours(oe.getUTCHours(),oe.getUTCMinutes(),oe.getUTCSeconds(),oe.getUTCMilliseconds()),ze};var k=B(x(1870)),V=B(x(29018));function B(H){return H&&H.__esModule?H:{default:H}}q.exports=S.default},99679:(q,S,x)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function P(Y,X,oe){if("string"==typeof Y&&!Y.match(B.default)){var ze=(0,k.default)(oe);return ze.timeZone=X,(0,V.default)(Y,ze)}var me=(0,V.default)(Y,oe),je=(0,H.default)(me.getFullYear(),me.getMonth(),me.getDate(),me.getHours(),me.getMinutes(),me.getSeconds(),me.getMilliseconds()).getTime(),ee=(0,G.default)(X,new Date(je));return new Date(je+ee)};var k=R(x(42926)),V=R(x(29018)),B=R(x(32121)),G=R(x(1870)),H=R(x(36930));function R(Y){return Y&&Y.__esModule?Y:{default:Y}}q.exports=S.default},36758:q=>{q.exports=function S(x){return x&&x.__esModule?x:{default:x}},q.exports.__esModule=!0,q.exports.default=q.exports},50590:q=>{function S(x){return q.exports=S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"==typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},q.exports.__esModule=!0,q.exports.default=q.exports,S(x)}q.exports=S,q.exports.__esModule=!0,q.exports.default=q.exports}},q=>{q(q.s=18664)}]); \ No newline at end of file