diff --git a/core-web/apps/dotcms-ui/.storybook/middleware.js b/core-web/apps/dotcms-ui/.storybook/middleware.js index 42ae188c39cb..213d51b49c29 100644 --- a/core-web/apps/dotcms-ui/.storybook/middleware.js +++ b/core-web/apps/dotcms-ui/.storybook/middleware.js @@ -25,6 +25,14 @@ module.exports = function expressMiddleware(router) { }) ); + router.use( + '/api/v1/ai/image/test', + createProxyMiddleware({ + target: 'http://localhost:8080', + changeOrigin: true + }) + ); + // Publish the image_temp generated router.use( '/api/v1/workflow/actions/default/fire/PUBLISH', diff --git a/core-web/apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.stories.ts b/core-web/apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.stories.ts index 103ef71fd032..fa8164d4b6a5 100644 --- a/core-web/apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.stories.ts +++ b/core-web/apps/dotcms-ui/src/app/view/components/dot-portlet-base/dot-portlet-base.stories.ts @@ -7,8 +7,8 @@ import { ButtonModule } from 'primeng/button'; import { CheckboxModule } from 'primeng/checkbox'; import { TabViewModule } from 'primeng/tabview'; -import { DotApiLinkModule } from '@components/dot-api-link/dot-api-link.module'; import { DotMessageService } from '@dotcms/data-access'; +import { DotApiLinkComponent } from '@dotcms/ui'; import { MockDotMessageService } from '@dotcms/utils-testing'; import { DotPortletBaseComponent } from './dot-portlet-base.component'; @@ -35,7 +35,7 @@ export default { ButtonModule, CheckboxModule, DotPortletBaseModule, - DotApiLinkModule, + DotApiLinkComponent, TabViewModule ] }), 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 b9a7dd1c0e9c..176de4f4304e 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 @@ -26,14 +26,23 @@ import { } from './extensions'; import { AssetFormModule } from './extensions/asset-form/asset-form.module'; import { ContentletBlockComponent } from './nodes'; -import { DotAiService, DotUploadFileService, EditorDirective } from './shared'; +import { + AI_PLUGIN_INSTALLED_TOKEN, + DotAiService, + DotUploadFileService, + EditorDirective +} from './shared'; import { PrimengModule } from './shared/primeng.module'; +import { DotBlockEditorInitService } from './shared/services/dot-block-editor-init/dot-block-editor-init.service'; import { SharedModule } from './shared/shared.module'; const initTranslations = (dotMessageService: DotMessageService) => { return () => dotMessageService.init(); }; +const initializeBlockEditor = (appInitService: DotBlockEditorInitService) => { + return () => appInitService.initializeBlockEditor(); +}; @NgModule({ imports: [ CommonModule, @@ -69,11 +78,24 @@ const initTranslations = (dotMessageService: DotMessageService) => { StringUtils, DotAiService, DotMessageService, + DotBlockEditorInitService, { provide: APP_INITIALIZER, useFactory: initTranslations, deps: [DotMessageService], multi: true + }, + + { + provide: APP_INITIALIZER, + useFactory: initializeBlockEditor, + deps: [DotBlockEditorInitService], + multi: true + }, + { + provide: AI_PLUGIN_INSTALLED_TOKEN, + useFactory: (service: DotBlockEditorInitService) => service.isPluginInstalled, + deps: [DotBlockEditorInitService] } ], exports: [ 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 0889562720e9..9ded0fefe949 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 @@ -36,6 +36,7 @@ import { } from '../../shared'; import { DotMessageServiceMock } from '../../shared/mocks/dot-message.service.mock'; import { DotAiServiceMock } from '../../shared/services/dot-ai/dot-ai-service.mock'; +import { DotBlockEditorInitService } from '../../shared/services/dot-block-editor-init/dot-block-editor-init.service'; export default { title: 'Library/Block Editor' @@ -194,7 +195,8 @@ export const primary = () => ({ process.env.USE_MIDDLEWARE === 'true' ? DotMessageService : DotMessageServiceMock - } + }, + DotBlockEditorInitService ], // We need these here because they are dynamically rendered entryComponents: [ diff --git a/core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.ts b/core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.ts index 013b319581d5..d0aebcb8cba6 100644 --- a/core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.ts +++ b/core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.ts @@ -1,9 +1,10 @@ -import { Subject, from } from 'rxjs'; -import { assert, object, string, array, optional } from 'superstruct'; +import { from, Subject } from 'rxjs'; +import { array, assert, object, optional, string } from 'superstruct'; import { Component, EventEmitter, + inject, Injector, Input, OnDestroy, @@ -28,40 +29,41 @@ import { Youtube } from '@tiptap/extension-youtube'; import StarterKit, { StarterKitOptions } from '@tiptap/starter-kit'; import { - RemoteCustomExtensions, EDITOR_MARKETING_KEYS, - IMPORT_RESULTS + IMPORT_RESULTS, + RemoteCustomExtensions } from '@dotcms/dotcms-models'; import { ActionsMenu, + AIContentActionsExtension, + AIContentPromptExtension, + AIImagePromptExtension, + AssetUploader, + BubbleAssetFormExtension, BubbleFormExtension, BubbleLinkFormExtension, - DotBubbleMenuExtension, DEFAULT_LANG_ID, + DotBubbleMenuExtension, + DotComands, DotConfigExtension, + DotFloatingButton, DotTableCellExtension, - DotTableHeaderExtension, DotTableExtension, + DotTableHeaderExtension, DragHandler, - DotFloatingButton, - BubbleAssetFormExtension, - FreezeScroll, FREEZE_SCROLL_KEY, - AssetUploader, - DotComands, - AIContentPromptExtension, - AIImagePromptExtension, - AIContentActionsExtension + FreezeScroll } from '../../extensions'; import { DotPlaceholder } from '../../extensions/dot-placeholder/dot-placeholder-plugin'; -import { ContentletBlock, ImageNode, VideoNode, AIContentNode, LoaderNode } from '../../nodes'; +import { AIContentNode, ContentletBlock, ImageNode, LoaderNode, VideoNode } from '../../nodes'; import { + AI_PLUGIN_INSTALLED_TOKEN, + DotMarketingConfigService, formatHTML, removeInvalidNodes, - SetDocAttrStep, - DotMarketingConfigService, - RestoreDefaultDOMAttrs + RestoreDefaultDOMAttrs, + SetDocAttrStep } from '../../shared'; @Component({ @@ -117,6 +119,8 @@ export class DotBlockEditorComponent implements OnInit, OnDestroy { ['loader', LoaderNode] ]); + private readonly isAIPluginInstalled: boolean = inject(AI_PLUGIN_INSTALLED_TOKEN); + private destroy$: Subject = new Subject(); get characterCount(): CharacterCountStorage { @@ -362,7 +366,7 @@ export class DotBlockEditorComponent implements OnInit, OnDestroy { * @memberof DotBlockEditorComponent */ private getEditorExtensions() { - return [ + const extensions = [ DotConfigExtension({ lang: this.lang, allowedContentTypes: this.allowedContentTypes, @@ -380,14 +384,13 @@ export class DotBlockEditorComponent implements OnInit, OnDestroy { }), Subscript, Superscript, - ActionsMenu(this.viewContainerRef, this.getParsedCustomBlocks()), + ActionsMenu(this.viewContainerRef, this.getParsedCustomBlocks(), { + shouldShowAIExtensions: this.isAIPluginInstalled + }), DragHandler(this.viewContainerRef), BubbleLinkFormExtension(this.viewContainerRef, this.lang), DotBubbleMenuExtension(this.viewContainerRef), BubbleFormExtension(this.viewContainerRef), - AIContentPromptExtension(this.viewContainerRef), - AIImagePromptExtension(this.viewContainerRef), - AIContentActionsExtension(this.viewContainerRef), DotFloatingButton(this.injector, this.viewContainerRef), DotTableCellExtension(this.viewContainerRef), BubbleAssetFormExtension(this.viewContainerRef), @@ -397,6 +400,16 @@ export class DotBlockEditorComponent implements OnInit, OnDestroy { CharacterCount, AssetUploader(this.injector, this.viewContainerRef) ]; + + if (this.isAIPluginInstalled) { + extensions.push( + AIContentPromptExtension(this.viewContainerRef), + AIImagePromptExtension(this.viewContainerRef), + AIContentActionsExtension(this.viewContainerRef) + ); + } + + return extensions; } /** diff --git a/core-web/libs/block-editor/src/lib/extensions/action-button/actions-menu.extension.ts b/core-web/libs/block-editor/src/lib/extensions/action-button/actions-menu.extension.ts index 6c6d30617e4c..9fb43fa502d1 100644 --- a/core-web/libs/block-editor/src/lib/extensions/action-button/actions-menu.extension.ts +++ b/core-web/libs/block-editor/src/lib/extensions/action-button/actions-menu.extension.ts @@ -14,22 +14,26 @@ import Suggestion, { SuggestionOptions, SuggestionProps } from '@tiptap/suggesti import { RemoteCustomExtensions } from '@dotcms/dotcms-models'; import { - SuggestionPopperModifiers, - SuggestionsCommandProps, - SuggestionsComponent, - FloatingActionsProps, - FLOATING_ACTIONS_MENU_KEYBOARD, + clearFilter, CONTENT_SUGGESTION_ID, - ItemsType, + DotMenuItem, + findParentNode, + FLOATING_ACTIONS_MENU_KEYBOARD, FloatingActionsKeydownProps, FloatingActionsPlugin, - findParentNode, - DotMenuItem, + FloatingActionsProps, + ItemsType, suggestionOptions, - clearFilter + SuggestionPopperModifiers, + SuggestionsCommandProps, + SuggestionsComponent } from '../../shared'; +import { AI_CONTENT_PROMPT_EXTENSION_NAME } from '../ai-content-prompt/ai-content-prompt.extension'; +import { AI_IMAGE_PROMPT_EXTENSION_NAME } from '../ai-image-prompt/ai-image-prompt.extension'; import { NodeTypes } from '../bubble-menu/models'; +const AI_BLOCK_EXTENSIONS_IDS = [AI_CONTENT_PROMPT_EXTENSION_NAME, AI_IMAGE_PROMPT_EXTENSION_NAME]; + declare module '@tiptap/core' { interface Commands { actionsMenu: { @@ -210,7 +214,8 @@ function getCustomActions(customBlocks): Array { export const ActionsMenu = ( viewContainerRef: ViewContainerRef, - customBlocks: RemoteCustomExtensions + customBlocks: RemoteCustomExtensions, + disabledExtensions: { shouldShowAIExtensions: boolean | unknown } ) => { let myTippy; let suggestionsComponent: ComponentRef; @@ -289,10 +294,27 @@ export const ActionsMenu = ( } } + /** + * Retrieves the items for the given parameters. + * + * @param {object} options - The options for retrieving the items. + * @param {string[]} options.allowedBlocks - The array of allowed block IDs. + * @param {object} options.editor - The editor object. + * @param {object} options.range - The range object. + * @return {DotMenuItem[]} - The array of DotMenuItem objects. + */ function getItems({ allowedBlocks = [], editor, range }): DotMenuItem[] { + let filteredSuggestionOptions: DotMenuItem[] = [...suggestionOptions]; + + if (!disabledExtensions?.shouldShowAIExtensions) { + filteredSuggestionOptions = suggestionOptions.filter( + (item) => !AI_BLOCK_EXTENSIONS_IDS.includes(item.id) + ); + } + const items = allowedBlocks.length - ? suggestionOptions.filter((item) => allowedBlocks.includes(item.id)) - : suggestionOptions; + ? filteredSuggestionOptions.filter((item) => allowedBlocks.includes(item.id)) + : filteredSuggestionOptions; const customItems = [...items, ...getCustomActions(customBlocks)]; 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 39150d2ce053..aba2f9b9413c 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 @@ -27,9 +27,11 @@ export const DOT_AI_TEXT_CONTENT_KEY = 'dotAITextContent'; export const AI_CONTENT_PROMPT_PLUGIN_KEY = new PluginKey(DOT_AI_TEXT_CONTENT_KEY); +export const AI_CONTENT_PROMPT_EXTENSION_NAME = 'aiContentPrompt'; + export const AIContentPromptExtension = (viewContainerRef: ViewContainerRef) => { return Extension.create({ - name: 'aiContentPrompt', + name: AI_CONTENT_PROMPT_EXTENSION_NAME, addOptions() { return { diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.extension.ts b/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.extension.ts index 14947be17623..5e2fdfc6c89b 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.extension.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.extension.ts @@ -25,9 +25,11 @@ export const DOT_AI_IMAGE_CONTENT_KEY = 'dotAIImageContent'; export const AI_IMAGE_PROMPT_PLUGIN_KEY = new PluginKey('aiImagePrompt-form'); +export const AI_IMAGE_PROMPT_EXTENSION_NAME = 'aiImagePrompt'; + export const AIImagePromptExtension = (viewContainerRef: ViewContainerRef) => { return Extension.create({ - name: 'aiImagePrompt', + name: AI_IMAGE_PROMPT_EXTENSION_NAME, addOptions() { return { diff --git a/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.ts b/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.ts index 28ab1b423a01..ef0f56729a43 100644 --- a/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.ts +++ b/core-web/libs/block-editor/src/lib/shared/services/dot-ai/dot-ai.service.ts @@ -1,7 +1,7 @@ import { Observable, throwError } from 'rxjs'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { Injectable } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http'; +import { inject, Injectable } from '@angular/core'; import { catchError, map, pluck, switchMap } from 'rxjs/operators'; @@ -18,7 +18,7 @@ const headers = new HttpHeaders({ type ImageSize = '1024x1024' | '1024x1792' | '1792x1024'; @Injectable() export class DotAiService { - constructor(private http: HttpClient) {} + private http: HttpClient = inject(HttpClient); /** * Generates content by sending a HTTP POST request to the AI plugin endpoint. * @@ -70,6 +70,15 @@ export class DotAiService { ); } + /** + * Checks the installation status of a plugin. + * + * @return {Observable>} Observable that emits an HttpResponse object containing the plugin installation status. + */ + checkPluginInstallation(): Observable> { + return this.http.get(`${API_ENDPOINT}/image/test`, { observe: 'response' }); + } + private createAndPublishContentlet(image: DotAIImageResponse): Observable { const { response, tempFileName } = image; const contentlets: Partial[] = [ diff --git a/core-web/libs/block-editor/src/lib/shared/services/dot-block-editor-init/dot-block-editor-init.service.ts b/core-web/libs/block-editor/src/lib/shared/services/dot-block-editor-init/dot-block-editor-init.service.ts new file mode 100644 index 000000000000..b2513e583a16 --- /dev/null +++ b/core-web/libs/block-editor/src/lib/shared/services/dot-block-editor-init/dot-block-editor-init.service.ts @@ -0,0 +1,55 @@ +import { inject, Injectable } from '@angular/core'; + +import { DotAiService } from '../dot-ai/dot-ai.service'; + +/** + * Service for initializing the Dot Block Editor external configuration. + */ +@Injectable({ + providedIn: 'root' +}) +export class DotBlockEditorInitService { + private dotAiService: DotAiService = inject(DotAiService); + + private _isPluginInstalled = false; + + get isPluginInstalled(): boolean { + return this._isPluginInstalled; + } + + /** + * Initializes the Block Editor external configurations. + * + * @return {Promise} A Promise that resolves when the Block Editor is initialized. + */ + initializeBlockEditor(): Promise { + return Promise.all([ + this.verifyAiDotCMSPlugin() + // additional configs + ]); + } + + /** + * Verifies the installation of the AiDotCMSPlugin. + * + * @returns {Promise} A Promise that resolves to a boolean value indicating whether the plugin is installed or not. + * + * @throws {Error} If an error occurs while checking the plugin installation. + */ + async verifyAiDotCMSPlugin(): Promise { + if (this._isPluginInstalled) { + return Promise.resolve(this._isPluginInstalled); + } + + this._isPluginInstalled = false; + + try { + const response = await this.dotAiService.checkPluginInstallation().toPromise(); + this._isPluginInstalled = response.status === 200; + } catch (error) { + console.error('Error checking plugin installation:', error); + } + + return this._isPluginInstalled; + } +} diff --git a/core-web/libs/block-editor/src/lib/shared/utils/constants.utils.ts b/core-web/libs/block-editor/src/lib/shared/utils/constants.utils.ts new file mode 100644 index 000000000000..30f3d196dcde --- /dev/null +++ b/core-web/libs/block-editor/src/lib/shared/utils/constants.utils.ts @@ -0,0 +1,3 @@ +import { InjectionToken } from '@angular/core'; + +export const AI_PLUGIN_INSTALLED_TOKEN = new InjectionToken('is AI Plugin installed'); diff --git a/core-web/libs/block-editor/src/lib/shared/utils/index.ts b/core-web/libs/block-editor/src/lib/shared/utils/index.ts index 250727e3bfd1..5b9c8a00f416 100644 --- a/core-web/libs/block-editor/src/lib/shared/utils/index.ts +++ b/core-web/libs/block-editor/src/lib/shared/utils/index.ts @@ -1,3 +1,4 @@ export * from './parser.utils'; export * from './prosemirror.utils'; export * from './suggestion.utils'; +export * from './constants.utils'; diff --git a/dotCMS/hotfix_tracking.md b/dotCMS/hotfix_tracking.md index c8701afbed47..816a89e64079 100644 --- a/dotCMS/hotfix_tracking.md +++ b/dotCMS/hotfix_tracking.md @@ -57,4 +57,5 @@ This maintenance release includes the following code fixes: 50. https://github.com/dotCMS/core/issues/26665 : [UI] - Disable the input while is pending/loading #26665 51. https://github.com/dotCMS/core/issues/26666 : [UI] When the BlockEditor lose the focus, and get it again the generated content is duplicated #26666 52. https://github.com/dotCMS/core/issues/26895 : [UI] Update AIService of Block Editor with new endpoint shape #26895 -53. https://github.com/dotCMS/core/issues/26912 : [UI] AI actions menu selection is not working as should. #26912 \ No newline at end of file +53. https://github.com/dotCMS/core/issues/26912 : [UI] AI actions menu selection is not working as should. #26912 +54. https://github.com/dotCMS/core/issues/26556 : [UI] Not load the AI extensions if the plugin is not properly installed and configured #26556 \ 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 7f74fde82bbd..21a8c286e178 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],{66664:(q,E,x)=>{"use strict";function k(n){return"function"==typeof n}let V=!1;const B={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.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 $={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 ee=(()=>{function n(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return n.prototype=Object.create(Error.prototype),n})();class se{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof se)e.remove(this);else if(null!==e)for(let s=0;st.concat(e instanceof ee?e.errors:e),[])}se.EMPTY=((n=new se).closed=!0,n);const ye="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class te extends se{constructor(t,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=$;break;case 1:if(!t){this.destination=$;break}if("object"==typeof t){t instanceof te?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new J(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new J(this,t,e,i)}}[ye](){return this}static create(t,e,i){const r=new te(t,e,i);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class J extends te{constructor(t,e,i,r){super(),this._parentSubscriber=t;let o,s=this;k(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==$&&(s=Object.create(e),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(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;B.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=B;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):G(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;G(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);B.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(i){if(this.unsubscribe(),B.useDeprecatedSynchronousErrorHandling)throw i;G(i)}}__tryOrSetError(t,e,i){if(!B.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return B.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(G(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const j="function"==typeof Symbol&&Symbol.observable||"@@observable";function z(n){return n}function pe(...n){return Re(n)}function Re(n){return 0===n.length?z:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}let Se=(()=>{class n{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function W(n,t,e){if(n){if(n instanceof te)return n;if(n[ye])return n[ye]()}return n||t||e?new te(n,t,e):new te($)}(e,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(e){try{return this._subscribe(e)}catch(i){B.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function U(n){for(;n;){const{closed:t,destination:e,isStopped:i}=n;if(t||i)return!1;n=e&&e instanceof te?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=Ee(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[j](){return this}pipe(...e){return 0===e.length?this:Re(e)(this)}toPromise(e){return new(e=Ee(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),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 Ze extends se{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class bt extends te{constructor(t){super(t),this.destination=t}}let ae=(()=>{class n extends Se{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[ye](){return new bt(this)}lift(e){const i=new Pi(this,this);return i.operator=e,i}next(e){if(this.closed)throw new ve;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew Pi(t,e),n})();class Pi extends ae{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):se.EMPTY}}function Ti(n){return n&&"function"==typeof n.schedule}function fe(n,t){return function(i){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Rr(n,t))}}class Rr{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new er(t,this.project,this.thisArg))}}class er extends te{constructor(t,e,i){super(t),this.project=e,this.count=0,this.thisArg=i||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const Ui=n=>t=>{for(let e=0,i=n.length;en&&"number"==typeof n.length&&"function"!=typeof n;function xo(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const Be=n=>{if(n&&"function"==typeof n[j])return(n=>t=>{const e=n[j]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)})(n);if(fa(n))return Ui(n);if(xo(n))return(n=>t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,G),t))(n);if(n&&"function"==typeof n[Eo])return(n=>t=>{const e=n[Eo]();for(;;){let i;try{i=e.next()}catch(r){return t.error(r),t}if(i.done){t.complete();break}if(t.next(i.value),t.closed)break}return"function"==typeof e.return&&t.add(()=>{e.return&&e.return()}),t})(n);{const e=`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(e)}};function Bt(n,t){return new Se(e=>{const i=new se;let r=0;return i.add(t.schedule(function(){r!==n.length?(e.next(n[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function Fr(n,t){if(null!=n){if(function ui(n){return n&&"function"==typeof n[j]}(n))return function jt(n,t){return new Se(e=>{const i=new se;return i.add(t.schedule(()=>{const r=n[j]();i.add(r.subscribe({next(o){i.add(t.schedule(()=>e.next(o)))},error(o){i.add(t.schedule(()=>e.error(o)))},complete(){i.add(t.schedule(()=>e.complete()))}}))})),i})}(n,t);if(xo(n))return function mt(n,t){return new Se(e=>{const i=new se;return i.add(t.schedule(()=>n.then(r=>{i.add(t.schedule(()=>{e.next(r),i.add(t.schedule(()=>e.complete()))}))},r=>{i.add(t.schedule(()=>e.error(r)))}))),i})}(n,t);if(fa(n))return Bt(n,t);if(function Hi(n){return n&&"function"==typeof n[Eo]}(n)||"string"==typeof n)return function On(n,t){if(!n)throw new Error("Iterable cannot be null");return new Se(e=>{const i=new se;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(()=>{r=n[Eo](),i.add(t.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(n,t)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}function wt(n,t){return t?Fr(n,t):n instanceof Se?n:new Se(Be(n))}class Hn extends te{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class es extends te{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function ic(n,t){if(t.closed)return;if(n instanceof Se)return n.subscribe(t);let e;try{e=Be(n)(t)}catch(i){t.error(i)}return e}function ni(n,t,e=Number.POSITIVE_INFINITY){return"function"==typeof t?i=>i.pipe(ni((r,o)=>wt(n(r,o)).pipe(fe((s,a)=>t(r,s,o,a))),e)):("number"==typeof t&&(e=t),i=>i.lift(new hw(n,e)))}class hw{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new fw(t,this.project,this.concurrent))}}class fw extends es{constructor(t,e,i=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}const yf=ni;function Za(n=Number.POSITIVE_INFINITY){return ni(z,n)}function Ja(n,t){return t?Bt(n,t):new Se(Ui(n))}function ws(...n){let t=Number.POSITIVE_INFINITY,e=null,i=n[n.length-1];return Ti(i)?(e=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(t=n.pop())):"number"==typeof i&&(t=n.pop()),null===e&&1===n.length&&n[0]instanceof Se?n[0]:Za(t)(Ja(n,e))}function rc(){return function(t){return t.lift(new Io(t))}}class Io{constructor(t){this.connectable=t}call(t,e){const{connectable:i}=this;i._refCount++;const r=new ry(t,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class ry extends te{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=t._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class Hu extends Se{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new se,t.add(this.source.subscribe(new oy(this.getSubject(),this))),t.closed&&(this._connection=null,t=se.EMPTY)),t}refCount(){return rc()(this)}}const pw=(()=>{const n=Hu.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 oy extends bt{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}class mw{constructor(t,e){this.subjectFactory=t,this.selector=e}call(t,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(t);return o.add(e.subscribe(r)),o}}function ma(){return new ae}function Cn(n){for(let t in n)if(n[t]===Cn)return t;throw Error("Could not find renamed property on target object.")}function vf(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function _n(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(_n).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function ga(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const bf=Cn({__forward_ref__:Cn});function Ut(n){return n.__forward_ref__=Ut,n.toString=function(){return _n(this())},n}function Je(n){return ya(n)?n():n}function ya(n){return"function"==typeof n&&n.hasOwnProperty(bf)&&n.__forward_ref__===Ut}function wf(n){return n&&!!n.\u0275providers}const $u="https://g.co/ng/security#xss";class Q extends Error{constructor(t,e){super(function Wu(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}}function st(n){return"string"==typeof n?n:null==n?"":String(n)}function Gu(n,t){throw new Q(-201,!1)}function jr(n,t){null==n&&function Yt(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}(t,n,null,"!=")}function H(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function lt(n){return{providers:n.providers||[],imports:n.imports||[]}}function Yu(n){return cy(n,oc)||cy(n,uy)}function cy(n,t){return n.hasOwnProperty(t)?n[t]:null}function el(n){return n&&(n.hasOwnProperty(Ku)||n.hasOwnProperty(ww))?n[Ku]:null}const oc=Cn({\u0275prov:Cn}),Ku=Cn({\u0275inj:Cn}),uy=Cn({ngInjectableDef:Cn}),ww=Cn({ngInjectorDef:Cn});var et=(()=>((et=et||{})[et.Default=0]="Default",et[et.Host=1]="Host",et[et.Self=2]="Self",et[et.SkipSelf=4]="SkipSelf",et[et.Optional=8]="Optional",et))();let Cf;function zr(n){const t=Cf;return Cf=n,t}function hy(n,t,e){const i=Yu(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&et.Optional?null:void 0!==t?t:void Gu(_n(n))}const fn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Vr={},Df="__NG_DI_FLAG__",Qu="ngTempTokenPath",Tw=/\n/gm,Ds="__source";let tl;function nl(n){const t=tl;return tl=n,t}function Zu(n,t=et.Default){if(void 0===tl)throw new Q(-203,!1);return null===tl?hy(n,void 0,t):tl.get(n,t&et.Optional?null:void 0,t)}function F(n,t=et.Default){return(function dy(){return Cf}()||Zu)(Je(n),t)}function ct(n,t=et.Default){return F(n,ac(t))}function ac(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function Xu(n){const t=[];for(let e=0;e((so=so||{})[so.OnPush=0]="OnPush",so[so.Default=1]="Default",so))(),ne=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}(ne||(ne={})),ne))();const De={},Ye=[],ut=Cn({\u0275cmp:Cn}),Nn=Cn({\u0275dir:Cn}),ii=Cn({\u0275pipe:Cn}),vi=Cn({\u0275mod:Cn}),rn=Cn({\u0275fac:Cn}),Mi=Cn({__NG_ELEMENT_ID__:Cn});let ao=0;function Me(n){return Ts(()=>{const e=!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===so.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||Ye,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||ne.Emulated,id:"c"+ao++,styles:n.styles||Ye,_:null,setInput:null,schemas:n.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=n.dependencies,s=n.features;return r.inputs=Tf(n.inputs,i),r.outputs=Tf(n.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(yr).filter(ns):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(_r).filter(ns):null,r})}function Si(n,t,e){const i=n.\u0275cmp;i.directiveDefs=()=>("function"==typeof t?t():t).map(yr),i.pipeDefs=()=>("function"==typeof e?e():e).map(_r)}function yr(n){return vn(n)||tr(n)}function ns(n){return null!==n}function Xe(n){return Ts(()=>({type:n.type,bootstrap:n.bootstrap||Ye,declarations:n.declarations||Ye,imports:n.imports||Ye,exports:n.exports||Ye,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function Tf(n,t){if(null==n)return De;const e={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,t&&(t[r]=o)}return e}const we=Me;function qn(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 vn(n){return n[ut]||null}function tr(n){return n[Nn]||null}function _r(n){return n[ii]||null}function lo(n,t){const e=n[vi]||null;if(!e&&!0===t)throw new Error(`Type ${_n(n)} does not have '\u0275mod' property.`);return e}function co(n){return Array.isArray(n)&&"object"==typeof n[1]}function rs(n){return Array.isArray(n)&&!0===n[1]}function Iw(n){return 0!=(4&n.flags)}function xf(n){return n.componentOffset>-1}function _y(n){return 1==(1&n.flags)}function ss(n){return null!==n.template}function JV(n){return 0!=(256&n[2])}function uc(n,t){return n.hasOwnProperty(rn)?n[rn]:null}class ax{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function $i(){return lx}function lx(n){return n.type.prototype.ngOnChanges&&(n.setInput=nB),tB}function tB(){const n=ux(this),t=n?.current;if(t){const e=n.previous;if(e===De)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function nB(n,t,e,i){const r=this.declaredInputs[e],o=ux(n)||function iB(n,t){return n[cx]=t}(n,{previous:De,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new ax(l&&l.currentValue,t,a===De),n[i]=t}$i.ngInherit=!0;const cx="__ngSimpleChanges__";function ux(n){return n[cx]||null}function Wi(n){for(;Array.isArray(n);)n=n[0];return n}function vy(n,t){return Wi(t[n])}function uo(n,t){return Wi(t[n.index])}function fx(n,t){return n.data[t]}function od(n,t){return n[t]}function ho(n,t){const e=t[n];return co(e)?e:e[0]}function by(n){return 64==(64&n[2])}function rl(n,t){return null==t?null:n[t]}function px(n){n[18]=0}function Aw(n,t){n[5]+=t;let e=n,i=n[3];for(;null!==i&&(1===t&&1===e[5]||-1===t&&0===e[5]);)i[5]+=t,e=i,i=i[3]}const gt={lFrame:Tx(null),bindingsEnabled:!0};function gx(){return gt.bindingsEnabled}function oe(){return gt.lFrame.lView}function Xt(){return gt.lFrame.tView}function de(n){return gt.lFrame.contextLView=n,n[8]}function he(n){return gt.lFrame.contextLView=null,n}function Gi(){let n=yx();for(;null!==n&&64===n.type;)n=n.parent;return n}function yx(){return gt.lFrame.currentTNode}function Ss(n,t){const e=gt.lFrame;e.currentTNode=n,e.isParent=t}function kw(){return gt.lFrame.isParent}function Nw(){gt.lFrame.isParent=!1}function br(){const n=gt.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function sd(){return gt.lFrame.bindingIndex++}function Da(n){const t=gt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function gB(n,t){const e=gt.lFrame;e.bindingIndex=e.bindingRootIndex=n,Pw(t)}function Pw(n){gt.lFrame.currentDirectiveIndex=n}function wx(){return gt.lFrame.currentQueryIndex}function Rw(n){gt.lFrame.currentQueryIndex=n}function _B(n){const t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function Cx(n,t,e){if(e&et.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&et.Host||(r=_B(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;t=r,n=o}const i=gt.lFrame=Dx();return i.currentTNode=t,i.lView=n,!0}function Fw(n){const t=Dx(),e=n[1];gt.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Dx(){const n=gt.lFrame,t=null===n?null:n.child;return null===t?Tx(n):t}function Tx(n){const t={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=t),t}function Mx(){const n=gt.lFrame;return gt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Sx=Mx;function jw(){const n=Mx();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 wr(){return gt.lFrame.selectedIndex}function dc(n){gt.lFrame.selectedIndex=n}function Kn(){const n=gt.lFrame;return fx(n.tView,n.selectedIndex)}function zw(){gt.lFrame.currentNamespace="svg"}function Vw(){!function CB(){gt.lFrame.currentNamespace=null}()}function wy(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e=i)break}else t[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===t){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class Of{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Hw(n,t,e){let i=0;for(;it){s=o-1;break}}}for(;o>16}(n),i=t;for(;e>0;)i=i[15],e--;return i}let $w=!0;function Sy(n){const t=$w;return $w=n,t}let OB=0;const Es={};function Ey(n,t){const e=Px(n,t);if(-1!==e)return e;const i=t[1];i.firstCreatePass&&(n.injectorIndex=t.length,Ww(i.data,n),Ww(t,null),Ww(i.blueprint,null));const r=Gw(n,t),o=n.injectorIndex;if(Ax(r)){const s=Ty(r),a=My(r,t),l=a[1].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function Ww(n,t){n.push(0,0,0,0,0,0,0,0,t)}function Px(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function Gw(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=Bx(r),null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function Yw(n,t,e){!function AB(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Mi)&&(i=e[Mi]),null==i&&(i=e[Mi]=OB++);const r=255&i;t.data[n+(r>>5)]|=1<=0?255&t:LB:t}(e);if("function"==typeof o){if(!Cx(t,n,i))return i&et.Host?Lx(r,0,i):Rx(t,e,i,r);try{const s=o(i);if(null!=s||i&et.Optional)return s;Gu()}finally{Sx()}}else if("number"==typeof o){let s=null,a=Px(n,t),l=-1,c=i&et.Host?t[16][6]:null;for((-1===a||i&et.SkipSelf)&&(l=-1===a?Gw(n,t):t[a+8],-1!==l&&Vx(i,!1)?(s=t[1],a=Ty(l),t=My(l,t)):a=-1);-1!==a;){const u=t[1];if(zx(o,a,u.data)){const d=NB(a,t,e,s,i,c);if(d!==Es)return d}l=t[a+8],-1!==l&&Vx(i,t[1].data[a+8]===c)&&zx(o,a,t)?(s=u,a=Ty(l),t=My(l,t)):a=-1}}return r}function NB(n,t,e,i,r,o){const s=t[1],a=s.data[n+8],u=xy(a,s,e,null==i?xf(a)&&$w:i!=s&&0!=(3&a.type),r&et.Host&&o===a);return null!==u?hc(t,s,u,a):Es}function xy(n,t,e,i,r){const o=n.providerIndexes,s=t.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===e)return f}if(r){const f=s[l];if(f&&ss(f)&&f.type===e)return l}return null}function hc(n,t,e,i){let r=n[e];const o=t.data;if(function SB(n){return n instanceof Of}(r)){const s=r;s.resolving&&function _a(n,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${n}`:"";throw new Q(-200,`Circular dependency in DI detected for ${n}${e}`)}(function Jt(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[e]));const a=Sy(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?zr(s.injectImpl):null;Cx(n,i,et.Default);try{r=n[e]=s.factory(void 0,o,n,i),t.firstCreatePass&&e>=i.directiveStart&&function TB(n,t,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){const s=lx(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-n,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,o))}(e,o[e],t)}finally{null!==l&&zr(l),Sy(a),s.resolving=!1,Sx()}}return r}function zx(n,t,e){return!!(e[t+(n>>5)]&1<{const t=n.prototype.constructor,e=t[rn]||qw(t),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const o=r[rn]||qw(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function qw(n){return ya(n)?()=>{const t=qw(Je(n));return t&&t()}:uc(n)}function Bx(n){const t=n[1],e=t.type;return 2===e?t.declTNode:1===e?n[6]:null}const ud="__parameters__";function hd(n,t,e){return Ts(()=>{const i=function Kw(n){return function(...e){if(n){const i=n(...e);for(const r in i)this[r]=i[r]}}}(t);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(ud)?l[ud]:Object.defineProperty(l,ud,{value:[]})[ud];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class Te{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=H({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function fc(n,t){n.forEach(e=>Array.isArray(e)?fc(e,t):t(e))}function Hx(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function Oy(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function Pf(n,t){const e=[];for(let i=0;i=0?n[1|i]=e:(i=~i,function VB(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function Zw(n,t){const e=fd(n,t);if(e>=0)return n[1|e]}function fd(n,t){return function $x(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=n[o<t?r=o:i=o+1}return~(r<({token:n})),-1),Lf=il(hd("Optional"),8),Rf=il(hd("SkipSelf"),4);var Br=(()=>((Br=Br||{})[Br.Important=1]="Important",Br[Br.DashCase=2]="DashCase",Br))();const nC=new Map;let lU=0;const rC="__ngContext__";function rr(n,t){co(t)?(n[rC]=t[20],function uU(n){nC.set(n[20],n)}(t)):n[rC]=t}function sC(n,t){return undefined(n,t)}function Vf(n){const t=n[3];return rs(t)?t[3]:t}function aC(n){return uI(n[13])}function lC(n){return uI(n[4])}function uI(n){for(;null!==n&&!rs(n);)n=n[4];return n}function md(n,t,e,i,r){if(null!=i){let o,s=!1;rs(i)?o=i:co(i)&&(s=!0,i=i[0]);const a=Wi(i);0===n&&null!==e?null==r?gI(t,e,a):pc(t,e,a,r||null,!0):1===n&&null!==e?pc(t,e,a,r||null,!0):2===n?function mC(n,t,e){const i=Ly(n,t);i&&function OU(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}(t,a,s):3===n&&t.destroyNode(a),null!=o&&function NU(n,t,e,i,r){const o=e[7];o!==Wi(e)&&md(t,n,i,o,r);for(let a=10;a0&&(n[e-1][4]=i[4]);const o=Oy(n,10+t);!function CU(n,t){Bf(n,t,t[11],2,null,null),t[0]=null,t[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 fI(n,t){if(!(128&t[2])){const e=t[11];e.destroyNode&&Bf(n,t,e,3,null,null),function MU(n){let t=n[13];if(!t)return hC(n[1],n);for(;t;){let e=null;if(co(t))e=t[13];else{const i=t[10];i&&(e=i)}if(!e){for(;t&&!t[4]&&t!==n;)co(t)&&hC(t[1],t),t=t[3];null===t&&(t=n),co(t)&&hC(t[1],t),e=t&&t[4]}t=e}}(t)}}function hC(n,t){if(!(128&t[2])){t[2]&=-65,t[2]|=128,function IU(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=n.data[i.directiveStart+r];if(o===ne.None||o===ne.Emulated)return null}return uo(i,e)}}(n,t.parent,e)}function pc(n,t,e,i,r){n.insertBefore(t,e,i,r)}function gI(n,t,e){n.appendChild(t,e)}function yI(n,t,e,i,r){null!==i?pc(n,t,e,i,r):gI(n,t,e)}function Ly(n,t){return n.parentNode(t)}function _I(n,t,e){return bI(n,t,e)}let jy,_C,zy,bI=function vI(n,t,e){return 40&n.type?uo(n,e):null};function Ry(n,t,e,i){const r=pI(n,i,t),o=t[11],a=_I(i.parent||t[6],i,t);if(null!=r)if(Array.isArray(e))for(let l=0;ln,createScript:n=>n,createScriptURL:n=>n})}catch{}return jy}()?.createHTML(n)||n}function EI(n){return function vC(){if(void 0===zy&&(zy=null,fn.trustedTypes))try{zy=fn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return zy}()?.createHTML(n)||n}class gc{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${$u})`}}class VU extends gc{getTypeName(){return"HTML"}}class BU extends gc{getTypeName(){return"Style"}}class UU extends gc{getTypeName(){return"Script"}}class HU extends gc{getTypeName(){return"URL"}}class $U extends gc{getTypeName(){return"ResourceURL"}}function po(n){return n instanceof gc?n.changingThisBreaksApplicationSecurity:n}function xs(n,t){const e=function WU(n){return n instanceof gc&&n.getTypeName()||null}(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${$u})`)}return e===t}class ZU{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(mc(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class JU{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const i=this.inertDocument.createElement("body");e.appendChild(i)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=mc(t),e;const i=this.inertDocument.createElement("body");return i.innerHTML=mc(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0"),!0}endElement(t){const e=t.nodeName.toLowerCase();bC.hasOwnProperty(e)&&!AI.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(LI(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const i8=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r8=/([^\#-~ |!])/g;function LI(n){return n.replace(/&/g,"&").replace(i8,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(r8,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let By;function RI(n,t){let e=null;try{By=By||function OI(n){const t=new JU(n);return function XU(){try{return!!(new window.DOMParser).parseFromString(mc(""),"text/html")}catch{return!1}}()?new ZU(t):t}(n);let i=t?String(t):"";e=By.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=e.innerHTML,e=By.getInertBodyElement(i)}while(i!==o);return mc((new n8).sanitizeChildren(CC(e)||e))}finally{if(e){const i=CC(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function CC(n){return"content"in n&&function o8(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Pn=(()=>((Pn=Pn||{})[Pn.NONE=0]="NONE",Pn[Pn.HTML=1]="HTML",Pn[Pn.STYLE=2]="STYLE",Pn[Pn.SCRIPT=3]="SCRIPT",Pn[Pn.URL=4]="URL",Pn[Pn.RESOURCE_URL=5]="RESOURCE_URL",Pn))();function yc(n){const t=Hf();return t?EI(t.sanitize(Pn.HTML,n)||""):xs(n,"HTML")?EI(po(n)):RI(function SI(){return void 0!==_C?_C:typeof document<"u"?document:void 0}(),st(n))}function ol(n){const t=Hf();return t?t.sanitize(Pn.URL,n)||"":xs(n,"URL")?po(n):Vy(st(n))}function Hf(){const n=oe();return n&&n[12]}const Uy=new Te("ENVIRONMENT_INITIALIZER"),zI=new Te("INJECTOR",-1),VI=new Te("INJECTOR_DEF_TYPES");class BI{get(t,e=Vr){if(e===Vr){const i=new Error(`NullInjectorError: No provider for ${_n(t)}!`);throw i.name="NullInjectorError",i}return e}}function h8(...n){return{\u0275providers:UI(0,n),\u0275fromNgModule:!0}}function UI(n,...t){const e=[],i=new Set;let r;return fc(t,o=>{const s=o;DC(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&HI(r,e),e}function HI(n,t){for(let e=0;e{t.push(o)})}}function DC(n,t,e,i){if(!(n=Je(n)))return!1;let r=null,o=el(n);const s=!o&&vn(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{const l=n.ngModule;if(o=el(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,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{fc(o.imports,u=>{DC(u,t,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&HI(c,t)}if(!a){const c=uc(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Ye},{provide:VI,useValue:r,multi:!0},{provide:Uy,useValue:()=>F(r),multi:!0})}const l=o.providers;null==l||a||TC(l,u=>{t.push(u)})}}return r!==n&&void 0!==n.providers}function TC(n,t){for(let e of n)wf(e)&&(e=e.\u0275providers),Array.isArray(e)?TC(e,t):t(e)}const f8=Cn({provide:String,useValue:Cn});function MC(n){return null!==n&&"object"==typeof n&&f8 in n}function _c(n){return"function"==typeof n}const SC=new Te("Set Injector scope."),Hy={},m8={};let EC;function $y(){return void 0===EC&&(EC=new BI),EC}class Is{}class GI extends Is{get destroyed(){return this._destroyed}constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,IC(t,s=>this.processProvider(s)),this.records.set(zI,gd(void 0,this)),r.has("environment")&&this.records.set(Is,gd(void 0,this));const o=this.records.get(SC);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(VI.multi,Ye,et.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();for(const t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}runInContext(t){this.assertNotDestroyed();const e=nl(this),i=zr(void 0);try{return t()}finally{nl(e),zr(i)}}get(t,e=Vr,i=et.Default){this.assertNotDestroyed(),i=ac(i);const r=nl(this),o=zr(void 0);try{if(!(i&et.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function b8(n){return"function"==typeof n||"object"==typeof n&&n instanceof Te}(t)&&Yu(t);a=l&&this.injectableDefInScope(l)?gd(xC(t),Hy):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&et.Self?$y():this.parent).get(t,e=i&et.Optional&&e===Vr?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Qu]=s[Qu]||[]).unshift(_n(t)),r)throw s;return function fy(n,t,e,i){const r=n[Qu];throw t[Ds]&&r.unshift(t[Ds]),n.message=function Sw(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=_n(t);if(Array.isArray(t))r=t.map(_n).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):_n(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(Tw,"\n ")}`}("\n"+n.message,r,e,i),n.ngTokenPath=r,n[Qu]=null,n}(s,t,"R3InjectorError",this.source)}throw s}finally{zr(o),nl(r)}}resolveInjectorInitializers(){const t=nl(this),e=zr(void 0);try{const i=this.get(Uy.multi,Ye,et.Self);for(const r of i)r()}finally{nl(t),zr(e)}}toString(){const t=[],e=this.records;for(const i of e.keys())t.push(_n(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Q(205,!1)}processProvider(t){let e=_c(t=Je(t))?t:Je(t&&t.provide);const i=function y8(n){return MC(n)?gd(void 0,n.useValue):gd(YI(n),Hy)}(t);if(_c(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=gd(void 0,Hy,!0),r.factory=()=>Xu(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===Hy&&(e.value=m8,e.value=e.factory()),"object"==typeof e.value&&e.value&&function v8(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=Je(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function xC(n){const t=Yu(n),e=null!==t?t.factory:uc(n);if(null!==e)return e;if(n instanceof Te)throw new Q(204,!1);if(n instanceof Function)return function g8(n){const t=n.length;if(t>0)throw Pf(t,"?"),new Q(204,!1);const e=function qu(n){const t=n&&(n[oc]||n[uy]);if(t){const e=function bw(n){if(n.hasOwnProperty("name"))return n.name;const t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" 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 "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new Q(204,!1)}function YI(n,t,e){let i;if(_c(n)){const r=Je(n);return uc(r)||xC(r)}if(MC(n))i=()=>Je(n.useValue);else if(function WI(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...Xu(n.deps||[]));else if(function $I(n){return!(!n||!n.useExisting)}(n))i=()=>F(Je(n.useExisting));else{const r=Je(n&&(n.useClass||n.provide));if(!function _8(n){return!!n.deps}(n))return uc(r)||xC(r);i=()=>new r(...Xu(n.deps))}return i}function gd(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function IC(n,t){for(const e of n)Array.isArray(e)?IC(e,t):e&&wf(e)?IC(e.\u0275providers,t):t(e)}class w8{}class qI{}class D8{resolveComponentFactory(t){throw function C8(n){const t=Error(`No component factory found for ${_n(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}}let vc=(()=>{class n{}return n.NULL=new D8,n})();function T8(){return yd(Gi(),oe())}function yd(n,t){return new Tt(uo(n,t))}let Tt=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=T8,n})();function M8(n){return n instanceof Tt?n.nativeElement:n}class $f{}let Cr=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function S8(){const n=oe(),e=ho(Gi().index,n);return(co(e)?e:n)[11]}(),n})(),E8=(()=>{class n{}return n.\u0275prov=H({token:n,providedIn:"root",factory:()=>null}),n})();class _d{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const x8=new _d("15.1.1"),OC={};function kC(n){return n.ngOriginalError}class vd{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&kC(t);for(;e&&kC(e);)e=kC(e);return e||null}}function QI(n){return n.ownerDocument.defaultView}function ZI(n){return n.ownerDocument}function Ma(n){return n instanceof Function?n():n}function XI(n,t,e){let i=n.length;for(;;){const r=n.indexOf(t,e);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}const eO="ng-template";function F8(n,t,e){let i=0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==XI(f,c,0)||2&i&&c!==h){if(as(i))return!1;s=!0}}}}else{if(!s&&!as(i)&&!as(l))return!1;if(s&&as(l))continue;s=!1,i=l|1&i}}return as(i)||s}function as(n){return 0==(1&n)}function V8(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!as(s)&&(t+=iO(o,r),r=""),i=s,o=o||!as(i);e++}return""!==r&&(t+=iO(o,r)),t}const yt={};function C(n){rO(Xt(),oe(),wr()+n,!1)}function rO(n,t,e,i){if(!i)if(3==(3&t[2])){const o=n.preOrderCheckHooks;null!==o&&Cy(t,o,e)}else{const o=n.preOrderHooks;null!==o&&Dy(t,o,0,e)}dc(e)}function lO(n,t=null,e=null,i){const r=cO(n,t,e,i);return r.resolveInjectorInitializers(),r}function cO(n,t=null,e=null,i,r=new Set){const o=[e||Ye,h8(n)];return i=i||("object"==typeof n?void 0:_n(n)),new GI(o,t||$y(),i||null,r)}let Dr=(()=>{class n{static create(e,i){if(Array.isArray(e))return lO({name:""},i,e,"");{const r=e.name??"";return lO({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=Vr,n.NULL=new BI,n.\u0275prov=H({token:n,providedIn:"any",factory:()=>F(zI)}),n.__NG_ELEMENT_ID__=-1,n})();function O(n,t=et.Default){const e=oe();return null===e?F(n,t):Fx(Gi(),e,Je(n),t)}function yO(n,t){const e=n.contentQueries;if(null!==e)for(let i=0;i22&&rO(n,t,22,!1),e(i,r)}finally{dc(o)}}function zC(n,t,e){if(Iw(t)){const r=t.directiveEnd;for(let o=t.directiveStart;o0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(n,t,i,Wf(n,e,r.hostVars,yt),r)}function Os(n,t,e,i,r,o){const s=uo(n,t);!function WC(n,t,e,i,r,o,s){if(null==o)n.removeAttribute(t,r,e);else{const a=null==s?st(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}(t[11],s,o,n.value,e,i,r)}function AH(n,t,e,i,r,o){const s=o[t];if(null!==s){const a=i.setInput;for(let l=0;l0&&GC(e)}}function GC(n){for(let i=aC(n);null!==i;i=lC(i))for(let r=10;r0&&GC(o)}const e=n[1].components;if(null!==e)for(let i=0;i0&&GC(r)}}function RH(n,t){const e=ho(t,n),i=e[1];(function FH(n,t){for(let e=t.length;e-1&&(dC(t,i),Oy(e,i))}this._attachedToViewContainer=!1}fI(this._lView[1],this._lView)}onDestroy(t){bO(this._lView[1],this._lView,null,t)}markForCheck(){YC(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){Ky(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 TU(n,t){Bf(n,t,t[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Q(902,!1);this._appRef=t}}class jH extends Gf{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Ky(t[1],t,t[8],!1)}checkNoChanges(){}get context(){return null}}class AO extends vc{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=vn(t);return new Yf(e,this.ngModule)}}function kO(n){const t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}class VH{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){i=ac(i);const r=this.injector.get(t,OC,i);return r!==OC||e===OC?r:this.parentInjector.get(t,e,i)}}class Yf extends qI{get inputs(){return kO(this.componentDef.inputs)}get outputs(){return kO(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function G8(n){return n.map(W8).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof Is?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new VH(t,o):t,a=s.get($f,null);if(null===a)throw new Q(407,!1);const l=s.get(E8,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function gH(n,t,e){return n.selectRootElement(t,e===ne.ShadowDom)}(c,i,this.componentDef.encapsulation):uC(c,u,function zH(n){const t=n.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(u)),h=this.componentDef.onPush?288:272,f=UC(0,null,null,1,0,null,null,null,null,null),p=Gy(null,f,null,h,null,null,a,c,l,s,null);let m,g;Fw(p);try{const y=this.componentDef;let b,w=null;y.findHostDirectiveDefs?(b=[],w=new Map,y.findHostDirectiveDefs(y,b,w),b.push(y)):b=[y];const _=function UH(n,t){const e=n[1];return n[22]=t,Cd(e,22,2,"#host",null)}(p,d),N=function HH(n,t,e,i,r,o,s,a){const l=r[1];!function $H(n,t,e,i){for(const r of n)t.mergedAttrs=Af(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Qy(t,t.mergedAttrs,!0),null!==e&&MI(i,e,t))}(i,n,t,s);const c=o.createRenderer(t,e),u=Gy(r,vO(e),null,e.onPush?32:16,r[n.index],n,o,c,a||null,null,null);return l.firstCreatePass&&$C(l,n,i.length-1),qy(r,u),r[n.index]=u}(_,d,y,b,p,a,c);g=fx(f,22),d&&function GH(n,t,e,i){if(i)Hw(n,e,["ng-version",x8.full]);else{const{attrs:r,classes:o}=function Y8(n){const t=[],e=[];let i=1,r=2;for(;i0&&TI(n,e,o.join(" "))}}(c,y,d,i),void 0!==e&&function YH(n,t,e){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Af(r.hostAttrs,e=Af(e,r.hostAttrs))}}(i)}function QC(n){return n===De?{}:n===Ye?[]:n}function QH(n,t){const e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function ZH(n,t){const e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function JH(n,t){const e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}let Jy=null;function bc(){if(!Jy){const n=fn.Symbol;if(n&&n.iterator)Jy=n.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;es(Wi(_[i.index])):i.index;let w=null;if(!s&&a&&(w=function h9(n,t,e,i){const r=n.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,t,r,i.index)),null!==w)(w.__ngLastListenerFn__||w).__ngNextListenerFn__=o,w.__ngLastListenerFn__=o,h=!1;else{o=QO(i,t,u,o,!1);const _=e.listen(g,r,o);d.push(o,_),c&&c.push(r,b,y,y+1)}}else o=QO(i,t,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?ho(n.index,t):t);let l=KO(t,0,i,s),c=o.__ngNextListenerFn__;for(;c;)l=KO(t,0,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function D(n=1){return function vB(n){return(gt.lFrame.contextLView=function bB(n,t){for(;n>0;)t=t[15],n--;return t}(n,gt.lFrame.contextLView))[8]}(n)}function f9(n,t){let e=null;const i=function B8(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(!(1&e))return t[e+1]}return null}(n);for(let r=0;r>17&32767}function eD(n){return 2|n}function Cc(n){return(131068&n)>>2}function tD(n,t){return-131069&n|t<<2}function nD(n){return 1|n}function oA(n,t,e,i,r){const o=n[e+1],s=null===t;let a=i?sl(o):Cc(o),l=!1;for(;0!==a&&(!1===l||s);){const u=n[a+1];v9(n[a],t)&&(l=!0,n[a+1]=i?nD(u):eD(u)),a=i?sl(u):Cc(u)}l&&(n[e+1]=i?eD(o):nD(o))}function v9(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&fd(n,t)>=0}const xi={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function sA(n){return n.substring(xi.key,xi.keyEnd)}function b9(n){return n.substring(xi.value,xi.valueEnd)}function aA(n,t){const e=xi.textEnd;return e===t?-1:(t=xi.keyEnd=function D9(n,t,e){for(;t32;)t++;return t}(n,xi.key=t,e),kd(n,t,e))}function lA(n,t){const e=xi.textEnd;let i=xi.key=kd(n,t,e);return e===i?-1:(i=xi.keyEnd=function T9(n,t,e){let i;for(;t=65&&(-33&i)<=90||i>=48&&i<=57);)t++;return t}(n,i,e),i=uA(n,i,e),i=xi.value=kd(n,i,e),i=xi.valueEnd=function M9(n,t,e){let i=-1,r=-1,o=-1,s=t,a=s;for(;s32&&(a=s),o=r,r=i,i=-33&l}return a}(n,i,e),uA(n,i,e))}function cA(n){xi.key=0,xi.keyEnd=0,xi.value=0,xi.valueEnd=0,xi.textEnd=n.length}function kd(n,t,e){for(;t=0;e=lA(t,e))pA(n,sA(t),b9(t))}function pn(n){us(fo,ks,n,!0)}function ks(n,t){for(let e=function w9(n){return cA(n),aA(n,kd(n,0,xi.textEnd))}(t);e>=0;e=aA(t,e))fo(n,sA(t),!0)}function cs(n,t,e,i){const r=oe(),o=Xt(),s=Da(2);o.firstUpdatePass&&fA(o,n,s,i),t!==yt&&or(r,s,t)&&mA(o,o.data[wr()],r,r[11],n,r[s+1]=function N9(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=_n(po(n)))),n}(t,e),i,s)}function us(n,t,e,i){const r=Xt(),o=Da(2);r.firstUpdatePass&&fA(r,null,o,i);const s=oe();if(e!==yt&&or(s,o,e)){const a=r.data[wr()];if(yA(a,i)&&!hA(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=ga(l,e||"")),JC(r,a,s,e,i)}else!function k9(n,t,e,i,r,o,s,a){r===yt&&(r=Ye);let l=0,c=0,u=0=n.expandoStartIndex}function fA(n,t,e,i){const r=n.data;if(null===r[e+1]){const o=r[wr()],s=hA(n,e);yA(o,i)&&null===t&&!s&&(t=!1),t=function E9(n,t,e,i){const r=function Lw(n){const t=gt.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}(n);let o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=Qf(e=iD(null,n,t,e,i),t.attrs,i),o=null);else{const s=t.directiveStylingLast;if(-1===s||n[s]!==r)if(e=iD(r,n,t,e,i),null===o){let l=function x9(n,t,e){const i=e?t.classBindings:t.styleBindings;if(0!==Cc(i))return n[sl(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=iD(null,n,t,l[1],i),l=Qf(l,t.attrs,i),function I9(n,t,e,i){n[sl(e?t.classBindings:t.styleBindings)]=i}(n,t,i,l))}else o=function O9(n,t,e){let i;const r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=sl(n[a+1]);n[i+1]=n_(h,a),0!==h&&(n[h+1]=tD(n[h+1],i)),n[a+1]=function m9(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=n_(a,0),0!==a&&(n[a+1]=tD(n[a+1],i)),a=i;else n[i+1]=n_(l,0),0===a?a=i:n[l+1]=tD(n[l+1],i),l=i;c&&(n[i+1]=eD(n[i+1])),oA(n,u,i,!0),oA(n,u,i,!1),function _9(n,t,e,i,r){const o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&fd(o,t)>=0&&(e[i+1]=nD(e[i+1]))}(t,u,n,i,o),s=n_(a,l),o?t.classBindings=s:t.styleBindings=s}(r,o,t,e,s,i)}}function iD(n,t,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===yt&&(h=d?Ye:void 0);let f=d?Zw(h,i):u===i?h:void 0;if(c&&!i_(f)&&(f=Zw(l,i)),i_(f)&&(a=f,s))return a;const p=n[r+1];r=s?sl(p):Cc(p)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(a=Zw(l,i))}return a}function i_(n){return void 0!==n}function yA(n,t){return 0!=(n.flags&(t?8:16))}function ke(n,t=""){const e=oe(),i=Xt(),r=n+22,o=i.firstCreatePass?Cd(i,r,1,t,null):i.data[r],s=e[r]=function cC(n,t){return n.createText(t)}(e[11],t);Ry(i,e,s,o),Ss(o,!1)}function At(n){return Yi("",n,""),At}function Yi(n,t,e){const i=oe(),r=Td(i,n,t,e);return r!==yt&&Sa(i,wr(),r),Yi}function r_(n,t,e,i,r){const o=oe(),s=Md(o,n,t,e,i,r);return s!==yt&&Sa(o,wr(),s),r_}const Pd="en-US";let jA=Pd;function sD(n,t,e,i,r){if(n=Je(n),Array.isArray(n))for(let o=0;o>20;if(_c(n)||!n.multi){const f=new Of(l,r,O),p=lD(a,t,r?u:u+h,d);-1===p?(Yw(Ey(c,s),o,a),aD(o,n,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=lD(a,t,u+h,d),p=lD(a,t,u,u+h),g=p>=0&&e[p];if(r&&!g||!r&&!(f>=0&&e[f])){Yw(Ey(c,s),o,a);const y=function Z7(n,t,e,i,r){const o=new Of(n,e,O);return o.multi=[],o.index=t,o.componentProviders=0,ck(o,r,i&&!e),o}(r?Q7:K7,e.length,r,i,l);!r&&g&&(e[p].providerFactory=y),aD(o,n,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),s.push(y)}else aD(o,n,f>-1?f:p,ck(e[r?p:f],l,!r&&i));!r&&i&&g&&e[p].componentProviders++}}}function aD(n,t,e,i){const r=_c(t),o=function p8(n){return!!n.useClass}(t);if(r||o){const l=(o?Je(t.useClass):t).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function ck(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function lD(n,t,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function q7(n,t,e){const i=Xt();if(i.firstCreatePass){const r=ss(n);sD(e,i.data,i.blueprint,r,!0),sD(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}class Ld{}class uk{}class dk extends Ld{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new AO(this);const i=lo(t);this._bootstrapComponents=Ma(i.bootstrap),this._r3Injector=cO(t,e,[{provide:Ld,useValue:this},{provide:vc,useValue:this.componentFactoryResolver}],_n(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class uD extends uk{constructor(t){super(),this.moduleType=t}create(t){return new dk(this.moduleType,t)}}class X7 extends Ld{constructor(t,e,i){super(),this.componentFactoryResolver=new AO(this),this.instance=null;const r=new GI([...t,{provide:Ld,useValue:this},{provide:vc,useValue:this.componentFactoryResolver}],e||$y(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function c_(n,t,e=null){return new X7(n,t,e).injector}let e6=(()=>{class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=UI(0,e.type),r=i.length>0?c_([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=H({token:n,providedIn:"environment",factory:()=>new n(F(Is))}),n})();function Ns(n){n.getStandaloneInjector=t=>t.get(e6).getOrCreateStandaloneInjector(n)}function Hr(n,t,e){const i=br()+n,r=oe();return r[i]===yt?As(r,i,e?t.call(e):t()):qf(r,i)}function Mt(n,t,e,i){return vk(oe(),br(),n,t,e,i)}function bi(n,t,e,i,r){return function bk(n,t,e,i,r,o,s){const a=t+e;return wc(n,a,r,o)?As(n,a+2,s?i.call(s,r,o):i(r,o)):np(n,a+2)}(oe(),br(),n,t,e,i,r)}function al(n,t,e,i,r,o){return function wk(n,t,e,i,r,o,s,a){const l=t+e;return function e_(n,t,e,i,r){const o=wc(n,t,e,i);return or(n,t+2,r)||o}(n,l,r,o,s)?As(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):np(n,l+3)}(oe(),br(),n,t,e,i,r,o)}function Rd(n,t,e,i,r,o,s){return function Ck(n,t,e,i,r,o,s,a,l){const c=t+e;return ko(n,c,r,o,s,a)?As(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):np(n,c+4)}(oe(),br(),n,t,e,i,r,o,s)}function hD(n,t,e,i){return function Dk(n,t,e,i,r,o){let s=t+e,a=!1;for(let l=0;l=0;e--){const i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=uc(i.type)),s=zr(O);try{const a=Sy(!1),l=o();return Sy(a),function c9(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,oe(),r,l),l}finally{zr(s)}}function Zn(n,t,e){const i=n+22,r=oe(),o=od(r,i);return function ip(n,t){return n[1].data[t].pure}(r,i)?vk(r,br(),t,o.transform,e,o):o.transform(e)}function fD(n){return t=>{setTimeout(n,void 0,t)}}const re=class y6 extends ae{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&"object"==typeof t){const l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=fD(o),r&&(r=fD(r)),s&&(s=fD(s)));const a=super.subscribe({next:r,error:o,complete:s});return t instanceof se&&t.add(a),a}};function _6(){return this._results[bc()]()}class rp{get changes(){return this._changes||(this._changes=new re)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=bc(),i=rp.prototype;i[e]||(i[e]=_6)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const i=this;i.dirty=!1;const r=function Ao(n){return n.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function jB(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=w6,n})();const v6=No,b6=class extends v6{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){const i=this._declarationTContainer.tViews,r=Gy(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(r[19]=s.createEmbeddedView(i)),jC(i,r,t),new Gf(r)}};function w6(){return u_(Gi(),oe())}function u_(n,t){return 4&n.type?new b6(t,n,yd(n,t)):null}let $r=(()=>{class n{}return n.__NG_ELEMENT_ID__=C6,n})();function C6(){return Sk(Gi(),oe())}const D6=$r,Tk=class extends D6{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return yd(this._hostTNode,this._hostLView)}get injector(){return new ld(this._hostTNode,this._hostLView)}get parentInjector(){const t=Gw(this._hostTNode,this._hostLView);if(Ax(t)){const e=My(t,this._hostLView),i=Ty(t);return new ld(e[1].data[i+8],e)}return new ld(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Mk(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=t.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(t,e,i,r,o){const s=t&&!function Nf(n){return"function"==typeof n}(t);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?t:new Yf(vn(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Is,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(t,e){const i=t._lView,r=i[1];if(function lB(n){return rs(n[3])}(i)){const u=this.indexOf(t);if(-1!==u)this.detach(u);else{const d=i[3],h=new Tk(d,d[6],d[3]);h.detach(h.indexOf(t))}}const o=this._adjustIndex(e),s=this._lContainer;!function SU(n,t,e,i){const r=10+i,o=e.length;i>0&&(e[r-1][4]=t),i0)i.push(s[a/2]);else{const c=o[a+1],u=t[-l];for(let d=10;d{class n{constructor(e){this.appInits=e,this.resolve=h_,this.reject=h_,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(F(sp,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const ap=new Te("AppId",{providedIn:"root",factory:function Qk(){return`${TD()}${TD()}${TD()}`}});function TD(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Zk=new Te("Platform Initializer"),p_=new Te("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Jk=new Te("appBootstrapListener"),Xk=new Te("AnimationModuleType");let K6=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Ps=new Te("LocaleId",{providedIn:"root",factory:()=>ct(Ps,et.Optional|et.SkipSelf)||function Q6(){return typeof $localize<"u"&&$localize.locale||Pd}()});class J6{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let eN=(()=>{class n{compileModuleSync(e){return new uD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Ma(lo(e).declarations).reduce((s,a)=>{const l=vn(a);return l&&s.push(new Yf(l)),s},[]);return new J6(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const t$=(()=>Promise.resolve(0))();function MD(n){typeof Zone>"u"?t$.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class qt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!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)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function n$(){let n=fn.requestAnimationFrame,t=fn.cancelAnimationFrame;if(typeof Zone<"u"&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function o$(n){const t=()=>{!function r$(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(fn,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,ED(n),n.isCheckStableRunning=!0,SD(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),ED(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return iN(n),e.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),rN(n)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return iN(n),e.invoke(r,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),rN(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,ED(n),SD(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.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(!qt.isInAngularZone())throw new Q(909,!1)}static assertNotInAngularZone(){if(qt.isInAngularZone())throw new Q(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,i$,h_,h_);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}const i$={};function SD(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 ED(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function iN(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function rN(n){n._nesting--,SD(n)}class s${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(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}}const oN=new Te(""),m_=new Te("");let OD,xD=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,OD||(function a$(n){OD=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.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:()=>{qt.assertNotInAngularZone(),MD(()=>{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())MD(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,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(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(F(qt),F(ID),F(m_))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),ID=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return OD?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),ll=null;const sN=new Te("AllowMultipleToken"),AD=new Te("PlatformDestroyListeners");class aN{constructor(t,e){this.name=t,this.token=e}}function cN(n,t,e=[]){const i=`Platform: ${t}`,r=new Te(i);return(o=[])=>{let s=kD();if(!s||s.injector.get(sN,!1)){const a=[...e,...o,{provide:r,useValue:!0}];n?n(a):function u$(n){if(ll&&!ll.get(sN,!1))throw new Q(400,!1);ll=n;const t=n.get(dN);(function lN(n){const t=n.get(Zk,null);t&&t.forEach(e=>e())})(n)}(function uN(n=[],t){return Dr.create({name:t,providers:[{provide:SC,useValue:"platform"},{provide:AD,useValue:new Set([()=>ll=null])},...n]})}(a,i))}return function h$(n){const t=kD();if(!t)throw new Q(401,!1);return t}()}}function kD(){return ll?.get(dN)??null}let dN=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function fN(n,t){let e;return e="noop"===n?new s$:("zone.js"===n?void 0:n)||new qt(t),e}(i?.ngZone,function hN(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:qt,useValue:r}];return r.run(()=>{const s=Dr.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(vd,null);if(!l)throw new Q(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{g_(this._modules,a),c.unsubscribe()})}),function pN(n,t,e){try{const i=e();return Kf(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(f_);return c.runInitializers(),c.donePromise.then(()=>(function zA(n){jr(n,"Expected localeId to be defined"),"string"==typeof n&&(jA=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Ps,Pd)||Pd),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=mN({},i);return function l$(n,t,e){const i=new uD(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Mc);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Q(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}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 e=this._injector.get(AD,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(F(Dr))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function mN(n,t){return Array.isArray(t)?t.reduce(mN,n):{...n,...t}}let Mc=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,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(()=>{qt.assertNotInAngularZone(),MD(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{qt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=ws(o,s.pipe(function ly(){return n=>rc()(function ay(n,t){return function(i){let r;if(r="function"==typeof n?n:function(){return n},"function"==typeof t)return i.lift(new mw(r,t));const o=Object.create(i,pw);return o.source=i,o.subjectFactory=r,o}}(ma)(n))}()))}bootstrap(e,i){const r=e instanceof qI;if(!this._injector.get(f_).done)throw!r&&function ed(n){const t=vn(n)||tr(n)||_r(n);return null!==t&&t.standalone}(e),new Q(405,false);let s;s=r?e:this._injector.get(vc).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function c$(n){return n.isBoundToModule}(s)?void 0:this._injector.get(Ld),c=s.create(Dr.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(oN,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),g_(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 e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;g_(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(Jk,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>g_(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Q(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(F(qt),F(Is),F(vd))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function g_(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}let Un=(()=>{class n{}return n.__NG_ELEMENT_ID__=m$,n})();function m$(n){return function g$(n,t,e){if(xf(n)&&!e){const i=ho(n.index,t);return new Gf(i,i)}return 47&n.type?new Gf(t[16],t):null}(Gi(),oe(),16==(16&n))}class bN{constructor(){}supports(t){return Xy(t)}create(t){return new C$(t)}}const w$=(n,t)=>t;class C${constructor(t){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=t||w$}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new D$(e,i),o,r),t}_verifyReinsertion(t,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}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(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new wN),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new wN),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class D${constructor(t,e){this.item=t,this.trackById=e,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 T${constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class wN{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new T$,this.map.set(e,i)),i.add(t)}get(t,e){const r=this.map.get(t);return r?r.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function CN(n,t,e){const i=n.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;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(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,e);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 S$(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class S${constructor(t){this.key=t,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 TN(){return new v_([new bN])}let v_=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||TN()),deps:[[n,new Rf,new Lf]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Q(901,!1)}}return n.\u0275prov=H({token:n,providedIn:"root",factory:TN}),n})();function MN(){return new lp([new DN])}let lp=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||MN()),deps:[[n,new Rf,new Lf]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Q(901,!1)}}return n.\u0275prov=H({token:n,providedIn:"root",factory:MN}),n})();const I$=cN(null,"core",[]);let O$=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(F(Mc))},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({}),n})();let FD=null;function Ls(){return FD}class P${}const Ln=new Te("DocumentToken");let jD=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return function L$(){return F(SN)}()},providedIn:"platform"}),n})();const R$=new Te("Location Initialized");let SN=(()=>{class n extends jD{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ls().getBaseHref(this._doc)}onPopState(e){const i=Ls().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Ls().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}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(e){this._location.pathname=e}pushState(e,i,r){EN()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){EN()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:function(){return function F$(){return new SN(F(Ln))}()},providedIn:"platform"}),n})();function EN(){return!!window.history.pushState}function zD(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function xN(n){const t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function xa(n){return n&&"?"!==n[0]?"?"+n:n}let Ec=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return ct(ON)},providedIn:"root"}),n})();const IN=new Te("appBaseHref");let ON=(()=>{class n extends Ec{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??ct(Ln).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return zD(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+xa(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+xa(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+xa(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(F(jD),F(IN,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),j$=(()=>{class n extends Ec{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=zD(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+xa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+xa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(F(jD),F(IN,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),VD=(()=>{class n{constructor(e){this._subject=new re,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function B$(n){if(new RegExp("^(https?:)?//").test(n)){const[,e]=n.split(/\/\/[^\/]+/);return e}return n}(xN(AN(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(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+xa(i))}normalize(e){return n.stripTrailingSlash(function V$(n,t){return n&&new RegExp(`^${n}([/;?#]|$)`).test(t)?t.substring(n.length):t}(this._basePath,AN(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+xa(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+xa(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return n.normalizeQueryParams=xa,n.joinWithSlash=zD,n.stripTrailingSlash=xN,n.\u0275fac=function(e){return new(e||n)(F(Ec))},n.\u0275prov=H({token:n,factory:function(){return function z$(){return new VD(F(Ec))}()},providedIn:"root"}),n})();function AN(n){return n.replace(/\/index.html$/,"")}function VN(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}const QD=/\s+/,BN=[];let fi=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=BN,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(QD):BN}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(QD):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[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(e,i){(e=e.trim()).length>0&&e.split(QD).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(O(v_),O(lp),O(Tt),O(Cr))},n.\u0275dir=we({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class MW{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,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 Gr=(()=>{class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new MW(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),$N(a,r)}});for(let r=0,o=i.length;r{$N(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(O($r),O(No),O(v_))},n.\u0275dir=we({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function $N(n,t){n.context.$implicit=t.item}let Kt=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new EW,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){WN("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){WN("ngIfElse",e),this._elseTemplateRef=e,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(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(O($r),O(No))},n.\u0275dir=we({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class EW{constructor(){this.$implicit=null,this.ngIf=null}}function WN(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${_n(t)}'.`)}class ZD{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let Vd=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==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(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),I_=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new ZD(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(O($r),O(No),O(Vd,9))},n.\u0275dir=we({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),O_=(()=>{class n{constructor(e,i,r){r._addDefault(new ZD(e,i))}}return n.\u0275fac=function(e){return new(e||n)(O($r),O(No),O(Vd,9))},n.\u0275dir=we({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),sr=(()=>{class n{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Br.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(lp),O(Cr))},n.\u0275dir=we({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),_o=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.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&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(O($r))},n.\u0275dir=we({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[$i]}),n})();function fs(n,t){return new Q(2100,!1)}class IW{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}}class OW{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}}const AW=new OW,kW=new IW;let A_=(()=>{class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(Kf(e))return AW;if(GO(e))return kW;throw fs()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(O(Un,16))},n.\u0275pipe=qn({name:"async",type:n,pure:!1,standalone:!0}),n})(),JD=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw fs();return e.toLowerCase()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=qn({name:"lowercase",type:n,pure:!0,standalone:!0}),n})();const NW=/(?:[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 YN=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw fs();return e.replace(NW,i=>i[0].toUpperCase()+i.slice(1).toLowerCase())}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=qn({name:"titlecase",type:n,pure:!0,standalone:!0}),n})(),wn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({}),n})();const KN="browser";let JW=(()=>{class n{}return n.\u0275prov=H({token:n,providedIn:"root",factory:()=>new XW(F(Ln),window)}),n})();class XW{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function eG(n,t){const e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;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(t)||o.querySelector(`[name="${t}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=QN(this.window.history)||QN(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function QN(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class ZN{}class EG extends P${constructor(){super(...arguments),this.supportsDOMEvents=!0}}class iT extends EG{static makeCurrent(){!function N$(n){FD||(FD=n)}(new iT)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=function xG(){return hp=hp||document.querySelector("base"),hp?hp.getAttribute("href"):null}();return null==e?null:function IG(n){N_=N_||document.createElement("a"),N_.setAttribute("href",n);const t=N_.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){hp=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return VN(document.cookie,t)}}let N_,hp=null;const iP=new Te("TRANSITION_ID"),AG=[{provide:sp,useFactory:function OG(n,t,e){return()=>{e.get(f_).donePromise.then(()=>{const i=Ls(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const P_=new Te("EventManagerPlugins");let L_=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>r.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(e){const i=new Set;e.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),fp=(()=>{class n extends oP{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}addHost(e){const i=[];this._addStylesToHost(this._stylesSet,e,i),this._hostNodes.set(e,i)}removeHost(e){const i=this._hostNodes.get(e);i&&i.forEach(sP),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(sP))}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function sP(n){Ls().remove(n)}const rT={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/"},oT=/%COMP%/g;function sT(n,t){return t.flat(100).map(e=>e.replace(oT,n))}function cP(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let R_=(()=>{class n{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new aT(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case ne.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new zG(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case ne.ShadowDom:return new VG(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=sT(i.id,i.styles);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(F(L_),F(fp),F(ap))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class aT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(rT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(dP(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(dP(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;const o=rT[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const r=rT[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Br.DashCase|Br.Important)?t.style.setProperty(e,i,r&Br.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Br.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,cP(i)):this.eventManager.addEventListener(t,e,cP(i))}}function dP(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class zG extends aT{constructor(t,e,i,r){super(t),this.component=i;const o=sT(r+"-"+i.id,i.styles);e.addStyles(o),this.contentAttr=function RG(n){return"_ngcontent-%COMP%".replace(oT,n)}(r+"-"+i.id),this.hostAttr=function FG(n){return"_nghost-%COMP%".replace(oT,n)}(r+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class VG extends aT{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=sT(r.id,r.styles);for(let s=0;s{class n extends rP{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const hP=["alt","control","meta","shift"],UG={"\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"},HG={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let $G=(()=>{class n extends rP{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ls().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.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."),hP.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(e,i){let r=UG[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),hP.forEach(s=>{s!==r&&(0,HG[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const pP=[{provide:p_,useValue:KN},{provide:Zk,useValue:function WG(){iT.makeCurrent()},multi:!0},{provide:Ln,useFactory:function YG(){return function zU(n){_C=n}(document),document},deps:[]}],qG=cN(I$,"browser",pP),mP=new Te(""),gP=[{provide:m_,useClass:class kG{addToWindow(t){fn.getAngularTestability=(i,r=!0)=>{const o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},fn.getAllAngularTestabilities=()=>t.getAllTestabilities(),fn.getAllAngularRootElements=()=>t.getAllRootElements(),fn.frameworkStabilizers||(fn.frameworkStabilizers=[]),fn.frameworkStabilizers.push(i=>{const r=fn.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(t,e,i){return null==e?null:t.getTestability(e)??(i?Ls().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:oN,useClass:xD,deps:[qt,ID,m_]},{provide:xD,useClass:xD,deps:[qt,ID,m_]}],yP=[{provide:SC,useValue:"root"},{provide:vd,useFactory:function GG(){return new vd},deps:[]},{provide:P_,useClass:BG,multi:!0,deps:[Ln,qt,p_]},{provide:P_,useClass:$G,multi:!0,deps:[Ln]},{provide:R_,useClass:R_,deps:[L_,fp,ap]},{provide:$f,useExisting:R_},{provide:oP,useExisting:fp},{provide:fp,useClass:fp,deps:[Ln]},{provide:L_,useClass:L_,deps:[P_,qt]},{provide:ZN,useClass:NG,deps:[]},[]];let _P=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:ap,useValue:e.appId},{provide:iP,useExisting:ap},AG]}}}return n.\u0275fac=function(e){return new(e||n)(F(mP,12))},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({providers:[...yP,...gP],imports:[wn,O$]}),n})(),vP=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:function(e){let i=null;return i=e?new e:function QG(){return new vP(F(Ln))}(),i},providedIn:"root"}),n})();typeof window<"u"&&window;let uT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(e){let i=null;return i=e?new(e||n):F(dT),i},providedIn:"root"}),n})(),dT=(()=>{class n extends uT{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Pn.NONE:return i;case Pn.HTML:return xs(i,"HTML")?po(i):RI(this._doc,String(i)).toString();case Pn.STYLE:return xs(i,"Style")?po(i):i;case Pn.SCRIPT:if(xs(i,"Script"))return po(i);throw new Error("unsafe value used in a script context");case Pn.URL:return xs(i,"URL")?po(i):Vy(String(i));case Pn.RESOURCE_URL:if(xs(i,"ResourceURL"))return po(i);throw new Error(`unsafe value used in a resource URL context (see ${$u})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${$u})`)}}bypassSecurityTrustHtml(e){return function GU(n){return new VU(n)}(e)}bypassSecurityTrustStyle(e){return function YU(n){return new BU(n)}(e)}bypassSecurityTrustScript(e){return function qU(n){return new UU(n)}(e)}bypassSecurityTrustUrl(e){return function KU(n){return new HU(n)}(e)}bypassSecurityTrustResourceUrl(e){return function QU(n){return new $U(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:function(e){let i=null;return i=e?new e:function iY(n){return new dT(n.get(Ln))}(F(Dr)),i},providedIn:"root"}),n})();function Le(...n){let t=n[n.length-1];return Ti(t)?(n.pop(),Bt(n,t)):Ja(n)}function ul(n,t){return ni(n,t,1)}function Tn(n,t){return function(i){return i.lift(new rY(n,t))}}class rY{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new oY(t,this.predicate,this.thisArg))}}class oY extends te{constructor(t,e,i){super(t),this.predicate=e,this.thisArg=i,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)}}class F_{}class hT{}class Yr{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.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(t).forEach(e=>{let i=t[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Yr?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Yr;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Yr?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=t.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class sY{encodeKey(t){return CP(t)}encodeValue(t){return CP(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const lY=/%(\d[a-f0-9])/gi,cY={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function CP(n){return encodeURIComponent(n).replace(lY,(t,e)=>cY[e]??t)}function j_(n){return`${n}`}class ps{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new sY,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function aY(n,t){const e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e],r=Array.isArray(i)?i.map(j_):[j_(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(i=>{const r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new ps({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(j_(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(j_(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class uY{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function DP(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function TP(n){return typeof Blob<"u"&&n instanceof Blob}function MP(n){return typeof FormData<"u"&&n instanceof FormData}class Oa{constructor(t,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function dY(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 Yr),this.context||(this.context=new uY),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,t.setHeaders[h]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((d,h)=>d.set(h,t.setParams[h]),c)),new Oa(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var An=(()=>((An=An||{})[An.Sent=0]="Sent",An[An.UploadProgress=1]="UploadProgress",An[An.ResponseHeader=2]="ResponseHeader",An[An.DownloadProgress=3]="DownloadProgress",An[An.Response=4]="Response",An[An.User=5]="User",An))();class fT{constructor(t,e=200,i="OK"){this.headers=t.headers||new Yr,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class pT extends fT{constructor(t={}){super(t),this.type=An.ResponseHeader}clone(t={}){return new pT({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class z_ extends fT{constructor(t={}){super(t),this.type=An.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new z_({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class SP extends fT{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function mT(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let ar=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Oa)o=e;else{let l,c;l=r.headers instanceof Yr?r.headers:new Yr(r.headers),r.params&&(c=r.params instanceof ps?r.params:new ps({fromObject:r.params})),o=new Oa(e,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=Le(o).pipe(ul(l=>this.handler.handle(l)));if(e instanceof Oa||"events"===r.observe)return s;const a=s.pipe(Tn(l=>l instanceof z_));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(fe(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(fe(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(fe(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(fe(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new ps).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,mT(r,i))}post(e,i,r={}){return this.request("POST",e,mT(r,i))}put(e,i,r={}){return this.request("PUT",e,mT(r,i))}}return n.\u0275fac=function(e){return new(e||n)(F(F_))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function EP(n,t){return t(n)}function fY(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}const mY=new Te("HTTP_INTERCEPTORS"),pp=new Te("HTTP_INTERCEPTOR_FNS");function gY(){let n=null;return(t,e)=>(null===n&&(n=(ct(mY,{optional:!0})??[]).reduceRight(fY,EP)),n(t,e))}let xP=(()=>{class n extends F_{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(pp)));this.chain=i.reduceRight((r,o)=>function pY(n,t,e){return(i,r)=>e.runInContext(()=>t(i,o=>n(o,r)))}(r,o,this.injector),EP)}return this.chain(e,i=>this.backend.handle(i))}}return n.\u0275fac=function(e){return new(e||n)(F(hT),F(Is))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const bY=/^\)\]\}',?\n/;let OP=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Se(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Yr(r.getAllResponseHeaders()),m=function wY(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new pT({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 b=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof y){const w=y;y=y.replace(bY,"");try{y=""!==y?JSON.parse(y):null}catch(_){y=w,b&&(b=!1,y={error:_,text:y})}}b?(i.next(new z_({body:y,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new SP({error:y,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new SP({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:An.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:An.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),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:An.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(F(ZN))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const gT=new Te("XSRF_ENABLED"),AP="XSRF-TOKEN",kP=new Te("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>AP}),NP="X-XSRF-TOKEN",PP=new Te("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>NP});class LP{}let CY=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=VN(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(F(Ln),F(p_),F(kP))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function DY(n,t){const e=n.url.toLowerCase();if(!ct(gT)||"GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t(n);const i=ct(LP).getToken(),r=ct(PP);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var pi=(()=>((pi=pi||{})[pi.Interceptors=0]="Interceptors",pi[pi.LegacyInterceptors=1]="LegacyInterceptors",pi[pi.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",pi[pi.NoXsrfProtection=3]="NoXsrfProtection",pi[pi.JsonpSupport=4]="JsonpSupport",pi[pi.RequestsMadeViaParent=5]="RequestsMadeViaParent",pi))();function Bd(n,t){return{\u0275kind:n,\u0275providers:t}}function TY(...n){const t=[ar,OP,xP,{provide:F_,useExisting:xP},{provide:hT,useExisting:OP},{provide:pp,useValue:DY,multi:!0},{provide:gT,useValue:!0},{provide:LP,useClass:CY}];for(const e of n)t.push(...e.\u0275providers);return function d8(n){return{\u0275providers:n}}(t)}const RP=new Te("LEGACY_INTERCEPTOR_FN");function SY({cookieName:n,headerName:t}){const e=[];return void 0!==n&&e.push({provide:kP,useValue:n}),void 0!==t&&e.push({provide:PP,useValue:t}),Bd(pi.CustomXsrfConfiguration,e)}let yT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({providers:[TY(Bd(pi.LegacyInterceptors,[{provide:RP,useFactory:gY},{provide:pp,useExisting:RP,multi:!0}]),SY({cookieName:AP,headerName:NP}))]}),n})();class EY extends se{constructor(t,e){super()}schedule(t,e=0){return this}}class V_ extends EY{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;try{this.work(t)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const t=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let FP=(()=>{class n{constructor(e,i=n.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return n.now=()=>Date.now(),n})();class ms extends FP{constructor(t,e=FP.now){super(t,()=>ms.delegate&&ms.delegate!==this?ms.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,i){return ms.delegate&&ms.delegate!==this?ms.delegate.schedule(t,e,i):super.schedule(t,e,i)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}const _T=new class IY extends ms{}(class xY extends V_{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(t,e,i):t.flush(this)}}),OY=_T,Rs=new Se(n=>n.complete());function B_(n){return n?function AY(n){return new Se(t=>n.schedule(()=>t.complete()))}(n):Rs}function vo(n,t){return new Se(t?e=>t.schedule(kY,0,{error:n,subscriber:e}):e=>e.error(n))}function kY({error:n,subscriber:t}){t.error(n)}class Ro{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)}toObservable(){switch(this.kind){case"N":return Le(this.value);case"E":return vo(this.error);case"C":return B_()}throw new Error("unexpected notification kind value")}static createNext(t){return typeof t<"u"?new Ro("N",t):Ro.undefinedValueNotification}static createError(t){return new Ro("E",void 0,t)}static createComplete(){return Ro.completeNotification}}Ro.completeNotification=new Ro("C"),Ro.undefinedValueNotification=new Ro("N",void 0);class PY{constructor(t,e=0){this.scheduler=t,this.delay=e}call(t,e){return e.subscribe(new U_(t,this.scheduler,this.delay))}}class U_ extends te{constructor(t,e,i=0){super(t),this.scheduler=e,this.delay=i}static dispatch(t){const{notification:e,destination:i}=t;e.observe(i),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(U_.dispatch,this.delay,new LY(t,this.destination)))}_next(t){this.scheduleMessage(Ro.createNext(t))}_error(t){this.scheduleMessage(Ro.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(Ro.createComplete()),this.unsubscribe()}}class LY{constructor(t,e){this.notification=t,this.destination=e}}class H_ extends ae{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new RY(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,i=e?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;let s;if(this.closed)throw new ve;if(this.isStopped||this.hasError?s=se.EMPTY:(this.observers.push(t),s=new Ze(this,t)),r&&t.add(t=new U_(t,r)),e)for(let a=0;ae&&(s=Math.max(s,o-e)),s>0&&r.splice(0,s),r}}class RY{constructor(t,e){this.time=t,this.value=e}}function ai(n,t){return"function"==typeof t?e=>e.pipe(ai((i,r)=>wt(n(i,r)).pipe(fe((o,s)=>t(i,o,r,s))))):e=>e.lift(new FY(n))}class FY{constructor(t){this.project=t}call(t,e){return e.subscribe(new jY(t,this.project))}}class jY extends es{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const i=new Hn(this),r=this.destination;r.add(i),this.innerSubscription=ic(t,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;(!t||t.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const $_={schedule(n,t){const e=setTimeout(n,t);return()=>clearTimeout(e)},scheduleBeforeRender(n){if(typeof window>"u")return $_.schedule(n,0);if(typeof window.requestAnimationFrame>"u")return $_.schedule(n,16);const t=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(t)}};let vT;function YY(n,t,e){let i=e;return function VY(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&t.some((r,o)=>!("*"===r||!function UY(n,t){if(!vT){const e=Element.prototype;vT=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&vT.call(n,t)}(n,r)||(i=o,0))),i}class KY{constructor(t,e){this.componentFactory=e.get(vc).resolveComponentFactory(t)}create(t){return new QY(this.componentFactory,t)}}class QY{constructor(t,e){this.componentFactory=t,this.injector=e,this.eventEmitters=new H_(1),this.events=this.eventEmitters.pipe(ai(i=>ws(...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(qt),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=$_.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(t){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){this.runInZone(()=>{null!==this.componentRef?function HY(n,t){return n===t||n!=n&&t!=t}(e,this.getInputValue(t))&&(void 0!==e||!this.unchangedInputs.has(t))||(this.recordInputChange(t,e),this.unchangedInputs.delete(t),this.hasInputChanges=!0,this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e)})}initializeComponent(t){const e=Dr.create({providers:[],parent:this.injector}),i=function GY(n,t){const e=n.childNodes,i=t.map(()=>[]);let r=-1;t.some((o,s)=>"*"===o&&(r=s,!0));for(let o=0,s=e.length;o{this.initialInputValues.has(t)&&this.setInputValue(t,this.initialInputValues.get(t))}),this.initialInputValues.clear()}initializeOutputs(t){const e=this.componentFactory.outputs.map(({propName:i,templateName:r})=>t.instance[i].pipe(fe(s=>({name:r,value:s}))));this.eventEmitters.next(e)}callNgOnChanges(t){if(!this.implementsOnChanges||null===this.inputChanges)return;const e=this.inputChanges;this.inputChanges=null,t.instance.ngOnChanges(e)}markViewForCheck(t){this.hasInputChanges&&(this.hasInputChanges=!1,t.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=$_.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[t];if(i)return void(i.currentValue=e);const r=this.unchangedInputs.has(t),o=r?void 0:this.getInputValue(t);this.inputChanges[t]=new ax(o,e,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}}class ZY extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function W_(n,t){return new Se(e=>{const i=n.length;if(0===i)return void e.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=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(t?t.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let jP=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(O(Cr),O(Tt))},n.\u0275dir=we({type:n}),n})(),xc=(()=>{class n extends jP{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Li(n)))(i||n)}}(),n.\u0275dir=we({type:n,features:[bn]}),n})();const Sr=new Te("NgValueAccessor"),tq={provide:Sr,useExisting:Ut(()=>dl),multi:!0},iq=new Te("CompositionEventMode");let dl=(()=>{class n extends jP{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function nq(){const n=Ls()?Ls().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Cr),O(Tt),O(iq,8))},n.\u0275dir=we({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(e,i){1&e&&ue("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:[Pt([tq]),bn]}),n})();function hl(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function VP(n){return null!=n&&"number"==typeof n.length}const lr=new Te("NgValidators"),fl=new Te("NgAsyncValidators"),oq=/^(?=.{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 Ud{static min(t){return function BP(n){return t=>{if(hl(t.value)||hl(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(hl(t.value)||hl(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return function HP(n){return hl(n.value)?{required:!0}:null}(t)}static requiredTrue(t){return function $P(n){return!0===n.value?null:{required:!0}}(t)}static email(t){return function WP(n){return hl(n.value)||oq.test(n.value)?null:{email:!0}}(t)}static minLength(t){return function GP(n){return t=>hl(t.value)||!VP(t.value)?null:t.value.lengthVP(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return function qP(n){if(!n)return G_;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(hl(i.value))return null;const r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(t)}static nullValidator(t){return null}static compose(t){return e2(t)}static composeAsync(t){return t2(t)}}function G_(n){return null}function KP(n){return null!=n}function QP(n){return Kf(n)?wt(n):n}function ZP(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function JP(n,t){return t.map(e=>e(n))}function XP(n){return n.map(t=>function sq(n){return!n.validate}(t)?t:e=>t.validate(e))}function e2(n){if(!n)return null;const t=n.filter(KP);return 0==t.length?null:function(e){return ZP(JP(e,t))}}function bT(n){return null!=n?e2(XP(n)):null}function t2(n){if(!n)return null;const t=n.filter(KP);return 0==t.length?null:function(e){return function XY(...n){if(1===n.length){const t=n[0];if(R(t))return W_(t,null);if(P(t)&&Object.getPrototypeOf(t)===Object.prototype){const e=Object.keys(t);return W_(e.map(i=>t[i]),e)}}if("function"==typeof n[n.length-1]){const t=n.pop();return W_(n=1===n.length&&R(n[0])?n[0]:n,null).pipe(fe(e=>t(...e)))}return W_(n,null)}(JP(e,t).map(QP)).pipe(fe(ZP))}}function wT(n){return null!=n?t2(XP(n)):null}function n2(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function r2(n){return n._rawValidators}function o2(n){return n._rawAsyncValidators}function CT(n){return n?Array.isArray(n)?n:[n]:[]}function Y_(n,t){return Array.isArray(n)?n.includes(t):n===t}function s2(n,t){const e=CT(t);return CT(n).forEach(r=>{Y_(e,r)||e.push(r)}),e}function a2(n,t){return CT(t).filter(e=>!Y_(n,e))}class l2{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(t){this._rawValidators=t||[],this._composedValidatorFn=bT(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=wT(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class Er extends l2{get formDirective(){return null}get path(){return null}}class Fs extends l2{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class c2{constructor(t){this._cd=t}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 Ic=(()=>{class n extends c2{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Fs,2))},n.\u0275dir=we({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&yo("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:[bn]}),n})(),Hd=(()=>{class n extends c2{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Er,10))},n.\u0275dir=we({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&yo("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:[bn]}),n})();const mp="VALID",K_="INVALID",$d="PENDING",gp="DISABLED";function ST(n){return(Q_(n)?n.validators:n)||null}function ET(n,t){return(Q_(t)?t.asyncValidators:n)||null}function Q_(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function d2(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new Q(1e3,"");if(!i[e])throw new Q(1001,"")}function h2(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new Q(1002,"")})}class Z_{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===mp}get invalid(){return this.status===K_}get pending(){return this.status==$d}get disabled(){return this.status===gp}get enabled(){return this.status!==gp}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(s2(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(s2(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(a2(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(a2(t,this._rawAsyncValidators))}hasValidator(t){return Y_(this._rawValidators,t)}hasAsyncValidator(t){return Y_(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=$d,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=gp,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=mp,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===mp||this.status===$d)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?gp:mp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=$d,this._hasOwnPendingAsyncValidator=!0;const e=QP(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new re,this.statusChanges=new re}_calculateStatus(){return this._allControlsDisabled()?gp:this.errors?K_:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus($d)?$d:this._anyControlsHaveStatus(K_)?K_:mp}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Q_(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function fq(n){return Array.isArray(n)?bT(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function pq(n){return Array.isArray(n)?wT(n):n||null}(this._rawAsyncValidators)}}class Wd extends Z_{constructor(t,e,i){super(ST(e),ET(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){h2(this,0,t),Object.keys(t).forEach(i=>{d2(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}class f2 extends Wd{}const Gd=new Te("CallSetDisabledState",{providedIn:"root",factory:()=>J_}),J_="always";function X_(n,t){return[...t.path,n]}function yp(n,t,e=J_){xT(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function gq(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&p2(n,t)})}(n,t),function _q(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function yq(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&p2(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function mq(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function ev(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),nv(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function tv(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function xT(n,t){const e=r2(n);null!==t.validator?n.setValidators(n2(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=o2(n);null!==t.asyncValidator?n.setAsyncValidators(n2(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();tv(t._rawValidators,r),tv(t._rawAsyncValidators,r)}function nv(n,t){let e=!1;if(null!==n){if(null!==t.validator){const r=r2(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){const r=o2(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}const i=()=>{};return tv(t._rawValidators,i),tv(t._rawAsyncValidators,i),e}function p2(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function OT(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function AT(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===dl?e=o:function wq(n){return Object.getPrototypeOf(n.constructor)===xc}(o)?i=o:r=o}),r||i||e||null}function y2(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function _2(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Yd=class extends Z_{constructor(t=null,e,i){super(ST(e),ET(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Q_(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=_2(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){y2(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){y2(this._onDisabledChange,t)}_forEachChild(t){}_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(t){_2(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},Sq={provide:Fs,useExisting:Ut(()=>vp)},w2=(()=>Promise.resolve())();let vp=(()=>{class n extends Fs{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new Yd,this._registered=!1,this.update=new re,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=AT(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),OT(e,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(e){this.viewModel=e,this.update.emit(e)}_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(){yp(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(e){w2.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&function zd(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}(i);w2.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?X_(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(O(Er,9),O(lr,10),O(fl,10),O(Sr,10),O(Un,8),O(Gd,8))},n.\u0275dir=we({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:[Pt([Sq]),bn,$i]}),n})(),qd=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),D2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({}),n})();const NT=new Te("NgModelWithFormControlWarning"),kq={provide:Er,useExisting:Ut(()=>Aa)};let Aa=(()=>{class n extends Er{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new re,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(nv(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return yp(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ev(e.control||null,e,!1),function Cq(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function g2(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(ev(i||null,e),(n=>n instanceof Yd)(r)&&(yp(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function m2(n,t){xT(n,t)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function vq(n,t){return nv(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){xT(this.form,this),this._oldForm&&nv(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(O(lr,10),O(fl,10),O(Gd,8))},n.\u0275dir=we({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&ue("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Pt([kq]),bn,$i]}),n})();const Lq={provide:Fs,useExisting:Ut(()=>Oc)};let Oc=(()=>{class n extends Fs{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new re,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=AT(0,o)}ngOnChanges(e){this._added||this._setUpControl(),OT(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return X_(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(e){return new(e||n)(O(Er,13),O(lr,10),O(fl,10),O(Sr,10),O(NT,8))},n.\u0275dir=we({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Pt([Lq]),bn,$i]}),n})(),z2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[D2]}),n})();class V2 extends Z_{constructor(t,e,i){super(ST(e),ET(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){h2(this,0,t),t.forEach((i,r)=>{d2(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}}function B2(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let iv=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new n;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return B2(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Wd(r,o)}record(e,i=null){const r=this._reduceControls(e);return new f2(r,i)}control(e,i,r){let o={};return this.useNonNullable?(B2(i)?o=i:(o.validators=i,o.asyncValidators=r),new Yd(e,{...o,nonNullable:!0})):new Yd(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new V2(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Yd||e instanceof Z_?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),rv=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Gd,useValue:e.callSetDisabledState??J_}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[z2]}),n})(),Kd=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:NT,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Gd,useValue:e.callSetDisabledState??J_}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[z2]}),n})();class U2{}class Qq{}const ka="*";function ov(n,t){return{type:7,name:n,definitions:t,options:{}}}function kc(n,t=null){return{type:4,styles:t,timings:n}}function H2(n,t=null){return{type:2,steps:n,options:t}}function Ai(n){return{type:6,styles:n,offset:null}}function $2(n,t,e){return{type:0,name:n,styles:t,options:e}}function Nc(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function sv(n,t=null){return{type:8,animation:n,options:t}}function av(n,t=null){return{type:10,animation:n,options:t}}function W2(n){Promise.resolve().then(n)}class bp{constructor(t=0,e=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=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){W2(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class G2{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0;const o=this.players.length;0==o?W2(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==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(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}function Y2(n){return new Q(3e3,!1)}function kK(){return typeof window<"u"&&typeof window.document<"u"}function VT(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function pl(n){switch(n.length){case 0:return new bp;case 1:return n[0];default:return new G2(n)}}function q2(n,t,e,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=t.normalizePropertyName(g,s),y){case"!":y=r.get(m);break;case ka:y=o.get(m);break;default:y=t.normalizeStyleValue(m,g,y,s)}f.set(g,y)}),h||a.push(f),c=f,l=d}),s.length)throw function bK(n){return new Q(3502,!1)}();return a}function BT(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&UT(e,"start",n)));break;case"done":n.onDone(()=>i(e&&UT(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&UT(e,"destroy",n)))}}function UT(n,t,e){const o=HT(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),s=n._data;return null!=s&&(o._data=s),o}function HT(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function bo(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function K2(n){const t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}let $T=(n,t)=>!1,Q2=(n,t,e)=>[],Z2=null;function WT(n){const t=n.parentNode||n.host;return t===Z2?null:t}(VT()||typeof Element<"u")&&(kK()?(Z2=(()=>document.documentElement)(),$T=(n,t)=>{for(;t;){if(t===n)return!0;t=WT(t)}return!1}):$T=(n,t)=>n.contains(t),Q2=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));const i=n.querySelector(t);return i?[i]:[]});let Pc=null,J2=!1;const X2=$T,eL=Q2;let tL=(()=>{class n{validateStyleProperty(e){return function PK(n){Pc||(Pc=function LK(){return typeof document<"u"?document.body:null}()||{},J2=!!Pc.style&&"WebkitAppearance"in Pc.style);let t=!0;return Pc.style&&!function NK(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in Pc.style,!t&&J2&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Pc.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return X2(e,i)}getParentElement(e){return WT(e)}query(e,i,r){return eL(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new bp(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),GT=(()=>{class n{}return n.NOOP=new tL,n})();const YT="ng-enter",lv="ng-leave",cv="ng-trigger",uv=".ng-trigger",iL="ng-animating",qT=".ng-animating";function Na(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:KT(parseFloat(t[1]),t[2])}function KT(n,t){return"s"===t?1e3*n:n}function dv(n,t,e){return n.hasOwnProperty("duration")?n:function jK(n,t,e){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 t.push(Y2()),{duration:0,delay:0,easing:""};r=KT(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=KT(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=n;if(!e){let a=!1,l=t.length;r<0&&(t.push(function Jq(){return new Q(3100,!1)}()),a=!0),o<0&&(t.push(function Xq(){return new Q(3101,!1)}()),a=!0),a&&t.splice(l,0,Y2())}return{duration:r,delay:o,easing:s}}(n,t,e)}function wp(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function rL(n){const t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function ml(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function sL(n,t,e){return e?t+":"+e+";":""}function aL(n){let t="";for(let e=0;e{const o=ZT(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),VT()&&aL(n))}function Lc(n,t){n.style&&(t.forEach((e,i)=>{const r=ZT(i);n.style[r]=""}),VT()&&aL(n))}function Cp(n){return Array.isArray(n)?1==n.length?n[0]:H2(n):n}const QT=new RegExp("{{\\s*(.+?)\\s*}}","g");function lL(n){let t=[];if("string"==typeof n){let e;for(;e=QT.exec(n);)t.push(e[1]);QT.lastIndex=0}return t}function Dp(n,t,e){const i=n.toString(),r=i.replace(QT,(o,s)=>{let a=t[s];return null==a&&(e.push(function tK(n){return new Q(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function hv(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const BK=/-+([a-z0-9])/g;function ZT(n){return n.replace(BK,(...t)=>t[1].toUpperCase())}function UK(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function wo(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw function nK(n){return new Q(3004,!1)}()}}function cL(n,t){return window.getComputedStyle(n)[t]}function qK(n,t){const e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function KK(n,t,e){if(":"==n[0]){const l=function QK(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(n,e);if("function"==typeof l)return void t.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function mK(n){return new Q(3015,!1)}()),t;const r=i[1],o=i[2],s=i[3];t.push(uL(r,s));"<"==o[0]&&!("*"==r&&"*"==s)&&t.push(uL(s,r))}(i,e,t)):e.push(n),e}const gv=new Set(["true","1"]),yv=new Set(["false","0"]);function uL(n,t){const e=gv.has(n)||yv.has(n),i=gv.has(t)||yv.has(t);return(r,o)=>{let s="*"==n||n==r,a="*"==t||t==o;return!s&&e&&"boolean"==typeof r&&(s=r?gv.has(n):yv.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?gv.has(t):yv.has(t)),s&&a}}const ZK=new RegExp("s*:selfs*,?","g");function JT(n,t,e,i){return new JK(n).build(t,e,i)}class JK{constructor(t){this._driver=t}build(t,e,i){const r=new tQ(e);return this._resetContextStyleTimingState(r),wo(this,Cp(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push(function rK(){return new Q(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function oK(){return new Q(3007,!1)}())}),{type:7,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{lL(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(hv(o.values()),e.errors.push(function sK(n,t){return new Q(3008,!1)}()))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=wo(this,Cp(t.animation),e);return{type:1,matchers:qK(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Rc(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>wo(this,i,e)),options:Rc(t.options)}}visitGroup(t,e){const i=e.currentTime;let r=0;const o=t.steps.map(s=>{e.currentTime=i;const a=wo(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:Rc(t.options)}}visitAnimate(t,e){const i=function iQ(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return XT(dv(n,t).duration,0,"");const e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=XT(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=dv(e,t);return XT(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:Ai({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Ai(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===ka?i.push(a):e.errors.push(new Q(3002,!1)):i.push(rL(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:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function lK(n,t,e,i,r){return new Q(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function VK(n,t,e){const i=t.params||{},r=lL(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function eK(n){return new Q(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function cK(){return new Q(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=t.steps.map(y=>{const b=this._makeStyleAst(y,e);let w=null!=b.offset?b.offset:function nQ(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(b.styles),_=0;return null!=w&&(o++,_=b.offset=w),l=l||_<0||_>1,a=a||_0&&o{const w=h>0?b==f?1:h*b:s[b],_=w*g;e.currentTime=p+m.delay+_,m.duration=_,this._validateStyleAst(y,e),y.offset=w,i.styles.push(y)}),i}visitReference(t,e){return{type:8,animation:wo(this,Cp(t.animation),e),options:Rc(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Rc(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Rc(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[o,s]=function XK(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(ZK,"")),n=n.replace(/@\*/g,uv).replace(/@\w+/g,e=>uv+"-"+e.slice(1)).replace(/:animating/g,qT),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,bo(e.collectedStyles,e.currentQuerySelector,new Map);const a=wo(this,Cp(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Rc(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function fK(){return new Q(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:dv(t.timings,e.errors,!0);return{type:12,animation:wo(this,Cp(t.animation),e),timings:i,options:null}}}class tQ{constructor(t){this.errors=t,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 Rc(n){return n?(n=wp(n)).params&&(n.params=function eQ(n){return n?wp(n):null}(n.params)):n={},n}function XT(n,t,e){return{duration:n,delay:t,easing:e}}function eM(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class _v{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const sQ=new RegExp(":enter","g"),lQ=new RegExp(":leave","g");function tM(n,t,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new cQ).buildKeyframes(n,t,e,i,r,o,s,a,l,c)}class cQ{buildKeyframes(t,e,i,r,o,s,a,l,c,u=[]){c=c||new _v;const d=new nM(t,e,c,r,o,u,[]);d.options=l;const h=l.delay?Na(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),wo(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===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[eM(e,[],[],[],0,h,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(const r of t){const o=r?.delay;if(o){const s="number"==typeof o?o:Na(Dp(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Na(i.duration):null,a=null!=i.delay?Na(i.delay):null;return 0!==s&&t.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),wo(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let r=e;const o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=vv);const s=Na(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>wo(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let r=e.currentTimeline.currentTime;const o=t.options&&t.options.delay?Na(t.options.delay):0;t.steps.forEach(s=>{const a=e.createSubContext(t.options);o&&a.delayNextStep(o),wo(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return dv(e.params?Dp(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?Na(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=vv);let s=i;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(t.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),wo(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;wo(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const vv={};class nM{constructor(t,e,i,r,o,s,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=vv,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new bv(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=Na(i.duration)),null!=i.delay&&(r.delay=Na(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=Dp(o[a],s,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){const r=e||this.element,o=new nM(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(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=vv,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new uQ(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(sQ,"."+this._enterClassName)).replace(lQ,"."+this._leaveClassName);let c=this._driver.query(this.element,t,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 pK(n){return new Q(3014,!1)}()),a}}class bv{constructor(t,e,i,r){this._driver=t,this.element=e,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(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,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(t){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new bv(this._driver,t,e||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(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||ka),this._currentKeyframe.set(e,ka);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function dQ(n,t){const e=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let o of i)e.set(o,ka)}else ml(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of s){const c=Dp(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??ka),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=ml(a,new Map,this._backFill);c.forEach((u,d)=>{"!"===u?t.add(d):u===ka&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=t.size?hv(t.values()):[],s=e.size?hv(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return eM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class uQ extends bv{constructor(t,e,i,r,o,s,a=!1){super(t,e,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 t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=ml(t[0]);l.set("offset",0),o.push(l);const c=ml(t[0]);c.set("offset",fL(a)),o.push(c);const u=t.length-1;for(let d=1;d<=u;d++){let h=ml(t[d]);const f=h.get("offset");h.set("offset",fL((e+f*i)/s)),o.push(h)}i=s,e=0,r="",t=o}return eM(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function fL(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class iM{}const hQ=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 fQ extends iM{normalizePropertyName(t,e){return ZT(t)}normalizeStyleValue(t,e,i,r){let o="";const s=i.toString().trim();if(hQ.has(e)&&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 iK(n,t){return new Q(3005,!1)}())}return s+o}}function pL(n,t,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const rM={};class mL{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function pQ(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||rM,p=this.buildStyles(i,a&&a.params||rM,d),m=l&&l.params||rM,g=this.buildStyles(r,m,d),y=new Set,b=new Map,w=new Map,_="void"===r,N={params:mQ(m,h),delay:this.ast.options?.delay},S=u?[]:tM(t,e,this.ast.animation,o,s,p,g,N,c,d);let ie=0;if(S.forEach(Ne=>{ie=Math.max(Ne.duration+Ne.delay,ie)}),d.length)return pL(e,this._triggerName,i,r,_,p,g,[],[],b,w,ie,d);S.forEach(Ne=>{const He=Ne.element,vt=bo(b,He,new Set);Ne.preStyleProps.forEach(ot=>vt.add(ot));const at=bo(w,He,new Set);Ne.postStyleProps.forEach(ot=>at.add(ot)),He!==e&&y.add(He)});const K=hv(y.values());return pL(e,this._triggerName,i,r,_,p,g,S,K,b,w,ie)}}function mQ(n,t){const e=wp(t);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}class gQ{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){const i=new Map,r=wp(this.defaultParams);return Object.keys(t).forEach(o=>{const s=t[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=Dp(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class _Q{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new gQ(r.style,r.options&&r.options.params||{},i))}),gL(this.states,"true","1"),gL(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new mL(t,r,this.states))}),this.fallbackTransition=function vQ(n,t,e){return new mL(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function gL(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}const bQ=new _v;class wQ{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const i=[],o=JT(this._driver,e,i,[]);if(i.length)throw function wK(n){return new Q(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,e,i){const r=t.element,o=q2(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const r=[],o=this._animations.get(t);let s;const a=new Map;if(o?(s=tM(this._driver,e,o,YT,lv,new Map,new Map,i,bQ,r),s.forEach(u=>{const d=bo(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function CK(){return new Q(3300,!1)}()),s=[]),r.length)throw function DK(n){return new Q(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,ka))})});const c=pl(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function TK(n){return new Q(3301,!1)}();return e}listen(t,e,i,r){const o=HT(e,"","","");return BT(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});const o=this._getPlayer(t);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(t)}}}const yL="ng-animate-queued",oM="ng-animate-disabled",SQ=[],_L={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},EQ={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Fo="__ng_removed";class sM{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=function AQ(n){return n??null}(i?t.value:t),i){const o=wp(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const e=t.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Tp="void",aM=new sM(Tp);class xQ{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,jo(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw function MK(n,t){return new Q(3302,!1)}();if(null==i||0==i.length)throw function SK(n){return new Q(3303,!1)}();if(!function kQ(n){return"start"==n||"done"==n}(i))throw function EK(n,t){return new Q(3400,!1)}();const o=bo(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);const a=bo(this._engine.statesByElement,t,new Map);return a.has(e)||(jo(t,cv),jo(t,cv+"-"+e),a.set(e,aM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){const e=this._triggers.get(t);if(!e)throw function xK(n){return new Q(3401,!1)}();return e}trigger(t,e,i,r=!0){const o=this._getTrigger(e),s=new lM(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(jo(t,cv),jo(t,cv+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new sM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=aM),c.value!==Tp&&l.value===c.value){if(!function LQ(n,t){const e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r{Lc(t,g),js(t,y)})}return}const h=bo(this._engine.playersByElement,t,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,t,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(jo(t,yL),s.onStart(()=>{Qd(t,yL)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(t);if(g){let y=g.indexOf(s);y>=0&&g.splice(y,1)}}),this.players.push(s),h.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,uv,!0);i.forEach(r=>{if(r[Fo])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){const o=this._engine.statesByElement.get(t),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(t,c,Tp,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&pl(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const r=new Set;e.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)||aM,u=new sM(Tp),d=new lM(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{const o=t[Fo];(!o||o===_L)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){jo(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];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=HT(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,BT(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.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(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}class IQ{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,i){this.bodyNode=t,this.driver=e,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 t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){const i=new xQ(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(t,e,i,r){if(wv(e)){const o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!wv(e))return;const o=e[Fo];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),jo(t,oM)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Qd(t,oM))}removeNode(t,e,i,r){if(wv(e)){const o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==t&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[Fo]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return wv(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,uv,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,qT,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return pl(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Fo];if(e&&e.setForRemoval){if(t[Fo]=_L,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(oM)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];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=[],e.length?pl(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function IK(n){return new Q(3402,!1)}()}_flushAnimations(t,e){const i=new _v,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(le=>{u.add(le);const me=this.driver.query(le,".ng-animate-queued",!0);for(let be=0;be{const be=YT+m++;p.set(me,be),le.forEach(Ue=>jo(Ue,be))});const g=[],y=new Set,b=new Set;for(let le=0;ley.add(Ue)):b.add(me))}const w=new Map,_=wL(h,Array.from(y));_.forEach((le,me)=>{const be=lv+m++;w.set(me,be),le.forEach(Ue=>jo(Ue,be))}),t.push(()=>{f.forEach((le,me)=>{const be=p.get(me);le.forEach(Ue=>Qd(Ue,be))}),_.forEach((le,me)=>{const be=w.get(me);le.forEach(Ue=>Qd(Ue,be))}),g.forEach(le=>{this.processLeaveNode(le)})});const N=[],S=[];for(let le=this._namespaceList.length-1;le>=0;le--)this._namespaceList[le].drainQueuedTransitions(e).forEach(be=>{const Ue=be.player,kt=be.element;if(N.push(Ue),this.collectedEnterElements.length){const In=kt[Fo];if(In&&In.setForMove){if(In.previousTriggersValues&&In.previousTriggersValues.has(be.triggerName)){const Gt=In.previousTriggersValues.get(be.triggerName),ft=this.statesByElement.get(be.element);if(ft&&ft.has(be.triggerName)){const zn=ft.get(be.triggerName);zn.value=Gt,ft.set(be.triggerName,zn)}}return void Ue.destroy()}}const cn=!d||!this.driver.containsElement(d,kt),Vt=w.get(kt),xn=p.get(kt),Ft=this._buildInstruction(be,i,xn,Vt,cn);if(Ft.errors&&Ft.errors.length)return void S.push(Ft);if(cn)return Ue.onStart(()=>Lc(kt,Ft.fromStyles)),Ue.onDestroy(()=>js(kt,Ft.toStyles)),void r.push(Ue);if(be.isFallbackTransition)return Ue.onStart(()=>Lc(kt,Ft.fromStyles)),Ue.onDestroy(()=>js(kt,Ft.toStyles)),void r.push(Ue);const Xi=[];Ft.timelines.forEach(In=>{In.stretchStartingKeyframe=!0,this.disabledNodes.has(In.element)||Xi.push(In)}),Ft.timelines=Xi,i.append(kt,Ft.timelines),s.push({instruction:Ft,player:Ue,element:kt}),Ft.queriedElements.forEach(In=>bo(a,In,[]).push(Ue)),Ft.preStyleProps.forEach((In,Gt)=>{if(In.size){let ft=l.get(Gt);ft||l.set(Gt,ft=new Set),In.forEach((zn,Pr)=>ft.add(Pr))}}),Ft.postStyleProps.forEach((In,Gt)=>{let ft=c.get(Gt);ft||c.set(Gt,ft=new Set),In.forEach((zn,Pr)=>ft.add(Pr))})});if(S.length){const le=[];S.forEach(me=>{le.push(function OK(n,t){return new Q(3505,!1)}())}),N.forEach(me=>me.destroy()),this.reportError(le)}const ie=new Map,K=new Map;s.forEach(le=>{const me=le.element;i.has(me)&&(K.set(me,me),this._beforeAnimationBuild(le.player.namespaceId,le.instruction,ie))}),r.forEach(le=>{const me=le.element;this._getPreviousPlayers(me,!1,le.namespaceId,le.triggerName,null).forEach(Ue=>{bo(ie,me,[]).push(Ue),Ue.destroy()})});const Ne=g.filter(le=>DL(le,l,c)),He=new Map;bL(He,this.driver,b,c,ka).forEach(le=>{DL(le,l,c)&&Ne.push(le)});const at=new Map;f.forEach((le,me)=>{bL(at,this.driver,new Set(le),l,"!")}),Ne.forEach(le=>{const me=He.get(le),be=at.get(le);He.set(le,new Map([...Array.from(me?.entries()??[]),...Array.from(be?.entries()??[])]))});const ot=[],yn=[],xt={};s.forEach(le=>{const{element:me,player:be,instruction:Ue}=le;if(i.has(me)){if(u.has(me))return be.onDestroy(()=>js(me,Ue.toStyles)),be.disabled=!0,be.overrideTotalTime(Ue.totalTime),void r.push(be);let kt=xt;if(K.size>1){let Vt=me;const xn=[];for(;Vt=Vt.parentNode;){const Ft=K.get(Vt);if(Ft){kt=Ft;break}xn.push(Vt)}xn.forEach(Ft=>K.set(Ft,kt))}const cn=this._buildAnimation(be.namespaceId,Ue,ie,o,at,He);if(be.setRealPlayer(cn),kt===xt)ot.push(be);else{const Vt=this.playersByElement.get(kt);Vt&&Vt.length&&(be.parentPlayer=pl(Vt)),r.push(be)}}else Lc(me,Ue.fromStyles),be.onDestroy(()=>js(me,Ue.toStyles)),yn.push(be),u.has(me)&&r.push(be)}),yn.forEach(le=>{const me=o.get(le.element);if(me&&me.length){const be=pl(me);le.setRealPlayer(be)}}),r.forEach(le=>{le.parentPlayer?le.syncPlayerEvents(le.parentPlayer):le.destroy()});for(let le=0;le!cn.destroyed);kt.length?NQ(this,me,kt):this.processLeaveNode(me)}return g.length=0,ot.forEach(le=>{this.players.push(le),le.onDone(()=>{le.destroy();const me=this.players.indexOf(le);this.players.splice(me,1)}),le.play()}),ot}elementContainsData(t,e){let i=!1;const r=e[Fo];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(s=a)}else{const a=this.playersByElement.get(t);if(a){const l=!o||o==Tp;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(t,e,i){const o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=bo(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Lc(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const m=p.element;u.add(m);const g=m[Fo];if(g&&g.removedBeforeQueried)return new bp(p.duration,p.delay);const y=m!==l,b=function PQ(n){const t=[];return CL(n,t),t}((i.get(m)||SQ).map(ie=>ie.getRealPlayer())).filter(ie=>!!ie.element&&ie.element===m),w=o.get(m),_=s.get(m),N=q2(0,this._normalizer,0,p.keyframes,w,_),S=this._buildPlayer(p,N,b);if(p.subTimeline&&r&&d.add(m),y){const ie=new lM(t,a,m);ie.setRealPlayer(S),c.push(ie)}return S});c.forEach(p=>{bo(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function OQ(n,t,e){let i=n.get(t);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>jo(p,iL));const f=pl(h);return f.onDestroy(()=>{u.forEach(p=>Qd(p,iL)),js(l,e.toStyles)}),d.forEach(p=>{bo(r,p,[]).push(f)}),f}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new bp(t.duration,t.delay)}}class lM{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new bp,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>BT(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){bo(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}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(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function wv(n){return n&&1===n.nodeType}function vL(n,t){const e=n.style.display;return n.style.display=t??"none",e}function bL(n,t,e,i,r){const o=[];e.forEach(l=>o.push(vL(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=t.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Fo]=EQ,s.push(c))}),n.set(c,u)});let a=0;return e.forEach(l=>vL(l,o[a++])),s}function wL(n,t){const e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;const r=new Set(t),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=e.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return t.forEach(a=>{const l=s(a);1!==l&&e.get(l).push(a)}),e}function jo(n,t){n.classList?.add(t)}function Qd(n,t){n.classList?.remove(t)}function NQ(n,t,e){pl(e).onDone(()=>n.processLeaveNode(t))}function CL(n,t){for(let e=0;er.add(o)):t.set(n,i),e.delete(n),!0}class Cv{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new IQ(t,e,i),this._timelineEngine=new wQ(t,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){const s=t+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],u=JT(this._driver,o,l,[]);if(l.length)throw function vK(n,t){return new Q(3404,!1)}();a=function yQ(n,t,e){return new _Q(n,t,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){const[o,s]=K2(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=K2(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let FQ=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&js(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(js(this._element,this._initialStyles),this._endStyles&&(js(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Lc(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Lc(this._element,this._endStyles),this._endStyles=null),js(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function cM(n){let t=null;return n.forEach((e,i)=>{(function jQ(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}class TL{constructor(t,e,i,r){this.element=t,this.keyframes=e,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(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),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(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:cL(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class zQ{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return X2(t,e)}getParentElement(t){return WT(t)}query(t,e,i){return eL(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,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 TL);(function HK(n,t){return 0===n||0===t})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function zK(n){return n.length?n[0]instanceof Map?n:n.map(t=>rL(t)):[]}(e).map(f=>ml(f));d=function $K(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,cL(n,a)))}}return t}(t,d,c);const h=function RQ(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=cM(t[0]),t.length>1&&(i=cM(t[t.length-1]))):t instanceof Map&&(e=cM(t)),e||i?new FQ(n,e,i):null}(t,d);return new TL(t,d,l,h)}}let VQ=(()=>{class n extends U2{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:ne.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?H2(e):e;return ML(this._renderer,null,i,"register",[r]),new BQ(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(F($f),F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class BQ extends Qq{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new UQ(this._id,t,e||{},this._renderer)}}class UQ{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return ML(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}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(t){this._command("setPosition",t)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function ML(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}const SL="@.disabled";let HQ=(()=>{class n{constructor(e,i,r){this.delegate=e,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(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new EL("",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,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new $Q(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(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(e){return new(e||n)(F($f),F(Cv),F(qt))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class EL{constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==SL?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class $Q extends EL{constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==SL?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const r=function WQ(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function GQ(n){const t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}}let YQ=(()=>{class n extends Cv{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(F(Ln),F(GT),F(iM),F(Mc))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const xL=[{provide:U2,useClass:VQ},{provide:iM,useFactory:function qQ(){return new fQ}},{provide:Cv,useClass:YQ},{provide:$f,useFactory:function KQ(n,t,e){return new HQ(n,t,e)},deps:[R_,Cv,qt]}],uM=[{provide:GT,useFactory:()=>new zQ},{provide:Xk,useValue:"BrowserAnimations"},...xL],IL=[{provide:GT,useClass:tL},{provide:Xk,useValue:"NoopAnimations"},...xL];let QQ=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?IL:uM}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({providers:uM,imports:[_P]}),n})();class Lt{static equals(t,e,i){return i?this.resolveFieldData(t,i)===this.resolveFieldData(e,i):this.equalsByValue(t,e)}static equalsByValue(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var o,s,a,i=Array.isArray(t),r=Array.isArray(e);if(i&&r){if((s=t.length)!=e.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[o],e[o]))return!1;return!0}if(i!=r)return!1;var l=t instanceof Date,c=e instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==e.getTime();var u=t instanceof RegExp,d=e instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==e.toString();var h=Object.keys(t);if((s=h.length)!==Object.keys(e).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,h[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[a=h[o]],e[a]))return!1;return!0}return t!=t&&e!=e}static resolveFieldData(t,e){if(t&&e){if(this.isFunction(e))return e(t);if(-1==e.indexOf("."))return t[e];{let i=e.split("."),r=t;for(let o=0,s=i.length;o=t.length&&(i%=t.length,e%=t.length),t.splice(i,0,t.splice(e,1)[0]))}static insertIntoOrderedArray(t,e,i,r){if(i.length>0){let o=!1;for(let s=0;se){i.splice(s,0,t),o=!0;break}o||i.push(t)}else i.push(t)}static findIndexInList(t,e){let i=-1;if(e)for(let r=0;r-1&&(t=t.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")),t}static isEmpty(t){return null==t||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length}static isNotEmpty(t){return!this.isEmpty(t)}static compare(t,e,i,r=1){let o=-1;const s=this.isEmpty(t),a=this.isEmpty(e);return o=s&&a?0:s?r:a?-r:"string"==typeof t&&"string"==typeof e?t.localeCompare(e,i,{numeric:!0}):te?1:0,o}static sort(t,e,i=1,r,o=1){return(1===o?i:o)*Lt.compare(t,e,r,i)}static merge(t,e){if(null!=t||null!=e)return null!=t&&"object"!=typeof t||null!=e&&"object"!=typeof e?null!=t&&"string"!=typeof t||null!=e&&"string"!=typeof e?e||t:[t||"",e||""].join(" "):{...t||{},...e||{}}}}var OL=0;function AL(){return"pr_id_"+ ++OL}var gl=function ZQ(){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 kL=["*"];let NL=(()=>{class n{constructor(){this.requireConfirmationSource=new ae,this.acceptConfirmationSource=new ae,this.requireConfirmation$=this.requireConfirmationSource.asObservable(),this.accept=this.acceptConfirmationSource.asObservable()}confirm(e){return this.requireConfirmationSource.next(e),this}close(){return this.requireConfirmationSource.next(null),this}onAccept(){this.acceptConfirmationSource.next(null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),cr=(()=>{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})(),PL=(()=>{class n{constructor(){this.filters={startsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r);return Lt.removeAccents(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1!==Lt.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},notContains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1===Lt.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},endsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r),s=Lt.removeAccents(e.toString()).toLocaleLowerCase(r);return-1!==s.indexOf(o,s.length-o.length)},equals:(e,i,r)=>null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Lt.removeAccents(e.toString()).toLocaleLowerCase(r)==Lt.removeAccents(i.toString()).toLocaleLowerCase(r)),notEquals:(e,i,r)=>!(null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Lt.removeAccents(e.toString()).toLocaleLowerCase(r)==Lt.removeAccents(i.toString()).toLocaleLowerCase(r))),in:(e,i)=>{if(null==i||0===i.length)return!0;for(let r=0;rnull==i||null==i[0]||null==i[1]||null!=e&&(e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1]),lt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i),gt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>i.getTime():e>i),gte:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i),is:(e,i,r)=>this.filters.equals(e,i,r),isNot:(e,i,r)=>this.filters.notEquals(e,i,r),before:(e,i,r)=>this.filters.lt(e,i,r),after:(e,i,r)=>this.filters.gt(e,i,r),dateIs:(e,i)=>null==i||null!=e&&e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>null==i||null!=e&&e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>null==i||null!=e&&e.getTime()null==i||null!=e&&e.getTime()>i.getTime()}}filter(e,i,r,o,s){let a=[];if(e)for(let l of e)for(let c of i){let u=Lt.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}register(e,i){this.filters[e]=i}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),JQ=(()=>{class n{constructor(){this.messageSource=new ae,this.clearSource=new ae,this.messageObserver=this.messageSource.asObservable(),this.clearObserver=this.clearSource.asObservable()}add(e){e&&this.messageSource.next(e)}addAll(e){e&&e.length&&this.messageSource.next(e)}clear(e){this.clearSource.next(e||null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),XQ=(()=>{class n{constructor(){this.clickSource=new ae,this.clickObservable=this.clickSource.asObservable()}add(e){e&&this.clickSource.next(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Fc=(()=>{class n{constructor(){this.ripple=!1,this.overlayOptions={},this.filterMatchModeOptions={text:[cr.STARTS_WITH,cr.CONTAINS,cr.NOT_CONTAINS,cr.ENDS_WITH,cr.EQUALS,cr.NOT_EQUALS],numeric:[cr.EQUALS,cr.NOT_EQUALS,cr.LESS_THAN,cr.LESS_THAN_OR_EQUAL_TO,cr.GREATER_THAN,cr.GREATER_THAN_OR_EQUAL_TO],date:[cr.DATE_IS,cr.DATE_IS_NOT,cr.DATE_BEFORE,cr.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(e){return this.translation[e]}setTranslation(e){this.translation={...this.translation,...e},this.translationSource.next(this.translation)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),dM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["p-header"]],ngContentSelectors:kL,decls:1,vars:0,template:function(e,i){1&e&&(go(),Ri(0))},encapsulation:2}),n})(),hM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["p-footer"]],ngContentSelectors:kL,decls:1,vars:0,template:function(e,i){1&e&&(go(),Ri(0))},encapsulation:2}),n})(),qi=(()=>{class n{constructor(e){this.template=e}getType(){return this.name}}return n.\u0275fac=function(e){return new(e||n)(O(No))},n.\u0275dir=we({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),zo=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})(),jc=(()=>{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})(),Z=(()=>{class n{static addClass(e,i){e&&i&&(e.classList?e.classList.add(i):e.className+=" "+i)}static addMultipleClasses(e,i){if(e&&i)if(e.classList){let r=i.trim().split(" ");for(let o=0;o{if(m)return"relative"===getComputedStyle(m).getPropertyValue("position")?m:r(m.parentElement)},o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),s=i.offsetHeight,a=i.getBoundingClientRect(),l=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),u=this.getViewport(),h=r(e)?.getBoundingClientRect()||{top:-1*l,left:-1*c};let f,p;a.top+s+o.height>u.height?(f=a.top-h.top-o.height,e.style.transformOrigin="bottom",a.top+f<0&&(f=-1*a.top)):(f=s+a.top-h.top,e.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,e.style.top=f+"px",e.style.left=p+"px"}static absolutePosition(e,i){const r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),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,e.style.transformOrigin="bottom",f<0&&(f=u)):(f=a+c.top+u,e.style.transformOrigin="top"),p=c.left+s>h.width?Math.max(0,c.left+d+l-s):c.left+d,e.style.top=f+"px",e.style.left=p+"px"}static getParents(e,i=[]){return null===e.parentNode?i:this.getParents(e.parentNode,i.concat([e.parentNode]))}static getScrollableParents(e){let i=[];if(e){let r=this.getParents(e);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(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementDimensions(e){let i={};return e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",i}static scrollInView(e,i){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=e.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=e.scrollTop,h=e.clientHeight,f=this.getOuterHeight(i);u<0?e.scrollTop=d+u:u+f>h&&(e.scrollTop=d+u-h+f)}static fadeIn(e,i){e.style.opacity=0;let r=+new Date,o=0,s=function(){o=+e.style.opacity.replace(",",".")+((new Date).getTime()-r)/i,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,i){var r=1,a=50/i;let l=setInterval(()=>{(r-=a)<=0&&(r=0,clearInterval(l)),e.style.opacity=r},50)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,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(e,i)}static getOuterWidth(e,i){let r=e.offsetWidth;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let i=getComputedStyle(e);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(e){let i=getComputedStyle(e);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(e,i){let r=e.offsetHeight;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let e=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0];return{width:e.innerWidth||r.clientWidth||o.clientWidth,height:e.innerHeight||r.clientHeight||o.clientHeight}}static getOffset(e){var i=e.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(e,i){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,e)}static getUserAgent(){return navigator.userAgent}static isIE(){var e=window.navigator.userAgent;return e.indexOf("MSIE ")>0||(e.indexOf("Trident/")>0?(e.indexOf("rv:"),!0):e.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(e,i){if(this.isElement(i))i.appendChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot append "+i+" to "+e;i.el.nativeElement.appendChild(e)}}static removeChild(e,i){if(this.isElement(i))i.removeChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot remove "+e+" from "+i;i.el.nativeElement.removeChild(e)}}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}static calculateScrollbarWidth(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.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 e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(e,i,r){e[i].apply(e,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 e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return!e||null===e.offsetParent}static isVisible(e){return e&&null!=e.offsetParent}static isExist(e){return null!==e&&typeof e<"u"&&e.nodeName&&e.parentNode}static focus(e,i){e&&document.activeElement!==e&&e.focus(i)}static getFocusableElements(e){let i=n.find(e,'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(e,i=!1){const r=n.getFocusableElements(e);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(e,i){if(!e)return null;switch(e){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 e;if("string"===r)return document.querySelector(e);if("object"===r&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;const s=(a=e)&&a.constructor&&a.call&&a.apply?e():e;return s&&9===s.nodeType||this.isExist(s)?s:null}var a}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class LL{constructor(t,e=(()=>{})){this.element=t,this.listener=e}bindScrollListener(){this.scrollableParents=Z.getScrollableParents(this.element);for(let t=0;t{class n{constructor(e,i,r){this.el=e,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(e){let i=this.getInk();if(!i||"none"===getComputedStyle(i,null).display)return;if(Z.removeClass(i,"p-ink-active"),!Z.getHeight(i)&&!Z.getWidth(i)){let a=Math.max(Z.getOuterWidth(this.el.nativeElement),Z.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=Z.getOffset(this.el.nativeElement),o=e.pageX-r.left+document.body.scrollTop-Z.getWidth(i)/2,s=e.pageY-r.top+document.body.scrollLeft-Z.getHeight(i)/2;i.style.top=s+"px",i.style.left=o+"px",Z.addClass(i,"p-ink-active"),this.timeout=setTimeout(()=>{let a=this.getInk();a&&Z.removeClass(a,"p-ink-active")},401)}getInk(){const e=this.el.nativeElement.children;for(let i=0;i{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})();const eZ=["headerchkbox"],tZ=["filter"];function nZ(n,t){1&n&&_t(0)}function iZ(n,t){if(1&n&&(I(0,"div",7),Ri(1),M(2,nZ,1,0,"ng-container",8),A()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.headerTemplate)}}const RL=function(n){return{"p-checkbox-disabled":n}},rZ=function(n,t,e){return{"p-highlight":n,"p-focus":t,"p-disabled":e}},FL=function(n){return{"pi pi-check":n}};function oZ(n,t){if(1&n){const e=We();I(0,"div",12)(1,"div",13)(2,"input",14),ue("focus",function(){return de(e),he(D(2).onHeaderCheckboxFocus())})("blur",function(){return de(e),he(D(2).onHeaderCheckboxBlur())})("keydown.space",function(r){return de(e),he(D(2).toggleAll(r))}),A()(),I(3,"div",15,16),ue("click",function(r){return de(e),he(D(2).toggleAll(r))}),_e(5,"span",17),A()()}if(2&n){const e=D(2);v("ngClass",Mt(5,RL,e.disabled||e.toggleAllDisabled)),C(2),v("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),C(1),v("ngClass",al(7,rZ,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),C(2),v("ngClass",Mt(11,FL,e.allChecked))}}function sZ(n,t){1&n&&_t(0)}const aZ=function(n){return{options:n}};function lZ(n,t){if(1&n&&(dt(0),M(1,sZ,1,0,"ng-container",18),ht()),2&n){const e=D(2);C(1),v("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",Mt(2,aZ,e.filterOptions))}}function cZ(n,t){if(1&n){const e=We();I(0,"div",20)(1,"input",21,22),ue("input",function(r){return de(e),he(D(3).onFilter(r))}),A(),_e(3,"span",23),A()}if(2&n){const e=D(3);C(1),v("value",e.filterValue||"")("disabled",e.disabled),Ot("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function uZ(n,t){1&n&&M(0,cZ,4,4,"div",19),2&n&&v("ngIf",D(2).filter)}function dZ(n,t){if(1&n&&(I(0,"div",7),M(1,oZ,6,13,"div",9),M(2,lZ,2,4,"ng-container",10),M(3,uZ,1,1,"ng-template",null,11,Bn),A()),2&n){const e=Dn(4),i=D();C(1),v("ngIf",i.checkbox&&i.multiple&&i.showToggleAll),C(1),v("ngIf",i.filterTemplate)("ngIfElse",e)}}function hZ(n,t){if(1&n&&(I(0,"span"),ke(1),A()),2&n){const e=D().$implicit,i=D(2);C(1),At(i.getOptionGroupLabel(e)||"empty")}}function fZ(n,t){1&n&&_t(0)}function pZ(n,t){1&n&&_t(0)}const fM=function(n){return{$implicit:n}};function mZ(n,t){if(1&n&&(I(0,"li",25),M(1,hZ,2,1,"span",3),M(2,fZ,1,0,"ng-container",18),A(),M(3,pZ,1,0,"ng-container",18)),2&n){const e=t.$implicit,i=D(2),r=Dn(8);C(1),v("ngIf",!i.groupTemplate),C(1),v("ngTemplateOutlet",i.groupTemplate)("ngTemplateOutletContext",Mt(5,fM,e)),C(1),v("ngTemplateOutlet",r)("ngTemplateOutletContext",Mt(7,fM,i.getOptionGroupChildren(e)))}}function gZ(n,t){if(1&n&&(dt(0),M(1,mZ,4,9,"ng-template",24),ht()),2&n){const e=D();C(1),v("ngForOf",e.optionsToRender)}}function yZ(n,t){1&n&&_t(0)}function _Z(n,t){if(1&n&&(dt(0),M(1,yZ,1,0,"ng-container",18),ht()),2&n){const e=D(),i=Dn(8);C(1),v("ngTemplateOutlet",i)("ngTemplateOutletContext",Mt(2,fM,e.optionsToRender))}}const vZ=function(n){return{"p-highlight":n}};function bZ(n,t){if(1&n&&(I(0,"div",12)(1,"div",28),_e(2,"span",17),A()()),2&n){const e=D().$implicit,i=D(2);v("ngClass",Mt(3,RL,i.disabled||i.isOptionDisabled(e))),C(1),v("ngClass",Mt(5,vZ,i.isSelected(e))),C(1),v("ngClass",Mt(7,FL,i.isSelected(e)))}}function wZ(n,t){if(1&n&&(I(0,"span"),ke(1),A()),2&n){const e=D().$implicit,i=D(2);C(1),At(i.getOptionLabel(e))}}function CZ(n,t){1&n&&_t(0)}const DZ=function(n,t){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":t}},TZ=function(n,t){return{$implicit:n,index:t}};function MZ(n,t){if(1&n){const e=We();I(0,"li",27),ue("click",function(r){const s=de(e).$implicit;return he(D(2).onOptionClick(r,s))})("dblclick",function(r){const s=de(e).$implicit;return he(D(2).onOptionDoubleClick(r,s))})("touchend",function(){const o=de(e).$implicit;return he(D(2).onOptionTouchEnd(o))})("keydown",function(r){const s=de(e).$implicit;return he(D(2).onOptionKeyDown(r,s))}),M(1,bZ,3,9,"div",9),M(2,wZ,2,1,"span",3),M(3,CZ,1,0,"ng-container",18),A()}if(2&n){const e=t.$implicit,i=t.index,r=D(2);v("ngClass",bi(8,DZ,r.isSelected(e),r.isOptionDisabled(e))),Ot("tabindex",r.disabled||r.isOptionDisabled(e)?null:"0")("aria-label",r.getOptionLabel(e))("aria-selected",r.isSelected(e)),C(1),v("ngIf",r.checkbox&&r.multiple),C(1),v("ngIf",!r.itemTemplate),C(1),v("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",bi(11,TZ,e,i))}}function SZ(n,t){1&n&&M(0,MZ,4,14,"li",26),2&n&&v("ngForOf",t.$implicit)}function EZ(n,t){if(1&n&&(dt(0),ke(1),ht()),2&n){const e=D(2);C(1),Yi(" ",e.emptyFilterMessageLabel," ")}}function xZ(n,t){1&n&&_t(0,null,30)}function IZ(n,t){if(1&n&&(I(0,"li",29),M(1,EZ,2,1,"ng-container",10),M(2,xZ,2,0,"ng-container",8),A()),2&n){const e=D();C(1),v("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),C(1),v("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function OZ(n,t){if(1&n&&(dt(0),ke(1),ht()),2&n){const e=D(2);C(1),Yi(" ",e.emptyMessageLabel," ")}}function AZ(n,t){1&n&&_t(0,null,31)}function kZ(n,t){if(1&n&&(I(0,"li",29),M(1,OZ,2,1,"ng-container",10),M(2,AZ,2,0,"ng-container",8),A()),2&n){const e=D();C(1),v("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),C(1),v("ngTemplateOutlet",e.emptyTemplate)}}function NZ(n,t){1&n&&_t(0)}function PZ(n,t){if(1&n&&(I(0,"div",32),Ri(1,1),M(2,NZ,1,0,"ng-container",8),A()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.footerTemplate)}}const LZ=[[["p-header"]],[["p-footer"]]],RZ=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},FZ=["p-header","p-footer"],jZ={provide:Sr,useExisting:Ut(()=>jL),multi:!0};let jL=(()=>{class n{constructor(e,i,r,o){this.el=e,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(e){this._options=e,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.filterBy&&(this.filterOptions={filter:e=>this.onFilter(e),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template}})}getOptionLabel(e){return this.optionLabel?Lt.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Lt.resolveFieldData(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?Lt.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Lt.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Lt.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(e,i):this.onOptionClickMultiple(e,i):this.onOptionClickSingle(e,i),this.onClick.emit({originalEvent:e,option:i,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(e){this.disabled||this.isOptionDisabled(e)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||this.onDblClick.emit({originalEvent:e,option:i,value:this.value})}onOptionClickSingle(e,i){let r=this.isSelected(i),o=!1;!this.optionTouched&&this.metaKeySelection?r?(e.metaKey||e.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:e,value:this.value}))}onOptionClickMultiple(e,i){let r=this.isSelected(i),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=e.metaKey||e.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:e,value:this.value}))}onOptionClickCheckbox(e,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:e,value:this.value}))}removeOption(e){this.value=this.value.filter(i=>!Lt.equals(i,this.getOptionValue(e),this.dataKey))}isSelected(e){let i=!1,r=this.getOptionValue(e);if(this.multiple){if(this.value)for(let o of this.value)if(Lt.equals(o,r,this.dataKey)){i=!0;break}}else i=Lt.equals(this.value,r,this.dataKey);return i}get allChecked(){let e=this.optionsToRender;if(!e||0===e.length)return!1;{let i=0,r=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of e)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(jc.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(jc.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(){return!this.optionsToRender||this.optionsToRender&&0===this.optionsToRender.length}onFilter(e){this._filterValue=e.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=(this.filterBy||this.optionLabel||"label").split(","),i=[];for(let r of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(r),e,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&i.push({...r,[this.optionGroupChildren]:o})}this._filteredOptions=i}else this._filteredOptions=this._options.filter(e=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(e),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 e=this.optionsToRender;if(!e||0===e.length)return!0;for(let i of e)if(!this.isOptionDisabled(i))return!1;return!0}toggleAll(e){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),e.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(e,i){if(this.readonly)return;let r=e.currentTarget;switch(e.which){case 40:var o=this.findNextItem(r);o&&o.focus(),e.preventDefault();break;case 38:var s=this.findPrevItem(r);s&&s.focus(),e.preventDefault();break;case 13:this.onOptionClick(e,i),e.preventDefault()}}findNextItem(e){let i=e.nextElementSibling;return i?Z.hasClass(i,"p-disabled")||Z.isHidden(i)||Z.hasClass(i,"p-listbox-item-group")?this.findNextItem(i):i:null}findPrevItem(e){let i=e.previousElementSibling;return i?Z.hasClass(i,"p-disabled")||Z.isHidden(i)||Z.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(e){return new(e||n)(O(Tt),O(Un),O(PL),O(Fc))},n.\u0275cmp=Me({type:n,selectors:[["p-listbox"]],contentQueries:function(e,i,r){if(1&e&&(Jn(r,dM,5),Jn(r,hM,5),Jn(r,qi,4)),2&e){let o;Ke(o=Qe())&&(i.headerFacet=o.first),Ke(o=Qe())&&(i.footerFacet=o.first),Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(eZ,5),en(tZ,5)),2&e){let r;Ke(r=Qe())&&(i.headerCheckboxViewChild=r.first),Ke(r=Qe())&&(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:[Pt([jZ])],ngContentSelectors:FZ,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(e,i){1&e&&(go(LZ),I(0,"div",0),M(1,iZ,3,1,"div",1),M(2,dZ,5,3,"div",1),I(3,"div",0)(4,"ul",2),M(5,gZ,2,1,"ng-container",3),M(6,_Z,2,4,"ng-container",3),M(7,SZ,1,1,"ng-template",null,4,Bn),M(9,IZ,3,3,"li",5),M(10,kZ,3,3,"li",5),A()(),M(11,PZ,3,1,"div",6),A()),2&e&&(pn(i.styleClass),v("ngClass",Mt(16,RZ,i.disabled))("ngStyle",i.style),C(1),v("ngIf",i.headerFacet||i.headerTemplate),C(1),v("ngIf",i.checkbox&&i.multiple&&i.showToggleAll||i.filter),C(1),pn(i.listStyleClass),v("ngClass","p-listbox-list-wrapper")("ngStyle",i.listStyle),C(1),Ot("aria-multiselectable",i.multiple),C(1),v("ngIf",i.group),C(1),v("ngIf",!i.group),C(3),v("ngIf",i.hasFilter()&&i.isEmpty()),C(1),v("ngIf",!i.hasFilter()&&i.isEmpty()),C(1),v("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[fi,Gr,Kt,_o,sr,zc],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})(),pM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,zo,Pa,zo]}),n})();function zZ(n,t){1&n&&_t(0)}const VZ=function(n,t,e,i){return{"p-button-icon":!0,"p-button-icon-left":n,"p-button-icon-right":t,"p-button-icon-top":e,"p-button-icon-bottom":i}};function BZ(n,t){if(1&n&&_e(0,"span",4),2&n){const e=D();pn(e.loading?"p-button-loading-icon "+e.loadingIcon:e.icon),v("ngClass",Rd(4,VZ,"left"===e.iconPos&&e.label,"right"===e.iconPos&&e.label,"top"===e.iconPos&&e.label,"bottom"===e.iconPos&&e.label)),Ot("aria-hidden",!0)}}function UZ(n,t){if(1&n&&(I(0,"span",5),ke(1),A()),2&n){const e=D();Ot("aria-hidden",e.icon&&!e.label),C(1),At(e.label)}}function HZ(n,t){if(1&n&&(I(0,"span",4),ke(1),A()),2&n){const e=D();pn(e.badgeClass),v("ngClass",e.badgeStyleClass()),C(1),At(e.badge)}}const $Z=function(n,t,e,i,r){return{"p-button p-component":!0,"p-button-icon-only":n,"p-button-vertical":t,"p-disabled":e,"p-button-loading":i,"p-button-loading-label-only":r}},WZ=["*"],Vc={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 Vo=(()=>{class n{constructor(e){this.el=e,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1,this._internalClasses=Object.values(Vc)}get label(){return this._label}set label(e){this._label=e,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get htmlElement(){return this.el.nativeElement}ngAfterViewInit(){Z.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){const e=[Vc.button,Vc.component];return this.icon&&!this.label&&Lt.isEmpty(this.htmlElement.textContent)&&e.push(Vc.iconOnly),this.loading&&(e.push(Vc.disabled,Vc.loading),!this.icon&&this.label&&e.push(Vc.labelOnly)),e}setStyleClass(){const e=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...e)}createLabel(){if(this.label){let e=document.createElement("span");this.icon&&!this.label&&e.setAttribute("aria-hidden","true"),e.className="p-button-label",e.appendChild(document.createTextNode(this.label)),this.htmlElement.appendChild(e)}}createIcon(){if(this.icon||this.loading){let e=document.createElement("span");e.className="p-button-icon",e.setAttribute("aria-hidden","true");let i=this.label?"p-button-icon-"+this.iconPos:null;i&&Z.addClass(e,i);let r=this.getIconClass();r&&Z.addMultipleClasses(e,r),this.htmlElement.insertBefore(e,this.htmlElement.firstChild)}}updateLabel(){let e=Z.findSingle(this.htmlElement,".p-button-label");this.label?e?e.textContent=this.label:this.createLabel():e&&this.htmlElement.removeChild(e)}updateIcon(){let e=Z.findSingle(this.htmlElement,".p-button-icon");this.icon||this.loading?e?e.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIcon():e&&this.htmlElement.removeChild(e)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}ngOnDestroy(){this.initialized=!1}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275dir=we({type:n,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),n})(),zL=(()=>{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(e=>{e.getType(),this.contentTemplate=e.template})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&1===String(this.badge).length}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["p-button"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(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:WZ,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(e,i){1&e&&(go(),I(0,"button",0),ue("click",function(o){return i.onClick.emit(o)})("focus",function(o){return i.onFocus.emit(o)})("blur",function(o){return i.onBlur.emit(o)}),Ri(1),M(2,zZ,1,0,"ng-container",1),M(3,BZ,1,9,"span",2),M(4,UZ,2,2,"span",3),M(5,HZ,2,4,"span",2),A()),2&e&&(pn(i.styleClass),v("ngStyle",i.style)("disabled",i.disabled||i.loading)("ngClass",function _k(n,t,e,i,r,o,s,a){const l=br()+n,c=oe(),u=ko(c,l,e,i,r,o);return or(c,l+4,s)||u?As(c,l+5,a?t.call(a,e,i,r,o,s):t(e,i,r,o,s)):qf(c,l+5)}(11,$Z,i.icon&&!i.label,("top"===i.iconPos||"bottom"===i.iconPos)&&i.label,i.disabled||i.loading,i.loading,i.loading&&!i.icon&&i.label)),Ot("type",i.type)("aria-label",i.ariaLabel),C(2),v("ngTemplateOutlet",i.contentTemplate),C(1),v("ngIf",!i.contentTemplate&&(i.icon||i.loading)),C(1),v("ngIf",!i.contentTemplate&&i.label),C(1),v("ngIf",!i.contentTemplate&&i.badge))},dependencies:[fi,Kt,_o,sr,zc],encapsulation:2,changeDetection:0}),n})(),Bo=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,Pa]}),n})();function qr(n){return n instanceof Tt?n.nativeElement:n}function Tv(n,t,e,i){return k(e)&&(i=e,e=void 0),i?Tv(n,t,e).pipe(fe(r=>R(r)?i(...r):i(r))):new Se(r=>{BL(n,t,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function BL(n,t,e,i,r){let o;if(function QZ(n){return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener}(n)){const s=n;n.addEventListener(t,e,r),o=()=>s.removeEventListener(t,e,r)}else if(function KZ(n){return n&&"function"==typeof n.on&&"function"==typeof n.off}(n)){const s=n;n.on(t,e),o=()=>s.off(t,e)}else if(function qZ(n){return n&&"function"==typeof n.addListener&&"function"==typeof n.removeListener}(n)){const s=n;n.addListener(t,e),o=()=>s.removeListener(t,e)}else{if(!n||!n.length)throw new TypeError("Invalid event target");for(let s=0,a=n.length;s0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}});let XZ=1;const eJ=Promise.resolve(),Mv={};function HL(n){return n in Mv&&(delete Mv[n],!0)}const $L={setImmediate(n){const t=XZ++;return Mv[t]=!0,eJ.then(()=>HL(t)&&n()),t},clearImmediate(n){HL(n)}},mM=new class nJ extends ms{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++r0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=$L.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&($L.clearImmediate(e),t.scheduled=void 0)}}),Zd=new ms(V_);class rJ{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new oJ(t,this.durationSelector))}}class oJ extends es{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let e;try{const{durationSelector:r}=this;e=r(t)}catch(r){return this.destination.error(r)}const i=ic(e,new Hn(this));!i||i.closed?this.clearThrottle():this.add(this.throttled=i)}}clearThrottle(){const{value:t,hasValue:e,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function gM(n){return!R(n)&&n-parseFloat(n)+1>=0}function WL(n=0,t,e){let i=-1;return gM(t)?i=Number(t)<1?1:Number(t):Ti(t)&&(e=t),Ti(e)||(e=Zd),new Se(r=>{const o=gM(n)?n:+n-e.now();return e.schedule(sJ,o,{index:0,period:i,subscriber:r})})}function sJ(n){const{index:t,period:e,subscriber:i}=n;if(i.next(t),!i.closed){if(-1===e)return i.complete();n.index=t+1,this.schedule(n,e)}}let yM;try{yM=typeof Intl<"u"&&Intl.v8BreakIterator}catch{yM=!1}let Mp,_M,YL=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function ZW(n){return n===KN}(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&&!yM)&&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(e){return new(e||n)(F(p_))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Sp(n){return function aJ(){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 KL(n){if(function lJ(){if(null==_M){const n=typeof document<"u"?document.head:null;_M=!(!n||!n.createShadowRoot&&!n.attachShadow)}return _M}()){const t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Ev(n){return n.composedPath?n.composedPath()[0]:n.target}let hJ=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new ae,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.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 e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect();return{top:-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(function GL(n,t=Zd){return function iJ(n){return function(e){return e.lift(new rJ(n))}}(()=>WL(n,t))}(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(F(YL),F(qt),F(Ln,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),fJ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({}),n})();function _l(){}function hn(n,t,e){return function(r){return r.lift(new NJ(n,t,e))}}class NJ{constructor(t,e,i){this.nextOrObserver=t,this.error=e,this.complete=i}call(t,e){return e.subscribe(new PJ(t,this.nextOrObserver,this.error,this.complete))}}class PJ extends te{constructor(t,e,i,r){super(t),this._tapNext=_l,this._tapError=_l,this._tapComplete=_l,this._tapError=i||_l,this._tapComplete=r||_l,k(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||_l,this._tapError=e.error||_l,this._tapComplete=e.complete||_l)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}function Xd(n,t=Zd){return e=>e.lift(new LJ(n,t))}class LJ{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new RJ(t,this.dueTime,this.scheduler))}}class RJ extends te{constructor(t,e,i){super(t),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(FJ,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function FJ(n){n.debouncedNext()}class VJ{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new ae,this._typeaheadSubscription=se.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new ae,this.change=new ae,t instanceof rp&&(this._itemChangesSubscription=t.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(hn(e=>this._pressedLetters.push(e)),Xd(t),Tn(()=>this._pressedLetters.length>0),fe(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){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[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.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(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof rp?this._items.toArray():this._items}}class JL extends VJ{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}function QJ(n){const{subscriber:t,counter:e,period:i}=n;t.next(e),this.schedule({subscriber:t,counter:e+1,period:i},i)}function mn(n){return t=>t.lift(new ZJ(n))}class ZJ{constructor(t){this.notifier=t}call(t,e){const i=new JJ(t),r=ic(this.notifier,new Hn(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class JJ extends es{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function vM(...n){return function XJ(){return Za(1)}()(Le(...n))}const eR=(()=>{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 Et(n){return t=>0===n?B_():t.lift(new eX(n))}class eX{constructor(t){if(this.total=t,this.total<0)throw new eR}call(t,e){return e.subscribe(new tX(t,this.total))}}class tX extends te{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))}}function bM(n,t,e){for(let i in t)if(t.hasOwnProperty(i)){const r=t[i];r?n.setProperty(i,r,e?.has(i)?"important":""):n.removeProperty(i)}return n}function eh(n,t){const e=t?"":"none";bM(n.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function nR(n,t,e){bM(n.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function Iv(n,t){return t&&"none"!=t?n+" "+t:n}function iR(n){const t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function wM(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function CM(n){const t=n.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function DM(n,t,e){const{top:i,bottom:r,left:o,right:s}=n;return e>=i&&e<=r&&t>=o&&t<=s}function Ep(n,t,e){n.top+=t,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function rR(n,t,e,i){const{top:r,right:o,bottom:s,left:a,width:l,height:c}=n,u=l*t,d=c*t;return i>r-d&&ia-u&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:CM(e)})})}handleScroll(t){const e=Ev(t),i=this.positions.get(e);if(!i)return null;const r=i.scrollPosition;let o,s;if(e===this._document){const c=this.getViewportScrollPosition();o=c.top,s=c.left}else o=e.scrollTop,s=e.scrollLeft;const a=r.top-o,l=r.left-s;return this.positions.forEach((c,u)=>{c.clientRect&&e!==u&&e.contains(u)&&Ep(c.clientRect,a,l)}),r.top=o,r.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function sR(n){const t=n.cloneNode(!0),e=t.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();t.removeAttribute("id");for(let r=0;reh(i,e)))}constructor(t,e,i,r,o,s){this._config=e,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=se.EMPTY,this._pointerUpSubscription=se.EMPTY,this._scrollSubscription=se.EMPTY,this._resizeSubscription=se.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(t).withParent(e.parentDragRef||null),this._parentPositions=new oR(i),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>qr(i)),this._handles.forEach(i=>eh(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=qr(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,Ov),e.addEventListener("touchstart",this._pointerDown,uR),e.addEventListener("dragstart",this._nativeDragStart,Ov)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?qr(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,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(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),eh(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),eh(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_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(t){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:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){xp(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){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(),nR(i,!1,TM),this._document.body.appendChild(r.replaceChild(o,i)),this._getPreviewInsertionPoint(r,a).appendChild(this._preview),this.started.next({source:this,event:t}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),r=xp(e),o=!r&&0!==e.button,s=this._rootElement,a=Ev(e),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=r?function YJ(n){const t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}(e):function GJ(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}(e);if(a&&a.draggable&&"mousedown"===e.type&&e.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=CM(this._boundaryElement));const u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,t,e);const d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){nR(this._rootElement,!0,TM),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 e=this._dropContainer,i=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),o=this._getDragDistance(r),s=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,s,o,r,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(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,t,e,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,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let r;if(i&&t){const o=t.matchSize?this._initialClientRect:null,s=t.viewContainer.createEmbeddedView(i,t.context);s.detectChanges(),r=hR(s,this._document),this._previewRef=s,t.matchSize?fR(r,o):r.style.transform=Av(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=sR(this._rootElement),fR(r,this._initialClientRect),this._initialTransform&&(r.style.transform=this._initialTransform);return bM(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},TM),eh(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>r.classList.add(o)):r.classList.add(e)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);const e=function sX(n){const t=getComputedStyle(n),e=wM(t,"transition-property"),i=e.find(a=>"transform"===a||"all"===a);if(!i)return 0;const r=e.indexOf(i),o=wM(t,"transition-duration"),s=wM(t,"transition-delay");return iR(o[r])+iR(s[r])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const r=s=>{(!s||Ev(s)===this._preview&&"transform"===s.propertyName)&&(this._preview?.removeEventListener("transitionend",r),i(),clearTimeout(o))},o=setTimeout(r,1.5*e);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=hR(this._placeholderRef,this._document)):i=sR(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e,i){const r=e===this._rootElement?null:e,o=r?r.getBoundingClientRect():t,s=xp(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:o.left-t.left+(s.pageX-o.left-a.left),y:o.top-t.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=xp(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=i.pageX-e.left,o=i.pageY-e.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(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:r}=this.constrainPosition?this.constrainPosition(t,this,this._initialClientRect,this._pickupPositionInElement):t;if("x"===this.lockAxis||"x"===e?r=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(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=dR(i,a.left+o,a.right-(l-o)),r=dR(r,u,d)}return{x:i,y:r}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-o.x),a=Math.abs(i-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>o.y?1:-1,o.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,eh(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,Ov),t.removeEventListener("touchstart",this._pointerDown,uR),t.removeEventListener("dragstart",this._nativeDragStart,Ov)}_applyRootElementTransform(t,e){const i=Av(t,e),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=Iv(i,this._initialTransform)}_applyPreviewTransform(t,e){const i=this._previewTemplate?.template?void 0:this._initialTransform,r=Av(t,e);this._preview.style.transform=Iv(r,i)}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||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&&(t+=o),s>0&&(t-=s)):t=0,r.height>i.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:xp(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=Ev(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&Ep(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.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=KL(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){const i=this._previewContainer||"global";if("parent"===i)return t;if("global"===i){const r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return qr(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}}function Av(n,t){return`translate3d(${Math.round(n)}px, ${Math.round(t)}px, 0)`}function dR(n,t,e){return Math.max(t,Math.min(e,n))}function xp(n){return"t"===n.type[0]}function hR(n,t){const e=n.rootNodes;if(1===e.length&&e[0].nodeType===t.ELEMENT_NODE)return e[0];const i=t.createElement("div");return e.forEach(r=>i.appendChild(r)),i}function fR(n,t){n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n.style.transform=Av(t.left,t.top)}function Ip(n,t){return Math.max(0,Math.min(t,n))}class dX{constructor(t,e){this._element=t,this._dragDropRegistry=e,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(t){this.withItems(t)}sort(t,e,i,r){const o=this._itemPositions,s=this._getItemIndexFromPointerPosition(t,e,i,r);if(-1===s&&o.length>0)return null;const a="horizontal"===this.orientation,l=o.findIndex(g=>g.drag===t),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 uX(n,t,e){const i=Ip(t,n.length-1),r=Ip(e,n.length-1);if(i===r)return;const o=n[i],s=r{if(m[y]===g)return;const b=g.drag===t,w=b?f:p,_=b?t.getPlaceholderElement():g.drag.getRootElement();g.offset+=w,a?(_.style.transform=Iv(`translate3d(${Math.round(g.offset)}px, 0, 0)`,g.initialTransform),Ep(g.clientRect,0,w)):(_.style.transform=Iv(`translate3d(0, ${Math.round(g.offset)}px, 0)`,g.initialTransform),Ep(g.clientRect,w,0))}),this._previousSwap.overlaps=DM(d,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:s}}enter(t,e,i,r){const o=null==r||r<0?this._getItemIndexFromPointerPosition(t,e,i):r,s=this._activeDraggables,a=s.indexOf(t),l=t.getPlaceholderElement();let c=s[o];if(c===t&&(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,t)}else qr(this._element).appendChild(l),s.push(t);l.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables.forEach(t=>{const e=t.getRootElement();if(e){const i=this._itemPositions.find(r=>r.drag===t)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{Ep(i,t,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const t="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:CM(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(t,e,i){const r="horizontal"===this.orientation;let o=r?e.left-t.left:e.top-t.top;return-1===i&&(o+=r?e.width-t.width:e.height-t.height),o}_getSiblingOffsetPx(t,e,i){const r="horizontal"===this.orientation,o=e[t].clientRect,s=e[t+-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(t,e){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?t>=s.right:e>=s.bottom}{const s=i[0].clientRect;return r?t<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(t,e,i,r){const o="horizontal"===this.orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>a!==t&&((!r||a!==this._previousSwap.drag||!this._previousSwap.overlaps||(o?r.x:r.y)!==this._previousSwap.delta)&&(o?e>=Math.floor(l.left)&&e=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=se.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new ae,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function KJ(n=0,t=Zd){return(!gM(n)||n<0)&&(n=0),(!t||"function"!=typeof t.schedule)&&(t=Zd),new Se(e=>(e.add(t.schedule(QJ,n,{subscriber:e,counter:0,period:n})),e))}(0,UL).pipe(mn(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=qr(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new oR(i),this._sortStrategy=new dX(this.element,e),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(t,e,i,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,r,o,s,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:l})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(r=>r.isDragging()).every(r=>-1===t.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._sortStrategy.direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._sortStrategy.orientation=t,this}withScrollableParents(t){const e=qr(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,r){if(this.sortingDisabled||!this._clientRect||!rR(this._clientRect,.05,e,i))return;const o=this._sortStrategy.sort(t,e,i,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,r=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||i||rR(s.clientRect,.05,t,e)&&([r,o]=function fX(n,t,e,i){const r=gR(t,i),o=yR(t,e);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,t,e),(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=gR(l,e),o=yR(l,t),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 t=qr(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const t=qr(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_reset(){this._isDragging=!1;const t=qr(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(t,e){return null!=this._clientRect&&DM(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(r=>r._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._clientRect||!DM(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const r=this._getShadowRoot().elementFromPoint(e,i);if(!r)return!1;const o=qr(this.element);return r===o||o.contains(r)}_startReceiving(t,e){const i=this._activeSiblings;!i.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=KL(qr(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}}function gR(n,t){const{top:e,bottom:i,height:r}=n,o=.05*r;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}function yR(n,t){const{left:e,right:i,width:r}=n,o=.05*r;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}const kv=Sp({passive:!1,capture:!0});let pX=(()=>{class n{constructor(e,i){this._ngZone=e,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(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,kv)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,kv)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),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:kv}),r||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:kv}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new Se(r=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&r.next(a)};return e.addEventListener("scroll",s,!0),()=>{e.removeEventListener("scroll",s,!0)}}))),ws(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(e){return new(e||n)(F(qt),F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const mX={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let MM=(()=>{class n{constructor(e,i,r,o){this._document=e,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=o}createDrag(e,i=mX){return new cX(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new hX(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(e){return new(e||n)(F(Ln),F(qt),F(hJ),F(pX))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),CR=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({providers:[MM],imports:[fJ]}),n})(),IM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,Bo,zo,Pa,CR,zo,CR]}),n})();const jX=["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"],qX=new dT(document),DR=[...Array(6).keys()].map(n=>{const t=n+1;return{label:`Heading ${t}`,icon:zs(jX[n]||""),id:`heading${t}`,attributes:{level:t}}}),OM={label:"Paragraph",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"},TR=[{label:"List Ordered",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"}],JX=[{label:"AI Content",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjA4NDEgOC43MjQ5M0wxMi41MjIgOS41MDc0MkMxMi40NTU2IDkuNTI3NjggMTIuMzk3MiA5LjU2OTczIDEyLjM1NTcgOS42MjcyOEMxMi4zMTQyIDkuNjg0ODMgMTIuMjkxOCA5Ljc1NDc4IDEyLjI5MTggOS44MjY2NkMxMi4yOTE4IDkuODk4NTQgMTIuMzE0MiA5Ljk2ODQ5IDEyLjM1NTcgMTAuMDI2QzEyLjM5NzIgMTAuMDgzNiAxMi40NTU2IDEwLjEyNTYgMTIuNTIyIDEwLjE0NTlMMTUuMDg0MSAxMC45Mjg0TDE1LjgzODEgMTMuNTg3M0MxNS44NTc3IDEzLjY1NjIgMTUuODk4MiAxMy43MTY4IDE1Ljk1MzYgMTMuNzU5OEMxNi4wMDkxIDEzLjgwMjkgMTYuMDc2NSAxMy44MjYyIDE2LjE0NTcgMTMuODI2MkMxNi4yMTUgMTMuODI2MiAxNi4yODI0IDEzLjgwMjkgMTYuMzM3OCAxMy43NTk4QzE2LjM5MzMgMTMuNzE2OCAxNi40MzM4IDEzLjY1NjIgMTYuNDUzMyAxMy41ODczTDE3LjIwNzcgMTAuOTI4NEwxOS43Njk3IDEwLjE0NTlDMTkuODM2MiAxMC4xMjU2IDE5Ljg5NDYgMTAuMDgzNiAxOS45MzYxIDEwLjAyNkMxOS45Nzc2IDkuOTY4NDkgMjAgOS44OTg1NCAyMCA5LjgyNjY2QzIwIDkuNzU0NzggMTkuOTc3NiA5LjY4NDgzIDE5LjkzNjEgOS42MjcyOEMxOS44OTQ2IDkuNTY5NzMgMTkuODM2MiA5LjUyNzY4IDE5Ljc2OTcgOS41MDc0MkwxNy4yMDc3IDguNzI0OTNMMTYuNDUzMyA2LjA2NjA0QzE2LjQzMzggNS45OTcwNyAxNi4zOTMzIDUuOTM2NTIgMTYuMzM3OCA1Ljg5MzQ1QzE2LjI4MjQgNS44NTAzNyAxNi4yMTUgNS44MjcwOSAxNi4xNDU3IDUuODI3MDlDMTYuMDc2NSA1LjgyNzA5IDE2LjAwOTEgNS44NTAzNyAxNS45NTM2IDUuODkzNDVDMTUuODk4MiA1LjkzNjUyIDE1Ljg1NzYgNS45OTcwNyAxNS44MzgxIDYuMDY2MDRMMTUuMDg0MSA4LjcyNDkzWiIgZmlsbD0iIzhEOTJBNSIvPgo8cGF0aCBkPSJNMTguMjE4NSAzLjk1MjMzTDE5LjYwODQgMy41Mjc0M0MxOS42NzQ5IDMuNTA3MTYgMTkuNzMzMiAzLjQ2NTExIDE5Ljc3NDcgMy40MDc1N0MxOS44MTYyIDMuMzUwMDIgMTkuODM4NiAzLjI4MDA4IDE5LjgzODYgMy4yMDgyQzE5LjgzODYgMy4xMzYzMyAxOS44MTYyIDMuMDY2MzggMTkuNzc0NyAzLjAwODg0QzE5LjczMzIgMi45NTEyOSAxOS42NzQ5IDIuOTA5MjQgMTkuNjA4NCAyLjg4ODk4TDE4LjIxODUgMi40NjQ0MUwxNy44MDkxIDEuMDIxNjdDMTcuNzg5NiAwLjk1MjY5OCAxNy43NDkxIDAuODkyMTQ0IDE3LjY5MzYgMC44NDkwNjlDMTcuNjM4MiAwLjgwNTk5NSAxNy41NzA3IDAuNzgyNzE1IDE3LjUwMTUgMC43ODI3MTVDMTcuNDMyMiAwLjc4MjcxNSAxNy4zNjQ4IDAuODA1OTk1IDE3LjMwOTQgMC44NDkwNjlDMTcuMjUzOSAwLjg5MjE0NCAxNy4yMTM0IDAuOTUyNjk4IDE3LjE5MzkgMS4wMjE2N0wxNi43ODQ4IDIuNDY0NDFMMTUuMzk0NiAyLjg4ODk4QzE1LjMyODEgMi45MDkyMyAxNS4yNjk4IDIuOTUxMjggMTUuMjI4MyAzLjAwODgzQzE1LjE4NjcgMy4wNjYzNyAxNS4xNjQzIDMuMTM2MzIgMTUuMTY0MyAzLjIwODJDMTUuMTY0MyAzLjI4MDA4IDE1LjE4NjcgMy4zNTAwMyAxNS4yMjgzIDMuNDA3NThDMTUuMjY5OCAzLjQ2NTEyIDE1LjMyODEgMy41MDcxNyAxNS4zOTQ2IDMuNTI3NDNMMTYuNzg0OCAzLjk1MjMzTDE3LjE5MzkgNS4zOTQ3NEMxNy4yMTM0IDUuNDYzNzEgMTcuMjUzOSA1LjUyNDI2IDE3LjMwOTQgNS41NjczM0MxNy4zNjQ4IDUuNjEwNDEgMTcuNDMyMiA1LjYzMzY5IDE3LjUwMTUgNS42MzM2OUMxNy41NzA3IDUuNjMzNjkgMTcuNjM4MiA1LjYxMDQxIDE3LjY5MzYgNS41NjczM0MxNy43NDkxIDUuNTI0MjYgMTcuNzg5NiA1LjQ2MzcxIDE3LjgwOTEgNS4zOTQ3NEwxOC4yMTg1IDMuOTUyMzNaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xMS4xNjcyIDQuNTU2MzVMOS43NjQ3OCA1LjE0OTk2QzkuNzA1NzggNS4xNzQ5NCA5LjY1NTI5IDUuMjE3NiA5LjYxOTc0IDUuMjcyNDlDOS41ODQyIDUuMzI3MzcgOS41NjUyMiA1LjM5MjAxIDkuNTY1MjIgNS40NTgxNEM5LjU2NTIyIDUuNTI0MjYgOS41ODQyIDUuNTg4OSA5LjYxOTc0IDUuNjQzNzhDOS42NTUyOSA1LjY5ODY3IDkuNzA1NzggNS43NDEzMyA5Ljc2NDc4IDUuNzY2MzFMMTEuMTY3MiA2LjM1OTkyTDExLjczOTIgNy44MTUzNEMxMS43NjMzIDcuODc2NTcgMTEuODA0NCA3LjkyODk3IDExLjg1NzMgNy45NjU4NUMxMS45MTAyIDguMDAyNzQgMTEuOTcyNCA4LjAyMjQzIDEyLjAzNjIgOC4wMjI0M0MxMi4wOTk5IDguMDIyNDMgMTIuMTYyMiA4LjAwMjc0IDEyLjIxNSA3Ljk2NTg1QzEyLjI2NzkgNy45Mjg5NyAxMi4zMDkgNy44NzY1NyAxMi4zMzMxIDcuODE1MzRMMTIuOTA1MSA2LjM1OTkyTDE0LjMwNzIgNS43NjYzMUMxNC4zNjYyIDUuNzQxMzIgMTQuNDE2NyA1LjY5ODY3IDE0LjQ1MjMgNS42NDM3OEMxNC40ODc4IDUuNTg4ODkgMTQuNTA2OCA1LjUyNDI2IDE0LjUwNjggNS40NTgxNEMxNC41MDY4IDUuMzkyMDEgMTQuNDg3OCA1LjMyNzM4IDE0LjQ1MjMgNS4yNzI0OUMxNC40MTY3IDUuMjE3NiAxNC4zNjYyIDUuMTc0OTUgMTQuMzA3MiA1LjE0OTk2TDEyLjkwNTEgNC41NTYzNUwxMi4zMzMxIDMuMTAxMjZDMTIuMzA5IDMuMDQwMDMgMTIuMjY3OSAyLjk4NzY0IDEyLjIxNSAyLjk1MDc1QzEyLjE2MjIgMi45MTM4NyAxMi4wOTk5IDIuODk0MTcgMTIuMDM2MiAyLjg5NDE3QzExLjk3MjQgMi44OTQxNyAxMS45MTAyIDIuOTEzODcgMTEuODU3MyAyLjk1MDc1QzExLjgwNDQgMi45ODc2NCAxMS43NjMzIDMuMDQwMDMgMTEuNzM5MiAzLjEwMTI2TDExLjE2NzIgNC41NTYzNVoiIGZpbGw9IiM4RDkyQTUiLz4KPHJlY3QgeT0iNC4yNjEyMyIgd2lkdGg9IjguNjk1NjUiIGhlaWdodD0iMS41NjUyMiIgcng9IjAuNzgyNjA5IiBmaWxsPSIjOEQ5MkE1Ii8+CjxyZWN0IHk9IjguOTU3MDMiIHdpZHRoPSIxMS4zMDQzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8cmVjdCB5PSIxMy42NTIzIiB3aWR0aD0iMTMuOTEzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8L3N2Zz4K"),id:"aiContentPrompt"},{label:"AI Image",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjUxNDI5IDUuNUMxLjg0NzQ2IDUuNSAxLjIwNzk0IDUuNzYxNjkgMC43MzY0MTcgNi4yMjc1MUMwLjI2NDg5NyA2LjY5MzMyIDAgNy4zMjUxMSAwIDcuOTgzODdWMTcuMDE2MUMwIDE3LjY3NDkgMC4yNjQ4OTcgMTguMzA2NyAwLjczNjQxNyAxOC43NzI1QzEuMjA3OTQgMTkuMjM4MyAxLjg0NzQ2IDE5LjUgMi41MTQyOSAxOS41SDEzLjQ4NTdDMTQuMTUyNSAxOS41IDE0Ljc5MjEgMTkuMjM4MyAxNS4yNjM2IDE4Ljc3MjVDMTUuNzM1MSAxOC4zMDY3IDE2IDE3LjY3NDkgMTYgMTcuMDE2MVYxN0wxNiAxNi43TDE0LjYyODYgMTUuMzgxM0wxMi4xNDE3IDEyLjkyNDVDMTIuMDc2NyAxMi44NTU5IDExLjk5NyAxMi44MDI0IDExLjkwODQgMTIuNzY4QzExLjgxOTkgMTIuNzMzNyAxMS43MjQ2IDEyLjcxOTIgMTEuNjI5NyAxMi43MjU4QzExLjUzMzcgMTIuNzMxMyAxMS40Mzk3IDEyLjc1NTcgMTEuMzUzNCAxMi43OTc2QzExLjI2NyAxMi44Mzk1IDExLjE5IDEyLjg5OCAxMS4xMjY5IDEyLjk2OTdMOS45NDc0MyAxNC4zNjk3TDUuNzQxNzEgMTAuMjE0OEM1LjY3OTc0IDEwLjE0OTggNS42MDQ1MSAxMC4wOTg0IDUuNTIwOTkgMTAuMDY0MkM1LjQzNzQ2IDEwLjAyOTkgNS4zNDc1NCAxMC4wMTM1IDUuMjU3MTQgMTAuMDE2MUM1LjE2MTExIDEwLjAyMTYgNS4wNjcxNiAxMC4wNDYxIDQuOTgwODEgMTAuMDg3OUM0Ljg5NDQ2IDEwLjEyOTggNC44MTc0NCAxMC4xODgzIDQuNzU0MjkgMTAuMjZMMS4zNzE0MyAxNC4yNDMyVjcuOTgzODdDMS4zNzE0MyA3LjY4NDQzIDEuNDkxODQgNy4zOTcyNiAxLjcwNjE2IDcuMTg1NTJDMS45MjA0OSA2Ljk3Mzc5IDIuMjExMTggNi44NTQ4NCAyLjUxNDI5IDYuODU0ODRINy4xMDk2OVY2LjE3NzQyVjUuNUgyLjUxNDI5Wk0xLjM3MTQgMTcuMDE2VjE2LjM1NjdMNS4zMDI4MyAxMS42OTZMOS4wNjk2OCAxNS40MTczTDYuNzY1NjkgMTguMTI3SDIuNTE0MjZDMi4yMTQyOSAxOC4xMjcxIDEuOTI2MzQgMTguMDEwNiAxLjcxMjUzIDE3LjgwMjdDMS40OTg3MiAxNy41OTQ5IDEuMzc2MiAxNy4zMTIzIDEuMzcxNCAxNy4wMTZaTTguNTQ4NTQgMTguMTQ1MUwxMS43MDI4IDE0LjQwNTdMMTQuNTgyOCAxNy4yNTA5QzE0LjUzMjMgMTcuNTAyIDE0LjM5NTQgMTcuNzI4MiAxNC4xOTU1IDE3Ljg5MTFDMTMuOTk1NiAxOC4wNTQgMTMuNzQ0OSAxOC4xNDM4IDEzLjQ4NTcgMTguMTQ1MUgxMS4wMTcxSDguNTQ4NTRaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xNC4zNDY3IDkuNjMzNTVMMTEuNDAwMyAxMC41MzM0QzExLjMyMzkgMTAuNTU2NyAxMS4yNTY4IDEwLjYwNTEgMTEuMjA5MSAxMC42NzEyQzExLjE2MTMgMTAuNzM3NCAxMS4xMzU1IDEwLjgxNzkgMTEuMTM1NSAxMC45MDA1QzExLjEzNTUgMTAuOTgzMiAxMS4xNjEzIDExLjA2MzYgMTEuMjA5MSAxMS4xMjk4QzExLjI1NjggMTEuMTk2IDExLjMyMzkgMTEuMjQ0NCAxMS40MDAzIDExLjI2NzdMMTQuMzQ2NyAxMi4xNjc1TDE1LjIxMzggMTUuMjI1M0MxNS4yMzYzIDE1LjMwNDYgMTUuMjgyOSAxNS4zNzQyIDE1LjM0NjcgMTUuNDIzN0MxNS40MTA0IDE1LjQ3MzIgMTUuNDg3OSAxNS41IDE1LjU2NzYgMTUuNUMxNS42NDcyIDE1LjUgMTUuNzI0NyAxNS40NzMyIDE1Ljc4ODUgMTUuNDIzN0MxNS44NTIzIDE1LjM3NDIgMTUuODk4OSAxNS4zMDQ2IDE1LjkyMTMgMTUuMjI1M0wxNi43ODg4IDEyLjE2NzVMMTkuNzM1MiAxMS4yNjc3QzE5LjgxMTYgMTEuMjQ0NCAxOS44Nzg3IDExLjE5NiAxOS45MjY1IDExLjEyOThDMTkuODc4NyAxMC42MDUxIDE5LjgxMTYgMTAuNTU2NyAxOS43MzUyIDEwLjUzMzRMMTYuNzg4OCA5LjYzMzU1TDE1LjkyMTMgNi41NzU4M0MxNS44OTg5IDYuNDk2NTEgMTUuODUyMyA2LjQyNjg4IDE1Ljc4ODUgNi4zNzczNEMxNS43MjQ4IDYuMzI3ODEgMTUuNjQ3MiA2LjMwMTA0IDE1LjU2NzYgNi4zMDEwNEMxNS40ODc5IDYuMzAxMDQgMTUuNDEwNCA2LjMyNzgxIDE1LjM0NjcgNi4zNzczNEMxNS4yODI5IDYuNDI2ODggMTUuMjM2MyA2LjQ5NjUxIDE1LjIxMzggNi41NzU4M0wxNC4zNDY3IDkuNjMzNTVaIiBmaWxsPSIjOEQ5MkE1Ii8+Cjwvc3ZnPg=="),id:"aiImagePrompt"},{label:"Blockquote",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalRule"}];function zs(n){return qX.bypassSecurityTrustUrl(n)}const Nv=[{label:"Image",icon:"image",id:"image"},{label:"Video",icon:"movie",id:"video"},...DR,{label:"Table",icon:"table_view",id:"table"},...TR,...JX,OM],XX=[...DR,OM,...TR],eee=[{name:"flip",options:{fallbackPlacements:["top"]}},{name:"preventOverflow",options:{altAxis:!1,tether:!1}}],nee={horizontalRule:!0,table:!0,image:!0,video:!0},iee=[...Nv.filter(n=>!nee[n.id])],MR=function({type:n,editor:t,range:e,suggestionKey:i,ItemsType:r}){const o={to:e.to+i.getState(t.view.state).query?.length,from:n===r.BLOCK?e.from:e.from+1};t.chain().deleteRange(o).run()},SR={duration:[250,0],interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}};function Ie(...n){const t=n.length;if(0===t)throw new Error("list of properties cannot be empty.");return e=>fe(function ree(n,t){return i=>{let r=i;for(let o=0;oe?r[e]:null}return i}camelize(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,i)=>0===i?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,"")}titleCase(t){return`${t.charAt(0).toLocaleUpperCase()}${t.slice(1)}`}}Uc.\u0275fac=function(t){return new(t||Uc)},Uc.\u0275prov=H({token:Uc,factory:Uc.\u0275fac});class see{getQueryParams(){const t=window.location.search.substring(1).split("&"),e=new Map;return t.forEach(i=>{const r=i.split("=");e.set(r[0],r[1])}),e}getQueryStringParam(t){let e=null;const r=new RegExp("[?&]"+t.replace(/[\[\]]/g,"\\$&")+"(=([^&#]*)|&|#|$)").exec(window.location.href);return r&&r[2]&&(e=decodeURIComponent(r[2].replace(/\+/g," "))),e}}class Co{constructor(t){this.stringUtils=t,this.showLogs=!0,this.httpRequestUtils=new see,this.showLogs=this.shouldShowLogs(),this.showLogs&&console.info("Setting the logger --\x3e Developer mode logger on")}info(t,...e){e&&e.length>0?console.info(this.wrapMessage(t),e):console.info(this.wrapMessage(t))}error(t,...e){e&&e.length>0?console.error(this.wrapMessage(t),e):console.error(this.wrapMessage(t))}warn(t,...e){e&&e.length>0?console.warn(this.wrapMessage(t),e):console.warn(this.wrapMessage(t))}debug(t,...e){e&&e.length>0?console.debug(this.wrapMessage(t),e):console.debug(this.wrapMessage(t))}shouldShowLogs(){this.httpRequestUtils.getQueryStringParam("devMode");return!0}wrapMessage(t){return this.showLogs?t:this.getCaller()+">> "+t}getCaller(){let t="unknown";try{throw new Error}catch(e){t=this.cleanCaller(this.stringUtils.getLine(e.stack,4))}return t}cleanCaller(t){return t?t.trim().substr(3):"unknown"}}Co.\u0275fac=function(t){return new(t||Co)(F(Uc))},Co.\u0275prov=H({token:Co,factory:Co.\u0275fac});class th{constructor(t,e){this.loggerService=t,this.suppressAlerts=!1,this.locale=e;try{const i=window.location.search.substring(1);this.locale=this.checkQueryForUrl(i)}catch{this.loggerService.error("Could not set locale from URL.")}}checkQueryForUrl(t){let e=this.locale;if(t&&t.length){const i=t,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,e=i.substring(o+r.length,s)}}return e}}th.\u0275fac=function(t){return new(t||th)(F(Co),F(Ps))},th.\u0275prov=H({token:th,factory:th.\u0275fac});class Vs{constructor(t,e){this.loggerService=e,this.siteId="48190c8c-42c4-46af-8d1a-0cd5db894797",this.hideFireOn=!1,this.hideRulePushOptions=!1,this.authUser=t;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=Vs.parseQueryParam(i,"realmId");r&&(this.siteId=r,this.loggerService.debug("Site Id set to ",this.siteId));const o=Vs.parseQueryParam(i,"hideFireOn");o&&(this.hideFireOn="true"===o||"1"===o,this.loggerService.debug("hideFireOn set to ",this.hideFireOn));const s=Vs.parseQueryParam(i,"hideRulePushOptions");s&&(this.hideRulePushOptions="true"===s||"1"===s,this.loggerService.debug("hideRulePushOptions set to ",this.hideRulePushOptions)),this.configureUser(i,t)}catch(i){this.loggerService.error("Could not set baseUrl automatically.",i)}}static parseQueryParam(t,e){let i=-1,r=null;if(e+="=",t&&t.length&&(i=t.indexOf(e)),i>=0){let o=t.indexOf("&",i);o=-1!==o?o:t.length,r=t.substring(i+e.length,o)}return r}configureUser(t,e){e.suppressAlerts="true"===Vs.parseQueryParam(t,"suppressAlerts")}}Vs.\u0275fac=function(t){return new(t||Vs)(F(th),F(Co))},Vs.\u0275prov=H({token:Vs,factory:Vs.\u0275fac});class Op{isIE11(){return"Netscape"===navigator.appName&&-1!==navigator.appVersion.indexOf("Trident")}}function Fi(n){return function(e){const i=new lee(n),r=e.lift(i);return i.caught=r}}Op.\u0275fac=function(t){return new(t||Op)},Op.\u0275prov=H({token:Op,factory:Op.\u0275fac});class lee{constructor(t){this.selector=t}call(t,e){return e.subscribe(new cee(t,this.selector,this.caught))}}class cee extends es{constructor(t,e,i){super(t),this.selector=e,this.caught=i}error(t){if(!this.isStopped){let e;try{e=this.selector(t,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new Hn(this);this.add(i);const r=ic(e,i);r!==i&&this.add(r)}}}var Hc=(()=>(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"}(Hc||(Hc={})),Hc))();const hee_1="Could not connect to server.";class AM{constructor(t,e,i,r,o){this.code=t,this.message=e,this.request=i,this.response=r,this.source=o}}class kM{constructor(t){this.resp=t;try{this.bodyJsonObject=t.body,this.headers=t.headers}catch{this.bodyJsonObject=null}}header(t){return this.headers.get(t)}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 t="";return this.bodyJsonObject.errors?this.bodyJsonObject.errors.forEach(e=>{t+=e.message}):t=this.bodyJsonObject.messages.toString(),t}get status(){return this.resp.status}get response(){return this.resp}existError(t){return this.bodyJsonObject.errors&&this.bodyJsonObject.errors.filter(e=>e.errorCode===t).length>0}}class Kr extends ae{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new ve;return this._value}next(t){super.next(this._value=t)}}const Pv=(()=>{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 xR extends te{notifyNext(t,e,i,r,o){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class pee extends te{constructor(t,e,i){super(),this.parent=t,this.outerValue=e,this.outerIndex=i,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function IR(n,t,e,i,r=new pee(n,e,i)){if(!r.closed)return t instanceof Se?t.subscribe(r):Be(t)(r)}const OR={};function NM(...n){let t,e;return Ti(n[n.length-1])&&(e=n.pop()),"function"==typeof n[n.length-1]&&(t=n.pop()),1===n.length&&R(n[0])&&(n=n[0]),Ja(n,e).lift(new mee(t))}class mee{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new gee(t,this.resultSelector))}}class gee extends xR{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(OR),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;i{let e;try{e=n()}catch(r){return void t.error(r)}return(e?wt(e):B_()).subscribe(t)})}function nh(n=null){return t=>t.lift(new yee(n))}class yee{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new _ee(t,this.defaultValue))}}class _ee extends te{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function kR(n=wee){return t=>t.lift(new vee(n))}class vee{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new bee(t,this.errorFactory))}}class bee extends te{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}}function wee(){return new Pv}function vl(n,t){const e=arguments.length>=2;return i=>i.pipe(n?Tn((r,o)=>n(r,o,i)):z,Et(1),e?nh(t):kR(()=>new Pv))}function Lv(n,t){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new Cee(n,t,e))}}class Cee{constructor(t,e,i=!1){this.accumulator=t,this.seed=e,this.hasSeed=i}call(t,e){return e.subscribe(new Dee(t,this.accumulator,this.seed,this.hasSeed))}}class Dee extends te{constructor(t,e,i,r){super(t),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let i;try{i=this.accumulator(this.seed,t,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function Ap(n){return function(e){return 0===n?B_():e.lift(new Tee(n))}}class Tee{constructor(t){if(this.total=t,this.total<0)throw new eR}call(t,e){return e.subscribe(new Mee(t,this.total))}}class Mee extends te{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,i=this.total,r=this.count++;e.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?Tn((r,o)=>n(r,o,i)):z,Ap(1),e?nh(t):kR(()=>new Pv))}class Eee{constructor(t,e){this.predicate=t,this.inclusive=e}call(t,e){return e.subscribe(new xee(t,this.predicate,this.inclusive))}}class xee extends te{constructor(t,e,i){super(t),this.predicate=e,this.inclusive=i,this.index=0}_next(t){const e=this.destination;let i;try{i=this.predicate(t,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(t,i)}nextOrComplete(t,e){const i=this.destination;Boolean(e)?i.next(t):(this.inclusive&&i.next(t),i.complete())}}class Oee{constructor(t){this.value=t}call(t,e){return e.subscribe(new Aee(t,this.value))}}class Aee extends te{constructor(t,e){super(t),this.value=e}_next(t){this.destination.next(this.value)}}function PM(n){return t=>t.lift(new kee(n))}class kee{constructor(t){this.callback=t}call(t,e){return e.subscribe(new Nee(t,this.callback))}}class Nee extends te{constructor(t,e){super(t),this.add(new se(e))}}const Nt="primary",kp=Symbol("RouteTitle");class Pee{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function ih(n){return new Pee(n)}function Lee(n,t,e){const i=e.path.split("/");if(i.length>n.length||"full"===e.pathMatch&&(t.hasChildren()||i.lengthi[o]===r)}return n===t}function LR(n){return Array.prototype.concat.apply([],n)}function RR(n){return n.length>0?n[n.length-1]:null}function Ki(n,t){for(const e in n)n.hasOwnProperty(e)&&t(n[e],e)}function bl(n){return XC(n)?n:Kf(n)?wt(Promise.resolve(n)):Le(n)}const Rv=!1,Fee={exact:function zR(n,t,e){if(!Wc(n.segments,t.segments)||!Fv(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!n.children[i]||!zR(n.children[i],t.children[i],e))return!1;return!0},subset:VR},FR={exact:function jee(n,t){return Bs(n,t)},subset:function zee(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>PR(n[e],t[e]))},ignored:()=>!0};function jR(n,t,e){return Fee[e.paths](n.root,t.root,e.matrixParams)&&FR[e.queryParams](n.queryParams,t.queryParams)&&!("exact"===e.fragment&&n.fragment!==t.fragment)}function VR(n,t,e){return BR(n,t,t.segments,e)}function BR(n,t,e,i){if(n.segments.length>e.length){const r=n.segments.slice(0,e.length);return!(!Wc(r,e)||t.hasChildren()||!Fv(r,e,i))}if(n.segments.length===e.length){if(!Wc(n.segments,e)||!Fv(n.segments,e,i))return!1;for(const r in t.children)if(!n.children[r]||!VR(n.children[r],t.children[r],i))return!1;return!0}{const r=e.slice(0,n.segments.length),o=e.slice(n.segments.length);return!!(Wc(n.segments,r)&&Fv(n.segments,r,i)&&n.children[Nt])&&BR(n.children[Nt],t,o,i)}}function Fv(n,t,e){return t.every((i,r)=>FR[e](n[r].parameters,i.parameters))}class $c{constructor(t=new Rt([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ih(this.queryParams)),this._queryParamMap}toString(){return Uee.serialize(this)}}class Rt{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Ki(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return jv(this)}}class Np{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=ih(this.parameters)),this._parameterMap}toString(){return $R(this)}}function Wc(n,t){return n.length===t.length&&n.every((e,i)=>e.path===t[i].path)}let Pp=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return new LM},providedIn:"root"}),n})();class LM{parse(t){const e=new Zee(t);return new $c(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Lp(t.root,!0)}`,i=function Wee(n){const t=Object.keys(n).map(e=>{const i=n[e];return Array.isArray(i)?i.map(r=>`${zv(e)}=${zv(r)}`).join("&"):`${zv(e)}=${zv(i)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams),r="string"==typeof t.fragment?`#${function Hee(n){return encodeURI(n)}(t.fragment)}`:"";return`${e}${i}${r}`}}const Uee=new LM;function jv(n){return n.segments.map(t=>$R(t)).join("/")}function Lp(n,t){if(!n.hasChildren())return jv(n);if(t){const e=n.children[Nt]?Lp(n.children[Nt],!1):"",i=[];return Ki(n.children,(r,o)=>{o!==Nt&&i.push(`${o}:${Lp(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function Bee(n,t){let e=[];return Ki(n.children,(i,r)=>{r===Nt&&(e=e.concat(t(i,r)))}),Ki(n.children,(i,r)=>{r!==Nt&&(e=e.concat(t(i,r)))}),e}(n,(i,r)=>r===Nt?[Lp(n.children[Nt],!1)]:[`${r}:${Lp(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[Nt]?`${jv(n)}/${e[0]}`:`${jv(n)}/(${e.join("//")})`}}function UR(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function zv(n){return UR(n).replace(/%3B/gi,";")}function RM(n){return UR(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Vv(n){return decodeURIComponent(n)}function HR(n){return Vv(n.replace(/\+/g,"%20"))}function $R(n){return`${RM(n.path)}${function $ee(n){return Object.keys(n).map(t=>`;${RM(t)}=${RM(n[t])}`).join("")}(n.parameters)}`}const Gee=/^[^\/()?;=#]+/;function Bv(n){const t=n.match(Gee);return t?t[0]:""}const Yee=/^[^=?&#]+/,Kee=/^[^&#]+/;class Zee{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Rt([],{}):new Rt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[Nt]=new Rt(t,e)),i}parseSegment(){const t=Bv(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Q(4009,Rv);return this.capture(t),new Np(Vv(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Bv(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Bv(this.remaining);r&&(i=r,this.capture(i))}t[Vv(e)]=Vv(i)}parseQueryParam(t){const e=function qee(n){const t=n.match(Yee);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function Qee(n){const t=n.match(Kee);return t?t[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=HR(e),o=HR(i);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Bv(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Q(4010,Rv);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=Nt);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[Nt]:new Rt([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Q(4011,Rv)}}function FM(n){return n.segments.length>0?new Rt([],{[Nt]:n}):n}function Uv(n){const t={};for(const i of Object.keys(n.children)){const o=Uv(n.children[i]);(o.segments.length>0||o.hasChildren())&&(t[i]=o)}return function Jee(n){if(1===n.numberOfChildren&&n.children[Nt]){const t=n.children[Nt];return new Rt(n.segments.concat(t.segments),t.children)}return n}(new Rt(n.segments,t))}function Gc(n){return n instanceof $c}function tte(n,t,e,i,r){if(0===e.length)return rh(t.root,t.root,t.root,i,r);const o=function YR(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new GR(!0,0,n);let t=0,e=!1;const i=n.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Ki(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?e=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new GR(e,t,i)}(e);return o.toRoot()?rh(t.root,t.root,new Rt([],{}),i,r):function s(l){const c=function ite(n,t,e,i){if(n.isAbsolute)return new oh(t.root,!0,0);if(-1===i)return new oh(e,e===t.root,0);return function qR(n,t,e){let i=n,r=t,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Q(4005,!1);r=i.segments.length}return new oh(i,!1,r-o)}(e,i+(Rp(n.commands[0])?0:1),n.numberOfDoubleDots)}(o,t,n.snapshot?._urlSegment,l),u=c.processChildren?jp(c.segmentGroup,c.index,o.commands):zM(c.segmentGroup,c.index,o.commands);return rh(t.root,c.segmentGroup,u,i,r)}(n.snapshot?._lastPathIndex)}function Rp(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function Fp(n){return"object"==typeof n&&null!=n&&n.outlets}function rh(n,t,e,i,r){let s,o={};i&&Ki(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=n===t?e:WR(n,t,e);const a=FM(Uv(s));return new $c(a,o,r)}function WR(n,t,e){const i={};return Ki(n.children,(r,o)=>{i[o]=r===t?e:WR(r,t,e)}),new Rt(n.segments,i)}class GR{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Rp(i[0]))throw new Q(4003,!1);const r=i.find(Fp);if(r&&r!==RR(i))throw new Q(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class oh{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function zM(n,t,e){if(n||(n=new Rt([],{})),0===n.segments.length&&n.hasChildren())return jp(n,t,e);const i=function ote(n,t,e){let i=0,r=t;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=n.segments[r],a=e[i];if(Fp(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!QR(l,c,s))return o;i+=2}else{if(!QR(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=zM(n.children[s],t,o))}),Ki(n.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new Rt(n.segments,r)}}function VM(n,t,e){const i=n.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[i]=VM(new Rt([],{}),0,e))}),t}function KR(n){const t={};return Ki(n,(e,i)=>t[i]=`${e}`),t}function QR(n,t,e){return n==e.path&&Bs(t,e.parameters)}const zp="imperative";class Us{constructor(t,e){this.id=t,this.url=e}}class BM extends Us{constructor(t,e,i="imperative",r=null){super(t,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Yc extends Us{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class Hv extends Us{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class ZR extends Us{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=16}}class JR extends Us{constructor(t,e,i,r){super(t,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class ate extends Us{constructor(t,e,i,r){super(t,e),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 lte extends Us{constructor(t,e,i,r){super(t,e),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 cte extends Us{constructor(t,e,i,r,o){super(t,e),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 ute extends Us{constructor(t,e,i,r){super(t,e),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 dte extends Us{constructor(t,e,i,r){super(t,e),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 hte{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class fte{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class pte{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class mte{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class gte{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class yte{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class XR{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let vte=(()=>{class n{createUrlTree(e,i,r,o,s,a){return tte(e||i.root,r,o,s,a)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),bte=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(t){return vte.\u0275fac(t)},providedIn:"root"}),n})();class eF{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=UM(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){const e=UM(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=HM(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return HM(t,this._root).map(e=>e.value)}}function UM(n,t){if(n===t.value)return t;for(const e of t.children){const i=UM(n,e);if(i)return i}return null}function HM(n,t){if(n===t.value)return[t];for(const e of t.children){const i=HM(n,e);if(i.length)return i.unshift(t),i}return[]}class La{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function sh(n){const t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}class tF extends eF{constructor(t,e){super(t),this.snapshot=e,$M(this,t)}toString(){return this.snapshot.toString()}}function nF(n,t){const e=function wte(n,t){const s=new $v([],{},{},"",{},Nt,t,null,n.root,-1,{});return new rF("",new La(s,[]))}(n,t),i=new Kr([new Np("",{})]),r=new Kr({}),o=new Kr({}),s=new Kr({}),a=new Kr(""),l=new ah(i,r,s,a,o,Nt,t,e.root);return l.snapshot=e.root,new tF(new La(l,[]),e)}class ah{constructor(t,e,i,r,o,s,a,l){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(fe(c=>c[kp]))??Le(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(fe(t=>ih(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(fe(t=>ih(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function iF(n,t="emptyOnly"){const e=n.pathFromRoot;let i=0;if("always"!==t)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function Cte(n){return n.reduce((t,e)=>({params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class $v{get title(){return this.data?.[kp]}constructor(t,e,i,r,o,s,a,l,c,u,d){this.url=t,this.params=e,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=ih(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ih(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class rF extends eF{constructor(t,e){super(e),this.url=t,$M(this,e)}toString(){return oF(this._root)}}function $M(n,t){t.value._routerState=n,t.children.forEach(e=>$M(n,e))}function oF(n){const t=n.children.length>0?` { ${n.children.map(oF).join(", ")} } `:"";return`${n.value}${t}`}function WM(n){if(n.snapshot){const t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Bs(t.queryParams,e.queryParams)||n.queryParams.next(e.queryParams),t.fragment!==e.fragment&&n.fragment.next(e.fragment),Bs(t.params,e.params)||n.params.next(e.params),function Ree(n,t){if(n.length!==t.length)return!1;for(let e=0;eBs(e.parameters,t[i].parameters))}(n.url,t.url);return e&&!(!n.parent!=!t.parent)&&(!n.parent||GM(n.parent,t.parent))}function Vp(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=t.value;const r=function Tte(n,t,e){return t.children.map(i=>{for(const r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Vp(n,i,r);return Vp(n,i)})}(n,t,e);return new La(i,r)}{if(n.shouldAttach(t.value)){const o=n.retrieve(t.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>Vp(n,a)),s}}const i=function Mte(n){return new ah(new Kr(n.url),new Kr(n.params),new Kr(n.queryParams),new Kr(n.fragment),new Kr(n.data),n.outlet,n.component,n)}(t.value),r=t.children.map(o=>Vp(n,o));return new La(i,r)}}const YM="ngNavigationCancelingError";function sF(n,t){const{redirectTo:e,navigationBehaviorOptions:i}=Gc(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=aF(!1,0,t);return r.url=e,r.navigationBehaviorOptions=i,r}function aF(n,t,e){const i=new Error("NavigationCancelingError: "+(n||""));return i[YM]=!0,i.cancellationCode=t,e&&(i.url=e),i}function lF(n){return cF(n)&&Gc(n.url)}function cF(n){return n&&n[YM]}class Ste{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Bp,this.attachRef=null}}let Bp=(()=>{class n{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new Ste,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Wv=!1;let uF=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=Nt,this.activateEvents=new re,this.deactivateEvents=new re,this.attachEvents=new re,this.detachEvents=new re,this.parentContexts=ct(Bp),this.location=ct($r),this.changeDetector=ct(Un),this.environmentInjector=ct(Is)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.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(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Q(4012,Wv);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Q(4012,Wv);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Q(4012,Wv);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Q(4013,Wv);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Ete(e,a,r.injector);if(i&&function xte(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(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[$i]}),n})();class Ete{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===ah?this.route:t===Bp?this.childContexts:this.parent.get(t,e)}}let qM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["ng-component"]],standalone:!0,features:[Ns],decls:1,vars:0,template:function(e,i){1&e&&_e(0,"router-outlet")},dependencies:[uF],encapsulation:2}),n})();function dF(n,t){return n.providers&&!n._injector&&(n._injector=c_(n.providers,t,`Route: ${n.path}`)),n._injector??t}function QM(n){const t=n.children&&n.children.map(QM),e=t?{...n,children:t}:{...n};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Nt&&(e.component=qM),e}function Uo(n){return n.outlet||Nt}function hF(n,t){const e=n.filter(i=>Uo(i)===t);return e.push(...n.filter(i=>Uo(i)!==t)),e}function Up(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){const e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class Nte{constructor(t,e,i,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),WM(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const r=sh(e);t.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Ki(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=sh(t);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(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=sh(t);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(t,e,i){const r=sh(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new yte(o.value.snapshot))}),t.children.length&&this.forwardEvent(new mte(t.value.snapshot))}activateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(WM(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,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),WM(a.route.value),this.activateChildRoutes(t,null,s.children)}else{const a=Up(r.snapshot),l=a?.get(vc)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}}else this.activateChildRoutes(t,null,i)}}class fF{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Gv{constructor(t,e){this.component=t,this.route=e}}function Pte(n,t,e){const i=n._root;return Hp(i,t?t._root:null,e,[i.value])}function lh(n,t){const e=Symbol(),i=t.get(n,e);return i===e?"function"!=typeof n||function vw(n){return null!==Yu(n)}(n)?t.get(n):n:i}function Hp(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=sh(t);return n.children.forEach(s=>{(function Rte(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function Fte(n,t,e){if("function"==typeof e)return e(n,t);switch(e){case"pathParamsChange":return!Wc(n.url,t.url);case"pathParamsOrQueryParamsChange":return!Wc(n.url,t.url)||!Bs(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!GM(n,t)||!Bs(n.queryParams,t.queryParams);default:return!GM(n,t)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new fF(i)):(o.data=s.data,o._resolvedData=s._resolvedData),Hp(n,t,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Gv(a.outlet.component,s))}else s&&$p(t,a,r),r.canActivateChecks.push(new fF(i)),Hp(n,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Ki(o,(s,a)=>$p(s,e.getContext(a),r)),r}function $p(n,t,e){const i=sh(n),r=n.value;Ki(i,(o,s)=>{$p(o,r.component?t?t.children.getContext(s):null:t,e)}),e.canDeactivateChecks.push(new Gv(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Wp(n){return"function"==typeof n}function ZM(n){return n instanceof Pv||"EmptyError"===n?.name}const Yv=Symbol("INITIAL_VALUE");function ch(){return ai(n=>NM(n.map(t=>t.pipe(Et(1),function xv(...n){const t=n[n.length-1];return Ti(t)?(n.pop(),e=>vM(n,e,t)):e=>vM(n,e)}(Yv)))).pipe(fe(t=>{for(const e of t)if(!0!==e){if(e===Yv)return Yv;if(!1===e||e instanceof $c)return e}return!0}),Tn(t=>t!==Yv),Et(1)))}function pF(n){return pe(hn(t=>{if(Gc(t))throw sF(0,t)}),fe(t=>!0===t))}const JM={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function mF(n,t,e,i,r){const o=XM(n,t,e);return o.matched?function ene(n,t,e,i){const r=t.canMatch;return r&&0!==r.length?Le(r.map(s=>{const a=lh(s,n);return bl(function Hte(n){return n&&Wp(n.canMatch)}(a)?a.canMatch(t,e):n.runInContext(()=>a(t,e)))})).pipe(ch(),pF()):Le(!0)}(i=dF(t,i),t,e).pipe(fe(s=>!0===s?o:{...JM})):Le(o)}function XM(n,t,e){if(""===t.path)return"full"===t.pathMatch&&(n.hasChildren()||e.length>0)?{...JM}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||Lee)(e,n,t);if(!r)return{...JM};const o={};Ki(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:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function qv(n,t,e,i){if(e.length>0&&function ine(n,t,e){return e.some(i=>Kv(n,t,i)&&Uo(i)!==Nt)}(n,e,i)){const o=new Rt(t,function nne(n,t,e,i){const r={};r[Nt]=i,i._sourceSegment=n,i._segmentIndexShift=t.length;for(const o of e)if(""===o.path&&Uo(o)!==Nt){const s=new Rt([],{});s._sourceSegment=n,s._segmentIndexShift=t.length,r[Uo(o)]=s}return r}(n,t,i,new Rt(e,n.children)));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function rne(n,t,e){return e.some(i=>Kv(n,t,i))}(n,e,i)){const o=new Rt(n.segments,function tne(n,t,e,i,r){const o={};for(const s of i)if(Kv(n,e,s)&&!r[Uo(s)]){const a=new Rt([],{});a._sourceSegment=n,a._segmentIndexShift=t.length,o[Uo(s)]=a}return{...r,...o}}(n,t,e,i,n.children));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:e}}const r=new Rt(n.segments,n.children);return r._sourceSegment=n,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function Kv(n,t,e){return(!(n.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function gF(n,t,e,i){return!!(Uo(n)===i||i!==Nt&&Kv(t,e,n))&&("**"===n.path||XM(t,n,e).matched)}function yF(n,t,e){return 0===t.length&&!n.children[e]}const Qv=!1;class Zv{constructor(t){this.segmentGroup=t||null}}class _F{constructor(t){this.urlTree=t}}function Gp(n){return vo(new Zv(n))}function vF(n){return vo(new _F(n))}class lne{constructor(t,e,i,r,o){this.injector=t,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const t=qv(this.urlTree.root,[],[],this.config).segmentGroup,e=new Rt(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,Nt).pipe(fe(o=>this.createUrlTree(Uv(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Fi(o=>{if(o instanceof _F)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof Zv?this.noMatchError(o):o}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,Nt).pipe(fe(r=>this.createUrlTree(Uv(r),t.queryParams,t.fragment))).pipe(Fi(r=>{throw r instanceof Zv?this.noMatchError(r):r}))}noMatchError(t){return new Q(4002,Qv)}createUrlTree(t,e,i){const r=FM(t);return new $c(r,e,i)}expandSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(fe(o=>new Rt([],o))):this.expandSegment(t,i,e,i.segments,r,!0)}expandChildren(t,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return wt(r).pipe(ul(o=>{const s=i.children[o],a=hF(e,o);return this.expandSegmentGroup(t,a,s,o).pipe(fe(l=>({segment:l,outlet:o})))}),Lv((o,s)=>(o[s.outlet]=s.segment,o),{}),NR())}expandSegment(t,e,i,r,o,s){return wt(i).pipe(ul(a=>this.expandSegmentAgainstRoute(t,e,i,a,r,o,s).pipe(Fi(c=>{if(c instanceof Zv)return Le(null);throw c}))),vl(a=>!!a),Fi((a,l)=>{if(ZM(a))return yF(e,r,o)?Le(new Rt([],{})):Gp(e);throw a}))}expandSegmentAgainstRoute(t,e,i,r,o,s,a){return gF(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s):Gp(e):Gp(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?vF(o):this.lineralizeSegments(i,o).pipe(ni(s=>{const a=new Rt(s,{});return this.expandSegment(t,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=XM(e,r,o);if(!a)return Gp(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?vF(d):this.lineralizeSegments(r,d).pipe(ni(h=>this.expandSegment(t,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(t,e,i,r,o){return"**"===i.path?(t=dF(i,t),i.loadChildren?(i._loadedRoutes?Le({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(t,i)).pipe(fe(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new Rt(r,{})))):Le(new Rt(r,{}))):mF(e,i,r,t).pipe(ai(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(t=i._injector??t,i,r).pipe(ni(u=>{const d=u.injector??t,h=u.routes,{segmentGroup:f,slicedSegments:p}=qv(e,a,l,h),m=new Rt(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(fe(w=>new Rt(a,w)));if(0===h.length&&0===p.length)return Le(new Rt(a,{}));const g=Uo(i)===o;return this.expandSegment(d,m,h,p,g?Nt:o,!0).pipe(fe(b=>new Rt(a.concat(b.segments),b.children)))})):Gp(e)))}getChildConfig(t,e,i){return e.children?Le({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?Le({routes:e._loadedRoutes,injector:e._loadedInjector}):function Xte(n,t,e,i){const r=t.canLoad;return void 0===r||0===r.length?Le(!0):Le(r.map(s=>{const a=lh(s,n);return bl(function zte(n){return n&&Wp(n.canLoad)}(a)?a.canLoad(t,e):n.runInContext(()=>a(t,e)))})).pipe(ch(),pF())}(t,e,i).pipe(ni(r=>r?this.configLoader.loadChildren(t,e).pipe(hn(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function sne(n){return vo(aF(Qv,3))}())):Le({routes:[],injector:t})}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Le(i);if(r.numberOfChildren>1||!r.children[Nt])return vo(new Q(4e3,Qv));r=r.children[Nt]}}applyRedirectCommands(t,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreateUrlTree(t,e,i,r){const o=this.createSegmentGroup(t,e.root,i,r);return new $c(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return Ki(t,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(t,e,i,r){const o=this.createSegments(t,e.segments,i,r);let s={};return Ki(e.children,(a,l)=>{s[l]=this.createSegmentGroup(t,a,i,r)}),new Rt(o,s)}createSegments(t,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,r):this.findOrReturn(o,i))}findPosParam(t,e,i){const r=i[e.path.substring(1)];if(!r)throw new Q(4001,Qv);return r}findOrReturn(t,e){let i=0;for(const r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}}class une{}class fne{constructor(t,e,i,r,o,s,a){this.injector=t,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const t=qv(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,Nt).pipe(fe(e=>{if(null===e)return null;const i=new $v([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},Nt,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new La(i,e),o=new rF(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(t){const e=t.value,i=iF(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(t,e,i):this.processSegment(t,e,i,i.segments,r)}processChildren(t,e,i){return wt(Object.keys(i.children)).pipe(ul(r=>{const o=i.children[r],s=hF(e,r);return this.processSegmentGroup(t,s,o,r)}),Lv((r,o)=>r&&o?(r.push(...o),r):null),function See(n,t=!1){return e=>e.lift(new Eee(n,t))}(r=>null!==r),nh(null),NR(),fe(r=>{if(null===r)return null;const o=wF(r);return function pne(n){n.sort((t,e)=>t.value.outlet===Nt?-1:e.value.outlet===Nt?1:t.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(t,e,i,r,o){return wt(e).pipe(ul(s=>this.processSegmentAgainstRoute(s._injector??t,s,i,r,o)),vl(s=>!!s),Fi(s=>{if(ZM(s))return yF(i,r,o)?Le([]):Le(null);throw s}))}processSegmentAgainstRoute(t,e,i,r,o){if(e.redirectTo||!gF(e,i,r,o))return Le(null);let s;if("**"===e.path){const a=r.length>0?RR(r).parameters:{},l=DF(i)+r.length;s=Le({snapshot:new $v(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,TF(e),Uo(e),e.component??e._loadedComponent??null,e,CF(i),l,MF(e)),consumedSegments:[],remainingSegments:[]})}else s=mF(i,e,r,t).pipe(fe(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=DF(i)+l.length;return{snapshot:new $v(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,TF(e),Uo(e),e.component??e._loadedComponent??null,e,CF(i),d,MF(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(ai(a=>{if(null===a)return Le(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;t=e._injector??t;const d=e._loadedInjector??t,h=function mne(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=qv(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(fe(g=>null===g?null:[new La(l,g)]));if(0===h.length&&0===p.length)return Le([new La(l,[])]);const m=Uo(e)===o;return this.processSegment(d,h,f,p,m?Nt:o).pipe(fe(g=>null===g?null:[new La(l,g)]))}))}}function gne(n){const t=n.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function wF(n){const t=[],e=new Set;for(const i of n){if(!gne(i)){t.push(i);continue}const r=t.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):t.push(i)}for(const i of e){const r=wF(i.children);t.push(new La(i.value,r))}return t.filter(i=>!e.has(i))}function CF(n){let t=n;for(;t._sourceSegment;)t=t._sourceSegment;return t}function DF(n){let t=n,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function TF(n){return n.data||{}}function MF(n){return n.resolve||{}}function SF(n){return"string"==typeof n.title||null===n.title}function e1(n){return ai(t=>{const e=n(t);return e?wt(e).pipe(fe(()=>t)):Le(t)})}const uh=new Te("ROUTES");let t1=(()=>{class n{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return Le(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=bl(e.loadComponent()).pipe(fe(xF),hn(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),PM(()=>{this.componentLoaders.delete(e)})),r=new Hu(i,()=>new ae).pipe(rc());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Le({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(fe(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=LR(l.get(uh,[],et.Self|et.Optional)));return{routes:c.map(QM),injector:l}}),PM(()=>{this.childrenLoaders.delete(i)})),s=new Hu(o,()=>new ae).pipe(rc());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return bl(e()).pipe(fe(xF),ni(r=>r instanceof uk||Array.isArray(r)?Le(r):wt(this.compiler.compileModuleAsync(r))))}}return n.\u0275fac=function(e){return new(e||n)(F(Dr),F(eN))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function xF(n){return function Mne(n){return n&&"object"==typeof n&&"default"in n}(n)?n.default:n}let Xv=(()=>{class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new ae,this.configLoader=ct(t1),this.environmentInjector=ct(Is),this.urlSerializer=ct(Pp),this.rootContexts=ct(Bp),this.navigationId=0,this.afterPreactivation=()=>Le(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new fte(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new hte(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Kr({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:zp,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Tn(i=>0!==i.id),fe(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),ai(i=>{let r=!1,o=!1;return Le(i).pipe(hn(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}}),ai(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new ZR(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Rs}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return IF(s.source)&&(e.browserUrlTree=s.extractedUrl),Le(s).pipe(ai(u=>{const d=this.transitions?.getValue();return this.events.next(new BM(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Rs:Promise.resolve(u)}),function cne(n,t,e,i){return ai(r=>function ane(n,t,e,i,r){return new lne(n,t,e,i,r).apply()}(n,t,e,r.extractedUrl,i).pipe(fe(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),hn(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function _ne(n,t,e,i,r){return ni(o=>function hne(n,t,e,i,r,o,s="emptyOnly"){return new fne(n,t,e,i,r,s,o).recognize().pipe(ai(a=>null===a?function dne(n){return new Se(t=>t.error(n))}(new une):Le(a)))}(n,t,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(fe(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),hn(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new ate(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new BM(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=nF(d,this.rootComponentType).snapshot;return Le(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new ZR(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Rs}}),hn(s=>{const a=new lte(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),fe(s=>i={...s,guards:Pte(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function Wte(n,t){return ni(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?Le({...e,guardsResult:!0}):function Gte(n,t,e,i){return wt(n).pipe(ni(r=>function Jte(n,t,e,i,r){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?Le(o.map(a=>{const l=Up(t)??r,c=lh(a,l);return bl(function Ute(n){return n&&Wp(n.canDeactivate)}(c)?c.canDeactivate(n,t,e,i):l.runInContext(()=>c(n,t,e,i))).pipe(vl())})).pipe(ch()):Le(!0)}(r.component,r.route,e,t,i)),vl(r=>!0!==r,!0))}(s,i,r,n).pipe(ni(a=>a&&function jte(n){return"boolean"==typeof n}(a)?function Yte(n,t,e,i){return wt(t).pipe(ul(r=>vM(function Kte(n,t){return null!==n&&t&&t(new pte(n)),Le(!0)}(r.route.parent,i),function qte(n,t){return null!==n&&t&&t(new gte(n)),Le(!0)}(r.route,i),function Zte(n,t,e){const i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>function Lte(n){const t=n.routeConfig?n.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:n,guards:t}:null}(s)).filter(s=>null!==s).map(s=>AR(()=>Le(s.guards.map(l=>{const c=Up(s.node)??e,u=lh(l,c);return bl(function Bte(n){return n&&Wp(n.canActivateChild)}(u)?u.canActivateChild(i,n):c.runInContext(()=>u(i,n))).pipe(vl())})).pipe(ch())));return Le(o).pipe(ch())}(n,r.path,e),function Qte(n,t,e){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return Le(!0);const r=i.map(o=>AR(()=>{const s=Up(t)??e,a=lh(o,s);return bl(function Vte(n){return n&&Wp(n.canActivate)}(a)?a.canActivate(t,n):s.runInContext(()=>a(t,n))).pipe(vl())}));return Le(r).pipe(ch())}(n,r.route,e))),vl(r=>!0!==r,!0))}(i,o,n,t):Le(a)),fe(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),hn(s=>{if(i.guardsResult=s.guardsResult,Gc(s.guardsResult))throw sF(0,s.guardsResult);const a=new cte(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),Tn(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),e1(s=>{if(s.guards.canActivateChecks.length)return Le(s).pipe(hn(a=>{const l=new ute(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ai(a=>{let l=!1;return Le(a).pipe(function vne(n,t){return ni(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return Le(e);let o=0;return wt(r).pipe(ul(s=>function bne(n,t,e,i){const r=n.routeConfig,o=n._resolve;return void 0!==r?.title&&!SF(r)&&(o[kp]=r.title),function wne(n,t,e,i){const r=function Cne(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return Le({});const o={};return wt(r).pipe(ni(s=>function Dne(n,t,e,i){const r=Up(t)??i,o=lh(n,r);return bl(o.resolve?o.resolve(t,e):r.runInContext(()=>o(t,e)))}(n[s],t,e,i).pipe(vl(),hn(a=>{o[s]=a}))),Ap(1),function Iee(n){return t=>t.lift(new Oee(n))}(o),Fi(s=>ZM(s)?Rs:vo(s)))}(o,n,t,i).pipe(fe(s=>(n._resolvedData=s,n.data=iF(n,e).resolve,r&&SF(r)&&(n.data[kp]=r.title),null)))}(s.route,i,n,t)),hn(()=>o++),Ap(1),ni(s=>o===r.length?Le(e):Rs))})}(e.paramsInheritanceStrategy,this.environmentInjector),hn({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),hn(a=>{const l=new dte(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),e1(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(hn(u=>{l.component=u}),fe(()=>{})));for(const u of l.children)c.push(...a(u));return c};return NM(a(s.targetSnapshot.root)).pipe(nh(),Et(1))}),e1(()=>this.afterPreactivation()),fe(s=>{const a=function Dte(n,t,e){const i=Vp(n,t._root,e?e._root:void 0);return new tF(i,t)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),hn(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((n,t,e)=>fe(i=>(new Nte(t,i.targetRouterState,i.currentRouterState,e).activate(n),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),hn({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Yc(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),PM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Fi(s=>{if(o=!0,cF(s)){lF(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new Hv(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),lF(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||IF(i.source)};e.scheduleNavigation(l,zp,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new JR(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Rs}))}))}cancelNavigationTransition(e,i,r){const o=new Hv(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function IF(n){return n!==zp}let OF=(()=>{class n{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===Nt);return i}getResolvedTitleForRoute(e){return e.data[kp]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return ct(Sne)},providedIn:"root"}),n})(),Sne=(()=>{class n extends OF{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(e){return new(e||n)(F(vP))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ene=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return ct(Ine)},providedIn:"root"}),n})();class xne{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let Ine=(()=>{class n extends xne{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Li(n)))(i||n)}}(),n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const eb=new Te("",{providedIn:"root",factory:()=>({})});let Ane=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return ct(kne)},providedIn:"root"}),n})(),kne=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Nne(n){throw n}function Pne(n,t,e){return t.parse("/")}const Lne={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Rne={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let xr=(()=>{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=ct(K6),this.isNgZoneEnabled=!1,this.options=ct(eb,{optional:!0})||{},this.errorHandler=this.options.errorHandler||Nne,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||Pne,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=ct(Ane),this.routeReuseStrategy=ct(Ene),this.urlCreationStrategy=ct(bte),this.titleStrategy=ct(OF),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=LR(ct(uh,{optional:!0})??[]),this.navigationTransitions=ct(Xv),this.urlSerializer=ct(Pp),this.location=ct(VD),this.isNgZoneEnabled=ct(qt)instanceof qt&&qt.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new $c,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=nF(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),zp,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,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(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(QM),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(e,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,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=Gc(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,zp,null,i)}navigate(e,i={skipLocationChange:!1}){return function Fne(n){for(let t=0;t{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,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:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),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(e,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class kF{}let Vne=(()=>{class n{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(Tn(e=>e instanceof Yc),ul(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=c_(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,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 wt(r).pipe(Za())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):Le(null);const o=r.pipe(ni(s=>null===s?Le(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?wt([o,this.loader.loadComponent(i)]).pipe(Za()):o})}}return n.\u0275fac=function(e){return new(e||n)(F(xr),F(eN),F(Is),F(kF),F(t1))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const r1=new Te("");let NF=(()=>{class n{constructor(e,i,r,o,s={}){this.urlSerializer=e,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(e=>{e instanceof BM?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Yc&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof XR&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new XR(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return n.\u0275fac=function(e){!function gO(){throw new Error("invalid")}()},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function qc(n,t){return{\u0275kind:n,\u0275providers:t}}function LF(){const n=ct(Dr);return t=>{const e=n.get(Mc);if(t!==e.components[0])return;const i=n.get(xr),r=n.get(RF);1===n.get(s1)&&i.initialNavigation(),n.get(FF,null,et.Optional)?.setUpPreloading(),n.get(r1,null,et.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const RF=new Te("",{factory:()=>new ae}),s1=new Te("",{providedIn:"root",factory:()=>1});const FF=new Te("");function Wne(n){return qc(0,[{provide:FF,useExisting:Vne},{provide:kF,useExisting:n}])}const jF=new Te("ROUTER_FORROOT_GUARD"),Gne=[VD,{provide:Pp,useClass:LM},xr,Bp,{provide:ah,useFactory:function PF(n){return n.routerState.root},deps:[xr]},t1,[]];function Yne(){return new aN("Router",xr)}let zF=(()=>{class n{constructor(e){}static forRoot(e,i){return{ngModule:n,providers:[Gne,[],{provide:uh,multi:!0,useValue:e},{provide:jF,useFactory:Zne,deps:[[xr,new Lf,new Rf]]},{provide:eb,useValue:i||{}},i?.useHash?{provide:Ec,useClass:j$}:{provide:Ec,useClass:ON},{provide:r1,useFactory:()=>{const n=ct(JW),t=ct(qt),e=ct(eb),i=ct(Xv),r=ct(Pp);return e.scrollOffset&&n.setOffset(e.scrollOffset),new NF(r,i,n,t,e)}},i?.preloadingStrategy?Wne(i.preloadingStrategy).\u0275providers:[],{provide:aN,multi:!0,useFactory:Yne},i?.initialNavigation?Jne(i):[],[{provide:VF,useFactory:LF},{provide:Jk,multi:!0,useExisting:VF}]]}}static forChild(e){return{ngModule:n,providers:[{provide:uh,multi:!0,useValue:e}]}}}return n.\u0275fac=function(e){return new(e||n)(F(jF,8))},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[qM]}),n})();function Zne(n){return"guarded"}function Jne(n){return["disabled"===n.initialNavigation?qc(3,[{provide:sp,multi:!0,useFactory:()=>{const t=ct(xr);return()=>{t.setUpLocationChangeListener()}}},{provide:s1,useValue:2}]).\u0275providers:[],"enabledBlocking"===n.initialNavigation?qc(2,[{provide:s1,useValue:0},{provide:sp,multi:!0,deps:[Dr],useFactory:t=>{const e=t.get(R$,Promise.resolve());return()=>e.then(()=>new Promise(r=>{const o=t.get(xr),s=t.get(RF);(function i(r){t.get(xr).events.pipe(Tn(s=>s instanceof Yc||s instanceof Hv||s instanceof JR),fe(s=>s instanceof Yc||s instanceof Hv&&(0===s.code||1===s.code)&&null),Tn(s=>null!==s),Et(1)).subscribe(()=>{r()})})(()=>{r(!0)}),t.get(Xv).afterPreactivation=()=>(r(!0),s.closed?Le(void 0):s),o.initialNavigation()}))}}]).\u0275providers:[]]}const VF=new Te("");class Ht{constructor(t,e,i){this.loggerService=t,this.router=e,this.http=i,this.httpErrosSubjects=[]}request(t){t.method||(t.method="GET");const e=this.getRequestOpts(t),i=t.body;return this.http.request(e).pipe(Tn(r=>r.type===An.Response),fe(r=>{try{return r.body}catch{return r}}),Fi((r,o)=>{if(r){if(this.emitHttpError(r.status),r.status===Hc.SERVER_ERROR||r.status===Hc.FORBIDDEN)throw r.statusText&&r.statusText.indexOf("ECONNREFUSED")>=0?new AM(1,hee_1,e,r,i):new AM(3,r.error.message,e,r,i);if(r.status===Hc.NOT_FOUND)throw this.loggerService.error("Could not execute request: 404 path not valid.",t.url),new AM(2,r.headers.get("error-message"),e,r,i)}return null}))}requestView(t){let e;return t.method||(t.method="GET"),e=this.getRequestOpts(t),this.http.request(e).pipe(Tn(i=>i.type===An.Response),fe(i=>i.body&&i.body.errors&&i.body.errors.length>0?this.handleRequestViewErrors(i):new kM(i)),Fi(i=>(this.emitHttpError(i.status),vo(this.handleResponseHttpErrors(i)))))}subscribeToHttpError(t){return this.httpErrosSubjects[t]||(this.httpErrosSubjects[t]=new ae),this.httpErrosSubjects[t].asObservable()}handleRequestViewErrors(t){return 401===t.status&&this.router.navigate(["/public/login"]),new kM(t)}handleResponseHttpErrors(t){return 401===t.status&&this.router.navigate(["/public/login"]),t}emitHttpError(t){this.httpErrosSubjects[t]&&this.httpErrosSubjects[t].next()}getRequestOpts(t){const e=this.getHttpHeaders(t.headers),i=this.getHttpParams(t.params),r=this.getFixedUrl(t.url);return"POST"===t.method||"PUT"===t.method||"PATCH"===t.method||"DELETE"===t.method?new Oa(t.method,r,t.body||null,{headers:e,params:i}):new Oa(t.method,r,{headers:e,params:i})}getHttpHeaders(t){let e=this.getDefaultRequestHeaders();return t&&Object.keys(t).length&&(Object.keys(t).forEach(i=>{e=e.set(i,t[i])}),"multipart/form-data"===t["Content-Type"]&&(e=e.delete("Content-Type"))),e}getFixedUrl(t){return t?.startsWith("api")?`/${t}`:(t?t.split("/")[0]:"").match(/v[1-9]/g)?`/api/${t}`:t}getHttpParams(t){if(t&&Object.keys(t).length){let e=new ps;return Object.keys(t).forEach(i=>{e=e.set(i,t[i])}),e}return null}getDefaultRequestHeaders(){return(new Yr).set("Accept","*/*").set("Content-Type","application/json")}}Ht.\u0275fac=function(t){return new(t||Ht)(F(Co),F(xr),F(ar))},Ht.\u0275prov=H({token:Ht,factory:Ht.\u0275fac});class qp{constructor(){this.data=new ae}get showDialog$(){return this.data.asObservable()}open(t){this.data.next(t)}}qp.\u0275fac=function(t){return new(t||qp)},qp.\u0275prov=H({token:qp,factory:qp.\u0275fac,providedIn:"root"});class hh{constructor(t){this.router=t}goToMain(){this.router.navigate(["/c"])}goToLogin(t){this.router.navigate(["/public/login"],t)}goToURL(t){this.router.navigate([t])}isPublicUrl(t){return t.startsWith("/public")}isFromCoreUrl(t){return t.startsWith("/fromCore")}isRootUrl(t){return"/"===t}gotoPortlet(t){this.router.navigate([`c/${t.replace(" ","_")}`])}goToForgotPassword(){this.router.navigate(["/public/forgotPassword"])}goToNotLicensed(){this.router.navigate(["c/notLicensed"])}}hh.\u0275fac=function(t){return new(t||hh)(F(xr))},hh.\u0275prov=H({token:hh,factory:hh.\u0275fac});class Kc{constructor(t,e){this.coreWebService=t,this.loggerService=e,this.configParamsSubject=new Kr(null),this.configUrl="v1/appconfiguration",this.loadConfig()}getConfig(){return this.configParamsSubject.asObservable().pipe(Tn(t=>!!t))}loadConfig(){this.loggerService.debug("Loading configuration on: ",this.configUrl),this.coreWebService.requestView({url:this.configUrl}).pipe(Ie("entity")).subscribe(t=>{this.loggerService.debug("Configuration Loaded!",t);const e={colors:t.config.colors,emailRegex:t.config.emailRegex,license:t.config.license,logos:t.config.logos,menu:t.menu,paginatorLinks:t.config["dotcms.paginator.links"],paginatorRows:t.config["dotcms.paginator.rows"],releaseInfo:{buildDate:t.config.releaseInfo?.buildDate,version:t.config.releaseInfo?.version},websocket:{websocketReconnectTime:t.config.websocket["dotcms.websocket.reconnect.time"],disabledWebsockets:t.config.websocket["dotcms.websocket.disable"]}};return this.configParamsSubject.next(e),this.loggerService.debug("this.configParams",e),t})}getTimeZones(){return this.coreWebService.requestView({url:this.configUrl}).pipe(Ie("entity","config","timezones"),fe(t=>t.sort((e,i)=>e.label>i.label?1:e.label{this.connect()},0)}destroy(){this._open.complete(),this._close.complete(),this._message.complete(),this._error.complete()}}var tb=(()=>(function(n){n[n.NORMAL_CLOSE_CODE=1e3]="NORMAL_CLOSE_CODE",n[n.GO_AWAY_CODE=1001]="GO_AWAY_CODE"}(tb||(tb={})),tb))();class UF extends BF{constructor(t,e){if(super(e),this.url=t,this.dataStream=new ae,!new RegExp("wss?://").test(t))throw new Error("Invalid url provided ["+t+"]")}connect(){this.errorThrown=!1,this.loggerService.debug("Connecting with Web socket",this.url);try{this.socket=new WebSocket(this.url),this.socket.onopen=t=>{this.loggerService.debug("Web socket connected",this.url),this._open.next(t)},this.socket.onmessage=t=>{this._message.next(JSON.parse(t.data))},this.socket.onclose=t=>{this.errorThrown||(t.code===tb.NORMAL_CLOSE_CODE?(this._close.next(t),this._message.complete()):this._error.next(t))},this.socket.onerror=t=>{this.errorThrown=!0,this._error.next(t)}}catch(t){this.loggerService.debug("Web EventsSocket connection error",t),this._error.next(t)}}close(){this.socket&&3!==this.socket.readyState&&this.socket.close()}}class oie extends BF{constructor(t,e,i){super(e),this.url=t,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(t){return this.lastCallback=t.length>0?t[t.length-1].creationDate+1:this.lastCallback,this.lastCallback}connectLongPooling(t){this.isClosed=!1,this.loggerService.info("Starting long polling connection"),this.coreWebService.requestView({url:this.url,params:t?{lastCallBack:t}:{}}).pipe(Ie("entity"),Et(1)).subscribe(e=>{this.loggerService.debug("new Events",e),this.triggerOpen(),e instanceof Array?e.forEach(i=>{this._message.next(i)}):this._message.next(e),this.isClosed||this.connectLongPooling(this.getLastCallback(e))},e=>{this.loggerService.info("A error occur connecting through long polling"),this._error.next(e)})}triggerOpen(){this.isAlreadyOpen||(this._open.next(!0),this.isAlreadyOpen=!0)}}class sie{constructor(t,e){this.url=t,this.useSSL=e}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 Qr=(()=>(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"}(Qr||(Qr={})),Qr))();class fh{constructor(t,e,i,r){this.dotEventsSocketURL=t,this.dotcmsConfigService=e,this.loggerService=i,this.coreWebService=r,this.status=Qr.NONE,this._message=new ae,this._open=new ae}connect(){return this.init().pipe(hn(()=>{this.status=Qr.CONNECTING,this.connectProtocol()}))}destroy(){this.protocolImpl&&(this.loggerService.debug("Closing socket"),this.status=Qr.CLOSED,this.protocolImpl.close())}messages(){return this._message.asObservable()}open(){return this._open.asObservable()}isConnected(){return this.status===Qr.CONNECTED}init(){return this.dotcmsConfigService.getConfig().pipe(Ie("websocket"),hn(t=>{this.webSocketConfigParams=t,this.protocolImpl=this.isWebSocketsBrowserSupport()&&!t.disabledWebsockets?this.getWebSocketProtocol():this.getLongPollingProtocol()}))}connectProtocol(){this.protocolImpl.open$().subscribe(()=>{this.status=Qr.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(t=>{this.status=Qr.CLOSED}),this.protocolImpl.message$().subscribe(t=>this._message.next(t),t=>this.loggerService.debug("Error in the System Events service: "+t.message),()=>this.loggerService.debug("Completed")),this.protocolImpl.connect()}getAfterErrorStatus(){return this.status===Qr.CONNECTING?Qr.CONNECTING:Qr.RECONNECTING}shouldTryWithLongPooling(){return this.isWebSocketProtocol()&&this.status!==Qr.CONNECTED&&this.status!==Qr.RECONNECTING}getWebSocketProtocol(){return new UF(this.dotEventsSocketURL.getWebSocketURL(),this.loggerService)}getLongPollingProtocol(){return new oie(this.dotEventsSocketURL.getLongPoolingURL(),this.loggerService,this.coreWebService)}isWebSocketsBrowserSupport(){return"WebSocket"in window||"MozWebSocket"in window}isWebSocketProtocol(){return this.protocolImpl instanceof UF}}fh.\u0275fac=function(t){return new(t||fh)(F(sie),F(Kc),F(Co),F(Ht))},fh.\u0275prov=H({token:fh,factory:fh.\u0275fac});class wl{constructor(t,e){this.dotEventsSocket=t,this.loggerService=e,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(ai(()=>this.dotEventsSocket.messages())).subscribe(({event:t,payload:e})=>{this.subjects[t]||(this.subjects[t]=new ae),this.subjects[t].next(e.data)},t=>{this.loggerService.debug("Error in the System Events service: "+t.message)},()=>{this.loggerService.debug("Completed")}))}subscribeTo(t){return this.subjects[t]||(this.subjects[t]=new ae),this.subjects[t].asObservable()}subscribeToEvents(t){const e=new ae;return t.forEach(i=>{this.subscribeTo(i).subscribe(r=>{e.next({data:r,name:i})})}),e.asObservable()}open(){return this.dotEventsSocket.open()}}wl.\u0275fac=function(t){return new(t||wl)(F(fh),F(Co))},wl.\u0275prov=H({token:wl,factory:wl.\u0275fac});var Kp=(()=>(function(n){n.SHOW_VIDEO_THUMBNAIL="SHOW_VIDEO_THUMBNAIL"}(Kp||(Kp={})),Kp))(),Qp=(()=>(function(n){n.FULFILLED="fulfilled",n.REJECTED="rejected"}(Qp||(Qp={})),Qp))(),nb=(()=>(function(n){n.EDIT="EDIT_MODE",n.PREVIEW="PREVIEW_MODE",n.LIVE="ADMIN_MODE"}(nb||(nb={})),nb))();class aie{constructor(t){this._params=t}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((t,e)=>({...t,[e]:this.containers[e].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(t){this._params.numberContents=t}}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 Zp="variantName";var tm,$n=(()=>(function(n){n.INIT="INIT",n.LOADING="LOADING",n.LOADED="LOADED",n.SAVING="SAVING",n.IDLE="IDLE"}($n||($n={})),$n))();class Zc{constructor(t,e){this.coreWebService=t,this.dotcmsEventsService=e,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/"},e.subscribeTo("SESSION_DESTROYED").subscribe(()=>{this.logOutUser(),this.clearExperimentPersistence()}),e.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?Le(!0):this.loadAuth().pipe(fe(t=>!!t&&!!t.user))}getCurrentUser(){return this.coreWebService.request({url:this.urls.current}).pipe(fe(t=>t))}loadAuth(){return this.coreWebService.requestView({url:this.urls.getAuth}).pipe(Ie("entity"),hn(t=>{t.user&&this.setAuth(t)}),fe(t=>this.getFullAuth(t)))}changePassword(t,e){const i=JSON.stringify({password:t,token:e});return this.coreWebService.requestView({body:i,method:"POST",url:this.urls.changePassword}).pipe(Ie("entity"))}getLoginFormInfo(t,e){return this.setLanguage(t),this.coreWebService.requestView({body:{messagesKey:e,language:this.lang,country:this.country},method:"POST",url:this.urls.serverInfo}).pipe(Ie("bodyJsonObject"))}loginAs(t){return this.coreWebService.requestView({body:{password:t.password,userId:t.user.userId},method:"POST",url:this.urls.loginAs}).pipe(fe(e=>{if(!e.entity.loginAs)throw e.errorsMessages;return this.setAuth({loginAsUser:t.user,user:this._auth.user}),e}),Ie("entity","loginAs"))}loginUser({login:t,password:e,rememberMe:i,language:r,backEndLogin:o}){return this.setLanguage(r),this.coreWebService.requestView({body:{userId:t,password:e,rememberMe:i,language:this.lang,country:this.country,backEndLogin:o},method:"POST",url:this.urls.userAuth}).pipe(fe(s=>(this.setAuth({loginAsUser:null,user:s.entity}),this.coreWebService.subscribeToHttpError(Hc.UNAUTHORIZED).subscribe(()=>{this.logOutUser()}),s.entity)))}logoutAs(){return this.coreWebService.requestView({method:"PUT",url:`${this.urls.logoutAs}`}).pipe(fe(t=>(this.setAuth({loginAsUser:null,user:this._auth.user}),t.entity.logoutAs)))}recoverPassword(t){return this.coreWebService.requestView({body:{userId:t},method:"POST",url:this.urls.recoverPassword}).pipe(Ie("entity"))}watchUser(t){this.auth&&t(this.auth),this.auth$.subscribe(e=>{e.user&&t(e)})}setAuth(t){this._auth=this.getFullAuth(t),this._auth$.next(this.getFullAuth(t)),t.user?this.dotcmsEventsService.start():this._logout$.next()}setLanguage(t){if(void 0!==t&&""!==t){const e=t.split("_");this.lang=e[0],this.country=e[1]}else this.lang="",this.country=""}logOutUser(){window.location.href=`/dotAdmin/logout?r=${(new Date).getTime()}`}getFullAuth(t){const e=!!t.loginAsUser||!!Object.keys(t.loginAsUser||{}).length;return{...t,isLoginAs:e}}clearExperimentPersistence(){sessionStorage.removeItem(Zp)}}Zc.\u0275fac=function(t){return new(t||Zc)(F(Ht),F(wl))},Zc.\u0275prov=H({token:Zc,factory:Zc.\u0275fac});class Jp{constructor(t,e,i,r){this.router=e,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,t.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 t=this.portlets.entries().next().value;return t?t[0]:null}addPortletURL(t,e){this.portlets.set(t.replace(" ","_"),e)}getPortletURL(t){return this.portlets.get(t)}goToPortlet(t){this.router.gotoPortlet(t),this._currentPortletId=t}isPortlet(t){let e=this.getPortletId(t);return e.indexOf("?")>=0&&(e=e.substr(0,e.indexOf("?"))),this.portlets.has(e)}setCurrentPortlet(t){let e=this.getPortletId(t);e.indexOf("?")>=0&&(e=e.substr(0,e.indexOf("?"))),this._currentPortletId=e,this._currentPortlet$.next(e)}get currentPortlet$(){return this._currentPortlet$}setMenus(t){if(this.menus=t,this.menus.length){this.portlets=new Map;for(let e=0;e{this.setMenus(t.entity)},t=>this._menusChange$.error(t))}getPortletId(t){const e=t.split("/");return e[e.length-1]}}Jp.\u0275fac=function(t){return new(t||Jp)(F(Zc),F(hh),F(Ht),F(wl))},Jp.\u0275prov=H({token:Jp,factory:Jp.\u0275fac});class Xp{constructor(t,e,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"},e.subscribeToEvents(["ARCHIVE_SITE","UPDATE_SITE"]).subscribe(o=>this.eventResponse(o)),e.subscribeToEvents(this.events).subscribe(({data:o})=>this.siteEventsHandler(o)),e.subscribeToEvents(["SWITCH_SITE"]).subscribe(({data:o})=>this.setCurrentSite(o)),t.watchUser(()=>this.loadCurrentSite())}eventResponse({name:t,data:e}){this.loggerService.debug("Capturing Site event",t,e),e.identifier===this.selectedSite.identifier&&("ARCHIVE_SITE"===t?this.switchToDefaultSite().pipe(Et(1),ai(r=>this.switchSite(r))).subscribe():this.loadCurrentSite())}siteEventsHandler(t){this._refreshSites$.next(t)}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(Ie("entity"))}getSiteById(t){return this.coreWebService.requestView({url:`/api/content/render/false/query/+contentType:host%20+identifier:${t}`}).pipe(Ie("contentlets"),fe(e=>e[0]))}switchSiteById(t){return this.loggerService.debug("Applying a Site Switch"),this.getSiteById(t).pipe(ai(e=>e?this.switchSite(e):Le(null)),Et(1))}switchSite(t){return this.loggerService.debug("Applying a Site Switch",t.identifier),this.coreWebService.requestView({method:"PUT",url:`${this.urls.switchSiteUrl}/${t.identifier}`}).pipe(Et(1),hn(()=>this.setCurrentSite(t)),fe(()=>t))}getCurrentSite(){return ws(this.selectedSite?Le(this.selectedSite):this.requestCurrentSite(),this.switchSite$)}requestCurrentSite(){return this.coreWebService.requestView({url:this.urls.currentSiteUrl}).pipe(Ie("entity"))}setCurrentSite(t){this.selectedSite=t,this._switchSite$.next({...t})}loadCurrentSite(){this.getCurrentSite().pipe(Et(1)).subscribe(t=>{this.setCurrentSite(t)})}}Xp.\u0275fac=function(t){return new(t||Xp)(F(Zc),F(wl),F(Ht),F(Co))},Xp.\u0275prov=H({token:Xp,factory:Xp.\u0275fac,providedIn:"root"});class Jc{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}Jc.\u0275fac=function(t){return new(t||Jc)},Jc.\u0275prov=H({token:Jc,factory:Jc.\u0275fac});class ph{storeValue(t,e){localStorage.setItem(t,e)}getValue(t){return localStorage.getItem(t)}clearValue(t){localStorage.removeItem(t)}clear(){localStorage.clear()}}ph.\u0275fac=function(t){return new(t||ph)},ph.\u0275prov=H({token:ph,factory:ph.\u0275fac});class em{}em.\u0275fac=function(t){return new(t||em)},em.\u0275mod=Xe({type:em}),em.\u0275inj=lt({providers:[ph]});let l1=((tm=class{constructor(t){this.iconPath=t.iconPath}displayErrorMessage(t){this.displayMessage("Error",t,"error")}displaySuccessMessage(t){this.displayMessage("Success",t,"success")}displayInfoMessage(t){this.displayMessage("Info",t,"info")}displayMessage(t,e,i){let r;return r=new Notification(i,{body:e,icon:this.iconPath+"/"+i+".png"}),r}}).\u0275prov=H({token:tm,factory:tm.\u0275fac}),tm);l1=function cie(n,t,e,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,t,e,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(t,e,o):s(t,e))||o);return r>3&&o&&Object.defineProperty(t,e,o),o}([ky("config"),function uie(n,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,t)}("design:paramtypes",[Jc])],l1);class nm{}nm.\u0275fac=function(t){return new(t||nm)},nm.\u0275mod=Xe({type:nm}),nm.\u0275inj=lt({providers:[Jc,l1]});class im{constructor(t){this._http=t}request(t){t.method||(t.method="GET");const e={params:new ps};return t.params&&Object.keys(t.params).forEach(i=>{e.params=e.params.set(i,t.params[i])}),this._http.request(new Oa(t.method,t.url,t.body,{params:e.params})).pipe(Tn(i=>i.type===An.Response),fe(i=>{try{return i.body}catch{return i}}))}requestView(t){t.method||(t.method="GET");const e={headers:new Yr,params:new ps};return t.params&&Object.keys(t.params).forEach(i=>{e.params=e.params.set(i,t.params[i])}),this._http.request(new Oa(t.method,t.url,t.body,{params:e.params})).pipe(Tn(i=>i.type===An.Response),fe(i=>new kM(i)))}subscribeTo(t){return Le({error:t})}}function GF(n,t){return n.replace(/{(\d+)}/g,(e,i)=>typeof t[i]<"u"?t[i]:e)}im.\u0275fac=function(t){return new(t||im)(F(ar))},im.\u0275prov=H({token:im,factory:im.\u0275fac});class rm{constructor(){this.display=!1}show(){this.display=!0}hide(){this.display=!1}}rm.\u0275fac=function(t){return new(t||rm)},rm.\u0275prov=H({token:rm,factory:rm.\u0275fac,providedIn:"root"});class mh{constructor(t){this.coreWebService=t,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(fe(t=>t))}getUserPermissions(t,e=[],i=[]){let r=e.length?`${this.userPermissionsUrl}&permission={1}`:this.userPermissionsUrl;r=i.length?`${r}&permissiontype={2}`:r;const o=GF(r,[t,e.join(","),i.join(",")]);return this.coreWebService.requestView({url:o}).pipe(Et(1),Ie("entity"))}hasAccessToPortlet(t){return this.coreWebService.requestView({url:this.porletAccessUrl.replace("{0}",t)}).pipe(Et(1),Ie("entity","response"))}}mh.\u0275fac=function(t){return new(t||mh)(F(Ht))},mh.\u0275prov=H({token:mh,factory:mh.\u0275fac});class om{constructor(t,e){this.coreWebService=t,this.currentUser=e,this.bundleUrl="api/bundle/getunsendbundles/userid",this.addToBundleUrl="/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle"}getBundles(){return this.currentUser.getCurrentUser().pipe(ni(t=>this.coreWebService.requestView({url:`${this.bundleUrl}/${t.userId}`}).pipe(Ie("bodyJsonObject","items"))))}addToBundle(t,e){return this.coreWebService.request({body:`assetIdentifier=${t}&bundleName=${e.name}&bundleSelect=${e.id}`,headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"POST",url:this.addToBundleUrl}).pipe(fe(i=>i))}}om.\u0275fac=function(t){return new(t||om)(F(Ht),F(mh))},om.\u0275prov=H({token:om,factory:om.\u0275fac});const qF=n=>{const t=parseInt(n,0);if(t)return t;try{return JSON.parse(n)}catch{return n}};class gh{setItem(t,e){let i;i="object"==typeof e?JSON.stringify(e):e,localStorage.setItem(t,i)}getItem(t){const e=localStorage.getItem(t);return qF(e)}removeItem(t){localStorage.removeItem(t)}clear(){localStorage.clear()}listen(t){return Tv(window,"storage").pipe(Tn(({key:e})=>e===t),fe(e=>qF(e.newValue)))}}gh.\u0275fac=function(t){return new(t||gh)},gh.\u0275prov=H({token:gh,factory:gh.\u0275fac,providedIn:"root"});class Zr{constructor(t,e){this.http=t,this.dotLocalstorageService=e,this.messageMap={},this.MESSAGES_LOCALSTORAGE_KEY="dotMessagesKeys",this.BUILDATE_LOCALSTORAGE_KEY="buildDate"}init(t){if(t&&(this.dotLocalstorageService.getItem(this.BUILDATE_LOCALSTORAGE_KEY)!==t?.buildDate||t.language))this.getAll(t.language||"default"),t.buildDate&&this.dotLocalstorageService.setItem(this.BUILDATE_LOCALSTORAGE_KEY,t.buildDate);else{const e=this.dotLocalstorageService.getItem(this.MESSAGES_LOCALSTORAGE_KEY);e?this.messageMap=e:this.getAll(t?.language||"default")}}get(t,...e){return this.messageMap[t]?e.length?GF(this.messageMap[t],e):this.messageMap[t]:t}getAll(t){this.http.get(this.geti18nURL(t)).pipe(Et(1),Ie("entity")).subscribe(e=>{this.messageMap=e,this.dotLocalstorageService.setItem(this.MESSAGES_LOCALSTORAGE_KEY,this.messageMap)})}geti18nURL(t){return`/api/v2/languages/${t||"default"}/keys`}}Zr.\u0275fac=function(t){return new(t||Zr)(F(ar),F(gh))},Zr.\u0275prov=H({token:Zr,factory:Zr.\u0275fac,providedIn:"root"});class sm{constructor(t,e){this.confirmationService=t,this.dotMessageService=e,this.alertModel=null,this.confirmModel=null,this._confirmDialogOpened$=new ae}get confirmDialogOpened$(){return this._confirmDialogOpened$.asObservable()}confirm(t){t.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),reject:this.dotMessageService.get("dot.common.dialog.reject"),...t.footerLabel},this.confirmModel=t,setTimeout(()=>{this.confirmationService.confirm(t),this._confirmDialogOpened$.next(!0)},0)}alert(t){t.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),...t.footerLabel},this.alertModel=t,setTimeout(()=>{this._confirmDialogOpened$.next(!0)},0)}alertAccept(t){this.alertModel.accept&&this.alertModel.accept(t),this.alertModel=null}alertReject(t){this.alertModel.reject&&this.alertModel.reject(t),this.alertModel=null}clearConfirm(){this.confirmModel=null}}sm.\u0275fac=function(t){return new(t||sm)(F(NL),F(Zr))},sm.\u0275prov=H({token:sm,factory:sm.\u0275fac});class yh{constructor(t){this.http=t}getFiltered(t,e,i=!1){return this.http.get(`/api/v1/containers/?filter=${t}&perPage=${e}&system=${i}`).pipe(Ie("entity"))}}function yie(n,t,e){return 0===e?[t]:(n.push(t),n)}yh.\u0275fac=function(t){return new(t||yh)(F(ar))},yh.\u0275prov=H({token:yh,factory:yh.\u0275fac});class am{constructor(t){this.coreWebService=t}getContentType(t){return this.coreWebService.requestView({url:`v1/contenttype/id/${t}`}).pipe(Et(1),Ie("entity"))}getContentTypes({filter:t="",page:e=40,type:i=""}){return this.coreWebService.requestView({url:`/api/v1/contenttype?filter=${t}&orderby=name&direction=ASC&per_page=${e}${i?`&type=${i}`:""}`}).pipe(Ie("entity"))}getAllContentTypes(){return this.getBaseTypes().pipe(yf(t=>t),Tn(t=>!this.isRecentContentType(t))).pipe(function _ie(){return function gie(n,t){return arguments.length>=2?function(i){return pe(Lv(n,t),Ap(1),nh(t))(i)}:function(i){return pe(Lv((r,o,s)=>n(r,o,s+1)),Ap(1))(i)}}(yie,[])}())}filterContentTypes(t="",e=""){return this.coreWebService.requestView({body:{filter:{types:e,query:t},orderBy:"name",direction:"ASC",perPage:40},method:"POST",url:"/api/v1/contenttype/_filter"}).pipe(Ie("entity"))}getUrlById(t){return this.getBaseTypes().pipe(yf(e=>e),Ie("types"),yf(e=>e),Tn(e=>e.variable.toLocaleLowerCase()===t),Ie("action"))}isContentTypeInMenu(t){return this.getUrlById(t).pipe(fe(e=>!!e),nh(!1))}saveCopyContentType(t,e){return this.coreWebService.requestView({body:{...e},method:"POST",url:`/api/v1/contenttype/${t}/_copy`}).pipe(Ie("entity"))}isRecentContentType(t){return t.name.startsWith("RECENT")}getBaseTypes(){return this.coreWebService.requestView({url:"v1/contenttype/basetypes"}).pipe(Ie("entity"))}}am.\u0275fac=function(t){return new(t||am)(F(Ht))},am.\u0275prov=H({token:am,factory:am.\u0275fac});class lm{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(t){return this.getItem(t,"icon")}getClazz(t){return this.getItem(t,"clazz")}getLabel(t){return this.getItem(t,"label")}getItem(t,e){let i,r=!1;if(t.indexOf("_old")>0&&(r=!0,t=t.replace("_old","")),t){t=this.getTypeName(t);for(let o=0;or.lift(function vie({bufferSize:n=Number.POSITIVE_INFINITY,windowTime:t=Number.POSITIVE_INFINITY,refCount:e,scheduler:i}){let r,s,o=0,a=!1,l=!1;return function(u){let d;o++,!r||a?(a=!1,r=new H_(n,t,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&&e&&0===o&&(s.unsubscribe(),s=void 0,r=void 0)})}}(i))}um.\u0275fac=function(t){return new(t||um)(F(Ht))},um.\u0275prov=H({token:um,factory:um.\u0275fac});class dm{constructor(t){this.http=t}copyInPage(t){const e={...t,personalization:t?.personalization||"dot:default"};return this.http.put("/api/v1/page/copyContent",e).pipe(KF(),Ie("entity"))}}dm.\u0275fac=function(t){return new(t||dm)(F(ar))},dm.\u0275prov=H({token:dm,factory:dm.\u0275fac,providedIn:"root"});class hm{constructor(t){this.coreWebService=t}postData(t,e){return this.coreWebService.requestView({body:e,method:"POST",url:`${t}`}).pipe(Ie("entity"))}putData(t,e){return this.coreWebService.requestView({body:e,method:"PUT",url:`${t}`}).pipe(Ie("entity"))}getDataById(t,e,i="entity"){return this.coreWebService.requestView({url:`${t}/id/${e}`}).pipe(Ie(i))}delete(t,e){return this.coreWebService.requestView({method:"DELETE",url:`${t}/${e}`}).pipe(Ie("entity"))}}hm.\u0275fac=function(t){return new(t||hm)(F(Ht))},hm.\u0275prov=H({token:hm,factory:hm.\u0275fac});class fm{constructor(t){this.coreWebService=t}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(Ie("contentlets"))}}fm.\u0275fac=function(t){return new(t||fm)(F(Ht))},fm.\u0275prov=H({token:fm,factory:fm.\u0275fac});class ja{setVariationId(t){sessionStorage.setItem(Zp,t)}getVariationId(){return sessionStorage.getItem(Zp)||"DEFAULT"}removeVariantId(){sessionStorage.removeItem(Zp)}}ja.\u0275fac=function(t){return new(t||ja)},ja.\u0275prov=H({token:ja,factory:ja.\u0275fac});class pm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}save(t,e){const i={method:"POST",body:e,url:`v1/page/${t}/content`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Ie("entity"))}whatChange(t,e){return this.coreWebService.requestView({url:`v1/page/${t}/render/versions?langId=${e}`}).pipe(Ie("entity"))}}pm.\u0275fac=function(t){return new(t||pm)(F(Ht),F(ja))},pm.\u0275prov=H({token:pm,factory:pm.\u0275fac});var rb=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(rb||(rb={})),rb))();class mm{constructor(t){this.coreWebService=t,this._paginationPerPage=40,this._offset="0",this._url="/api/content/_search",this._defaultQueryParams={"+languageId":"1","+deleted":"false","+working":"true"},this._sortField="modDate",this._sortOrder=rb.DESC,this._extraParams=new Map(Object.entries(this._defaultQueryParams))}get(t){this.setBaseParams(t);const e=this.getESQuery(t,this.getObjectFromMap(this._extraParams));return this.coreWebService.requestView({body:JSON.stringify(e),method:"POST",url:this._url}).pipe(Ie("entity"),Et(1))}setExtraParams(t,e){null!=e&&this._extraParams.set(t,e.toString())}getESQuery(t,e){return{query:`${t.query} ${JSON.stringify(e).replace(/["{},]/g," ")}`,sort:`${this._sortField||""} ${this._sortOrder||""}`,limit:this._paginationPerPage,offset:this._offset}}setBaseParams(t){this._extraParams.clear(),this._paginationPerPage=t.itemsPerPage||this._paginationPerPage,this._sortField=t.sortField||this._sortField,this._sortOrder=t.sortOrder||this._sortOrder,this._offset=t.offset||this._offset,t.lang&&this.setExtraParams("+languageId",t.lang);let e=t.filter||"";e&&e.indexOf(" ")>0&&(e=`'${e.replace(/'/g,"\\'")}'`),e&&this.setExtraParams("+title",`${e}*`)}getObjectFromMap(t){return Array.from(t).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}}mm.\u0275fac=function(t){return new(t||mm)(F(Ht))},mm.\u0275prov=H({token:mm,factory:mm.\u0275fac});class _h{constructor(){this.subject=new ae}listen(t){return this.subject.asObservable().pipe(Tn(e=>e.name===t))}notify(t,e){this.subject.next({name:t,data:e})}}_h.\u0275fac=function(t){return new(t||_h)},_h.\u0275prov=H({token:_h,factory:_h.\u0275fac});class gm{constructor(){this.data=new ae}get showDialog$(){return this.data.asObservable()}open(t){this.data.next(t)}}gm.\u0275fac=function(t){return new(t||gm)},gm.\u0275prov=H({token:gm,factory:gm.\u0275fac});class ym{constructor(t){this.coreWebService=t}get(t){return this.coreWebService.requestView({url:t?`v2/languages?contentInode=${t}`:"v2/languages"}).pipe(Ie("entity"))}}ym.\u0275fac=function(t){return new(t||ym)(F(Ht))},ym.\u0275prov=H({token:ym,factory:ym.\u0275fac});const Cie=[{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 _m{constructor(t){this.coreWebService=t,this.unlicenseData=new Kr({icon:"",titleKey:"",url:""}),this.licenseURL="v1/appconfiguration"}isEnterprise(){return this.getLicense().pipe(fe(t=>t.level>=200))}canAccessEnterprisePortlet(t){return this.isEnterprise().pipe(Et(1),fe(e=>{const i=this.checksIfEnterpriseUrl(t);return!i||i&&e}))}checksIfEnterpriseUrl(t){const e=Cie.filter(i=>0===t.indexOf(i.url));return e.length&&this.unlicenseData.next(...e),!!e.length}getLicense(){return this.license?Le(this.license):this.coreWebService.requestView({url:this.licenseURL}).pipe(Ie("entity","config","license"),hn(t=>{this.setLicense(t)}))}updateLicense(){this.coreWebService.requestView({url:this.licenseURL}).pipe(Ie("entity","config","license")).subscribe(t=>{this.setLicense(t)})}setLicense(t){this.license={...t}}}_m.\u0275fac=function(t){return new(t||_m)(F(Ht))},_m.\u0275prov=H({token:_m,factory:_m.\u0275fac});class vm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}save(t,e){const i={body:e,method:"POST",url:`v1/page/${t}/layout`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Ie("entity"),fe(o=>new aie(o)))}}vm.\u0275fac=function(t){return new(t||vm)(F(Ht),F(ja))},vm.\u0275prov=H({token:vm,factory:vm.\u0275fac});class bm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}checkPermission(t){return this.coreWebService.requestView({body:{...t},method:"POST",url:"v1/page/_check-permission"}).pipe(Ie("entity"))}get({viewAs:t,mode:e,url:i},r){const o=this.getOptionalViewAsParams(t,e);return this.coreWebService.requestView({url:`v1/page/render/${i?.replace(/^\//,"")}`,params:{...r,...o}}).pipe(Ie("entity"))}getOptionalViewAsParams(t={},e=nb.PREVIEW){return{...this.getPersonaParam(t.persona),...this.getDeviceParam(t.device),...this.getLanguageParam(t.language),...this.getModeParam(e),variantName:this.dotSessionStorageService.getVariationId()}}getModeParam(t){return t?{mode:t}:{}}getPersonaParam(t){return t?{"com.dotmarketing.persona.id":t.identifier||""}:{}}getDeviceParam(t){return t?{device_inode:t.inode}:{}}getLanguageParam(t){return t?{language_id:t.toString()}:{}}}bm.\u0275fac=function(t){return new(t||bm)(F(Ht),F(ja))},bm.\u0275prov=H({token:bm,factory:bm.\u0275fac});class wm{constructor(t){this.coreWebService=t}getPages(t=""){return this.coreWebService.requestView({url:`/api/v1/page/types?filter=${t}`}).pipe(Et(1),Ie("entity"))}}wm.\u0275fac=function(t){return new(t||wm)(F(Ht))},wm.\u0275prov=H({token:wm,factory:wm.\u0275fac});class Cm{constructor(t){this.http=t}getByUrl(t){return this.http.post("/api/v1/page/actions",{host_id:t.host_id,language_id:t.language_id,url:t.url,renderMode:t.renderMode}).pipe(Ie("entity"))}}Cm.\u0275fac=function(t){return new(t||Cm)(F(ar))},Cm.\u0275prov=H({token:Cm,factory:Cm.\u0275fac});class Dm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}personalized(t,e){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"POST",url:"/api/v1/personalization/pagepersonas",params:{variantName:i},body:{pageId:t,personaTag:e}}).pipe(Ie("entity"))}despersonalized(t,e){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"DELETE",url:`/api/v1/personalization/pagepersonas/page/${t}/personalization/${e}`,params:{variantName:i}}).pipe(Ie("entity"))}}Dm.\u0275fac=function(t){return new(t||Dm)(F(Ht),F(ja))},Dm.\u0275prov=H({token:Dm,factory:Dm.\u0275fac});class Tm{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:"content/respectFrontendRoles/false/render/false/query/+contentType:persona +live:true +deleted:false +working:true"}).pipe(Ie("contentlets"))}}Tm.\u0275fac=function(t){return new(t||Tm)(F(Ht))},Tm.\u0275prov=H({token:Tm,factory:Tm.\u0275fac});class Mm{constructor(t){this.http=t}getKey(t){return this.http.get("/api/v1/configuration/config",{params:{keys:t}}).pipe(Et(1),Ie("entity",t))}getKeys(t){return this.http.get("/api/v1/configuration/config",{params:{keys:t.join()}}).pipe(Et(1),Ie("entity"))}getKeyAsList(t){return this.http.get("/api/v1/configuration/config",{params:{keys:`list:${t}`}}).pipe(Et(1),Ie("entity",t))}getFeatureFlag(t){return this.getKey(t).pipe(fe(e=>"true"===e))}getFeatureFlags(t){return this.getKeys(t).pipe(fe(e=>Object.keys(e).reduce((i,r)=>(i[r]="true"===e[r],i),{})))}}Mm.\u0275fac=function(t){return new(t||Mm)(F(ar))},Mm.\u0275prov=H({token:Mm,factory:Mm.\u0275fac,providedIn:"root"});class Sm{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:"/api/v1/pushpublish/filters/"}).pipe(Ie("entity"))}}Sm.\u0275fac=function(t){return new(t||Sm)(F(Ht))},Sm.\u0275prov=H({token:Sm,factory:Sm.\u0275fac});class Em{constructor(t,e){this.dotMessageService=t,this.coreWebService=e}get(t,e){return this.coreWebService.requestView({url:`/api/v1/roles/${t}/rolehierarchyanduserroles?roleHierarchyForAssign=${e}`}).pipe(Ie("entity"),fe(this.processRolesResponse.bind(this)))}search(){return this.coreWebService.requestView({url:"/api/v1/roles/_search"}).pipe(Ie("entity"),fe(this.processRolesResponse.bind(this)))}processRolesResponse(t){return t.filter(e=>"anonymous"!==e.roleKey).map(e=>("CMS Anonymous"===e.roleKey?e.name=this.dotMessageService.get("current-user"):e.user&&(e.name=`${e.name}`),e))}}Em.\u0275fac=function(t){return new(t||Em)(F(Zr),F(Ht))},Em.\u0275prov=H({token:Em,factory:Em.\u0275fac});class vh{constructor(t){this.http=t,this.BASE_SITE_URL="/api/v1/site",this.params={archived:!1,live:!0,system:!0},this.defaultPerpage=10}set searchParam(t){this.params=t}getSites(t="*",e){return this.http.get(this.siteURL(t,e)).pipe(Ie("entity"))}siteURL(t,e){const r=`filter=${t}&perPage=${e||this.defaultPerpage}&${this.getQueryParams()}`;return`${this.BASE_SITE_URL}?${r}`}getQueryParams(){return Object.keys(this.params).map(t=>`${t}=${this.params[t]}`).join("&")}}vh.\u0275fac=function(t){return new(t||vh)(F(ar))},vh.\u0275prov=H({token:vh,factory:vh.\u0275fac,providedIn:"root"});class xm{constructor(t){this.coreWebService=t}setSelectedFolder(t){return this.coreWebService.requestView({body:{path:t},method:"PUT",url:"/api/v1/browser/selectedfolder"}).pipe(Et(1))}}xm.\u0275fac=function(t){return new(t||xm)(F(Ht))},xm.\u0275prov=H({token:xm,factory:xm.\u0275fac});class Im{constructor(t){this.coreWebService=t}getSuggestions(t){return this.coreWebService.requestView({url:"v1/tags"+(t?`?name=${t}`:"")}).pipe(Ie("bodyJsonObject"),fe(e=>Object.entries(e).map(([i,r])=>r)))}}Im.\u0275fac=function(t){return new(t||Im)(F(Ht))},Im.\u0275prov=H({token:Im,factory:Im.\u0275fac});class Om{constructor(t){this.coreWebService=t}get(t){return this.coreWebService.requestView({url:"v1/themes/id/"+t}).pipe(Ie("entity"))}}function QF(n,t,e,i,r,o,s){try{var a=n[o](s),l=a.value}catch(c){return void e(c)}a.done?t(l):Promise.resolve(l).then(i,r)}function Xc(n){return function(){var t=this,e=arguments;return new Promise(function(i,r){var o=n.apply(t,e);function s(l){QF(o,i,r,s,a,"next",l)}function a(l){QF(o,i,r,s,a,"throw",l)}s(void 0)})}}Om.\u0275fac=function(t){return new(t||Om)(F(Ht))},Om.\u0275prov=H({token:Om,factory:Om.\u0275fac});const Tie={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"};class bh{uploadFile({file:t,maxSize:e,signal:i}){return"string"==typeof t?this.uploadFileByURL(t,i):this.uploadBinaryFile({file:t,maxSize:e,signal:i})}uploadFileByURL(t,e){return fetch("/api/v1/temp/byUrl",{method:"POST",signal:e,headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:t})}).then(function(){var r=Xc(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:t,maxSize:e,signal:i}){let r="/api/v1/temp";r+=e?`?maxFileLength=${e}`:"";const o=new FormData;return o.append("file",t),fetch(r,{method:"POST",signal:i,headers:{Origin:window.location.hostname},body:o}).then(function(){var s=Xc(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(t,e){let i="";try{i=t.message||t.errors[0].message}catch{i=Tie[e||500]}return{message:i,status:500|e}}}bh.\u0275fac=function(t){return new(t||bh)},bh.\u0275prov=H({token:bh,factory:bh.\u0275fac,providedIn:"root"});class Am{constructor(t){this.coreWebService=t}bringBack(t){return this.coreWebService.requestView({method:"PUT",url:`/api/v1/versionables/${t}/_bringback`}).pipe(Ie("entity"))}}Am.\u0275fac=function(t){return new(t||Am)(F(Ht))},Am.\u0275prov=H({token:Am,factory:Am.\u0275fac});var eu=(()=>(function(n){n.NEW="NEW",n.DESTROY="DESTROY",n.PUBLISH="PUBLISH",n.EDIT="EDIT"}(eu||(eu={})),eu))();class km{constructor(t){this.coreWebService=t}fireTo(t,e,i){return this.coreWebService.requestView({body:i,method:"PUT",url:`v1/workflow/actions/${e}/fire?inode=${t}&indexPolicy=WAIT_FOR`}).pipe(Ie("entity"))}bulkFire(t){return this.coreWebService.requestView({body:t,method:"PUT",url:"/api/v1/workflow/contentlet/actions/bulk/fire"}).pipe(Ie("entity"))}newContentlet(t,e){return this.request({contentType:t,data:e,action:eu.NEW})}publishContentlet(t,e,i){return this.request({contentType:t,data:e,action:eu.PUBLISH,individualPermissions:i})}saveContentlet(t){return this.request({data:t,action:eu.EDIT})}deleteContentlet(t){return this.request({data:t,action:eu.DESTROY})}publishContentletAndWaitForIndex(t,e,i){return this.publishContentlet(t,{...e,indexPolicy:"WAIT_FOR"},i)}request({contentType:t,data:e,action:i,individualPermissions:r}){const o=t?{contentType:t,...e}:e;return this.coreWebService.requestView({method:"PUT",url:`v1/workflow/actions/default/fire/${i}${e.inode?`?inode=${e.inode}`:""}`,body:r?{contentlet:o,individualPermissions:r}:{contentlet:o}}).pipe(Et(1),Ie("entity"))}}km.\u0275fac=function(t){return new(t||km)(F(Ht))},km.\u0275prov=H({token:km,factory:km.\u0275fac});class Nm{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:"v1/workflow/schemes"}).pipe(Ie("entity"))}getSystem(){return this.get().pipe(ai(t=>t.filter(e=>e.system)),Et(1))}}Nm.\u0275fac=function(t){return new(t||Nm)(F(Ht))},Nm.\u0275prov=H({token:Nm,factory:Nm.\u0275fac});class Pm{constructor(t){this.coreWebService=t}getByWorkflows(t=[]){return this.coreWebService.requestView({method:"POST",url:"/api/v1/workflow/schemes/actions/NEW",body:{schemes:t.map(this.getWorkFlowId)}}).pipe(Ie("entity"))}getByInode(t,e){return this.coreWebService.requestView({url:`v1/workflow/contentlet/${t}/actions${e?`?renderMode=${e}`:""}`}).pipe(Ie("entity"))}getWorkFlowId(t){return t&&t.id}}Pm.\u0275fac=function(t){return new(t||Pm)(F(Ht))},Pm.\u0275prov=H({token:Pm,factory:Pm.\u0275fac});var ob=(()=>(function(n){n[n.ASC=1]="ASC",n[n.DESC=-1]="DESC"}(ob||(ob={})),ob))();class Qi{constructor(t){this.coreWebService=t,this.links={},this.paginationPerPage=40,this._extraParams=new Map}get url(){return this._url}set url(t){this._url!==t&&(this.links={},this._url=t)}get filter(){return this._filter}set filter(t){this._filter!==t&&(this.links={},this._filter=t)}set searchParam(t){this._searchParam!==t&&(this.links=t.length>0?{}:this.links,this._searchParam=t)}get searchParam(){return this._searchParam}setExtraParams(t,e){null!=e&&(this.extraParams.set(t,e.toString()),this.links={})}deleteExtraParams(t){this.extraParams.delete(t)}resetExtraParams(){this.extraParams.clear()}get extraParams(){return this._extraParams}get sortField(){return this._sortField}set sortField(t){this._sortField!==t&&(this.links={},this._sortField=t)}get sortOrder(){return this._sortOrder}set sortOrder(t){this._sortOrder!==t&&(this.links={},this._sortOrder=t)}get(t){const e={...this.getParams(),...this.getObjectFromMap(this.extraParams)},i=this.sanitizeQueryParams(t,e);return this.coreWebService.requestView({params:e,url:i||this.url}).pipe(fe(r=>(this.setLinks(r.header(Qi.LINK_HEADER_NAME)),this.paginationPerPage=parseInt(r.header(Qi.PAGINATION_PER_PAGE_HEADER_NAME),10),this.currentPage=parseInt(r.header(Qi.PAGINATION_CURRENT_PAGE_HEADER_NAME),10),this.maxLinksPage=parseInt(r.header(Qi.PAGINATION_MAX_LINK_PAGES_HEADER_NAME),10),this.totalRecords=parseInt(r.header(Qi.PAGINATION_TOTAL_ENTRIES_HEADER_NAME),10),r.entity)),Et(1))}getLastPage(){return this.get(this.links.last)}getFirstPage(){return this.get(this.links.first)}getPage(t=1){const e=this.links["x-page"]?this.links["x-page"].replace("pageValue",String(t)):void 0;return this.get(e)}getCurrentPage(){return this.getPage(this.currentPage)}getNextPage(){return this.get(this.links.next)}getPrevPage(){return this.get(this.links.prev)}getWithOffset(t){const e=this.getPageFromOffset(t);return this.getPage(e)}getPageFromOffset(t){return parseInt(String(t/this.paginationPerPage),10)+1}setLinks(t){(t?.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 t=new Map;return this.filter&&t.set("filter",this.filter),this.searchParam&&t.set("searchParam",this.searchParam),this.sortField&&t.set("orderby",this.sortField),this.sortOrder&&t.set("direction",ob[this.sortOrder]),this.paginationPerPage&&t.set("per_page",String(this.paginationPerPage)),this.getObjectFromMap(t)}getObjectFromMap(t){return Array.from(t).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}sanitizeQueryParams(t="",e){const i=t?.split("?"),r=i[0],o=i[1];if(!o)return t;const s=new URLSearchParams(o);for(const a in e)s.delete(a);return s.toString()?`${r}?${s.toString()}`:r}}Qi.LINK_HEADER_NAME="Link",Qi.PAGINATION_PER_PAGE_HEADER_NAME="X-Pagination-Per-Page",Qi.PAGINATION_CURRENT_PAGE_HEADER_NAME="X-Pagination-Current-Page",Qi.PAGINATION_MAX_LINK_PAGES_HEADER_NAME="X-Pagination-Link-Pages",Qi.PAGINATION_TOTAL_ENTRIES_HEADER_NAME="X-Pagination-Total-Entries",Qi.\u0275fac=function(t){return new(t||Qi)(F(Ht))},Qi.\u0275prov=H({token:Qi,factory:Qi.\u0275fac});class Lm{constructor(t){this.http=t,this.seoToolsUrl="assets/seo/page-tools.json"}get(){return this.http.get(this.seoToolsUrl).pipe(Ie("pageTools"))}}function ur(n){this.content=n}Lm.\u0275fac=function(t){return new(t||Lm)(F(ar))},Lm.\u0275prov=H({token:Lm,factory:Lm.\u0275fac}),ur.prototype={constructor:ur,find:function(n){for(var t=0;t>1}},ur.from=function(n){if(n instanceof ur)return n;var t=[];if(n)for(var e in n)t.push(e,n[e]);return new ur(t)};const ZF=ur;function JF(n,t,e){for(let i=0;;i++){if(i==n.childCount||i==t.childCount)return n.childCount==t.childCount?null:e;let r=n.child(i),o=t.child(i);if(r!=o){if(!r.sameMarkup(o))return e;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)e++;return e}if(r.content.size||o.content.size){let s=JF(r.content,o.content,e+1);if(null!=s)return s}e+=r.nodeSize}else e+=r.nodeSize}}function XF(n,t,e,i){for(let r=n.childCount,o=t.childCount;;){if(0==r||0==o)return r==o?null:{a:e,b:i};let s=n.child(--r),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:e,b:i};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ct&&!1!==i(l,r+a,o||null,s)&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,e-u),i,r+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,i,r){let o="",s=!0;return this.nodesBetween(t,e,(a,l)=>{a.isText?(o+=a.text.slice(Math.max(t,l)-l,e-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(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,i=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(i)&&(r[r.length-1]=e.withText(e.text+i.text),o=1);ot)for(let o=0,s=0;st&&((se)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,e-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,e-s-1))),i.push(a),r+=a.nodeSize),s=l}return new ce(i,r)}cutByIndex(t,e){return t==e?ce.empty:0==t&&e==this.content.length?this:new ce(this.content.slice(t,e))}replaceChild(t,e){let i=this.content[t];if(i==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-i.nodeSize;return r[t]=e,new ce(r,o)}addToStart(t){return new ce([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ce(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let i=0,r=0;;i++){let s=r+this.child(i).nodeSize;if(s>=t)return s==t||e>0?sb(i+1,s):sb(i,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return ce.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new ce(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ce.empty;let e,i=0;for(let r=0;r{class n{constructor(e,i){this.type=e,this.attrs=i}addToSet(e){let i,r=!1;for(let o=0;othis.type.rank&&(i||(i=e.slice(0,o)),i.push(this),r=!0),i&&i.push(s)}}return i||(i=e.slice()),r||i.push(this),i}removeFromSet(e){for(let i=0;ir.type.rank-o.type.rank),i}}return n.none=[],n})();class lb extends Error{}class Ce{constructor(t,e,i){this.content=t,this.openStart=e,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let i=tj(this.content,t+this.openStart,e);return i&&new Ce(i,this.openStart,this.openEnd)}removeBetween(t,e){return new Ce(ej(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return Ce.empty;let i=e.openStart||0,r=e.openEnd||0;if("number"!=typeof i||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Ce(ce.fromJSON(t,e.content),i,r)}static maxOpen(t,e=!0){let i=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new Ce(t,i,r)}}function ej(n,t,e){let{index:i,offset:r}=n.findIndex(t),o=n.maybeChild(i),{index:s,offset:a}=n.findIndex(e);if(r==t||o.isText){if(a!=e&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,t).append(n.cut(e))}if(i!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(i,o.copy(ej(o.content,t-r-1,e-r-1)))}function tj(n,t,e,i){let{index:r,offset:o}=n.findIndex(t),s=n.maybeChild(r);if(o==t||s.isText)return i&&!i.canReplace(r,r,e)?null:n.cut(0,t).append(e).append(n.cut(t));let a=tj(s.content,t-o-1,e);return a&&n.replaceChild(r,s.copy(a))}function Mie(n,t,e){if(e.openStart>n.depth)throw new lb("Inserted content deeper than insertion position");if(n.depth-e.openStart!=t.depth-e.openEnd)throw new lb("Inconsistent open depths");return nj(n,t,e,0)}function nj(n,t,e,i){let r=n.index(i),o=n.node(i);if(r==t.index(i)&&i=0;o--)r=t.node(o).copy(ce.from(r));return{start:r.resolveNoCache(n.openStart+e),end:r.resolveNoCache(r.content.size-n.openEnd-e)}}(e,n);return nu(o,rj(n,s,a,t,i))}{let s=n.parent,a=s.content;return nu(s,a.cut(0,n.parentOffset).append(e.content).append(a.cut(t.parentOffset)))}}return nu(o,cb(n,t,i))}function ij(n,t){if(!t.type.compatibleContent(n.type))throw new lb("Cannot join "+t.type.name+" onto "+n.type.name)}function u1(n,t,e){let i=n.node(e);return ij(i,t.node(e)),i}function tu(n,t){let e=t.length-1;e>=0&&n.isText&&n.sameMarkup(t[e])?t[e]=n.withText(t[e].text+n.text):t.push(n)}function Rm(n,t,e,i){let r=(t||n).node(e),o=0,s=t?t.index(e):r.childCount;n&&(o=n.index(e),n.depth>e?o++:n.textOffset&&(tu(n.nodeAfter,i),o++));for(let a=o;ar&&u1(n,t,r+1),s=i.depth>r&&u1(e,i,r+1),a=[];return Rm(null,n,r,a),o&&s&&t.index(r)==e.index(r)?(ij(o,s),tu(nu(o,rj(n,t,e,i,r+1)),a)):(o&&tu(nu(o,cb(n,t,r+1)),a),Rm(t,e,r,a),s&&tu(nu(s,cb(e,i,r+1)),a)),Rm(i,null,r,a),new ce(a)}function cb(n,t,e){let i=[];return Rm(null,n,e,i),n.depth>e&&tu(nu(u1(n,t,e+1),cb(n,t,e+1)),i),Rm(t,null,e,i),new ce(i)}Ce.empty=new Ce(ce.empty,0,0);class Fm{constructor(t,e,i){this.pos=t,this.path=e,this.parentOffset=i,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=t.child(e);return i?t.child(e).cut(i):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let i=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;i--)if(t.pos<=this.end(i)&&(!e||e(this.node(i))))return new ub(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let i=[],r=0,o=e;for(let s=t;;){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 Fm(e,i,o)}static resolveCached(t,e){for(let r=0;rt&&this.nodesBetween(t,e,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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),oj(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,i=ce.empty,r=0,o=i.childCount){let s=this.contentMatchAt(t).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(let l=r;le.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(e=>e.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let i=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,i)}let r=ce.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,i)}}$s.prototype.text=void 0;class db extends $s{constructor(t,e,i,r){if(super(t,e,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):oj(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new db(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new db(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function oj(n,t){for(let e=n.length-1;e>=0;e--)t=n[e].type.name+"("+t+")";return t}class iu{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let i=new Iie(t,e);if(null==i.next)return iu.empty;let r=sj(i);i.next&&i.err("Unexpected trailing text");let o=function Rie(n){let t=Object.create(null);return function e(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=t[i.join(",")]=new iu(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=e();return i(a,l),r(o(s.expr,l),l),[i(l)]}if("plus"==s.type){let l=e();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 Fie(n,t){for(let e=0,i=[n];ec.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(i){t.push(i);for(let r=0;r{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(i.next[s].next);return o}).join("\n")}}iu.empty=new iu(!0);class Iie{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.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(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function sj(n){let t=[];do{t.push(Oie(n))}while(n.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function Oie(n){let t=[];do{t.push(Aie(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function Aie(n){let t=function Pie(n){if(n.eat("(")){let t=sj(n);return n.eat(")")||n.err("Missing closing paren"),t}if(!/\W/.test(n.next)){let t=function Nie(n,t){let e=n.nodeTypes,i=e[t];if(i)return[i];let r=[];for(let o in e){let s=e[o];s.groups.indexOf(t)>-1&&r.push(s)}return 0==r.length&&n.err("No node type or group '"+t+"' found"),r}(n,n.next).map(e=>(null==n.inline?n.inline=e.isInline:n.inline!=e.isInline&&n.err("Mixing inline and block content"),{type:"name",value:e}));return n.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}n.err("Unexpected token '"+n.next+"'")}(n);for(;;)if(n.eat("+"))t={type:"plus",expr:t};else if(n.eat("*"))t={type:"star",expr:t};else if(n.eat("?"))t={type:"opt",expr:t};else{if(!n.eat("{"))break;t=kie(n,t)}return t}function aj(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let t=Number(n.next);return n.pos++,t}function kie(n,t){let e=aj(n),i=e;return n.eat(",")&&(i="}"!=n.next?aj(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:e,max:i,expr:t}}function lj(n,t){return t-n}function cj(n,t){let e=[];return function i(r){let o=n[r];if(1==o.length&&!o[0].term)return i(o[0].to);e.push(r);for(let s=0;s-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;ei[o]=new hb(o,e,s));let r=e.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 jie{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class fb{constructor(t,e,i,r){this.name=t,this.rank=e,this.schema=i,this.spec=r,this.attrs=hj(r.attrs),this.excluded=null;let o=uj(this.attrs);this.instance=o?new kn(this,o):null}create(t=null){return!t&&this.instance?this.instance:new kn(this,dj(this.attrs,t))}static compile(t,e){let i=Object.create(null),r=0;return t.forEach((o,s)=>i[o]=new fb(o,r++,e,s)),i}removeFromSet(t){for(var e=0;e-1}}class zie{constructor(t){this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=ZF.from(t.nodes),e.marks=ZF.from(t.marks||{}),this.nodes=hb.compile(this.spec.nodes,this),this.marks=fb.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]=iu.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?fj(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?[]:fj(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(t,e=null,i,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof hb))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,i,r)}text(t,e){let i=this.nodes.text;return new db(i,i.defaultAttrs,t,kn.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return $s.fromJSON(this,t)}markFromJSON(t){return kn.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function fj(n,t){let e=[];for(let i=0;i-1)&&e.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return e}class wh{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.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=t.nodes[i.node];return r.contentMatch.matchType(r)})}parse(t,e={}){let i=new yj(this,e,!1);return i.addAll(t,e.from,e.to),i.finish()}parseSlice(t,e={}){let i=new yj(this,e,!0);return i.addAll(t,e.from,e.to),Ce.maxOpen(i.finish())}matchTag(t,e,i){for(let r=i?this.tags.indexOf(i)+1:0;rt.length&&(61!=a.charCodeAt(t.length)||a.slice(t.length+1)!=e))){if(s.getAttrs){let l=s.getAttrs(e);if(!1===l)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let e=[];function i(r){let o=null==r.priority?50:r.priority,s=0;for(;s{i(s=_j(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in t.nodes){let o=t.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=_j(s)),s.node||s.ignore||s.mark||(s.node=r)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new wh(t,wh.schemaRules(t)))}}const pj={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},Vie={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},mj={ol:!0,ul:!0};function gj(n,t,e){return null!=t?(t?1:0)|("full"===t?2:0):n&&"pre"==n.whitespace?3:-5&e}class gb{constructor(t,e,i,r,o,s,a){this.type=t,this.attrs=e,this.marks=i,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=kn.none,this.stashMarks=[],this.match=s||(4&a?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(ce.from(t));if(!e){let r,i=this.type.contentMatch;return(r=i.findWrapping(t.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){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 e=ce.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(ce.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,i=this.pendingMarks;e{s.clearMark(a)&&(i=a.addToSet(i))}):e=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(e),!1!==s.consuming)break;o=s}return[e,i]}addElementByRule(t,e,i){let r,o,s;e.node?(o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs||null,e.preserveWhitespace)):(s=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,i);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;"string"==typeof e.contentElement?l=t.querySelector(e.contentElement):"function"==typeof e.contentElement?l=e.contentElement(t):e.contentElement&&(l=e.contentElement),this.findAround(t,l,!0),this.addAll(l)}r&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,e,i){let r=e||0;for(let o=e?t.childNodes[e]:t.firstChild,s=null==i?null:t.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o);this.findAtPoint(t,r)}findPlace(t){let e,i;for(let r=this.open;r>=0;r--){let o=this.nodes[r],s=o.findWrapping(t);if(s&&(!e||e.length>s.length)&&(e=s,i=o,!s.length)||o.solid)break}if(!e)return!1;this.sync(i);for(let r=0;rthis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));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(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let i=this.nodes[e].content;for(let r=i.length-1;r>=0;r--)t+=i[r].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let i=0;i-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.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=e[a];if(""==c){if(a==e.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(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let i=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let e in this.parser.schema.nodes){let i=this.parser.schema.nodes[e];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(t){let e=function Wie(n,t){for(let e=0;e=0;i--){let r=this.nodes[i];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let s=r.popFromStashMark(t);s&&r.type&&r.type.allowsMarkType(s.type)&&(r.activeMarks=s.addToSet(r.activeMarks))}if(r==e)break}}}function Uie(n,t){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,t)}function _j(n){let t={};for(let e in n)t[e]=n[e];return t}function $ie(n,t){let e=t.schema.nodes;for(let i in e){let r=e[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(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,e,i={}){let r=this.marks[t.type.name];return r&&Ws.renderSpec(f1(i),r(t,e))}static renderSpec(t,e,i=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r=e[0],o=r.indexOf(" ");o>0&&(i=r.slice(0,o),r=r.slice(o+1));let s,a=i?t.createElementNS(i,r):t.createElement(r),l=e[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}=Ws.renderSpec(t,d,i);if(a.appendChild(h),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Ws(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=vj(t.nodes);return e.text||(e.text=i=>i.text),e}static marksFromSchema(t){return vj(t.marks)}}function vj(n){let t={};for(let e in n){let i=n[e].spec.toDOM;i&&(t[e]=i)}return t}function f1(n){return n.document||window.document}const wj=Math.pow(2,16);function Gie(n,t){return n+t*wj}function Cj(n){return 65535&n}class p1{constructor(t,e,i){this.pos=t,this.delInfo=e,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 Ho{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&Ho.empty)return Ho.empty}recover(t){let e=0,i=Cj(t);if(!this.inverted)for(let r=0;rt)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(t<=d){let f=l+r+((c?t==l?-1:t==d?1:e:e)<0?0:u);if(i)return f;let p=t==(e<0?l:d)?null:Gie(a/3,t-l),m=t==l?2:t==d?1:4;return(e<0?t!=l:t!=d)&&(m|=8),new p1(f,m,p)}r+=u-c}return i?t+r:new p1(t+r,0,null)}touches(t,e){let i=0,r=Cj(e),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+o];if(t<=l+c&&a==3*r)return!0;i+=this.ranges[a+s]-c}return!1}forEach(t){let e=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?i-r-1:void 0)}}invert(){let t=new Ch;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let i=this.from;io&&ls.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,r),e.openStart,e.openEnd);return mi.fromReplace(t,this.from,this.to,o)}invert(){return new Gs(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new Cl(e.pos,i.pos,this.mark)}merge(t){return t instanceof Cl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Cl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Cl(e.from,e.to,t.markFromJSON(e.mark))}}ji.jsonID("addMark",Cl);class Gs extends ji{constructor(t,e,i){super(),this.from=t,this.to=e,this.mark=i}apply(t){let e=t.slice(this.from,this.to),i=new Ce(g1(e.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),e.openStart,e.openEnd);return mi.fromReplace(t,this.from,this.to,i)}invert(){return new Cl(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new Gs(e.pos,i.pos,this.mark)}merge(t){return t instanceof Gs&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Gs(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Gs(e.from,e.to,t.markFromJSON(e.mark))}}ji.jsonID("removeMark",Gs);class Dl extends ji{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return mi.fail("No node at mark step's position");let i=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return mi.fromReplace(t,this.pos,this.pos+1,new Ce(ce.from(i),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let i=this.mark.addToSet(e.marks);if(i.length==e.marks.length){for(let r=0;ri.pos?null:new zi(e.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new zi(e.from,e.to,e.gapFrom,e.gapTo,Ce.fromJSON(t,e.slice),e.insert,!!e.structure)}}function y1(n,t,e){let i=n.resolve(t),r=e-t,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 Zie(n,t,e){return(0==t||n.canReplace(t,n.childCount))&&(e==n.childCount||n.canReplace(0,e))}function Th(n){let e=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 Tl(n,t){let e=n.resolve(t),i=e.index();return Ej(e.nodeBefore,e.nodeAfter)&&e.parent.canReplace(i,i+1)}function Ej(n,t){return!(!n||!t||n.isLeaf||!n.canAppend(t))}function xj(n,t,e=-1){let i=n.resolve(t);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):e>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&&Ej(o,s)&&i.node(r).canReplace(a,a+1))return t;if(0==r)break;t=e<0?i.before(r):i.after(r)}}function Ij(n,t,e){let i=n.resolve(t);if(!e.content.size)return t;let r=e.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 v1(n,t,e=t,i=Ce.empty){if(t==e&&!i.size)return null;let r=n.resolve(t),o=n.resolve(e);return Oj(r,o,i)?new dr(t,e,i):new lre(r,o,i).fit()}function Oj(n,t,e){return!e.openStart&&!e.openEnd&&n.start()==t.start()&&n.parent.canReplace(n.index(),t.index(),e.content)}ji.jsonID("replaceAround",zi);class lre{constructor(t,e,i){this.$from=t,this.$to=e,this.unplaced=i,this.frontier=[],this.placed=ce.empty;for(let r=0;r<=t.depth;r++){let o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=ce.from(t.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 t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(t<0?this.$to:i.doc.resolve(t));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 Ce(o,s,a);return t>-1?new zi(i.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||i.pos!=this.$to.pos?new dr(i.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,i=0,r=this.unplaced.openEnd;i1&&(r=0),o.type.spec.isolating&&r<=i){t=i;break}e=o.content}for(let e=1;e<=2;e++)for(let i=1==e?t:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=b1(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==e&&(s?c.matchType(s.type)||(d=c.fillBefore(ce.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(2==e&&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:t,openStart:e,openEnd:i}=this.unplaced,r=b1(t,e);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new Ce(t,e+1,Math.max(i,r.size+e>=t.size-i?e+1:0)),0))}dropNode(){let{content:t,openStart:e,openEnd:i}=this.unplaced,r=b1(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new Ce(zm(t,e-1,1),e-1,o?e-1:i)}else this.unplaced=new Ce(zm(t,e,1),e,i)}placeNodes({sliceDepth:t,frontierDepth:e,parent:i,inject:r,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let m=0;m1||0==l||m.content.size)&&(d=g,u.push(Aj(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=Vm(this.placed,e,ce.from(u)),this.frontier[e].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(t){e:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:i,type:r}=this.frontier[e],o=e=0;a--){let{match:l,type:c}=this.frontier[a],u=w1(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:e,fit:s,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Vm(this.placed,e.depth,e.fit)),t=e.move;for(let i=e.depth+1;i<=t.depth;i++){let r=t.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(i));this.openFrontierNode(r.type,r.attrs,o)}return t}openFrontierNode(t,e=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=Vm(this.placed,this.depth,ce.from(t.create(e,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(ce.empty,!0);e.childCount&&(this.placed=Vm(this.placed,this.frontier.length,e))}}function zm(n,t,e){return 0==t?n.cutByIndex(e,n.childCount):n.replaceChild(0,n.firstChild.copy(zm(n.firstChild.content,t-1,e)))}function Vm(n,t,e){return 0==t?n.append(e):n.replaceChild(n.childCount-1,n.lastChild.copy(Vm(n.lastChild.content,t-1,e)))}function b1(n,t){for(let e=0;e1&&(i=i.replaceChild(0,Aj(i.firstChild,t-1,1==i.childCount?e-1:0))),t>0&&(i=n.type.contentMatch.fillBefore(i).append(i),e<=0&&(i=i.append(n.type.contentMatch.matchFragment(i).fillBefore(ce.empty,!0)))),n.copy(i)}function w1(n,t,e,i,r){let o=n.node(t),s=r?n.indexAfter(t):n.index(t);if(s==o.childCount&&!e.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!function cre(n,t,e){for(let i=e;ii){let o=r.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(ce.empty,!0))}return n}function Nj(n,t){let e=[];for(let r=Math.min(n.depth,t.depth);r>=0;r--){let o=n.start(r);if(ot.pos+(t.depth-r)||n.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==n.depth&&r==t.depth&&n.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&e.push(r)}return e}class Mh extends ji{constructor(t,e,i){super(),this.pos=t,this.attr=e,this.value=i}apply(t){let e=t.nodeAt(this.pos);if(!e)return mi.fail("No node at attribute step's position");let i=Object.create(null);for(let o in e.attrs)i[o]=e.attrs[o];i[this.attr]=this.value;let r=e.type.create(i,null,e.marks);return mi.fromReplace(t,this.pos,this.pos+1,new Ce(ce.from(r),0,e.isLeaf?0:1))}getMap(){return Ho.empty}invert(t){return new Mh(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Mh(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new Mh(e.pos,e.attr,e.value)}}ji.jsonID("attr",Mh);let Sh=class extends Error{};Sh=function n(t){let e=Error.call(this,t);return e.__proto__=n.prototype,e},(Sh.prototype=Object.create(Error.prototype)).constructor=Sh,Sh.prototype.name="TransformError";class C1{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Ch}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Sh(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,i=Ce.empty){let r=v1(this.doc,t,e,i);return r&&this.step(r),this}replaceWith(t,e,i){return this.replace(t,e,new Ce(ce.from(i),0,0))}delete(t,e){return this.replace(t,e,Ce.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,i){return function dre(n,t,e,i){if(!i.size)return n.deleteRange(t,e);let r=n.doc.resolve(t),o=n.doc.resolve(e);if(Oj(r,o,i))return n.step(new dr(t,e,i));let s=Nj(r,n.doc.resolve(e));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=ure(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(t,e,i),!(n.steps.length>d));h--){let f=s[h];f<0||(t=r.before(f),e=o.after(f))}}(this,t,e,i),this}replaceRangeWith(t,e,i){return function hre(n,t,e,i){if(!i.isInline&&t==e&&n.doc.resolve(t).parent.content.size){let r=function are(n,t,e){let i=n.resolve(t);if(i.parent.canReplaceWith(i.index(),i.index(),e))return t;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,e))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,e))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(t-i.start(s)==i.depth-s&&e>i.end(s)&&r.end(s)-e!=r.depth-s)return n.delete(i.before(s),e);n.delete(t,e)}(this,t,e),this}lift(t,e){return function Jie(n,t,e){let{$from:i,$to:r,depth:o}=t,s=i.before(o+1),a=r.after(o+1),l=s,c=a,u=ce.empty,d=0;for(let p=o,m=!1;p>e;p--)m||i.index(p)>0?(m=!0,u=ce.from(i.node(p).copy(u)),d++):l--;let h=ce.empty,f=0;for(let p=o,m=!1;p>e;p--)m||r.after(p+1)=0;s--){if(i.size){let a=e[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=ce.from(e[s].type.create(e[s].attrs,i))}let r=t.start,o=t.end;n.step(new zi(r,o,r,o,new Ce(i,0,0),e.length,!0))}(this,t,e),this}setBlockType(t,e=t,i,r=null){return function nre(n,t,e,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(t,e,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(i,r)&&function ire(n,t,e){let i=n.resolve(t),r=i.index();return i.parent.canReplaceWith(r,r+1,e)}(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 zi(c,u,c+1,u-1,new Ce(ce.from(i.create(r,null,s.marks)),0,0),1,!0)),!1}})}(this,t,e,i,r),this}setNodeMarkup(t,e,i=null,r){return function rre(n,t,e,i,r){let o=n.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);let s=e.create(i,null,r||o.marks);if(o.isLeaf)return n.replaceWith(t,t+o.nodeSize,s);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);n.step(new zi(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new Ce(ce.from(s),0,0),1,!0))}(this,t,e,i,r),this}setNodeAttribute(t,e,i){return this.step(new Mh(t,e,i)),this}addNodeMark(t,e){return this.step(new Dl(t,e)),this}removeNodeMark(t,e){if(!(e instanceof kn)){let i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at position "+t);if(!(e=e.isInSet(i.marks)))return this}return this.step(new Dh(t,e)),this}split(t,e=1,i){return function ore(n,t,e=1,i){let r=n.doc.resolve(t),o=ce.empty,s=ce.empty;for(let a=r.depth,l=r.depth-e,c=e-1;a>l;a--,c--){o=ce.from(r.node(a).copy(o));let u=i&&i[c];s=ce.from(u?u.type.create(u.attrs,s):r.node(a).copy(s))}n.step(new dr(t,t,new Ce(o.append(s),e,e),!0))}(this,t,e,i),this}addMark(t,e,i){return function qie(n,t,e,i){let s,a,r=[],o=[];n.doc.nodesBetween(t,e,(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,t),f=Math.min(c+l.nodeSize,e),p=i.addToSet(d);for(let m=0;mn.step(l)),o.forEach(l=>n.step(l))}(this,t,e,i),this}removeMark(t,e,i){return function Kie(n,t,e,i){let r=[],o=0;n.doc.nodesBetween(t,e,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof fb){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,e);for(let u=0;un.step(new Gs(s.from,s.to,s.style)))}(this,t,e,i),this}clearIncompatible(t,e,i){return function Qie(n,t,e,i=e.contentMatch){let r=n.doc.nodeAt(t),o=[],s=t+1;for(let a=0;a=0;a--)n.step(o[a])}(this,t,e,i),this}}const D1=Object.create(null);class rt{constructor(t,e,i){this.$anchor=t,this.$head=e,this.ranges=i||[new Pj(t.min(e),t.max(e))]}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 t=this.ranges;for(let e=0;e=0;o--){let s=e<0?Eh(t.node(0),t.node(o),t.before(o+1),t.index(o),e,i):Eh(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,i);if(s)return s}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new To(t.node(0))}static atStart(t){return Eh(t,t,0,0,1)||new To(t)}static atEnd(t){return Eh(t,t,t.content.size,t.childCount,-1)||new To(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=D1[e.type];if(!i)throw new RangeError(`No selection type ${e.type} defined`);return i.fromJSON(t,e)}static jsonID(t,e){if(t in D1)throw new RangeError("Duplicate use of selection JSON ID "+t);return D1[t]=e,e.prototype.jsonID=t,e}getBookmark(){return nt.between(this.$anchor,this.$head).getBookmark()}}rt.prototype.visible=!0;class Pj{constructor(t,e){this.$from=t,this.$to=e}}let Lj=!1;function Rj(n){!Lj&&!n.parent.inlineContent&&(Lj=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class nt extends rt{constructor(t,e=t){Rj(t),Rj(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let i=t.resolve(e.map(this.head));if(!i.parent.inlineContent)return rt.near(i);let r=t.resolve(e.map(this.anchor));return new nt(r.parent.inlineContent?r:i,i)}replace(t,e=Ce.empty){if(super.replace(t,e),e==Ce.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof nt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new _b(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new nt(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,i=e){let r=t.resolve(e);return new this(r,i==e?r:t.resolve(i))}static between(t,e,i){let r=t.pos-e.pos;if((!i||r)&&(i=r>=0?1:-1),!e.parent.inlineContent){let o=rt.findFrom(e,i,!0)||rt.findFrom(e,-i,!0);if(!o)return rt.near(e,i);e=o.$head}return t.parent.inlineContent||(0==r||(t=(rt.findFrom(t,-i,!0)||rt.findFrom(t,i,!0)).$anchor).posnew To(n)};function Eh(n,t,e,i,r,o=!1){if(t.inlineContent)return nt.create(n,e);for(let s=i-(r>0?0:1);r>0?s=0;s+=r){let a=t.child(s);if(a.isAtom){if(!o&&qe.isSelectable(a))return qe.create(n,e-(r<0?a.nodeSize:0))}else{let l=Eh(n,a,e+r,r<0?a.childCount:0,r,o);if(l)return l}e+=a.nodeSize*r}return null}function Fj(n,t,e){let i=n.steps.length-1;if(i{null==s&&(s=u)}),n.setSelection(rt.near(n.doc.resolve(s),e)))}class mre extends C1{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return kn.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let i=this.selection;return e&&(t=t.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||kn.none))),i.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,i){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==i&&(i=e),i=i??e,!t)return this.deleteRange(e,i);let o=this.storedMarks;if(!o){let s=this.doc.resolve(e);o=i==e?s.marks():s.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(e,i,r.text(t,o)),this.selection.empty||this.setSelection(rt.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Vj(n,t){return t&&n?n.bind(t):n}class Bm{constructor(t,e,i){this.name=t,this.init=Vj(e.init,i),this.apply=Vj(e.apply,i)}}const gre=[new Bm("doc",{init:n=>n.doc||n.schema.topNodeType.createAndFill(),apply:n=>n.doc}),new Bm("selection",{init:(n,t)=>n.selection||rt.atStart(t.doc),apply:n=>n.selection}),new Bm("storedMarks",{init:n=>n.storedMarks||null,apply:(n,t,e,i)=>i.selection.$cursor?n.storedMarks:null}),new Bm("scrollToSelection",{init:()=>0,apply:(n,t)=>n.scrolledIntoView?t+1:t})];class M1{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=gre.slice(),e&&e.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 Bm(i.key,i.spec.state,i))})}}class xh{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let i=0;ii.toJSON())),t&&"object"==typeof t)for(let i in t){if("doc"==i||"selection"==i)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[i],o=r.spec.state;o&&o.toJSON&&(e[i]=o.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,i){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new M1(t.schema,t.plugins),o=new xh(r);return r.fields.forEach(s=>{if("doc"==s.name)o.doc=$s.fromJSON(t.schema,e.doc);else if("selection"==s.name)o.selection=rt.fromJSON(o.doc,e.selection);else if("storedMarks"==s.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.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(e,a))return void(o[s.name]=c.fromJSON.call(l,t,e[a],o))}o[s.name]=s.init(t,o)}}),o}}function Bj(n,t,e){for(let i in n){let r=n[i];r instanceof Function?r=r.bind(t):"handleDOMEvents"==i&&(r=Bj(r,t,{})),e[i]=r}return e}class Wt{constructor(t){this.spec=t,this.props={},t.props&&Bj(t.props,this,this.props),this.key=t.key?t.key.key:Uj("plugin")}getState(t){return t[this.key]}}const S1=Object.create(null);function Uj(n){return n in S1?n+"$"+ ++S1[n]:(S1[n]=0,n+"$")}class on{constructor(t="key"){this.key=Uj(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}function Mo(n){if(null==n)return window;if("[object Window]"!==n.toString()){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function ru(n){return n instanceof Mo(n).Element||n instanceof Element}function $o(n){return n instanceof Mo(n).HTMLElement||n instanceof HTMLElement}function E1(n){return!(typeof ShadowRoot>"u")&&(n instanceof Mo(n).ShadowRoot||n instanceof ShadowRoot)}var ou=Math.max,bb=Math.min,Ih=Math.round;function x1(){var n=navigator.userAgentData;return null!=n&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Hj(){return!/^((?!chrome|android).)*safari/i.test(x1())}function Oh(n,t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=n.getBoundingClientRect(),r=1,o=1;t&&$o(n)&&(r=n.offsetWidth>0&&Ih(i.width)/n.offsetWidth||1,o=n.offsetHeight>0&&Ih(i.height)/n.offsetHeight||1);var a=(ru(n)?Mo(n):window).visualViewport,l=!Hj()&&e,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 I1(n){var t=Mo(n);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ys(n){return n?(n.nodeName||"").toLowerCase():null}function Ml(n){return((ru(n)?n.ownerDocument:n.document)||window.document).documentElement}function O1(n){return Oh(Ml(n)).left+I1(n).scrollLeft}function Va(n){return Mo(n).getComputedStyle(n)}function A1(n){var t=Va(n);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function bre(n,t,e){void 0===e&&(e=!1);var i=$o(t),r=$o(t)&&function vre(n){var t=n.getBoundingClientRect(),e=Ih(t.width)/n.offsetWidth||1,i=Ih(t.height)/n.offsetHeight||1;return 1!==e||1!==i}(t),o=Ml(t),s=Oh(n,r,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==Ys(t)||A1(o))&&(a=function _re(n){return n!==Mo(n)&&$o(n)?function yre(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):I1(n)}(t)),$o(t)?((l=Oh(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=O1(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function k1(n){var t=Oh(n),e=n.offsetWidth,i=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:i}}function wb(n){return"html"===Ys(n)?n:n.assignedSlot||n.parentNode||(E1(n)?n.host:null)||Ml(n)}function $j(n){return["html","body","#document"].indexOf(Ys(n))>=0?n.ownerDocument.body:$o(n)&&A1(n)?n:$j(wb(n))}function Um(n,t){var e;void 0===t&&(t=[]);var i=$j(n),r=i===(null==(e=n.ownerDocument)?void 0:e.body),o=Mo(i),s=r?[o].concat(o.visualViewport||[],A1(i)?i:[]):i,a=t.concat(s);return r?a:a.concat(Um(wb(s)))}function wre(n){return["table","td","th"].indexOf(Ys(n))>=0}function Wj(n){return $o(n)&&"fixed"!==Va(n).position?n.offsetParent:null}function Hm(n){for(var t=Mo(n),e=Wj(n);e&&wre(e)&&"static"===Va(e).position;)e=Wj(e);return e&&("html"===Ys(e)||"body"===Ys(e)&&"static"===Va(e).position)?t:e||function Cre(n){var t=/firefox/i.test(x1());if(/Trident/i.test(x1())&&$o(n)&&"fixed"===Va(n).position)return null;var r=wb(n);for(E1(r)&&(r=r.host);$o(r)&&["html","body"].indexOf(Ys(r))<0;){var o=Va(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(n)||t}var Jr="top",Wo="bottom",Go="right",Xr="left",N1="auto",$m=[Jr,Wo,Go,Xr],Ah="start",Wm="end",Gj="viewport",Gm="popper",Yj=$m.reduce(function(n,t){return n.concat([t+"-"+Ah,t+"-"+Wm])},[]),qj=[].concat($m,[N1]).reduce(function(n,t){return n.concat([t,t+"-"+Ah,t+"-"+Wm])},[]),Pre=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Lre(n){var t=new Map,e=new Set,i=[];function r(o){e.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&r(l)}}),i.push(o)}return n.forEach(function(o){t.set(o.name,o)}),n.forEach(function(o){e.has(o.name)||r(o)}),i}function Fre(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}var Kj={placement:"bottom",modifiers:[],strategy:"absolute"};function Qj(){for(var n=arguments.length,t=new Array(n),e=0;e=0?"x":"y"}function Zj(n){var l,t=n.reference,e=n.element,i=n.placement,r=i?qs(i):null,o=i?kh(i):null,s=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2;switch(r){case Jr:l={x:s,y:t.y-e.height};break;case Wo:l={x:s,y:t.y+t.height};break;case Go:l={x:t.x+t.width,y:a};break;case Xr:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var c=r?P1(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Ah:l[c]=l[c]-(t[u]/2-e[u]/2);break;case Wm:l[c]=l[c]+(t[u]/2-e[u]/2)}}return l}const Hre={name:"popperOffsets",enabled:!0,phase:"read",fn:function Ure(n){var t=n.state;t.modifiersData[n.name]=Zj({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var $re={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Jj(n){var t,e=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"),b=s.hasOwnProperty("y"),w=Xr,_=Jr,N=window;if(c){var S=Hm(e),ie="clientHeight",K="clientWidth";S===Mo(e)&&"static"!==Va(S=Ml(e)).position&&"absolute"===a&&(ie="scrollHeight",K="scrollWidth"),(r===Jr||(r===Xr||r===Go)&&o===Wm)&&(_=Wo,m-=(d&&S===N&&N.visualViewport?N.visualViewport.height:S[ie])-i.height,m*=l?1:-1),r!==Xr&&(r!==Jr&&r!==Wo||o!==Wm)||(w=Go,f-=(d&&S===N&&N.visualViewport?N.visualViewport.width:S[K])-i.width,f*=l?1:-1)}var ot,vt=Object.assign({position:a},c&&$re),at=!0===u?function Wre(n,t){var i=n.y,r=t.devicePixelRatio||1;return{x:Ih(n.x*r)/r||0,y:Ih(i*r)/r||0}}({x:f,y:m},Mo(e)):{x:f,y:m};return f=at.x,m=at.y,Object.assign({},vt,l?((ot={})[_]=b?"0":"",ot[w]=y?"0":"",ot.transform=(N.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",ot):((t={})[_]=b?m+"px":"",t[w]=y?f+"px":"",t.transform="",t))}const Yre={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function Gre(n){var t=n.state,e=n.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,l=void 0===a||a,c={placement:qs(t.placement),variation:kh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Jj(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Jj(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Xj={name:"applyStyles",enabled:!0,phase:"write",fn:function qre(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];!$o(o)||!Ys(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 Kre(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],o=t.attributes[i]||{},a=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]).reduce(function(l,c){return l[c]="",l},{});!$o(r)||!Ys(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}},requires:["computeStyles"]},Jre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function Zre(n){var t=n.state,i=n.name,r=n.options.offset,o=void 0===r?[0,0]:r,s=qj.reduce(function(u,d){return u[d]=function Qre(n,t,e){var i=qs(n),r=[Xr,Jr].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},t,{placement:n})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[Xr,Go].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,t.rects,o),u},{}),a=s[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}};var Xre={left:"right",right:"left",bottom:"top",top:"bottom"};function Db(n){return n.replace(/left|right|bottom|top/g,function(t){return Xre[t]})}var eoe={start:"end",end:"start"};function e3(n){return n.replace(/start|end/g,function(t){return eoe[t]})}function t3(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&E1(e)){var i=t;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function L1(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function n3(n,t,e){return t===Gj?L1(function toe(n,t){var e=Mo(n),i=Ml(n),r=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=Hj();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+O1(n),y:l}}(n,e)):ru(t)?function ioe(n,t){var e=Oh(n,!1,"fixed"===t);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}(t,e):L1(function noe(n){var t,e=Ml(n),i=I1(n),r=null==(t=n.ownerDocument)?void 0:t.body,o=ou(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=ou(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+O1(n),l=-i.scrollTop;return"rtl"===Va(r||e).direction&&(a+=ou(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Ml(n)))}function o3(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function s3(n,t){return t.reduce(function(e,i){return e[i]=n,e},{})}function Ym(n,t){void 0===t&&(t={});var i=t.placement,r=void 0===i?n.placement:i,o=t.strategy,s=void 0===o?n.strategy:o,a=t.boundary,l=void 0===a?"clippingParents":a,c=t.rootBoundary,u=void 0===c?Gj:c,d=t.elementContext,h=void 0===d?Gm:d,f=t.altBoundary,p=void 0!==f&&f,m=t.padding,g=void 0===m?0:m,y=o3("number"!=typeof g?g:s3(g,$m)),w=n.rects.popper,_=n.elements[p?h===Gm?"reference":Gm:h],N=function ooe(n,t,e,i){var r="clippingParents"===t?function roe(n){var t=Um(wb(n)),i=["absolute","fixed"].indexOf(Va(n).position)>=0&&$o(n)?Hm(n):n;return ru(i)?t.filter(function(r){return ru(r)&&t3(r,i)&&"body"!==Ys(r)}):[]}(n):[].concat(t),o=[].concat(r,[e]),a=o.reduce(function(l,c){var u=n3(n,c,i);return l.top=ou(u.top,l.top),l.right=bb(u.right,l.right),l.bottom=bb(u.bottom,l.bottom),l.left=ou(u.left,l.left),l},n3(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}(ru(_)?_:_.contextElement||Ml(n.elements.popper),l,u,s),S=Oh(n.elements.reference),ie=Zj({reference:S,element:w,strategy:"absolute",placement:r}),K=L1(Object.assign({},w,ie)),Ne=h===Gm?K:S,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},vt=n.modifiersData.offset;if(h===Gm&&vt){var at=vt[r];Object.keys(He).forEach(function(ot){var yn=[Go,Wo].indexOf(ot)>=0?1:-1,xt=[Jr,Wo].indexOf(ot)>=0?"y":"x";He[ot]+=at[xt]*yn})}return He}const coe={name:"flip",enabled:!0,phase:"main",fn:function loe(n){var t=n.state,e=n.options,i=n.name;if(!t.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,d=e.rootBoundary,h=e.altBoundary,f=e.flipVariations,p=void 0===f||f,m=e.allowedAutoPlacements,g=t.options.placement,y=qs(g),w=l||(y!==g&&p?function aoe(n){if(qs(n)===N1)return[];var t=Db(n);return[e3(n),t,e3(t)]}(g):[Db(g)]),_=[g].concat(w).reduce(function(Ft,Xi){return Ft.concat(qs(Xi)===N1?function soe(n,t){void 0===t&&(t={});var r=t.boundary,o=t.rootBoundary,s=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=void 0===l?qj:l,u=kh(t.placement),d=u?a?Yj:Yj.filter(function(p){return kh(p)===u}):$m,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]=Ym(n,{placement:m,boundary:r,rootBoundary:o,padding:s})[qs(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}(t,{placement:Xi,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):Xi)},[]),N=t.rects.reference,S=t.rects.popper,ie=new Map,K=!0,Ne=_[0],He=0;He<_.length;He++){var vt=_[He],at=qs(vt),ot=kh(vt)===Ah,yn=[Jr,Wo].indexOf(at)>=0,xt=yn?"width":"height",le=Ym(t,{placement:vt,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),me=yn?ot?Go:Xr:ot?Wo:Jr;N[xt]>S[xt]&&(me=Db(me));var be=Db(me),Ue=[];if(o&&Ue.push(le[at]<=0),a&&Ue.push(le[me]<=0,le[be]<=0),Ue.every(function(Ft){return Ft})){Ne=vt,K=!1;break}ie.set(vt,Ue)}if(K)for(var cn=function(Xi){var oo=_.find(function(In){var Gt=ie.get(In);if(Gt)return Gt.slice(0,Xi).every(function(ft){return ft})});if(oo)return Ne=oo,"break"},Vt=p?3:1;Vt>0&&"break"!==cn(Vt);Vt--);t.placement!==Ne&&(t.modifiersData[i]._skip=!0,t.placement=Ne,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function qm(n,t,e){return ou(n,bb(t,e))}const foe={name:"preventOverflow",enabled:!0,phase:"main",fn:function hoe(n){var t=n.state,e=n.options,i=n.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,h=e.tether,f=void 0===h||h,p=e.tetherOffset,m=void 0===p?0:p,g=Ym(t,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),y=qs(t.placement),b=kh(t.placement),w=!b,_=P1(y),N=function uoe(n){return"x"===n?"y":"x"}(_),S=t.modifiersData.popperOffsets,ie=t.rects.reference,K=t.rects.popper,Ne="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,He="number"==typeof Ne?{mainAxis:Ne,altAxis:Ne}:Object.assign({mainAxis:0,altAxis:0},Ne),vt=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,at={x:0,y:0};if(S){if(o){var ot,yn="y"===_?Jr:Xr,xt="y"===_?Wo:Go,le="y"===_?"height":"width",me=S[_],be=me+g[yn],Ue=me-g[xt],kt=f?-K[le]/2:0,cn=b===Ah?ie[le]:K[le],Vt=b===Ah?-K[le]:-ie[le],xn=t.elements.arrow,Ft=f&&xn?k1(xn):{width:0,height:0},Xi=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},oo=Xi[yn],In=Xi[xt],Gt=qm(0,ie[le],Ft[le]),ft=w?ie[le]/2-kt-Gt-oo-He.mainAxis:cn-Gt-oo-He.mainAxis,zn=w?-ie[le]/2+kt+Gt+In+He.mainAxis:Vt+Gt+In+He.mainAxis,Pr=t.elements.arrow&&Hm(t.elements.arrow),ec=null!=(ot=vt?.[_])?ot:0,Vu=me+zn-ec,ey=qm(f?bb(be,me+ft-ec-(Pr?"y"===_?Pr.clientTop||0:Pr.clientLeft||0:0)):be,me,f?ou(Ue,Vu):Ue);S[_]=ey,at[_]=ey-me}if(a){var ty,Ka=S[N],nc="y"===N?"height":"width",ny=Ka+g["x"===_?Jr:Xr],Bu=Ka-g["x"===_?Wo:Go],iy=-1!==[Jr,Xr].indexOf(y),sw=null!=(ty=vt?.[N])?ty:0,aw=iy?ny:Ka-ie[nc]-K[nc]-sw+He.altAxis,lw=iy?Ka+ie[nc]+K[nc]-sw-He.altAxis:Bu,cw=f&&iy?function doe(n,t,e){var i=qm(n,t,e);return i>e?e:i}(aw,Ka,lw):qm(f?aw:ny,Ka,f?lw:Bu);S[N]=cw,at[N]=cw-Ka}t.modifiersData[i]=at}},requiresIfExists:["offset"]},yoe={name:"arrow",enabled:!0,phase:"main",fn:function moe(n){var t,e=n.state,i=n.name,r=n.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=qs(e.placement),l=P1(a),u=[Xr,Go].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(t,e){return o3("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:s3(t,$m))}(r.padding,e),h=k1(o),f="y"===l?Jr:Xr,p="y"===l?Wo:Go,m=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],g=s[l]-e.rects.reference[l],y=Hm(o),b=y?"y"===l?y.clientHeight||0:y.clientWidth||0:0,S=b/2-h[u]/2+(m/2-g/2),ie=qm(d[f],S,b-h[u]-d[p]);e.modifiersData[i]=((t={})[l]=ie,t.centerOffset=ie-S,t)}},effect:function goe(n){var t=n.state,i=n.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||t3(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function a3(n,t,e){return void 0===e&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function l3(n){return[Jr,Go,Wo,Xr].some(function(t){return n[t]>=0})}var voe=[Bre,Hre,Yre,Xj,Jre,coe,foe,yoe,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function _oe(n){var t=n.state,e=n.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=Ym(t,{elementContext:"reference"}),a=Ym(t,{altBoundary:!0}),l=a3(s,i),c=a3(a,r,o),u=l3(l),d=l3(c);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],boe=zre({defaultModifiers:voe}),c3="tippy-content",d3="tippy-arrow",h3="tippy-svg-arrow",Sl={passive:!0,capture:!0},f3=function(){return document.body};function R1(n,t,e){return Array.isArray(n)?n[t]??(Array.isArray(e)?e[t]:e):n}function F1(n,t){var e={}.toString.call(n);return 0===e.indexOf("[object")&&e.indexOf(t+"]")>-1}function p3(n,t){return"function"==typeof n?n.apply(void 0,t):n}function m3(n,t){return 0===t?n:function(i){clearTimeout(e),e=setTimeout(function(){n(i)},t)};var e}function El(n){return[].concat(n)}function g3(n,t){-1===n.indexOf(t)&&n.push(t)}function Nh(n){return[].slice.call(n)}function _3(n){return Object.keys(n).reduce(function(t,e){return void 0!==n[e]&&(t[e]=n[e]),t},{})}function su(){return document.createElement("div")}function Tb(n){return["Element","Fragment"].some(function(t){return F1(n,t)})}function V1(n,t){n.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Km(n,t){n.forEach(function(e){e&&e.setAttribute("data-state",t)})}function B1(n,t,e){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){n[i](r,e)})}function w3(n,t){for(var e=t;e;){var i;if(n.contains(e))return!0;e=null==e.getRootNode||null==(i=e.getRootNode())?void 0:i.host}return!1}var Ks={isTouch:!1},C3=0;function xoe(){Ks.isTouch||(Ks.isTouch=!0,window.performance&&document.addEventListener("mousemove",D3))}function D3(){var n=performance.now();n-C3<20&&(Ks.isTouch=!1,document.removeEventListener("mousemove",D3)),C3=n}function Ioe(){var n=document.activeElement;(function v3(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var koe=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,eo=Object.assign({appendTo:f3,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}),Roe=Object.keys(eo);function x3(n){var e=(n.plugins||[]).reduce(function(i,r){var a,o=r.name;return o&&(i[o]=void 0!==n[o]?n[o]:null!=(a=eo[o])?a:r.defaultValue),i},{});return Object.assign({},n,e)}function I3(n,t){var e=Object.assign({},t,{content:p3(t.content,[n])},t.ignoreAttributes?{}:function joe(n,t){return(t?Object.keys(x3(Object.assign({},eo,{plugins:t}))):Roe).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,t.plugins));return e.aria=Object.assign({},eo.aria,e.aria),e.aria={expanded:"auto"===e.aria.expanded?t.interactive:e.aria.expanded,content:"auto"===e.aria.content?t.interactive?null:"describedby":e.aria.content},e}function U1(n,t){n.innerHTML=t}function O3(n){var t=su();return!0===n?t.className=d3:(t.className=h3,Tb(n)?t.appendChild(n):U1(t,n)),t}function A3(n,t){Tb(t.content)?(U1(n,""),n.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?U1(n,t.content):n.textContent=t.content)}function Mb(n){var t=n.firstElementChild,e=Nh(t.children);return{box:t,content:e.find(function(i){return i.classList.contains(c3)}),arrow:e.find(function(i){return i.classList.contains(d3)||i.classList.contains(h3)}),backdrop:e.find(function(i){return i.classList.contains("tippy-backdrop")})}}function k3(n){var t=su(),e=su();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=su();function r(o,s){var a=Mb(t),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)&&A3(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(O3(s.arrow))):l.appendChild(O3(s.arrow)):u&&l.removeChild(u)}return i.className=c3,i.setAttribute("data-state","hidden"),A3(i,n.props),t.appendChild(e),e.appendChild(i),r(n.props,n.props),{popper:t,onUpdate:r}}k3.$$tippy=!0;var Voe=1,Sb=[],Eb=[];function Boe(n,t){var i,r,o,u,d,h,m,e=I3(n,Object.assign({},eo,x3(_3(t)))),s=!1,a=!1,l=!1,c=!1,f=[],p=m3(tc,e.interactiveDebounce),g=Voe++,b=function Toe(n){return n.filter(function(t,e){return n.indexOf(t)===e})}(e.plugins),_={id:g,reference:n,popper:su(),popperInstance:null,props:e,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function aw(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function lw(X){if(!_.state.isDestroyed){be("onBeforeUpdate",[_,X]),zu();var $e=_.props,pt=I3(n,Object.assign({},$e,_3(X),{ignoreAttributes:!0}));_.props=pt,Pr(),$e.interactiveDebounce!==pt.interactiveDebounce&&(cn(),p=m3(tc,pt.interactiveDebounce)),$e.triggerTarget&&!pt.triggerTarget?El($e.triggerTarget).forEach(function(En){En.removeAttribute("aria-expanded")}):pt.triggerTarget&&n.removeAttribute("aria-expanded"),kt(),me(),ie&&ie($e,pt),_.popperInstance&&(rw(),nc().forEach(function(En){requestAnimationFrame(En._tippy.popperInstance.forceUpdate)})),be("onAfterUpdate",[_,X])}},setContent:function cw(X){_.setProps({content:X})},show:function Jwe(){var X=_.state.isVisible,$e=_.state.isDestroyed,pt=!_.state.isEnabled,En=Ks.isTouch&&!_.props.touch,un=R1(_.props.duration,0,eo.duration);if(!(X||$e||pt||En||ot().hasAttribute("disabled")||(be("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,at()&&(S.style.visibility="visible"),me(),Xi(),_.state.isMounted||(S.style.transition="none"),at()){var Lr=xt();V1([Lr.box,Lr.content],0)}h=function(){var Uu;if(_.state.isVisible&&!c){if(c=!0,S.style.transition=_.props.moveTransition,at()&&_.props.animation){var zE=xt(),uw=zE.box,gf=zE.content;V1([uw,gf],un),Km([uw,gf],"visible")}Ue(),kt(),g3(Eb,_),null==(Uu=_.popperInstance)||Uu.forceUpdate(),be("onMount",[_]),_.props.animation&&at()&&function Gt(X,$e){ft(X,$e)}(un,function(){_.state.isShown=!0,be("onShown",[_])})}},function Ka(){var $e,X=_.props.appendTo,pt=ot();($e=_.props.interactive&&X===f3||"parent"===X?pt.parentNode:p3(X,[pt])).contains(S)||$e.appendChild(S),_.state.isMounted=!0,rw()}()}},hide:function Xwe(){var X=!_.state.isVisible,$e=_.state.isDestroyed,pt=!_.state.isEnabled,En=R1(_.props.duration,1,eo.duration);if(!(X||$e||pt)&&(be("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,c=!1,s=!1,at()&&(S.style.visibility="hidden"),cn(),oo(),me(!0),at()){var un=xt(),Lr=un.box,Xo=un.content;_.props.animation&&(V1([Lr,Xo],En),Km([Lr,Xo],"hidden"))}Ue(),kt(),_.props.animation?at()&&function In(X,$e){ft(X,function(){!_.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&$e()})}(En,_.unmount):_.unmount()}},hideWithInteractivity:function eCe(X){yn().addEventListener("mousemove",p),g3(Sb,p),p(X)},enable:function iy(){_.state.isEnabled=!0},disable:function sw(){_.hide(),_.state.isEnabled=!1},unmount:function tCe(){_.state.isVisible&&_.hide(),_.state.isMounted&&(ow(),nc().forEach(function(X){X._tippy.unmount()}),S.parentNode&&S.parentNode.removeChild(S),Eb=Eb.filter(function(X){return X!==_}),_.state.isMounted=!1,be("onHidden",[_]))},destroy:function nCe(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),zu(),delete n._tippy,_.state.isDestroyed=!0,be("onDestroy",[_]))}};if(!e.render)return _;var N=e.render(_),S=N.popper,ie=N.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+_.id,_.popper=S,n._tippy=_,S._tippy=_;var K=b.map(function(X){return X.fn(_)}),Ne=n.hasAttribute("aria-expanded");return Pr(),kt(),me(),be("onCreate",[_]),e.showOnCreate&&ny(),S.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&yn().addEventListener("mousemove",p)}),_;function He(){var X=_.props.touch;return Array.isArray(X)?X:[X,0]}function vt(){return"hold"===He()[0]}function at(){var X;return!(null==(X=_.props.render)||!X.$$tippy)}function ot(){return m||n}function yn(){var X=ot().parentNode;return X?function b3(n){var t,i=El(n)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}(X):document}function xt(){return Mb(S)}function le(X){return _.state.isMounted&&!_.state.isVisible||Ks.isTouch||u&&"focus"===u.type?0:R1(_.props.delay,X?0:1,eo.delay)}function me(X){void 0===X&&(X=!1),S.style.pointerEvents=_.props.interactive&&!X?"":"none",S.style.zIndex=""+_.props.zIndex}function be(X,$e,pt){var En;void 0===pt&&(pt=!0),K.forEach(function(un){un[X]&&un[X].apply(un,$e)}),pt&&(En=_.props)[X].apply(En,$e)}function Ue(){var X=_.props.aria;if(X.content){var $e="aria-"+X.content,pt=S.id;El(_.props.triggerTarget||n).forEach(function(un){var Lr=un.getAttribute($e);if(_.state.isVisible)un.setAttribute($e,Lr?Lr+" "+pt:pt);else{var Xo=Lr&&Lr.replace(pt,"").trim();Xo?un.setAttribute($e,Xo):un.removeAttribute($e)}})}}function kt(){!Ne&&_.props.aria.expanded&&El(_.props.triggerTarget||n).forEach(function($e){_.props.interactive?$e.setAttribute("aria-expanded",_.state.isVisible&&$e===ot()?"true":"false"):$e.removeAttribute("aria-expanded")})}function cn(){yn().removeEventListener("mousemove",p),Sb=Sb.filter(function(X){return X!==p})}function Vt(X){if(!Ks.isTouch||!l&&"mousedown"!==X.type){var $e=X.composedPath&&X.composedPath()[0]||X.target;if(!_.props.interactive||!w3(S,$e)){if(El(_.props.triggerTarget||n).some(function(pt){return w3(pt,$e)})){if(Ks.isTouch||_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else be("onClickOutside",[_,X]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),a=!0,setTimeout(function(){a=!1}),_.state.isMounted||oo())}}}function xn(){l=!0}function Ft(){l=!1}function Xi(){var X=yn();X.addEventListener("mousedown",Vt,!0),X.addEventListener("touchend",Vt,Sl),X.addEventListener("touchstart",Ft,Sl),X.addEventListener("touchmove",xn,Sl)}function oo(){var X=yn();X.removeEventListener("mousedown",Vt,!0),X.removeEventListener("touchend",Vt,Sl),X.removeEventListener("touchstart",Ft,Sl),X.removeEventListener("touchmove",xn,Sl)}function ft(X,$e){var pt=xt().box;function En(un){un.target===pt&&(B1(pt,"remove",En),$e())}if(0===X)return $e();B1(pt,"remove",d),B1(pt,"add",En),d=En}function zn(X,$e,pt){void 0===pt&&(pt=!1),El(_.props.triggerTarget||n).forEach(function(un){un.addEventListener(X,$e,pt),f.push({node:un,eventType:X,handler:$e,options:pt})})}function Pr(){vt()&&(zn("touchstart",ec,{passive:!0}),zn("touchend",Vu,{passive:!0})),function Doe(n){return n.split(/\s+/).filter(Boolean)}(_.props.trigger).forEach(function(X){if("manual"!==X)switch(zn(X,ec),X){case"mouseenter":zn("mouseleave",Vu);break;case"focus":zn(koe?"focusout":"blur",ey);break;case"focusin":zn("focusout",ey)}})}function zu(){f.forEach(function(X){X.node.removeEventListener(X.eventType,X.handler,X.options)}),f=[]}function ec(X){var $e,pt=!1;if(_.state.isEnabled&&!ty(X)&&!a){var En="focus"===(null==($e=u)?void 0:$e.type);u=X,m=X.currentTarget,kt(),!_.state.isVisible&&function z1(n){return F1(n,"MouseEvent")}(X)&&Sb.forEach(function(un){return un(X)}),"click"===X.type&&(_.props.trigger.indexOf("mouseenter")<0||s)&&!1!==_.props.hideOnClick&&_.state.isVisible?pt=!0:ny(X),"click"===X.type&&(s=!pt),pt&&!En&&Bu(X)}}function tc(X){var $e=X.target,pt=ot().contains($e)||S.contains($e);"mousemove"===X.type&&pt||function Eoe(n,t){var e=t.clientX,i=t.clientY;return n.every(function(r){var o=r.popperRect,s=r.popperState,l=r.props.interactiveBorder,c=function y3(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-e+("right"===c?u.left.x:0)>l||e-o.right-("left"===c?u.right.x:0)>l})}(nc().concat(S).map(function(un){var Lr,mf=null==(Lr=un._tippy.popperInstance)?void 0:Lr.state;return mf?{popperRect:un.getBoundingClientRect(),popperState:mf,props:e}:null}).filter(Boolean),X)&&(cn(),Bu(X))}function Vu(X){if(!(ty(X)||_.props.trigger.indexOf("click")>=0&&s)){if(_.props.interactive)return void _.hideWithInteractivity(X);Bu(X)}}function ey(X){_.props.trigger.indexOf("focusin")<0&&X.target!==ot()||_.props.interactive&&X.relatedTarget&&S.contains(X.relatedTarget)||Bu(X)}function ty(X){return!!Ks.isTouch&&vt()!==X.type.indexOf("touch")>=0}function rw(){ow();var X=_.props,$e=X.popperOptions,pt=X.placement,En=X.offset,un=X.getReferenceClientRect,Lr=X.moveTransition,Xo=at()?Mb(S).arrow:null,mf=un?{getBoundingClientRect:un,contextElement:un.contextElement||ot()}:n,Uu=[{name:"offset",options:{offset:En}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Lr}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(uw){var gf=uw.state;if(at()){var VE=xt().box;["placement","reference-hidden","escaped"].forEach(function(dw){"placement"===dw?VE.setAttribute("data-placement",gf.placement):gf.attributes.popper["data-popper-"+dw]?VE.setAttribute("data-"+dw,""):VE.removeAttribute("data-"+dw)}),gf.attributes.popper={}}}}];at()&&Xo&&Uu.push({name:"arrow",options:{element:Xo,padding:3}}),Uu.push.apply(Uu,$e?.modifiers||[]),_.popperInstance=boe(mf,S,Object.assign({},$e,{placement:pt,onFirstUpdate:h,modifiers:Uu}))}function ow(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function nc(){return Nh(S.querySelectorAll("[data-tippy-root]"))}function ny(X){_.clearDelayTimeouts(),X&&be("onTrigger",[_,X]),Xi();var $e=le(!0),pt=He(),un=pt[1];Ks.isTouch&&"hold"===pt[0]&&un&&($e=un),$e?i=setTimeout(function(){_.show()},$e):_.show()}function Bu(X){if(_.clearDelayTimeouts(),be("onUntrigger",[_,X]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(X.type)>=0&&s)){var $e=le(!1);$e?r=setTimeout(function(){_.state.isVisible&&_.hide()},$e):o=requestAnimationFrame(function(){_.hide()})}}else oo()}}function xl(n,t){void 0===t&&(t={});var e=eo.plugins.concat(t.plugins||[]);!function Ooe(){document.addEventListener("touchstart",xoe,Sl),window.addEventListener("blur",Ioe)}();var i=Object.assign({},t,{plugins:e}),a=function Soe(n){return Tb(n)?[n]:function Moe(n){return F1(n,"NodeList")}(n)?Nh(n):Array.isArray(n)?n:Nh(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&Boe(c,i);return u&&l.push(u),l},[]);return Tb(n)?a[0]:a}xl.defaultProps=eo,xl.setDefaultProps=function(t){Object.keys(t).forEach(function(i){eo[i]=t[i]})},xl.currentInput=Ks,Object.assign({},Xj,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}}),xl.setDefaultProps({render:k3});const gs=xl,Yo=function(n){for(var t=0;;t++)if(!(n=n.previousSibling))return t},Zm=function(n){let t=n.assignedSlot||n.parentNode;return t&&11==t.nodeType?t.host:t};let L3=null;const Ba=function(n,t,e){let i=L3||(L3=document.createRange());return i.setEnd(n,e??n.nodeValue.length),i.setStart(n,t||0),i},au=function(n,t,e,i){return e&&(R3(n,t,e,i,-1)||R3(n,t,e,i,1))},Koe=/^(img|br|input|textarea|hr)$/i;function R3(n,t,e,i,r){for(;;){if(n==e&&t==i)return!0;if(t==(r<0?0:Qs(n))){let o=n.parentNode;if(!o||1!=o.nodeType||Zoe(n)||Koe.test(n.nodeName)||"false"==n.contentEditable)return!1;t=Yo(n)+(r<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[t+(r<0?-1:0)]).contentEditable)return!1;t=r<0?Qs(n):0}}}function Qs(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function Zoe(n){let t;for(let e=n;e&&!(t=e.pmViewDesc);e=e.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==n||t.contentDOM==n)}const Ib=function(n){return n.focusNode&&au(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function lu(n,t){let e=document.createEvent("Event");return e.initEvent("keydown",!0,!0),e.keyCode=n,e.key=e.code=t,e}const Zs=typeof navigator<"u"?navigator:null,F3=typeof document<"u"?document:null,Il=Zs&&Zs.userAgent||"",$1=/Edge\/(\d+)/.exec(Il),j3=/MSIE \d/.exec(Il),W1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Il),to=!!(j3||W1||$1),Ol=j3?document.documentMode:W1?+W1[1]:$1?+$1[1]:0,ys=!to&&/gecko\/(\d+)/i.test(Il);ys&&/Firefox\/(\d+)/.exec(Il);const G1=!to&&/Chrome\/(\d+)/.exec(Il),hr=!!G1,ese=G1?+G1[1]:0,Or=!to&&!!Zs&&/Apple Computer/.test(Zs.vendor),Ph=Or&&(/Mobile\/\w+/.test(Il)||!!Zs&&Zs.maxTouchPoints>2),qo=Ph||!!Zs&&/Mac/.test(Zs.platform),tse=!!Zs&&/Win/.test(Zs.platform),_s=/Android \d/.test(Il),Ob=!!F3&&"webkitFontSmoothing"in F3.documentElement.style,nse=Ob?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function ise(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Al(n,t){return"number"==typeof n?n:n[t]}function rse(n){let t=n.getBoundingClientRect();return{left:t.left,right:t.left+n.clientWidth*(t.width/n.offsetWidth||1),top:t.top,bottom:t.top+n.clientHeight*(t.height/n.offsetHeight||1)}}function z3(n,t,e){let i=n.someProp("scrollThreshold")||0,r=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=e||n.dom;s;s=Zm(s)){if(1!=s.nodeType)continue;let a=s,l=a==o.body,c=l?ise(o):rse(a),u=0,d=0;if(t.topc.bottom-Al(i,"bottom")&&(d=t.bottom-c.bottom+Al(r,"bottom")),t.leftc.right-Al(i,"right")&&(u=t.right-c.right+Al(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;t={left:t.left-p,top:t.top-m,right:t.right-p,bottom:t.bottom-m}}if(l)break}}function V3(n){let t=[],e=n.ownerDocument;for(let i=n;i&&(t.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),n!=e);i=Zm(i));return t}function B3(n,t){for(let e=0;e=a){s=Math.max(p.bottom,s),a=Math.min(p.top,a);let m=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!l&&p.left<=t.left&&p.right>=t.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!e&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(o=d+1)}}return!e&&l&&(e=l,r=c,i=0),e&&3==e.nodeType?function lse(n,t){let e=n.nodeValue.length,i=document.createRange();for(let r=0;r=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}(e,r):!e||i&&1==e.nodeType?{node:n,offset:o}:U3(e,r)}function Y1(n,t){return n.left>=t.left-1&&n.left<=t.right+1&&n.top>=t.top-1&&n.top<=t.bottom+1}function H3(n,t,e){let i=n.childNodes.length;if(i&&e.topt.top&&r++}i==n.dom&&r==i.childNodes.length-1&&1==i.lastChild.nodeType&&t.top>i.lastChild.getBoundingClientRect().bottom?a=n.state.doc.content.size:(0==r||1!=i.nodeType||"BR"!=i.childNodes[r-1].nodeName)&&(a=function dse(n,t,e,i){let r=-1;for(let o=t,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(t,e,-1)}(n,i,r,t))}null==a&&(a=function use(n,t,e){let{node:i,offset:r}=U3(t,e),o=-1;if(1==i.nodeType&&!i.firstChild){let s=i.getBoundingClientRect();o=s.left!=s.right&&e.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(i,r,o)}(n,s,t));let l=n.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function $3(n){return n.top=0&&r==i.nodeValue.length?(l--,u=1):e<0?l--:c++,Jm(kl(Ba(i,l,c),u),u<0)}{let l=kl(Ba(i,r,r),e);if(ys&&r&&/\s/.test(i.nodeValue[r-1])&&r=0)}if(null==o&&r&&(e<0||r==Qs(i))){let l=i.childNodes[r-1],c=3==l.nodeType?Ba(l,Qs(l)-(s?0:1)):1!=l.nodeType||"BR"==l.nodeName&&l.nextSibling?null:l;if(c)return Jm(kl(c,1),!1)}if(null==o&&r=0)}function Jm(n,t){if(0==n.width)return n;let e=t?n.left:n.right;return{top:n.top,bottom:n.bottom,left:e,right:e}}function q1(n,t){if(0==n.height)return n;let e=t?n.top:n.bottom;return{top:e,bottom:e,left:n.left,right:n.right}}function G3(n,t,e){let i=n.state,r=n.root.activeElement;i!=t&&n.updateState(t),r!=n.dom&&n.focus();try{return e()}finally{i!=t&&n.updateState(i),r!=n.dom&&r&&r.focus()}}const mse=/[\u0590-\u08ac]/;let Y3=null,q3=null,K3=!1;class Xm{constructor(t,e,i,r){this.parent=t,this.children=e,this.dom=i,this.contentDOM=r,this.dirty=0,i.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,i){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;eYo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!1;break}if(o.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!0;break}if(o.nextSibling)break}}return r??i>0?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let i=!0,r=t;r;r=r.parentNode){let s,o=this.getDesc(r);if(o&&(!e||o.node)){if(!i||!(s=o.nodeDOM)||(1==s.nodeType?s.contains(1==t.nodeType?t:t.parentNode):s==t))return o;i=!1}}}getDesc(t){let e=t.pmViewDesc;for(let i=e;i;i=i.parent)if(i==this)return e}posFromDOM(t,e,i){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,i)}return-1}descAt(t){for(let e=0,i=0;et||s instanceof X3){r=t-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,e);for(;i&&!(o=this.children[i-1]).size&&o instanceof Z3&&o.side>=0;i--);if(e<=0){let o,s=!0;for(;o=i?this.children[i-1]:null,o&&o.dom.parentNode!=this.contentDOM;i--,s=!1);return o&&e&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,e):{node:this.contentDOM,offset:o?Yo(o.dom)+1:0}}{let o,s=!0;for(;o=i=u&&e<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,e,u);t=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=Yo(h.dom)+1;break}t-=h.size}-1==r&&(r=0)}if(r>-1&&(c>e||a==this.children.length-1)){e=c;for(let u=a+1;uf&&se){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(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let i=0,r=0;r=i:ti){let a=i+o.border,l=s-o.border;if(t>=a&&e<=l)return this.dirty=t==i||e==s?2:1,void(t!=a||e!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,e-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 t=1;for(let e=this.parent;e;e=e.parent,t++){let i=1==t?2:1;e.dirtyo?o.parent?o.parent.posBeforeChild(o):void 0:r)),!e.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(t,[],s,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.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 _se extends Xm{constructor(t,e,i,r){super(t,[],e,null),this.textDOM=i,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class uu extends Xm{constructor(t,e,i,r){super(t,[],i,r),this.mark=e}static create(t,e,i,r){let o=r.nodeViews[e.type.name],s=o&&o(e,r,i);return(!s||!s.dom)&&(s=Ws.renderSpec(document,e.type.spec.toDOM(e,i))),new uu(t,e,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(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty0&&(o=Z1(o,0,t,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(e.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(e.text);else u||({dom:u,contentDOM:d}=Ws.renderSpec(document,e.type.spec.toDOM(e)));!d&&!e.isText&&"BR"!=u.nodeName&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),e.type.spec.draggable&&(u.draggable=!0));let h=u;return u=n4(u,i,e),c?l=new vse(t,e,i,r,u,d||null,h,c,o,s+1):e.isText?new Ab(t,e,i,r,u,h,o):new Nl(t,e,i,r,u,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let i=this.children[e];if(this.dom.contains(i.dom.parentNode)){t.contentElement=i.dom.parentNode;break}}t.contentElement||(t.getContent=()=>ce.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,i){return 0==this.dirty&&t.eq(this.node)&&Q1(e,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let i=this.node.inlineContent,r=e,o=t.composing?this.localCompositionInfo(t,e):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new wse(this,s&&s.node,t);(function Tse(n,t,e,i){let r=t.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(),t.forChild(o,u),d),o=h}})(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,i,t):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?kn.none:this.node.child(u).marks,i,t),l.placeWidget(c,t,r)},(c,u,d,h)=>{let f;l.syncToMarks(c.marks,i,t),l.findNodeMatch(c,u,d,h)||a&&t.state.selection.from>r&&t.state.selection.to-1&&l.updateNodeAt(c,u,d,f,t)||l.updateNextNode(c,u,d,t,h,r)||l.addNode(c,u,d,t,r),r+=c.nodeSize}),l.syncToMarks([],i,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),e4(this.contentDOM,this.children,t),Ph&&function Mse(n){if("UL"==n.nodeName||"OL"==n.nodeName){let t=n.style.cssText;n.style.cssText=t+"; list-style: square !important",window.getComputedStyle(n),n.style.cssText=t}}(this.dom))}localCompositionInfo(t,e){let{from:i,to:r}=t.state.selection;if(!(t.state.selection instanceof nt)||ie+this.node.content.size)return null;let o=t.domSelectionRange(),s=function Sse(n,t){for(;;){if(3==n.nodeType)return n;if(1==n.nodeType&&t>0){if(n.childNodes.length>t&&3==n.childNodes[t].nodeType)return n.childNodes[t];t=Qs(n=n.childNodes[t-1])}else{if(!(1==n.nodeType&&t=e){let c=a=0&&c+t.length+a>=e)return a+c;if(e==i&&l.length>=i+t.length-a&&l.slice(i-a,i-a+t.length)==t)return i}}return-1}(this.node.content,a,i-e,r-e);return l<0?null:{node:s,pos:l,text:a}}return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:i,text:r}){if(this.getDesc(e))return;let o=e;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 _se(this,o,e,r);t.input.compositionNodes.push(s),this.children=Z1(this.children,i,i+r.length,t,s)}update(t,e,i,r){return!(3==this.dirty||!t.sameMarkup(this.node)||(this.updateInner(t,e,i,r),0))}updateInner(t,e,i,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=i,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(Q1(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,i=this.dom;this.dom=t4(this.dom,this.nodeDOM,K1(this.outerDeco,this.node,e),K1(t,this.node,e)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}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,t,e,i,r){n4(i,t,n);let o=new Nl(void 0,n,t,e,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}class Ab extends Nl{constructor(t,e,i,r,o,s,a){super(t,e,i,r,o,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,i,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node)||(this.updateOuterDeco(e),(0!=this.dirty||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,0))}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,i){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,i)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,i){let r=this.node.cut(t,e),o=document.createTextNode(r.text);return new Ab(this.parent,r,this.outerDeco,this.innerDeco,o,o,i)}markDirty(t,e){super.markDirty(t,e),this.dom!=this.nodeDOM&&(0==t||e==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}}class X3 extends Xm{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class vse extends Nl{constructor(t,e,i,r,o,s,a,l,c,u){super(t,e,i,r,o,s,a,c,u),this.spec=l}update(t,e,i,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(t,e,i);return o&&this.updateInner(t,e,i,r),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,i,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,i,r){this.spec.setSelection?this.spec.setSelection(t,e,i):super.setSelection(t,e,i,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function e4(n,t,e){let i=n.firstChild,r=!1;for(let o=0;o0;){let a;for(;;)if(i){let c=e.children[i-1];if(!(c instanceof uu)){a=c,i--;break}e=c,i=c.children.length}else{if(e==t)break e;i=e.parent.children.indexOf(e),e=e.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()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let i=t;i>1,s=Math.min(o,t.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=uu.create(this.top,t[o],e,i);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,i,r){let s,o=-1;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(t,e,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=e||u<=t?o.push(l):(ce&&o.push(l.slice(e-c,l.size,i)))}return o}function J1(n,t=null){let e=n.domSelectionRange(),i=n.state.doc;if(!e.focusNode)return null;let r=n.docView.nearestDesc(e.focusNode),o=r&&0==r.size,s=n.docView.posFromDOM(e.focusNode,e.focusOffset,1);if(s<0)return null;let l,c,a=i.resolve(s);if(Ib(e)){for(l=a;r&&!r.node;)r=r.parent;let u=r.node;if(r&&u.isAtom&&qe.isSelectable(u)&&r.parent&&(!u.isInline||!function Qoe(n,t,e){for(let i=0==t,r=t==Qs(n);i||r;){if(n==e)return!0;let o=Yo(n);if(!(n=n.parentNode))return!1;i=i&&0==o,r=r&&o==Qs(n)}}(e.focusNode,e.focusOffset,r.dom))){let d=r.posBefore;c=new qe(s==d?a:i.resolve(d))}}else{let u=n.docView.posFromDOM(e.anchorNode,e.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}return c||(c=eS(n,l,a,"pointer"==t||n.state.selection.head{(e.anchorNode!=i||e.anchorOffset!=r)&&(t.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!o4(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const s4=Or||hr&&ese<63;function a4(n,t){let{node:e,offset:i}=n.docView.domFromPos(t,0),r=ir(n,t,e))||nt.between(t,e,i)}function d4(n){return!(n.editable&&!n.hasFocus())&&h4(n)}function h4(n){let t=n.domSelectionRange();if(!t.anchorNode)return!1;try{return n.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(n.editable||n.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function tS(n,t){let{$anchor:e,$head:i}=n.selection,r=t>0?e.max(i):e.min(i),o=r.parent.inlineContent?r.depth?n.doc.resolve(t>0?r.after():r.before()):null:r;return o&&rt.findFrom(o,t)}function hu(n,t){return n.dispatch(n.state.tr.setSelection(t).scrollIntoView()),!0}function f4(n,t,e){let i=n.state.selection;if(!(i instanceof nt)){if(i instanceof qe&&i.node.isInline)return hu(n,new nt(t>0?i.$to:i.$from));{let r=tS(n.state,t);return!!r&&hu(n,r)}}if(!i.empty||e.indexOf("s")>-1)return!1;if(n.endOfTextblock(t>0?"forward":"backward")){let r=tS(n.state,t);return!!(r&&r instanceof qe)&&hu(n,r)}if(!(qo&&e.indexOf("m")>-1)){let s,r=i.$head,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText)return!1;let a=t<0?r.pos-o.nodeSize:r.pos;return!!(o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM)&&(qe.isSelectable(o)?hu(n,new qe(t<0?n.state.doc.resolve(r.pos-o.nodeSize):r)):!!Ob&&hu(n,new nt(n.state.doc.resolve(t<0?a:a+o.nodeSize))))}}function kb(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function tg(n){let t=n.pmViewDesc;return t&&0==t.size&&(n.nextSibling||"BR"!=n.nodeName)}function ng(n,t){return t<0?function Ase(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let r,o,s=!1;for(ys&&1==e.nodeType&&i0){if(1!=e.nodeType)break;{let a=e.childNodes[i-1];if(tg(a))r=e,o=--i;else{if(3!=a.nodeType)break;e=a,i=e.nodeValue.length}}}else{if(m4(e))break;{let a=e.previousSibling;for(;a&&tg(a);)r=e.parentNode,o=Yo(a),a=a.previousSibling;if(a)e=a,i=kb(e);else{if(e=e.parentNode,e==n.dom)break;i=0}}}s?nS(n,e,i):r&&nS(n,r,o)}(n):p4(n)}function p4(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let o,s,r=kb(e);for(;;)if(i{n.state==r&&Ua(n)},50)}function g4(n,t){let e=n.state.doc.resolve(t);if(!hr&&!tse&&e.parent.inlineContent){let r=n.coordsAtPos(t);if(t>e.start()){let o=n.coordsAtPos(t-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 y4(n,t,e){let i=n.state.selection;if(i instanceof nt&&!i.empty||e.indexOf("s")>-1||qo&&e.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||n.endOfTextblock(t<0?"up":"down")){let s=tS(n.state,t);if(s&&s instanceof qe)return hu(n,s)}if(!r.parent.inlineContent){let s=t<0?r:o,a=i instanceof To?rt.near(s,t):rt.findFrom(s,t);return!!a&&hu(n,a)}return!1}function _4(n,t){if(!(n.state.selection instanceof nt))return!0;let{$head:e,$anchor:i,empty:r}=n.state.selection;if(!e.sameParent(i))return!0;if(!r)return!1;if(n.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!e.textOffset&&(t<0?e.nodeBefore:e.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return t<0?s.delete(e.pos-o.nodeSize,e.pos):s.delete(e.pos,e.pos+o.nodeSize),n.dispatch(s),!0}return!1}function v4(n,t,e){n.domObserver.stop(),t.contentEditable=e,n.domObserver.start()}function b4(n,t){n.someProp("transformCopied",f=>{t=f(t,n)});let e=[],{content:i,openStart:r,openEnd:o}=t;for(;r>1&&o>1&&1==i.childCount&&1==i.firstChild.childCount;){r--,o--;let f=i.firstChild;e.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),i=f.content}let s=n.someProp("clipboardSerializer")||Ws.fromSchema(n.state.schema),a=x4(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u,c=l.firstChild,d=0;for(;c&&1==c.nodeType&&(u=S4[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(e)}`),{dom:l,text:n.someProp("clipboardTextSerializer",f=>f(t,n))||t.content.textBetween(0,t.content.size,"\n\n")}}function w4(n,t,e,i,r){let s,a,o=r.parent.type.spec.code;if(!e&&!t)return null;let l=t&&(i||o||!e);if(l){if(n.someProp("transformPastedText",h=>{t=h(t,o||i,n)}),o)return t?new Ce(ce.from(n.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Ce.empty;let d=n.someProp("clipboardTextParser",h=>h(t,r,i,n));if(d)a=d;else{let h=r.marks(),{schema:f}=n.state,p=Ws.fromSchema(f);s=document.createElement("div"),t.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=>{e=d(e,n)}),s=function Fse(n){let t=/^(\s*]*>)*/.exec(n);t&&(n=n.slice(t[0].length));let r,e=x4().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(n);if((r=i&&S4[i[1].toLowerCase()])&&(n=r.map(o=>"<"+o+">").join("")+n+r.map(o=>"").reverse().join("")),e.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")||wh.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!(!l&&!u),context:r,ruleFromNode:h=>"BR"!=h.nodeName||h.nextSibling||!h.parentNode||Lse.test(h.parentNode.nodeName)?null:{ignore:!0}})),u)a=function zse(n,t){if(!n.size)return n;let i,e=n.content.firstChild.type.schema;try{i=JSON.parse(t)}catch{return n}let{content:r,openStart:o,openEnd:s}=n;for(let a=i.length-2;a>=0;a-=2){let l=e.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=ce.from(l.create(i[a+1],r)),o++,s++}return new Ce(r,o,s)}(M4(a,+u[1],+u[2]),u[4]);else if(a=Ce.maxOpen(function Rse(n,t){if(n.childCount<2)return n;for(let e=t.depth;e>=0;e--){let o,r=t.node(e).contentMatchAt(t.index(e)),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&&D4(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=T4(s[s.length-1],o.length));let u=C4(a,l);s.push(u),r=r.matchType(u.type),o=l}}),s)return ce.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 Lse=/^(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 C4(n,t,e=0){for(let i=t.length-1;i>=e;i--)n=t[i].create(null,ce.from(n));return n}function D4(n,t,e,i,r){if(r1&&(o=0),r=e&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(ce.empty,!0))),n.replaceChild(t<0?0:n.childCount-1,s.copy(a))}function M4(n,t,e){return t{for(let e in t)n.input.eventHandlers[e]||n.dom.addEventListener(e,n.input.eventHandlers[e]=i=>oS(n,i))})}function oS(n,t){return n.someProp("handleDOMEvents",e=>{let i=e[t.type];return!!i&&(i(n,t)||t.defaultPrevented)})}function $se(n,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let e=t.target;e!=n.dom;e=e.parentNode)if(!e||11==e.nodeType||e.pmViewDesc&&e.pmViewDesc.stopEvent(t))return!1;return!0}function Nb(n){return{left:n.clientX,top:n.clientY}}function sS(n,t,e,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(t,a=>s>o.depth?a(n,e,o.nodeAfter,o.before(s),r,!0):a(n,e,o.node(s),o.before(s),r,!1)))return!0;return!1}function Rh(n,t,e){n.focused||n.focus();let i=n.state.tr.setSelection(t);"pointer"==e&&i.setMeta("pointer",!0),n.dispatch(i)}function Qse(n,t,e,i){return sS(n,"handleDoubleClickOn",t,e,i)||n.someProp("handleDoubleClick",r=>r(n,t,i))}function Zse(n,t,e,i){return sS(n,"handleTripleClickOn",t,e,i)||n.someProp("handleTripleClick",r=>r(n,t,i))||function Jse(n,t,e){if(0!=e.button)return!1;let i=n.state.doc;if(-1==t)return!!i.inlineContent&&(Rh(n,nt.create(i,0,i.content.size),"pointer"),!0);let r=i.resolve(t);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)Rh(n,nt.create(i,a+1,a+1+s.content.size),"pointer");else{if(!qe.isSelectable(s))continue;Rh(n,qe.create(i,a),"pointer")}return!0}}(n,e,i)}function aS(n){return Pb(n)}kr.keydown=(n,t)=>{let e=t;if(n.input.shiftKey=16==e.keyCode||e.shiftKey,!O4(n,e)&&(n.input.lastKeyCode=e.keyCode,n.input.lastKeyCodeTime=Date.now(),!_s||!hr||13!=e.keyCode))if(229!=e.keyCode&&n.domObserver.forceFlush(),!Ph||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)n.someProp("handleKeyDown",i=>i(n,e))||function Pse(n,t){let e=t.keyCode,i=function Nse(n){let t="";return n.ctrlKey&&(t+="c"),n.metaKey&&(t+="m"),n.altKey&&(t+="a"),n.shiftKey&&(t+="s"),t}(t);if(8==e||qo&&72==e&&"c"==i)return _4(n,-1)||ng(n,-1);if(46==e||qo&&68==e&&"c"==i)return _4(n,1)||ng(n,1);if(13==e||27==e)return!0;if(37==e||qo&&66==e&&"c"==i){let r=37==e?"ltr"==g4(n,n.state.selection.from)?-1:1:-1;return f4(n,r,i)||ng(n,r)}if(39==e||qo&&70==e&&"c"==i){let r=39==e?"ltr"==g4(n,n.state.selection.from)?1:-1:1;return f4(n,r,i)||ng(n,r)}return 38==e||qo&&80==e&&"c"==i?y4(n,-1,i)||ng(n,-1):40==e||qo&&78==e&&"c"==i?function kse(n){if(!Or||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:e}=n.domSelectionRange();if(t&&1==t.nodeType&&0==e&&t.firstChild&&"false"==t.firstChild.contentEditable){let i=t.firstChild;v4(n,i,"true"),setTimeout(()=>v4(n,i,"false"),20)}return!1}(n)||y4(n,1,i)||p4(n):i==(qo?"m":"c")&&(66==e||73==e||89==e||90==e)}(n,e)?e.preventDefault():Pl(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,lu(13,"Enter"))),n.input.lastIOSEnter=0)},200)}},kr.keyup=(n,t)=>{16==t.keyCode&&(n.input.shiftKey=!1)},kr.keypress=(n,t)=>{let e=t;if(O4(n,e)||!e.charCode||e.ctrlKey&&!e.altKey||qo&&e.metaKey)return;if(n.someProp("handleKeyPress",r=>r(n,e)))return void e.preventDefault();let i=n.state.selection;if(!(i instanceof nt&&i.$from.sameParent(i.$to))){let r=String.fromCharCode(e.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()),e.preventDefault()}};const I4=qo?"metaKey":"ctrlKey";Ar.mousedown=(n,t)=>{let e=t;n.input.shiftKey=e.shiftKey;let i=aS(n),r=Date.now(),o="singleClick";r-n.input.lastClick.time<500&&function Gse(n,t){let e=t.x-n.clientX,i=t.y-n.clientY;return e*e+i*i<100}(e,n.input.lastClick)&&!e[I4]&&("singleClick"==n.input.lastClick.type?o="doubleClick":"doubleClick"==n.input.lastClick.type&&(o="tripleClick")),n.input.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};let s=n.posAtCoords(Nb(e));s&&("singleClick"==o?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Xse(n,s,e,!!i)):("doubleClick"==o?Qse:Zse)(n,s.pos,s.inside,e)?e.preventDefault():Pl(n,"pointer"))};class Xse{constructor(t,e,i,r){let o,s;if(this.view=t,this.pos=e,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!i[I4],this.allowDefault=i.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let u=t.state.doc.resolve(e.pos);o=u.parent,s=u.depth?u.before():0}const a=r?null:i.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(0==i.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof qe&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!ys||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()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Pl(t,"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(()=>Ua(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(Nb(t))),this.updateAllowDefault(t),this.allowDefault||!e?Pl(this.view,"pointer"):function Kse(n,t,e,i,r){return sS(n,"handleClickOn",t,e,i)||n.someProp("handleClick",o=>o(n,t,i))||(r?function qse(n,t){if(-1==t)return!1;let i,r,e=n.state.selection;e instanceof qe&&(i=e.node);let o=n.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(qe.isSelectable(a)){r=i&&e.$from.depth>0&&s>=e.$from.depth&&o.before(e.$from.depth+1)==e.$from.pos?o.before(e.$from.depth):o.before(s);break}}return null!=r&&(Rh(n,qe.create(n.state.doc,r),"pointer"),!0)}(n,e):function Yse(n,t){if(-1==t)return!1;let e=n.state.doc.resolve(t),i=e.nodeAfter;return!!(i&&i.isAtom&&qe.isSelectable(i))&&(Rh(n,new qe(e),"pointer"),!0)}(n,e))}(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||Or&&this.mightDrag&&!this.mightDrag.node.isAtom||hr&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(Rh(this.view,rt.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Pl(this.view,"pointer")}move(t){this.updateAllowDefault(t),Pl(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function O4(n,t){return!!n.composing||!!(Or&&Math.abs(t.timeStamp-n.input.compositionEndedAt)<500)&&(n.input.compositionEndedAt=-2e8,!0)}Ar.touchstart=n=>{n.input.lastTouch=Date.now(),aS(n),Pl(n,"pointer")},Ar.touchmove=n=>{n.input.lastTouch=Date.now(),Pl(n,"pointer")},Ar.contextmenu=n=>aS(n);const eae=_s?5e3:-1;function A4(n,t){clearTimeout(n.input.composingTimeout),t>-1&&(n.input.composingTimeout=setTimeout(()=>Pb(n),t))}function k4(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=function tae(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function Pb(n,t=!1){if(!(_s&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),k4(n),t||n.docView&&n.docView.dirty){let e=J1(n);return e&&!e.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(e)):n.updateState(n.state),!0}return!1}}kr.compositionstart=kr.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:t}=n,e=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!e.textOffset&&e.parentOffset&&e.nodeBefore.marks.some(i=>!1===i.type.spec.inclusive)))n.markCursor=n.state.storedMarks||e.marks(),Pb(n,!0),n.markCursor=null;else if(Pb(n),ys&&t.selection.empty&&e.parentOffset&&!e.textOffset&&e.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}A4(n,eae)},kr.compositionend=(n,t)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=t.timeStamp,n.input.compositionID++,A4(n,20))};const Fh=to&&Ol<15||Ph&&nse<604;function ig(n,t,e,i,r){let o=w4(n,t,e,i,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,r,o||Ce.empty)))return!0;if(!o)return!1;let s=function iae(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}Ar.copy=kr.cut=(n,t)=>{let e=t,i=n.state.selection,r="cut"==e.type;if(i.empty)return;let o=Fh?null:e.clipboardData,s=i.content(),{dom:a,text:l}=b4(n,s);o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function nae(n,t){if(!n.dom.parentNode)return;let e=n.dom.parentNode.appendChild(document.createElement("div"));e.appendChild(t),e.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(t),n.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e),n.focus()},50)}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},kr.paste=(n,t)=>{let e=t;if(n.composing&&!_s)return;let i=Fh?null:e.clipboardData;i&&ig(n,i.getData("text/plain"),i.getData("text/html"),n.input.shiftKey,e)?e.preventDefault():function rae(n,t){if(!n.dom.parentNode)return;let e=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,i=n.dom.parentNode.appendChild(document.createElement(e?"textarea":"div"));e||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{n.focus(),i.parentNode&&i.parentNode.removeChild(i),e?ig(n,i.value,null,n.input.shiftKey,t):ig(n,i.textContent,i.innerHTML,n.input.shiftKey,t)},50)}(n,e)};class oae{constructor(t,e){this.slice=t,this.move=e}}const N4=qo?"altKey":"ctrlKey";Ar.dragstart=(n,t)=>{let e=t,i=n.input.mouseDown;if(i&&i.done(),!e.dataTransfer)return;let r=n.state.selection,o=r.empty?null:n.posAtCoords(Nb(e));if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof qe?r.to-1:r.to)))if(i&&i.mightDrag)n.dispatch(n.state.tr.setSelection(qe.create(n.state.doc,i.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){let c=n.docView.nearestDesc(e.target,!0);c&&c.node.type.spec.draggable&&c!=n.docView&&n.dispatch(n.state.tr.setSelection(qe.create(n.state.doc,c.posBefore)))}let s=n.state.selection.content(),{dom:a,text:l}=b4(n,s);e.dataTransfer.clearData(),e.dataTransfer.setData(Fh?"Text":"text/html",a.innerHTML),e.dataTransfer.effectAllowed="copyMove",Fh||e.dataTransfer.setData("text/plain",l),n.dragging=new oae(s,!e[N4])},Ar.dragend=n=>{let t=n.dragging;window.setTimeout(()=>{n.dragging==t&&(n.dragging=null)},50)},kr.dragover=kr.dragenter=(n,t)=>t.preventDefault(),kr.drop=(n,t)=>{let e=t,i=n.dragging;if(n.dragging=null,!e.dataTransfer)return;let r=n.posAtCoords(Nb(e));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=w4(n,e.dataTransfer.getData(Fh?"Text":"text/plain"),Fh?null:e.dataTransfer.getData("text/html"),!1,o);let a=!(!i||e[N4]);if(n.someProp("handleDrop",p=>p(n,e,s||Ce.empty,a)))return void e.preventDefault();if(!s)return;e.preventDefault();let l=s?Ij(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&&qe.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new qe(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,g,y,b)=>p=b),c.setSelection(eS(n,f,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},Ar.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())&&Ua(n)},20))},Ar.blur=(n,t)=>{let e=t;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),e.relatedTarget&&n.dom.contains(e.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},Ar.beforeinput=(n,t)=>{if(hr&&_s&&"deleteContentBackward"==t.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,lu(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 kr)Ar[n]=kr[n];function rg(n,t){if(n==t)return!0;for(let e in n)if(n[e]!==t[e])return!1;for(let e in t)if(!(e in n))return!1;return!0}class lS{constructor(t,e){this.toDOM=t,this.spec=e||fu,this.side=this.spec.side||0}map(t,e,i,r){let{pos:o,deleted:s}=t.mapResult(e.from+r,this.side<0?-1:1);return s?null:new ki(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof lS&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&rg(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Ll{constructor(t,e){this.attrs=t,this.spec=e||fu}map(t,e,i,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-i,s=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new ki(o,s,this)}valid(t,e){return e.from=t&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,e-a,i,r+a,o)}}map(t,e,i){return this==fr||0==t.maps.length?this:this.mapInner(t,e,0,0,i||fu)}mapInner(t,e,i,r,o){let s;for(let a=0;a{let g=m-p-(f-h);for(let y=0;yb+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=e.maps[c].map(u,-1)}let l=!1;for(let c=0;c=i.content.size){l=!0;continue}let f=e.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(e,g,u+1,n[c]+o+1,s);y!=fr?(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 aae(n,t,e,i,r,o,s){function a(l,c){for(let u=0;u{let u,c=l+i;if(u=L4(e,a,c)){for(r||(r=this.children.slice());oa&&d.to=t){this.children[a]==t&&(i=this.children[a+2]);break}let o=t+1,s=o+e.content.size;for(let a=0;ao&&l.type instanceof Ll){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;cr.map(t,e,fu));return Rl.from(i)}forChild(t,e){if(e.isLeaf)return Fn.empty;let i=[];for(let r=0;re instanceof Fn)?t:t.reduce((e,i)=>e.concat(i instanceof Fn?i:i.members),[]))}}}function P4(n,t){if(!t||!n.length)return n;let e=[];for(let i=0;ie&&s.to{let c=L4(n,a,l+e);if(c){o=!0;let u=Lb(c,a,e+l+1,i);u!=fr&&r.push(l,l+a.nodeSize,u)}});let s=P4(o?R4(n):n,-e).sort(pu);for(let a=0;a0;)t++;n.splice(t,0,e)}function dS(n){let t=[];return n.someProp("decorations",e=>{let i=e(n.state);i&&i!=fr&&t.push(i)}),n.cursorWrapper&&t.push(Fn.create(n.state.doc,[n.cursorWrapper.deco])),Rl.from(t)}const lae={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},cae=to&&Ol<=11;class uae{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class dae{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new uae,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()}),cae&&(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,lae)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;ethis.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(d4(this.view)){if(this.suppressingSelectionUpdates)return Ua(this.view);if(to&&Ol<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&au(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let i,e=new Set;for(let o=t.focusNode;o;o=Zm(o))e.add(o);for(let o=t.anchorNode;o;o=Zm(o))if(e.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:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);let i=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&d4(t)&&!this.ignoreSelectionChange(i),o=-1,s=-1,a=!1,l=[];if(t.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&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||r)&&(o>-1&&(t.docView.markDirty(o,s),function hae(n){if(!j4.has(n)&&(j4.set(n,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace))){if(n.requiresGeckoHackNode=ys,z4)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."),z4=!0}}(t)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(i)||Ua(t),this.currentSelection.set(i))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let i=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(i==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style"))||!i||i.ignoreMutation(t))return null;if("childList"==t.type){for(let u=0;ut.content.size?null:eS(n,t.resolve(e.anchor),t.resolve(e.head))}function hS(n,t,e){let i=n.depth,r=t?n.end():n.pos;for(;i>0&&(t||n.indexAfter(i)==n.node(i).childCount);)i--,r++,t=!1;if(e){let o=n.node(i).maybeChild(n.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,r++}return r}class wae{constructor(t,e){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 Bse,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(W4),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=H4(this),U4(this),this.nodeViews=$4(this),this.docView=J3(this.state.doc,B4(this),dS(this),this.dom,this),this.domObserver=new dae(this,(i,r,o,s)=>function yae(n,t,e,i,r){if(t<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(hr&&_s&&13===n.input.lastKeyCode&&Date.now()-100vt(n,lu(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(t),s=o.sharedDepth(e);t=o.before(s+1),e=n.state.doc.resolve(e).after(s+1);let d,h,a=n.state.selection,l=function pae(n,t,e){let c,{node:i,fromOffset:r,toOffset:o,from:s,to:a}=n.docView.parseRange(t,e),l=n.domSelectionRange(),u=l.anchorNode;if(u&&n.dom.contains(1==u.nodeType?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Ib(l)||c.push({node:l.focusNode,offset:l.focusOffset})),hr&&8===n.input.lastKeyCode)for(let g=o;g>r;g--){let y=i.childNodes[g-1],b=y.pmViewDesc;if("BR"==y.nodeName&&!b){o=g;break}if(!b||b.size)break}let d=n.state.doc,h=n.someProp("domParser")||wh.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:mae,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,t,e),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((Ph&&n.input.lastIOSEnter>Date.now()-225||_s)&&r.some(K=>1==K.nodeType&&!gae.test(K.nodeName))&&(!f||f.endA>=f.endB)&&n.someProp("handleKeyDown",K=>K(n,lu(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(!f){if(!(i&&a instanceof nt&&!a.empty&&a.$head.sameParent(a.$anchor))||n.composing||l.sel&&l.sel.anchor!=l.sel.head){if(l.sel){let K=V4(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(hr&&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)),to&&Ol<=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 b,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((Ph&&n.input.lastIOSEnter>Date.now()-225&&(!y||r.some(K=>"DIV"==K.nodeName||"P"==K.nodeName))||!y&&p.posK(n,lu(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(n.state.selection.anchor>f.start&&function vae(n,t,e,i,r){if(!i.parent.isTextblock||e-t<=r.pos-i.pos||hS(i,!0,!1)e||hS(s,!0,!1)K(n,lu(8,"Backspace"))))return void(_s&&hr&&n.domObserver.suppressSelectionUpdates());hr&&_s&&f.endB==f.start&&(n.input.lastAndroidDelete=Date.now()),_s&&!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,lu(13,"Enter"))})},20));let N,S,ie,w=f.start,_=f.endA;if(y)if(p.pos==m.pos)to&&Ol<=11&&0==p.parentOffset&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ua(n),20)),N=n.state.tr.delete(w,_),S=c.resolve(f.start).marksAcross(c.resolve(f.endA));else if(f.endA==f.endB&&(ie=function _ae(n,t){let s,a,l,e=n.firstChild.marks,i=t.firstChild.marks,r=e,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=V4(n,N.doc,l.sel);K&&!(hr&&_s&&n.composing&&K.empty&&(f.start!=f.endB||n.input.lastAndroidDelete{$se(n,i)&&!oS(n,i)&&(n.editable||!(i.type in kr))&&e(n,i)},Vse[t]?{passive:!0}:void 0)}Or&&n.dom.addEventListener("input",()=>null),rS(n)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&rS(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(W4),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let i in this._props)e[i]=this._props[i];e.state=this.state;for(let i in t)e[i]=t[i];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){let i=this.state,r=!1,o=!1;t.storedMarks&&this.composing&&(k4(this),o=!0),this.state=t;let s=i.plugins!=t.plugins||this._props.plugins!=e.plugins;if(s||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let h=$4(this);(function Dae(n,t){let e=0,i=0;for(let r in n){if(n[r]!=t[r])return!0;e++}for(let r in t)i++;return e!=i})(h,this.nodeViews)&&(this.nodeViews=h,r=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&rS(this),this.editable=H4(this),U4(this);let a=dS(this),l=B4(this),c=i.plugins==t.plugins||i.doc.eq(t.doc)?t.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",u=r||!this.docView.matchesNode(t.doc,l,a);(u||!t.selection.eq(i.selection))&&(o=!0);let d="preserve"==c&&o&&null==this.dom.style.overflowAnchor&&function ose(n){let i,r,t=n.dom.getBoundingClientRect(),e=Math.max(0,t.top);for(let o=(t.left+t.right)/2,s=e+1;s=e-20){i=a,r=l.top;break}}return{refDOM:i,refTop:r,stack:V3(n.dom)}}(this);if(o){this.domObserver.stop();let h=u&&(to||hr)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&function Cae(n,t){let e=Math.min(n.$anchor.sharedDepth(n.head),t.$anchor.sharedDepth(t.head));return n.$anchor.start(e)!=t.$anchor.start(e)}(i.selection,t.selection);if(u){let f=hr?this.trackWrites=this.domSelectionRange().focusNode:null;(r||!this.docView.update(t.doc,l,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=J3(t.doc,l,a,this.dom,this)),f&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function Ose(n){let t=n.docView.domFromPos(n.state.selection.anchor,0),e=n.domSelectionRange();return au(t.node,t.offset,e.anchorNode,e.anchorOffset)}(this))?Ua(this,h):(c4(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():d&&function sse({refDOM:n,refTop:t,stack:e}){let i=n?n.getBoundingClientRect().top:0;B3(e,0==i?0:i-t)}(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",e=>e(this)))if(this.state.selection instanceof qe){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&z3(this,e.getBoundingClientRect(),t)}else z3(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;ee.ownerDocument.getSelection()),this._root=e;return t||document}posAtCoords(t){return hse(this,t)}coordsAtPos(t,e=1){return W3(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,i=-1){let r=this.docView.posFromDOM(t,e,i);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return function yse(n,t,e){return Y3==t&&q3==e?K3:(Y3=t,q3=e,K3="up"==e||"down"==e?function pse(n,t,e){let i=t.selection,r="up"==e?i.$from:i.$to;return G3(n,t,()=>{let{node:o}=n.docView.domFromPos(r.pos,"up"==e?-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=W3(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=Ba(a,0,a.nodeValue.length).getClientRects()}for(let c=0;cu.top+1&&("up"==e?s.top-u.top>2*(u.bottom-s.top):u.bottom-s.bottom>2*(s.bottom-u.top)))return!1}}return!0})}(n,t,e):function gse(n,t,e){let{$head:i}=t.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=!r,s=r==i.parent.content.size,a=n.domSelection();return mse.test(i.parent.textContent)&&a.modify?G3(n,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",e,"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"==e||"backward"==e?o:s}(n,t,e))}(this,e||this.state,t)}pasteHTML(t,e){return ig(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return ig(this,t,null,!0,e||new ClipboardEvent("paste"))}destroy(){this.docView&&(function Hse(n){n.domObserver.stop();for(let t in n.input.eventHandlers)n.dom.removeEventListener(t,n.input.eventHandlers[t]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],dS(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(t){return function Wse(n,t){!oS(n,t)&&Ar[t.type]&&(n.editable||!(t.type in kr))&&Ar[t.type](n,t)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return Or&&11===this.root.nodeType&&function Joe(n){let t=n.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom?function fae(n){let t;function e(l){l.preventDefault(),l.stopImmediatePropagation(),t=l.getTargetRanges()[0]}n.dom.addEventListener("beforeinput",e,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",e,!0);let i=t.startContainer,r=t.startOffset,o=t.endContainer,s=t.endOffset,a=n.domAtPos(n.state.selection.anchor);return au(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 B4(n){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(n.editable),n.someProp("attributes",e=>{if("function"==typeof e&&(e=e(n.state)),e)for(let i in e)"class"==i?t.class+=" "+e[i]:"style"==i?t.style=(t.style?t.style+";":"")+e[i]:!t[i]&&"contenteditable"!=i&&"nodeName"!=i&&(t[i]=String(e[i]))}),t.translate||(t.translate="no"),[ki.node(0,n.state.doc.content.size,t)]}function U4(n){if(n.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),n.cursorWrapper={dom:t,deco:ki.widget(n.state.selection.head,t,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function H4(n){return!n.someProp("editable",t=>!1===t(n.state))}function $4(n){let t=Object.create(null);function e(i){for(let r in i)Object.prototype.hasOwnProperty.call(t,r)||(t[r]=i[r])}return n.someProp("nodeViews",e),n.someProp("markViews",e),t}function W4(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 Fl={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:"'"},Rb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Tae=typeof navigator<"u"&&/Mac/.test(navigator.platform),Mae=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Zi=0;Zi<10;Zi++)Fl[48+Zi]=Fl[96+Zi]=String(Zi);for(Zi=1;Zi<=24;Zi++)Fl[Zi+111]="F"+Zi;for(Zi=65;Zi<=90;Zi++)Fl[Zi]=String.fromCharCode(Zi+32),Rb[Zi]=String.fromCharCode(Zi);for(var fS in Fl)Rb.hasOwnProperty(fS)||(Rb[fS]=Fl[fS]);const Eae=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function xae(n){let i,r,o,s,t=n.split(/-(?!$)/),e=t[t.length-1];"Space"==e&&(e=" ");for(let a=0;a127)&&(o=Fl[i.keyCode])&&o!=r){let a=t[pS(o,i)];if(a&&a(e.state,e.dispatch,e))return!0}}return!1}}const gS=(n,t)=>!n.selection.empty&&(t&&t(n.tr.deleteSelection().scrollIntoView()),!0);const Y4=(n,t,e)=>{let i=function G4(n,t){let{$cursor:e}=n.selection;return!e||(t?!t.endOfTextblock("backward",n):e.parentOffset>0)?null:e}(n,e);if(!i)return!1;let r=yS(i);if(!r){let s=i.blockRange(),a=s&&Th(s);return null!=a&&(t&&t(n.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(!o.type.spec.isolating&&o5(n,r,t))return!0;if(0==i.parent.content.size&&(zh(o,"end")||qe.isSelectable(o))){let s=v1(n.doc,i.before(),i.after(),Ce.empty);if(s&&s.slice.size{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(e?!e.endOfTextblock("backward",n):i.parentOffset>0)return!1;o=yS(i)}let s=o&&o.nodeBefore;return!(!s||!qe.isSelectable(s)||(t&&t(n.tr.setSelection(qe.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),0))};function yS(n){if(!n.parent.type.spec.isolating)for(let t=n.depth-1;t>=0;t--){if(n.index(t)>0)return n.doc.resolve(n.before(t+1));if(n.node(t).type.spec.isolating)break}return null}const Z4=(n,t,e)=>{let i=function Q4(n,t){let{$cursor:e}=n.selection;return!e||(t?!t.endOfTextblock("forward",n):e.parentOffset{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(e?!e.endOfTextblock("forward",n):i.parentOffset=0;t--){let e=n.node(t);if(n.index(t)+1{let{$head:e,$anchor:i}=n.selection;return!(!e.parent.type.spec.code||!e.sameParent(i)||(t&&t(n.tr.insertText("\n").scrollIntoView()),0))};function vS(n){for(let t=0;t{let{$head:e,$anchor:i}=n.selection;if(!e.parent.type.spec.code||!e.sameParent(i))return!1;let r=e.node(-1),o=e.indexAfter(-1),s=vS(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(t){let a=e.after(),l=n.tr.replaceWith(a,a,s.createAndFill());l.setSelection(rt.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},t5=(n,t)=>{let e=n.selection,{$from:i,$to:r}=e;if(e instanceof To||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=vS(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!i.parentOffset&&r.index(){let{$cursor:e}=n.selection;if(!e||e.parent.content.size)return!1;if(e.depth>1&&e.after()!=e.end(-1)){let o=e.before();if(za(n.doc,o))return t&&t(n.tr.split(o).scrollIntoView()),!0}let i=e.blockRange(),r=i&&Th(i);return null!=r&&(t&&t(n.tr.lift(i,r).scrollIntoView()),!0)},r5=function Pae(n){return(t,e)=>{let{$from:i,$to:r}=t.selection;if(t.selection instanceof qe&&t.selection.node.isBlock)return!(!i.parentOffset||!za(t.doc,i.pos)||(e&&e(t.tr.split(i.pos).scrollIntoView()),0));if(!i.parent.isBlock)return!1;if(e){let o=r.parentOffset==r.parent.content.size,s=t.tr;(t.selection instanceof nt||t.selection instanceof To)&&s.deleteSelection();let a=0==i.depth?null:vS(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=n&&n(r.parent,o),c=l?[l]:o&&a?[{type:a}]:void 0,u=za(s.doc,s.mapping.map(i.pos),1,c);if(!c&&!u&&za(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)}e(s.scrollIntoView())}return!0}}();function o5(n,t,e){let o,s,i=t.nodeBefore,r=t.nodeAfter;if(i.type.spec.isolating||r.type.spec.isolating)return!1;if(function Fae(n,t,e){let i=t.nodeBefore,r=t.nodeAfter,o=t.index();return!(!(i&&r&&i.type.compatibleContent(r.type))||(!i.content.size&&t.parent.canReplace(o-1,o)?(e&&e(n.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!r.isTextblock&&!Tl(n.doc,t.pos)||(e&&e(n.tr.clearIncompatible(t.pos,i.type,i.contentMatchAt(i.childCount)).join(t.pos).scrollIntoView()),0)))}(n,t,e))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(r.type))&&s.matchType(o[0]||r.type).validEnd){if(e){let d=t.pos+r.nodeSize,h=ce.empty;for(let m=o.length-1;m>=0;m--)h=ce.from(o[m].create(null,h));h=ce.from(i.copy(h));let f=n.tr.step(new zi(t.pos-1,d,t.pos,d,new Ce(h,1,0),o.length,!0)),p=d+2*o.length;Tl(f.doc,p)&&f.join(p),e(f.scrollIntoView())}return!0}let l=rt.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&Th(c);if(null!=u&&u>=t.depth)return e&&e(n.tr.lift(c,u).scrollIntoView()),!0;if(a&&zh(r,"start",!0)&&zh(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(e){let m=ce.empty;for(let y=h.length-1;y>=0;y--)m=ce.from(h[y].copy(m));e(n.tr.step(new zi(t.pos-h.length,t.pos+r.nodeSize,t.pos+p,t.pos+r.nodeSize-p,new Ce(m,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function s5(n){return function(t,e){let i=t.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&&(e&&e(t.tr.setSelection(nt.create(t.doc,n<0?r.start(o):r.end(o)))),!0)}}const a5=s5(-1),l5=s5(1);function c5(n,t=null){return function(e,i){let r=!1;for(let o=0;o{if(r)return!1;if(l.isTextblock&&!l.hasMarkup(n,t))if(l.type==n)r=!0;else{let u=e.doc.resolve(c),d=u.index();r=u.parent.canReplaceWith(d,d+1,n)}})}if(!r)return!1;if(i){let o=e.tr;for(let s=0;s(t&&t(n.tr.setSelection(new To(n.doc))),!0)},Bae={"Ctrl-h":jl.Backspace,"Alt-Backspace":jl["Mod-Backspace"],"Ctrl-d":jl.Delete,"Ctrl-Alt-Backspace":jl["Mod-Delete"],"Alt-Delete":jl["Mod-Delete"],"Alt-d":jl["Mod-Delete"],"Ctrl-a":a5,"Ctrl-e":l5};for(let n in jl)Bae[n]=jl[n];function Fb(n){const{state:t,transaction:e}=n;let{selection:i}=e,{doc:r}=e,{storedMarks:o}=e;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=e.selection,r=e.doc,o=e.storedMarks,e}}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform();class jb{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:i}=this,{view:r}=e,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).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(t,e=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!t,c=t||o.tr,d={...Object.fromEntries(Object.entries(i).map(([h,f])=>[h,(...m)=>{const g=this.buildProps(c,e),y=f(...m)(g);return a.push(y),d}])),run:()=>(!l&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(h=>!0===h))};return d}createCan(t){const{rawCommands:e,state:i}=this,o=t||i.tr,s=this.buildProps(o,!1);return{...Object.fromEntries(Object.entries(e).map(([l,c])=>[l,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,!1)}}buildProps(t,e=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r;o.storedMarks&&t.setStoredMarks(o.storedMarks);const a={tr:t,editor:r,view:s,state:Fb({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(i).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class ele{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const i=this.callbacks[t];return i&&i.forEach(r=>r.apply(this,e)),this}off(t,e){const i=this.callbacks[t];return i&&(e?this.callbacks[t]=i.filter(r=>r!==e):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function Ve(n,t,e){return void 0===n.config[t]&&n.parent?Ve(n.parent,t,e):"function"==typeof n.config[t]?n.config[t].bind({...e,parent:n.parent?Ve(n.parent,t,e):null}):n.config[t]}function zb(n){return{baseExtensions:n.filter(r=>"extension"===r.type),nodeExtensions:n.filter(r=>"node"===r.type),markExtensions:n.filter(r=>"mark"===r.type)}}function d5(n){const t=[],{nodeExtensions:e,markExtensions:i}=zb(n),r=[...e,...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])=>{t.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,t.push({type:s.name,name:u,attribute:h})})}),t}function Vi(n,t){if("string"==typeof n){if(!t.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return t.nodes[n]}return n}function tn(...n){return n.filter(t=>!!t).reduce((t,e)=>{const i={...t};return Object.entries(e).forEach(([r,o])=>{i[r]=i[r]?"class"===r?[i[r],o].join(" "):"style"===r?[i[r],o].join("; "):o:o}),i},{})}function DS(n,t){return t.filter(e=>e.attribute.rendered).map(e=>e.attribute.renderHTML?e.attribute.renderHTML(n.attrs)||{}:{[e.name]:n.attrs[e.name]}).reduce((e,i)=>tn(e,i),{})}function h5(n){return"function"==typeof n}function Ct(n,t,...e){return h5(n)?t?n.bind(t)(...e):n(...e):n}function f5(n,t){return n.style?n:{...n,getAttrs:e=>{const i=n.getAttrs?n.getAttrs(e):n.attrs;if(!1===i)return!1;const r=t.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(e):function nle(n){return"string"!=typeof n?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):"true"===n||"false"!==n&&n}(e.getAttribute(s.name));return null==a?o:{...o,[s.name]:a}},{});return{...i,...r}}}}function p5(n){return Object.fromEntries(Object.entries(n).filter(([t,e])=>("attrs"!==t||!function tle(n={}){return 0===Object.keys(n).length&&n.constructor===Object}(e))&&null!=e))}function TS(n,t){return t.nodes[n]||t.marks[n]||null}function g5(n,t){return Array.isArray(t)?t.some(e=>("string"==typeof e?e:e.name)===n.name):t}function MS(n){return"[object RegExp]"===Object.prototype.toString.call(n)}class og{constructor(t){this.find=t.find,this.handler=t.handler}}function SS(n){var t;const{editor:e,from:i,to:r,text:o,rules:s,plugin:a}=n,{view:l}=e;if(l.composing)return!1;const c=l.state.doc.resolve(i);if(c.parent.type.spec.code||null!==(t=c.nodeBefore||c.nodeAfter)&&void 0!==t&&t.marks.find(h=>h.type.spec.code))return!1;let u=!1;const d=((n,t=500)=>{let e="";const i=n.parentOffset;return n.parent.nodesBetween(Math.max(0,i-t),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%";e+=u.slice(0,Math.max(0,i-o))}),e})(c)+o;return s.forEach(h=>{if(u)return;const f=((n,t)=>{if(MS(t))return t.exec(n);const e=t(n);if(!e)return null;const i=[e.text];return i.index=e.index,i.input=n,i.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(e.replaceWith)),i})(d,h.find);if(!f)return;const p=l.state.tr,m=Fb({state:l.state,transaction:p}),g={from:i-(f[0].length-o.length),to:r},{commands:y,chain:b,can:w}=new jb({editor:e,state:m});null===h.handler({state:m,range:g,match:f,commands:y,chain:b,can:w})||!p.steps.length||(p.setMeta(a,{transform:p,from:i,to:r,text:o}),l.dispatch(p),u=!0)}),u}function ole(n){const{editor:t,rules:e}=n,i=new Wt({state:{init:()=>null,apply:(r,o)=>r.getMeta(i)||(r.selectionSet||r.docChanged?null:o)},props:{handleTextInput:(r,o,s,a)=>SS({editor:t,from:o,to:s,text:a,rules:e,plugin:i}),handleDOMEvents:{compositionend:r=>(setTimeout(()=>{const{$cursor:o}=r.state.selection;o&&SS({editor:t,from:o.pos,to:o.pos,text:"",rules:e,plugin:i})}),!1)},handleKeyDown(r,o){if("Enter"!==o.key)return!1;const{$cursor:s}=r.state.selection;return!!s&&SS({editor:t,from:s.pos,to:s.pos,text:"\n",rules:e,plugin:i})}},isInputRules:!0});return i}class ES{constructor(t){this.find=t.find,this.handler=t.handler}}function cle(n){const{editor:t,rules:e}=n;let i=null,r=!1,o=!1;return e.map(a=>new Wt({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 sle(n){return"number"==typeof n}(p)||!m||p===m.b)return;const g=u.tr,y=Fb({state:u,transaction:g});return function lle(n){const{editor:t,state:e,from:i,to:r,rule:o}=n,{commands:s,chain:a,can:l}=new jb({editor:t,state:e}),c=[];return e.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,t)=>{if(MS(t))return[...n.matchAll(t)];const e=t(n);return e?e.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 b=f+y.index+1,w=b+y[0].length,_={from:e.tr.mapping.map(b),to:e.tr.mapping.map(w)},N=o.handler({state:e,range:_,match:y,commands:s,chain:a,can:l});c.push(N)})}),c.every(d=>null!==d)}({editor:t,state:y,from:Math.max(p-1,0),to:m.b-1,rule:a})&&g.steps.length?g:void 0}}))}class mu{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=mu.resolve(t),this.schema=function m5(n,t){var e;const i=d5(n),{nodeExtensions:r,markExtensions:o}=zb(n),s=null===(e=r.find(c=>Ve(c,"topNode")))||void 0===e?void 0:e.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:t},f=p5({...n.reduce((y,b)=>{const w=Ve(b,"extendNodeSchema",d);return{...y,...w?w(c):{}}},{}),content:Ct(Ve(c,"content",d)),marks:Ct(Ve(c,"marks",d)),group:Ct(Ve(c,"group",d)),inline:Ct(Ve(c,"inline",d)),atom:Ct(Ve(c,"atom",d)),selectable:Ct(Ve(c,"selectable",d)),draggable:Ct(Ve(c,"draggable",d)),code:Ct(Ve(c,"code",d)),defining:Ct(Ve(c,"defining",d)),isolating:Ct(Ve(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var b;return[y.name,{default:null===(b=y?.attribute)||void 0===b?void 0:b.default}]}))}),p=Ct(Ve(c,"parseHTML",d));p&&(f.parseDOM=p.map(y=>f5(y,u)));const m=Ve(c,"renderHTML",d);m&&(f.toDOM=y=>m({node:y,HTMLAttributes:DS(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:t},f=p5({...n.reduce((g,y)=>{const b=Ve(y,"extendMarkSchema",d);return{...g,...b?b(c):{}}},{}),inclusive:Ct(Ve(c,"inclusive",d)),excludes:Ct(Ve(c,"excludes",d)),group:Ct(Ve(c,"group",d)),spanning:Ct(Ve(c,"spanning",d)),code:Ct(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=Ct(Ve(c,"parseHTML",d));p&&(f.parseDOM=p.map(g=>f5(g,u)));const m=Ve(c,"renderHTML",d);return m&&(f.toDOM=g=>m({mark:g,HTMLAttributes:DS(g,u)})),[c.name,f]}));return new zie({topNode:s,nodes:a,marks:l})}(this.extensions,e),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:TS(i.name,this.schema)};"mark"===i.type&&(null===(r=Ct(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(t){const e=mu.sort(mu.flatten(t)),i=function ule(n){const t=n.filter((e,i)=>n.indexOf(e)!==i);return[...new Set(t)]}(e.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.`),e}static flatten(t){return t.map(e=>{const r=Ve(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return r?[e,...this.flatten(r())]:e}).flat(10)}static sort(t){return t.sort((i,r)=>{const o=Ve(i,"priority")||100,s=Ve(r,"priority")||100;return o>s?-1:o{const r=Ve(e,"addCommands",{name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:TS(e.name,this.schema)});return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this,e=mu.sort([...this.extensions].reverse()),i=[],r=[],o=e.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:t,type:TS(s.name,this.schema)},l=[],c=Ve(s,"addKeyboardShortcuts",a);let u={};if("mark"===s.type&&s.config.exitable&&(u.ArrowRight=()=>Nr.handleExit({editor:t,mark:s})),c){const m=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:t})]));u={...u,...m}}const d=function Oae(n){return new Wt({props:{handleKeyDown:mS(n)}})}(u);l.push(d);const h=Ve(s,"addInputRules",a);g5(s,t.options.enableInputRules)&&h&&i.push(...h());const f=Ve(s,"addPasteRules",a);g5(s,t.options.enablePasteRules)&&f&&r.push(...f());const p=Ve(s,"addProseMirrorPlugins",a);if(p){const m=p();l.push(...m)}return l}).flat();return[ole({editor:t,rules:i}),...cle({editor:t,rules:r}),...o]}get attributes(){return d5(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=zb(this.extensions);return Object.fromEntries(e.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:t,type:Vi(i.name,this.schema)},s=Ve(i,"addNodeView",o);return s?[i.name,(l,c,u,d)=>{const h=DS(l,r);return s()({editor:t,node:l,getPos:u,decorations:d,HTMLAttributes:h,extension:i})}]:[]}))}}function xS(n){return"Object"===function dle(n){return Object.prototype.toString.call(n).slice(8,-1)}(n)&&n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Vb(n,t){const e={...n};return xS(n)&&xS(t)&&Object.keys(t).forEach(i=>{xS(t[i])?i in n?e[i]=Vb(n[i],t[i]):Object.assign(e,{[i]:t[i]}):Object.assign(e,{[i]:t[i]})}),e}class Mn{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.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=Ct(Ve(this,"addOptions",{name:this.name}))),this.storage=Ct(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Mn(t)}configure(t={}){const e=this.extend();return e.options=Vb(this.options,t),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Mn(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Ct(Ve(e,"addOptions",{name:e.name})),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}}function y5(n,t,e){const{from:i,to:r}=t,{blockSeparator:o="\n\n",textSerializers:s={}}=e||{};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:t}))):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 IS(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,t])=>t.spec.toText).map(([t,e])=>[t,e.spec.toText]))}const hle=Mn.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Wt({key:new on("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:t,schema:e}=n,{doc:i,selection:r}=t,{ranges:o}=r;return y5(i,{from:Math.min(...o.map(u=>u.$from.pos)),to:Math.max(...o.map(u=>u.$to.pos))},{textSerializers:IS(e)})}}})]}});function Bb(n,t,e={strict:!0}){const i=Object.keys(t);return!i.length||i.every(r=>e.strict?t[r]===n[r]:MS(t[r])?t[r].test(n[r]):t[r]===n[r])}function OS(n,t,e={}){return n.find(i=>i.type===t&&Bb(i.attrs,e))}function Tle(n,t,e={}){return!!OS(n,t,e)}function AS(n,t,e={}){if(!n||!t)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=OS([...i.node.marks],t,e);if(!r)return;let o=i.index,s=n.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(OS([...i.node.marks],t,e);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(t,"text/html").body}function $b(n,t,e){if(e={slice:!0,parseOptions:{},...e},"object"==typeof n&&null!==n)try{return Array.isArray(n)&&n.length>0?ce.fromArray(n.map(i=>t.nodeFromJSON(i))):t.nodeFromJSON(n)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),$b("",t,e)}if("string"==typeof n){const i=wh.fromSchema(t);return e.slice?i.parseSlice(kS(n),e.parseOptions).content:i.parse(kS(n),e.parseOptions)}return $b("",t,e)}function v5(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)}function sg(n,t,e={}){const{from:i,to:r,empty:o}=n.selection,s=t?Vi(t,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=>Bb(d.node.attrs,e,{strict:!1}));return o?!!c.length:c.reduce((d,h)=>d+h.to-h.from,0)>=l}function Wb(n,t){return t.nodes[n]?"node":t.marks[n]?"mark":null}function b5(n,t){const e="string"==typeof t?[t]:t;return Object.keys(n).reduce((i,r)=>(e.includes(r)||(i[r]=n[r]),i),{})}function w5(n,t,e={}){return $b(n,t,{slice:!1,parseOptions:e})}function C5(n,t){for(let e=n.depth;e>0;e-=1){const i=n.node(e);if(t(i))return{pos:e>0?n.before(e):0,start:n.start(e),depth:e,node:i}}}function NS(n){return t=>C5(t.$from,n)}function Gb(n,t){const e=zl(t,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===e.name);return a?{...a.attrs}:{}}function M5(n,t){const e=Wb("string"==typeof t?t:t.name,n.schema);return"node"===e?function tce(n,t){const e=Vi(t,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===e.name);return s?{...s.attrs}:{}}(n,t):"mark"===e?Gb(n,t):{}}function Yb(n,t,e){const i=[];return n===t?e.resolve(n).marks().forEach(r=>{const s=AS(e.resolve(n-1),r.type);s&&i.push({mark:r,...s})}):e.nodesBetween(n,t,(r,o)=>{i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}function qb(n,t,e){return Object.fromEntries(Object.entries(e).filter(([i])=>{const r=n.find(o=>o.type===t&&o.name===i);return!!r&&r.attribute.keepOnSplit}))}function LS(n,t,e={}){const{empty:i,ranges:r}=n.selection,o=t?zl(t,n.schema):null;if(i)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>!o||o.name===d.type.name).find(d=>Bb(d.attrs,e,{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),b=Math.min(p,g+m.nodeSize);s+=b-y,a.push(...m.marks.map(_=>({mark:_,from:y,to:b})))})}),0===s)return!1;const l=a.filter(d=>!o||o.name===d.mark.type.name).filter(d=>Bb(d.mark.attrs,e,{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 S5(n,t){const{nodeExtensions:e}=zb(t),i=e.find(s=>s.name===n);if(!i)return!1;const o=Ct(Ve(i,"group",{name:i.name,options:i.options,storage:i.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function gu(n,t,e){const r=n.state.doc.content.size,o=Ha(t,0,r),s=Ha(e,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 E5(n,t){const e=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(e){const i=e.filter(r=>t?.includes(r.type.name));n.tr.ensureMarks(i)}}const RS=(n,t)=>{const e=NS(s=>s.type===t)(n.selection);if(!e)return!0;const i=n.doc.resolve(Math.max(0,e.pos-1)).before(e.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return e.node.type===r?.type&&Tl(n.doc,e.pos)&&n.join(e.pos),!0},FS=(n,t)=>{const e=NS(s=>s.type===t)(n.selection);if(!e)return!0;const i=n.doc.resolve(e.start).after(e.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return e.node.type===r?.type&&Tl(n.doc,i)&&n.join(i),!0};var _ce=Object.freeze({__proto__:null,blur:()=>({editor:n,view:t})=>(requestAnimationFrame(()=>{var e;n.isDestroyed||(t.dom.blur(),null===(e=window?.getSelection())||void 0===e||e.removeAllRanges())}),!0),clearContent:(n=!1)=>({commands:t})=>t.setContent("",n),clearNodes:()=>({state:n,tr:t,dispatch:e})=>{const{selection:i}=t,{ranges:r}=i;return e&&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}=t,d=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),f=d.blockRange(h);if(!f)return;const p=Th(f);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(f.start,m)}(p||0===p)&&t.lift(f,p)})}),!0},command:n=>t=>n(t),createParagraphNear:()=>({state:n,dispatch:t})=>t5(n,t),deleteCurrentNode:()=>({tr:n,dispatch:t})=>{const{selection:e}=n,i=e.$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(t){const a=r.before(o),l=r.after(o);n.delete(a,l).scrollIntoView()}return!0}return!1},deleteNode:n=>({tr:t,state:e,dispatch:i})=>{const r=Vi(n,e.schema),o=t.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);t.delete(l,c).scrollIntoView()}return!0}return!1},deleteRange:n=>({tr:t,dispatch:e})=>{const{from:i,to:r}=n;return e&&t.delete(i,r),!0},deleteSelection:()=>({state:n,dispatch:t})=>gS(n,t),enter:()=>({commands:n})=>n.keyboardShortcut("Enter"),exitCode:()=>({state:n,dispatch:t})=>e5(n,t),extendMarkRange:(n,t={})=>({tr:e,state:i,dispatch:r})=>{const o=zl(n,i.schema),{doc:s,selection:a}=e,{$from:l,from:c,to:u}=a;if(r){const d=AS(l,o,t);if(d&&d.from<=c&&d.to>=u){const h=nt.create(s,d.from,d.to);e.setSelection(h)}}return!0},first:n=>t=>{const e="function"==typeof n?n(t):n;for(let i=0;i({editor:e,view:i,tr:r,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{Hb()&&i.dom.focus(),requestAnimationFrame(()=>{e.isDestroyed||(i.focus(),t?.scrollIntoView&&e.commands.scrollIntoView())})};if(i.hasFocus()&&null===n||!1===n)return!0;if(o&&null===n&&!Ub(e.state.selection))return s(),!0;const a=_5(r.doc,n)||e.state.selection,l=e.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},forEach:(n,t)=>e=>n.every((i,r)=>t(i,{...e,index:r})),insertContent:(n,t)=>({tr:e,commands:i})=>i.insertContentAt({from:e.selection.from,to:e.selection.to},n,t),insertContentAt:(n,t,e)=>({tr:i,dispatch:r,editor:o})=>{if(r){e={parseOptions:{},updateSelection:!0,...e};const s=$b(t,o.schema,{parseOptions:{preserveWhitespace:"full",...e.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(t)?i.insertText(t.map(h=>h.text||"").join(""),a,l):i.insertText("object"==typeof t&&t&&t.text?t.text:t,a,l):i.replaceWith(a,l,s),e.updateSelection&&function Ole(n,t,e){const i=n.steps.length-1;if(i{0===s&&(s=u)}),n.setSelection(rt.near(n.doc.resolve(s),e))}(i,i.steps.length-1,-1)}return!0},joinUp:()=>({state:n,dispatch:t})=>((n,t)=>{let r,e=n.selection,i=e instanceof qe;if(i){if(e.node.isTextblock||!Tl(n.doc,e.from))return!1;r=e.from}else if(r=xj(n.doc,e.from,-1),null==r)return!1;if(t){let o=n.tr.join(r);i&&o.setSelection(qe.create(o.doc,r-n.doc.resolve(r).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0})(n,t),joinDown:()=>({state:n,dispatch:t})=>((n,t)=>{let i,e=n.selection;if(e instanceof qe){if(e.node.isTextblock||!Tl(n.doc,e.to))return!1;i=e.to}else if(i=xj(n.doc,e.to,1),null==i)return!1;return t&&t(n.tr.join(i).scrollIntoView()),!0})(n,t),joinBackward:()=>({state:n,dispatch:t})=>Y4(n,t),joinForward:()=>({state:n,dispatch:t})=>Z4(n,t),keyboardShortcut:n=>({editor:t,view:e,tr:i,dispatch:r})=>{const o=function Fle(n){const t=n.split(/-(?!$)/);let i,r,o,s,e=t[t.length-1];"Space"===e&&(e=" ");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 t.captureTransaction(()=>{e.someProp("handleKeyDown",c=>c(e,a))})?.steps.forEach(c=>{const u=c.map(i.mapping);u&&r&&i.maybeStep(u)}),!0},lift:(n,t={})=>({state:e,dispatch:i})=>!!sg(e,Vi(n,e.schema),t)&&((n,t)=>{let{$from:e,$to:i}=n.selection,r=e.blockRange(i),o=r&&Th(r);return null!=o&&(t&&t(n.tr.lift(r,o).scrollIntoView()),!0)})(e,i),liftEmptyBlock:()=>({state:n,dispatch:t})=>n5(n,t),liftListItem:n=>({state:t,dispatch:e})=>function Qae(n){return function(t,e){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,s=>s.childCount>0&&s.firstChild.type==n);return!!o&&(!e||(i.node(o.depth-1).type==n?function Zae(n,t,e,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(e.start),s=o.nodeAfter;if(i.mapping.map(e.end)!=e.start+o.nodeAfter.nodeSize)return!1;let a=0==e.startIndex,l=e.endIndex==r.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?ce.empty:ce.from(r))))return!1;let d=o.pos,h=d+s.nodeSize;return i.step(new zi(d-(a?1:0),h+(l?1:0),d+1,h-1,new Ce((a?ce.empty:ce.from(r.copy(ce.empty))).append(l?ce.empty:ce.from(r.copy(ce.empty))),a?0:1,l?0:1),a?0:1)),t(i.scrollIntoView()),!0}(t,e,o)))}}(Vi(n,t.schema))(t,e),newlineInCode:()=>({state:n,dispatch:t})=>X4(n,t),resetAttributes:(n,t)=>({tr:e,state:i,dispatch:r})=>{let o=null,s=null;const a=Wb("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=Vi(n,i.schema)),"mark"===a&&(s=zl(n,i.schema)),r&&e.selection.ranges.forEach(l=>{i.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&e.setNodeMarkup(u,void 0,b5(c.attrs,t)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&e.addMark(u,u+c.nodeSize,s.create(b5(d.attrs,t)))})})}),!0)},scrollIntoView:()=>({tr:n,dispatch:t})=>(t&&n.scrollIntoView(),!0),selectAll:()=>({tr:n,commands:t})=>t.setTextSelection({from:0,to:n.doc.content.size}),selectNodeBackward:()=>({state:n,dispatch:t})=>K4(n,t),selectNodeForward:()=>({state:n,dispatch:t})=>J4(n,t),selectParentNode:()=>({state:n,dispatch:t})=>((n,t)=>{let r,{$from:e,to:i}=n.selection,o=e.sharedDepth(i);return 0!=o&&(r=e.before(o),t&&t(n.tr.setSelection(qe.create(n.doc,r))),!0)})(n,t),selectTextblockEnd:()=>({state:n,dispatch:t})=>l5(n,t),selectTextblockStart:()=>({state:n,dispatch:t})=>a5(n,t),setContent:(n,t=!1,e={})=>({tr:i,editor:r,dispatch:o})=>{const{doc:s}=i,a=w5(n,r.schema,e);return o&&i.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(n,t={})=>({tr:e,state:i,dispatch:r})=>{const{selection:o}=e,{empty:s,ranges:a}=o,l=zl(n,i.schema);if(r)if(s){const c=Gb(i,l);e.addStoredMark(l.create({...c,...t}))}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&&e.addMark(p,m,l.create({...y.attrs,...t}))}):e.addMark(p,m,l.create(t))})});return function cce(n,t,e){var i;const{selection:r}=t;let o=null;if(Ub(r)&&(o=r.$cursor),o){const a=null!==(i=n.storedMarks)&&void 0!==i?i:o.marks();return!!e.isInSet(a)||!a.some(l=>l.type.excludes(e))}const{ranges:s}=r;return s.some(({$from:a,$to:l})=>{let c=0===a.depth&&n.doc.inlineContent&&n.doc.type.allowsMarkType(e);return n.doc.nodesBetween(a.pos,l.pos,(u,d,h)=>{if(c)return!1;if(u.isInline){const f=!h||h.type.allowsMarkType(e),p=!!e.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(e));c=f&&p}return!c}),c})}(i,e,l)},setMeta:(n,t)=>({tr:e})=>(e.setMeta(n,t),!0),setNode:(n,t={})=>({state:e,dispatch:i,chain:r})=>{const o=Vi(n,e.schema);return o.isTextblock?r().command(({commands:s})=>!!c5(o,t)(e)||s.clearNodes()).command(({state:s})=>c5(o,t)(s,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:i}=t,r=Ha(n,0,i.content.size),o=qe.create(i,r);t.setSelection(o)}return!0},setTextSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:i}=t,{from:r,to:o}="number"==typeof n?{from:n,to:n}:n,s=nt.atStart(i).from,a=nt.atEnd(i).to,l=Ha(r,s,a),c=Ha(o,s,a),u=nt.create(i,l,c);t.setSelection(u)}return!0},sinkListItem:n=>({state:t,dispatch:e})=>function Xae(n){return function(t,e){let{$from:i,$to:r}=t.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(e){let c=l.lastChild&&l.lastChild.type==a.type,u=ce.from(c?n.create():null),d=new Ce(ce.from(n.create(null,ce.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;e(t.tr.step(new zi(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}(Vi(n,t.schema))(t,e),splitBlock:({keepMarks:n=!0}={})=>({tr:t,state:e,dispatch:i,editor:r})=>{const{selection:o,doc:s}=t,{$from:a,$to:l}=o,u=qb(r.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof qe&&o.node.isBlock)return!(!a.parentOffset||!za(s,a.pos)||(i&&(n&&E5(e,r.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(i){const d=l.parentOffset===l.parent.content.size;o instanceof nt&&t.deleteSelection();const h=0===a.depth?void 0:function Xle(n){for(let t=0;t({tr:t,state:e,dispatch:i,editor:r})=>{var o;const s=Vi(n,e.schema),{$from:a,$to:l}=e.selection,c=e.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=ce.empty;const y=a.index(-1)?1:a.index(-2)?2:3;for(let ie=a.depth-y;ie>=a.depth-3;ie-=1)g=ce.from(a.node(ie).copy(g));const b=a.indexAfter(-1){if(S>-1)return!1;ie.isTextblock&&0===ie.content.size&&(S=K+1)}),S>-1&&t.setSelection(nt.near(t.doc.resolve(S))),t.scrollIntoView()}return!0}const h=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,f=qb(d,u.type.name,u.attrs),p=qb(d,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const m=h?[{type:s,attrs:f},{type:h,attrs:p}]:[{type:s,attrs:f}];if(!za(t.doc,a.pos,2))return!1;if(i){const{selection:g,storedMarks:y}=e,{splittableMarks:b}=r.extensionManager,w=y||g.$to.parentOffset&&g.$from.marks();if(t.split(a.pos,2,m).scrollIntoView(),!w||!i)return!0;const _=w.filter(N=>b.includes(N.type.name));t.ensureMarks(_)}return!0},toggleList:(n,t,e,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:h}=r.extensionManager,f=Vi(n,s.schema),p=Vi(t,s.schema),{selection:m,storedMarks:g}=s,{$from:y,$to:b}=m,w=y.blockRange(b),_=g||m.$to.parentOffset&&m.$from.marks();if(!w)return!1;const N=NS(S=>S5(S.type.name,d))(m);if(w.depth>=1&&N&&w.depth-N.depth<=1){if(N.node.type===f)return c.liftListItem(p);if(S5(N.node.type.name,d)&&f.validContent(N.node.content)&&a)return l().command(()=>(o.setNodeMarkup(N.pos,f),!0)).command(()=>RS(o,f)).command(()=>FS(o,f)).run()}return e&&_&&a?l().command(()=>{const S=u().wrapInList(f,i),ie=_.filter(K=>h.includes(K.type.name));return o.ensureMarks(ie),!!S||c.clearNodes()}).wrapInList(f,i).command(()=>RS(o,f)).command(()=>FS(o,f)).run():l().command(()=>!!u().wrapInList(f,i)||c.clearNodes()).wrapInList(f,i).command(()=>RS(o,f)).command(()=>FS(o,f)).run()},toggleMark:(n,t={},e={})=>({state:i,commands:r})=>{const{extendEmptyMarkRange:o=!1}=e,s=zl(n,i.schema);return LS(i,s,t)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,t)},toggleNode:(n,t,e={})=>({state:i,commands:r})=>{const o=Vi(n,i.schema),s=Vi(t,i.schema);return sg(i,o,e)?r.setNode(s):r.setNode(o,e)},toggleWrap:(n,t={})=>({state:e,commands:i})=>{const r=Vi(n,e.schema);return sg(e,r,t)?i.lift(r):i.wrapIn(r,t)},undoInputRule:()=>({state:n,dispatch:t})=>{const e=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:t})=>{const{selection:e}=n,{empty:i,ranges:r}=e;return i||t&&r.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0},unsetMark:(n,t={})=>({tr:e,state:i,dispatch:r})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=e,l=zl(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=AS(c,l,p);m&&(h=m.from,f=m.to),e.removeMark(h,f,l)}else d.forEach(h=>{e.removeMark(h.$from.pos,h.$to.pos,l)});return e.removeStoredMark(l),!0},updateAttributes:(n,t={})=>({tr:e,state:i,dispatch:r})=>{let o=null,s=null;const a=Wb("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=Vi(n,i.schema)),"mark"===a&&(s=zl(n,i.schema)),r&&e.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;i.doc.nodesBetween(c,u,(d,h)=>{o&&o===d.type&&e.setNodeMarkup(h,void 0,{...d.attrs,...t}),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);e.addMark(p,m,s.create({...f.attrs,...t}))}})})}),!0)},wrapIn:(n,t={})=>({state:e,dispatch:i})=>function jae(n,t=null){return function(e,i){let{$from:r,$to:o}=e.selection,s=r.blockRange(o),a=s&&_1(s,n,t);return!!a&&(i&&i(e.tr.wrap(s,a).scrollIntoView()),!0)}}(Vi(n,e.schema),t)(e,i),wrapInList:(n,t={})=>({state:e,dispatch:i})=>function qae(n,t=null){return function(e,i){let{$from:r,$to:o}=e.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=e.doc.resolve(s.start-2);l=new ub(u,u,s.depth),s.endIndex=0;u--)o=ce.from(e[u].type.create(e[u].attrs,o));n.step(new zi(t.start-(i?2:0),t.end,t.start,t.end,new Ce(o,0,0),e.length,!0));let s=0;for(let u=0;u({..._ce})}),bce=Mn.create({name:"editable",addProseMirrorPlugins(){return[new Wt({key:new on("editable"),props:{editable:()=>this.editor.options.editable}})]}}),wce=Mn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new Wt({key:new on("focusEvents"),props:{handleDOMEvents:{focus:(t,e)=>{n.isFocused=!0;const i=n.state.tr.setMeta("focus",{event:e}).setMeta("addToHistory",!1);return t.dispatch(i),!1},blur:(t,e)=>{n.isFocused=!1;const i=n.state.tr.setMeta("blur",{event:e}).setMeta("addToHistory",!1);return t.dispatch(i),!1}}}})]}}),Cce=Mn.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=rt.atStart(c).from===h;return!(!(u&&p&&f.type.isTextblock)||f.textContent.length)&&s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>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:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...i},o={...i,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Hb()||v5()?o:r},addProseMirrorPlugins(){return[new Wt({key:new on("clearDocument"),appendTransaction:(n,t,e)=>{if(!n.some(p=>p.docChanged)||t.doc.eq(e.doc))return;const{empty:r,from:o,to:s}=t.selection,a=rt.atStart(t.doc).from,l=rt.atEnd(t.doc).to;if(r||o!==a||s!==l||0!==e.doc.textBetween(0,e.doc.content.size," "," ").length)return;const d=e.tr,h=Fb({state:e,transaction:d}),{commands:f}=new jb({editor:this.editor,state:h});return f.clearNodes(),d.steps.length?d:void 0}})]}}),Dce=Mn.create({name:"tabindex",addProseMirrorPlugins(){return[new Wt({key:new on("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var Tce=Object.freeze({__proto__:null,ClipboardTextSerializer:hle,Commands:vce,Editable:bce,FocusEvents:wce,Keymap:Cce,Tabindex:Dce});class Ece extends ele{constructor(t={}){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(t),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 Sce(n,t){const e=document.querySelector("style[data-tiptap-style]");if(null!==e)return e;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),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(t={}){this.options={...this.options,...t},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&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(t,e){const i=h5(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:i});this.view.updateState(r)}unregisterPlugin(t){if(this.isDestroyed)return;const e="string"==typeof t?`${t}$`:t.key,i=this.state.reconfigure({plugins:this.state.plugins.filter(r=>!r.key.startsWith(e))});this.view.updateState(i)}createExtensionManager(){const e=[...this.options.enableCoreExtensions?Object.values(Tce):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new mu(e,this)}createCommandManager(){this.commandManager=new jb({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=w5(this.options.content,this.schema,this.options.parseOptions),e=_5(t,this.options.autofocus);this.view=new wae(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:xh.create({doc:t,selection:e||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(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach(s=>{var a;return null===(a=this.capturedTransaction)||void 0===a?void 0:a.step(s)}):void(this.capturedTransaction=t);const e=this.state.apply(t),i=!this.state.selection.eq(e.selection);this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),i&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),o=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),o&&this.emit("blur",{editor:this,event:o.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return M5(this.state,t)}isActive(t,e){return function sce(n,t,e={}){if(!t)return sg(n,null,e)||LS(n,null,e);const i=Wb(t,n.schema);return"node"===i?sg(n,t,e):"mark"===i&&LS(n,t,e)}(this.state,"string"==typeof t?t:null,"string"==typeof t?e:t)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function D5(n,t){const e=Ws.fromSchema(t).serializeFragment(n),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(e),r.innerHTML}(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:i={}}=t||{};return function T5(n,t){return y5(n,{from:0,to:n.content.size},t)}(this.state.doc,{blockSeparator:e,textSerializers:{...IS(this.schema),...i}})}get isEmpty(){return function ace(n){var t;const e=null===(t=n.type.createAndFill())||void 0===t?void 0:t.toJSON(),i=n.toJSON();return JSON.stringify(e)===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 t;return!(null!==(t=this.view)&&void 0!==t&&t.docView)}}function yu(n){return new og({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Ct(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=t,s=i[i.length-1],a=i[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),d=u+s.length;if(Yb(e.from,e.to,t.doc).filter(f=>f.mark.type.excluded.find(m=>m===n.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;de.from&&o.delete(e.from+c,u),l=e.from+c+s.length,o.addMark(e.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function x5(n){return new og({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Ct(n.getAttributes,void 0,i)||{},{tr:o}=t,s=e.from;let a=e.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 jS(n){return new og({find:n.find,handler:({state:t,range:e,match:i})=>{const r=t.doc.resolve(e.from),o=Ct(n.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),n.type))return null;t.tr.delete(e.from,e.to).setBlockType(e.from,e.from,n.type,o)}})}function ag(n){return new og({find:n.find,handler:({state:t,range:e,match:i,chain:r})=>{const o=Ct(n.getAttributes,void 0,i)||{},s=t.tr.delete(e.from,e.to),l=s.doc.resolve(e.from).blockRange(),c=l&&_1(l,n.type,o);if(!c)return null;if(s.wrap(l,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:h}=t,{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(e.from-1).nodeBefore;u&&u.type===n.type&&Tl(s.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(i,u))&&s.join(e.from-1)}})}class Nr{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.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=Ct(Ve(this,"addOptions",{name:this.name}))),this.storage=Ct(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Nr(t)}configure(t={}){const e=this.extend();return e.options=Vb(this.options,t),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Nr(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Ct(Ve(e,"addOptions",{name:e.name})),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:i}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){const s=r.marks();if(!s.find(c=>c?.type.name===e.name))return!1;const l=s.find(c=>c?.type.name===e.name);return l&&i.removeStoredMark(l),i.insertText(" ",r.pos),t.view.dispatch(i),!0}return!1}}class jn{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.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=Ct(Ve(this,"addOptions",{name:this.name}))),this.storage=Ct(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new jn(t)}configure(t={}){const e=this.extend();return e.options=Vb(this.options,t),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new jn(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Ct(Ve(e,"addOptions",{name:e.name})),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}}class xce{constructor(t,e,i){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...i},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,i,r,o,s,a,l;const{view:c}=this.editor,u=t.target,d=3===u.nodeType?null===(e=u.parentElement)||void 0===e?void 0:e.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(),b=null!==(r=t.offsetX)&&void 0!==r?r:null===(o=t.nativeEvent)||void 0===o?void 0:o.offsetX,w=null!==(s=t.offsetY)&&void 0!==s?s:null===(a=t.nativeEvent)||void 0===a?void 0:a.offsetY;h=y.x-g.x+b,f=y.y-g.y+w}null===(l=t.dataTransfer)||void 0===l||l.setDragImage(this.dom,h,f);const p=qe.create(c.state.doc,this.getPos()),m=c.state.tr.setSelection(p);c.dispatch(m)}stopEvent(t){var e;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:t});const i=t.target;if(!this.dom.contains(i)||null!==(e=this.contentDOM)&&void 0!==e&&e.contains(i))return!1;const o=t.type.startsWith("drag"),s="drop"===t.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=qe.isSelectable(this.node),h="copy"===t.type,f="paste"===t.type,p="cut"===t.type,m="mousedown"===t.type;if(!u&&d&&o&&t.preventDefault(),u&&o&&!c)return t.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(t){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:t}):!(!this.node.isLeaf&&!this.node.isAtom&&("selection"===t.type||this.dom.contains(t.target)&&"childList"===t.type&&Hb()&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(i=>i.isContentEditable)||(this.contentDOM!==t.target||"attributes"!==t.type)&&this.contentDOM.contains(t.target))))}updateAttributes(t){this.editor.commands.command(({tr:e})=>{const i=this.getPos();return e.setNodeMarkup(i,void 0,{...this.node.attrs,...t}),!0})}deleteNode(){const t=this.getPos();this.editor.commands.deleteRange({from:t,to:t+this.node.nodeSize})}}function Vl(n){return new ES({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Ct(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=t,s=i[i.length-1],a=i[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),d=u+s.length;if(Yb(e.from,e.to,t.doc).filter(f=>f.mark.type.excluded.find(m=>m===n.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;de.from&&o.delete(e.from+c,u),l=e.from+c+s.length,o.addMark(e.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function Oce(n){return new ES({find:n.find,handler({match:t,chain:e,range:i}){const r=Ct(n.getAttributes,void 0,t);if(!1===r||null===r)return null;t.input&&e().deleteRange(i).insertContentAt(i.from,{type:n.type.name,attrs:r})}})}const kce=new on("suggestion");function Nce({pluginKey:n=kce,editor:t,char:e="@",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 Wt({key:n,view(){var g,m=this;return{update:(g=Xc(function*(y,b){var w,_,N,S,ie,K,Ne;const He=null===(w=m.key)||void 0===w?void 0:w.getState(b),vt=null===(_=m.key)||void 0===_?void 0:_.getState(y.state),at=He.active&&vt.active&&He.range.from!==vt.range.from,ot=!He.active&&vt.active,yn=He.active&&!vt.active,le=ot||at,me=!ot&&!yn&&He.query!==vt.query&&!at,be=yn||at;if(!le&&!me&&!be)return;const Ue=be&&!le?He:vt,kt=y.dom.querySelector(`[data-decoration-id="${Ue.decorationId}"]`);h={editor:t,range:Ue.range,query:Ue.query,text:Ue.text,items:[],command:cn=>{l({editor:t,range:Ue.range,props:cn})},decorationNode:kt,clientRect:kt?()=>{var cn;const{decorationId:Vt}=null===(cn=m.key)||void 0===cn?void 0:cn.getState(t.state);return y.dom.querySelector(`[data-decoration-id="${Vt}"]`)?.getBoundingClientRect()||null}:null},le&&(null===(N=f?.onBeforeStart)||void 0===N||N.call(f,h)),me&&(null===(S=f?.onBeforeUpdate)||void 0===S||S.call(f,h)),(me||le)&&(h.items=yield c({editor:t,query:Ue.query})),be&&(null===(ie=f?.onExit)||void 0===ie||ie.call(f,h)),me&&(null===(K=f?.onUpdate)||void 0===K||K.call(f,h)),le&&(null===(Ne=f?.onStart)||void 0===Ne||Ne.call(f,h))}),function(b,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,b){const{isEditable:w}=t,{composing:_}=t.view,{selection:N}=m,{empty:S,from:ie}=N,K={...g};if(K.composing=_,w&&(S||t.view.composing)){(ieg.range.to)&&!_&&!g.composing&&(K.active=!1);const Ne=function Ace(n){var t;const{char:e,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:s}=n,a=function Ice(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}(e),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===(t=s.nodeBefore)||void 0===t?void 0:t.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(e.length),text:f[0]}:null}({char:e,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:N.$from}),He=`id_${Math.floor(4294967295*Math.random())}`;Ne&&d({editor:t,state:b,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:b,range:w}=p.getState(m.state);return b&&(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:b}=p.getState(m);return g?Fn.create(m.doc,[ki.inline(y.from,y.to,{nodeName:s,class:a,"data-decoration-id":b})]):null}}});return p}const Pce=function(){return{padding:".75rem 2rem",borderRadius:"2px"}};function Lce(n,t){if(1&n){const e=We();I(0,"button",2),ue("mousedown",function(){return de(e),he(D().back.emit())}),A()}2&n&&oi(Hr(2,Pce))}class Vh{constructor(){this.title="No Results",this.showBackBtn=!1,this.back=new re}}function Rce(n,t){if(1&n&&(I(0,"i",7),ke(1),A()),2&n){const e=D();C(1),At(e.url)}}function Fce(n,t){1&n&&_e(0,"dot-contentlet-thumbnail",9),2&n&&v("contentlet",D(2).data.contentlet)("width",42)("height",42)("iconSize","42px")}function jce(n,t){if(1&n&&M(0,Fce,1,4,"dot-contentlet-thumbnail",8),2&n){const e=D(),i=Dn(10);v("ngIf",null==e.data?null:e.data.contentlet)("ngIfElse",i)}}function zce(n,t){if(1&n&&(I(0,"span",10),ke(1),A()),2&n){const e=D();C(1),At(e.data.contentlet.url)}}function Vce(n,t){if(1&n&&(I(0,"div",11),_e(1,"dot-state-icon",12),I(2,"dot-badge",13),ke(3),Qn(4,"lowercase"),A()()),2&n){const e=D();C(1),v("state",e.data.contentlet),C(2),At(Zn(4,2,e.data.contentlet.language))}}function Bce(n,t){1&n&&_e(0,"img",14),2&n&&v("src",D().url,ol)}Vh.\u0275fac=function(t){return new(t||Vh)},Vh.\u0275cmp=Me({type:Vh,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(t,e){1&t&&(_e(0,"p",0),M(1,Lce,1,3,"button",1)),2&t&&(v("innerHTML",e.title,yc),C(1),v("ngIf",e.showBackBtn))},dependencies:[Kt,Vo],styles:["[_nghost-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:16px;height:240px}"]});class _u{constructor(t){this.element=t,this.role="list-item",this.tabindex="-1",this.disabled=!1,this.label="",this.url="",this.page=!1,this.data=null,this.icon=!1}onMouseDown(t){t.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 t=this.element.nativeElement,e=t.parentElement,{top:i,top:r,height:o}=e.getBoundingClientRect(),{top:s,bottom:a}=t.getBoundingClientRect(),l=s-i,c=a-r;e.scrollTop+=this.alignToTop()?l:c-o}}isIntoView(){const{bottom:t,top:e}=this.element.nativeElement.getBoundingClientRect(),i=this.element.nativeElement.parentElement.getBoundingClientRect();return e>=i.top&&t<=i.bottom}alignToTop(){const{top:t}=this.element.nativeElement.getBoundingClientRect(),{top:e}=this.element.nativeElement.parentElement.getBoundingClientRect();return t 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 Bh{constructor(){this.id="editor-suggestion-list",this.suggestionItems=[],this.destroy$=new ae,this.mouseMove=!0}onMouseMove(){this.mouseMove=!0}onMouseOver(t){const e=t.target,i=e.dataset?.index;if(isNaN(i)||!this.mouseMove)return;const r=Number(e?.dataset.index);e.getAttribute("disabled")?this.keyManager.activeItem?.unfocus():this.updateActiveItem(r)}onMouseDownHandler(t){t.preventDefault()}ngAfterViewInit(){this.keyManager=new JL(this.items).withWrap(),requestAnimationFrame(()=>this.setFirstItemActive()),this.items.changes.pipe(mn(this.destroy$)).subscribe(()=>requestAnimationFrame(()=>this.setFirstItemActive()))}ngOnDestroy(){this.destroy$.next(!0)}updateSelection(t){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(t),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 JL(this.items).withWrap(),this.setFirstItemActive()}updateActiveItem(t){this.keyManager.activeItem?.unfocus(),this.keyManager.setActiveItem(t)}}function Hce(n,t){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()()()())}Bh.\u0275fac=function(t){return new(t||Bh)},Bh.\u0275cmp=Me({type:Bh,selectors:[["dot-suggestion-list"]],contentQueries:function(t,e,i){if(1&t&&Jn(i,_u,4),2&t){let r;Ke(r=Qe())&&(e.items=r)}},hostVars:1,hostBindings:function(t,e){1&t&&ue("mousemove",function(r){return e.onMouseMove(r)})("mouseover",function(r){return e.onMouseOver(r)})("mousedown",function(r){return e.onMouseDownHandler(r)}),2&t&&Ot("id",e.id)},inputs:{suggestionItems:"suggestionItems"},ngContentSelectors:["*"],decls:1,vars:0,template:function(t,e){1&t&&(go(),Ri(0))},styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}"]});class lg{constructor(){this.items=Array(4).fill(0)}}lg.\u0275fac=function(t){return new(t||lg)},lg.\u0275cmp=Me({type:lg,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(t,e){1&t&&M(0,Hce,10,0,"div",0),2&t&&v("ngForOf",e.items)},dependencies:[Gr],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 Bl{constructor(t){this.http=t}get defaultHeaders(){const t=new Yr;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getLanguages(){return this.languages?Le(this.languages):this.http.get("/api/v2/languages",{headers:this.defaultHeaders}).pipe(Ie("entity"),fe(t=>{const e=this.getDotLanguageObject(t);return this.languages=e,e}))}getDotLanguageObject(t){return t.reduce((e,i)=>Object.assign(e,{[i.id]:i}),{})}}Bl.\u0275fac=function(t){return new(t||Bl)(F(ar))},Bl.\u0275prov=H({token:Bl,factory:Bl.\u0275fac,providedIn:"root"});const $ce={SHOW_VIDEO_THUMBNAIL:!0};class vu{constructor(){this.config=$ce}get configObject(){return this.config}setProperty(t,e){this.config={...this.config,[t]:e}}getProperty(t){return this.config[t]||!1}}vu.\u0275fac=function(t){return new(t||vu)},vu.\u0275prov=H({token:vu,factory:vu.\u0275fac,providedIn:"root"});var Ul=(()=>(function(n){n.DOWNLOAD="DOWNLOADING",n.IMPORT="IMPORTING",n.COMPLETED="COMPLETED",n.ERROR="ERROR"}(Ul||(Ul={})),Ul))();class Xs{constructor(t,e){this.http=t,this.dotUploadService=e}publishContent({data:t,maxSize:e,statusCallback:i=(o=>{}),signal:r}){return i(Ul.DOWNLOAD),this.setTempResource({data:t,maxSize:e,signal:r}).pipe(ai(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(Ul.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(Ie("entity","results"))}),Fi(o=>vo(o)))}setTempResource({data:t,maxSize:e,signal:i}){return wt(this.dotUploadService.uploadFile({file:t,maxSize:e,signal:i}))}}Xs.\u0275fac=function(t){return new(t||Xs)(F(ar),F(bh))},Xs.\u0275prov=H({token:Xs,factory:Xs.\u0275fac});var Kb=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(Kb||(Kb={})),Kb))();class Uh{constructor(t){this.http=t}get({query:t,limit:e=0,offset:i=0}){return this.http.post("/api/content/_search",{query:t,sort:"score,modDate desc",limit:e,offset:i}).pipe(Ie("entity"))}}Uh.\u0275fac=function(t){return new(t||Uh)(F(ar))},Uh.\u0275prov=H({token:Uh,factory:Uh.\u0275fac,providedIn:"root"});class Hl{constructor(t){this.http=t}get defaultHeaders(){const t=new Yr;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getContentTypes(t="",e=""){return this.http.post("/api/v1/contenttype/_filter",{filter:{types:e,query:t},orderBy:"name",direction:"ASC",perPage:40}).pipe(Ie("entity"))}getContentlets({contentType:t,filter:e,currentLanguage:i,contentletIdentifier:r}){const o=r?`-identifier:${r}`:"",s=e.includes("-")?e:`*${e}*`;return this.http.post("/api/content/_search",{query:`+contentType:${t} ${o} +languageId:${i} +deleted:false +working:true +catchall:${s} title:'${e}'^15`,sort:"modDate desc",offset:0,limit:40}).pipe(Ie("entity","jsonObjectView","contentlets"))}getContentletsByLink({link:t,currentLanguage:e=dg}){return this.http.post("/api/content/_search",{query:`+languageId:${e} +deleted:false +working:true +(urlmap:*${t}* OR (contentType:(dotAsset OR htmlpageasset OR fileAsset) AND +path:*${t}*))`,sort:"modDate desc",offset:0,limit:40}).pipe(Ie("entity","jsonObjectView","contentlets"))}}Hl.\u0275fac=function(t){return new(t||Hl)(F(ar))},Hl.\u0275prov=H({token:Hl,factory:Hl.\u0275fac});const I5="/api/v1/ai",zS=new Yr({"Content-Type":"application/json"});class $l{constructor(t){this.http=t}generateContent(t){return this.http.post(`${I5}/text/generate`,JSON.stringify({prompt:t}),{headers:zS}).pipe(Fi(()=>vo("Error fetching AI content")),fe(({choices:e})=>e[0].message.content))}generateAndPublishImage(t,e="1024x1024"){return this.http.post(`${I5}/image/generate`,JSON.stringify({prompt:t,size:e}),{headers:zS}).pipe(Fi(()=>vo("Error fetching AI content")),ai(i=>this.createAndPublishContentlet(i)))}createAndPublishContentlet(t){const{response:e,tempFileName:i}=t;return this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:[{baseType:"dotAsset",asset:e,title:i,hostFolder:"",indexPolicy:"WAIT_FOR"}]}),{headers:zS}).pipe(Ie("entity","results"),Fi(o=>vo(o)))}}$l.\u0275fac=function(t){return new(t||$l)(F(ar))},$l.\u0275prov=H({token:$l,factory:$l.\u0275fac});const Gce=["list"];function Yce(n,t){if(1&n&&(I(0,"h3"),ke(1),A()),2&n){const e=D(2);C(1),At(e.title)}}function qce(n,t){if(1&n&&_e(0,"dot-suggestions-list-item",7),2&n){const e=D(),i=e.$implicit,r=e.index;v("command",i.command)("index",i.tabindex||r)("label",i.label)("url",i.icon)("data",i.data)("disabled",i.disabled)}}function Kce(n,t){1&n&&_e(0,"div",8)}function Qce(n,t){if(1&n&&(dt(0),M(1,qce,1,6,"dot-suggestions-list-item",5),M(2,Kce,1,0,"ng-template",null,6,Bn),ht()),2&n){const e=t.$implicit,i=Dn(3);C(1),v("ngIf","divider"!==e.id)("ngIfElse",i)}}function Zce(n,t){if(1&n&&(I(0,"div"),M(1,Yce,2,1,"h3",2),I(2,"dot-suggestion-list",null,3),M(4,Qce,4,2,"ng-container",4),A()()),2&n){const e=D();C(1),v("ngIf",!!e.title),C(3),v("ngForOf",e.items)}}function Jce(n,t){if(1&n){const e=We();I(0,"dot-empty-message",9),ue("back",function(){return de(e),he(D().handleBackButton())}),A()}if(2&n){const e=D();v("title",e.noResultsMessage)("showBackBtn",!e.isFilterActive)}}var pr=(()=>(function(n){n.BLOCK="block",n.CONTENTTYPE="contentType",n.CONTENT="content"}(pr||(pr={})),pr))();class Wl{constructor(t,e,i){this.suggestionsService=t,this.dotLanguageService=e,this.cd=i,this.items=[],this.title="Select a block",this.noResultsMessage="No Results",this.currentLanguage=dg,this.allowedContentTypes="",this.contentletIdentifier="",this.isFilterActive=!1}onMouseDownHandler(t){t.preventDefault()}ngOnInit(){this.initialItems=this.items,this.itemsLoaded=pr.BLOCK,this.dotLanguageService.getLanguages().pipe(Et(1)).subscribe(t=>this.dotLangs=t)}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(t){this.list.updateSelection(t)}handleBackButton(){return this.itemsLoaded=this.itemsLoaded===pr.CONTENT?pr.CONTENTTYPE:pr.BLOCK,this.filterItems(),!1}filterItems(t=""){switch(this.itemsLoaded){case pr.BLOCK:this.items=this.initialItems.filter(e=>e.label.toLowerCase().includes(t.trim().toLowerCase()));break;case pr.CONTENTTYPE:this.loadContentTypes(t);break;case pr.CONTENT:this.loadContentlets(this.selectedContentType,t)}this.isFilterActive=!!t.length}loadContentTypes(t=""){this.suggestionsService.getContentTypes(t,this.allowedContentTypes).pipe(fe(e=>e.map(i=>({label:i.name,icon:i.icon,command:()=>{this.selectedContentType=i,this.itemsLoaded=pr.CONTENT,this.loadContentlets(i)}}))),Et(1)).subscribe(e=>{this.items=e,this.itemsLoaded=pr.CONTENTTYPE,this.items.length?this.title="Select a content type":this.noResultsMessage="No results",this.cd.detectChanges()})}loadContentlets(t,e=""){this.suggestionsService.getContentlets({contentType:t.variable,filter:e,currentLanguage:this.currentLanguage,contentletIdentifier:this.contentletIdentifier}).pipe(Et(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 ${t.name}`,this.cd.detectChanges()})}getContentletLanguage(t){const{languageCode:e,countryCode:i}=this.dotLangs[t];return e&&i?`${e}-${i}`:""}}Wl.\u0275fac=function(t){return new(t||Wl)(O(Hl),O(Bl),O(Un))},Wl.\u0275cmp=Me({type:Wl,selectors:[["dot-suggestions"]],viewQuery:function(t,e){if(1&t&&en(Gce,5),2&t){let i;Ke(i=Qe())&&(e.list=i.first)}},hostBindings:function(t,e){1&t&&ue("mousedown",function(r){return e.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(t,e){if(1&t&&(M(0,Zce,5,2,"div",0),M(1,Jce,1,2,"ng-template",null,1,Bn)),2&t){const i=Dn(2);v("ngIf",e.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 VS{constructor({editor:t,element:e,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&&Ub(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:b}=g,w=Math.min(...b.map(S=>S.$from.pos)),_=Math.max(...b.map(S=>S.$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 lce(n){return n instanceof qe}(p.selection)){let S=a.nodeDOM(w);const ie=S.dataset.nodeViewWrapper?S:S.querySelector("[data-node-view-wrapper]");if(ie&&(S=ie.firstChild),S)return S.getBoundingClientRect()}return gu(a,w,_)})}),this.show()):this.hide()},this.editor=t,this.element=e,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:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t,{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(t,e){const{state:i}=t;if(this.updateDelay>0&&i.selection.$from.pos!==i.selection.$to.pos)return void this.handleDebouncedUpdate(t,e);const o=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,o,s,e)}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;!(null===(t=this.tippy)||void 0===t)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.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 O5=n=>new Wt({key:"string"==typeof n.pluginKey?new on(n.pluginKey):n.pluginKey,view:t=>new VS({view:t,...n})}),BS=Mn.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[O5({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class Qb{constructor(t){this._el=t,this.pluginKey="NgxTiptapBubbleMenu",this.tippyOptions={},this.shouldShow=null}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");this.editor.registerPlugin(O5({pluginKey:this.pluginKey,editor:this.editor,element:this._el.nativeElement,tippyOptions:this.tippyOptions,shouldShow:this.shouldShow}))}ngOnDestroy(){this.editor.unregisterPlugin(this.pluginKey)}}Qb.\u0275fac=function(t){return new(t||Qb)(O(Tt))},Qb.\u0275dir=we({type:Qb,selectors:[["tiptap-bubble-menu","editor",""],["","tiptapBubbleMenu","","editor",""]],inputs:{pluginKey:"pluginKey",editor:"editor",tippyOptions:"tippyOptions",shouldShow:"shouldShow"}});class Zb{constructor(){this.draggable=!0,this.handle=""}}Zb.\u0275fac=function(t){return new(t||Zb)},Zb.\u0275dir=we({type:Zb,selectors:[["","tiptapDraggable",""]],hostVars:2,hostBindings:function(t,e){2&t&&Ot("draggable",e.draggable)("data-drag-handle",e.handle)}});class Hh{constructor(t,e){this.el=t,this._renderer=e,this.onChange=()=>{},this.onTouched=()=>{},this.handleChange=({transaction:i})=>{i.docChanged&&this.onChange(this.editor.getJSON())}}writeValue(t){t&&this.editor.chain().setContent(t,!0).run()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.editor.setEditable(!t),this._renderer.setProperty(this.el.nativeElement,"disabled",t)}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");const t=this.el.nativeElement.innerHTML;this.el.nativeElement.innerHTML="",this.el.nativeElement.appendChild(this.editor.options.element.firstChild),this.editor.setOptions({element:this.el.nativeElement}),t&&this.editor.chain().setContent(t,!1).run(),this.editor.on("blur",()=>{this.onTouched()}),this.editor.on("transaction",this.handleChange)}ngOnDestroy(){this.editor.destroy()}}Hh.\u0275fac=function(t){return new(t||Hh)(O(Tt),O(Cr))},Hh.\u0275dir=we({type:Hh,selectors:[["tiptap","editor",""],["","tiptap","","editor",""],["tiptap-editor","editor",""],["","tiptapEditor","","editor",""]],inputs:{editor:"editor"},features:[Pt([{provide:Sr,useExisting:Ut(()=>Hh),multi:!0}])]});class Xce{constructor({editor:t,element:e,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=t,this.element=e,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:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t,{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(t,e){var i,r,o;const{state:s}=t,{doc:a,selection:l}=s,{from:c,to:u}=l;e&&e.doc.eq(a)&&e.selection.eq(l)||(this.createTooltip(),(null===(i=this.shouldShow)||void 0===i?void 0:i.call(this,{editor:this.editor,view:t,state:s,oldState:e}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>gu(t,c,u))}),this.show()):this.hide())}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;!(null===(t=this.tippy)||void 0===t)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const A5=n=>new Wt({key:"string"==typeof n.pluginKey?new on(n.pluginKey):n.pluginKey,view:t=>new Xce({view:t,...n})});Mn.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[A5({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class Jb{constructor(t){this._el=t,this.pluginKey="NgxTiptapFloatingMenu",this.tippyOptions={},this.shouldShow=null}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");this.editor.registerPlugin(A5({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(t){return new(t||Jb)(O(Tt))},Jb.\u0275dir=we({type:Jb,selectors:[["tiptap-floating-menu","editor",""],["","tiptapFloatingMenu","","editor",""]],inputs:{pluginKey:"pluginKey",editor:"editor",tippyOptions:"tippyOptions",shouldShow:"shouldShow"}});class Xb{constructor(){this.handle=""}}Xb.\u0275fac=function(t){return new(t||Xb)},Xb.\u0275dir=we({type:Xb,selectors:[["","tiptapNodeViewContent",""]],hostVars:1,hostBindings:function(t,e){2&t&&Ot("data-node-view-content",e.handle)}});const k5={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 ug{transform({live:t,working:e,deleted:i,hasLiveVersion:r}){return{live:t,working:e,deleted:i,hasLiveVersion:r}}}ug.\u0275fac=function(t){return new(t||ug)},ug.\u0275pipe=qn({name:"contentletState",type:ug,pure:!0});const US="menuFloating";class nue{constructor({editor:t,view:e,render:i,command:r,key:o}){this.invalidNodes=["codeBlock","blockquote"],this.editor=t,this.view=e,this.editor.on("focus",()=>{this.update(this.editor.view)}),this.render=i,this.command=r,this.key=o}update(t,e){const i=this.key?.getState(t.state),r=e?this.key?.getState(e):null;if(i.open){const{from:o,to:s}=this.editor.state.selection,a=gu(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 N5=new on(US),iue=n=>new Wt({key:N5,view:t=>new nue({key:N5,view:t,...n}),state:{init:()=>({open:!1}),apply(t){const e=t.getMeta(US);return e?.open?{open:e?.open}:{open:!1}}},props:{handleKeyDown(t,e){const{open:i,range:r}=this.getState(t.state);return!!i&&n.render().onKeyDown({event:e,range:r,view:t})}}}),cue={paragrah:!0,text:!0,doc:!0},P5={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}},uue=(n,t)=>{const{type:e,attrs:i}=n;return"heading"===e&&t[e+i.level]},L5=(n,t)=>{if(!n?.length)return n;const e=[];for(const i in n){const r=n[i];(t[r.type]||uue(r,t))&&e.push({...r,content:L5(r.content,t)})}return e},fue=new RegExp(/]*)>(\s|\n|]*src="[^"]*"[^>]*>)*?<\/a>/gm),HS=new RegExp(/]*src="[^"]*"[^>]*>/gm),bu=(n,t)=>{let i,e=n.depth;do{if(i=n.node(e),i){if(Array.isArray(t)&&t.includes(i.type.name))break;e--}}while(e>0&&i);return i},e0=n=>{const t=n.match(HS)||[];return(new DOMParser).parseFromString(n,"text/html").documentElement.textContent.trim().length>0?n.replace(HS,"")+t.join(""):t.join("")},R5=n=>{const{state:t}=n,{doc:e}=t.tr,i=t.selection.to,r=nt.create(e,i,i);n.dispatch(t.tr.setSelection(r))},t0=(n,t)=>{let e=null,i=null,r=null;return n.state.doc.descendants((o,s)=>{o.type.name===t&&(e=o,i=s,r=i+e.nodeSize)}),e?{node:e,from:i,to:r}:null},F5=n=>/^https?:\/\/.+\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(n);class wu extends ji{constructor(t,e){super(),this.STEP_TYPE="setDocAttr",this.key=t,this.value=e}get stepType(){return this.STEP_TYPE}static fromJSON(t,e){return new wu(e.key,e.value)}static register(){try{ji.jsonID(this.prototype.STEP_TYPE,wu)}catch(t){if(t.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw t}return!0}apply(t){return this.prevValue=t.attrs[this.key],t.attrs===t.type.defaultAttrs&&(t.attrs=Object.assign({},t.attrs)),t.attrs[this.key]=this.value,mi.ok(t)}invert(){return new wu(this.key,this.prevValue)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}}class n0 extends ji{constructor(){super(),this.STEP_TYPE="restoreDefaultDOMAttrs"}get stepType(){return this.STEP_TYPE}static register(){try{ji.jsonID(this.prototype.STEP_TYPE,n0)}catch(t){if(t.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw t}return!0}apply(t){return t.attrs=Object.assign({},t.type.defaultAttrs),mi.ok(t)}invert(){return new n0}map(){return this}toJSON(){return{stepType:this.stepType}}}const dg=1;var gi=(()=>(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",n.AI_CONTENT="aiContent"}(gi||(gi={})),gi))();const Tue=[gi.DOT_IMAGE,gi.DOT_CONTENT];function j5({editor:n,range:t,props:e,customBlocks:i}){const{type:r,payload:o}=e,s={dotContent:()=>{n.chain().addContentletBlock({range:t,payload:o}).addNextLine().run()},heading:()=>{n.chain().addHeading({range:t,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(Et(1),Tn(a=>!!a)).subscribe(a=>{requestAnimationFrame(()=>{n.chain().insertTable({rows:a.rows,cols:a.columns,withHeaderRow:!!a.header}).focus().run()})})},orderedList:()=>{n.chain().deleteRange(t).toggleOrderedList().focus().run()},bulletList:()=>{n.chain().deleteRange(t).toggleBulletList().focus().run()},blockquote:()=>{n.chain().deleteRange(t).setBlockquote().focus().run()},codeBlock:()=>{n.chain().deleteRange(t).setCodeBlock().focus().run()},horizontalRule:()=>{n.chain().deleteRange(t).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()};z5(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(t).focus().run()}function z5(n){return n.extensions.map(t=>function Sue(n){return n.map(t=>({icon:t.icon,label:t.menuLabel,commandKey:t.command,id:`${t.command}-id`}))}(t.actions||[])).flat()}const Eue=(n,t)=>{let e,i;const r=new on("suggestionPlugin"),o=new ae;let s=!0;function a({editor:g,range:y,clientRect:b}){s&&(function c(g,y){const{allowedBlocks:b,allowedContentTypes:w,lang:_,contentletIdentifier:N}=g.storage.dotConfig,ie=function u({allowedBlocks:g=[],editor:y,range:b}){const _=[...g.length?Nv.filter(N=>g.includes(N.id)):Nv,...z5(t)];return _.forEach(N=>N.command=()=>function d({item:g,editor:y,range:b}){const{id:w,attributes:_}=g,N={type:{name:w.includes("heading")?"heading":w,..._}};MR({type:pr.BLOCK,editor:y,range:b,suggestionKey:r,ItemsType:pr}),h({editor:y,range:b,props:N})}({item:N,editor:y,range:b})),_}({allowedBlocks:b.length>1?b:[],editor:g,range:y});i=n.createComponent(Wl),i.instance.items=ie,i.instance.currentLanguage=_,i.instance.allowedContentTypes=w,i.instance.contentletIdentifier=N,i.instance.onSelectContentlet=K=>{MR({type:pr.CONTENT,editor:g,range:y,suggestionKey:r,ItemsType:pr}),h({editor:g,range:y,props:K})},i.changeDetectorRef.detectChanges(),(b.length<=1||b.includes("dotContent"))&&i.instance.addContentletItem()}(g,y),e=function Mue({element:n,content:t,rect:e,onHide:i}){return gs(n,{content:t,placement:"bottom",popperOptions:{modifiers:eee},getReferenceClientRect:e,showOnCreate:!0,interactive:!0,offset:[120,10],trigger:"manual",maxWidth:"none",onHide:i})}({element:g.options.element.parentElement,content:i.location.nativeElement,rect:b,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(US,{open:!1});g.view.dispatch(N),g.commands.freezeScroll(!1)}}))}function l({editor:g}){g.commands.freezeScroll(!0);const y=bu(g.view.state.selection.$from,[gi.TABLE_CELL])?.type.name===gi.TABLE_CELL,b=bu(g.view.state.selection.$from,[gi.CODE_BLOCK])?.type.name===gi.CODE_BLOCK;s=!y&&!b}function h({editor:g,range:y,props:b}){j5({editor:g,range:f({editor:g,range:y}),props:b,customBlocks:t})}function f({editor:g,range:y}){const b=r.getState(g.view.state).query?.length||0;return y.to=y.to+b,y}function p({event:g}){const{key:y}=g;return"Escape"===y?(g.stopImmediatePropagation(),e.hide(),!0):"Enter"===y?(i.instance.execCommand(),!0):("ArrowDown"===y||"ArrowUp"===y)&&(i.instance.updateSelection(g),!0)}function m({editor:g}){e?.destroy(),g.commands.freezeScroll(!1),i?.destroy(),i=null,o.next(!0),o.complete()}return Mn.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:b})=>b().focus().deleteRange(g).toggleHeading({level:y.level}).focus().run(),addContentletBlock:({range:g,payload:y})=>({chain:b})=>b().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:b}=y.state;return y.commands.insertContentAt(b.head,{type:"paragraph"}),!0}).focus().run()}),addProseMirrorPlugins(){return[iue({command:j5,editor:this.editor,render:()=>({onStart:a,onKeyDown:p,onExit:m})}),Nce({editor:this.editor,...this.options.suggestion})]}})};function xue(n,t){if(1&n){const e=We();I(0,"div",5)(1,"dot-asset-search",6),ue("addAsset",function(r){return de(e),he(D().onSelectAsset(r))}),A()()}if(2&n){const e=D();C(1),v("type",e.type)("languageId",e.languageId)}}function Iue(n,t){if(1&n){const e=We();I(0,"div",5)(1,"dot-upload-asset",7),ue("uploadedFile",function(r){return de(e),he(D().onSelectAsset(r))})("preventClose",function(r){return de(e),he(D().onPreventClose(r))})("hide",function(r){return de(e),he(D().onHide(r))}),A()()}if(2&n){const e=D();C(1),v("type",e.type)}}function Oue(n,t){if(1&n){const e=We();I(0,"div",5)(1,"dot-external-asset",8),ue("addAsset",function(r){return de(e),he(D().onSelectAsset(r))}),A()()}if(2&n){const e=D();C(1),v("type",e.type)}}class $h{constructor(){this.languageId=dg,this.disableTabs=!1}onPreventClose(t){this.preventClose(t),this.disableTabs=t}}$h.\u0275fac=function(t){return new(t||$h)},$h.\u0275cmp=Me({type:$h,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(t,e){1&t&&(I(0,"div",0)(1,"p-tabView")(2,"p-tabPanel",1),M(3,xue,2,2,"ng-template",2),A(),I(4,"p-tabPanel",3),M(5,Iue,2,1,"ng-template",2),A(),I(6,"p-tabPanel",4),M(7,Oue,2,1,"ng-template",2),A()()()),2&t&&(C(2),v("cache",!1)("disabled",e.disableTabs),C(2),v("cache",!1)("header","Upload "+e.type)("disabled",e.disableTabs),C(2),v("cache",!1)("header",e.type+" URL")("disabled",e.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 Aue{constructor({editor:t,view:e,pluginKey:i,render:r}){this.editor=t,this.view=e,this.pluginKey=i,this.render=r,this.editor.on("focus",()=>this.render().onHide(this.editor))}update(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{open:!1},{state:o}=t,{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 gu(t,a,l)}}):this.render().onHide(this.editor))}destroy(){this.render().onDestroy()}}const kue=n=>new Wt({key:n.pluginKey,view:t=>new Aue({view:t,...n}),state:{init:()=>({open:!1,type:null}),apply(t,e,i){const{open:r,type:o}=t.getMeta(n.pluginKey)||{},s=n.pluginKey?.getState(i);return"boolean"==typeof r?{open:r,type:o}:s||e}}}),r0=new on("bubble-image-form"),Nue={interactive:!0,duration:0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},Pue=n=>{let t,e,i,r=!1;function o({editor:d,type:h,getPosition:f}){(function l(d){const{element:h}=d.options;t||!!!h.parentElement||(t=gs(h.parentElement,Nue))})(d),function c(d,h){e=n.createComponent($h),e.instance.languageId=d.storage.dotConfig.lang,e.instance.type=h,e.instance.onSelectAsset=f=>{u(d,!1),d.chain().insertAsset({type:h,payload:f}).addNextLine().closeAssetForm().run()},e.instance.preventClose=f=>u(d,f),e.instance.onHide=()=>{u(d,!1),s(d)},i=e.location.nativeElement,e.changeDetectorRef.detectChanges()}(d,h),t.setProps({content:i,getReferenceClientRect:f,onClickOutside:()=>s(d)}),t.show()}function s(d){r||(d.commands.closeAssetForm(),t?.hide(),e?.destroy())}function a(){t?.destroy(),e?.destroy()}function u(d,h){r=h,d.setOptions({editable:!h})}return BS.extend({name:"bubbleAssetForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:r0}),addCommands:()=>({openAssetForm:({type:d})=>({chain:h})=>h().command(({tr:f})=>(f.setMeta(r0,{open:!0,type:d}),!0)).freezeScroll(!0).run(),closeAssetForm:()=>({chain:d})=>d().command(({tr:h})=>(h.setMeta(r0,{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[kue({pluginKey:r0,editor:this.editor,render:()=>({onStart:o,onHide:s,onDestroy:a})})]}})};class hg{}hg.\u0275fac=function(t){return new(t||hg)},hg.\u0275mod=Xe({type:hg}),hg.\u0275inj=lt({imports:[wn]});class Cu{}Cu.\u0275fac=function(t){return new(t||Cu)},Cu.\u0275mod=Xe({type:Cu}),Cu.\u0275inj=lt({imports:[wn]});const Lue=function(n,t,e){return{"border-width":n,width:t,height:e}};class Wh{constructor(){this.borderSize="",this.size=""}}Wh.\u0275fac=function(t){return new(t||Wh)},Wh.\u0275cmp=Me({type:Wh,selectors:[["dot-spinner"]],inputs:{borderSize:"borderSize",size:"size"},decls:1,vars:5,consts:[[3,"ngStyle"]],template:function(t,e){1&t&&_e(0,"div",0),2&t&&v("ngStyle",al(1,Lue,e.borderSize,e.size,e.size))},dependencies:[sr],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 o0{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(t){this._accept=t?.filter(e=>"*/*"!==e).map(e=>e.toLowerCase().replace(/\*/g,""))}get validity(){return this._validity}onDrop(t){t.stopPropagation(),t.preventDefault();const{dataTransfer:e}=t,i=this.getFiles(e),r=1===i?.length?i[0]:null;0!==i.length&&(this.setValidity(i),e.items?.clear(),e.clearData(),this.fileDropped.emit({file:r,validity:this._validity}))}onDragEnter(t){t.stopPropagation(),t.preventDefault(),this.fileDragEnter.emit(!0)}onDragOver(t){t.stopPropagation(),t.preventDefault(),this.fileDragOver.emit(!0)}onDragLeave(t){t.stopPropagation(),t.preventDefault(),this.fileDragLeave.emit(!0)}typeMatch(t){if(!this._accept.length)return!0;const e=t.name.split(".").pop().toLowerCase(),i=t.type.toLowerCase();return this._accept.some(o=>i.includes(o)||o.includes(`.${e}`))}getFiles(t){const{items:e,files:i}=t;return e?Array.from(e).filter(r=>"file"===r.kind).map(r=>r.getAsFile()):Array.from(i)||[]}isFileTooLong(t){return!!this.maxFileSize&&t.size>this.maxFileSize}setValidity(t){const e=t[0],i=t.length>1,r=!this.typeMatch(e),o=this.isFileTooLong(e);this._validity={...this._validity,multipleFilesDropped:i,fileTypeMismatch:r,maxFileSizeExceeded:o,valid:!r&&!o&&!i}}}o0.\u0275fac=function(t){return new(t||o0)},o0.\u0275cmp=Me({type:o0,selectors:[["dot-drop-zone"]],hostBindings:function(t,e){1&t&&ue("drop",function(r){return e.onDrop(r)})("dragenter",function(r){return e.onDragEnter(r)})("dragover",function(r){return e.onDragOver(r)})("dragleave",function(r){return e.onDragLeave(r)})},inputs:{maxFileSize:"maxFileSize",accept:"accept"},outputs:{fileDropped:"fileDropped",fileDragEnter:"fileDragEnter",fileDragOver:"fileDragOver",fileDragLeave:"fileDragLeave"},standalone:!0,features:[Ns],ngContentSelectors:["*"],decls:1,vars:0,template:function(t,e){1&t&&(go(),Ri(0))},dependencies:[wn],changeDetection:0});class s0{}s0.\u0275fac=function(t){return new(t||s0)},s0.\u0275cmp=Me({type:s0,selectors:[["dot-icon"]],inputs:{name:"name",size:"size"},decls:2,vars:3,consts:[[1,"material-icons"]],template:function(t,e){1&t&&(I(0,"i",0),ke(1),A()),2&t&&(Dc("font-size",e.size,"px"),C(1),At(e.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 ea{constructor(t){this.dotMessageService=t}transform(t,e=[]){return t?this.dotMessageService.get(t,...e):""}}ea.\u0275fac=function(t){return new(t||ea)(O(Zr,16))},ea.\u0275pipe=qn({name:"dm",type:ea,pure:!0,standalone:!0});const Fue=function(n){return[n]};function jue(n,t){if(1&n&&_e(0,"i",6),2&n){const e=D();v("ngClass",Mt(1,Fue,e.configuration.icon))}}function zue(n,t){if(1&n&&(I(0,"h2",7),ke(1),A()),2&n){const e=D();C(1),Yi(" ",null==e.configuration?null:e.configuration.subtitle," ")}}function Vue(n,t){if(1&n){const e=We();I(0,"p-button",10),ue("onClick",function(){return de(e),he(D(2).buttonAction.emit())}),A()}2&n&&v("label",D(2).buttonLabel)}function Bue(n,t){1&n&&(I(0,"span"),ke(1),Qn(2,"dm"),A()),2&n&&(C(1),At(Zn(2,1,"dot.common.or.text")))}function Uue(n,t){if(1&n&&(dt(0),M(1,Bue,3,3,"span",5),I(2,"a",11),ke(3),Qn(4,"dm"),A(),ht()),2&n){const e=D(2);C(1),v("ngIf",!e.hideContactUsLink&&e.buttonLabel),C(2),At(Zn(4,2,"Contact-Us-for-more-Information"))}}function Hue(n,t){if(1&n&&(dt(0),I(1,"div",8),M(2,Vue,1,1,"p-button",9),M(3,Uue,5,4,"ng-container",5),A(),ht()),2&n){const e=D();C(2),v("ngIf",e.buttonLabel),C(1),v("ngIf",!e.hideContactUsLink)}}class a0{constructor(){this.hideContactUsLink=!1,this.buttonAction=new re}}a0.\u0275fac=function(t){return new(t||a0)},a0.\u0275cmp=Me({type:a0,selectors:[["dot-empty-container"]],inputs:{configuration:"configuration",buttonLabel:"buttonLabel",hideContactUsLink:"hideContactUsLink"},outputs:{buttonAction:"buttonAction"},standalone:!0,features:[Ns],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(t,e){1&t&&(I(0,"div",0)(1,"div",1),M(2,jue,1,3,"i",2),I(3,"h1",3),ke(4),A(),M(5,zue,2,1,"h2",4),A(),M(6,Hue,4,2,"ng-container",5),A()),2&t&&(C(2),v("ngIf",null==e.configuration?null:e.configuration.icon),C(2),At(null==e.configuration?null:e.configuration.title),C(1),v("ngIf",null==e.configuration?null:e.configuration.subtitle),C(1),v("ngIf",!e.hideContactUsLink||e.buttonLabel))},dependencies:[Bo,zL,Kt,fi,ea],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 fg=(()=>{class n{constructor(e,i,r,o,s){this.el=e,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(e){this._disabled=e,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 e=this.getTarget(this.el.nativeElement);e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.text&&(this.setOption({tooltipLabel:e.text.currentValue}),this.active&&(e.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.autoHide&&this.setOption({autoHide:e.autoHide.currentValue}),e.tooltipOptions&&(this._tooltipOptions={...this._tooltipOptions,...e.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(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){(this.isAutoHide()||!(Z.hasClass(e.toElement,"p-tooltip")||Z.hasClass(e.toElement,"p-tooltip-arrow")||Z.hasClass(e.toElement,"p-tooltip-text")||Z.hasClass(e.relatedTarget,"p-tooltip")))&&this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onInputClick(e){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 e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}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 e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),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")?Z.appendChild(this.container,this.el.nativeElement):Z.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(),Z.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?gl.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&&gl.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 e=this.el.nativeElement.getBoundingClientRect();return{left:e.left+Z.getWindowScrollLeft(),top:e.top+Z.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),i=e.left+Z.getOuterWidth(this.el.nativeElement),r=e.top+(Z.getOuterHeight(this.el.nativeElement)-Z.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 e=this.getHostOffset(),i=e.left-Z.getOuterWidth(this.container),r=e.top+(Z.getOuterHeight(this.el.nativeElement)-Z.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 e=this.getHostOffset(),i=e.left+(Z.getOuterWidth(this.el.nativeElement)-Z.getOuterWidth(this.container))/2,r=e.top-Z.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 e=this.getHostOffset(),i=e.left+(Z.getOuterWidth(this.el.nativeElement)-Z.getOuterWidth(this.container))/2,r=e.top+Z.getOuterHeight(this.el.nativeElement);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions={...this._tooltipOptions,...e}}getOption(e){return this._tooltipOptions[e]}getTarget(e){return Z.hasClass(e,"p-inputwrapper")?Z.findSingle(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let e=this.container.getBoundingClientRect(),i=e.top,r=e.left,o=Z.getOuterWidth(this.container),s=Z.getOuterHeight(this.container),a=Z.getViewport();return r+o>a.width||r<0||i<0||i+s>a.height}onWindowResize(e){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 LL(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 e=this.getTarget(this.el.nativeElement);e.removeEventListener("focus",this.focusListener),e.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):Z.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&&gl.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(qt),O(Fc),O(Cr),O(Un))},n.\u0275dir=we({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:[$i]}),n})(),Du=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})();const $ue=function(n){return{"dot-tab-dropdown--active":n}};function Wue(n,t){if(1&n){const e=We();I(0,"button",7),ue("click",function(r){de(e);const o=D().$implicit;return he(D().onClickDropdown(r,o.value.id))}),_e(1,"i",8),A()}if(2&n){const e=D().$implicit,i=D();v("disabled",e.disabled)("aria-disabled",e.disabled)("ngClass",Mt(5,$ue,i.activeId===e.value.id)),C(1),pn(e.value.toggle?i.dropDownOpenIcon:i.dropDownCloseIcon)}}function Gue(n,t){1&n&&_e(0,"div",9)}const Yue=function(n,t){return{"dot-tab--active":n,"dot-tab__button--right":t}};function que(n,t){if(1&n){const e=We();I(0,"div",2)(1,"div",3)(2,"button",4),ue("click",function(r){const s=de(e).$implicit;return he(D().onClickOption(r,s.value.id))}),Qn(3,"dm"),ke(4),A(),M(5,Wue,2,7,"button",5),A(),M(6,Gue,1,0,"div",6),A()}if(2&n){const e=t.$implicit,i=D();C(2),v("ngClass",bi(10,Yue,i.activeId===e.value.id,e.value.showDropdownButton))("value",e.value.id)("disabled",e.disabled)("item.disabled",e.disabled)("pTooltip",Zn(3,8,"editpage.toolbar."+e.label.toLowerCase()+".page.clipboard")),C(2),Yi(" ",e.label," "),C(1),v("ngIf",e.value.showDropdownButton),C(1),v("ngIf",i.activeId===e.value.id)}}class l0{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(t){t.options&&(this._options=this.options.map(e=>({...e,value:{...e.value,toggle:!e.value.showDropdownButton&&void 0}})))}onClickOption(t,e){e!==this.activeId&&this.clickOption.emit({event:t,optionId:e})}onClickDropdown(t,e){if(!this.shouldOpenMenu(e))return;this._options=this._options.map(o=>(e.includes(o.value.id)&&(o.value.toggle=!o.value.toggle),o));const r=t?.target?.closest(".dot-tab");this.openMenu.emit({event:t,menuId:e,target:r})}resetDropdowns(){this._options=this._options.map(t=>(t.value.toggle=!1,t))}resetDropdownById(t){this._options=this._options.map(e=>(e.value.id===t&&(e.value.toggle=!1),e))}shouldOpenMenu(t){return Boolean(this._options.find(e=>e.value.id===t&&e.value.showDropdownButton))}}function Kue(n,t){if(1&n&&(I(0,"small",1),ke(1),Qn(2,"dm"),A()),2&n){const e=D();C(1),Yi(" ",Zn(2,1,e.errorMsg),"\n")}}l0.\u0275fac=function(t){return new(t||l0)},l0.\u0275cmp=Me({type:l0,selectors:[["dot-tab-buttons"]],inputs:{activeId:"activeId",options:"options"},outputs:{openMenu:"openMenu",clickOption:"clickOption",dropdownClick:"dropdownClick"},standalone:!0,features:[$i,Ns],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(t,e){1&t&&(I(0,"div",0),M(1,que,7,13,"div",1),A()),2&t&&(C(1),v("ngForOf",e._options))},dependencies:[Gr,Bo,Kt,fi,Du,fg,ea],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 c0={maxlength:"error.form.validator.maxlength",required:"error.form.validator.required",pattern:"error.form.validator.pattern"};class pg{constructor(t,e){this.cd=t,this.dotMessageService=e,this.errorMsg="",this.destroy$=new ae}set message(t){this.defaultMessage=t,this.cd.markForCheck()}set field(t){t&&(this._field=t,t.statusChanges.pipe(mn(this.destroy$)).subscribe(()=>{this.errorMsg=this.getErrors(t.errors),this.cd.detectChanges()}))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getErrors(t){let e=[];return t&&(e=[...this.getMsgDefaultValidators(t),...this.getMsgCustomsValidators(t)]),this.defaultMessage?this.defaultMessage:e.slice(0,1)[0]}getMsgDefaultValidators(t){let e=[];return Object.entries(t).forEach(([i,r])=>{if(i in c0){let o="";const{requiredLength:s,requiredPattern:a}=r;switch(i){case"maxlength":o=this.dotMessageService.get(c0[i],s);break;case"pattern":o=this.dotMessageService.get(this.patternErrorMessage||c0[i],a);break;default:o=c0[i]}e=[...e,o]}}),e}getMsgCustomsValidators(t){let e=[];return Object.entries(t).forEach(([,i])=>{"string"==typeof i&&(e=[...e,i])}),e}}pg.\u0275fac=function(t){return new(t||pg)(O(Un),O(Zr))},pg.\u0275cmp=Me({type:pg,selectors:[["dot-field-validation-message"]],inputs:{patternErrorMessage:"patternErrorMessage",message:"message",field:"field"},standalone:!0,features:[Ns],decls:1,vars:1,consts:[["class","p-invalid","data-testId","error-msg",4,"ngIf"],["data-testId","error-msg",1,"p-invalid"]],template:function(t,e){1&t&&M(0,Kue,3,3,"small",0),2&t&&v("ngIf",e._field&&e._field.enabled&&e._field.dirty&&!e._field.valid)},dependencies:[Kt,ea],encapsulation:2,changeDetection:0});class Tu{copy(t){const e=document.createElement("textarea");let i;return e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.opacity="0",e.value=t,document.body.appendChild(e),e.select(),new Promise((r,o)=>{try{i=document.execCommand("copy"),r(i)}catch{o(i)}document.body.removeChild(e)})}}function Que(n,t){if(1&n&&(I(0,"span",3),ke(1),A()),2&n){const e=D();C(1),At(e.label)}}Tu.\u0275fac=function(t){return new(t||Tu)},Tu.\u0275prov=H({token:Tu,factory:Tu.\u0275fac});class u0{constructor(t,e){this.dotClipboardUtil=t,this.dotMessageService=e,this.copy=""}ngOnInit(){this.tooltipText=this.tooltipText||this.dotMessageService.get("Copy")}copyUrlToClipboard(t){t.stopPropagation(),this.dotClipboardUtil.copy(this.copy).then(()=>{const e=this.tooltipText;this.tooltipText=this.dotMessageService.get("Copied"),setTimeout(()=>{this.tooltipText=e},1e3)}).catch(()=>{this.tooltipText="Error"})}}u0.\u0275fac=function(t){return new(t||u0)(O(Tu),O(Zr))},u0.\u0275cmp=Me({type:u0,selectors:[["dot-copy-button"]],inputs:{copy:"copy",label:"label",tooltipText:"tooltipText"},standalone:!0,features:[Pt([Tu]),Ns],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(t,e){1&t&&(I(0,"button",0),ue("click",function(r){return e.copyUrlToClipboard(r)}),_e(1,"i",1),M(2,Que,2,1,"span",2),A()),2&t&&(v("pTooltip",e.tooltipText),C(2),v("ngIf",!!e.label))},dependencies:[Du,fg,Bo,Vo,Kt],changeDetection:0});class mg{constructor(t,e,i){this.el=t,this.renderer=e,this.formGroupDirective=i,e.addClass(this.el.nativeElement,"p-label-input-required")}set checkIsRequiredControl(t){this.isRequiredControl(t)||this.renderer.removeClass(this.el.nativeElement,"p-label-input-required")}isRequiredControl(t){const e=this.formGroupDirective.control?.get(t);return!(!e||!e.hasValidator(Ud.required))}}mg.\u0275fac=function(t){return new(t||mg)(O(Tt),O(Cr),O(Aa))},mg.\u0275dir=we({type:mg,selectors:[["","dotFieldRequired",""]],inputs:{checkIsRequiredControl:"checkIsRequiredControl"},standalone:!0});class d0{constructor(){this.confirmationService=ct(NL)}onPressEscape(){this.confirmationService.close()}}d0.\u0275fac=function(t){return new(t||d0)},d0.\u0275dir=we({type:d0,selectors:[["p-confirmPopup","dotRemoveConfirmPopupWithEscape",""]],hostBindings:function(t,e){1&t&&ue("keydown.escape",function(r){return e.onPressEscape(r)},0,ZI)},standalone:!0});let Zue=(()=>{class n{constructor(e){this.host=e,this.focused=!1}ngAfterViewChecked(){if(!this.focused&&this.autofocus){const e=Z.getFocusableElements(this.host.nativeElement);0===e.length&&this.host.nativeElement.focus(),e.length>0&&e[0].focus(),this.focused=!0}}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275dir=we({type:n,selectors:[["","pAutoFocus",""]],hostAttrs:[1,"p-element"],inputs:{autofocus:"autofocus"}}),n})(),Jue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})();const Xue=["overlay"],ede=["content"];function tde(n,t){1&n&&_t(0)}const nde=function(n,t,e){return{showTransitionParams:n,hideTransitionParams:t,transform:e}},ide=function(n){return{value:"visible",params:n}},rde=function(n){return{mode:n}},ode=function(n){return{$implicit:n}};function sde(n,t){if(1&n){const e=We();I(0,"div",1,3),ue("click",function(r){return de(e),he(D(2).onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){return de(e),he(D(2).onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){return de(e),he(D(2).onOverlayContentAnimationDone(r))}),Ri(2),M(3,tde,1,0,"ng-container",4),A()}if(2&n){const e=D(2);pn(e.contentStyleClass),v("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",Mt(11,ide,al(7,nde,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),C(3),v("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",Mt(15,ode,Mt(13,rde,e.overlayMode)))}}const ade=function(n,t,e,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":t,"p-overlay-top":e,"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 lde(n,t){if(1&n){const e=We();I(0,"div",1,2),ue("click",function(r){return de(e),he(D().onOverlayClick(r))}),M(2,sde,4,17,"div",0),A()}if(2&n){const e=D();pn(e.styleClass),v("ngStyle",e.style)("ngClass",hD(5,ade,[e.modal,e.modal&&"center"===e.overlayResponsiveDirection,e.modal&&"top"===e.overlayResponsiveDirection,e.modal&&"top-start"===e.overlayResponsiveDirection,e.modal&&"top-end"===e.overlayResponsiveDirection,e.modal&&"bottom"===e.overlayResponsiveDirection,e.modal&&"bottom-start"===e.overlayResponsiveDirection,e.modal&&"bottom-end"===e.overlayResponsiveDirection,e.modal&&"left"===e.overlayResponsiveDirection,e.modal&&"left-start"===e.overlayResponsiveDirection,e.modal&&"left-end"===e.overlayResponsiveDirection,e.modal&&"right"===e.overlayResponsiveDirection,e.modal&&"right-start"===e.overlayResponsiveDirection,e.modal&&"right-end"===e.overlayResponsiveDirection])),C(2),v("ngIf",e.visible)}}const cde=["*"],ude={provide:Sr,useExisting:Ut(()=>V5),multi:!0},dde=sv([Ai({transform:"{{transform}}",opacity:0}),kc("{{showTransitionParams}}")]),hde=sv([kc("{{hideTransitionParams}}",Ai({transform:"{{transform}}",opacity:0}))]);let V5=(()=>{class n{constructor(e,i,r,o,s,a){this.document=e,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(e){this._visible=e,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(e){this._mode=e}get style(){return Lt.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(e){this._style=e}get styleClass(){return Lt.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(e){this._styleClass=e}get contentStyle(){return Lt.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(e){this._contentStyle=e}get contentStyleClass(){return Lt.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(e){this._contentStyleClass=e}get target(){const e=this._target||this.overlayOptions?.target;return void 0===e?"@prev":e}set target(e){this._target=e}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(e){this._appendTo=e}get autoZIndex(){const e=this._autoZIndex||this.overlayOptions?.autoZIndex;return void 0===e||e}set autoZIndex(e){this._autoZIndex=e}get baseZIndex(){const e=this._baseZIndex||this.overlayOptions?.baseZIndex;return void 0===e?0:e}set baseZIndex(e){this._baseZIndex=e}get showTransitionOptions(){const e=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return void 0===e?".12s cubic-bezier(0, 0, 0.2, 1)":e}set showTransitionOptions(e){this._showTransitionOptions=e}get hideTransitionOptions(){const e=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return void 0===e?".1s linear":e}set hideTransitionOptions(e){this._hideTransitionOptions=e}get listener(){return this._listener||this.overlayOptions?.listener}set listener(e){this._listener=e}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(e){this._responsive=e}get options(){return this._options}set options(e){this._options=e}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 Z.getTargetElement(this.target,this.el?.nativeElement)}ngAfterContentInit(){this.templates?.forEach(e=>{e.getType(),this.contentTemplate=e.template})}show(e,i=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&Z.focus(this.targetEl),this.modal&&Z.addClass(this.document?.body,"p-overflow-hidden")}hide(e,i=!1){this.visible&&(this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&Z.focus(this.targetEl),this.modal&&Z.removeClass(this.document?.body,"p-overflow-hidden"))}alignOverlay(){!this.modal&&Z.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(e){this._visible=e,this.visibleChange.emit(e)}onOverlayClick(e){this.isOverlayClicked=!0}onOverlayContentClick(e){this.overlayService.add({originalEvent:e,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(e){switch(e.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&gl.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),Z.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&&Z.addClass(this.overlayEl,"p-component-overlay-leave")}this.handleEvents("onAnimationStart",e)}onOverlayContentAnimationDone(e){const i=this.overlayEl||e.element.parentElement;switch(e.toState){case"visible":this.show(i,!0),this.bindListeners();break;case"void":this.hide(i,!0),this.unbindListeners(),Z.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),gl.clear(i),this.modalVisible=!1}this.handleEvents("onAnimationDone",e)}handleEvents(e,i){this[e].emit(i),this.options&&this.options[e]&&this.options[e](i),this.config?.overlayOptions&&this.config?.overlayOptions[e]&&this.config?.overlayOptions[e](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 LL(this.targetEl,e=>{(!this.listener||this.listener(e,{type:"scroll",mode:this.overlayMode,valid:!0}))&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",e=>{const r=!(this.targetEl&&(this.targetEl.isSameNode(e.target)||!this.isOverlayClicked&&this.targetEl.contains(e.target))||this.isOverlayContentClicked);(this.listener?this.listener(e,{type:"outside",mode:this.overlayMode,valid:3!==e.which&&r}):r)&&this.hide(e),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",e=>{(this.listener?this.listener(e,{type:"resize",mode:this.overlayMode,valid:!Z.isTouchDevice()}):!Z.isTouchDevice())&&this.hide(e,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.window,"keydown",e=>{this.overlayOptions.hideOnEscape&&27===e.keyCode&&(this.listener?this.listener(e,{type:"keydown",mode:this.overlayMode,valid:!Z.isTouchDevice()}):!Z.isTouchDevice())&&this.zone.run(()=>{this.hide(e,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(Z.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),gl.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners()}}return n.\u0275fac=function(e){return new(e||n)(O(Ln),O(Tt),O(Cr),O(Fc),O(XQ),O(qt))},n.\u0275cmp=Me({type:n,selectors:[["p-overlay"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(Xue,5),en(ede,5)),2&e){let r;Ke(r=Qe())&&(i.overlayViewChild=r.first),Ke(r=Qe())&&(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:[Pt([ude])],ngContentSelectors:cde,decls:1,vars:1,consts:[[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"ngStyle","ngClass","click"],["overlay",""],["content",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(go(),M(0,lde,3,20,"div",0)),2&e&&v("ngIf",i.modalVisible)},dependencies:[fi,Kt,_o,sr],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:[ov("overlayContentAnimation",[Nc(":enter",[av(dde)]),Nc(":leave",[av(hde)])])]},changeDetection:0}),n})();const fde=["element"],pde=["content"];function mde(n,t){1&n&&_t(0)}const $S=function(n,t){return{$implicit:n,options:t}};function gde(n,t){if(1&n&&(dt(0),M(1,mde,1,0,"ng-container",7),ht()),2&n){const e=D(2);C(1),v("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",bi(2,$S,e.loadedItems,e.getContentOptions()))}}function yde(n,t){1&n&&_t(0)}function _de(n,t){if(1&n&&(dt(0),M(1,yde,1,0,"ng-container",7),ht()),2&n){const e=t.$implicit,i=t.index,r=D(3);C(1),v("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",bi(2,$S,e,r.getOptions(i)))}}const vde=function(n){return{"p-scroller-loading":n}};function bde(n,t){if(1&n&&(I(0,"div",8,9),M(2,_de,2,5,"ng-container",10),A()),2&n){const e=D(2);v("ngClass",Mt(4,vde,e.d_loading))("ngStyle",e.contentStyle),C(2),v("ngForOf",e.loadedItems)("ngForTrackBy",e._trackBy||e.index)}}function wde(n,t){1&n&&_e(0,"div",11),2&n&&v("ngStyle",D(2).spacerStyle)}function Cde(n,t){1&n&&_t(0)}const Dde=function(n){return{numCols:n}},B5=function(n){return{options:n}};function Tde(n,t){if(1&n&&(dt(0),M(1,Cde,1,0,"ng-container",7),ht()),2&n){const e=t.index,i=D(4);C(1),v("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",Mt(4,B5,i.getLoaderOptions(e,i.both&&Mt(2,Dde,i._numItemsInViewport.cols))))}}function Mde(n,t){if(1&n&&(dt(0),M(1,Tde,2,6,"ng-container",14),ht()),2&n){const e=D(3);C(1),v("ngForOf",e.loaderArr)}}function Sde(n,t){1&n&&_t(0)}const Ede=function(){return{styleClass:"p-scroller-loading-icon"}};function xde(n,t){if(1&n&&(dt(0),M(1,Sde,1,0,"ng-container",7),ht()),2&n){const e=D(4);C(1),v("ngTemplateOutlet",e.loaderIconTemplate)("ngTemplateOutletContext",Mt(3,B5,Hr(2,Ede)))}}function Ide(n,t){1&n&&_e(0,"i",16)}function Ode(n,t){if(1&n&&(M(0,xde,2,5,"ng-container",0),M(1,Ide,1,0,"ng-template",null,15,Bn)),2&n){const e=Dn(2);v("ngIf",D(3).loaderIconTemplate)("ngIfElse",e)}}const Ade=function(n){return{"p-component-overlay":n}};function kde(n,t){if(1&n&&(I(0,"div",12),M(1,Mde,2,1,"ng-container",0),M(2,Ode,3,2,"ng-template",null,13,Bn),A()),2&n){const e=Dn(3),i=D(2);v("ngClass",Mt(3,Ade,!i.loaderTemplate)),C(1),v("ngIf",i.loaderTemplate)("ngIfElse",e)}}const Nde=function(n,t,e){return{"p-scroller":!0,"p-scroller-inline":n,"p-both-scroll":t,"p-horizontal-scroll":e}};function Pde(n,t){if(1&n){const e=We();dt(0),I(1,"div",2,3),ue("scroll",function(r){return de(e),he(D().onContainerScroll(r))}),M(3,gde,2,5,"ng-container",0),M(4,bde,3,6,"ng-template",null,4,Bn),M(6,wde,1,1,"div",5),M(7,kde,4,5,"div",6),A(),ht()}if(2&n){const e=Dn(5),i=D();C(1),pn(i._styleClass),v("ngStyle",i._style)("ngClass",al(10,Nde,i.inline,i.both,i.horizontal)),Ot("id",i._id)("tabindex",i.tabindex),C(2),v("ngIf",i.contentTemplate)("ngIfElse",e),C(3),v("ngIf",i._showSpacer),C(1),v("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function Lde(n,t){1&n&&_t(0)}const Rde=function(n,t){return{rows:n,columns:t}};function Fde(n,t){if(1&n&&(dt(0),M(1,Lde,1,0,"ng-container",7),ht()),2&n){const e=D(2);C(1),v("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",bi(5,$S,e.items,bi(2,Rde,e._items,e.loadedColumns)))}}function jde(n,t){if(1&n&&(Ri(0),M(1,Fde,2,8,"ng-container",17)),2&n){const e=D();C(1),v("ngIf",e.contentTemplate)}}const zde=["*"];let U5=(()=>{class n{constructor(e,i){this.cd=e,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(e){this._id=e}get style(){return this._style}set style(e){this._style=e}get styleClass(){return this._styleClass}set styleClass(e){this._styleClass=e}get tabindex(){return this._tabindex}set tabindex(e){this._tabindex=e}get items(){return this._items}set items(e){this._items=e}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e}get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e}get scrollWidth(){return this._scrollWidth}set scrollWidth(e){this._scrollWidth=e}get orientation(){return this._orientation}set orientation(e){this._orientation=e}get step(){return this._step}set step(e){this._step=e}get delay(){return this._delay}set delay(e){this._delay=e}get resizeDelay(){return this._resizeDelay}set resizeDelay(e){this._resizeDelay=e}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=e}get inline(){return this._inline}set inline(e){this._inline=e}get lazy(){return this._lazy}set lazy(e){this._lazy=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(e){this._loaderDisabled=e}get columns(){return this._columns}set columns(e){this._columns=e}get showSpacer(){return this._showSpacer}set showSpacer(e){this._showSpacer=e}get showLoader(){return this._showLoader}set showLoader(e){this._showLoader=e}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(e){this._numToleratedItems=e}get loading(){return this._loading}set loading(e){this._loading=e}get autoSize(){return this._autoSize}set autoSize(e){this._autoSize=e}get trackBy(){return this._trackBy}set trackBy(e){this._trackBy=e}get options(){return this._options}set options(e){this._options=e,e&&"object"==typeof e&&Object.entries(e).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(e=>this._columns?e:e.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(e){let i=!1;if(e.loading){const{previousValue:r,currentValue:o}=e.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,i=!0)}if(e.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),e.numToleratedItems){const{previousValue:r,currentValue:o}=e.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(e.options){const{previousValue:r,currentValue:o}=e.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&&(e.items?.previousValue?.length!==e.items?.currentValue?.length||e.itemSize||e.scrollHeight||e.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"item":default:this.itemTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"loadericon":this.loaderIconTemplate=e.template}})}ngAfterViewInit(){this.viewInit()}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1}viewInit(){Z.isVisible(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=Z.getWidth(this.elementViewChild.nativeElement),this.defaultHeight=Z.getHeight(this.elementViewChild.nativeElement),this.defaultContentWidth=Z.getWidth(this.contentEl),this.defaultContentHeight=Z.getHeight(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(e){this.contentEl=e||this.contentViewChild?.nativeElement||Z.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(e){this.lastScrollPos=this.both?{top:0,left:0}:0,this.elementViewChild?.nativeElement?.scrollTo(e)}scrollToIndex(e,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(e[0],r[0]),cols:s(e[1],r[1])},l(a(c.cols,this._itemSize[1],o.left),a(c.rows,this._itemSize[0],o.top))):(c=s(e,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(e,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>e[0]?a(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-o.cols>e[1]&&a((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-o>e){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<=e[0]+1?a(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-o.cols<=e[1]+1&&a((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-o<=e+1){const u=(s.first+1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else this.scrollToIndex(e,r)}getRenderedRange(){const e=(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:e(o,this._itemSize[0]),cols:e(s,this._itemSize[1])},r={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols}):(i=e(this.horizontal?s:o,this._itemSize),r=i+this.numItemsInViewport)}return{first:this.first,last:this.last,viewport:{first:i,last:r}}}calculateNumItems(){const e=this.getContentPosition(),i=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-e.left:0,r=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-e.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:e,numToleratedItems:i}=this.calculateNumItems(),r=(a,l,c,u=!1)=>this.getLast(a+l+(aArray.from({length:e.cols})):Array.from({length:e})),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[e,i]=[Z.getWidth(this.contentEl),Z.getHeight(this.contentEl)];e!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");const[r,o]=[Z.getWidth(this.elementViewChild.nativeElement),Z.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 e=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],e.y),i("width",this._columns||this._items[1],this._itemSize[1],e.x)):this.horizontal?i("width",this._columns||this._items,this._itemSize,e.x):i("height",this._items,this._itemSize,e.y)}}setContentPosition(e){if(this.contentEl&&!this._appendOnly){const i=e?e.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(e){const i=e.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,b,w,_,N)=>g<=_?_:N?b-w-_:y+_-1,l=(g,y,b,w,_,N,S)=>g<=N?0:Math.max(0,S?gy?b:g-2*N),c=(g,y,b,w,_,N=!1)=>{let S=y+w+2*_;return g>=_&&(S+=_+1),this.getLast(S,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 b={rows:s(u,this._itemSize[0]),cols:s(d,this._itemSize[1])},w={rows:a(b.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],g),cols:a(b.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],y)};h={rows:l(b.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],g),cols:l(b.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],y)},f={rows:c(b.rows,h.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(b.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 b=s(g,this._itemSize);h=l(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,y),this.first,0,0,this.d_numToleratedItems,y),f=c(b,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(e){const{first:i,last:r,isRangeChanged:o,scrollPos:s}=this.onScrollPositionChange(e);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(e){if(this.handleEvents("onScroll",{originalEvent:e}),this._delay&&this.isPageChanged){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:i}=this.onScrollPositionChange(e);(i||this._step&&this.isPageChanged)&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(e),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(e)}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(Z.isVisible(this.elementViewChild?.nativeElement)){const[e,i]=[Z.getWidth(this.elementViewChild.nativeElement),Z.getHeight(this.elementViewChild.nativeElement)],[r,o]=[e!==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=e,this.defaultHeight=i,this.defaultContentWidth=Z.getWidth(this.contentEl),this.defaultContentHeight=Z.getHeight(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(e,i){return this.options&&this.options[e]?this.options[e](i):this[e].emit(i)}getContentOptions(){return{contentStyleClass:"p-scroller-content "+(this.d_loading?"p-scroller-loading":""),items:this.loadedItems,getItemOptions:e=>this.getOptions(e),loading:this.d_loading,getLoaderOptions:(e,i)=>this.getLoaderOptions(e,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(e){const i=(this._items||[]).length,r=this.both?this.first.rows+e:this.first+e;return{index:r,count:i,first:0===r,last:r===i-1,even:r%2==0,odd:r%2!=0}}getLoaderOptions(e,i){const r=this.loaderArr.length;return{index:e,count:r,first:0===e,last:e===r-1,even:e%2==0,odd:e%2!=0,...i}}}return n.\u0275fac=function(e){return new(e||n)(O(Un),O(qt))},n.\u0275cmp=Me({type:n,selectors:[["p-scroller"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(fde,5),en(pde,5)),2&e){let r;Ke(r=Qe())&&(i.elementViewChild=r.first),Ke(r=Qe())&&(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:[$i],ngContentSelectors:zde,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(e,i){if(1&e&&(go(),M(0,Pde,8,14,"ng-container",0),M(1,jde,2,1,"ng-template",null,1,Bn)),2&e){const r=Dn(2);v("ngIf",!i._disabled)("ngIfElse",r)}},dependencies:[fi,Gr,Kt,_o,sr],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})(),H5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})();function Vde(n,t){if(1&n&&(I(0,"span"),ke(1),A()),2&n){const e=D();let i;C(1),At(null!==(i=e.label)&&void 0!==i?i:"empty")}}function Bde(n,t){1&n&&_t(0)}const gg=function(n){return{height:n}},Ude=function(n,t){return{"p-dropdown-item":!0,"p-highlight":n,"p-disabled":t}},WS=function(n){return{$implicit:n}},Hde=["container"],$de=["filter"],Wde=["in"],Gde=["editableInput"],Yde=["items"],qde=["scroller"],Kde=["overlay"];function Qde(n,t){if(1&n&&(dt(0),ke(1),ht()),2&n){const e=D(2);C(1),At(e.label||"empty")}}function Zde(n,t){1&n&&_t(0)}const Jde=function(n){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":n}};function Xde(n,t){if(1&n&&(I(0,"span",14),M(1,Qde,2,1,"ng-container",15),M(2,Zde,1,0,"ng-container",16),A()),2&n){const e=D();v("ngClass",Mt(9,Jde,null==e.label||0===e.label.length))("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),Ot("id",e.labelId),C(1),v("ngIf",!e.selectedItemTemplate),C(1),v("ngTemplateOutlet",e.selectedItemTemplate)("ngTemplateOutletContext",Mt(11,WS,e.selectedOption))}}const ehe=function(n){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":n}};function the(n,t){if(1&n&&(I(0,"span",17),ke(1),A()),2&n){const e=D();v("ngClass",Mt(2,ehe,null==e.placeholder||0===e.placeholder.length)),C(1),At(e.placeholder||"empty")}}function nhe(n,t){if(1&n){const e=We();I(0,"input",18,19),ue("input",function(r){return de(e),he(D().onEditableInputChange(r))})("focus",function(r){return de(e),he(D().onEditableInputFocus(r))})("blur",function(r){return de(e),he(D().onInputBlur(r))}),A()}if(2&n){const e=D();v("disabled",e.disabled),Ot("maxlength",e.maxlength)("placeholder",e.placeholder)("aria-expanded",e.overlayVisible)}}function ihe(n,t){if(1&n){const e=We();I(0,"i",20),ue("click",function(r){return de(e),he(D().clear(r))}),A()}}function rhe(n,t){1&n&&_t(0)}function ohe(n,t){1&n&&_t(0)}const $5=function(n){return{options:n}};function she(n,t){if(1&n&&(dt(0),M(1,ohe,1,0,"ng-container",16),ht()),2&n){const e=D(3);C(1),v("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",Mt(2,$5,e.filterOptions))}}function ahe(n,t){if(1&n){const e=We();I(0,"div",30)(1,"input",31,32),ue("keydown.enter",function(r){return r.preventDefault()})("keydown",function(r){return de(e),he(D(3).onKeydown(r,!1))})("input",function(r){return de(e),he(D(3).onFilterInputChange(r))}),A(),_e(3,"span",33),A()}if(2&n){const e=D(3);C(1),v("value",e.filterValue||""),Ot("placeholder",e.filterPlaceholder)("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.overlayVisible?"p-highlighted-option":e.labelId)}}function lhe(n,t){if(1&n&&(I(0,"div",27),ue("click",function(i){return i.stopPropagation()}),M(1,she,2,4,"ng-container",28),M(2,ahe,4,4,"ng-template",null,29,Bn),A()),2&n){const e=Dn(3),i=D(2);C(1),v("ngIf",i.filterTemplate)("ngIfElse",e)}}function che(n,t){1&n&&_t(0)}const W5=function(n,t){return{$implicit:n,options:t}};function uhe(n,t){if(1&n&&M(0,che,1,0,"ng-container",16),2&n){const e=t.$implicit,i=t.options;D(2),v("ngTemplateOutlet",Dn(7))("ngTemplateOutletContext",bi(2,W5,e,i))}}function dhe(n,t){1&n&&_t(0)}function hhe(n,t){if(1&n&&M(0,dhe,1,0,"ng-container",16),2&n){const e=t.options;v("ngTemplateOutlet",D(4).loaderTemplate)("ngTemplateOutletContext",Mt(2,$5,e))}}function fhe(n,t){1&n&&(dt(0),M(1,hhe,1,4,"ng-template",36),ht())}function phe(n,t){if(1&n){const e=We();I(0,"p-scroller",34,35),ue("onLazyLoad",function(r){return de(e),he(D(2).onLazyLoad.emit(r))}),M(2,uhe,1,5,"ng-template",13),M(3,fhe,2,0,"ng-container",15),A()}if(2&n){const e=D(2);oi(Mt(8,gg,e.scrollHeight)),v("items",e.optionsToDisplay)("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),C(3),v("ngIf",e.loaderTemplate)}}function mhe(n,t){1&n&&_t(0)}const ghe=function(){return{}};function yhe(n,t){if(1&n&&(dt(0),M(1,mhe,1,0,"ng-container",16),ht()),2&n){D();const e=Dn(7),i=D();C(1),v("ngTemplateOutlet",e)("ngTemplateOutletContext",bi(3,W5,i.optionsToDisplay,Hr(2,ghe)))}}function _he(n,t){if(1&n&&(I(0,"span"),ke(1),A()),2&n){const e=D().$implicit,i=D(4);C(1),At(i.getOptionGroupLabel(e)||"empty")}}function vhe(n,t){1&n&&_t(0)}function bhe(n,t){1&n&&_t(0)}const G5=function(n,t){return{$implicit:n,selectedOption:t}};function whe(n,t){if(1&n&&(I(0,"li",42),M(1,_he,2,1,"span",15),M(2,vhe,1,0,"ng-container",16),A(),M(3,bhe,1,0,"ng-container",16)),2&n){const e=t.$implicit,i=D(2).options,r=Dn(5),o=D(2);v("ngStyle",Mt(6,gg,i.itemSize+"px")),C(1),v("ngIf",!o.groupTemplate),C(1),v("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",Mt(8,WS,e)),C(1),v("ngTemplateOutlet",r)("ngTemplateOutletContext",bi(10,G5,o.getOptionGroupChildren(e),o.selectedOption))}}function Che(n,t){if(1&n&&(dt(0),M(1,whe,4,13,"ng-template",41),ht()),2&n){const e=D().$implicit;C(1),v("ngForOf",e)}}function Dhe(n,t){1&n&&_t(0)}function The(n,t){if(1&n&&(dt(0),M(1,Dhe,1,0,"ng-container",16),ht()),2&n){const e=D().$implicit,i=Dn(5),r=D(2);C(1),v("ngTemplateOutlet",i)("ngTemplateOutletContext",bi(2,G5,e,r.selectedOption))}}function Mhe(n,t){if(1&n){const e=We();I(0,"p-dropdownItem",43),ue("onClick",function(r){return de(e),he(D(4).onItemClick(r))}),A()}if(2&n){const e=t.$implicit,i=D().selectedOption,r=D(3);v("option",e)("selected",i==e)("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)}}function She(n,t){1&n&&M(0,Mhe,1,5,"ng-template",41),2&n&&v("ngForOf",t.$implicit)}function Ehe(n,t){if(1&n&&(dt(0),ke(1),ht()),2&n){const e=D(4);C(1),Yi(" ",e.emptyFilterMessageLabel," ")}}function xhe(n,t){1&n&&_t(0,null,45)}function Ihe(n,t){if(1&n&&(I(0,"li",44),M(1,Ehe,2,1,"ng-container",28),M(2,xhe,2,0,"ng-container",22),A()),2&n){const e=D().options,i=D(2);v("ngStyle",Mt(4,gg,e.itemSize+"px")),C(1),v("ngIf",!i.emptyFilterTemplate&&!i.emptyTemplate)("ngIfElse",i.emptyFilter),C(1),v("ngTemplateOutlet",i.emptyFilterTemplate||i.emptyTemplate)}}function Ohe(n,t){if(1&n&&(dt(0),ke(1),ht()),2&n){const e=D(4);C(1),Yi(" ",e.emptyMessageLabel," ")}}function Ahe(n,t){1&n&&_t(0,null,46)}function khe(n,t){if(1&n&&(I(0,"li",44),M(1,Ohe,2,1,"ng-container",28),M(2,Ahe,2,0,"ng-container",22),A()),2&n){const e=D().options,i=D(2);v("ngStyle",Mt(4,gg,e.itemSize+"px")),C(1),v("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),C(1),v("ngTemplateOutlet",i.emptyTemplate)}}function Nhe(n,t){if(1&n&&(I(0,"ul",37,38),M(2,Che,2,1,"ng-container",15),M(3,The,2,5,"ng-container",15),M(4,She,1,1,"ng-template",null,39,Bn),M(6,Ihe,3,6,"li",40),M(7,khe,3,6,"li",40),A()),2&n){const e=t.options,i=D(2);oi(e.contentStyle),v("ngClass",e.contentStyleClass),Ot("id",i.listId),C(2),v("ngIf",i.group),C(1),v("ngIf",!i.group),C(3),v("ngIf",i.filterValue&&i.isEmpty()),C(1),v("ngIf",!i.filterValue&&i.isEmpty())}}function Phe(n,t){1&n&&_t(0)}function Lhe(n,t){if(1&n&&(I(0,"div",21),M(1,rhe,1,0,"ng-container",22),M(2,lhe,4,2,"div",23),I(3,"div",24),M(4,phe,4,10,"p-scroller",25),M(5,yhe,2,6,"ng-container",15),M(6,Nhe,8,8,"ng-template",null,26,Bn),A(),M(8,Phe,1,0,"ng-container",22),A()),2&n){const e=D();pn(e.panelStyleClass),v("ngClass","p-dropdown-panel p-component")("ngStyle",e.panelStyle),C(1),v("ngTemplateOutlet",e.headerTemplate),C(1),v("ngIf",e.filter),C(1),Dc("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),C(1),v("ngIf",e.virtualScroll),C(1),v("ngIf",!e.virtualScroll),C(3),v("ngTemplateOutlet",e.footerTemplate)}}const Rhe=function(n,t,e,i){return{"p-dropdown p-component":!0,"p-disabled":n,"p-dropdown-open":t,"p-focus":e,"p-dropdown-clearable":i}},Fhe={provide:Sr,useExisting:Ut(()=>GS),multi:!0};let jhe=(()=>{class n{constructor(){this.onClick=new re}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({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(e,i){1&e&&(I(0,"li",0),ue("click",function(o){return i.onOptionClick(o)}),M(1,Vde,2,1,"span",1),M(2,Bde,1,0,"ng-container",2),A()),2&e&&(v("ngStyle",Mt(8,gg,i.itemSize+"px"))("id",i.selected?"p-highlighted-option":"")("ngClass",bi(10,Ude,i.selected,i.disabled)),Ot("aria-label",i.label)("aria-selected",i.selected),C(1),v("ngIf",!i.template),C(1),v("ngTemplateOutlet",i.template)("ngTemplateOutletContext",Mt(13,WS,i.option)))},dependencies:[fi,Kt,_o,sr,zc],encapsulation:2}),n})(),GS=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,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=AL()}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"loader":this.loaderTemplate=e.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list",this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}get options(){return this._options}set options(e){this._options=e,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.selectedOption=this.findOption(this.value,this.optionsToDisplay),!this.selectedOption&&Lt.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(e){this._filterValue=e,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(jc.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(jc.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(e){return this.optionLabel?Lt.resolveFieldData(e,this.optionLabel):e&&void 0!==e.label?e.label:e}getOptionValue(e){return this.optionValue?Lt.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&void 0!==e.value?e.value:e}isOptionDisabled(e){return this.optionDisabled?Lt.resolveFieldData(e,this.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled}getOptionGroupLabel(e){return this.optionGroupLabel?Lt.resolveFieldData(e,this.optionGroupLabel):e&&void 0!==e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Lt.resolveFieldData(e,this.optionGroupChildren):e.items}onItemClick(e){const i=e.option;this.isOptionDisabled(i)||(this.selectItem(e.originalEvent,i),this.accessibleViewChild.nativeElement.focus({preventScroll:!0})),setTimeout(()=>{this.hide()},1)}selectItem(e,i){this.selectedOption!=i&&(this.selectedOption=i,this.value=this.getOptionValue(i),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:e,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 e=Z.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,"li.p-highlight");e&&Z.scrollInView(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}writeValue(e){this.filter&&this.resetFilter(),this.value=e,this.updateSelectedOption(e),this.updateEditableLabel(),this.cd.markForCheck()}resetFilter(){this._filterValue=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this.optionsToDisplay=this.options}updateSelectedOption(e){this.selectedOption=this.findOption(e,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(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onMouseclick(e){this.disabled||this.readonly||this.isInputClick(e)||(this.onClick.emit(e),this.accessibleViewChild.nativeElement.focus({preventScroll:!0}),this.overlayVisible?this.hide():this.show(),this.cd.detectChanges())}isInputClick(e){return Z.hasClass(e.target,"p-dropdown-clear-icon")||e.target.isSameNode(this.accessibleViewChild.nativeElement)||this.editableInputViewChild&&e.target.isSameNode(this.editableInputViewChild.nativeElement)}isEmpty(){return!this.optionsToDisplay||this.optionsToDisplay&&0===this.optionsToDisplay.length}onEditableInputFocus(e){this.focused=!0,this.hide(),this.onFocus.emit(e)}onEditableInputChange(e){this.value=e.target.value,this.updateSelectedOption(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value})}show(){this.overlayVisible=!0,this.cd.markForCheck()}onOverlayAnimationStart(e){if("visible"===e.toState){if(this.itemsWrapper=Z.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=Z.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(e)}"void"===e.toState&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e-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>=e;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}}return i}findNextEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e+1;r0&&this.selectItem(e,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(e,o),this.selectedOptionUpdated=!0)}e.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(e,this.getOptionGroupChildren(this.optionsToDisplay[r.groupIndex])[o]),this.selectedOptionUpdated=!0;else if(o<0){let s=this.optionsToDisplay[r.groupIndex-1];s&&(this.selectItem(e,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(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:i&&(this.overlayVisible?this.hide():this.show(),e.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),e.preventDefault();break;case 27:case 9:this.hide();break;default:i&&!e.metaKey&&17!==e.which&&this.search(e)}}search(e){this.searchTimeout&&clearTimeout(this.searchTimeout);const i=e.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(e,r),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(e){let i;return this.searchValue&&(i=this.searchOptionInRange(e,this.optionsToDisplay.length),i||(i=this.searchOptionInRange(0,e))),i}searchOptionInRange(e,i){for(let r=e;r{this.getSitesList(o.filter)}):console.warn("ContainerOptionsDirective is for use with PrimeNg Dropdown")}ngOnInit(){this.getSitesList(),this.dotEvents.forEach(t=>{this.dotEventsService.listen(t).pipe(mn(this.destroy$)).subscribe(()=>this.getSitesList())})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}setOptions(t){this.primeDropdown.options=[...t],this.cd.detectChanges()}getSitesList(t=""){this.dotSiteService.getSites(t,this.pageSize).pipe(Et(1)).subscribe(e=>this.setOptions(e))}}h0.\u0275fac=function(t){return new(t||h0)(O(GS,10),O(_h),O(vh),O(Un))},h0.\u0275dir=we({type:h0,selectors:[["","dotSiteSelector",""]],inputs:{archive:"archive",live:"live",system:"system",pageSize:"pageSize"},standalone:!0,features:[Pt([Qi])]});class yg{constructor(t){this.el=t}ngOnInit(){this.el.nativeElement.disabled||setTimeout(()=>{this.el.nativeElement.focus()},100)}}yg.\u0275fac=function(t){return new(t||yg)(O(Tt))},yg.\u0275dir=we({type:yg,selectors:[["","dotAutofocus",""]],standalone:!0});class f0{constructor(t,e){this.ngControl=t,this.el=e}onBlur(){this.ngControl.control.setValue(this.ngControl.value.trim())}ngAfterViewInit(){"input"!==this.el.nativeElement.tagName.toLowerCase()&&console.warn("DotTrimInputDirective is for use with Inputs")}}f0.\u0275fac=function(t){return new(t||f0)(O(Fs,10),O(Tt))},f0.\u0275dir=we({type:f0,selectors:[["","dotTrimInput",""]],hostBindings:function(t,e){1&t&&ue("blur",function(){return e.onBlur()})},standalone:!0});class p0{constructor(t,e,i,r){this.primeDropdown=t,this.dotContainersService=e,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(t=>{this.control.options=this.control.options||t}),this.control.onFilter.pipe(mn(this.destroy$),Xd(500),ai(t=>this.fetchContainerOptions(t.filter))).subscribe(t=>this.setOptions(t))}fetchContainerOptions(t=""){return this.dotContainersService.getFiltered(t,this.maxOptions,!0).pipe(fe(e=>{const i=e.map(r=>({label:r.title,value:r,inactive:!1})).sort((r,o)=>r.label.localeCompare(o.label));return this.getOptionsGroupedByHost(i)}),Fi(()=>this.handleContainersLoadError()))}handleContainersLoadError(){return this.control.disabled=!0,Le([])}setOptions(t){this.control.options=[...t],this.changeDetectorRef.detectChanges()}getOptionsGroupedByHost(t){const e=this.getContainerGroupedByHost(t);return Object.keys(e).map(i=>({label:i,items:e[i].items}))}getContainerGroupedByHost(t){return t.reduce((e,i)=>{const{hostname:r}=i.value.parentPermissionable;return e[r]||(e[r]={items:[]}),e[r].items.push(i),e},{})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}function $a(n){return($a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function Gn(n,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Bhe(n){return Gn(1,arguments),n instanceof Date||"object"===$a(n)&&"[object Date]"===Object.prototype.toString.call(n)}function ei(n){Gn(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||"object"===$a(n)&&"[object Date]"===t?new Date(n.getTime()):"number"==typeof n||"[object Number]"===t?new Date(n):(("string"==typeof n||"[object String]"===t)&&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 Y5(n){if(Gn(1,arguments),!Bhe(n)&&"number"!=typeof n)return!1;var t=ei(n);return!isNaN(Number(t))}function q5(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e=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(){e=e.call(n)},n:function(){var c=e.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&null!=e.return&&e.return()}finally{if(s)throw a}}}}p0.\u0275fac=function(t){return new(t||p0)(O(GS,10),O(yh),O(Zr),O(Un))},p0.\u0275dir=we({type:p0,selectors:[["p-dropdown","dotContainerOptions",""]],standalone:!0});const YS=x(61348).default;function no(n){if(null===n||!0===n||!1===n)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function $he(n,t){Gn(2,arguments);var e=ei(n).getTime(),i=no(t);return new Date(e+i)}function Q5(n,t){Gn(2,arguments);var e=no(t);return $he(n,-e)}function qS(n,t){if(null==n)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}var Z5=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},J5=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}};const KS={p:J5,P:function(t,e){var s,i=t.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return Z5(t,e);switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"})}return s.replace("{{date}}",Z5(r,e)).replace("{{time}}",J5(o,e))}};function Gh(n){var t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),n.getTime()-t.getTime()}var Yhe=["D","DD"],qhe=["YY","YYYY"];function X5(n){return-1!==Yhe.indexOf(n)}function ez(n){return-1!==qhe.indexOf(n)}function m0(n,t,e){if("YYYY"===n)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; 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(t,"`) for formatting years to the input `").concat(e,"`; 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(t,"`) for formatting days of the month to the input `").concat(e,"`; 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(t,"`) for formatting days of the month to the input `").concat(e,"`; 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 QS(n,t){return(QS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i})(n,t)}function sn(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&QS(n,t)}function g0(n){return(g0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(n)}function Qhe(n,t){if(t&&("object"===$a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Fe(n)}function an(n){var t=function Khe(){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=g0(n);if(t){var o=g0(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Qhe(this,r)}}function Qt(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function tz(n){var t=function Zhe(n,t){if("object"!==$a(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var i=e.call(n,t||"default");if("object"!==$a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(n)}(n,"string");return"symbol"===$a(t)?t:String(t)}function nz(n,t){for(var e=0;e0,i=e?t:1-t;if(i<=50)r=n||100;else{var o=i+50;r=n+100*Math.floor(o/100)-(n>=o%100?100:0)}return e?r:1-r}function az(n){return n%400==0||n%4==0&&n%100!=0}var ufe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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=sz(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}}]),e}(gn),lz={};function Mu(){return lz}function Su(n,t){var e,i,r,o,s,a,l,c;Gn(1,arguments);var u=Mu(),d=no(null!==(e=null!==(i=null!==(r=null!==(o=t?.weekStartsOn)&&void 0!==o?o:null==t||null===(s=t.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!==e?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=ei(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=Su(p,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var y=Su(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}var dfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s0}},{key:"set",value:function(r,o,s,a){var l=JS(r,a);if(s.isTwoDigitYear){var c=sz(s.year,l);return r.setUTCFullYear(c,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Su(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),Su(r,a)}}]),e}(gn);function Yh(n){Gn(1,arguments);var t=1,e=ei(n),i=e.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}}]),e}(gn),mfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),gfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),yfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn);function _fe(n,t){var e,i,r,o,s,a,l,c;Gn(1,arguments);var u=Mu(),d=no(null!==(e=null!==(i=null!==(r=null!==(o=t?.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(s=t.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!==e?e:1),h=JS(n,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=Su(f,t);return p}function cz(n,t){Gn(1,arguments);var e=ei(n),i=Su(e,t).getTime()-_fe(e,t).getTime();return Math.round(i/6048e5)+1}var wfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=53}},{key:"set",value:function(r,o,s,a){return Su(function bfe(n,t,e){Gn(2,arguments);var i=ei(n),r=no(t),o=cz(i,e)-r;return i.setUTCDate(i.getUTCDate()-7*o),i}(r,s,a),a)}}]),e}(gn);function uz(n){Gn(1,arguments);var t=ei(n),e=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(e+1,0,4),i.setUTCHours(0,0,0,0);var r=Yh(i),o=new Date(0);o.setUTCFullYear(e,0,4),o.setUTCHours(0,0,0,0);var s=Yh(o);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function Cfe(n){Gn(1,arguments);var t=uz(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var i=Yh(e);return i}function dz(n){Gn(1,arguments);var t=ei(n),e=Yh(t).getTime()-Cfe(t).getTime();return Math.round(e/6048e5)+1}var Mfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=53}},{key:"set",value:function(r,o,s){return Yh(function Tfe(n,t){Gn(2,arguments);var e=ei(n),i=no(t),r=dz(e)-i;return e.setUTCDate(e.getUTCDate()-7*r),e}(r,s))}}]),e}(gn),Sfe=[31,28,31,30,31,30,31,31,30,31,30,31],Efe=[31,29,31,30,31,30,31,31,30,31,30,31],xfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=Efe[l]:o>=1&&o<=Sfe[l]}},{key:"set",value:function(r,o,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),e}(gn),Ife=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn);function XS(n,t,e){var i,r,o,s,a,l,c,u;Gn(2,arguments);var d=Mu(),h=no(null!==(i=null!==(r=null!==(o=null!==(s=e?.weekStartsOn)&&void 0!==s?s:null==e||null===(a=e.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=ei(n),p=no(t),m=f.getUTCDay(),g=p%7,y=(g+7)%7,b=(y=0&&o<=6}},{key:"set",value:function(r,o,s,a){return(r=XS(r,s,a)).setUTCHours(0,0,0,0),r}}]),e}(gn),Afe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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=XS(r,s,a)).setUTCHours(0,0,0,0),r}}]),e}(gn),kfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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=XS(r,s,a)).setUTCHours(0,0,0,0),r}}]),e}(gn),Pfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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 Nfe(n,t){Gn(2,arguments);var e=no(t);e%7==0&&(e-=7);var i=1,r=ei(n),o=r.getUTCDay(),s=e%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}}]),e}(gn),zfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),Vfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),Bfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),Ufe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),Hfe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),$fe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s0?i:1-i;return Sn("yy"===e?r%100:r,e.length)},Gl_M=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Sn(i+1,2)},Gl_d=function(t,e){return Sn(t.getUTCDate(),e.length)},Gl_h=function(t,e){return Sn(t.getUTCHours()%12||12,e.length)},Gl_H=function(t,e){return Sn(t.getUTCHours(),e.length)},Gl_m=function(t,e){return Sn(t.getUTCMinutes(),e.length)},Gl_s=function(t,e){return Sn(t.getUTCSeconds(),e.length)},Gl_S=function(t,e){var i=e.length,r=t.getUTCMilliseconds();return Sn(Math.floor(r*Math.pow(10,i-3)),e.length)};var cpe={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){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(t,e,i){if("yo"===e){var r=t.getUTCFullYear();return i.ordinalNumber(r>0?r:1-r,{unit:"year"})}return Gl_y(t,e)},Y:function(t,e,i,r){var o=JS(t,r),s=o>0?o:1-o;return"YY"===e?Sn(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Sn(s,e.length)},R:function(t,e){return Sn(uz(t),e.length)},u:function(t,e){return Sn(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Sn(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(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Sn(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(t,e,i){var r=t.getUTCMonth();switch(e){case"M":case"MM":return Gl_M(t,e);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(t,e,i){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Sn(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(t,e,i,r){var o=cz(t,r);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):Sn(o,e.length)},I:function(t,e,i){var r=dz(t);return"Io"===e?i.ordinalNumber(r,{unit:"week"}):Sn(r,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Gl_d(t,e)},D:function(t,e,i){var r=function ape(n){Gn(1,arguments);var t=ei(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=e-i;return Math.floor(r/864e5)+1}(t);return"Do"===e?i.ordinalNumber(r,{unit:"dayOfYear"}):Sn(r,e.length)},E:function(t,e,i){var r=t.getUTCDay();switch(e){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(t,e,i,r){var o=t.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Sn(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(t,e,i,r){var o=t.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Sn(s,e.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(t,e,i){var r=t.getUTCDay(),o=0===r?7:r;switch(e){case"i":return String(o);case"ii":return Sn(o,e.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(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){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(t,e,i){var o,r=t.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){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(t,e,i){var o,r=t.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){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(t,e,i){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return Gl_h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Gl_H(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(r,{unit:"hour"}):Sn(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?i.ordinalNumber(r,{unit:"hour"}):Sn(r,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Gl_m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Gl_s(t,e)},S:function(t,e){return Gl_S(t,e)},X:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return pz(s);case"XXXX":case"XX":return Eu(s);default:return Eu(s,":")}},x:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return pz(s);case"xxxx":case"xx":return Eu(s);default:return Eu(s,":")}},O:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+fz(s,":");default:return"GMT"+Eu(s,":")}},z:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+fz(s,":");default:return"GMT"+Eu(s,":")}},t:function(t,e,i,r){return Sn(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,r){return Sn((r._originalDate||t).getTime(),e.length)}};function fz(n,t){var e=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),o=i%60;if(0===o)return e+String(r);var s=t||"";return e+String(r)+s+Sn(o,2)}function pz(n,t){return n%60==0?(n>0?"-":"+")+Sn(Math.abs(n)/60,2):Eu(n,t)}function Eu(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n);return i+Sn(Math.floor(r/60),2)+e+Sn(r%60,2)}const upe=cpe;var dpe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hpe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fpe=/^'([^]*?)'?$/,ppe=/''/g,mpe=/[a-zA-Z]/;function ype(n){var t=n.match(fpe);return t?t[1].replace(ppe,"'"):n}function _pe(n,t){Gn(2,arguments);var e=ei(n),i=ei(t),r=e.getTime()-i.getTime();return r<0?-1:r>0?1:r}function vpe(n){return qS({},n)}var mz=6e4,gz=43200,yz=525600,_z=x(30298);class Kh{constructor(t){t.getSystemTimeZone().subscribe(e=>this._systemTimeZone=e)}get localeOptions(){return this._localeOptions}set localeOptions(t){this._localeOptions=t}setLang(t){var e=this;return Xc(function*(){let o,[i,r]=t.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))}}e.localeOptions={locale:o.default}})()}differenceInCalendarDays(t,e){return function ope(n,t){Gn(2,arguments);var e=hz(n),i=hz(t),r=e.getTime()-Gh(e),o=i.getTime()-Gh(i);return Math.round((r-o)/864e5)}(t,e)}isValid(t,e){return function wpe(n,t){return Y5(function npe(n,t,e,i){var r,o,s,a,l,c,u,d,h,f,p,m,g,y,b,w,_,N;Gn(3,arguments);var S=String(n),ie=String(t),K=Mu(),Ne=null!==(r=null!==(o=i?.locale)&&void 0!==o?o:K.locale)&&void 0!==r?r:YS;if(!Ne.match)throw new RangeError("locale must contain match property");var He=no(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 vt=no(null!==(p=null!==(m=null!==(g=null!==(y=i?.weekStartsOn)&&void 0!==y?y:null==i||null===(b=i.locale)||void 0===b||null===(w=b.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(!(vt>=0&&vt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===ie)return""===S?ei(e):new Date(NaN);var me,at={firstWeekContainsDate:He,weekStartsOn:vt,locale:Ne},ot=[new efe],yn=ie.match(Zfe).map(function(Gt){var ft=Gt[0];return ft in KS?(0,KS[ft])(Gt,Ne.formatLong):Gt}).join("").match(Qfe),xt=[],le=K5(yn);try{var be=function(){var ft=me.value;!(null!=i&&i.useAdditionalWeekYearTokens)&&ez(ft)&&m0(ft,ie,n),(null==i||!i.useAdditionalDayOfYearTokens)&&X5(ft)&&m0(ft,ie,n);var zn=ft[0],Pr=Kfe[zn];if(Pr){var zu=Pr.incompatibleTokens;if(Array.isArray(zu)){var ec=xt.find(function(Vu){return zu.includes(Vu.token)||Vu.token===zn});if(ec)throw new RangeError("The format string mustn't contain `".concat(ec.fullToken,"` and `").concat(ft,"` at the same time"))}else if("*"===Pr.incompatibleTokens&&xt.length>0)throw new RangeError("The format string mustn't contain `".concat(ft,"` and any other token at the same time"));xt.push({token:zn,fullToken:ft});var tc=Pr.run(S,ft,Ne.match,at);if(!tc)return{v:new Date(NaN)};ot.push(tc.setter),S=tc.rest}else{if(zn.match(tpe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+zn+"`");if("''"===ft?ft="'":"'"===zn&&(ft=ipe(ft)),0!==S.indexOf(ft))return{v:new Date(NaN)};S=S.slice(ft.length)}};for(le.s();!(me=le.n()).done;){var Ue=be();if("object"===$a(Ue))return Ue.v}}catch(Gt){le.e(Gt)}finally{le.f()}if(S.length>0&&epe.test(S))return new Date(NaN);var kt=ot.map(function(Gt){return Gt.priority}).sort(function(Gt,ft){return ft-Gt}).filter(function(Gt,ft,zn){return zn.indexOf(Gt)===ft}).map(function(Gt){return ot.filter(function(ft){return ft.priority===Gt}).sort(function(ft,zn){return zn.subPriority-ft.subPriority})}).map(function(Gt){return Gt[0]}),cn=ei(e);if(isNaN(cn.getTime()))return new Date(NaN);var Xi,Vt=Q5(cn,Gh(cn)),xn={},Ft=K5(kt);try{for(Ft.s();!(Xi=Ft.n()).done;){var oo=Xi.value;if(!oo.validate(Vt,at))return new Date(NaN);var In=oo.set(Vt,xn,at);Array.isArray(In)?(Vt=In[0],qS(xn,In[1])):Vt=In}}catch(Gt){Ft.e(Gt)}finally{Ft.f()}return Vt}(n,t,new Date))}(t,e)}format(t,e){return function gpe(n,t,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,y,b,w,_;Gn(2,arguments);var N=String(t),S=Mu(),ie=null!==(i=null!==(r=e?.locale)&&void 0!==r?r:S.locale)&&void 0!==i?i:YS,K=no(null!==(o=null!==(s=null!==(a=null!==(l=e?.firstWeekContainsDate)&&void 0!==l?l:null==e||null===(c=e.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:S.firstWeekContainsDate)&&void 0!==s?s:null===(d=S.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=no(null!==(f=null!==(p=null!==(m=null!==(g=e?.weekStartsOn)&&void 0!==g?g:null==e||null===(y=e.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==m?m:S.weekStartsOn)&&void 0!==p?p:null===(w=S.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(!ie.localize)throw new RangeError("locale must contain localize property");if(!ie.formatLong)throw new RangeError("locale must contain formatLong property");var He=ei(n);if(!Y5(He))throw new RangeError("Invalid time value");var vt=Gh(He),at=Q5(He,vt),ot={firstWeekContainsDate:K,weekStartsOn:Ne,locale:ie,_originalDate:He},yn=N.match(hpe).map(function(xt){var le=xt[0];return"p"===le||"P"===le?(0,KS[le])(xt,ie.formatLong):xt}).join("").match(dpe).map(function(xt){if("''"===xt)return"'";var le=xt[0];if("'"===le)return ype(xt);var me=upe[le];if(me)return!(null!=e&&e.useAdditionalWeekYearTokens)&&ez(xt)&&m0(xt,t,String(n)),!(null!=e&&e.useAdditionalDayOfYearTokens)&&X5(xt)&&m0(xt,t,String(n)),me(at,xt,ie.localize,ot);if(le.match(mpe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+le+"`");return xt}).join("");return yn}(t,e,{...this.localeOptions})}formatTZ(t,e){const i=(0,_z.utcToZonedTime)(t,this._systemTimeZone.id);return(0,_z.format)(i,e,{timeZone:this._systemTimeZone.id})}getRelative(t,e=this.getUTC()){return function bpe(n,t,e){var i,r,o;Gn(2,arguments);var s=Mu(),a=null!==(i=null!==(r=e?.locale)&&void 0!==r?r:s.locale)&&void 0!==i?i:YS;if(!a.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var l=_pe(n,t);if(isNaN(l))throw new RangeError("Invalid time value");var u,d,c=qS(vpe(e),{addSuffix:Boolean(e?.addSuffix),comparison:l});l>0?(u=ei(t),d=ei(n)):(u=ei(n),d=ei(t));var f,h=String(null!==(o=e?.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/mz,g=Gh(d)-Gh(u),y=(p-g)/mz,b=e?.unit;if("second"===(w=b?String(b):m<1?"second":m<60?"minute":m<1440?"hour":yi?this.dotFormatDateService.format(s,e):this.dotFormatDateService.getRelative(s)}}v0.\u0275fac=function(t){return new(t||v0)(O(Kh,16))},v0.\u0275pipe=qn({name:"dotRelativeDate",type:v0,pure:!0,standalone:!0});class b0{transform(t,e){return e.forEach((i,r)=>{t=t.replace(`{${r}}`,i)}),t}}function Cpe(n,t){if(1&n){const e=We();I(0,"div",3)(1,"div",4),_e(2,"video",5),A(),I(3,"div",6)(4,"div"),_e(5,"dot-spinner",7),ke(6," Uploading video, wait until finished. "),A(),I(7,"button",8),ue("click",function(){return de(e),he(D().cancel.emit(!0))}),A()()()}}function Dpe(n,t){1&n&&(I(0,"span",9),ke(1,"Uploading..."),A())}b0.\u0275fac=function(t){return new(t||b0)},b0.\u0275pipe=qn({name:"dotStringFormat",type:b0,pure:!0,standalone:!0});class Qh{constructor(){this.cancel=new re}}Qh.\u0275fac=function(t){return new(t||Qh)},Qh.\u0275cmp=Me({type:Qh,selectors:[["dot-upload-placeholder"]],inputs:{type:"type"},outputs:{cancel:"cancel"},standalone:!0,features:[Ns],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(t,e){1&t&&(dt(0,0),M(1,Cpe,8,0,"div",1),M(2,Dpe,2,0,"span",2),ht()),2&t&&(v("ngSwitch",e.type),C(1),v("ngSwitchCase","video"))},dependencies:[wn,Vd,I_,O_,Bo,Vo,Cu,Wh],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 eE=new Wt({state:{init:()=>Fn.empty,apply(n,t){t=t.map(n.mapping,n.doc);const e=n.getMeta(this);if(e&&e.add){const r=ki.widget(e.add.pos,e.add.element,{key:e.add.id});t=t.add(n.doc,[r])}else e&&e.remove&&(t=t.remove(t.find(null,null,i=>i.key==e.remove.id)));return t}},props:{decorations(n){return this.getState(n)}}});class Tpe{constructor(t,e,i){this.applicationRef=e.get(Mc),this.componentRef=function k$(n,t){const e=vn(n),i=t.elementInjector||$y();return new Yf(e).create(i,t.projectableNodes,t.hostElement,t.environmentInjector)}(t,{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(Tt)}get dom(){return this.elementRef.nativeElement}updateProps(t){Object.entries(t).forEach(([e,i])=>{this.instance[e]=i})}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy(),this.applicationRef.detachView(this.componentRef.hostView)}}class _g{}_g.\u0275fac=function(t){return new(t||_g)},_g.\u0275cmp=Me({type:_g,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(t,e){},encapsulation:2});class Mpe extends xce{mount(){this.renderer=new Tpe(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 t=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&t&&!t.contains(this.contentDOMElement)&&t.appendChild(this.contentDOMElement)}update(t,e){return this.options.update?this.options.update(t,e):t.type===this.node.type&&(t===this.node&&this.decorations===e||(this.node=t,this.decorations=e,this.renderer.updateProps({node:t,decorations:e}),this.maybeMoveContentDOM()),!0)}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy()}}function Epe(n,t){1&n&&_t(0)}function xpe(n,t){if(1&n&&(I(0,"div",8),Ri(1,1),M(2,Epe,1,0,"ng-container",6),A()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.headerTemplate)}}function Ipe(n,t){1&n&&_t(0)}function Ope(n,t){if(1&n&&(I(0,"div",9),ke(1),M(2,Ipe,1,0,"ng-container",6),A()),2&n){const e=D();C(1),Yi(" ",e.header," "),C(1),v("ngTemplateOutlet",e.titleTemplate)}}function Ape(n,t){1&n&&_t(0)}function kpe(n,t){if(1&n&&(I(0,"div",10),ke(1),M(2,Ape,1,0,"ng-container",6),A()),2&n){const e=D();C(1),Yi(" ",e.subheader," "),C(1),v("ngTemplateOutlet",e.subtitleTemplate)}}function Npe(n,t){1&n&&_t(0)}function Ppe(n,t){1&n&&_t(0)}function Lpe(n,t){if(1&n&&(I(0,"div",11),Ri(1,2),M(2,Ppe,1,0,"ng-container",6),A()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.footerTemplate)}}const Rpe=["*",[["p-header"]],[["p-footer"]]],Fpe=["*","p-header","p-footer"];let tE=(()=>{class n{constructor(e){this.el=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"title":this.titleTemplate=e.template;break;case"subtitle":this.subtitleTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275cmp=Me({type:n,selectors:[["p-card"]],contentQueries:function(e,i,r){if(1&e&&(Jn(r,dM,5),Jn(r,hM,5),Jn(r,qi,4)),2&e){let o;Ke(o=Qe())&&(i.headerFacet=o.first),Ke(o=Qe())&&(i.footerFacet=o.first),Ke(o=Qe())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:Fpe,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(e,i){1&e&&(go(Rpe),I(0,"div",0),M(1,xpe,3,1,"div",1),I(2,"div",2),M(3,Ope,3,2,"div",3),M(4,kpe,3,2,"div",4),I(5,"div",5),Ri(6),M(7,Npe,1,0,"ng-container",6),A(),M(8,Lpe,3,1,"div",7),A()()),2&e&&(pn(i.styleClass),v("ngClass","p-card p-component")("ngStyle",i.style),C(1),v("ngIf",i.headerFacet||i.headerTemplate),C(2),v("ngIf",i.header||i.titleTemplate),C(1),v("ngIf",i.subheader||i.subtitleTemplate),C(3),v("ngTemplateOutlet",i.contentTemplate),C(1),v("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[fi,Kt,_o,sr],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),vz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,zo]}),n})();function jpe(n,t){if(1&n&&_e(0,"dot-contentlet-thumbnail",4),2&n){const e=D();v("width",94)("height",94)("iconSize","72px")("contentlet",e.data)}}function zpe(n,t){if(1&n&&(I(0,"h3",5),ke(1),A()),2&n){const e=D();C(1),At(e.data.title)}}function Vpe(n,t){if(1&n&&(I(0,"span"),ke(1),A()),2&n){const e=D();C(1),At(e.data.contentType)}}function Bpe(n,t){if(1&n&&(I(0,"div",6),_e(1,"dot-state-icon",7),Qn(2,"contentletState"),I(3,"dot-badge",8),ke(4),Qn(5,"lowercase"),A()()),2&n){const e=D();C(1),v("state",Zn(2,3,e.data)),C(2),v("bordered",!0),C(1),At(Zn(5,5,e.data.language))}}class Zh extends _g{ngOnInit(){this.data=this.node.attrs.data}}Zh.\u0275fac=function(){let n;return function(e){return(n||(n=Li(Zh)))(e||Zh)}}(),Zh.\u0275cmp=Me({type:Zh,selectors:[["dot-contentlet-block"]],features:[bn],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(t,e){1&t&&(I(0,"p-card"),M(1,jpe,1,4,"ng-template",0),M(2,zpe,2,1,"h3",1),M(3,Vpe,2,1,"span",2),M(4,Bpe,6,7,"ng-template",3),A()),2&t&&(C(2),v("pTemplate","title"),C(1),v("pTemplate","subtitle"))},dependencies:[tE,qi,JD,ug],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 Upe=n=>jn.create({name:"dotContent",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:t=>({data:t.getAttribute("data")}),renderHTML:t=>({data:t.data})}}),parseHTML:()=>[{tag:"dotcms-contentlet-block"}],renderHTML({HTMLAttributes:t}){let e=["span",{}];return t.data.hasTitleImage&&(e=["img",{src:t.data.image}]),["div",["h3",{class:t.data.title},t.data.title],["div",t.data.identifier],e,["div",{},t.data.language]]},addNodeView:()=>((n,t)=>e=>new Mpe(n,e,t))(Zh,{injector:n})}),Hpe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,$pe=jn.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",tn(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:t})=>t.insertContent({type:this.name,attrs:n})}},addInputRules(){return[x5({find:Hpe,type:this.type,getAttributes:n=>{const[,,t,e,i]=n;return{src:e,alt:t,title:i}}})]}}),bz="language_id",Wpe=(n,t)=>{const{href:e=null,target:i}=t;return["a",{href:e,target:i},wz(n,t)]},wz=(n,t)=>["img",tn(n,t)],Cz=(n,t)=>n.includes(bz)?n:`${n}?${bz}=${t}`,Gpe=n=>{if("string"==typeof n)return{src:n,data:"null"};const{fileAsset:t,asset:e,title:i,languageId:r}=n;return{data:n,src:Cz(t||e,r),title:i,alt:i}},io=$pe.extend({name:"dotImage",addOptions:()=>({inline:!1,allowBase64:!0,HTMLAttributes:{}}),addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:Cz(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:t})=>t.updateAttributes(this.name,n),unsetImageLink:()=>({commands:n})=>n.updateAttributes(this.name,{href:""}),insertImage:(n,t)=>({chain:e,state:i})=>{const{selection:r}=i,{head:o}=r,s={attrs:Gpe(n),type:io.name};return e().insertContentAt(t??o,s).run()}}},renderHTML({HTMLAttributes:n}){const{href:t=null,style:e}=n||{};return["div",{class:"image-container",style:e},t?Wpe(this.options.HTMLAttributes,n):wz(this.options.HTMLAttributes,n)]}}),Ype=jn.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:t})=>({orientation:n>t?"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,t)=>({commands:e,state:i})=>{const{selection:r}=i,{head:o}=r;return e.insertContentAt(t??o,{type:this.name,attrs:qpe(n)})}}},renderHTML:({HTMLAttributes:n})=>["div",{class:"video-container"},["video",tn(n,{controls:!0})]]}),qpe=n=>{if("string"==typeof n)return{src:n};const{assetMetaData:t,asset:e,mimeType:i,fileAsset:r}=n,{width:o="auto",height:s="auto",contentType:a}=t||{},l=s>o?"vertical":"horizontal";return{src:r||e,data:{...n},width:o,height:s,mimeType:i||a,orientation:l}},Qpe=jn.create({name:"aiContent",addAttributes:()=>({content:{default:""},loading:{default:!1}}),parseHTML:()=>[{tag:"div[ai-content]"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertAINode:n=>({commands:t,editor:e,tr:i})=>{const r=t0(e,gi.AI_CONTENT);return r?(i.setNodeMarkup(r.from,void 0,{content:n,loading:!1}),t.setNodeSelection(r.from),!0):t.insertContent({type:this.name,attrs:{content:n}})},setLoadingAIContentNode:n=>({tr:t,editor:e})=>{const i=t0(e,gi.AI_CONTENT);return i&&t.setNodeMarkup(i.from,void 0,{...i.node.attrs,loading:n}),!0}}},renderHTML:()=>["div[ai-content]"],addNodeView:()=>({node:n})=>{const t=document.createElement("div"),e=document.createElement("div");return e.innerHTML=n.attrs.loading?'':n.attrs.content,t.contentEditable="true",t.className="ai-content-container "+(n.attrs.loading?"ai-loading":""),t.append(e),{dom:t}}}),Zpe=jn.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:t})=>t.insertContent({type:this.name,attrs:{isLoading:n}})}},renderHTML:()=>["div",{class:"p-d-flex p-jc-center"}],addNodeView:()=>({node:n})=>{const t=document.createElement("div");if(t.classList.add("loader-style"),n.attrs.isLoading){const e=document.createElement("div");e.classList.add("p-progress-spinner"),t.append(e)}return{dom:t}}}),Jpe={video:"dotVideo",image:"dotImage"},Xpe=(n,t)=>Mn.create({name:"assetUploader",addProseMirrorPlugins(){const e=n.get(Xs),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(eE,{remove:{id:m}})),R5(g)}function u({view:m,file:g,position:y}){const b=s(g),w=g.name;(function l({view:m,position:g,id:y,type:b}){const w=t.createComponent(Qh),_=m.state.tr;w.instance.type=b,w.instance.cancel.subscribe(()=>{c(y),o.abort(),r.unsubscribe()}),w.changeDetectorRef.detectChanges(),_.setMeta(eE,{add:{id:y,pos:g,element:w.location.nativeElement}}),m.dispatch(_)})({view:m,position:y,id:w,type:b}),o=new AbortController;const{signal:_}=o;r=e.publishContent({data:g,signal:_}).pipe(Et(1)).subscribe(N=>{const S=N[0][Object.keys(N[0])[0]];i.commands.insertAsset({type:b,payload:S,position:y})},N=>alert(N.message),()=>c(w))}function d(m){return i.commands.isNodeRegistered(Jpe[m])}return[eE,new Wt({key:new on("assetUploader"),props:{handleDOMEvents:{click(m,g){!function h(m,g){const{doc:y,selection:b}=m.state,{ranges:w}=b,_=Math.min(...w.map(ie=>ie.$from.pos)),N=y.nodeAt(_);if(g.target?.closest("a")&&N.type.name===io.name)g.preventDefault(),g.stopPropagation()}(m,g)},paste(m,g){!function f(m,g){const{clipboardData:y}=g,{files:b}=y,w=y.getData("Text")||"",_=s(b[0]),N=d(_);if(_&&!N)return void a(_);if(w&&!F5(w))return;const{from:S}=(n=>{const{state:t}=n,{selection:e}=t,{ranges:i}=e;return{from:Math.min(...i.map(s=>s.$from.pos)),to:Math.max(...i.map(s=>s.$to.pos))}})(m);F5(w)&&d("image")?i.chain().insertImage(w,S).addNextLine().run():u({view:m,file:b[0],position:S}),g.preventDefault(),g.stopPropagation()}(m,g)},drop(m,g){!function p(m,g){const{files:y}=g.dataTransfer,{length:b}=y,w=y[0],_=s(w);if(!d(_))return;if(b>1)return void a(_);g.preventDefault(),g.stopPropagation();const{clientX:N,clientY:S}=g,{pos:ie}=m.posAtCoords({left:N,top:S});u({view:m,file:w,position:ie})}(m,g)}}}})]}}),eme=["cb"],tme=function(n,t,e){return{"p-checkbox-label":!0,"p-checkbox-label-active":n,"p-disabled":t,"p-checkbox-label-focus":e}};function nme(n,t){if(1&n){const e=We();I(0,"label",7),ue("click",function(r){de(e);const o=D(),s=Dn(3);return he(o.onClick(r,s,!0))}),ke(1),A()}if(2&n){const e=D();pn(e.labelStyleClass),v("ngClass",al(5,tme,e.checked(),e.disabled,e.focused)),Ot("for",e.inputId),C(1),At(e.label)}}const ime=function(n,t,e){return{"p-checkbox p-component":!0,"p-checkbox-checked":n,"p-checkbox-disabled":t,"p-checkbox-focused":e}},rme=function(n,t,e){return{"p-highlight":n,"p-disabled":t,"p-focus":e}},ome={provide:Sr,useExisting:Ut(()=>nE),multi:!0};let nE=(()=>{class n{constructor(e){this.cd=e,this.checkboxIcon="pi pi-check",this.trueValue=!0,this.falseValue=!1,this.onChange=new re,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.focused=!1}onClick(e,i,r){e.preventDefault(),!this.disabled&&!this.readonly&&(this.updateModel(e),r&&i.focus())}updateModel(e){let i;this.binary?(i=this.checked()?this.falseValue:this.trueValue,this.model=i,this.onModelChange(i)):(i=this.checked()?this.model.filter(r=>!Lt.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:e})}handleChange(e){this.readonly||this.updateModel(e)}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(e){this.model=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:Lt.contains(this.value,this.model)}}return n.\u0275fac=function(e){return new(e||n)(O(Un))},n.\u0275cmp=Me({type:n,selectors:[["p-checkbox"]],viewQuery:function(e,i){if(1&e&&en(eme,5),2&e){let r;Ke(r=Qe())&&(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:[Pt([ome])],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(e,i){if(1&e){const r=We();I(0,"div",0)(1,"div",1)(2,"input",2,3),ue("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("change",function(s){return i.handleChange(s)}),A()(),I(4,"div",4),ue("click",function(s){de(r);const a=Dn(3);return he(i.onClick(s,a,!0))}),_e(5,"span",5),A()(),M(6,nme,2,9,"label",6)}2&e&&(pn(i.styleClass),v("ngStyle",i.style)("ngClass",al(18,ime,i.checked(),i.disabled,i.focused)),C(2),v("readonly",i.readonly)("value",i.value)("checked",i.checked())("disabled",i.disabled),Ot("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),v("ngClass",al(22,rme,i.checked(),i.disabled,i.focused)),C(1),v("ngClass",i.checked()?i.checkboxIcon:null),C(1),v("ngIf",i.label))},dependencies:[fi,Kt,sr],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(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})(),vg=(()=>{class n{constructor(e,i,r){this.el=e,this.ngModel=i,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(e){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(vp,8),O(Un))},n.\u0275dir=we({type:n,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(e,i){1&e&&ue("input",function(o){return i.onInput(o)}),2&e&&yo("p-filled",i.filled)}}),n})(),Tz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})();const sme=["group"];function ame(n,t){if(1&n&&(dt(0),_e(1,"p-checkbox",11),I(2,"label",12),ke(3),Qn(4,"titlecase"),A(),ht()),2&n){const e=D().$implicit;C(1),v("formControlName",e.key)("binary",!0)("id",e.key),C(1),v("checkIsRequiredControl",e.key)("for",e.key),C(1),At(Zn(4,6,e.label))}}const lme=function(){return{width:"100%",fontSize:"14px",height:"40px"}};function cme(n,t){if(1&n&&_e(0,"input",15,16),2&n){const e=D(2).$implicit;oi(Hr(6,lme)),v("formControlName",e.key)("id",e.key)("type",e.type)("min",e.min)}}const ume=function(n){return{"p-label-input-required":n}};function dme(n,t){if(1&n&&(dt(0),I(1,"label",13),ke(2),Qn(3,"titlecase"),A(),M(4,cme,2,7,"input",14),ht()),2&n){const e=D().$implicit;C(1),v("ngClass",Mt(5,ume,e.required))("for",e.key),C(1),At(Zn(3,3,e.label))}}function hme(n,t){1&n&&(I(0,"span",17),ke(1,"This field is required"),A())}function fme(n,t){if(1&n&&(I(0,"div",6),dt(1,7),M(2,ame,5,8,"ng-container",8),M(3,dme,5,7,"ng-container",9),ht(),M(4,hme,2,0,"span",10),A()),2&n){const e=t.$implicit,i=D(2);v("ngClass",e.type),C(1),v("ngSwitch",e.type),C(1),v("ngSwitchCase","checkbox"),C(2),v("ngIf",i.form.controls[e.key].invalid&&i.form.controls[e.key].dirty)}}const pme=function(){return{width:"120px"}},mme=function(){return{padding:"11.5px 24px"}};function gme(n,t){if(1&n){const e=We();I(0,"form",1),ue("ngSubmit",function(){return de(e),he(D().onSubmit())}),M(1,fme,5,4,"div",2),I(2,"div",3)(3,"button",4),ue("click",function(){return de(e),he(D().hide.emit(!0))}),A(),_e(4,"button",5),A()()}if(2&n){const e=D();v("ngClass",null==e.options?null:e.options.customClass)("formGroup",e.form),C(1),v("ngForOf",e.dynamicControls),C(2),oi(Hr(8,pme)),C(1),oi(Hr(9,mme)),v("disabled",e.form.invalid)}}class bg{constructor(t){this.fb=t,this.formValues=new re,this.hide=new re,this.options=null,this.dynamicControls=[]}onSubmit(){this.formValues.emit({...this.form.value})}setFormValues(t){this.form.setValue(t)}buildForm(t){this.dynamicControls=t,this.form=this.fb.group({}),this.dynamicControls.forEach(e=>{this.form.addControl(e.key,this.fb.control(e.value||null,e.required?Ud.required:[]))})}cleanForm(){this.form=null}}bg.\u0275fac=function(t){return new(t||bg)(O(iv))},bg.\u0275cmp=Me({type:bg,selectors:[["dot-bubble-form"]],viewQuery:function(t,e){if(1&t&&en(sme,5),2&t){let i;Ke(i=Qe())&&(e.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(t,e){1&t&&M(0,gme,5,10,"form",0),2&t&&v("ngIf",e.form)},dependencies:[fi,Gr,Kt,Vd,I_,O_,qd,dl,Ic,Hd,Aa,Oc,nE,Vo,vg,mg,YN],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 yme=["list"];function _me(n,t){if(1&n&&_e(0,"dot-suggestions-list-item",5),2&n){const e=t.$implicit,i=t.index;v("command",e.command)("index",i)("label",e.label)("url",e.icon)("data",e.data)("page",!0)}}function vme(n,t){if(1&n&&(I(0,"div")(1,"dot-suggestion-list",null,3),M(3,_me,1,6,"dot-suggestions-list-item",4),A()()),2&n){const e=D();C(3),v("ngForOf",e.items)}}function bme(n,t){1&n&&_e(0,"dot-suggestion-loading-list")}function wme(n,t){if(1&n){const e=We();I(0,"dot-empty-message",6),ue("back",function(){return de(e),he(D().handleBackButton())}),A()}2&n&&v("title",D().title)("showBackBtn",!0)}class Jh{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(t){this.list.updateSelection(t)}}Jh.\u0275fac=function(t){return new(t||Jh)},Jh.\u0275cmp=Me({type:Jh,selectors:[["dot-suggestion-page"]],viewQuery:function(t,e){if(1&t&&en(yme,5),2&t){let i;Ke(i=Qe())&&(e.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(t,e){if(1&t&&(M(0,vme,4,1,"div",0),M(1,bme,1,0,"ng-template",null,1,Bn),M(3,wme,1,2,"ng-template",null,2,Bn)),2&t){const i=Dn(2),r=Dn(4);v("ngIf",e.items.length)("ngIfElse",e.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 Cme=["input"],Dme=["suggestions"];function Tme(n,t){1&n&&_e(0,"hr",11)}const Mme=function(){return{fontSize:"32px"}};function Sme(n,t){if(1&n&&(I(0,"div",12)(1,"a",13)(2,"span",14),ke(3,"language"),A(),I(4,"span",15),ke(5),A()(),I(6,"div",16)(7,"div",17),_e(8,"p-checkbox",18),A(),I(9,"label",19),ke(10,"Open link in new window"),A()()()),2&n){const e=D();C(1),v("href",e.currentLink,ol),C(1),oi(Hr(5,Mme)),C(3),At(e.currentLink),C(3),v("binary",!0)}}function Eme(n,t){if(1&n){const e=We();I(0,"dot-suggestion-page",20,21),ue("back",function(){return de(e),he(D().resetForm())}),A()}if(2&n){const e=D();v("items",e.items)("loading",e.loading)("title",e.noResultsTitle)}}function xme(n,t){if(1&n){const e=We();I(0,"dot-form-actions",22),ue("hide",function(r){return de(e),he(D().hide.emit(r))})("remove",function(r){return de(e),he(D().removeLink.emit(r))}),A()}2&n&&v("link",D().currentLink)}const Ime=function(){return{width:"5rem",padding:".75rem 1rem",borderRadius:"0 2px 2px 0"}};class Xh{constructor(t,e,i){this.fb=t,this.suggestionsService=e,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=dg,this.initialValues={link:"",blank:!0},this.minChars=3,this.loading=!1,this.items=[]}onMouseDownHandler(t){const{target:e}=t;e!==this.input.nativeElement&&t.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(Xd(500)).subscribe(t=>{t.lengththis.setNodeProps.emit({link:this.currentLink,blank:t})),this.dotLanguageService.getLanguages().pipe(Et(1)).subscribe(t=>this.dotLangs=t)}submitForm(){this.setNodeProps.emit(this.form.value),this.hide.emit(!0)}setLoading(){const t=this.newLink.length>=this.minChars&&!w0(this.newLink);this.items=t?this.items:[],this.showSuggestions=t,this.loading=t,t&&requestAnimationFrame(()=>this.isSuggestionOpen.emit(!0))}setFormValue({link:t="",blank:e=!0}){this.form.setValue({link:t,blank:e},{emitEvent:!1})}focusInput(){this.input.nativeElement.focus()}onKeyDownEvent(t){const e=this.suggestionsComponent?.items;if(t.stopImmediatePropagation(),"Escape"===t.key)return this.hide.emit(!0),!0;if(!this.showSuggestions||!e?.length)return!0;switch(t.key){case"Enter":return this.suggestionsComponent?.execCommand(),!1;case"ArrowUp":case"ArrowDown":this.suggestionsComponent?.updateSelection(t)}}resetForm(){this.showSuggestions=!1,this.setFormValue({...this.initialValues})}onSelection({payload:{url:t}}){this.setFormValue({...this.form.value,link:t}),this.submitForm()}searchContentlets({link:t=""}){this.loading=!0,this.suggestionsService.getContentletsByLink({link:t,currentLanguage:this.languageId}).pipe(Et(1)).subscribe(e=>{this.items=e.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(t){const{languageCode:e,countryCode:i}=this.dotLangs[t];return e&&i?`${e}-${i}`:""}}Xh.\u0275fac=function(t){return new(t||Xh)(O(iv),O(Hl),O(Bl))},Xh.\u0275cmp=Me({type:Xh,selectors:[["dot-bubble-link-form"]],viewQuery:function(t,e){if(1&t&&(en(Cme,5),en(Dme,5)),2&t){let i;Ke(i=Qe())&&(e.input=i.first),Ke(i=Qe())&&(e.suggestionsComponent=i.first)}},hostBindings:function(t,e){1&t&&ue("mousedown",function(r){return e.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(t,e){1&t&&(I(0,"div",0)(1,"form",1),ue("keydown",function(r){return e.onKeyDownEvent(r)})("ngSubmit",function(){return e.submitForm()}),I(2,"div",2)(3,"div",3)(4,"input",4,5),ue("input",function(){return e.setLoading()}),A(),_e(6,"button",6),A()(),M(7,Tme,1,0,"hr",7),M(8,Sme,11,6,"div",8),A(),M(9,Eme,2,3,"dot-suggestion-page",9),M(10,xme,1,1,"dot-form-actions",10),A()),2&t&&(C(1),v("formGroup",e.form),C(5),oi(Hr(7,Ime)),C(1),v("ngIf",e.showSuggestions||e.currentLink),C(1),v("ngIf",e.currentLink&&!e.showSuggestions),C(1),v("ngIf",e.showSuggestions),C(1),v("ngIf",!e.showSuggestions&&e.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 Ome=x(88222),Ame=x.n(Ome);const Mz=({editor:n,view:t,pos:e})=>{const i=t.state.doc?.resolve(e),r=((n,t)=>{const e=t-n?.textOffset;return{to:e,from:n.index(){const{state:l}=this.editor,{to:c}=l.selection,{openOnClick:u}=Wa.getState(l);this.pluginKey.getState(l).isOpen&&(u?(this.editor.commands.closeLinkForm(),requestAnimationFrame(()=>this.editor.commands.setTextSelection(c))):this.editor.commands.closeLinkForm())},this.editor=t,this.element=e,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(t,e){const i=this.pluginKey.getState(t.state),r=this.pluginKey.getState(e);i.isOpen!==r.isOpen?(this.createTooltip(),i.isOpen?this.show():this.hide(),this.detectLinkFormChanges()):this.detectLinkFormChanges()}createTooltip(){const{element:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t.parentElement,{...this.tippyOptions,...SR,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:t}=this.editor,{state:e}=t,{doc:i,selection:r}=e,{ranges:o}=r,s=Math.min(...o.map(m=>m.$from.pos)),l=gu(t,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(mn(this.$destroy)).subscribe(()=>this.removeLink()),this.component.instance.isSuggestionOpen.pipe(mn(this.$destroy)).subscribe(()=>this.tippy.popperInstance.update()),this.component.instance.setNodeProps.pipe(mn(this.$destroy)).subscribe(t=>this.setLinkValues(t))}detectLinkFormChanges(){this.component.changeDetectorRef.detectChanges(),requestAnimationFrame(()=>this.tippy?.popperInstance?.forceUpdate())}getLinkProps(){const{href:t="",target:e="_top"}=this.editor.isActive("link")?this.editor.getAttributes("link"):this.editor.getAttributes(io.name);return{link:t,blank:"_blank"===e}}getLinkSelect(){const{state:t}=this.editor,{from:e,to:i}=t.selection,r=t.doc.textBetween(e,i," ");return w0(r)?r:""}isImageNode(){const{type:t}=this.editor.state.doc.nodeAt(this.editor.state.selection.from)||{};return t?.name===io.name}destroy(){this.tippy?.destroy(),this.editor.off("focus",this.focusHandler),this.$destroy.next(!0),this.component.destroy()}hanlderScroll(t){if(!this.tippy?.state.isMounted)return;const e=t.target,i=e?.parentElement?.parentElement;this.scrollElementMap[e.id]||this.scrollElementMap[i.id]||this.hide()}}const Nme=n=>{let t;return new Wt({key:n.pluginKey,view:e=>new kme({view:e,...n}),state:{init:()=>({isOpen:!1,openOnClick:!1}),apply(e,i,r){const{isOpen:o,openOnClick:s}=e.getMeta(Wa)||{},a=Wa.getState(r);return"boolean"==typeof o?{isOpen:o,openOnClick:s}:a||i}},props:{handleDOMEvents:{mousedown(e,i){const r=n.editor,o=((n,t)=>{const{clientX:e,clientY:i}=t,{pos:r}=n.posAtCoords({left:e,top:i});return r})(e,i),{isOpen:s,openOnClick:a}=Wa.getState(r.state);s&&a&&r.chain().unsetHighlight().setTextSelection(o).run()}},handleClickOn(e,i,r){const o=n.editor;if(o.isActive("link")&&i){if(!Ame()(t,r))return Mz({editor:o,view:e,pos:i}),t=r,!0;o.chain().setTextSelection(i).closeLinkForm().run()}else t=r},handleDoubleClickOn(e,i){const r=n.editor;if(r.isActive("link"))return Mz({editor:r,view:e,pos:i}),!0}}})},Wa=new on("addLink"),Pme=(n,t)=>Mn.create({name:"bubbleLinkForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Wa}),addCommands:()=>({openLinkForm:({openOnClick:e})=>({chain:i})=>i().setMeta("preventAutolink",!0).setHighlight().command(({tr:r})=>(r.setMeta(Wa,{isOpen:!0,openOnClick:e}),!0)).freezeScroll(!0).run(),closeLinkForm:()=>({chain:e})=>e().setMeta("preventAutolink",!0).unsetHighlight().command(({tr:i})=>(i.setMeta(Wa,{isOpen:!1,openOnClick:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const e=n.createComponent(Xh);return e.changeDetectorRef.detectChanges(),[Nme({pluginKey:this.options.pluginKey,editor:this.editor,element:e.location.nativeElement,tippyOptions:this.options.tippyOptions,component:e,languageId:t})]}}),Sz={tableCell:!0,table:!0,youtube:!0,dotVideo:!0,aiContent:!0,loader:!0},Lme=({editor:n,state:t,from:e,to:i})=>{const{doc:r,selection:o}=t,{view:s}=n,{empty:a}=o,{isOpen:l,openOnClick:c}=Wa.getState(t),u=n.state.doc.nodeAt(n.state.selection.from),d=bu(n.state.selection.$from),h=!r.textBetween(e,i).length&&Ub(t.selection);return"text"===u?.type.name&&"table"===d?.type.name&&!h||!(!l&&(!s.hasFocus()||a||h||Sz[d?.type.name]||Sz[u?.type.name])||l&&c)},w0=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),Ez=(n,t)=>t===io.name&&n?.firstElementChild?n.firstElementChild.getBoundingClientRect():n.getBoundingClientRect(),xz=n=>n.isActive("bulletList")||n.isActive("orderedList"),Iz=[{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}],iE=[{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}],jme=[...Iz,...iE,{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}],zme=[...iE,{icon:"link",markAction:"link",active:!1,divider:!0},{text:"Properties",markAction:"properties",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],Vme=[...Iz,...iE,{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],Bme=[{icon:"delete",markAction:"deleteNode",active:!1}],Oz=[{name:"offset",options:{offset:[0,5]}},{name:"flip",options:{fallbackPlacements:["bottom-start","top-start"]}},{name:"preventOverflow",options:{altAxis:!0,tether:!0}}],Hme=[{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 $me extends VS{constructor(t){const{editor:e,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=t;super(t),this.$destroy=new ae,this.focusHandler=()=>{this.editor.commands.closeForm(),setTimeout(()=>this.update(this.editor.view))},this.editor=e,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(Hme),this.component.instance.formValues.pipe(mn(this.$destroy)).subscribe(l=>{this.editor.commands.updateValue(l)}),this.component.instance.hide.pipe(mn(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(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{open:!1},{state:o}=t,{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 qe){const d=t.nodeDOM(c);if(d)return this.node=s.nodeAt(c),this.tippyRect(d,this.node.type.name)}return gu(t,c,u)}}),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t.parentElement,{...this.tippyOptions,...SR,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(t){if(!this.shouldHideOnScroll(t.target))return!0;setTimeout(()=>this.update(this.editor.view))}tippyRect(t,e){return document.querySelector("#bubble-menu")?.getBoundingClientRect()||((n,t)=>t===io.name&&n.getElementsByTagName("img")[0]?.getBoundingClientRect()||n.getBoundingClientRect())(t,e)}shouldHideOnScroll(t){return this.tippy?.state.isMounted&&this.tippy?.popper.contains(t)}}const Wme=n=>new Wt({key:n.pluginKey,view:t=>new $me({view:t,...n}),state:{init:()=>({open:!1,form:[],options:null}),apply(t,e,i){const{open:r,form:o,options:s}=t.getMeta(xu)||{},a=xu?.getState(i);return"boolean"==typeof r?{open:r,form:o,options:s}:a||e}}}),xu=new on("bubble-form"),Gme={interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},Yme=n=>{const t=new ae;return BS.extend({name:"bubbleForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:xu,shouldShow:()=>!0}),addCommands:()=>({openForm:(e,i)=>({chain:r})=>(r().command(({tr:o})=>(o.setMeta(xu,{form:e,options:i,open:!0}),!0)).freezeScroll(!0).run(),t),closeForm:()=>({chain:e})=>(t.next(null),e().command(({tr:i})=>(i.setMeta(xu,{open:!1}),!0)).freezeScroll(!1).run()),updateValue:e=>({editor:i})=>{t.next(e),i.commands.closeForm()}}),addProseMirrorPlugins(){const e=n.createComponent(bg),i=e.location.nativeElement;return e.changeDetectorRef.detectChanges(),[Wme({pluginKey:xu,editor:this.editor,element:i,tippyOptions:Gme,component:e,form$:t})]}})},Az=function(){return{width:"50%"}};function qme(n,t){if(1&n){const e=We();I(0,"div")(1,"div",1)(2,"button",2),ue("click",function(){return de(e),he(D().copy())}),A(),I(3,"button",3),ue("click",function(){return de(e),he(D().remove.emit(!0))}),A()()()}2&n&&(C(2),oi(Hr(4,Az)),C(1),oi(Hr(5,Az)))}class wg{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 Kme(n,t){if(1&n){const e=We();dt(0),I(1,"button",3),ue("click",function(){return de(e),he(D().toggleChangeTo.emit())}),ke(2),A(),_e(3,"div",4),ht()}if(2&n){const e=D();C(2),At(e.selected)}}function Qme(n,t){1&n&&_e(0,"div",4)}function Zme(n,t){if(1&n){const e=We();dt(0),I(1,"dot-bubble-menu-button",5),ue("click",function(){const o=de(e).$implicit;return he(D().command.emit(o))}),A(),M(2,Qme,1,0,"div",6),ht()}if(2&n){const e=t.$implicit;C(1),v("active",e.active)("item",e),C(1),v("ngIf",e.divider)}}wg.\u0275fac=function(t){return new(t||wg)},wg.\u0275cmp=Me({type:wg,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(t,e){1&t&&M(0,qme,4,6,"div",0),2&t&&v("ngIf",e.link.length)},dependencies:[Kt,Vo],styles:[".form-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;padding:1rem;gap:.5rem}"]});class ef{constructor(){this.items=[],this.command=new re,this.toggleChangeTo=new re}preventDeSelection(t){t.preventDefault()}}ef.\u0275fac=function(t){return new(t||ef)},ef.\u0275cmp=Me({type:ef,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(t,e){1&t&&(I(0,"div",0),ue("mousedown",function(r){return e.preventDeSelection(r)}),M(1,Kme,4,1,"ng-container",1),M(2,Zme,3,3,"ng-container",2),A()),2&t&&(C(1),v("ngIf",e.selected),C(1),v("ngForOf",e.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,t){return{"btn-bubble-menu":!0,"btn-icon":n,"btn-active":t}},Xme=function(n){return{"material-icons":n}};class Cg{constructor(){this.active=!1}}Cg.\u0275fac=function(t){return new(t||Cg)},Cg.\u0275cmp=Me({type:Cg,selectors:[["dot-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:8,consts:[[3,"ngClass"]],template:function(t,e){1&t&&(I(0,"button",0)(1,"span",0),ke(2),A()()),2&t&&(v("ngClass",bi(3,Jme,e.item.icon,e.active)),C(1),v("ngClass",Mt(6,Xme,e.item.icon)),C(1),At(e.item.icon||e.item.text))},dependencies:[fi],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 ege=n=>{const t=n.component.instance,e=n.changeToComponent.instance;return new Wt({key:n.pluginKey,view:i=>new tge({view:i,...n}),props:{handleKeyDown(i,r){const{key:o}=r,{changeToIsOpen:s}=n.editor?.storage.bubbleMenu||{};if(s){if("Escape"===o)return t.toggleChangeTo.emit(),!0;if("Enter"===o)return e.execCommand(),!0;if("ArrowDown"===o||"ArrowUp"===o)return e.updateSelection(r),!0}return!1}}})};class tge extends VS{constructor(t){super(t),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:e,changeToComponent:i}=t;this.component=e,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(t,e){const{state:i,composing:r}=t,{doc:o,selection:s}=i,a=e&&e.doc.eq(o)&&e.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:t,state:i,oldState:e,from:c,to:u}),!this.shouldShowProp)return this.hide(),void this.tippyChangeTo?.hide();this.tippy?.setProps({getReferenceClientRect:()=>{const d=t.nodeDOM(c),h=o.nodeAt(c)?.type.name;return(({viewCoords:n,nodeCoords:t,padding:e})=>{const{top:i,bottom:r}=t,{top:o,bottom:s}=n,a=Math.ceil(i-o){this.changeTo.instance.list.updateActiveItem(t),this.changeTo.changeDetectorRef.detectChanges()})}setMenuItems(t,e){const i=t.nodeAt(e),o="table"===bu(this.editor.state.selection.$from).type.name?"table":i?.type.name;this.selectionNode=i,this.component.instance.items=((n="")=>{switch(n){case"dotImage":return zme;case"dotContent":return Bme;case"table":return Vme;default:return jme}})(o)}openImageProperties(){const{open:t}=xu.getState(this.editor.state),{alt:e,src:i,title:r,data:o}=this.editor.getAttributes(io.name),{title:s="",asset:a}=o||{};t?this.editor.commands.closeForm():this.editor.commands.openForm([{value:i||a,key:"src",label:"path",required:!0,controlType:"text",type:"text"},{value:e||s,key:"alt",label:"alt",controlType:"text",type:"text"},{value:r||s,key:"title",label:"caption",controlType:"text",type:"text"}]).pipe(Et(1),Tn(l=>null!=l)).subscribe(l=>{requestAnimationFrame(()=>{this.editor.commands.updateAttributes(io.name,{...l}),this.editor.commands.closeForm()})})}exeCommand(t){const{markAction:e,active:i}=t;switch(e){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(e,i);break;case"bulletList":this.editor.commands.toggleBulletList();break;case"orderedList":this.editor.commands.toggleOrderedList();break;case"indent":xz(this.editor)&&this.editor.commands.sinkListItem("listItem");break;case"outdent":xz(this.editor)&&this.editor.commands.liftListItem("listItem");break;case"link":const{isOpen:r}=Wa.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,t)=>{const e=t.$from.pos,i=t.$to.pos+1;this.editor.chain().deleteRange({from:e,to:i}).blur().run()})(0,this.selectionRange):(({editor:n,nodeType:t,selectionRange:e})=>{Tue.includes(t)?((n,t)=>{const e=t.$from.pos,i=e+1;n.chain().deleteRange({from:e,to:i}).blur().run()})(n,e):((n,t)=>{const e=bu(t.$from),i=e.type.name,r=bu(t.$from,[gi.ORDERED_LIST,gi.BULLET_LIST]),{childCount:o}=r;switch(i){case gi.ORDERED_LIST:case gi.BULLET_LIST:o>1?n.chain().deleteNode(gi.LIST_ITEM).blur().run():n.chain().deleteNode(r.type).blur().run();break;default:n.chain().deleteNode(e.type).blur().run()}})(n,e)})({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(t,e){e?this.editor.commands.unsetTextAlign():this.editor.commands.setTextAlign(t)}changeToItems(){const t=this.editor.storage.dotConfig.allowedBlocks;let i="table"===bu(this.editor.state.selection.$from).type.name?XX:iee;t.length>1&&(i=i.filter(o=>t.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 t=this.changeToItems(),e=t.filter(o=>o?.isActive()),i=e.length>1?e[1]:e[0],r=t.findIndex(o=>o===i);return{activeItem:i,index:r}}createChangeToTooltip(){const{element:t}=this.editor.options;this.tippyChangeTo||(this.tippyChangeTo=gs(t,{...this.tippyOptions,appendTo:document.body,getReferenceClientRect:null,content:this.changeToElement,placement:"bottom-start",duration:0,hideOnClick:!1,popperOptions:{modifiers:Oz},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:t}=this.editor?.storage.bubbleMenu||{};t?this.tippyChangeTo?.hide():this.tippyChangeTo?.show()}hanlderScroll(){this.tippyChangeTo?.state.isVisible&&this.tippyChangeTo?.hide()}}const nge={duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0},ige=new on("bubble-menu");function rge(n){const t=n.createComponent(ef),e=t.location.nativeElement,i=n.createComponent(Wl),r=i.location.nativeElement;return BS.extend({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:nge,pluginKey:"bubbleMenu",shouldShow:Lme}),addStorage:()=>({changeToIsOpen:!1}),addProseMirrorPlugins(){return e?[ege({...this.options,component:t,changeToComponent:i,pluginKey:ige,editor:this.editor,element:e,changeToElement:r})]:[]}})}const oge=Mn.create({name:"dotComands",addCommands:()=>({isNodeRegistered:n=>({view:t})=>{const{schema:e}=t.state,{nodes:i}=e;return Boolean(i[n])}})}),sge=n=>Mn.create({name:"dotConfig",addStorage:()=>({...n})}),age=jn.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const t=n.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:n}){return["td",tn(this.options.HTMLAttributes,n),0]}});class cge{constructor(t,e){this.tippy=e}init(){}update(){}destroy(){this.tippy.destroy()}}const uge=n=>{let t;function e(s){return ki.node(s.$to.before(3),s.$to.after(3),{class:"focus"})}function i(s){s.preventDefault(),s.stopPropagation(),t?.setProps({getReferenceClientRect:()=>s.target.getBoundingClientRect()}),t.show()}function o(s){return"tableCell"===s?.type.name||"tableHeader"===s?.type.name||"tableRow"===s?.type.name}return new Wt({key:new on("dotTableCell"),state:{apply:()=>{},init:()=>{const{editor:s,viewContainerRef:a}=n,l=a.createComponent(Wl),c=l.location.nativeElement;l.instance.currentLanguage=s.storage.dotConfig.lang;const{element:d}=s.options;t=gs(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:Oz},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,t)=>[{label:"Toggle row Header",icon:"check",id:"toggleRowHeader",command:()=>{n.commands.toggleHeaderRow(),t.hide()},tabindex:"0"},{label:"Toggle column Header",icon:"check",id:"toggleColumnHeader",command:()=>{n.commands.toggleHeaderColumn(),t.hide()},tabindex:"1"},{id:"divider"},{label:"Merge Cells",icon:"call_merge",id:"mergeCells",command:()=>{n.commands.mergeCells(),t.hide()},disabled:!0,tabindex:"2"},{label:"Split Cells",icon:"call_split",id:"splitCells",command:()=>{n.commands.splitCell(),t.hide()},disabled:!0,tabindex:"3"},{id:"divider"},{label:"Insert row above",icon:"arrow_upward",id:"insertAbove",command:()=>{n.commands.addRowBefore(),t.hide()},tabindex:"4"},{label:"Insert row below",icon:"arrow_downward",id:"insertBellow",command:()=>{n.commands.addRowAfter(),t.hide()},tabindex:"5"},{label:"Insert column left",icon:"arrow_back",id:"insertLeft",command:()=>{n.commands.addColumnBefore(),t.hide()},tabindex:"6"},{label:"Insert column right",icon:"arrow_forward",id:"insertRight",command:()=>{n.commands.addColumnAfter(),t.hide()},tabindex:"7"},{id:"divider"},{label:"Delete row",icon:"delete",id:"deleteRow",command:()=>{n.commands.deleteRow(),t.hide()},tabindex:"8"},{label:"Delete Column",icon:"delete",id:"deleteColumn",command:()=>{n.commands.deleteColumn(),t.hide()},tabindex:"9"},{label:"Delete Table",icon:"delete",id:"deleteTable",command:()=>{n.commands.deleteTable(),t.hide()},tabindex:"10"}])(n.editor,t),l.instance.title="",l.changeDetectorRef.detectChanges()}},view:s=>new cge(s,t),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?Fn.create(s.doc,[e(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 dge(n){return age.extend({renderHTML({HTMLAttributes:t}){return["td",tn(this.options.HTMLAttributes,t),["button",{class:"dot-cell-arrow"}],["p",0]]},addProseMirrorPlugins(){return[uge({editor:this.editor,viewContainerRef:n})]}})}const hge=jn.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const t=n.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:n}){return["th",tn(this.options.HTMLAttributes,n),0]}});var rE,oE;if(typeof WeakMap<"u"){let n=new WeakMap;rE=t=>n.get(t),oE=(t,e)=>(n.set(t,e),e)}else{const n=[];let e=0;rE=i=>{for(let r=0;r(10==e&&(e=0),n[e++]=i,n[e++]=r)}var Yn=class{constructor(n,t,e,i){this.width=n,this.height=t,this.map=e,this.problems=i}findCell(n){for(let t=0;ti&&(o+=c.attrs.colspan)}}for(let s=0;s1&&(e=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(n),e=n.childCount,i=[];let r=0,o=null;const s=[];for(let c=0,u=t*e;c=e){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:y-w});break}const _=r+w*t;for(let N=0;N0;t--)if("row"==n.node(t).type.spec.tableRole)return n.node(0).resolve(n.before(t+1));return null}function vs(n){const t=n.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function C0(n){const t=n.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;const e=tf(t.$head)||function vge(n){for(let t=n.nodeAfter,e=n.pos;t;t=t.firstChild,e++){const i=t.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(e)}for(let t=n.nodeBefore,e=n.pos;t;t=t.lastChild,e--){const i=t.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(e-t.nodeSize)}}(t.$head);if(e)return e;throw new RangeError(`No cell found around position ${t.head}`)}function sE(n){return"row"==n.parent.type.spec.tableRole&&!!n.nodeAfter}function aE(n,t){return n.depth==t.depth&&n.pos>=t.start(-1)&&n.pos<=t.end(-1)}function Pz(n,t,e){const i=n.node(-1),r=Yn.get(i),o=n.start(-1),s=r.nextCell(n.pos-o,t,e);return null==s?null:n.node(0).resolve(o+s)}function Iu(n,t,e=1){const i={...n,colspan:n.colspan-e};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(t,e),i.colwidth.some(r=>r>0)||(i.colwidth=null)),i}function Lz(n,t,e=1){const i={...n,colspan:n.colspan+e};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let r=0;rc!=t.pos-r);a.unshift(t.pos-r);const l=a.map(c=>{const u=e.nodeAt(c);if(!u)throw RangeError(`No cell with offset ${c} found`);const d=r+c+1;return new Pj(s.resolve(d),s.resolve(d+u.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=n,this.$headCell=t}map(n,t){const e=n.resolve(t.map(this.$anchorCell.pos)),i=n.resolve(t.map(this.$headCell.pos));if(sE(e)&&sE(i)&&aE(e,i)){const r=this.$anchorCell.node(-1)!=e.node(-1);return r&&this.isRowSelection()?nn.rowSelection(e,i):r&&this.isColSelection()?nn.colSelection(e,i):new nn(e,i)}return nt.between(e,i)}content(){const n=this.$anchorCell.node(-1),t=Yn.get(n),e=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-e,this.$headCell.pos-e),r={},o=[];for(let a=i.top;a0||m>0){let g=f.attrs;if(p>0&&(g=Iu(g,0,p)),m>0&&(g=Iu(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,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(n,t=n){const e=n.node(-1),i=Yn.get(e),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(t.pos-r),a=n.node(0);return o.top<=s.top?(o.top>0&&(n=a.resolve(r+i.map[o.left])),s.bottom0&&(t=a.resolve(r+i.map[s.left])),o.bottom0)&&Math.max(i+this.$anchorCell.nodeAfter.attrs.colspan,r+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(n){return n instanceof nn&&n.$anchorCell.pos==this.$anchorCell.pos&&n.$headCell.pos==this.$headCell.pos}static rowSelection(n,t=n){const e=n.node(-1),i=Yn.get(e),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(t.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&&(t=a.resolve(r+i.map[s.top*i.width])),o.right{t.push(ki.node(i,i+e.nodeSize,{class:"selectedCell"}))}),Fn.create(n.doc,t)}var Sge=new on("fix-tables");function Fz(n,t,e,i){const r=n.childCount,o=t.childCount;e:for(let s=0,a=0;s{"table"==r.type.spec.tableRole&&(e=function Ege(n,t,e,i){const r=Yn.get(t);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;gt.width)for(let d=0,h=0;dt.height){const d=[];for(let p=0,m=(t.height-1)*t.width;p=t.width)&&e.nodeAt(t.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,ce.from(d)),f=[];for(let p=t.height;p{if(!r)return!1;const o=e.selection;if(o instanceof nn)return D0(e,i,rt.near(o.$headCell,t));if("horiz"!=n&&!o.empty)return!1;const s=Uz(r,n,t);if(null==s)return!1;if("horiz"==n)return D0(e,i,rt.near(e.doc.resolve(o.head+t),t));{const a=e.doc.resolve(s),l=Pz(a,n,t);let c;return c=l?rt.near(l,1):t<0?rt.near(e.doc.resolve(a.before(-1)),-1):rt.near(e.doc.resolve(a.after(-1)),1),D0(e,i,c)}}}function M0(n,t){return(e,i,r)=>{if(!r)return!1;const o=e.selection;let s;if(o instanceof nn)s=o;else{const l=Uz(r,n,t);if(null==l)return!1;s=new nn(e.doc.resolve(l))}const a=Pz(s.$headCell,n,t);return!!a&&D0(e,i,new nn(s.$anchorCell,a))}}function S0(n,t){const e=n.selection;if(!(e instanceof nn))return!1;if(t){const i=n.tr,r=mr(n.schema).cell.createAndFill().content;e.forEachCell((o,s)=>{o.content.eq(r)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new Ce(r,0,0))}),i.docChanged&&t(i)}return!0}function Nge(n,t){const i=tf(n.state.doc.resolve(t));return!!i&&(n.dispatch(n.state.tr.setSelection(new nn(i))),!0)}function Pge(n,t,e){if(!vs(n.state))return!1;let i=function xge(n){if(!n.size)return null;let{content:t,openStart:e,openEnd:i}=n;for(;1==t.childCount&&(e>0&&i>0||"table"==t.child(0).type.spec.tableRole);)e--,i--,t=t.child(0).content;const r=t.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=t.length&&t.push(ce.empty),e[r]i&&(h=h.type.createChecked(Iu(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(ce.from(l))}e=o,t=r}return{width:n,height:t,rows:e}}(i,a.right-a.left,a.bottom-a.top),Bz(n.state,n.dispatch,s,a,i),!0}if(i){const o=C0(n.state),s=o.start(-1);return Bz(n.state,n.dispatch,s,Yn.get(o.node(-1)).findCell(o.pos-s),i),!0}return!1}function Lge(n,t){var e;if(t.ctrlKey||t.metaKey)return;const i=Hz(n,t.target);let r;if(t.shiftKey&&n.state.selection instanceof nn)o(n.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=tf(n.state.selection.$anchor))&&(null==(e=cE(n,t))?void 0:e.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(l,c){let u=cE(n,c);const d=null==Yl.getState(n.state);if(!u||!aE(l,u)){if(!d)return;u=l}const h=new nn(l,u);if(d||!n.state.selection.eq(h)){const f=n.state.tr.setSelection(h);d&&f.setMeta(Yl,l.pos),n.dispatch(f)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",a),null!=Yl.getState(n.state)&&n.dispatch(n.state.tr.setMeta(Yl,-1))}function a(l){const c=l,u=Yl.getState(n.state);let d;if(null!=u)d=n.state.doc.resolve(u);else if(Hz(n,c.target)!=i&&(d=cE(n,t),!d))return s();d&&o(d,c)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",a)}function Uz(n,t,e){if(!(n.state.selection instanceof nt))return null;const{$head:i}=n.state.selection;for(let r=i.depth-1;r>=0;r--){const o=i.node(r);if((e<0?i.index(r):i.indexAfter(r))!=(e<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"==t?e>0?"down":"up":e>0?"right":"left")?a:null}}return null}function Hz(n,t){for(;t&&t!=n.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function cE(n,t){const e=n.posAtCoords({left:t.clientX,top:t.clientY});return e&&e?tf(n.state.doc.resolve(e.pos)):null}var Rge=class{constructor(n,t){this.node=n,this.cellMinWidth=t,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")),uE(n,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type==this.node.type&&(this.node=n,uE(n,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(n){return"attributes"==n.type&&(n.target==this.table||this.colgroup.contains(n.target))}};function uE(n,t,e,i,r,o){var s;let a=0,l=!0,c=t.firstChild;const u=n.firstChild;if(u){for(let d=0,h=0;d(r.spec.props.nodeViews[mr(s.schema).table.name]=(a,l)=>new e(a,t,l),new E0(-1,!1)),apply:(o,s)=>s.apply(o)},props:{attributes:o=>{const s=Qo.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{!function jge(n,t,e,i,r){const o=Qo.getState(n.state);if(o&&!o.dragging){const s=function Uge(n){for(;n&&"TD"!=n.nodeName&&"TH"!=n.nodeName;)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}(t.target);let a=-1;if(s){const{left:l,right:c}=s.getBoundingClientRect();t.clientX-l<=e?a=$z(n,t,"left"):c-t.clientX<=e&&(a=$z(n,t,"right"))}if(a!=o.activeHandle){if(!r&&-1!==a){const l=n.state.doc.resolve(a),c=l.node(-1),u=Yn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}Gz(n,a)}}}(o,s,n,0,i)},mouseleave:o=>{!function zge(n){const t=Qo.getState(n.state);t&&t.activeHandle>-1&&!t.dragging&&Gz(n,-1)}(o)},mousedown:(o,s)=>{!function Vge(n,t,e){const i=Qo.getState(n.state);if(!i||-1==i.activeHandle||i.dragging)return!1;const r=n.state.doc.nodeAt(i.activeHandle),o=function Bge(n,t,{colspan:e,colwidth:i}){const r=i&&i[i.length-1];if(r)return r;const o=n.domAtPos(t);let a=o.node.childNodes[o.offset].offsetWidth,l=e;if(i)for(let c=0;c{const s=Qo.getState(o);if(s&&s.activeHandle>-1)return function Gge(n,t){const e=[],i=n.doc.resolve(t),r=i.node(-1);if(!r)return Fn.empty;const o=Yn.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(t.activeHandle,-1);return sE(n.doc.resolve(i))||(i=-1),new E0(i,t.dragging)}return t}};function $z(n,t,e){const i=n.posAtCoords({left:t.clientX,top:t.clientY});if(!i)return-1;const{pos:r}=i,o=tf(n.state.doc.resolve(r));if(!o)return-1;if("right"==e)return o.pos;const s=Yn.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 Wz(n,t,e){return Math.max(e,n.startWidth+(t.clientX-n.startX))}function Gz(n,t){n.dispatch(n.state.tr.setMeta(Qo,{setHandle:t}))}function Wge(n){return Array(n).fill(0)}function ia(n){const t=n.selection,e=C0(n),i=e.node(-1),r=e.start(-1),o=Yn.get(i);return{...t instanceof nn?o.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):o.findCell(e.pos-r),tableStart:r,map:o,table:i}}function Yz(n,{map:t,tableStart:e,table:i},r){let o=r>0?-1:0;(function wge(n,t,e){const i=mr(t.type.schema).header_cell;for(let r=0;r0&&r0&&t.map[a-1]==l||r0?-1:0;(function Zge(n,t,e){var i;const r=mr(t.type.schema).header_cell;for(let o=0;o0&&r0&&u==t.map[c-t.width]){const d=e.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&&e[o]==e[o-1]||i.right0&&e[r]==e[r-n]||i.bottom{var i;const r=t.selection;let o,s;if(r instanceof nn){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{if(o=function _ge(n){for(let t=n.depth;t>0;t--){const e=n.node(t).type.spec.tableRole;if("cell"===e||"header_cell"===e)return n.node(t)}return null}(r.$from),!o)return!1;s=null==(i=tf(r.$from))?void 0:i.pos}if(null==o||null==s||1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(e){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=ia(t),d=t.tr;for(let f=0;fe[i.type.spec.tableRole])(n,t)}function Jz(n,t,e){const i=t.map.cellsInRect({left:0,top:0,right:"row"==n?t.map.width:1,bottom:"column"==n?t.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}}Dg("row",{useDeprecatedLogic:!0}),Dg("column",{useDeprecatedLogic:!0});var sye=Dg("cell",{useDeprecatedLogic:!0});function Xz(n){return function(t,e){if(!vs(t))return!1;const i=function aye(n,t){if(t<0){const e=n.nodeBefore;if(e)return n.pos-e.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(t,e){const i=t.getMeta(Yl);if(null!=i)return-1==i?null:i;if(null==e||!t.docChanged)return e;const{deleted:r,pos:o}=t.mapping.mapResult(e);return r?null:o}},props:{decorations:Cge,handleDOMEvents:{mousedown:Lge},createSelectionBetween:t=>null!=Yl.getState(t.state)?t.state.selection:null,handleTripleClick:Nge,handleKeyDown:kge,handlePaste:Pge},appendTransaction:(t,e,i)=>function Mge(n,t,e){const i=(t||n).selection,r=(t||n).doc;let o,s;if(i instanceof qe&&(s=i.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)o=nn.create(r,i.from);else if("row"==s){const a=r.resolve(i.from+1);o=nn.rowSelection(a,a)}else if(!e){const a=Yn.get(i.node),l=i.from+1;o=nn.create(r,l+1,l+a.map[a.width*a.height-1])}}else i instanceof nt&&function Dge({$from:n,$to:t}){if(n.pos==t.pos||n.pos=0&&!(n.after(r+1)=0&&!(t.before(o+1)>t.start(o));o--,i--);return e==i&&/row|table/.test(n.node(r).type.spec.tableRole)}(i)?o=nt.create(r,i.from):i instanceof nt&&function Tge({$from:n,$to:t}){let e,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){e=o;break}}for(let r=t.depth;r>0;r--){const o=t.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){i=o;break}}return e!==i&&0===t.parentOffset}(i)&&(o=nt.create(r,i.$from.start(),i.$from.end()));return o&&(t||(t=n.tr)).setSelection(o),t}(i,jz(i,e),n)})}function eV(n,t,e,i,r,o){let s=0,a=!0,l=t.firstChild;const c=n.firstChild;for(let u=0,d=0;u{const{selection:t}=n.state;if(!function fye(n){return n instanceof nn}(t))return!1;let e=0;return C5(t.ranges[0].$from,o=>"table"===o.type.name)?.node.descendants(o=>{if("table"===o.type.name)return!1;["tableCell","tableHeader"].includes(o.type.name)&&(e+=1)}),e===t.ranges.length&&(n.commands.deleteTable(),!0)},pye=jn.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:uye,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:n}){return["table",tn(this.options.HTMLAttributes,n),["tbody",0]]},addCommands:()=>({insertTable:({rows:n=3,cols:t=3,withHeaderRow:e=!0}={})=>({tr:i,dispatch:r,editor:o})=>{const s=function hye(n,t,e,i,r){const o=function dye(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const t={};return Object.keys(n.nodes).forEach(e=>{const i=n.nodes[e];i.spec.tableRole&&(t[i.spec.tableRole]=i)}),n.cached.tableNodeTypes=t,t}(n),s=[],a=[];for(let c=0;c({state:n,dispatch:t})=>function Yge(n,t){if(!vs(n))return!1;if(t){const e=ia(n);t(Yz(n.tr,e,e.left))}return!0}(n,t),addColumnAfter:()=>({state:n,dispatch:t})=>function qge(n,t){if(!vs(n))return!1;if(t){const e=ia(n);t(Yz(n.tr,e,e.right))}return!0}(n,t),deleteColumn:()=>({state:n,dispatch:t})=>function Qge(n,t){if(!vs(n))return!1;if(t){const e=ia(n),i=n.tr;if(0==e.left&&e.right==e.map.width)return!1;for(let r=e.right-1;Kge(i,e,r),r!=e.left;r--){const o=e.tableStart?i.doc.nodeAt(e.tableStart-1):i.doc;if(!o)throw RangeError("No table found");e.table=o,e.map=Yn.get(o)}t(i)}return!0}(n,t),addRowBefore:()=>({state:n,dispatch:t})=>function Jge(n,t){if(!vs(n))return!1;if(t){const e=ia(n);t(qz(n.tr,e,e.top))}return!0}(n,t),addRowAfter:()=>({state:n,dispatch:t})=>function Xge(n,t){if(!vs(n))return!1;if(t){const e=ia(n);t(qz(n.tr,e,e.bottom))}return!0}(n,t),deleteRow:()=>({state:n,dispatch:t})=>function tye(n,t){if(!vs(n))return!1;if(t){const e=ia(n),i=n.tr;if(0==e.top&&e.bottom==e.map.height)return!1;for(let r=e.bottom-1;eye(i,e,r),r!=e.top;r--){const o=e.tableStart?i.doc.nodeAt(e.tableStart-1):i.doc;if(!o)throw RangeError("No table found");e.table=o,e.map=Yn.get(e.table)}t(i)}return!0}(n,t),deleteTable:()=>({state:n,dispatch:t})=>function lye(n,t){const e=n.selection.$anchor;for(let i=e.depth;i>0;i--)if("table"==e.node(i).type.spec.tableRole)return t&&t(n.tr.delete(e.before(i),e.after(i)).scrollIntoView()),!0;return!1}(n,t),mergeCells:()=>({state:n,dispatch:t})=>Qz(n,t),splitCell:()=>({state:n,dispatch:t})=>Zz(n,t),toggleHeaderColumn:()=>({state:n,dispatch:t})=>Dg("column")(n,t),toggleHeaderRow:()=>({state:n,dispatch:t})=>Dg("row")(n,t),toggleHeaderCell:()=>({state:n,dispatch:t})=>sye(n,t),mergeOrSplit:()=>({state:n,dispatch:t})=>!!Qz(n,t)||Zz(n,t),setCellAttribute:(n,t)=>({state:e,dispatch:i})=>function rye(n,t){return function(e,i){if(!vs(e))return!1;const r=C0(e);if(r.nodeAfter.attrs[n]===t)return!1;if(i){const o=e.tr;e.selection instanceof nn?e.selection.forEachCell((s,a)=>{s.attrs[n]!==t&&o.setNodeMarkup(a,null,{...s.attrs,[n]:t})}):o.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[n]:t}),i(o)}return!0}}(n,t)(e,i),goToNextCell:()=>({state:n,dispatch:t})=>Xz(1)(n,t),goToPreviousCell:()=>({state:n,dispatch:t})=>Xz(-1)(n,t),fixTables:()=>({state:n,dispatch:t})=>(t&&jz(n),!0),setCellSelection:n=>({tr:t,dispatch:e})=>{if(e){const i=nn.create(t.doc,n.anchorCell,n.headCell);t.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:x0,"Mod-Backspace":x0,Delete:x0,"Mod-Delete":x0}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Fge({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],cye({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema:n=>({tableRole:Ct(Ve(n,"tableRole",{name:n.name,options:n.options,storage:n.storage}))})});class Tg{}Tg.\u0275fac=function(t){return new(t||Tg)},Tg.\u0275cmp=Me({type:Tg,selectors:[["dot-drag-handler"]],decls:2,vars:0,consts:[[1,"material-icons"]],template:function(t,e){1&t&&(I(0,"i",0),ke(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 gye=n=>Mn.create({name:"dragHandler",addProseMirrorPlugins(){let t=null;const r=n.createComponent(Tg).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 Wt({key:new on("dragHandler"),view:m=>(requestAnimationFrame(()=>function d(m){r.setAttribute("draggable","true"),r.addEventListener("dragstart",g=>function l(m,g){if(!m.dataTransfer)return;const b=function a(m,g){const y=g.posAtCoords(m);if(y){const b=c(g.nodeDOM(y.inside));if(b&&1===b.nodeType){const w=g.docView.nearestDesc(b,!0);if(w&&w!==g.docView)return w.posBefore}}return null}({left:m.clientX+50,top:m.clientY},g);if(null!=b){g.dispatch(g.state.tr.setSelection(qe.create(g.state.doc,b)));const w=g.state.selection.content();m.dataTransfer.clearData(),m?.dataTransfer?.setDragImage(t,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")})(),R5(m),"TABLE"===t.nodeName&&s(t)}),!1),mousemove(m,g){const b=m.posAtCoords({left:g.clientX+50,top:g.clientY});if(b&&function u(m,g){const y=m.nodeDOM(g);return!(!y?.hasChildNodes()||1===y.childNodes.length&&"BR"==y.childNodes[0].nodeName)}(m,b.inside))if(t=c(m.nodeDOM(b.inside)),function f(m){return m&&!m.classList?.contains("ProseMirror")&&!m.innerText.startsWith("/")}(t)){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,t);r.style.left=_-25+"px",r.style.top=w<0?0:w+"px",r.classList.add("visible")}else r.classList.remove("visible");else t=null,r.classList.remove("visible");return!1}}}})]}}),yye=function(n){return{completed:n}};function _ye(n,t){if(1&n){const e=We();I(0,"button",2),ue("click",function(){return de(e),he(D().byClick.emit())}),A()}if(2&n){const e=D();v("disabled",e.isCompleted||e.isLoading)("icon",e.isCompleted?"pi pi-check":null)("label",e.title)("loading",e.isLoading)("ngClass",Mt(5,yye,e.isCompleted))}}function vye(n,t){1&n&&(I(0,"div",3),_e(1,"i",4),I(2,"span"),ke(3,"Something went wrong, please try again later or "),I(4,"a",5),ke(5," contact support "),A()()())}class Mg{constructor(){this.label="",this.isLoading=!1,this.byClick=new re,this.status=Ul}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(t){return new(t||Mg)},Mg.\u0275cmp=Me({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(t,e){if(1&t&&(M(0,_ye,1,7,"button",0),M(1,vye,6,0,"ng-template",null,1,Bn)),2&t){const i=Dn(2);v("ngIf",e.label!==e.status.ERROR)("ngIfElse",i)}},dependencies:[fi,Kt,Vo],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 wye=n=>new Wt({key:n.pluginKey,view:t=>new Cye({view:t,...n})});class Cye{constructor({dotUploadFileService:t,editor:e,component:i,element:r,view:o}){this.preventHide=!1,this.$destroy=new ae,this.initialLabel="Import to dotCMS",this.offset=10,this.editor=e,this.element=r,this.view=o,this.component=i,this.dotUploadFileService=t,this.component.instance.byClick.pipe(mn(this.$destroy)).subscribe(()=>this.uploadImagedotCMS()),this.element.remove(),this.element.style.visibility="visible"}update(t,e){const{state:i,composing:r}=t,{doc:o,selection:s}=i,{empty:a,ranges:l}=s,c=e&&e.doc.eq(o)&&e.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(io.name);if(a||d!==io.name||h?.data)return void this.hide();const p=t.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:t})=>{const{bottom:i,left:r,top:o}=t,{bottom:s}=n,l=Math.ceil(s-i)<0?s:o-65,c=othis.updateButtonLabel(t)}).pipe(Et(1),hn(()=>this.updateButtonLoading(!1))).subscribe(t=>{const e=t[0];this.updateButtonLabel(Ul.COMPLETED),this.updateImageNode(e[Object.keys(e)[0]])},()=>{this.updateButtonLoading(!1),this.updateButtonLabel(Ul.ERROR),this.setPreventHide()})}updateButtonLabel(t){this.component.instance.label=t,this.component.changeDetectorRef.detectChanges()}updateButtonLoading(t){this.component.instance.isLoading=t,this.component.changeDetectorRef.detectChanges()}}const Dye=new on("floating-button");function Tye(n,t){const e=t.createComponent(Mg),i=e.location.nativeElement,r=n.get(Xs);return Mn.create({addProseMirrorPlugins(){return i?[wye({...this.options,dotUploadFileService:r,component:e,pluginKey:Dye,editor:this.editor,element:i})]:[]}})}const Sg=new on("freeze-scroll"),Mye=Mn.create({name:"freezeScroll",addCommands:()=>({freezeScroll:n=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(Sg,{freezeScroll:n}),!0)).run()}),addProseMirrorPlugins:()=>[Sye]}),Sye=new Wt({key:Sg,state:{init:()=>({freezeScroll:!1}),apply(n,t,e){const{freezeScroll:i}=n.getMeta(Sg)||{},r=Sg?.getState(e);return"boolean"==typeof i?{freezeScroll:i}:r||t}}});function nV(n){return!!n&&(n instanceof Se||"function"==typeof n.lift&&"function"==typeof n.subscribe)}function nf(...n){return t=>{let e;return"function"==typeof n[n.length-1]&&(e=n.pop()),t.lift(new Eye(n,e))}}class Eye{constructor(t,e){this.observables=t,this.project=e}call(t,e){return e.subscribe(new xye(t,this.observables,this.project))}}class xye extends xR{constructor(t,e,i){super(t),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(t){if(0===this.toRespond.length){const e=[t,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(t){let e;try{e=this.project.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Oye{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new Aye(t,this.compare,this.keySelector))}}class Aye extends te{constructor(t,e,i){super(t),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:r}=this;e=r?r(t):t}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}const Nye=new Te("@ngrx/component-store Initial State");let fE=(()=>{class n{constructor(e){this.destroySubject$=new H_(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new H_(1),this.isInitialized=!1,this.state$=this.select(i=>i),this.\u0275hasProvider=!1,e&&this.initState(e),this.checkProviderForHooks()}ngOnDestroy(){this.stateSubject$.complete(),this.destroySubject$.next()}updater(e){return i=>{let o,r=!0;const a=(nV(i)?i:Le(i)).pipe(function NY(n,t=0){return function(i){return i.lift(new PY(n,t))}}(_T),hn(()=>this.assertStateIsInitialized()),nf(this.stateSubject$),fe(([l,c])=>e(c,l)),hn(l=>this.stateSubject$.next(l)),Fi(l=>r?(o=l,Rs):vo(()=>l)),mn(this.destroy$)).subscribe();if(o)throw o;return r=!1,a}}initState(e){Fr([e],_T).subscribe(i=>{this.isInitialized=!0,this.stateSubject$.next(i)})}setState(e){"function"!=typeof e?this.initState(e):this.updater(e)()}patchState(e){const i="function"==typeof e?e(this.get()):e;this.updater((r,o)=>({...r,...o}))(i)}get(e){let i;return this.assertStateIsInitialized(),this.stateSubject$.pipe(Et(1)).subscribe(r=>{i=e?e(r):r}),i}select(...e){const{observablesOrSelectorsObject:i,projector:r,config:o}=function Pye(n){const t=Array.from(n);let e={debounce:!1};if(function Lye(n){return typeof n.debounce<"u"}(t[t.length-1])&&(e={...e,...t.pop()}),1===t.length&&"function"!=typeof t[0])return{observablesOrSelectorsObject:t[0],projector:void 0,config:e};const i=t.pop();return{observablesOrSelectorsObject:t,projector:i,config:e}}(e);return(function Rye(n,t){return Array.isArray(n)&&0===n.length&&t}(i,r)?this.stateSubject$:NM(i)).pipe(o.debounce?function kye(){return n=>new Se(t=>{let e,i;const r=new se;return r.add(n.subscribe({complete:()=>{e&&t.next(i),t.complete()},error:o=>{t.error(o)},next:o=>{i=o,e||(e=mM.schedule(()=>{t.next(i),e=void 0}),r.add(e))}})),r})}():n=>n,r?fe(a=>i.length>0&&Array.isArray(a)?r(...a):r(a)):n=>n,function Iye(n,t){return e=>e.lift(new Oye(n,t))}(),KF({refCount:!0,bufferSize:1}),mn(this.destroy$))}effect(e){const i=new ae;return e(i).pipe(mn(this.destroy$)).subscribe(),r=>(nV(r)?r:Le(r)).pipe(mn(this.destroy$)).subscribe(s=>{i.next(s)})}checkProviderForHooks(){mM.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(e){return new(e||n)(F(Nye,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class ql extends fE{constructor(t){super({prompt:"",content:"",acceptContent:!1,deleteContent:!1,status:$n.INIT}),this.dotAiService=t,this.prompt$=this.select(e=>e.prompt),this.content$=this.select(e=>e.content),this.deleteContent$=this.select(e=>e.deleteContent),this.status$=this.select(e=>e.status),this.vm$=this.select(e=>e),this.setStatus=this.updater((e,i)=>({...e,status:i})),this.setAcceptContent=this.updater((e,i)=>({...e,acceptContent:i})),this.setDeleteContent=this.updater((e,i)=>({...e,deleteContent:i})),this.generateContent=this.effect(e=>e.pipe(ai(i=>(this.patchState({status:$n.LOADING,prompt:i}),this.dotAiService.generateContent(i).pipe(hn(r=>this.patchState({status:$n.LOADED,content:r})),Fi(()=>(this.patchState({status:$n.LOADED,content:""}),Le(null)))))))),this.reGenerateContent=this.effect(e=>e.pipe(nf(this.state$),hn(([i,{prompt:r}])=>this.generateContent(Le(r)))))}}ql.\u0275fac=function(t){return new(t||ql)(F($l))},ql.\u0275prov=H({token:ql,factory:ql.\u0275fac,providedIn:"root"});const jye=["input"];function zye(n,t){1&n&&(dt(0),_e(1,"span",7),ht())}function Vye(n,t){1&n&&_e(0,"button",8)}function Bye(n,t){if(1&n){const e=We();dt(0),I(1,"form",1),ue("ngSubmit",function(){return de(e),he(D().onSubmit())}),I(2,"span",2)(3,"input",3,4),ue("keyup.escape",function(r){return de(e),he(D().handleScape(r))})("keydown.escape",function(r){return r.stopPropagation()}),Qn(5,"dm"),A(),M(6,zye,2,0,"ng-container",5),M(7,Vye,1,0,"ng-template",null,6,Bn),A()(),ht()}if(2&n){const e=t.ngIf,i=Dn(8),r=D();C(1),v("formGroup",r.form),C(2),ls("placeholder",Zn(5,5,"block-editor.extension.ai-content.ask-ai-to-write-something")),Ot("disabled",e.status===r.ComponentStatus.LOADING||null),C(3),v("ngIf",e.status===r.ComponentStatus.LOADING)("ngIfElse",i)}}class Eg{constructor(t){this.aiContentPromptStore=t,this.vm$=this.aiContentPromptStore.vm$,this.ComponentStatus=$n,this.destroy$=new ae,this.form=new Wd({textPrompt:new Yd("",Ud.required)})}ngOnInit(){this.aiContentPromptStore.status$.pipe(mn(this.destroy$),Tn(t=>t===$n.IDLE)).subscribe(()=>{this.form.reset(),this.input.nativeElement.focus()})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onSubmit(){const t=this.form.value.textPrompt;t&&this.aiContentPromptStore.generateContent(t)}handleScape(t){this.aiContentPromptStore.setStatus($n.INIT),t.stopPropagation()}}function I0(n){return t=>t.lift(new Uye(n))}Eg.\u0275fac=function(t){return new(t||Eg)(O(ql))},Eg.\u0275cmp=Me({type:Eg,selectors:[["dot-ai-content-prompt"]],viewQuery:function(t,e){if(1&t&&en(jye,5),2&t){let i;Ke(i=Qe())&&(e.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","pInputText","","type","text",3,"placeholder","keyup.escape","keydown.escape"],["input",""],[4,"ngIf","ngIfElse"],["submitButton",""],[1,"pi","pi-spin","pi-spinner"],["icon","pi pi-send","pButton","","type","submit",1,"p-button-rounded","p-button-text"]],template:function(t,e){1&t&&(M(0,Bye,9,7,"ng-container",0),Qn(1,"async")),2&t&&v("ngIf",Zn(1,1,e.vm$))},dependencies:[Kt,qd,dl,Ic,Hd,Aa,Oc,Vo,vg,A_,ea],styles:["form[_ngcontent-%COMP%]{margin:0 1rem}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%] .pi-spinner[_ngcontent-%COMP%]{position:absolute;right:0;top:0;bottom:0;margin:auto 0;background:none}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] .pi-spinner[_ngcontent-%COMP%]{margin-right:.5rem;color:var(--color-palette-primary-500)}"],changeDetection:0});class Uye{constructor(t){this.total=t}call(t,e){return e.subscribe(new Hye(t,this.total))}}class Hye extends te{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}const $ye={duration:[500,0],interactive:!0,maxWidth:"100%",trigger:"manual",hideOnClick:!1,placement:"bottom-start",popperOptions:{modifiers:[{name:"flip",enabled:!1},{name:"preventOverflow",options:{altAxis:!0}}]}};class Wye{constructor(t){this.destroy$=new ae,this.boundClickHandler=this.handleClick.bind(this);const{editor:e,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=t;this.editor=e,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.componentStore=this.component.injector.get(ql),this.componentStore.content$.pipe(mn(this.destroy$),Tn(l=>!!l)).subscribe(l=>{this.editor.chain().closeAIPrompt().insertAINode(l).openAIContentActions(xg).run()}),this.componentStore.vm$.pipe(mn(this.destroy$),hn(l=>this.storeSate=l),Tn(l=>l.acceptContent)).subscribe(l=>{const c=t0(this.editor,gi.AI_CONTENT);((n,t,e)=>{const{node:i,from:r,to:o}=t;i&&n.chain().deleteRange({from:r,to:o}).insertContentAt(r,e).run()})(this.editor,c,l.content),this.componentStore.setAcceptContent(!1)}),this.componentStore.status$.pipe(I0(1),mn(this.destroy$)).subscribe(l=>{l===$n.INIT?this.tippy?.hide():l===$n.LOADING&&this.editor.commands.setLoadingAIContentNode(!0)}),this.componentStore.deleteContent$.pipe(I0(1),mn(this.destroy$),Tn(l=>l)).subscribe(()=>{const l=t0(this.editor,gi.AI_CONTENT);l&&this.editor.commands.deleteRange({from:l.from,to:l.to}),this.componentStore.setDeleteContent(!1)})}update(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{aIContentPromptOpen:!1};i?.aIContentPromptOpen!==r?.aIContentPromptOpen&&(i.aIContentPromptOpen?this.show():this.hide(this.storeSate.status===$n.IDLE||this.storeSate.status===$n.LOADED))}createTooltip(){const{element:t}=this.editor.options;if(!t.parentElement)return;const{selection:i}=this.editor.state;if(i instanceof nt){const{pos:r}=i.$cursor,s=this.editor.view.domAtPos(r).node;this.tippy=gs(t,{...$ye,...this.tippyOptions,content:this.element,getReferenceClientRect:s.getBoundingClientRect.bind(s),onHide:()=>{this.editor.commands.closeAIPrompt()},onShow:a=>{const l=a.popper;l.style.width="100%",setTimeout(()=>{l.style.marginTop="-40px"},0)}})}}show(){this.createTooltip(),this.manageClickListener(!0),this.editor.setEditable(!1),this.tippy?.show(),this.componentStore.setStatus($n.IDLE)}hide(t=!0){this.tippy?.hide(),this.editor.setEditable(!0),this.editor.view.focus(),t&&this.componentStore.setStatus($n.INIT),this.manageClickListener(!1)}destroy(){this.tippy?.destroy(),this.destroy$.next(!0),this.destroy$.complete(),this.manageClickListener(!1)}handleClick(){(this.storeSate.status===$n.IDLE||this.storeSate.status===$n.LOADED)&&this.tippy.hide()}manageClickListener(t){t?this.editor.view.dom.addEventListener("click",this.boundClickHandler):this.editor.view.dom.removeEventListener("click",this.boundClickHandler)}}const Gye=n=>new Wt({key:n.pluginKey,view:t=>new Wye({view:t,...n}),state:{init:()=>({aIContentPromptOpen:!1}),apply(t,e,i){const{aIContentPromptOpen:r}=t.getMeta(Ig)||{},o=Ig.getState(i);return"boolean"==typeof r?{aIContentPromptOpen:r}:o||e}}}),xg="dotAITextContent",Ig=new on(xg),Yye=n=>Mn.create({name:"aiContentPrompt",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Ig}),addCommands:()=>({openAIPrompt:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(Ig,{aIContentPromptOpen:!0}),!0)).freezeScroll(!0).run(),closeAIPrompt:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(Ig,{aIContentPromptOpen:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const t=n.createComponent(Eg);return t.changeDetectorRef.detectChanges(),[Gye({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,component:t})]}});function qye(n,t){if(1&n&&(I(0,"div",2),_e(1,"i"),ke(2),A()),2&n){const e=t.$implicit;C(1),pn(e.icon),C(1),Yi(" ",e.label," ")}}var Ga=(()=>(function(n){n.ACCEPT="ACCEPT",n.DELETE="DELETE",n.REGENERATE="REGENERATE"}(Ga||(Ga={})),Ga))();class Og{constructor(){this.actionEmitter=new re,this.tooltipContent="Describe the size, color palette, style, mood, etc.",this.dotMessageService=ct(Zr)}ngOnInit(){this.actionOptions=[{label:this.dotMessageService.get("block-editor.common.accept"),icon:"pi pi-check",callback:()=>this.emitAction(Ga.ACCEPT),selectedOption:!0},{label:this.dotMessageService.get("block-editor.common.regenerate"),icon:"pi pi-sync",callback:()=>this.emitAction(Ga.REGENERATE),selectedOption:!1},{label:this.dotMessageService.get("block-editor.common.delete"),icon:"pi pi-trash",callback:()=>this.emitAction(Ga.DELETE),selectedOption:!1}]}emitAction(t){this.actionEmitter.emit(t)}}Og.\u0275fac=function(t){return new(t||Og)},Og.\u0275cmp=Me({type:Og,selectors:[["dot-ai-content-actions"]],outputs:{actionEmitter:"actionEmitter"},decls:2,vars:1,consts:[[3,"options","onClick"],["pTemplate","item"],[1,"action-content"]],template:function(t,e){1&t&&(I(0,"p-listbox",0),ue("onClick",function(r){return r.value.callback()}),M(1,qye,3,3,"ng-template",1),A()),2&t&&v("options",e.actionOptions)},dependencies:[qi,jL],styles:["[_nghost-%COMP%] .p-listbox{display:block;width:12.5rem;padding:.5rem;margin-left:4rem}[_nghost-%COMP%] .p-listbox .p-listbox-list .p-listbox-item{padding:.75rem 1rem;border-bottom:1px solid #ebecef;background-color:#fff}[_nghost-%COMP%] .p-listbox .p-listbox-list .p-listbox-item:last-child{border-bottom:none}[_nghost-%COMP%] .p-listbox .p-listbox-list .p-listbox-item: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});let Kye=(()=>{class n{constructor(e){this.el=e}onkeydown(e){if(!0!==this.pFocusTrapDisabled){e.preventDefault();const i=Z.getNextFocusableElement(this.el.nativeElement,e.shiftKey);i&&(i.focus(),i.select?.())}}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275dir=we({type:n,selectors:[["","pFocusTrap",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,i){1&e&&ue("keydown.tab",function(o){return i.onkeydown(o)})("keydown.shift.tab",function(o){return i.onkeydown(o)})},inputs:{pFocusTrapDisabled:"pFocusTrapDisabled"}}),n})(),Qye=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})();const Zye=["titlebar"],Jye=["content"],Xye=["footer"];function e_e(n,t){if(1&n){const e=We();I(0,"div",11),ue("mousedown",function(r){return de(e),he(D(3).initResize(r))}),A()}}function t_e(n,t){if(1&n&&(I(0,"span",18),ke(1),A()),2&n){const e=D(4);Ot("id",e.id+"-label"),C(1),At(e.header)}}function n_e(n,t){1&n&&(I(0,"span",18),Ri(1,1),A()),2&n&&Ot("id",D(4).id+"-label")}function i_e(n,t){1&n&&_t(0)}const r_e=function(){return{"p-dialog-header-icon p-dialog-header-maximize p-link":!0}};function o_e(n,t){if(1&n){const e=We();I(0,"button",19),ue("click",function(){return de(e),he(D(4).maximize())})("keydown.enter",function(){return de(e),he(D(4).maximize())}),_e(1,"span",20),A()}if(2&n){const e=D(4);v("ngClass",Hr(2,r_e)),C(1),v("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}const s_e=function(){return{"p-dialog-header-icon p-dialog-header-close p-link":!0}};function a_e(n,t){if(1&n){const e=We();I(0,"button",21),ue("click",function(r){return de(e),he(D(4).close(r))})("keydown.enter",function(r){return de(e),he(D(4).close(r))}),_e(1,"span",22),A()}if(2&n){const e=D(4);v("ngClass",Hr(4,s_e)),Ot("aria-label",e.closeAriaLabel)("tabindex",e.closeTabindex),C(1),v("ngClass",e.closeIcon)}}function l_e(n,t){if(1&n){const e=We();I(0,"div",12,13),ue("mousedown",function(r){return de(e),he(D(3).initDrag(r))}),M(2,t_e,2,2,"span",14),M(3,n_e,2,1,"span",14),M(4,i_e,1,0,"ng-container",9),I(5,"div",15),M(6,o_e,2,3,"button",16),M(7,a_e,2,5,"button",17),A()()}if(2&n){const e=D(3);C(2),v("ngIf",!e.headerFacet&&!e.headerTemplate),C(1),v("ngIf",e.headerFacet),C(1),v("ngTemplateOutlet",e.headerTemplate),C(2),v("ngIf",e.maximizable),C(1),v("ngIf",e.closable)}}function c_e(n,t){1&n&&_t(0)}function u_e(n,t){1&n&&_t(0)}function d_e(n,t){if(1&n&&(I(0,"div",23,24),Ri(2,2),M(3,u_e,1,0,"ng-container",9),A()),2&n){const e=D(3);C(3),v("ngTemplateOutlet",e.footerTemplate)}}const h_e=function(n,t,e,i){return{"p-dialog p-component":!0,"p-dialog-rtl":n,"p-dialog-draggable":t,"p-dialog-resizable":e,"p-dialog-maximized":i}},f_e=function(n,t){return{transform:n,transition:t}},p_e=function(n){return{value:"visible",params:n}};function m_e(n,t){if(1&n){const e=We();I(0,"div",3,4),ue("@animation.start",function(r){return de(e),he(D(2).onAnimationStart(r))})("@animation.done",function(r){return de(e),he(D(2).onAnimationEnd(r))}),M(2,e_e,1,0,"div",5),M(3,l_e,8,5,"div",6),I(4,"div",7,8),Ri(6),M(7,c_e,1,0,"ng-container",9),A(),M(8,d_e,4,1,"div",10),A()}if(2&n){const e=D(2);pn(e.styleClass),v("ngClass",Rd(15,h_e,e.rtl,e.draggable,e.resizable,e.maximized))("ngStyle",e.style)("pFocusTrapDisabled",!1===e.focusTrap)("@animation",Mt(23,p_e,bi(20,f_e,e.transformOptions,e.transitionOptions))),Ot("aria-labelledby",e.id+"-label"),C(2),v("ngIf",e.resizable),C(1),v("ngIf",e.showHeader),C(1),pn(e.contentStyleClass),v("ngClass","p-dialog-content")("ngStyle",e.contentStyle),C(3),v("ngTemplateOutlet",e.contentTemplate),C(1),v("ngIf",e.footerFacet||e.footerTemplate)}}const g_e=function(n,t,e,i,r,o,s,a,l,c){return{"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter":n,"p-dialog-mask-scrollblocker":t,"p-dialog-left":e,"p-dialog-right":i,"p-dialog-top":r,"p-dialog-top-left":o,"p-dialog-top-right":s,"p-dialog-bottom":a,"p-dialog-bottom-left":l,"p-dialog-bottom-right":c}};function y_e(n,t){if(1&n&&(I(0,"div",1),M(1,m_e,9,25,"div",2),A()),2&n){const e=D();pn(e.maskStyleClass),v("ngClass",hD(4,g_e,[e.modal,e.modal||e.blockScroll,"left"===e.position,"right"===e.position,"top"===e.position,"topleft"===e.position||"top-left"===e.position,"topright"===e.position||"top-right"===e.position,"bottom"===e.position,"bottomleft"===e.position||"bottom-left"===e.position,"bottomright"===e.position||"bottom-right"===e.position])),C(1),v("ngIf",e.visible)}}const __e=["*",[["p-header"]],[["p-footer"]]],v_e=["*","p-header","p-footer"],b_e=sv([Ai({transform:"{{transform}}",opacity:0}),kc("{{transition}}")]),w_e=sv([kc("{{transition}}",Ai({transform:"{{transform}}",opacity:0}))]);let C_e=(()=>{class n{constructor(e,i,r,o,s){this.el=e,this.renderer=i,this.zone=r,this.cd=o,this.config=s,this.draggable=!0,this.resizable=!0,this.closeOnEscape=!0,this.closable=!0,this.showHeader=!0,this.blockScroll=!1,this.autoZIndex=!0,this.baseZIndex=0,this.minX=0,this.minY=0,this.focusOnShow=!0,this.keepInViewport=!0,this.focusTrap=!0,this.transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)",this.closeIcon="pi pi-times",this.closeTabindex="-1",this.minimizeIcon="pi pi-window-minimize",this.maximizeIcon="pi pi-window-maximize",this.onShow=new re,this.onHide=new re,this.visibleChange=new re,this.onResizeInit=new re,this.onResizeEnd=new re,this.onDragEnd=new re,this.onMaximize=new re,this.id=AL(),this._style={},this._position="center",this.transformOptions="scale(0.7)"}get positionLeft(){return 0}set positionLeft(e){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(e){console.log("positionTop property is deprecated.")}get responsive(){return!1}set responsive(e){console.log("Responsive property is deprecated.")}get breakpoint(){return 649}set breakpoint(e){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngOnInit(){this.breakpoints&&this.createStyle()}get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(e){e&&(this._style={...e},this.originalStyle=e)}get position(){return this._position}set position(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)"}}focus(){let e=Z.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}close(e){this.visibleChange.emit(!1),e.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)})),this.modal&&Z.addClass(document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.dismissableMask&&this.unbindMaskClickListener(),this.modal&&Z.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?Z.addClass(document.body,"p-overflow-hidden"):Z.removeClass(document.body,"p-overflow-hidden")),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&(gl.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let i in this.breakpoints)e+=`\n @media screen and (max-width: ${i}) {\n .p-dialog[${this.id}] {\n width: ${this.breakpoints[i]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}}initDrag(e){Z.hasClass(e.target,"p-dialog-header-icon")||Z.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",Z.addClass(document.body,"p-unselectable-text"))}onKeydown(e){if(this.focusTrap&&9===e.which){e.preventDefault();let i=Z.getFocusableElements(this.container);if(i&&i.length>0)if(i[0].ownerDocument.activeElement){let r=i.indexOf(i[0].ownerDocument.activeElement);e.shiftKey?-1==r||0===r?i[i.length-1].focus():i[r-1].focus():-1==r||r===i.length-1?i[0].focus():i[r+1].focus()}else i[0].focus()}}onDrag(e){if(this.dragging){let i=Z.getOuterWidth(this.container),r=Z.getOuterHeight(this.container),o=e.pageX-this.lastPageX,s=e.pageY-this.lastPageY,a=this.container.getBoundingClientRect(),l=a.left+o,c=a.top+s,u=Z.getViewport();this.container.style.position="fixed",this.keepInViewport?(l>=this.minX&&l+i=this.minY&&c+rparseInt(u))&&h.left+lparseInt(d))&&h.top+c{this.documentDragListener=this.onDrag.bind(this),window.document.addEventListener("mousemove",this.documentDragListener)})}unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)}bindDocumentDragEndListener(){this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.endDrag.bind(this),window.document.addEventListener("mouseup",this.documentDragEndListener)})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}bindDocumentResizeListeners(){this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.resizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){this.documentEscapeListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","keydown",i=>{27==i.which&&this.close(i)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.wrapper):Z.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.container.setAttribute(this.id,""),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&Z.addClass(document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&Z.addClass(this.wrapper,"p-component-overlay-leave")}}onAnimationEnd(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({}),this.cd.markForCheck();break;case"visible":this.onShow.emit({})}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(Z.removeClass(document.body,"p-overflow-hidden"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&Z.removeClass(document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&&gl.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?{...this.originalStyle}:{}}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle()}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(Cr),O(qt),O(Un),O(Fc))},n.\u0275cmp=Me({type:n,selectors:[["p-dialog"]],contentQueries:function(e,i,r){if(1&e&&(Jn(r,dM,5),Jn(r,hM,5),Jn(r,qi,4)),2&e){let o;Ke(o=Qe())&&(i.headerFacet=o.first),Ke(o=Qe())&&(i.footerFacet=o.first),Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(Zye,5),en(Jye,5),en(Xye,5)),2&e){let r;Ke(r=Qe())&&(i.headerViewChild=r.first),Ke(r=Qe())&&(i.contentViewChild=r.first),Ke(r=Qe())&&(i.footerViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",draggable:"draggable",resizable:"resizable",positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:"modal",closeOnEscape:"closeOnEscape",dismissableMask:"dismissableMask",rtl:"rtl",closable:"closable",responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",showHeader:"showHeader",breakpoint:"breakpoint",blockScroll:"blockScroll",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",minX:"minX",minY:"minY",focusOnShow:"focusOnShow",maximizable:"maximizable",keepInViewport:"keepInViewport",focusTrap:"focusTrap",transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",visible:"visible",style:"style",position:"position"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},ngContentSelectors:v_e,decls:1,vars:1,consts:[[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","pFocusTrapDisabled"],["container",""],["class","p-resizable-handle","style","z-index: 90;",3,"mousedown",4,"ngIf"],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],["content",""],[4,"ngTemplateOutlet"],["class","p-dialog-footer",4,"ngIf"],[1,"p-resizable-handle",2,"z-index","90",3,"mousedown"],[1,"p-dialog-header",3,"mousedown"],["titlebar",""],["class","p-dialog-title",4,"ngIf"],[1,"p-dialog-header-icons"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],["type","button","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-close-icon",3,"ngClass"],[1,"p-dialog-footer"],["footer",""]],template:function(e,i){1&e&&(go(__e),M(0,y_e,2,15,"div",0)),2&e&&v("ngIf",i.maskVisible)},dependencies:[fi,Kt,_o,sr,Kye,zc],styles:[".p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}\n"],encapsulation:2,data:{animation:[ov("animation",[Nc("void => visible",[av(b_e)]),Nc("visible => void",[av(w_e)])])]},changeDetection:0}),n})(),D_e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,Qye,Pa,zo]}),n})(),x_e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,Pa,zo,zo]}),n})();const O_e={selectedPromptType:null,showDialog:!1,status:$n.INIT,contentlets:[],prompt:null,editorContent:null,error:null};class Ya extends fE{constructor(t){super(O_e),this.dotAiService=t,this.isOpenDialog$=this.select(this.state$,({showDialog:e})=>e),this.isLoading$=this.select(this.state$,({status:e})=>e===$n.LOADING),this.getContentlets$=this.select(this.state$,({contentlets:e})=>e),this.setPromptType=this.updater((e,i)=>({...e,selectedPromptType:i})),this.showDialog=this.updater((e,i)=>({...e,showDialog:!0,selectedPromptType:"input",editorContent:i})),this.hideDialog=this.updater(e=>({...e,showDialog:!1,selectedPromptType:null})),this.vm$=this.select(this.state$,({selectedPromptType:e,showDialog:i,status:r})=>({selectedPromptType:e,showDialog:i,status:r})),this.generateImage=this.effect(e=>e.pipe(nf(this.state$),ai(([i,{selectedPromptType:r,editorContent:o}])=>{const s=i?.trim()??"",a="auto"===r&&o?`${s} to illustrate the following content: ${o}`:s;return this.patchState({status:$n.LOADING,prompt:a}),this.dotAiService.generateAndPublishImage(a).pipe(function Fye(n,t,e){return i=>i.pipe(hn({next:n,complete:e}),Fi(r=>(t(r),Rs)))}(l=>{this.patchState({status:$n.IDLE,contentlets:l})},()=>(this.patchState({status:$n.IDLE}),Le(null))))}))),this.reGenerateContent=this.effect(e=>e.pipe(nf(this.state$),hn(([i,{prompt:r}])=>r?this.generateImage(Le(r)):Rs)))}}Ya.\u0275fac=function(t){return new(t||Ya)(F($l))},Ya.\u0275prov=H({token:Ya,factory:Ya.\u0275fac,providedIn:"root"});let A_e=(()=>{class n{constructor(e,i,r,o){this.el=e,this.ngModel=i,this.control=r,this.cd=o,this.onResize=new re}ngOnInit(){this.ngModel&&(this.ngModelSubscription=this.ngModel.valueChanges.subscribe(()=>{this.updateState()})),this.control&&(this.ngControlSubscription=this.control.valueChanges.subscribe(()=>{this.updateState()}))}ngAfterViewInit(){this.autoResize&&this.resize(),this.updateFilledState(),this.cd.detectChanges()}onInput(e){this.updateState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length}onFocus(e){this.autoResize&&this.resize(e)}onBlur(e){this.autoResize&&this.resize(e)}resize(e){this.el.nativeElement.style.height="auto",this.el.nativeElement.style.height=this.el.nativeElement.scrollHeight+"px",parseFloat(this.el.nativeElement.style.height)>=parseFloat(this.el.nativeElement.style.maxHeight)?(this.el.nativeElement.style.overflowY="scroll",this.el.nativeElement.style.height=this.el.nativeElement.style.maxHeight):this.el.nativeElement.style.overflow="hidden",this.onResize.emit(e||{})}updateState(){this.updateFilledState(),this.autoResize&&this.resize()}ngOnDestroy(){this.ngModelSubscription&&this.ngModelSubscription.unsubscribe(),this.ngControlSubscription&&this.ngControlSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(vp,8),O(Fs,8),O(Un))},n.\u0275dir=we({type:n,selectors:[["","pInputTextarea",""]],hostAttrs:[1,"p-inputtextarea","p-inputtext","p-component","p-element"],hostVars:4,hostBindings:function(e,i){1&e&&ue("input",function(o){return i.onInput(o)})("focus",function(o){return i.onFocus(o)})("blur",function(o){return i.onBlur(o)}),2&e&&yo("p-filled",i.filled)("p-inputtextarea-resizable",i.autoResize)},inputs:{autoResize:"autoResize"},outputs:{onResize:"onResize"}}),n})(),k_e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})();function N_e(n,t){1&n&&(dt(0),I(1,"div",4),zw(),I(2,"svg",5),_e(3,"path",6)(4,"path",7)(5,"path",8)(6,"path",9),A()(),Vw(),I(7,"div",10)(8,"p",11),_e(9,"span",12),Qn(10,"dm"),_e(11,"i",13),Qn(12,"dm"),A()(),ht()),2&n&&(C(9),ls("innerHTML",Zn(10,2,"block-editor.extension.ai-image.input-text.title"),yc),C(2),ls("pTooltip",Zn(12,4,"block-editor.extension.ai-image.input-text.tooltip")))}function P_e(n,t){if(1&n){const e=We();I(0,"form",14)(1,"div",15),_e(2,"textarea",16),A(),_e(3,"dot-field-validation-message",17),Qn(4,"dm"),I(5,"button",18),ue("click",function(){return de(e),he(D().generateImage())}),Qn(6,"dm"),A()()}if(2&n){const e=D();v("formGroup",e.form),C(2),v("placeholder",e.placeholder),C(1),t_("message"," ",Zn(4,6,"block-editor.common.input-prompt-required-error"),""),v("field",e.promptControl),C(2),ls("label",Zn(6,8,"block-editor.common.generate")),v("loading",e.isLoading)}}function L_e(n,t){1&n&&(I(0,"div",4),zw(),I(1,"svg",19),_e(2,"path",20)(3,"path",21)(4,"path",22),A()(),Vw(),I(5,"div",10)(6,"p",11),_e(7,"span",12),Qn(8,"dm"),_e(9,"i",13),Qn(10,"dm"),A()()),2&n&&(C(7),ls("innerHTML",Zn(8,2,"block-editor.extension.ai-image.auto-text.title"),yc),C(2),ls("pTooltip",Zn(10,4,"block-editor.extension.ai-image.auto-text.tooltip")))}class Ag{constructor(){this.isSelected=!1,this.promptChanged=new re,this.form=ct(iv).group({prompt:["",Ud.required]})}set selected(t){this.isSelected=t,this.resetForm()}get promptControl(){return this.form.get("prompt")}generateImage(){this.form.valid&&(this.promptChanged.emit(this.promptControl.value),this.disableForm())}ngOnChanges(t){const{type:e}=t;e&&"auto"===e.currentValue&&(this.promptControl.clearValidators(),this.form.updateValueAndValidity())}resetForm(){this.form.enable(),this.form.reset()}disableForm(){this.form.disable()}}Ag.\u0275fac=function(t){return new(t||Ag)},Ag.\u0275cmp=Me({type:Ag,selectors:[["dot-ai-image-prompt-input"]],inputs:{placeholder:"placeholder",isLoading:"isLoading",type:"type",selected:"selected"},outputs:{promptChanged:"promptChanged"},standalone:!0,features:[$i,Ns],decls:5,vars:5,consts:[[1,"prompt-input__wrapper","flex","flex-column","align-items-center","h-full","justify-content-center","flex-wrap"],[4,"ngIf","ngIfElse"],["class","w-full text-center",3,"formGroup",4,"ngIf"],["autoHeaderTpl",""],[1,"prompt-input__icon"],["fill","none","height","40","viewBox","0 0 40 40","width","40","xmlns","http://www.w3.org/2000/svg"],["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","fill-rule","evenodd"],["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"],[1,"flex","gap-1"],[1,"text-center"],[3,"innerHTML"],["tooltipZIndex","999999",1,"pi","pi-info-circle",3,"pTooltip"],[1,"w-full","text-center",3,"formGroup"],[1,"field"],["autoResize","false","dotAutofocus","","formControlName","prompt","pInputTextarea","","rows","12",1,"w-full","h-full",3,"placeholder"],[3,"field","message"],["icon","pi pi-send","pButton","","type","submit",1,"p-button-outlined",3,"loading","label","click"],["fill","none","height","42","viewBox","0 0 34 42","width","34","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"]],template:function(t,e){if(1&t&&(I(0,"div",0),M(1,N_e,13,6,"ng-container",1),M(2,P_e,7,10,"form",2),M(3,L_e,11,6,"ng-template",null,3,Bn),A()),2&t){const i=Dn(4);yo("selected",e.isSelected),C(1),v("ngIf","input"===e.type)("ngIfElse",i),C(1),v("ngIf",e.isSelected)}},dependencies:[Bo,Vo,Kt,Kd,qd,dl,Ic,Hd,Aa,Oc,Du,fg,k_e,A_e,ea,yg,Jue,pg],styles:["[_nghost-%COMP%] form[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{margin-bottom:2rem}[_nghost-%COMP%] form[_ngcontent-%COMP%] dot-field-validation-message[_ngcontent-%COMP%]{position:absolute;left:0;bottom:50px}[_nghost-%COMP%] .prompt-input__wrapper[_ngcontent-%COMP%]{border-radius:.5rem;border:2px solid #ebecef;cursor:pointer;padding:1.5rem;gap:1.5rem;transition:all .15s ease;min-height:540px}[_nghost-%COMP%] .prompt-input__wrapper[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{display:inline-flex;color:var(--color-palette-primary-500)}[_nghost-%COMP%] .prompt-input__wrapper[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .prompt-input__wrapper[_ngcontent-%COMP%]:hover{border-color:var(--color-palette-secondary-200)}[_nghost-%COMP%] .prompt-input__wrapper.selected[_ngcontent-%COMP%]{border-color:var(--color-palette-secondary-300);box-shadow:0 0 4px #14151a0a,0 8px 16px #14151a14;cursor:default}"],changeDetection:0});const R_e=function(){return{width:"800px"}};function F_e(n,t){if(1&n){const e=We();dt(0),I(1,"p-dialog",1),ue("visibleChange",function(r){return he(de(e).ngIf.showDialog=r)})("onHide",function(){return de(e),he(D().hideDialog())}),Qn(2,"dm"),I(3,"div",2)(4,"dot-ai-image-prompt-input",3),ue("click",function(){const o=de(e).ngIf;return he(D().selectType("input",o.selectedPromptType))})("promptChanged",function(r){return de(e),he(D().generateImage(r))}),Qn(5,"dm"),A(),I(6,"dot-ai-image-prompt-input",4),ue("click",function(){const o=de(e).ngIf;return he(D().selectType("auto",o.selectedPromptType))})("promptChanged",function(r){return de(e),he(D().generateImage(r))}),Qn(7,"dm"),A()()(),ht()}if(2&n){const e=t.ngIf,i=D();C(1),oi(Hr(19,R_e)),ls("header",Zn(2,13,"block-editor.extension.ai-image.dialog-title")),v("visible",e.showDialog)("dismissableMask",!0)("draggable",!1)("resizable",!1),C(3),ls("placeholder",Zn(5,15,"block-editor.extension.ai-image.input-text.placeholder")),v("isLoading",e.status===i.ComponentStatus.LOADING)("selected","input"===e.selectedPromptType),C(2),ls("placeholder",Zn(7,17,"block-editor.extension.ai-image.auto-text.placeholder")),v("isLoading",e.status===i.ComponentStatus.LOADING)("selected","auto"===e.selectedPromptType)}}class rf{constructor(){this.vm$=ct(Ya).vm$,this.ComponentStatus=$n,this.store=ct(Ya)}hideDialog(){this.store.hideDialog()}selectType(t,e){e!=t&&this.store.setPromptType(t)}generateImage(t){this.store.generateImage(t)}}rf.\u0275fac=function(t){return new(t||rf)},rf.\u0275cmp=Me({type:rf,selectors:[["dot-ai-image-prompt"]],standalone:!0,features:[Ns],decls:2,vars:3,consts:[[4,"ngIf"],["appendTo","body",3,"visible","dismissableMask","draggable","resizable","header","visibleChange","onHide"],[1,"dialog-prompts__wrapper","grid"],["type","input",1,"col",3,"isLoading","selected","placeholder","click","promptChanged"],["type","auto",1,"col",3,"isLoading","selected","placeholder","click","promptChanged"]],template:function(t,e){1&t&&(M(0,F_e,8,20,"ng-container",0),Qn(1,"async")),2&t&&v("ngIf",Zn(1,1,e.vm$))},dependencies:[Bo,Du,Kd,x_e,Kt,D_e,C_e,Ag,A_,ea],styles:["dialog-prompts__wrapper[_ngcontent-%COMP%]{gap:2rem}"],changeDetection:0});class j_e{constructor(t){this.destroy$=new ae;const{editor:e,element:i,view:r,pluginKey:o,component:s}=t;this.editor=e,this.element=i,this.view=r,this.element.remove(),this.pluginKey=o,this.component=s,this.store=this.component.injector.get(Ya),this.store.isOpenDialog$.pipe(I0(1),Tn(a=>!1===a),mn(this.destroy$)).subscribe(()=>{this.editor.commands.closeImagePrompt()}),this.store.isLoading$.pipe(Tn(a=>!0===a),mn(this.destroy$)).subscribe(()=>{this.store.hideDialog(),this.editor.chain().insertLoaderNode().closeImagePrompt().run()}),this.store.getContentlets$.pipe(Tn(a=>a.length>0),mn(this.destroy$)).subscribe(a=>{const l=Object.values(a[0])[0];this.editor.chain().deleteSelection().insertImage(l).openAIContentActions(pE).run()})}update(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{open:!1};i.open&&!1===r.open&&this.store.showDialog(this.editor.getText())}destroy(){this.destroy$.next(!0),this.destroy$.complete()}}const z_e=n=>new Wt({key:n.pluginKey,view:t=>new j_e({view:t,...n}),state:{init:()=>({open:!1}),apply(t,e,i){const{open:r}=t.getMeta(kg)||{},o=kg.getState(i);return"boolean"==typeof r?{open:r}:o||e}}}),pE="dotAIImageContent",kg=new on("aiImagePrompt-form"),V_e=n=>Mn.create({name:"aiImagePrompt",addOptions:()=>({element:null,pluginKey:kg}),addCommands:()=>({openImagePrompt:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(kg,{open:!0}),!0)).freezeScroll(!0).run(),closeImagePrompt:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(kg,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const t=n.createComponent(rf);return t.changeDetectorRef.detectChanges(),[z_e({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,component:t})]}}),B_e={duration:[500,0],interactive:!0,maxWidth:200,trigger:"manual",hideOnClick:!1,placement:"bottom-start",popperOptions:{modifiers:[{name:"preventOverflow",options:{altAxis:!0}}]}};class U_e{constructor(t){this.destroy$=new ae;const{editor:e,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=t;this.editor=e,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.aiContentPromptStore=this.component.injector.get(ql),this.dotAiImagePromptStore=this.component.injector.get(Ya),this.component.instance.actionEmitter.pipe(mn(this.destroy$)).subscribe(l=>{switch(l){case Ga.ACCEPT:this.acceptContent();break;case Ga.REGENERATE:this.generateContent();break;case Ga.DELETE:this.deleteContent()}}),this.view.dom.addEventListener("keydown",this.handleKeyDown.bind(this))}update(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{open:!1};i?.open!==r?.open?(this.createTooltip(),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t.parentElement,{...B_e,...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)}acceptContent(){const t=this.pluginKey?.getState(this.view.state);this.editor.commands.closeAIContentActions(),t.nodeType===xg&&this.aiContentPromptStore.setAcceptContent(!0)}generateContent(){const t=this.pluginKey?.getState(this.view.state);switch(this.editor.commands.closeAIContentActions(),t.nodeType){case xg:this.aiContentPromptStore.reGenerateContent();break;case pE:this.dotAiImagePromptStore.reGenerateContent()}}deleteContent(){switch(this.pluginKey?.getState(this.view.state).nodeType){case xg:this.aiContentPromptStore.setDeleteContent(!0);break;case pE:this.editor.commands.deleteSelection()}this.editor.commands.closeAIContentActions()}handleKeyDown(t){"Backspace"===t.key&&this.editor.commands.closeAIContentActions()}}const H_e=n=>new Wt({key:n.pluginKey,view:t=>new U_e({view:t,...n}),state:{init:()=>({open:!1,nodeType:null}),apply(t,e,i){const{open:r,nodeType:o}=t.getMeta(Ng)||{},s=Ng?.getState(i);return"boolean"==typeof r?{open:r,nodeType:o}:s||e}}}),Ng=new on("aiContentActions-form"),$_e=n=>Mn.create({name:"aiContentActions",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Ng}),addCommands:()=>({openAIContentActions:t=>({chain:e})=>e().command(({tr:i})=>(i.setMeta(Ng,{open:!0,nodeType:t}),!0)).freezeScroll(!0).run(),closeAIContentActions:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(Ng,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const t=n.createComponent(Og);return t.changeDetectorRef.detectChanges(),[H_e({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,component:t})]}}),rV={leading:!0,trailing:!1};class q_e{constructor(t,e,i,r){this.duration=t,this.scheduler=e,this.leading=i,this.trailing=r}call(t,e){return e.subscribe(new K_e(t,this.duration,this.scheduler,this.leading,this.trailing))}}class K_e extends te{constructor(t,e,i,r,o){super(t),this.duration=e,this.scheduler=i,this.leading=r,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}_next(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Q_e,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)}}function Q_e(n){const{subscriber:t}=n;t.clearThrottle()}const Z_e={loading:!0,preventScroll:!1,contentlets:[],languageId:1,search:"",assetType:null};class Ou extends fE{constructor(t,e){super(Z_e),this.searchService=t,this.dotLanguageService=e,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(hn(r=>{this.updateLoading(!0),this.updateSearch(r)}),nf(this.state$),fe(([r,o])=>({...o,search:r})),ni(r=>this.searchContentletsRequest(this.params({...r}),[])))),this.nextBatch=this.effect(i=>i.pipe(nf(this.state$),fe(([r,o])=>({...o,offset:r})),ni(({contentlets:r,...o})=>this.searchContentletsRequest(this.params(o),r)))),this.dotLanguageService.getLanguages().subscribe(i=>{this.languages=i})}searchContentletsRequest(t,e){return this.searchService.get(t).pipe(fe(({jsonObjectView:{contentlets:i}})=>{const r=this.setContentletLanguage(i);return this.updateLoading(!1),this.updatePreventScroll(!i?.length),this.updateContentlets([...e,...r])}))}params({search:t,assetType:e,offset:i=0,languageId:r}){return{query:`+catchall:${t.includes("-")?t:`${t}*`} title:'${t}'^15 +languageId:${r} +baseType:(4 OR 9) +metadata.contenttype:${e||""}/* +deleted:false +working:true`,sortOrder:Kb.ASC,limit:20,offset:i}}setContentletLanguage(t){return t.map(e=>({...e,language:this.getLanguage(e.languageId)}))}getLanguage(t){const{languageCode:e,countryCode:i}=this.languages[t];return e&&i?`${e}-${i}`:""}}function J_e(n,t){if(1&n&&(I(0,"div",3),_e(1,"dot-contentlet-thumbnail",4),A()),2&n){const e=D();C(1),v("contentlet",e.contentlet)("cover",!1)("iconSize","72px")("showVideoThumbnail",e.showVideoThumbnail)}}function X_e(n,t){if(1&n&&(I(0,"h2",5),ke(1),A()),2&n){const e=D();C(1),At((null==e.contentlet?null:e.contentlet.fileName)||(null==e.contentlet?null:e.contentlet.title))}}function eve(n,t){if(1&n&&(I(0,"div",6)(1,"span",7),ke(2),A(),_e(3,"dot-state-icon",8),A()),2&n){const e=D();C(2),At(e.contentlet.language),C(1),v("state",e.contentlet)}}Ou.\u0275fac=function(t){return new(t||Ou)(F(Uh),F(Bl))},Ou.\u0275prov=H({token:Ou,factory:Ou.\u0275fac});class Pg{constructor(t){this.dotMarketingConfigService=t,this.showVideoThumbnail=!0}ngOnInit(){this.showVideoThumbnail=this.dotMarketingConfigService.getProperty(Kp.SHOW_VIDEO_THUMBNAIL)}getImage(t){return`/dA/${t}/500w/50q`}getContentletIcon(){return"FILEASSET"!==this.contentlet?.baseType?this.contentlet?.contentTypeIcon:this.contentlet?.__icon__}}Pg.\u0275fac=function(t){return new(t||Pg)(O(vu))},Pg.\u0275cmp=Me({type:Pg,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(t,e){1&t&&(I(0,"p-card"),M(1,J_e,2,4,"ng-template",0),M(2,X_e,2,1,"h2",1),M(3,eve,4,2,"ng-template",2),A()),2&t&&(C(2),v("pTemplate","title"))},dependencies:[tE,qi],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 tve=(()=>{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(e){return new(e||n)},n.\u0275cmp=Me({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(e,i){1&e&&_e(0,"div",0),2&e&&(pn(i.styleClass),v("ngClass",i.containerClass())("ngStyle",i.containerStyle()))},dependencies:[fi,sr],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})(),oV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})();function nve(n,t){1&n&&_e(0,"p-skeleton",3)}function ive(n,t){1&n&&(I(0,"div",4),_e(1,"p-skeleton",5)(2,"p-skeleton",6),A())}class Lg{}function rve(n,t){if(1&n){const e=We();I(0,"dot-asset-card",7),ue("click",function(){de(e);const r=D().$implicit;return he(D(2).selectedItem.emit(r[0]))}),A()}2&n&&v("contentlet",D().$implicit[0])}function ove(n,t){if(1&n){const e=We();I(0,"dot-asset-card",7),ue("click",function(){de(e);const r=D().$implicit;return he(D(2).selectedItem.emit(r[1]))}),A()}2&n&&v("contentlet",D().$implicit[1])}function sve(n,t){if(1&n&&(I(0,"div",5),M(1,rve,1,1,"dot-asset-card",6),M(2,ove,1,1,"dot-asset-card",6),A()),2&n){const e=t.$implicit;C(1),v("ngIf",e[0]),C(1),v("ngIf",e[1])}}function ave(n,t){if(1&n){const e=We();I(0,"p-scroller",3),ue("onScrollIndexChange",function(r){return de(e),he(D().onScrollIndexChange(r))}),M(1,sve,3,2,"ng-template",4),A()}if(2&n){const e=D();v("itemSize",110)("items",e.rows)("lazy",!0)}}function lve(n,t){1&n&&(I(0,"div",5),_e(1,"dot-asset-card-skeleton")(2,"dot-asset-card-skeleton"),A())}function cve(n,t){if(1&n&&(I(0,"div",8),M(1,lve,3,0,"div",9),A()),2&n){const e=D();C(1),v("ngForOf",e.loadingItems)}}function uve(n,t){if(1&n&&(I(0,"div",10),_e(1,"img",11),I(2,"p"),ke(3,"No results found, try searching again"),A()()),2&n){const e=D();C(1),v("src",e.icon,ol)}}Lg.\u0275fac=function(t){return new(t||Lg)},Lg.\u0275cmp=Me({type:Lg,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(t,e){1&t&&(I(0,"p-card"),M(1,nve,1,0,"ng-template",0),_e(2,"p-skeleton",1),M(3,ive,3,0,"ng-template",2),A())},dependencies:[tE,qi,tve],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 Rg{constructor(){this.nextBatch=new re,this.selectedItem=new re,this.done=!1,this.loading=!0,this.loadingItems=[null,null,null],this.icon=zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDEiIHZpZXdCb3g9IjAgMCA0MCA0MSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuMDc2MTcgOC41NTcxMkgwLjA5NTIxNDhWMzYuNDIzOEMwLjA5NTIxNDggMzguNjEzMyAxLjg4NjY0IDQwLjQwNDcgNC4wNzYxNyA0MC40MDQ3SDMxLjk0MjhWMzYuNDIzOEg0LjA3NjE3VjguNTU3MTJaTTM1LjkyMzggMC41OTUyMTVIMTIuMDM4MUM5Ljg0ODU1IDAuNTk1MjE1IDguMDU3MTIgMi4zODY2NCA4LjA1NzEyIDQuNTc2MTdWMjguNDYxOUM4LjA1NzEyIDMwLjY1MTQgOS44NDg1NSAzMi40NDI4IDEyLjAzODEgMzIuNDQyOEgzNS45MjM4QzM4LjExMzMgMzIuNDQyOCAzOS45MDQ3IDMwLjY1MTQgMzkuOTA0NyAyOC40NjE5VjQuNTc2MTdDMzkuOTA0NyAyLjM4NjY0IDM4LjExMzMgMC41OTUyMTUgMzUuOTIzOCAwLjU5NTIxNVpNMzUuOTIzOCAyOC40NjE5SDEyLjAzODFWNC41NzYxN0gzNS45MjM4VjI4LjQ2MTlaTTIxLjk5MDUgMjQuNDgwOUgyNS45NzE0VjE4LjUwOTVIMzEuOTQyOFYxNC41Mjg1SDI1Ljk3MTRWOC41NTcxMkgyMS45OTA1VjE0LjUyODVIMTYuMDE5VjE4LjUwOTVIMjEuOTkwNVYyNC40ODA5WiIgZmlsbD0iIzU3NkJFOCIvPgo8L3N2Zz4K"),this._itemRows=[],this._offset=0}set contentlets(t){this._offset=t?.length||0,this._itemRows=this.createRowItem(t)}get rows(){return[...this._itemRows]}onScrollIndexChange(t){this.done||t.last===this.rows.length&&this.nextBatch.emit(this._offset)}createRowItem(t=[]){const e=[];return t.forEach(i=>{const r=e.length-1;e[r]?.length<2?e[r].push(i):e.push([i])}),e}}Rg.\u0275fac=function(t){return new(t||Rg)},Rg.\u0275cmp=Me({type:Rg,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(t,e){if(1&t&&(M(0,ave,2,3,"p-scroller",0),M(1,cve,2,1,"ng-template",null,1,Bn),M(3,uve,4,1,"ng-template",null,2,Bn)),2&t){const i=Dn(2),r=Dn(4);v("ngIf",(null==e.rows?null:e.rows.length)&&!e.loading)("ngIfElse",e.loading?i:r)}},dependencies:[Gr,Kt,qi,U5,Pg,Lg],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 dve=["input"];function hve(n,t){if(1&n){const e=We();dt(0),I(1,"dot-asset-card-list",6),ue("selectedItem",function(r){return de(e),he(D().addAsset.emit(r))})("nextBatch",function(r){return de(e),he(D().offset$.next(r))}),A(),ht()}if(2&n){const e=t.ngIf;C(1),v("contentlets",e.contentlets)("done",e.preventScroll)("loading",e.loading)}}class Fg{constructor(t){this.store=t,this.addAsset=new re,this.vm$=this.store.vm$,this.offset$=new Kr(0),this.destroy$=new ae}set languageId(t){this.store.updatelanguageId(t)}set type(t){this.store.updateAssetType(t)}ngOnInit(){this.store.searchContentlet(""),this.offset$.pipe(mn(this.destroy$),I0(1),function Y_e(n,t=Zd,e=rV){return i=>i.lift(new q_e(n,t,e.leading,e.trailing))}(450)).subscribe(this.store.nextBatch),requestAnimationFrame(()=>this.input.nativeElement.focus())}ngAfterViewInit(){Tv(this.input.nativeElement,"input").pipe(mn(this.destroy$),Xd(450)).subscribe(({target:t})=>{this.store.searchContentlet(t.value)})}ngOnDestroy(){this.destroy$.next(!0)}}Fg.\u0275fac=function(t){return new(t||Fg)(O(Ou))},Fg.\u0275cmp=Me({type:Fg,selectors:[["dot-asset-search"]],viewQuery:function(t,e){if(1&t&&en(dve,5),2&t){let i;Ke(i=Qe())&&(e.input=i.first)}},inputs:{languageId:"languageId",type:"type"},outputs:{addAsset:"addAsset"},features:[Pt([Ou])],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(t,e){1&t&&(dt(0),I(1,"div",0)(2,"span",1),_e(3,"input",2,3)(5,"i",4),A()(),ht(),M(6,hve,2,3,"ng-container",5),Qn(7,"async")),2&t&&(C(6),v("ngIf",Zn(7,1,e.vm$)))},dependencies:[Kt,vg,Rg,A_],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 fve=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'}},pve=["input"],gve=/(youtube\.com\/watch\?v=.*)|(youtu\.be\/.*)/;class jg{constructor(t,e){this.fb=t,this.cd=e,this.addAsset=new re,this.disableAction=!1,this.form=this.fb.group({url:["",[Ud.required,Ud.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(gve)&&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:t}){this.addAsset.emit(t)}tryToPlayVideo(t){const e=document.createElement("video");this.disableAction=!0,e.addEventListener("error",i=>{this.form.controls.url.setErrors({message:fve(i)}),this.cd.detectChanges()}),e.addEventListener("canplay",()=>{this.form.controls.url.setErrors(null),this.disableAction=!1,this.cd.detectChanges()}),e.src=`${t}#t=0.1`}}jg.\u0275fac=function(t){return new(t||jg)(O(iv),O(Un))},jg.\u0275cmp=Me({type:jg,selectors:[["dot-external-asset"]],viewQuery:function(t,e){if(1&t&&en(pve,5),2&t){let i;Ke(i=Qe())&&(e.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(t,e){1&t&&(I(0,"form",0),ue("ngSubmit",function(){return e.onSubmit(e.form.value)}),I(1,"div",1)(2,"label",2),ke(3),A(),_e(4,"input",3,4),A(),I(6,"div",5),_e(7,"span",6),I(8,"button",7),ke(9,"Insert"),A()()()),2&t&&(v("formGroup",e.form),C(3),Yi("Insert ",e.type," URL"),C(1),v("placeholder",e.placerHolder),C(3),yo("hide",!e.isInvalid||e.form.pristine),v("innerHTML",e.error||"Enter a valid url",yc),C(1),v("disabled",e.form.invalid||e.disableAction))},dependencies:[qd,dl,Ic,Hd,Aa,Oc,Vo,vg],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 yve=ov("shakeit",[$2("shakestart",Ai({transform:"scale(1.1)"})),$2("shakeend",Ai({transform:"scale(1)"})),Nc("shakestart => shakeend",kc("1000ms ease-in",function Zq(n){return{type:5,steps:n}}([Ai({transform:"translate3d(-2px, 0, 0)",offset:.1}),Ai({transform:"translate3d(4px, 0, 0)",offset:.2}),Ai({transform:"translate3d(-4px, 0, 0)",offset:.3}),Ai({transform:"translate3d(4px, 0, 0)",offset:.4}),Ai({transform:"translate3d(-4px, 0, 0)",offset:.5}),Ai({transform:"translate3d(4px, 0, 0)",offset:.6}),Ai({transform:"translate3d(-4px, 0, 0)",offset:.7}),Ai({transform:"translate3d(4px, 0, 0)",offset:.8}),Ai({transform:"translate3d(-2px, 0, 0)",offset:.9})])))]);function _ve(n,t){1&n&&_e(0,"span",11),2&n&&v("innerHTML",D(2).$implicit.summary,yc)}function vve(n,t){1&n&&_e(0,"span",12),2&n&&v("innerHTML",D(2).$implicit.detail,yc)}function bve(n,t){if(1&n&&(dt(0),M(1,_ve,1,1,"span",9),M(2,vve,1,1,"span",10),ht()),2&n){const e=D().$implicit;C(1),v("ngIf",e.summary),C(1),v("ngIf",e.detail)}}function wve(n,t){if(1&n&&(I(0,"span",15),ke(1),A()),2&n){const e=D(2).$implicit;C(1),At(e.summary)}}function Cve(n,t){if(1&n&&(I(0,"span",16),ke(1),A()),2&n){const e=D(2).$implicit;C(1),At(e.detail)}}function Dve(n,t){if(1&n&&(M(0,wve,2,1,"span",13),M(1,Cve,2,1,"span",14)),2&n){const e=D().$implicit;v("ngIf",e.summary),C(1),v("ngIf",e.detail)}}function Tve(n,t){if(1&n){const e=We();I(0,"button",17),ue("click",function(){de(e);const r=D().index;return he(D(2).removeMessage(r))}),_e(1,"i",18),A()}}const Mve=function(n,t){return{showTransitionParams:n,hideTransitionParams:t}},Sve=function(n){return{value:"visible",params:n}},Eve=function(n,t,e,i){return{"pi-info-circle":n,"pi-check":t,"pi-exclamation-triangle":e,"pi-times-circle":i}};function xve(n,t){if(1&n&&(I(0,"div",4)(1,"div",5),_e(2,"span",6),M(3,bve,3,2,"ng-container",1),M(4,Dve,2,2,"ng-template",null,7,Bn),M(6,Tve,2,0,"button",8),A()()),2&n){const e=t.$implicit,i=Dn(5),r=D(2);pn("p-message p-message-"+e.severity),v("@messageAnimation",Mt(12,Sve,bi(9,Mve,r.showTransitionOptions,r.hideTransitionOptions))),C(2),pn("p-message-icon pi"+(e.icon?" "+e.icon:"")),v("ngClass",Rd(14,Eve,"info"===e.severity,"success"===e.severity,"warn"===e.severity,"error"===e.severity)),C(1),v("ngIf",!r.escape)("ngIfElse",i),C(3),v("ngIf",r.closable)}}function Ive(n,t){if(1&n&&(dt(0),M(1,xve,7,19,"div",3),ht()),2&n){const e=D();C(1),v("ngForOf",e.messages)}}function Ove(n,t){1&n&&_t(0)}function Ave(n,t){if(1&n&&(I(0,"div",19)(1,"div",5),M(2,Ove,1,0,"ng-container",20),A()()),2&n){const e=D();v("ngClass","p-message p-message-"+e.severity),C(2),v("ngTemplateOutlet",e.contentTemplate)}}let kve=(()=>{class n{constructor(e,i,r){this.messageService=e,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(e){this.messages=e,this.startMessageLifes(this.messages)}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template}),this.messageService&&this.enableService&&!this.contentTemplate&&(this.messageSubscription=this.messageService.messageObserver.subscribe(e=>{if(e){e instanceof Array||(e=[e]);const i=e.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(e=>{e?this.key===e&&(this.messages=null):this.messages=null,this.cd.markForCheck()}))}hasMessages(){let e=this.el.nativeElement.parentElement;return!(!e||!e.offsetParent)&&(null!=this.contentTemplate||this.messages&&this.messages.length>0)}clear(){this.messages=[],this.valueChange.emit(this.messages)}removeMessage(e){this.messages=this.messages.filter((i,r)=>r!==e),this.valueChange.emit(this.messages)}get icon(){const e=this.severity||(this.hasMessages()?this.messages[0].severity:null);if(this.hasMessages())switch(e){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(e=>e.unsubscribe())}startMessageLifes(e){e?.forEach(i=>i.life&&this.startMessageLife(i))}startMessageLife(e){const i=WL(e.life).subscribe(()=>{this.messages=this.messages?.filter(r=>r!==e),this.timerSubscriptions=this.timerSubscriptions?.filter(r=>r!==i),this.valueChange.emit(this.messages),this.cd.markForCheck()});this.timerSubscriptions.push(i)}}return n.\u0275fac=function(e){return new(e||n)(O(JQ,8),O(Tt),O(Un))},n.\u0275cmp=Me({type:n,selectors:[["p-messages"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(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(e,i){if(1&e&&(I(0,"div",0),M(1,Ive,2,1,"ng-container",1),M(2,Ave,3,2,"ng-template",null,2,Bn),A()),2&e){const r=Dn(3);pn(i.styleClass),v("ngStyle",i.style),C(1),v("ngIf",!i.contentTemplate)("ngIfElse",r)}},dependencies:[fi,Gr,Kt,_o,sr,zc],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:[ov("messageAnimation",[Nc(":enter",[Ai({opacity:0,transform:"translateY(-25%)"}),kc("{{showTransitionParams}}")]),Nc(":leave",[kc("{{hideTransitionParams}}",Ai({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0}),n})(),sV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,Pa]}),n})();function Nve(n,t){if(1&n&&(I(0,"div",5),ke(1),A()),2&n){const e=D(2);Dc("display",null!=e.value&&0!==e.value?"flex":"none"),C(1),r_("",e.value,"",e.unit,"")}}function Pve(n,t){if(1&n&&(I(0,"div",3),M(1,Nve,2,4,"div",4),A()),2&n){const e=D();Dc("width",e.value+"%")("background",e.color),C(1),v("ngIf",e.showValue)}}function Lve(n,t){if(1&n&&(I(0,"div",6),_e(1,"div",7),A()),2&n){const e=D();C(1),Dc("background",e.color)}}const Rve=function(n,t){return{"p-progressbar p-component":!0,"p-progressbar-determinate":n,"p-progressbar-indeterminate":t}};let Fve=(()=>{class n{constructor(){this.showValue=!0,this.unit="%",this.mode="determinate"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({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(e,i){1&e&&(I(0,"div",0),M(1,Pve,2,5,"div",1),M(2,Lve,2,2,"div",2),A()),2&e&&(pn(i.styleClass),v("ngStyle",i.style)("ngClass",bi(7,Rve,"determinate"===i.mode,"indeterminate"===i.mode)),Ot("aria-valuenow",i.value),C(1),v("ngIf","determinate"===i.mode),C(1),v("ngIf","indeterminate"===i.mode))},dependencies:[fi,Kt,sr],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})(),aV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn]}),n})();const jve=["advancedfileinput"],zve=["basicfileinput"],Vve=["content"];function Bve(n,t){if(1&n){const e=We();I(0,"p-button",17),ue("onClick",function(){return de(e),he(D(2).upload())}),A()}if(2&n){const e=D(2);v("label",e.uploadButtonLabel)("icon",e.uploadIcon)("disabled",!e.hasFiles()||e.isFileLimitExceeded())("styleClass",e.uploadStyleClass)}}function Uve(n,t){if(1&n){const e=We();I(0,"p-button",17),ue("onClick",function(){return de(e),he(D(2).clear())}),A()}if(2&n){const e=D(2);v("label",e.cancelButtonLabel)("icon",e.cancelIcon)("disabled",!e.hasFiles()||e.uploading)("styleClass",e.cancelStyleClass)}}function Hve(n,t){1&n&&_t(0)}function $ve(n,t){1&n&&_e(0,"p-progressBar",18),2&n&&v("value",D(2).progress)("showValue",!1)}function Wve(n,t){if(1&n){const e=We();I(0,"img",26),ue("error",function(r){return de(e),he(D(5).imageError(r))}),A()}if(2&n){const e=D().$implicit,i=D(4);v("src",e.objectURL,ol)("width",i.previewWidth)}}function Gve(n,t){if(1&n){const e=We();I(0,"div",22)(1,"div"),M(2,Wve,1,2,"img",23),A(),I(3,"div",24),ke(4),A(),I(5,"div"),ke(6),A(),I(7,"div")(8,"button",25),ue("click",function(r){const s=de(e).index;return he(D(4).remove(r,s))}),A()()()}if(2&n){const e=t.$implicit,i=D(4);C(2),v("ngIf",i.isImage(e)),C(2),At(e.name),C(2),At(i.formatSize(e.size)),C(2),pn(i.removeStyleClass),v("disabled",i.uploading)}}function Yve(n,t){if(1&n&&(I(0,"div"),M(1,Gve,9,6,"div",21),A()),2&n){const e=D(3);C(1),v("ngForOf",e.files)}}function qve(n,t){}function Kve(n,t){if(1&n&&(I(0,"div"),M(1,qve,0,0,"ng-template",27),A()),2&n){const e=D(3);C(1),v("ngForOf",e.files)("ngForTemplate",e.fileTemplate)}}function Qve(n,t){if(1&n&&(I(0,"div",19),M(1,Yve,2,1,"div",20),M(2,Kve,2,2,"div",20),A()),2&n){const e=D(2);C(1),v("ngIf",!e.fileTemplate),C(1),v("ngIf",e.fileTemplate)}}function Zve(n,t){1&n&&_t(0)}const Jve=function(n,t){return{"p-focus":n,"p-disabled":t}},Xve=function(n){return{$implicit:n}};function ebe(n,t){if(1&n){const e=We();I(0,"div",2)(1,"div",3)(2,"span",4),ue("focus",function(){return de(e),he(D().onFocus())})("blur",function(){return de(e),he(D().onBlur())})("click",function(){return de(e),he(D().choose())})("keydown.enter",function(){return de(e),he(D().choose())}),I(3,"input",5,6),ue("change",function(r){return de(e),he(D().onFileSelect(r))}),A(),_e(5,"span",7),I(6,"span",8),ke(7),A()(),M(8,Bve,1,4,"p-button",9),M(9,Uve,1,4,"p-button",9),M(10,Hve,1,0,"ng-container",10),A(),I(11,"div",11,12),ue("dragenter",function(r){return de(e),he(D().onDragEnter(r))})("dragleave",function(r){return de(e),he(D().onDragLeave(r))})("drop",function(r){return de(e),he(D().onDrop(r))}),M(13,$ve,1,2,"p-progressBar",13),_e(14,"p-messages",14),M(15,Qve,3,2,"div",15),M(16,Zve,1,0,"ng-container",16),A()()}if(2&n){const e=D();pn(e.styleClass),v("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",e.style),C(2),pn(e.chooseStyleClass),v("ngClass",bi(24,Jve,e.focus,e.disabled||e.isChooseDisabled())),C(1),v("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),Ot("title",""),C(2),pn(e.chooseIcon),v("ngClass","p-button-icon p-button-icon-left"),C(2),At(e.chooseButtonLabel),C(1),v("ngIf",!e.auto&&e.showUploadButton),C(1),v("ngIf",!e.auto&&e.showCancelButton),C(1),v("ngTemplateOutlet",e.toolbarTemplate),C(3),v("ngIf",e.hasFiles()),C(1),v("value",e.msgs)("enableService",!1),C(1),v("ngIf",e.hasFiles()),C(1),v("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",Mt(27,Xve,e.files))}}function tbe(n,t){if(1&n&&(I(0,"span",8),ke(1),A()),2&n){const e=D(2);C(1),At(e.basicButtonLabel)}}function nbe(n,t){if(1&n){const e=We();I(0,"input",33,34),ue("change",function(r){return de(e),he(D(2).onFileSelect(r))})("focus",function(){return de(e),he(D(2).onFocus())})("blur",function(){return de(e),he(D(2).onBlur())}),A()}if(2&n){const e=D(2);v("accept",e.accept)("multiple",e.multiple)("disabled",e.disabled)}}const ibe=function(n,t,e,i){return{"p-button p-component p-fileupload-choose":!0,"p-button-icon-only":n,"p-fileupload-choose-selected":t,"p-focus":e,"p-disabled":i}};function rbe(n,t){if(1&n){const e=We();I(0,"div",28),_e(1,"p-messages",14),I(2,"span",29),ue("mouseup",function(){return de(e),he(D().onBasicUploaderClick())})("keydown",function(r){return de(e),he(D().onBasicKeydown(r))}),_e(3,"span",30),M(4,tbe,2,1,"span",31),M(5,nbe,2,3,"input",32),A()()}if(2&n){const e=D();C(1),v("value",e.msgs)("enableService",!1),C(1),pn(e.styleClass),v("ngClass",Rd(9,ibe,!e.basicButtonLabel,e.hasFiles(),e.focus,e.disabled))("ngStyle",e.style),C(1),v("ngClass",e.hasFiles()&&!e.auto?e.uploadIcon:e.chooseIcon),C(1),v("ngIf",e.basicButtonLabel),C(1),v("ngIf",!e.hasFiles())}}let obe=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,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(e){this._files=[];for(let i=0;i{switch(e.getType()){case"file":default:this.fileTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"toolbar":this.toolbarTemplate=e.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(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.msgs=[],this.multiple||(this.files=[]);let i=e.dataTransfer?e.dataTransfer.files:e.target.files;for(let r=0;rthis.maxFileSize&&(this.msgs.push({severity:"error",summary:this.invalidFileSizeMessageSummary.replace("{0}",e.name),detail:this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}),1))}isFileTypeValid(e){let i=this.accept.split(",").map(r=>r.trim());for(let r of i)if(this.isWildcard(r)?this.getTypeClass(e.type)===this.getTypeClass(r):e.type==r||this.getFileExtension(e).toLowerCase()===r.toLowerCase())return!0;return!1}getTypeClass(e){return e.substring(0,e.indexOf("/"))}isWildcard(e){return-1!==e.indexOf("*")}getFileExtension(e){return"."+e.name.split(".").pop()}isImage(e){return/^image\//.test(e.type)}onImageLoad(e){window.URL.revokeObjectURL(e.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 e=new FormData;this.onBeforeUpload.emit({formData:e});for(let i=0;i{switch(i.type){case An.Sent:this.onSend.emit({originalEvent:i,formData:e});break;case An.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 An.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(e,i){this.clearInputElement(),this.onRemove.emit({originalEvent:e,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(e){this.disabled||(e.stopPropagation(),e.preventDefault())}onDragOver(e){this.disabled||(Z.addClass(this.content.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,e.stopPropagation(),e.preventDefault())}onDragLeave(e){this.disabled||Z.removeClass(this.content.nativeElement,"p-fileupload-highlight")}onDrop(e){if(!this.disabled){Z.removeClass(this.content.nativeElement,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault();let i=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||i&&1===i.length)&&this.onFileSelect(e)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(e){if(0==e)return"0 B";let s=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/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(e){switch(e.code){case"Space":case"Enter":this.onBasicUploaderClick(),e.preventDefault()}}imageError(e){this.onImageError.emit(e)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(jc.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(jc.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(jc.CANCEL)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.content.nativeElement.removeEventListener("dragover",this.onDragOver),this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(uT),O(qt),O(ar),O(Un),O(Fc))},n.\u0275cmp=Me({type:n,selectors:[["p-fileUpload"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(jve,5),en(zve,5),en(Vve,5)),2&e){let r;Ke(r=Qe())&&(i.advancedFileInput=r.first),Ke(r=Qe())&&(i.basicFileInput=r.first),Ke(r=Qe())&&(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(e,i){1&e&&(M(0,ebe,17,29,"div",0),M(1,rbe,6,14,"div",1)),2&e&&(v("ngIf","advanced"===i.mode),C(1),v("ngIf","basic"===i.mode))},dependencies:[fi,Gr,Kt,_o,sr,Vo,zL,Fve,kve,zc],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})(),lV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,zo,Bo,aV,sV,Pa,zo,Bo,aV,sV]}),n})();function sbe(n,t){if(1&n&&(dt(0),_e(1,"img",3),ht()),2&n){const e=D();C(1),v("src",e.src||e.file.objectURL,ol)("alt",e.file.name)}}function abe(n,t){if(1&n&&(dt(0),I(1,"video",4),_e(2,"source",5),A(),ht()),2&n){const e=D();C(2),v("src",e.src||e.file.objectURL,ol)}}function lbe(n,t){1&n&&(I(0,"p"),ke(1,"Select an accepted asset type"),A())}class zg{}function cbe(n,t){if(1&n){const e=We();I(0,"p-fileUpload",2),ue("onSelect",function(r){return de(e),he(D().onSelectFile(r.files))}),A()}2&n&&v("accept",D().type+"/*")("customUpload",!0)}function ube(n,t){if(1&n&&_e(0,"dot-asset-preview",11),2&n){const e=D(2);v("type",e.type)("file",e.file)("src",e.src)}}function dbe(n,t){if(1&n&&(I(0,"span",13),ke(1),A()),2&n){const e=D(3);C(1),At(e.error)}}function hbe(n,t){1&n&&M(0,dbe,2,1,"ng-template",null,12,Bn)}function fbe(n,t){if(1&n){const e=We();I(0,"div",3),M(1,ube,1,3,"dot-asset-preview",4),M(2,hbe,2,0,null,5),A(),I(3,"div",6)(4,"div",7),_e(5,"dot-spinner",8),I(6,"span",9),ue("@shakeit.done",function(r){return de(e),he(D().shakeEnd(r))}),ke(7),A()(),I(8,"button",10),ue("click",function(){return de(e),he(D().cancelAction())}),ke(9," Cancel "),A()()}if(2&n){const e=D();C(1),v("ngIf","UPLOAD"===e.status),C(1),v("ngIf","ERROR"===e.status),C(3),v("size","30px"),C(1),v("@shakeit",e.animation),C(1),Yi(" ",e.errorMessage," ")}}zg.\u0275fac=function(t){return new(t||zg)},zg.\u0275cmp=Me({type:zg,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(t,e){1&t&&(dt(0,0),M(1,sbe,2,2,"ng-container",1),M(2,abe,3,1,"ng-container",1),M(3,lbe,2,0,"p",2),ht()),2&t&&(v("ngSwitch",e.type),C(1),v("ngSwitchCase","image"),C(1),v("ngSwitchCase","video"))},dependencies:[Vd,I_,O_],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 ra=(()=>(function(n){n.SELECT="SELECT",n.PREVIEW="PREVIEW",n.UPLOAD="UPLOAD",n.ERROR="ERROR"}(ra||(ra={})),ra))();class Vg{constructor(t,e,i,r){this.sanitizer=t,this.dotUploadFileService=e,this.cd=i,this.el=r,this.uploadedFile=new re,this.preventClose=new re,this.hide=new re,this.status=ra.SELECT,this.animation="shakeend"}get errorMessage(){return` Don't close this window while the ${this.type} uploads`}onClick(t){const e=!this.el.nativeElement.contains(t);this.status===ra.UPLOAD&&e&&this.shakeMe()}ngOnDestroy(){this.preventClose.emit(!1)}onSelectFile(t){const e=t[0],i=new FileReader;this.preventClose.emit(!0),i.onload=r=>this.setFile(e,r.target.result),i.readAsArrayBuffer(e)}cancelAction(){this.file=null,this.status=ra.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=ra.UPLOAD,this.$uploadRequestSubs=this.dotUploadFileService.publishContent({data:this.file,signal:this.controller.signal}).pipe(Et(1),Fi(t=>this.handleError(t))).subscribe(t=>{const e=t[0];this.uploadedFile.emit(e[Object.keys(e)[0]]),this.status=ra.SELECT})}setFile(t,e){const i=new Blob([new Uint8Array(e)],{type:"video/mp4"});this.src=this.sanitizer.bypassSecurityTrustResourceUrl(URL.createObjectURL(i)),this.file=t,this.status=ra.UPLOAD,this.uploadFile(),this.cd.markForCheck()}handleError(t){return this.status=ra.ERROR,this.preventClose.emit(!1),this.error=t?.error?.errors[0]||t.error,console.error(t),vo(t)}cancelUploading(){this.$uploadRequestSubs.unsubscribe(),this.controller?.abort()}}Vg.\u0275fac=function(t){return new(t||Vg)(O(uT),O(Xs),O(Un),O(Tt))},Vg.\u0275cmp=Me({type:Vg,selectors:[["dot-upload-asset"]],hostBindings:function(t,e){1&t&&ue("click",function(r){return e.onClick(r.target)},0,QI)},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(t,e){if(1&t&&(M(0,cbe,1,2,"p-fileUpload",0),M(1,fbe,10,5,"ng-template",null,1,Bn)),2&t){const i=Dn(2);v("ngIf","SELECT"===e.status)("ngIfElse",i)}},dependencies:[Kt,Wh,Vo,obe,zg],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:[yve]},changeDetection:0});let uV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,zF,Pa,Du,zF,Du]}),n})();function Vbe(n,t){1&n&&_t(0)}function Bbe(n,t){if(1&n&&(dt(0),M(1,Vbe,1,0,"ng-container",3),ht()),2&n){const e=D(2);C(1),v("ngTemplateOutlet",e.contentTemplate)}}function Ube(n,t){if(1&n&&(I(0,"div",1),Ri(1),M(2,Bbe,2,1,"ng-container",2),A()),2&n){const e=D();v("hidden",!e.selected),Ot("id",e.id)("aria-hidden",!e.selected)("aria-labelledby",e.id+"-label"),C(2),v("ngIf",e.contentTemplate&&(e.cache?e.loaded:e.selected))}}const dV=["*"],Hbe=["content"],$be=["navbar"],Wbe=["prevBtn"],Gbe=["nextBtn"],Ybe=["inkbar"];function qbe(n,t){if(1&n){const e=We();I(0,"button",12,13),ue("click",function(){return de(e),he(D().navBackward())}),_e(2,"span",14),A()}}function Kbe(n,t){1&n&&_e(0,"span",24),2&n&&v("ngClass",D(3).$implicit.leftIcon)}function Qbe(n,t){1&n&&_e(0,"span",25),2&n&&v("ngClass",D(3).$implicit.rightIcon)}function Zbe(n,t){if(1&n&&(dt(0),M(1,Kbe,1,1,"span",21),I(2,"span",22),ke(3),A(),M(4,Qbe,1,1,"span",23),ht()),2&n){const e=D(2).$implicit;C(1),v("ngIf",e.leftIcon),C(2),At(e.header),C(1),v("ngIf",e.rightIcon)}}function Jbe(n,t){1&n&&_t(0)}function Xbe(n,t){if(1&n){const e=We();I(0,"span",26),ue("click",function(r){de(e);const o=D(2).$implicit;return he(D().close(r,o))}),A()}}const e0e=function(n,t){return{"p-highlight":n,"p-disabled":t}};function t0e(n,t){if(1&n){const e=We();I(0,"li",16)(1,"a",17),ue("click",function(r){de(e);const o=D().$implicit;return he(D().open(r,o))})("keydown.enter",function(r){de(e);const o=D().$implicit;return he(D().open(r,o))}),M(2,Zbe,5,3,"ng-container",18),M(3,Jbe,1,0,"ng-container",19),M(4,Xbe,1,0,"span",20),A()()}if(2&n){const e=D().$implicit;pn(e.headerStyleClass),v("ngClass",bi(16,e0e,e.selected,e.disabled))("ngStyle",e.headerStyle),C(1),v("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),Ot("id",e.id+"-label")("aria-selected",e.selected)("aria-controls",e.id)("aria-selected",e.selected)("tabindex",e.disabled?null:"0"),C(1),v("ngIf",!e.headerTemplate),C(1),v("ngTemplateOutlet",e.headerTemplate),C(1),v("ngIf",e.closable)}}function n0e(n,t){1&n&&M(0,t0e,5,19,"li",15),2&n&&v("ngIf",!t.$implicit.closed)}function i0e(n,t){if(1&n){const e=We();I(0,"button",27,28),ue("click",function(){return de(e),he(D().navForward())}),_e(2,"span",29),A()}}const r0e=function(n){return{"p-tabview p-component":!0,"p-tabview-scrollable":n}};let o0e=0,hV=(()=>{class n{constructor(e,i,r){this.viewContainer=i,this.cd=r,this.cache=!0,this.tooltipPosition="top",this.tooltipPositionStyle="absolute",this.id="p-tabpanel-"+o0e++,this.tabView=e}ngAfterContentInit(){this.templates.forEach(e=>{"header"===e.getType()?this.headerTemplate=e.template:this.contentTemplate=e.template})}get selected(){return this._selected}set selected(e){this._selected=e,this.loaded||this.cd.detectChanges(),e&&(this.loaded=!0)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.tabView.cd.markForCheck()}get header(){return this._header}set header(e){this._header=e,Promise.resolve().then(()=>{this.tabView.updateInkBar(),this.tabView.cd.markForCheck()})}get leftIcon(){return this._leftIcon}set leftIcon(e){this._leftIcon=e,this.tabView.cd.markForCheck()}get rightIcon(){return this._rightIcon}set rightIcon(e){this._rightIcon=e,this.tabView.cd.markForCheck()}ngOnDestroy(){this.view=null}}return n.\u0275fac=function(e){return new(e||n)(O(Ut(()=>fV)),O($r),O(Un))},n.\u0275cmp=Me({type:n,selectors:[["p-tabPanel"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(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:dV,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(e,i){1&e&&(go(),M(0,Ube,3,5,"div",0)),2&e&&v("ngIf",!i.closed)},dependencies:[Kt,_o],encapsulation:2}),n})(),fV=(()=>{class n{constructor(e,i){this.el=e,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(e=>{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(e,i){if(i.disabled)e&&e.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:e,index:o}),this.updateScrollBar(o)}e&&e.preventDefault()}}close(e,i){this.controlClose?this.onClose.emit({originalEvent:e,index:this.findTabIndex(i),close:()=>{this.closeTab(i)}}):(this.closeTab(i),this.onClose.emit({originalEvent:e,index:this.findTabIndex(i)})),e.stopPropagation()}closeTab(e){if(!e.disabled){if(e.selected){this.tabChanged=!0,e.selected=!1;for(let i=0;ithis._activeIndex&&(this.findSelectedTab().selected=!1,this.tabs[this._activeIndex].selected=!0,this.tabChanged=!0,this.updateScrollBar(e))}updateInkBar(){if(this.navbar){const e=Z.findSingle(this.navbar.nativeElement,"li.p-highlight");if(!e)return;this.inkbar.nativeElement.style.width=Z.getWidth(e)+"px",this.inkbar.nativeElement.style.left=Z.getOffset(e).left-Z.getOffset(this.navbar.nativeElement).left+"px"}}updateScrollBar(e){this.navbar.nativeElement.children[e].scrollIntoView({block:"nearest"})}updateButtonState(){const e=this.content.nativeElement,{scrollLeft:i,scrollWidth:r}=e,o=Z.getWidth(e);this.backwardIsDisabled=0===i,this.forwardIsDisabled=parseInt(i)===r-o}onScroll(e){this.scrollable&&this.updateButtonState(),e.preventDefault()}getVisibleButtonWidths(){return[this.prevBtn?.nativeElement,this.nextBtn?.nativeElement].reduce((e,i)=>i?e+Z.getWidth(i):e,0)}navBackward(){const e=this.content.nativeElement,i=Z.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft-i;e.scrollLeft=r<=0?0:r}navForward(){const e=this.content.nativeElement,i=Z.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft+i,o=e.scrollWidth-i;e.scrollLeft=r>=o?o:r}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(Un))},n.\u0275cmp=Me({type:n,selectors:[["p-tabView"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,hV,4),2&e){let o;Ke(o=Qe())&&(i.tabPanels=o)}},viewQuery:function(e,i){if(1&e&&(en(Hbe,5),en($be,5),en(Wbe,5),en(Gbe,5),en(Ybe,5)),2&e){let r;Ke(r=Qe())&&(i.content=r.first),Ke(r=Qe())&&(i.navbar=r.first),Ke(r=Qe())&&(i.prevBtn=r.first),Ke(r=Qe())&&(i.nextBtn=r.first),Ke(r=Qe())&&(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:dV,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(e,i){1&e&&(go(),I(0,"div",0)(1,"div",1),M(2,qbe,3,0,"button",2),I(3,"div",3,4),ue("scroll",function(o){return i.onScroll(o)}),I(5,"ul",5,6),M(7,n0e,1,1,"ng-template",7),_e(8,"li",8,9),A()(),M(10,i0e,3,0,"button",10),A(),I(11,"div",11),Ri(12),A()()),2&e&&(pn(i.styleClass),v("ngClass",Mt(7,r0e,i.scrollable))("ngStyle",i.style),C(2),v("ngIf",i.scrollable&&!i.backwardIsDisabled),C(5),v("ngForOf",i.tabs),C(3),v("ngIf",i.scrollable&&!i.forwardIsDisabled))},dependencies:[fi,Gr,Kt,_o,sr,fg,zc],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})(),pV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=lt({imports:[wn,zo,Du,Pa,zo]}),n})();class Au{}Au.\u0275fac=function(t){return new(t||Au)},Au.\u0275mod=Xe({type:Au}),Au.\u0275inj=lt({imports:[uV,Dz,Bo,Tz,vz,IM,pM,pV,oV,H5,lV,yT,uV,Dz,Bo,Tz,vz,IM,pM,pV,oV,H5,lV,yT]});class sf{}sf.\u0275fac=function(t){return new(t||sf)},sf.\u0275mod=Xe({type:sf}),sf.\u0275inj=lt({providers:[Xs],imports:[wn,rv,Kd,Cu,Au]}),Si($h,[qi,fV,hV,jg,Fg,Vg],[]);class ku{}ku.\u0275fac=function(t){return new(t||ku)},ku.\u0275mod=Xe({type:ku}),ku.\u0275inj=lt({providers:[Hl],imports:[wn,rv,Kd,Bo]}),Si(Wl,[Gr,Kt,Bh,_u,Vh],[]);class af{}af.\u0275fac=function(t){return new(t||af)},af.\u0275mod=Xe({type:af}),af.\u0275inj=lt({providers:[Xs,Co,Uc,$l,Zr,{provide:sp,useFactory:n=>()=>n.init(),deps:[Zr],multi:!0}],imports:[wn,rv,Kd,ku,Au,sf,Qh,rf,Kd,ku]}),Si(ef,[Gr,Kt,Cg],[]),Si(Xh,[Kt,qd,dl,Ic,Hd,Aa,Oc,nE,Vo,vg,wg,Jh],[]),Si(Jh,[Gr,Kt,Bh,_u,lg,Vh],[]);class a0e extends TypeError{constructor(t,e){let i;const{message:r,explanation:o,...s}=t,{path:a}=t,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=[t,...e()])}}function Zo(n){return"object"==typeof n&&null!=n}function Ni(n){return"symbol"==typeof n?n.toString():"string"==typeof n?JSON.stringify(n):`${n}`}function u0e(n,t,e,i){if(!0===n)return;!1===n?n={}:"string"==typeof n&&(n={message:n});const{path:r,branch:o}=t,{type:s}=e,{refinement:a,message:l=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${Ni(i)}\``}=n;return{value:i,type:s,refinement:a,key:r[r.length-1],path:r,branch:o,...n,message:l}}function*mE(n,t,e,i){(function l0e(n){return Zo(n)&&"function"==typeof n[Symbol.iterator]})(n)||(n=[n]);for(const r of n){const o=u0e(r,t,e,i);o&&(yield o)}}function*gE(n,t,e={}){const{path:i=[],branch:r=[n],coerce:o=!1,mask:s=!1}=e,a={path:i,branch:r};if(o&&(n=t.coercer(n,a),s&&"type"!==t.type&&Zo(t.schema)&&Zo(n)&&!Array.isArray(n)))for(const c in n)void 0===t.schema[c]&&delete n[c];let l="valid";for(const c of t.validator(n,a))c.explanation=e.message,l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(n,a)){const h=gE(u,d,{path:void 0===c?i:[...i,c],branch:void 0===c?r:[...r,u],coerce:o,mask:s,message:e.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):Zo(n)&&(void 0!==u||c in n)&&(n[c]=u))}if("not_valid"!==l)for(const c of t.refiner(n,a))c.explanation=e.message,l="not_refined",yield[c,void 0];"valid"===l&&(yield[void 0,n])}class Di{constructor(t){const{type:e,schema:i,validator:r,refiner:o,coercer:s=(l=>l),entries:a=function*(){}}=t;this.type=e,this.schema=i,this.entries=a,this.coercer=s,this.validator=r?(l,c)=>mE(r(l,c),c,this,l):()=>[],this.refiner=o?(l,c)=>mE(o(l,c),c,this,l):()=>[]}assert(t,e){return gV(t,this,e)}create(t,e){return function d0e(n,t,e){const i=Ug(n,t,{coerce:!0,message:e});if(i[0])throw i[0];return i[1]}(t,this,e)}is(t){return function yV(n,t){return!Ug(n,t)[0]}(t,this)}mask(t,e){return function h0e(n,t,e){const i=Ug(n,t,{coerce:!0,mask:!0,message:e});if(i[0])throw i[0];return i[1]}(t,this,e)}validate(t,e={}){return Ug(t,this,e)}}function gV(n,t,e){const i=Ug(n,t,{message:e});if(i[0])throw i[0]}function Ug(n,t,e={}){const i=gE(n,t,e),r=function c0e(n){const{done:t,value:e}=n.next();return t?void 0:e}(i);return r[0]?[new a0e(r[0],function*(){for(const s of i)s[0]&&(yield s[0])}),void 0]:[void 0,r[1]]}function So(n,t){return new Di({type:n,schema:null,validator:t})}function _V(n){return new Di({type:"array",schema:n,*entries(t){if(n&&Array.isArray(t))for(const[e,i]of t.entries())yield[e,i,n]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${Ni(t)}`})}function Nu(n){const t=n?Object.keys(n):[],e=function vV(){return So("never",()=>!1)}();return new Di({type:"object",schema:n||null,*entries(i){if(n&&Zo(i)){const r=new Set(Object.keys(i));for(const o of t)r.delete(o),yield[o,i[o],n[o]];for(const o of r)yield[o,i[o],e]}},validator:i=>Zo(i)||`Expected an object, but received: ${Ni(i)}`,coercer:i=>Zo(i)?{...i}:i})}function bV(n){return new Di({...n,validator:(t,e)=>void 0===t||n.validator(t,e),refiner:(t,e)=>void 0===t||n.refiner(t,e)})}function Hg(){return So("string",n=>"string"==typeof n||`Expected a string, but received: ${Ni(n)}`)}const p0e=Mn.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=n=>{const t=n?.node||this.editor.state.doc;return"textSize"===(n?.mode||this.options.mode)?t.textBetween(0,t.content.size,void 0," ").length:t.nodeSize},this.storage.words=n=>{const t=n?.node||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter(r=>""!==r).length}},addProseMirrorPlugins(){return[new Wt({key:new on("characterCount"),filterTransaction:(n,t)=>{const e=this.options.limit;if(!n.docChanged||0===e||null==e)return!0;const i=this.storage.characters({node:t.doc}),r=this.storage.characters({node:n.doc});if(r<=e||i>e&&r>e&&r<=i)return!0;if(i>e&&r>e&&r>i||!n.getMeta("paste"))return!1;const s=n.selection.$head.pos;return n.deleteRange(s-(r-e),s),!(this.storage.characters({node:n.doc})>e)}})]}}),m0e=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,g0e=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,y0e=Nr.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",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:t})=>t.setMark(this.name,n),toggleHighlight:n=>({commands:t})=>t.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[yu({find:m0e,type:this.type})]},addPasteRules(){return[Vl({find:g0e,type:this.type})]}}),Pu=(n,t)=>{for(const e in t)n[e]=t[e];return n},yE="numeric",_E="ascii",vE="alpha",O0="asciinumeric",A0="alphanumeric",bE="domain",MV="whitespace";function C0e(n,t){return n in t||(t[n]=[]),t[n]}function Lu(n,t,e){t[yE]&&(t[O0]=!0,t[A0]=!0),t[_E]&&(t[O0]=!0,t[vE]=!0),t[O0]&&(t[A0]=!0),t[vE]&&(t[A0]=!0),t[A0]&&(t[bE]=!0),t.emoji&&(t[bE]=!0);for(const i in t){const r=C0e(i,e);r.indexOf(n)<0&&r.push(n)}}function ro(n){void 0===n&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}ro.groups={},ro.prototype={accepts(){return!!this.t},go(n){const t=this,e=t.j[n];if(e)return e;for(let i=0;i=0&&(e[i]=!0);return e}(s.t,i),e);Lu(o,l,i)}else e&&Lu(o,e,i);s.t=o}return r.j[n]=s,s}};const Ge=(n,t,e,i,r)=>n.ta(t,e,i,r),Jo=(n,t,e,i,r)=>n.tr(t,e,i,r),SV=(n,t,e,i,r)=>n.ts(t,e,i,r),ge=(n,t,e,i,r)=>n.tt(t,e,i,r),qa="WORD",wE="UWORD",$g="LOCALHOST",DE="UTLD",k0="SCHEME",cf="SLASH_SCHEME",uf="OPENBRACE",Wg="OPENBRACKET",Gg="OPENANGLEBRACKET",Yg="OPENPAREN",Ru="CLOSEBRACE",df="CLOSEBRACKET",hf="CLOSEANGLEBRACKET",Fu="CLOSEPAREN",N0="AMPERSAND",P0="APOSTROPHE",L0="ASTERISK",Kl="AT",R0="BACKSLASH",F0="BACKTICK",j0="CARET",Ql="COLON",SE="COMMA",z0="DOLLAR",oa="DOT",V0="EQUALS",EE="EXCLAMATION",sa="HYPHEN",B0="PERCENT",U0="PIPE",H0="PLUS",$0="POUND",W0="QUERY",xE="QUOTE",IE="SEMI",aa="SLASH",qg="TILDE",G0="UNDERSCORE",Y0="SYM";var IV=Object.freeze({__proto__:null,WORD:qa,UWORD:wE,LOCALHOST:$g,TLD:"TLD",UTLD:DE,SCHEME:k0,SLASH_SCHEME:cf,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:uf,OPENBRACKET:Wg,OPENANGLEBRACKET:Gg,OPENPAREN:Yg,CLOSEBRACE:Ru,CLOSEBRACKET:df,CLOSEANGLEBRACKET:hf,CLOSEPAREN:Fu,AMPERSAND:N0,APOSTROPHE:P0,ASTERISK:L0,AT:Kl,BACKSLASH:R0,BACKTICK:F0,CARET:j0,COLON:Ql,COMMA:SE,DOLLAR:z0,DOT:oa,EQUALS:V0,EXCLAMATION:EE,HYPHEN:sa,PERCENT:B0,PIPE:U0,PLUS:H0,POUND:$0,QUERY:W0,QUOTE:xE,SEMI:IE,SLASH:aa,TILDE:qg,UNDERSCORE:G0,EMOJI:"EMOJI",SYM:Y0});const ju=/[a-z]/,q0=/\p{L}/u,K0=/\p{Emoji}/u,Q0=/\d/,OE=/\s/;let Z0=null,J0=null;function Zl(n,t,e,i,r){let o;const s=t.length;for(let a=0;a=0;)o++;if(o>0){t.push(e.join(""));for(let s=parseInt(n.substring(i,i+o),10);s>0;s--)e.pop();i+=o}else e.push(n[i]),i++}return t}const ff={defaultProtocol:"http",events:null,format:kV,formatHref:kV,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function X0(n,t){void 0===t&&(t=null);let e=Pu({},ff);n&&(e=Pu(e,n instanceof X0?n.o:n));const i=e.ignoreTags,r=[];for(let o=0;on,check(n){return this.get("validate",n.toString(),n)},get(n,t,e){const i=null!=t;let r=this.o[n];return r&&("object"==typeof r?(r=e.t in r?r[e.t]:ff[n],"function"==typeof r&&i&&(r=r(t,e))):"function"==typeof r&&i&&(r=r(t,e.t,e)),r)},getObj(n,t,e){let i=this.o[n];return"function"==typeof i&&null!=t&&(i=i(t,e.t,e)),i},render(n){const t=n.render(this);return(this.get("render",null,n)||this.defaultRender)(t,n.t,n)}},ew.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const t=this.toString(),e=n.get("truncate",t,this),i=n.get("format",t,this);return e&&i.length>e?i.substring(0,e)+"\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=ff.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 t=this,e=this.toHref(n.get("defaultProtocol")),i=n.get("formatHref",e,this),r=n.get("tagName",e,t),o=this.toFormattedString(n),s={},a=n.get("className",e,t),l=n.get("target",e,t),c=n.get("rel",e,t),u=n.getObj("attributes",e,t),d=n.getObj("events",e,t);return s.href=i,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&Pu(s,u),{tagName:r,attributes:s,content:o,eventListeners:d}}};const AE=Kg("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),kE=Kg("text"),NV=Kg("nl"),Jl=Kg("url",{isLink:!0,toHref(n){return void 0===n&&(n=ff.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==$g&&n[1].t===Ql}}),Bi=n=>new ro(n);function NE(n,t,e){return new n(t.slice(e[0].s,e[e.length-1].e),e)}const Qg=typeof console<"u"&&console&&console.warn||(()=>{}),ln={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function PV(n,t){if(void 0===t&&(t=!1),ln.initialized&&Qg(`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');ln.customSchemes.push([n,t])}function LV(n){return ln.initialized||function N0e(){ln.scanner=function E0e(n){void 0===n&&(n=[]);const t={};ro.groups=t;const e=new ro;null==Z0&&(Z0=AV("aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==J0&&(J0=AV("\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")),ge(e,"'",P0),ge(e,"{",uf),ge(e,"[",Wg),ge(e,"<",Gg),ge(e,"(",Yg),ge(e,"}",Ru),ge(e,"]",df),ge(e,">",hf),ge(e,")",Fu),ge(e,"&",N0),ge(e,"*",L0),ge(e,"@",Kl),ge(e,"`",F0),ge(e,"^",j0),ge(e,":",Ql),ge(e,",",SE),ge(e,"$",z0),ge(e,".",oa),ge(e,"=",V0),ge(e,"!",EE),ge(e,"-",sa),ge(e,"%",B0),ge(e,"|",U0),ge(e,"+",H0),ge(e,"#",$0),ge(e,"?",W0),ge(e,'"',xE),ge(e,"/",aa),ge(e,";",IE),ge(e,"~",qg),ge(e,"_",G0),ge(e,"\\",R0);const i=Jo(e,Q0,"NUM",{[yE]:!0});Jo(i,Q0,i);const r=Jo(e,ju,qa,{[_E]:!0});Jo(r,ju,r);const o=Jo(e,q0,wE,{[vE]:!0});Jo(o,ju),Jo(o,q0,o);const s=Jo(e,OE,"WS",{[MV]:!0});ge(e,"\n","NL",{[MV]:!0}),ge(s,"\n"),Jo(s,OE,s);const a=Jo(e,K0,"EMOJI",{emoji:!0});Jo(a,K0,a),ge(a,"\ufe0f",a);const l=ge(a,"\u200d");Jo(l,K0,a);const c=[[ju,r]],u=[[ju,null],[q0,o]];for(let d=0;dd[0]>h[0]?1:-1);for(let d=0;d=0?p[bE]=!0:ju.test(h)?Q0.test(h)?p[O0]=!0:p[_E]=!0:p[yE]=!0,SV(e,h,h,p)}return SV(e,"localhost",$g,{ascii:!0}),e.jd=new ro(Y0),{start:e,tokens:Pu({groups:t},IV)}}(ln.customSchemes);for(let n=0;n=0&&h++,r++,u++;if(h<0)r-=u,r0&&(o.push(NE(kE,t,s)),s=[]),r-=h,u-=h;const f=d.t,p=e.slice(r-u,r);o.push(NE(f,t,p))}}return s.length>0&&o.push(NE(kE,t,s)),o}(ln.parser.start,n,function x0e(n,t){const e=function I0e(n){const t=[],e=n.length;let i=0;for(;i56319||i+1===e||(o=n.charCodeAt(i+1))<56320||o>57343?n[i]:n.slice(i,i+2);t.push(s),i+=s.length}return t}(t.replace(/[A-Z]/g,a=>a.toLowerCase())),i=e.length,r=[];let o=0,s=0;for(;s=0&&(d+=e[s].length,h++),c+=e[s].length,o+=e[s].length,s++;o-=d,s-=h,c-=d,r.push({t:u.t,v:t.slice(o-c,o),s:o-c,e:o})}return r}(ln.scanner.start,n))}function LE(n,t,e){if(void 0===t&&(t=null),void 0===e&&(e=null),t&&"object"==typeof t){if(e)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);e=t,t=null}const i=new X0(e),r=LV(n),o=[];for(let s=0;s{const r=t.some(u=>u.docChanged)&&!e.doc.eq(i.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!r||o)return;const{tr:s}=i,a=function Jle(n,t){const e=new C1(n);return t.forEach(i=>{i.steps.forEach(r=>{e.step(r)})}),e}(e.doc,[...t]),{mapping:l}=a;return function rce(n){const{mapping:t,steps:e}=n,i=[];return t.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}=e[o];if(void 0===a||void 0===l)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=t.slice(o).map(a,-1),u=t.slice(o).map(l),d=t.invert().map(c,-1),h=t.invert().map(u);i.push({oldRange:{from:d,to:h},newRange:{from:c,to:u}})})}),function ice(n){const t=function nce(n,t=JSON.stringify){const e={};return n.filter(i=>{const r=t(i);return!Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=!0)})}(n);return 1===t.length?t:t.filter((e,i)=>!t.filter((o,s)=>s!==i).some(o=>e.oldRange.from>=o.oldRange.from&&e.oldRange.to<=o.oldRange.to&&e.newRange.from>=o.newRange.from&&e.newRange.to<=o.newRange.to))}(i)}(a).forEach(({oldRange:u,newRange:d})=>{Yb(u.from,u.to,e.doc).filter(m=>m.mark.type===n.type).forEach(m=>{const b=Yb(l.map(m.from),l.map(m.to),i.doc).filter(K=>K.mark.type===n.type);if(!b.length)return;const w=b[0],_=e.doc.textBetween(m.from,m.to,void 0," "),N=i.doc.textBetween(w.from,w.to,void 0," "),S=RV(_),ie=RV(N);S&&!ie&&s.removeMark(w.from,w.to,n.type)});const h=function ece(n,t,e){const i=[];return n.nodesBetween(t.from,t.to,(r,o)=>{e(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(b=>""!==b);if(m.length<=0)return!1;const g=m[m.length-1],y=f.pos+p.lastIndexOf(g);if(!g)return!1;LE(g).filter(b=>b.isLink).filter(b=>!n.validate||n.validate(b.value)).map(b=>({...b,from:y+b.start+1,to:y+b.end+1})).forEach(b=>{s.addMark(b.from,b.to,n.type.create({href:b.href}))})}}),s.steps.length?s:void 0}})}const F0e=Nr.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{"string"!=typeof n?PV(n.scheme,n.optionalSlashes):PV(n)})},onDestroy(){!function k0e(){ro.groups={},ln.scanner=null,ln.parser=null,ln.tokenQueue=[],ln.pluginQueue=[],ln.customSchemes=[],ln.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",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:t})=>t().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:t})=>t().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[Vl({find:n=>LE(n).filter(t=>!this.options.validate||this.options.validate(t.value)).filter(t=>t.isLink).map(t=>({text:t.value,index:t.start,data:t})),type:this.type,getAttributes:n=>{var t;return{href:null===(t=n.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(P0e({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(function L0e(n){return new Wt({key:new on("handleClickLink"),props:{handleClick:(t,e,i)=>{var r,o,s;if(0!==i.button)return!1;const a=M5(t.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 R0e(n){return new Wt({key:new on("handlePasteLink"),props:{handlePaste:(t,e,i)=>{const{state:r}=t,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach(c=>{a+=c.textContent});const l=LE(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}}),j0e=Nr.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:n=>"sub"===n&&null}],renderHTML({HTMLAttributes:n}){return["sub",tn(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()}}}),z0e=Nr.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:n=>"super"===n&&null}],renderHTML({HTMLAttributes:n}){return["sup",tn(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()}}}),V0e=jn.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:n}){return["tr",tn(this.options.HTMLAttributes,n),0]}}),B0e=Mn.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:t})=>!!this.options.alignments.includes(n)&&this.options.types.every(e=>t.updateAttributes(e,{textAlign:n})),unsetTextAlign:()=>({commands:n})=>this.options.types.every(t=>n.resetAttributes(t,"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")}}}),U0e=Nr.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("underline")&&{}}],renderHTML({HTMLAttributes:n}){return["u",tn(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()}}}),H0e=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/,$0e=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/g,FV=n=>n?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",Y0e=jn.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:t})=>!!(n=>n.match(H0e))(n.src)&&t.insertContent({type:this.name,attrs:n})}},addPasteRules(){return this.options.addPasteHandler?[Oce({find:$0e,type:this.type,getAttributes:n=>({src:n.input})})]:[]},renderHTML({HTMLAttributes:n}){const t=(n=>{const{url:t,allowFullscreen:e,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:b}=n;if(t.includes("/embed/"))return t;if(t.includes("youtu.be")){const ie=t.split("/").pop();return ie?`${FV(p)}${ie}`:null}const _=/v=([-\w]+)/gm.exec(t);if(!_||!_[1])return null;let N=`${FV(p)}${_[1]}`;const S=[];return!1===e&&S.push("fs=0"),i&&S.push("autoplay=1"),r&&S.push(`cc_lang_pref=${r}`),o&&S.push("cc_load_policy=1"),s||S.push("controls=0"),a&&S.push("disablekb=1"),l&&S.push("enablejsapi=1"),c&&S.push(`end=${c}`),u&&S.push(`hl=${u}`),d&&S.push(`iv_load_policy=${d}`),h&&S.push("loop=1"),f&&S.push("modestbranding=1"),m&&S.push(`origin=${m}`),g&&S.push(`playlist=${g}`),b&&S.push(`start=${b}`),y&&S.push(`color=${y}`),S.length&&(N+=`?${S.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=t,["div",{"data-youtube-video":""},["iframe",tn(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)]]}}),q0e=/^\s*>\s$/,K0e=jn.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:n}){return["blockquote",tn(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[ag({find:q0e,type:this.type})]}}),Q0e=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,Z0e=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,J0e=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,X0e=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,ewe=Nr.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",tn(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[yu({find:Q0e,type:this.type}),yu({find:J0e,type:this.type})]},addPasteRules(){return[Vl({find:Z0e,type:this.type}),Vl({find:X0e,type:this.type})]}}),twe=jn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",tn(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)}}}),jV=Nr.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:t})=>{const e=Gb(n,this.type);return!!Object.entries(e).some(([,r])=>!!r)||t.unsetMark(this.name)}}}}),zV=/^\s*([-+*])\s$/,nwe=jn.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",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(twe.name,this.editor.getAttributes(jV.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=ag({find:zV,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=ag({find:zV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(jV.name),editor:this.editor})),[n]}}),iwe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,rwe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,owe=Nr.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:n}){return["code",tn(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[yu({find:iwe,type:this.type})]},addPasteRules(){return[Vl({find:rwe,type:this.type})]}}),swe=/^```([a-z]+)?[\s\n]$/,awe=/^~~~([a-z]+)?[\s\n]$/,lwe=jn.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 t;const{languageClassPrefix:e}=this.options;return[...(null===(t=n.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(s=>s.startsWith(e)).map(s=>s.replace(e,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:n,HTMLAttributes:t}){return["pre",tn(this.options.HTMLAttributes,t),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:t})=>t.setNode(this.name,n),toggleCodeBlock:n=>({commands:t})=>t.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:t}=this.editor.state.selection;return!(!n||t.parent.type.name!==this.name)&&!(1!==t.pos&&t.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=n,{selection:e}=t,{$from:i,empty:r}=e;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:t}=n,{selection:e,doc:i}=t,{$from:r,empty:o}=e;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[jS({find:swe,type:this.type,getAttributes:n=>({language:n[1]})}),jS({find:awe,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new Wt({key:new on("codeBlockVSCodeHandler"),props:{handlePaste:(n,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const e=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),o=(i?JSON.parse(i):void 0)?.mode;if(!e||!o)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(nt.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(e.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),cwe=jn.create({name:"doc",topNode:!0,content:"block+"});function uwe(n={}){return new Wt({view:t=>new dwe(t,n)})}class dwe{constructor(t,e){var i;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(i=e.width)&&void 0!==i?i:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=s=>{this[r](s)};return t.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let i,t=this.editorView.state.doc.resolve(this.cursorPos),e=!t.parent.inlineContent;if(e){let a=t.nodeBefore,l=t.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",e),this.element.classList.toggle("prosemirror-dropcursor-inline",!e),!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(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),i=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=i&&i.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,e,t):r;if(e&&!o){let s=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Ij(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(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const hwe=Mn.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[uwe(this.options)]}});class ci extends rt{constructor(t){super(t,t)}map(t,e){let i=t.resolve(e.map(this.head));return ci.valid(i)?new ci(i):rt.near(i)}content(){return Ce.empty}eq(t){return t instanceof ci&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new ci(t.resolve(e.pos))}getBookmark(){return new RE(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function fwe(n){for(let t=n.depth;t>=0;t--){let e=n.index(t),i=n.node(t);if(0!=e)for(let r=i.child(e-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}(t)||!function pwe(n){for(let t=n.depth;t>=0;t--){let e=n.indexAfter(t),i=n.node(t);if(e!=i.childCount)for(let r=i.child(e);;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}(t))return!1;let i=e.type.spec.allowGapCursor;if(null!=i)return i;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,i=!1){e:for(;;){if(!i&&ci.valid(t))return t;let r=t.pos,o=null;for(let s=t.depth;;s--){let a=t.node(s);if(e>0?t.indexAfter(s)0){o=a.child(e>0?t.indexAfter(s):t.index(s)-1);break}if(0==s)return null;r+=e;let l=t.doc.resolve(r);if(ci.valid(l))return l}for(;;){let s=e>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!qe.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*e),i=!1;continue e}break}o=s,r+=e;let a=t.doc.resolve(r);if(ci.valid(a))return a}return null}}}ci.prototype.visible=!1,ci.findFrom=ci.findGapCursorFrom,rt.jsonID("gapcursor",ci);class RE{constructor(t){this.pos=t}map(t){return new RE(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return ci.valid(e)?new ci(e):rt.near(e)}}const gwe=mS({ArrowLeft:tw("horiz",-1),ArrowRight:tw("horiz",1),ArrowUp:tw("vert",-1),ArrowDown:tw("vert",1)});function tw(n,t){const e="vert"==n?t>0?"down":"up":t>0?"right":"left";return function(i,r,o){let s=i.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof nt){if(!o.endOfTextblock(e)||0==a.depth)return!1;l=!1,a=i.doc.resolve(t>0?a.after():a.before())}let c=ci.findGapCursorFrom(a,t,l);return!!c&&(r&&r(i.tr.setSelection(new ci(c))),!0)}}function ywe(n,t,e){if(!n||!n.editable)return!1;let i=n.state.doc.resolve(t);if(!ci.valid(i))return!1;let r=n.posAtCoords({left:e.clientX,top:e.clientY});return!(r&&r.inside>-1&&qe.isSelectable(n.state.doc.nodeAt(r.inside))||(n.dispatch(n.state.tr.setSelection(new ci(i))),0))}function _we(n,t){if("insertCompositionText"!=t.inputType||!(n.state.selection instanceof ci))return!1;let{$from:e}=n.state.selection,i=e.parent.contentMatchAt(e.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;let r=ce.empty;for(let s=i.length-1;s>=0;s--)r=ce.from(i[s].createAndFill(null,r));let o=n.state.tr.replace(e.pos,e.pos,new Ce(r,0,0));return o.setSelection(nt.near(o.doc.resolve(e.pos+1))),n.dispatch(o),!1}function vwe(n){if(!(n.selection instanceof ci))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Fn.create(n.doc,[ki.widget(n.selection.head,t,{key:"gapcursor"})])}const bwe=Mn.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Wt({props:{decorations:vwe,createSelectionBetween:(n,t,e)=>t.pos==e.pos&&ci.valid(e)?new ci(e):null,handleClick:ywe,handleKeyDown:gwe,handleDOMEvents:{beforeinput:_we}}})],extendNodeSchema(n){var t;return{allowGapCursor:null!==(t=Ct(Ve(n,"allowGapCursor",{name:n.name,options:n.options,storage:n.storage})))&&void 0!==t?t:null}}}),wwe=jn.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:n}){return["br",tn(this.options.HTMLAttributes,n)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:n,chain:t,state:e,editor:i})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:r,storedMarks:o}=e;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 t().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()}}}),Cwe=jn.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:t}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,tn(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:n=>({commands:t})=>!!this.options.levels.includes(n.level)&&t.setNode(this.name,n),toggleHeading:n=>({commands:t})=>!!this.options.levels.includes(n.level)&&t.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return this.options.levels.reduce((n,t)=>({...n,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(n=>jS({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Ji=function(){};Ji.prototype.append=function(t){return t.length?(t=Ji.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},Ji.prototype.prepend=function(t){return t.length?Ji.from(t).append(this):this},Ji.prototype.appendInner=function(t){return new Dwe(this,t)},Ji.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?Ji.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Ji.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Ji.prototype.forEach=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=this.length),e<=i?this.forEachInner(t,e,i,0):this.forEachInvertedInner(t,e,i,0)},Ji.prototype.map=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(t(o,s))},e,i),r},Ji.from=function(t){return t instanceof Ji?t:t&&t.length?new VV(t):Ji.empty};var VV=function(n){function t(i){n.call(this),this.values=i}n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t;var e={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,o){return 0==r&&o==this.length?this:new t(this.values.slice(r,o))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,o,s,a){for(var l=o;l=s;l--)if(!1===r(this.values[l],a+l))return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=200)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=200)return new t(r.flatten().concat(this.values))},e.length.get=function(){return this.values.length},e.depth.get=function(){return 0},Object.defineProperties(t.prototype,e),t}(Ji);Ji.empty=new VV([]);var Dwe=function(n){function t(e,i){n.call(this),this.left=e,this.right=i,this.length=e.length+i.length,this.depth=Math.max(e.depth,i.depth)+1}return n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.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},t.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))},t.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new t(r,this.right)},t.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new t(this.left,new t(this.right,i)):new t(this,i)},t}(Ji);const BV=Ji;class bs{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let r,o,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}e&&(r=this.remapping(i,this.items.length),o=r.maps.length);let a,l,s=t.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 la(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 la(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 bs(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(t,e,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let u=0;uSwe&&(a=function Mwe(n,t){let e;return n.forEach((i,r)=>{if(i.selection&&0==t--)return e=r,!1}),n.slice(e)}(a,c),s-=c),new bs(a.append(o),s)}remapping(t,e){let i=new Ch;return this.items.forEach((r,o)=>{i.appendMap(r.map,null!=r.mirrorOffset&&o-r.mirrorOffset>=t?i.maps.length-r.mirrorOffset:void 0)},t,e),i}addMaps(t){return 0==this.eventCount?this:new bs(this.items.append(t.map(e=>new la(e))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-e),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},r);let l=e;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=t.steps[f].invert(t.docs[f]),g=h.selection&&h.selection.map(o.slice(l+1,f));g&&a++,i.push(new la(p,m,g))}else i.push(new la(p))},r);let c=[];for(let h=e;h500&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let t=0;return this.items.forEach(e=>{e.step||t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),i=e.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(e.slice(i)),c=l&&l.getMap();if(i--,c&&e.appendMap(c,i),l){let u=s.selection&&s.selection.map(e.slice(i));u&&o++;let h,d=new la(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 bs(BV.from(r.reverse()),o)}}bs.empty=new bs(BV.empty,0);class la{constructor(t,e,i,r){this.map=t,this.step=e,this.selection=i,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new la(e.getMap().invert(),e,this.selection)}}}class Xl{constructor(t,e,i,r,o){this.done=t,this.undone=e,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}}const Swe=20;function UV(n){let t=[];return n.forEach((e,i,r,o)=>t.push(r,o)),t}function FE(n,t){if(!n)return null;let e=[];for(let i=0;inew Xl(bs.empty,bs.empty,null,0,-1),apply:(t,e,i)=>function Ewe(n,t,e,i){let o,r=e.getMeta(ca);if(r)return r.historyState;e.getMeta(WV)&&(n=new Xl(n.done,n.undone,null,0,-1));let s=e.getMeta("appendedTransaction");if(0==e.steps.length)return n;if(s&&s.getMeta(ca))return s.getMeta(ca).redo?new Xl(n.done.addTransform(e,void 0,i,iw(t)),n.undone,UV(e.mapping.maps[e.steps.length-1]),n.prevTime,n.prevComposition):new Xl(n.done,n.undone.addTransform(e,void 0,i,iw(t)),null,n.prevTime,n.prevComposition);if(!1===e.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=e.getMeta("rebased"))?new Xl(n.done.rebased(e,o),n.undone.rebased(e,o),FE(n.prevRanges,e.mapping),n.prevTime,n.prevComposition):new Xl(n.done.addMaps(e.mapping.maps),n.undone.addMaps(e.mapping.maps),FE(n.prevRanges,e.mapping),n.prevTime,n.prevComposition);{let a=e.getMeta("composition"),l=0==n.prevTime||!s&&n.prevComposition!=a&&(n.prevTime<(e.time||0)-i.newGroupDelay||!function xwe(n,t){if(!t)return!1;if(!n.docChanged)return!0;let e=!1;return n.mapping.maps[0].forEach((i,r)=>{for(let o=0;o=t[o]&&(e=!0)}),e}(e,n.prevRanges)),c=s?FE(n.prevRanges,e.mapping):UV(e.mapping.maps[e.steps.length-1]);return new Xl(n.done.addTransform(e,l?t.selection.getBookmark():void 0,i,iw(t)),bs.empty,c,e.time,a??n.prevComposition)}}(e,i,t,n)},config:n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},props:{handleDOMEvents:{beforeinput(t,e){let i=e.inputType,r="historyUndo"==i?GV:"historyRedo"==i?YV:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}const GV=(n,t)=>{let e=ca.getState(n);return!(!e||0==e.done.eventCount||(t&&HV(e,n,t,!1),0))},YV=(n,t)=>{let e=ca.getState(n);return!(!e||0==e.undone.eventCount||(t&&HV(e,n,t,!0),0))},Owe=Mn.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:n,dispatch:t})=>GV(n,t),redo:()=>({state:n,dispatch:t})=>YV(n,t)}),addProseMirrorPlugins(){return[Iwe(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()}}}),Awe=jn.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:n}){return["hr",tn(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{var i;if(e){const{$to:r}=t.selection,o=r.end();if(r.nodeAfter)t.setSelection(nt.create(t.doc,r.pos));else{const s=null===(i=r.parent.type.contentMatch.defaultType)||void 0===i?void 0:i.create();s&&(t.insert(o,s),t.setSelection(nt.create(t.doc,o)))}t.scrollIntoView()}return!0}).run()}},addInputRules(){return[x5({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),kwe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,Nwe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,Pwe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,Lwe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,Rwe=Nr.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",tn(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[yu({find:kwe,type:this.type}),yu({find:Pwe,type:this.type})]},addPasteRules(){return[Vl({find:Nwe,type:this.type}),Vl({find:Lwe,type:this.type})]}}),Fwe=jn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",tn(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)}}}),jwe=jn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",tn(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)}}}),qV=Nr.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:t})=>{const e=Gb(n,this.type);return!!Object.entries(e).some(([,r])=>!!r)||t.unsetMark(this.name)}}}}),KV=/^(\d+)\.\s$/,zwe=jn.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:t,...e}=n;return 1===t?["ol",tn(this.options.HTMLAttributes,e),0]:["ol",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(jwe.name,this.editor.getAttributes(qV.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=ag({find:KV,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=ag({find:KV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(qV.name)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[n]}}),Vwe=jn.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:n}){return["p",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Bwe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,Uwe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,Hwe=Nr.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",tn(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[yu({find:Bwe,type:this.type})]},addPasteRules(){return[Vl({find:Uwe,type:this.type})]}}),$we=jn.create({name:"text",group:"inline"}),QV=Mn.create({name:"starterKit",addExtensions(){var n,t,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,y;const b=[];return!1!==this.options.blockquote&&b.push(K0e.configure(null===(n=this.options)||void 0===n?void 0:n.blockquote)),!1!==this.options.bold&&b.push(ewe.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&b.push(nwe.configure(null===(e=this.options)||void 0===e?void 0:e.bulletList)),!1!==this.options.code&&b.push(owe.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&b.push(lwe.configure(null===(r=this.options)||void 0===r?void 0:r.codeBlock)),!1!==this.options.document&&b.push(cwe.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&b.push(hwe.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&b.push(bwe.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&b.push(wwe.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&b.push(Cwe.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&b.push(Owe.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&b.push(Awe.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&b.push(Rwe.configure(null===(h=this.options)||void 0===h?void 0:h.italic)),!1!==this.options.listItem&&b.push(Fwe.configure(null===(f=this.options)||void 0===f?void 0:f.listItem)),!1!==this.options.orderedList&&b.push(zwe.configure(null===(p=this.options)||void 0===p?void 0:p.orderedList)),!1!==this.options.paragraph&&b.push(Vwe.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&b.push(Hwe.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&b.push($we.configure(null===(y=this.options)||void 0===y?void 0:y.text)),b}});var Zg=(()=>(function(n){n.TOP_INITIAL="40px",n.TOP_CURRENT="26px"}(Zg||(Zg={})),Zg))();function Wwe(n){return n.replace(/\p{L}+('\p{L}+)?/gu,function(t){return t.charAt(0).toUpperCase()+t.slice(1)})}const Ywe=Mn.create({name:"dotPlaceholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new Wt({key:new on("dotPlaceholder"),props:{decorations:({doc:n,selection:t})=>{const e=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,r=[];if(!e)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=ki.widget(l,((n,t,e)=>{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&&t.type.name===gi.HEADING&&(i.style.top=Zg.TOP_INITIAL),0!==n&&t.type.name===gi.HEADING&&(i.style.top=Zg.TOP_CURRENT),i.innerHTML='',i.setAttribute("draggable","false"),i.addEventListener("mousedown",o=>{o.preventDefault(),e.chain().insertContent("/").run()},{once:!0}),r.appendChild(i),r})(l,a,this.editor)),f=ki.node(l,l+a.nodeSize,{class:d.join(" "),"data-placeholder":a.type.name===gi.HEADING?`${Wwe(a.type.name)} ${a.attrs.level}`:this.options.placeholder});r.push(f),r.push(h)}return this.options.includeChildren}),Fn.create(n,r)}}})]}});class Jg{constructor(){}}function qwe(n,t){if(1&n&&_e(0,"dot-editor-count-bar",4),2&n){const e=D(2);v("characterCount",e.characterCount)("charLimit",e.charLimit)("readingTime",e.readingTime)}}Jg.\u0275fac=function(t){return new(t||Jg)},Jg.\u0275cmp=Me({type:Jg,selectors:[["dot-editor-count-bar"]],inputs:{characterCount:"characterCount",charLimit:"charLimit",readingTime:"readingTime"},decls:8,vars:6,template:function(t,e){1&t&&(I(0,"span"),ke(1),A(),I(2,"span"),ke(3,"\u25cf"),A(),ke(4),I(5,"span"),ke(6,"\u25cf"),A(),ke(7)),2&t&&(yo("error-message",e.charLimit&&e.characterCount.characters()>e.charLimit),C(1),r_(" ",e.characterCount.characters(),"",e.charLimit?"/"+e.charLimit:""," chars\n"),C(3),Yi("\n",e.characterCount.words()," words\n"),C(3),Yi("\n",e.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 Kwe=function(n,t){return{"editor-wrapper--fullscreen":n,"editor-wrapper--default":t}},Qwe=function(n){return{"overflow-hidden":n}};function Zwe(n,t){if(1&n){const e=We();dt(0),I(1,"div",1)(2,"tiptap-editor",2),ue("ngModelChange",function(r){return de(e),he(D().onChange(r))})("keyup",function(){return de(e),he(D().subject.next())}),A()(),M(3,qwe,1,3,"dot-editor-count-bar",3),ht()}if(2&n){const e=D();C(1),oi(e.customStyles),v("ngClass",bi(7,Kwe,"true"===e.isFullscreen,"true"!==e.isFullscreen)),C(1),v("ngModel",e.content)("editor",e.editor)("ngClass",Mt(10,Qwe,e.freezeScroll)),C(1),v("ngIf",e.showCharData)}}class Xg{constructor(t,e,i){this.injector=t,this.viewContainerRef=e,this.dotMarketingConfigService=i,this.lang=dg,this.displayCountBar=!0,this.customBlocks="",this.content="",this.isFullscreen=!1,this.valueChange=new re,this.subject=new ae,this.freezeScroll=!0,this._allowedBlocks=["paragraph"],this._customNodes=new Map([["dotContent",Upe(this.injector)],["image",io],["video",Ype],["table",pye.extend({resizable:!0})],["aiContent",Qpe],["loader",Zpe]]),this.destroy$=new ae}set showVideoThumbnail(t){this.dotMarketingConfigService.setProperty(Kp.SHOW_VIDEO_THUMBNAIL,t)}set allowedBlocks(t){const e=t?t.replace(/ /g,"").split(",").filter(Boolean):[];this._allowedBlocks=[...this._allowedBlocks,...e]}set value(t){"string"!=typeof t?this.setEditorJSONContent(t):this.content=(n=>{const t=new RegExp(/]*)>(.|\n)*?<\/p>/gm),e=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(fue,o=>(n=>{const t=document.createElement("div");t.innerHTML=n;const e=t.querySelector("a").getAttribute("href"),i=t.querySelector("a").getAttribute("href"),r=t.querySelector("a").getAttribute("alt");return n.replace(/]*)>/gm,"").replace(//gm,"").replace(HS,o=>o.replace(/img/gm,`img href="${e}" title="${i}" alt="${r}"`))})(o)).replace(t,o=>e0(o)).replace(e,o=>e0(o)).replace(i,o=>e0(o)).replace(r,o=>e0(o))})(t)}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(t){return Xc(function*(){return Promise.allSettled(t.map(function(){var e=Xc(function*(i){return import(i)});return function(i){return e.apply(this,arguments)}}()))})()}ngOnInit(){wt(this.getCustomRemoteExtensions()).pipe(Et(1)).subscribe(t=>{this.editor=new Ece({extensions:[...this.getEditorExtensions(),...this.getEditorMarks(),...this.getEditorNodes(),...t]}),this.editor.on("create",()=>this.updateCharCount()),this.subject.pipe(mn(this.destroy$),Xd(250)).subscribe(()=>this.updateCharCount()),this.editor.on("transaction",({editor:e})=>{this.freezeScroll=Sg.getState(e.view.state)?.freezeScroll})})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onChange(t){this.valueChange.emit(t)}updateCharCount(){const t=this.editor.state.tr.setMeta("addToHistory",!1);0!=this.characterCount.characters()?t.step(new wu("charCount",this.characterCount.characters())).step(new wu("wordCount",this.characterCount.words())).step(new wu("readingTime",this.readingTime)):t.step(new n0),this.editor.view.dispatch(t)}isValidSchema(t){gV(t,Nu({extensions:_V(Nu({url:Hg(),actions:bV(_V(Nu({command:Hg(),menuLabel:Hg(),icon:Hg()})))}))}))}getParsedCustomBlocks(){if(!this.customBlocks?.length)return{extensions:[]};try{const e=JSON.parse(this.customBlocks);return this.isValidSchema(e),e}catch(e){return console.warn("JSON parse fails, please check the JSON format.",e),{extensions:[]}}}parsedCustomModules(t,e){return e.status===Qp.REJECTED&&console.warn("Failed to load the module",e.reason),e.status===Qp.FULFILLED?{...t,...e?.value}:{...t}}getCustomRemoteExtensions(){var t=this;return Xc(function*(){const e=t.getParsedCustomBlocks(),i=e?.extensions?.map(a=>a.url),r=yield t.loadCustomBlocks(i),o=[];e.extensions.forEach(a=>{o.push(...a.actions?.map(l=>l.name)||[])});const s=r.reduce(t.parsedCustomModules,{});return Object.values(s)})()}getEditorNodes(){return[this._allowedBlocks?.length>1?QV.configure(this.starterConfig()):QV,...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 t=[];if(this._allowedBlocks.length<=1)return[...this._customNodes.values()];for(const e of this._allowedBlocks){const i=this._customNodes.get(e);i&&t.push(i)}return t}getEditorExtensions(){return[sge({lang:this.lang,allowedContentTypes:this.allowedContentTypes,allowedBlocks:this._allowedBlocks,contentletIdentifier:this.contentletIdentifier}),oge,Ywe.configure({placeholder:'Type "/" for commands'}),Y0e.configure({height:300,width:400,interfaceLanguage:"us",nocookie:!0,modestBranding:!0}),j0e,z0e,Eue(this.viewContainerRef,this.getParsedCustomBlocks()),gye(this.viewContainerRef),Pme(this.viewContainerRef,this.lang),rge(this.viewContainerRef),Yme(this.viewContainerRef),Yye(this.viewContainerRef),V_e(this.viewContainerRef),$_e(this.viewContainerRef),Tye(this.injector,this.viewContainerRef),dge(this.viewContainerRef),Pue(this.viewContainerRef),hge.extend({renderHTML({HTMLAttributes:n}){return["th",tn(this.options.HTMLAttributes,n),["button",{class:"dot-cell-arrow"}],["p",0]]}}),V0e,Mye,p0e,Xpe(this.injector,this.viewContainerRef)]}getEditorMarks(){return[U0e,B0e.configure({types:["heading","paragraph","listItem","dotImage"]}),y0e.configure({HTMLAttributes:{style:"background: #accef7;"}}),F0e.configure({autolink:!1,openOnClick:!1})]}setEditorJSONContent(t){this.content=this._allowedBlocks?.length>1?((n,t)=>{const e=(n=>n.reduce((t,e)=>P5[e]?{...t,...P5[e]}:{...t,[e]:!0},cue))(this._allowedBlocks),i=Array.isArray(n)?[...n]:[...n.content];return L5(i,e)})(t):t}}Xg.\u0275fac=function(t){return new(t||Xg)(O(Dr),O($r),O(vu))},Xg.\u0275cmp=Me({type:Xg,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(t,e){1&t&&M(0,Zwe,4,12,"ng-container",0),2&t&&v("ngIf",e.editor)},dependencies:[fi,Kt,Ic,vp,Hh,Jg],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%] .ai-loading{display:flex;justify-content:center;align-items:center;min-width:100%;padding:.5rem;border-radius:.5rem;border:1px solid #d1d4db;color:var(--color-palette-primary-500)}[_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 pf{constructor(t){this.injector=t}ngDoBootstrap(){if(void 0===customElements.get("dotcms-block-editor")){const t=function JY(n,t){const e=function WY(n,t){return t.get(vc).resolveComponentFactory(n).inputs}(n,t.injector),i=t.strategyFactory||new KY(n,t.injector),r=function $Y(n){const t={};return n.forEach(({propName:e,templateName:i})=>{t[function zY(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}(i)]=e}),t}(e);class o extends ZY{get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=i.create(this.injector||t.injector);e.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),e.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}(Xg,{injector:this.injector});customElements.define("dotcms-block-editor",t)}}}pf.\u0275fac=function(t){return new(t||pf)(F(Dr))},pf.\u0275mod=Xe({type:pf}),pf.\u0275inj=lt({imports:[_P,QQ,wn,rv,af,IM,pM,yT]}),qG().bootstrapModule(pf).catch(n=>console.error(n))},10152:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(k,V){for(var B=k<0?"-":"",G=Math.abs(k).toString();G.length{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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=E.default},42926:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function B(G){return(0,V.default)({},G)};var V=k(x(32963));q.exports=E.default},73215:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(33338));E.default=V.default,q.exports=E.default},40150:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.getDefaultOptions=function k(){return x},E.setDefaultOptions=function V(B){x=B};var x={}},1635:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(90448)),B=k(x(71074)),G=k(x(23122)),$=k(x(8622)),R=k(x(68450)),P=k(x(10152)),Y=k(x(21393));function ze(J,U){var W=J>0?"-":"+",j=Math.abs(J),z=Math.floor(j/60),pe=j%60;if(0===pe)return W+String(z);var Re=U||"";return W+String(z)+Re+(0,P.default)(pe,2)}function ye(J,U){return J%60==0?(J>0?"-":"+")+(0,P.default)(Math.abs(J)/60,2):je(J,U)}function je(J,U){var W=U||"",j=J>0?"-":"+",z=Math.abs(J);return j+(0,P.default)(Math.floor(z/60),2)+W+(0,P.default)(z%60,2)}E.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 pe=(0,R.default)(U,z),Re=pe>0?pe:1-pe;return"YY"===W?(0,P.default)(Re%100,2):"Yo"===W?j.ordinalNumber(Re,{unit:"year"}):(0,P.default)(Re,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 pe=(0,$.default)(U,z);return"wo"===W?j.ordinalNumber(pe,{unit:"week"}):(0,P.default)(pe,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 pe=U.getUTCDay(),Re=(pe-z.weekStartsOn+8)%7||7;switch(W){case"e":return String(Re);case"ee":return(0,P.default)(Re,2);case"eo":return j.ordinalNumber(Re,{unit:"day"});case"eee":return j.day(pe,{width:"abbreviated",context:"formatting"});case"eeeee":return j.day(pe,{width:"narrow",context:"formatting"});case"eeeeee":return j.day(pe,{width:"short",context:"formatting"});default:return j.day(pe,{width:"wide",context:"formatting"})}},c:function(U,W,j,z){var pe=U.getUTCDay(),Re=(pe-z.weekStartsOn+8)%7||7;switch(W){case"c":return String(Re);case"cc":return(0,P.default)(Re,W.length);case"co":return j.ordinalNumber(Re,{unit:"day"});case"ccc":return j.day(pe,{width:"abbreviated",context:"standalone"});case"ccccc":return j.day(pe,{width:"narrow",context:"standalone"});case"cccccc":return j.day(pe,{width:"short",context:"standalone"});default:return j.day(pe,{width:"wide",context:"standalone"})}},i:function(U,W,j){var z=U.getUTCDay(),pe=0===z?7:z;switch(W){case"i":return String(pe);case"ii":return(0,P.default)(pe,W.length);case"io":return j.ordinalNumber(pe,{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 pe=U.getUTCHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"});case"aaa":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return j.dayPeriod(pe,{width:"narrow",context:"formatting"});default:return j.dayPeriod(pe,{width:"wide",context:"formatting"})}},b:function(U,W,j){var pe,z=U.getUTCHours();switch(pe=12===z?"noon":0===z?"midnight":z/12>=1?"pm":"am",W){case"b":case"bb":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"});case"bbb":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return j.dayPeriod(pe,{width:"narrow",context:"formatting"});default:return j.dayPeriod(pe,{width:"wide",context:"formatting"})}},B:function(U,W,j){var pe,z=U.getUTCHours();switch(pe=z>=17?"evening":z>=12?"afternoon":z>=4?"morning":"night",W){case"B":case"BB":case"BBB":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"});case"BBBBB":return j.dayPeriod(pe,{width:"narrow",context:"formatting"});default:return j.dayPeriod(pe,{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 Re=(z._originalDate||U).getTimezoneOffset();if(0===Re)return"Z";switch(W){case"X":return ye(Re);case"XXXX":case"XX":return je(Re);default:return je(Re,":")}},x:function(U,W,j,z){var Re=(z._originalDate||U).getTimezoneOffset();switch(W){case"x":return ye(Re);case"xxxx":case"xx":return je(Re);default:return je(Re,":")}},O:function(U,W,j,z){var Re=(z._originalDate||U).getTimezoneOffset();switch(W){case"O":case"OO":case"OOO":return"GMT"+ze(Re,":");default:return"GMT"+je(Re,":")}},z:function(U,W,j,z){var Re=(z._originalDate||U).getTimezoneOffset();switch(W){case"z":case"zz":case"zzz":return"GMT"+ze(Re,":");default:return"GMT"+je(Re,":")}},t:function(U,W,j,z){var Re=Math.floor((z._originalDate||U).getTime()/1e3);return(0,P.default)(Re,W.length)},T:function(U,W,j,z){var Re=(z._originalDate||U).getTime();return(0,P.default)(Re,W.length)}},q.exports=E.default},21393:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(10152));E.default={y:function(R,P){var Y=R.getUTCFullYear(),ee=Y>0?Y:1-Y;return(0,V.default)("yy"===P?ee%100:ee,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,ee=R.getUTCMilliseconds(),se=Math.floor(ee*Math.pow(10,Y-3));return(0,V.default)(se,P.length)}},q.exports=E.default},75852:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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"})}};E.default={p:k,P:function(R,P){var ze,Y=R.match(/(P+)(p+)?/)||[],ee=Y[1],se=Y[2];if(!se)return x(R,P);switch(ee){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(ee,P)).replace("{{time}}",k(se,P))}},q.exports=E.default},47664:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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=E.default},90448:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(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 ee=P.getTime(),se=Y-ee;return Math.floor(se/G)+1};var V=k(x(90798)),B=k(x(61886)),G=864e5;q.exports=E.default},71074:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y){(0,$.default)(1,arguments);var ee=(0,V.default)(Y),se=(0,B.default)(ee).getTime()-(0,G.default)(ee).getTime();return Math.round(se/R)+1};var V=k(x(90798)),B=k(x(96729)),G=k(x(50525)),$=k(x(61886)),R=6048e5;q.exports=E.default},23122:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(R){(0,B.default)(1,arguments);var P=(0,V.default)(R),Y=P.getUTCFullYear(),ee=new Date(0);ee.setUTCFullYear(Y+1,0,4),ee.setUTCHours(0,0,0,0);var se=(0,G.default)(ee),ze=new Date(0);ze.setUTCFullYear(Y,0,4),ze.setUTCHours(0,0,0,0);var ye=(0,G.default)(ze);return P.getTime()>=se.getTime()?Y+1:P.getTime()>=ye.getTime()?Y:Y-1};var V=k(x(90798)),B=k(x(61886)),G=k(x(96729));q.exports=E.default},8622:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y,ee){(0,$.default)(1,arguments);var se=(0,V.default)(Y),ze=(0,B.default)(se,ee).getTime()-(0,G.default)(se,ee).getTime();return Math.round(ze/R)+1};var V=k(x(90798)),B=k(x(88314)),G=k(x(72447)),$=k(x(61886)),R=6048e5;q.exports=E.default},68450:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y,ee){var se,ze,ye,je,te,J,U,W;(0,B.default)(1,arguments);var j=(0,V.default)(Y),z=j.getUTCFullYear(),pe=(0,R.getDefaultOptions)(),Re=(0,$.default)(null!==(se=null!==(ze=null!==(ye=null!==(je=ee?.firstWeekContainsDate)&&void 0!==je?je:null==ee||null===(te=ee.locale)||void 0===te||null===(J=te.options)||void 0===J?void 0:J.firstWeekContainsDate)&&void 0!==ye?ye:pe.firstWeekContainsDate)&&void 0!==ze?ze:null===(U=pe.locale)||void 0===U||null===(W=U.options)||void 0===W?void 0:W.firstWeekContainsDate)&&void 0!==se?se:1);if(!(Re>=1&&Re<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Se=new Date(0);Se.setUTCFullYear(z+1,0,Re),Se.setUTCHours(0,0,0,0);var Ee=(0,G.default)(Se,ee),Oe=new Date(0);Oe.setUTCFullYear(z,0,Re),Oe.setUTCHours(0,0,0,0);var ve=(0,G.default)(Oe,ee);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)),$=k(x(6092)),R=x(40150);q.exports=E.default},70183:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.isProtectedDayOfYearToken=function V($){return-1!==x.indexOf($)},E.isProtectedWeekYearToken=function B($){return-1!==k.indexOf($)},E.throwProtectedError=function G($,R,P){if("YYYY"===$)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"===$)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"===$)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"===$)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,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(k,V){if(V.length1?"s":"")+" required, but only "+V.length+" present")},q.exports=E.default},96729:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function G($){(0,B.default)(1,arguments);var R=1,P=(0,V.default)($),Y=P.getUTCDay(),ee=(Y{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(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 ee=(0,B.default)(Y);return ee};var V=k(x(23122)),B=k(x(96729)),G=k(x(61886));q.exports=E.default},88314:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function R(P,Y){var ee,se,ze,ye,je,te,J,U;(0,B.default)(1,arguments);var W=(0,$.getDefaultOptions)(),j=(0,G.default)(null!==(ee=null!==(se=null!==(ze=null!==(ye=Y?.weekStartsOn)&&void 0!==ye?ye:null==Y||null===(je=Y.locale)||void 0===je||null===(te=je.options)||void 0===te?void 0:te.weekStartsOn)&&void 0!==ze?ze:W.weekStartsOn)&&void 0!==se?se:null===(J=W.locale)||void 0===J||null===(U=J.options)||void 0===U?void 0:U.weekStartsOn)&&void 0!==ee?ee:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var z=(0,V.default)(P),pe=z.getUTCDay(),Re=(pe{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y,ee){var se,ze,ye,je,te,J,U,W;(0,B.default)(1,arguments);var j=(0,R.getDefaultOptions)(),z=(0,$.default)(null!==(se=null!==(ze=null!==(ye=null!==(je=ee?.firstWeekContainsDate)&&void 0!==je?je:null==ee||null===(te=ee.locale)||void 0===te||null===(J=te.options)||void 0===J?void 0:J.firstWeekContainsDate)&&void 0!==ye?ye: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!==se?se:1),pe=(0,V.default)(Y,ee),Re=new Date(0);Re.setUTCFullYear(pe,0,z),Re.setUTCHours(0,0,0,0);var Se=(0,G.default)(Re,ee);return Se};var V=k(x(68450)),B=k(x(61886)),G=k(x(88314)),$=k(x(6092)),R=x(40150);q.exports=E.default},6092:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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=E.default},50405:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(R,P){(0,G.default)(2,arguments);var Y=(0,B.default)(R).getTime(),ee=(0,V.default)(P);return new Date(Y+ee)};var V=k(x(6092)),B=k(x(90798)),G=k(x(61886));q.exports=E.default},61348:(q,E,x)=>{"use strict";x.r(E),x.d(E,{default:()=>xo});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 jt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},mt=jt.width?String(jt.width):Be.defaultWidth,Bt=Be.formats[mt]||Be.formats[Be.defaultWidth];return Bt}}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"})},se={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(jt,mt){var On;if("formatting"===(null!=mt&&mt.context?String(mt.context):"standalone")&&Be.formattingValues){var ui=Be.defaultFormattingWidth||Be.defaultWidth,Hi=null!=mt&&mt.width?String(mt.width):ui;On=Be.formattingValues[Hi]||Be.formattingValues[ui]}else{var Fr=Be.defaultWidth,wt=null!=mt&&mt.width?String(mt.width):Be.defaultWidth;On=Be.values[wt]||Be.values[Fr]}return On[Be.argumentCallback?Be.argumentCallback(jt):jt]}}function Ee(Be){return function(jt){var mt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Bt=mt.width,On=Bt&&Be.matchPatterns[Bt]||Be.matchPatterns[Be.defaultMatchWidth],ui=jt.match(On);if(!ui)return null;var Hn,Hi=ui[0],Fr=Bt&&Be.parsePatterns[Bt]||Be.parsePatterns[Be.defaultParseWidth],wt=Array.isArray(Fr)?ve(Fr,function(es){return es.test(Hi)}):Oe(Fr,function(es){return es.test(Hi)});Hn=Be.valueCallback?Be.valueCallback(wt):wt,Hn=mt.valueCallback?mt.valueCallback(Hn):Hn;var pa=jt.slice(Hi.length);return{value:Hn,rest:pa}}}function Oe(Be,jt){for(var mt in Be)if(Be.hasOwnProperty(mt)&&jt(Be[mt]))return mt}function ve(Be,jt){for(var mt=0;mt0?"in "+On:On+" ago":On},formatLong:Y,formatRelative:function(jt,mt,Bt,On){return se[jt]},localize:{ordinalNumber:function(jt,mt){var Bt=Number(jt),On=Bt%100;if(On>20||On<10)switch(On%10){case 1:return Bt+"st";case 2:return Bt+"nd";case 3:return Bt+"rd"}return Bt+"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(jt){return jt-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 Ze(Be){return function(jt){var mt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Bt=jt.match(Be.matchPattern);if(!Bt)return null;var On=Bt[0],ui=jt.match(Be.parsePattern);if(!ui)return null;var Hi=Be.valueCallback?Be.valueCallback(ui[0]):ui[0];Hi=mt.valueCallback?mt.valueCallback(Hi):Hi;var Fr=jt.slice(On.length);return{value:Hi,rest:Fr}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(jt){return parseInt(jt,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(jt){return jt+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,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function j(pe,Re,Se){var Ee,Oe,ve,Ze,bt,ae,Pi,Ti,fe,Rr,er,Ui,ua,da,Eo,Qa,ha,dn;(0,se.default)(2,arguments);var fa=String(Re),xo=(0,ze.getDefaultOptions)(),Be=null!==(Ee=null!==(Oe=Se?.locale)&&void 0!==Oe?Oe:xo.locale)&&void 0!==Ee?Ee:ye.default,jt=(0,ee.default)(null!==(ve=null!==(Ze=null!==(bt=null!==(ae=Se?.firstWeekContainsDate)&&void 0!==ae?ae:null==Se||null===(Pi=Se.locale)||void 0===Pi||null===(Ti=Pi.options)||void 0===Ti?void 0:Ti.firstWeekContainsDate)&&void 0!==bt?bt:xo.firstWeekContainsDate)&&void 0!==Ze?Ze:null===(fe=xo.locale)||void 0===fe||null===(Rr=fe.options)||void 0===Rr?void 0:Rr.firstWeekContainsDate)&&void 0!==ve?ve:1);if(!(jt>=1&&jt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var mt=(0,ee.default)(null!==(er=null!==(Ui=null!==(ua=null!==(da=Se?.weekStartsOn)&&void 0!==da?da:null==Se||null===(Eo=Se.locale)||void 0===Eo||null===(Qa=Eo.options)||void 0===Qa?void 0:Qa.weekStartsOn)&&void 0!==ua?ua:xo.weekStartsOn)&&void 0!==Ui?Ui:null===(ha=xo.locale)||void 0===ha||null===(dn=ha.options)||void 0===dn?void 0:dn.weekStartsOn)&&void 0!==er?er:0);if(!(mt>=0&&mt<=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 Bt=(0,G.default)(pe);if(!(0,V.default)(Bt))throw new RangeError("Invalid time value");var On=(0,P.default)(Bt),ui=(0,B.default)(Bt,On),Hi={firstWeekContainsDate:jt,weekStartsOn:mt,locale:Be,_originalDate:Bt},Fr=fa.match(te).map(function(wt){var Hn=wt[0];return"p"===Hn||"P"===Hn?(0,R.default[Hn])(wt,Be.formatLong):wt}).join("").match(je).map(function(wt){if("''"===wt)return"'";var Hn=wt[0];if("'"===Hn)return z(wt);var pa=$.default[Hn];if(pa)return!(null!=Se&&Se.useAdditionalWeekYearTokens)&&(0,Y.isProtectedWeekYearToken)(wt)&&(0,Y.throwProtectedError)(wt,Re,String(pe)),!(null!=Se&&Se.useAdditionalDayOfYearTokens)&&(0,Y.isProtectedDayOfYearToken)(wt)&&(0,Y.throwProtectedError)(wt,Re,String(pe)),pa(ui,wt,Be.localize,Hi);if(Hn.match(W))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Hn+"`");return wt}).join("");return Fr};var V=k(x(88830)),B=k(x(65726)),G=k(x(90798)),$=k(x(1635)),R=k(x(75852)),P=k(x(47664)),Y=x(70183),ee=k(x(6092)),se=k(x(61886)),ze=x(40150),ye=k(x(73215)),je=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,te=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,J=/^'([^]*?)'?$/,U=/''/g,W=/[a-zA-Z]/;function z(pe){var Re=pe.match(J);return Re?Re[1].replace(U,"'"):pe}q.exports=E.default},73085:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function G($){return(0,B.default)(1,arguments),$ instanceof Date||"object"===(0,V.default)($)&&"[object Date]"===Object.prototype.toString.call($)};var V=k(x(50590)),B=k(x(61886));q.exports=E.default},88830:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(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=E.default},88995:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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=E.default},77579:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(k){return function(V,B){var $;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;$=k.formattingValues[P]||k.formattingValues[R]}else{var Y=k.defaultWidth,ee=null!=B&&B.width?String(B.width):k.defaultWidth;$=k.values[ee]||k.values[Y]}return $[k.argumentCallback?k.argumentCallback(V):V]}},q.exports=E.default},84728:(q,E)=>{"use strict";function k(B,G){for(var $ in B)if(B.hasOwnProperty($)&&G(B[$]))return $}function V(B,G){for(var $=0;$1&&void 0!==arguments[1]?arguments[1]:{},R=$.width,P=R&&B.matchPatterns[R]||B.matchPatterns[B.defaultMatchWidth],Y=G.match(P);if(!Y)return null;var ye,ee=Y[0],se=R&&B.parsePatterns[R]||B.parsePatterns[B.defaultParseWidth],ze=Array.isArray(se)?V(se,function(te){return te.test(ee)}):k(se,function(te){return te.test(ee)});ye=B.valueCallback?B.valueCallback(ze):ze,ye=$.valueCallback?$.valueCallback(ye):ye;var je=G.slice(ee.length);return{value:ye,rest:je}}},q.exports=E.default},27223:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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 $=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($.length);return{value:P,rest:Y}}},q.exports=E.default},39563:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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"}};E.default=function(G,$,R){var P,Y=x[G];return P="string"==typeof Y?Y:1===$?Y.one:Y.other.replace("{{count}}",$.toString()),null!=R&&R.addSuffix?R.comparison&&R.comparison>0?"in "+P:P+" ago":P},q.exports=E.default},66929:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.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"})};E.default=R,q.exports=E.default},21656:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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"};E.default=function(G,$,R,P){return x[G]},q.exports=E.default},31098:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(77579)),se={ordinalNumber:function(je,te){var J=Number(je),U=J%100;if(U>20||U<10)switch(U%10){case 1:return J+"st";case 2:return J+"nd";case 3:return J+"rd"}return J+"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"})};E.default=se,q.exports=E.default},53239:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.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"})};E.default=U,q.exports=E.default},33338:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(39563)),B=k(x(66929)),G=k(x(21656)),$=k(x(31098)),R=k(x(53239));E.default={code:"en-US",formatDistance:V.default,formatLong:B.default,formatRelative:G.default,localize:$.default,match:R.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},q.exports=E.default},65726:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(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=E.default},90798:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function G($){(0,B.default)(1,arguments);var R=Object.prototype.toString.call($);return $ instanceof Date||"object"===(0,V.default)($)&&"[object Date]"===R?new Date($.getTime()):"number"==typeof $||"[object Number]"===R?new Date($):(("string"==typeof $||"[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=E.default},88222:(q,E,x)=>{q=x.nmd(q);var V="__lodash_hash_undefined__",$=9007199254740991,R="[object Arguments]",P="[object Array]",ee="[object Boolean]",se="[object Date]",ze="[object Error]",ye="[object Function]",te="[object Map]",J="[object Number]",W="[object Object]",j="[object Promise]",pe="[object RegExp]",Re="[object Set]",Se="[object String]",ve="[object WeakMap]",Ze="[object ArrayBuffer]",bt="[object DataView]",Qa=/^\[object .+?Constructor\]$/,ha=/^(?:0|[1-9]\d*)$/,dn={};dn["[object Float32Array]"]=dn["[object Float64Array]"]=dn["[object Int8Array]"]=dn["[object Int16Array]"]=dn["[object Int32Array]"]=dn["[object Uint8Array]"]=dn["[object Uint8ClampedArray]"]=dn["[object Uint16Array]"]=dn["[object Uint32Array]"]=!0,dn[R]=dn[P]=dn[Ze]=dn[ee]=dn[bt]=dn[se]=dn[ze]=dn[ye]=dn[te]=dn[J]=dn[W]=dn[pe]=dn[Re]=dn[Se]=dn[ve]=!1;var fa="object"==typeof global&&global&&global.Object===Object&&global,xo="object"==typeof self&&self&&self.Object===Object&&self,Be=fa||xo||Function("return this")(),jt=E&&!E.nodeType&&E,mt=jt&&q&&!q.nodeType&&q,Bt=mt&&mt.exports===jt,On=Bt&&fa.process,ui=function(){try{return On&&On.binding&&On.binding("util")}catch{}}(),Hi=ui&&ui.isTypedArray;function Hn(T,L){for(var ne=-1,De=null==T?0:T.length;++neii))return!1;var rn=ut.get(T);if(rn&&ut.get(L))return rn==L;var Mi=-1,ao=!0,Me=2&ne?new Yt:void 0;for(ut.set(T,L),ut.set(L,T);++Mi-1},ts.prototype.set=function qE(T,L){var ne=this.__data__,De=qu(ne,T);return De<0?(++this.size,ne.push([T,L])):ne[De][1]=L,this},Xa.prototype.clear=function yw(){this.size=0,this.__data__={hash:new _a,map:new(ga||ts),string:new _a}},Xa.prototype.delete=function KE(T){var L=fn(this,T).delete(T);return this.size-=L?1:0,L},Xa.prototype.get=function _w(T){return fn(this,T).get(T)},Xa.prototype.has=function QE(T){return fn(this,T).has(T)},Xa.prototype.set=function jr(T,L){var ne=fn(this,T),De=ne.size;return ne.set(T,L),this.size+=ne.size==De?0:1,this},Yt.prototype.add=Yt.prototype.push=function ZE(T){return this.__data__.set(T,V),this},Yt.prototype.has=function JE(T){return this.__data__.has(T)},va.prototype.clear=function H(){this.__data__=new ts,this.size=0},va.prototype.delete=function XE(T){var L=this.__data__,ne=L.delete(T);return this.size=L.size,ne},va.prototype.get=function lt(T){return this.__data__.get(T)},va.prototype.has=function Yu(T){return this.__data__.has(T)},va.prototype.set=function vw(T,L){var ne=this.__data__;if(ne instanceof ts){var De=ne.__data__;if(!ga||De.length<199)return De.push([T,L]),this.size=++ne.size,this;ne=this.__data__=new Xa(De)}return ne.set(T,L),this.size=ne.size,this};var tx=ly?function(T){return null==T?[]:(T=Object(T),function Fr(T,L){for(var ne=-1,De=null==T?0:T.length,Ye=0,ut=[];++ne-1&&T%1==0&&T-1&&T%1==0&&T<=$}function il(T){var L=typeof T;return null!=T&&("object"==L||"function"==L)}function lc(T){return null!=T&&"object"==typeof T}var fy=Hi?function es(T){return function(L){return T(L)}}(Hi):function et(T){return lc(T)&&Xu(T.length)&&!!dn[el(T)]};function Sw(T){return function F(T){return null!=T&&Xu(T.length)&&!ac(T)}(T)?function cy(T,L){var ne=Zu(T),De=!ne&&nl(T),Ye=!ne&&!De&&Ju(T),ut=!ne&&!De&&!Ye&&fy(T),Nn=ne||De||Ye||ut,ii=Nn?function pa(T,L){for(var ne=-1,De=Array(T);++ne{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],$=G[0];return Promise.all(G.slice(1).map(x.e)).then(()=>x.t($,23))}V.keys=()=>Object.keys(k),V.id=13131,q.exports=V},71213:(q,E,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],$=G[0];return Promise.all(G.slice(2).map(x.e)).then(()=>x.t($,16|G[1]))}V.keys=()=>Object.keys(k),V.id=71213,q.exports=V},36930:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(k,V,B,G,$,R,P){var Y=new Date(0);return Y.setUTCFullYear(k,V,B),Y.setUTCHours(G,$,R,P),Y},q.exports=E.default},47:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(G,$,R){var P=function B(G,$,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:$,timeZoneName:G})}(G,R.timeZone,R.locale);return P.formatToParts?function k(G,$){for(var R=G.formatToParts($),P=R.length-1;P>=0;--P)if("timeZoneName"===R[P].type)return R[P].value}(P,$):function V(G,$){var R=G.format($).replace(/\u200E/g,""),P=/ [\w-+ ]+$/.exec(R);return P?P[0].substr(1):""}(P,$)},q.exports=E.default},1870:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(te,J,U){var W,j,z;if(!te||(W=R.timezoneZ.exec(te)))return 0;if(W=R.timezoneHH.exec(te))return ze(z=parseInt(W[1],10))?-z*G:NaN;if(W=R.timezoneHHMM.exec(te)){z=parseInt(W[1],10);var pe=parseInt(W[2],10);return ze(z,pe)?(j=Math.abs(z)*G+6e4*pe,z>0?-j:j):NaN}if(function je(te){if(ye[te])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:te}),ye[te]=!0,!0}catch{return!1}}(te)){J=new Date(J||Date.now());var Re=U?J:function Y(te){return(0,V.default)(te.getFullYear(),te.getMonth(),te.getDate(),te.getHours(),te.getMinutes(),te.getSeconds(),te.getMilliseconds())}(J),Se=ee(Re,te),Ee=U?Se:function se(te,J,U){var j=te.getTime()-J,z=ee(new Date(j),U);if(J===z)return J;j-=z-J;var pe=ee(new Date(j),U);return z===pe?z:Math.max(z,pe)}(J,Se,te);return-Ee}return NaN};var k=B(x(78598)),V=B(x(36930));function B(te){return te&&te.__esModule?te:{default:te}}var G=36e5,R={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function ee(te,J){var U=(0,k.default)(te,J),W=(0,V.default)(U[0],U[1]-1,U[2],U[3]%24,U[4],U[5],0).getTime(),j=te.getTime(),z=j%1e3;return W-(j-(z>=0?z:1e3+z))}function ze(te,J){return-23<=te&&te<=23&&(null==J||0<=J&&J<=59)}var ye={};q.exports=E.default},32121:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0,E.default=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,q.exports=E.default},78598:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(R,P){var Y=function $(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),ee=[],se=0;se=0&&(ee[ze]=parseInt(Y[se].value,10))}return ee}catch(ye){if(ye instanceof RangeError)return[NaN];throw ye}}(Y,R):function B(R,P){var Y=R.format(P).replace(/\u200E/g,""),ee=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(Y);return[ee[3],ee[1],ee[2],ee[4],ee[5],ee[6]]}(Y,R)};var k={year:0,month:1,day:2,hour:3,minute:4,second:5},G={};q.exports=E.default},65660:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var k=B(x(47)),V=B(x(1870));function B(ye){return ye&&ye.__esModule?ye:{default:ye}}function R(ye,je){var te=ye?(0,V.default)(ye,je,!0)/6e4:je.getTimezoneOffset();if(Number.isNaN(te))throw new RangeError("Invalid time zone specified: "+ye);return te}function P(ye,je){for(var te=ye<0?"-":"",J=Math.abs(ye).toString();J.length0?"-":"+",U=Math.abs(ye);return J+P(Math.floor(U/60),2)+te+P(Math.floor(U%60),2)}function ee(ye,je){return ye%60==0?(ye>0?"-":"+")+P(Math.abs(ye)/60,2):Y(ye,je)}E.default={X:function(ye,je,te,J){var U=R(J.timeZone,J._originalDate||ye);if(0===U)return"Z";switch(je){case"X":return ee(U);case"XXXX":case"XX":return Y(U);default:return Y(U,":")}},x:function(ye,je,te,J){var U=R(J.timeZone,J._originalDate||ye);switch(je){case"x":return ee(U);case"xxxx":case"xx":return Y(U);default:return Y(U,":")}},O:function(ye,je,te,J){var U=R(J.timeZone,J._originalDate||ye);switch(je){case"O":case"OO":case"OOO":return"GMT"+function se(ye,je){var te=ye>0?"-":"+",J=Math.abs(ye),U=Math.floor(J/60),W=J%60;if(0===W)return te+String(U);var j=je||"";return te+String(U)+j+P(W,2)}(U,":");default:return"GMT"+Y(U,":")}},z:function(ye,je,te,J){var U=J._originalDate||ye;switch(je){case"z":case"zz":case"zzz":return(0,k.default)("short",U,J);default:return(0,k.default)("long",U,J)}}},q.exports=E.default},34294:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function R(P,Y,ee){var se=String(Y),ze=ee||{},ye=se.match($);if(ye){var je=(0,B.default)(P,ze);se=ye.reduce(function(te,J){if("'"===J[0])return te;var U=te.indexOf(J),W="'"===te[U-1],j=te.replace(J,"'"+V.default[J[0]](je,J,null,ze)+"'");return W?j.substring(0,U-1)+j.substring(U+1):j},se)}return(0,k.default)(P,se,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 $=/([xXOz]+)|''|'(''|[^'])+('|$)/g;q.exports=E.default},28032:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(R,P,Y,ee){var se=(0,k.default)(ee);return se.timeZone=P,(0,V.default)((0,B.default)(R,P),Y,se)};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=E.default},46167:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function B(G,$){return-(0,k.default)(G,$)};var k=function V(G){return G&&G.__esModule?G:{default:G}}(x(1870));q.exports=E.default},30298:(q,E,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,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function se(Ee,Oe){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===Ee)return new Date(NaN);var ve=Oe||{},Ze=null==ve.additionalDigits?2:(0,k.default)(ve.additionalDigits);if(2!==Ze&&1!==Ze&&0!==Ze)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 bt=ze(Ee),ae=ye(bt.date,Ze),Pi=ae.year,Ti=ae.restDateString,fe=je(Ti,Pi);if(isNaN(fe))return new Date(NaN);if(fe){var Ui,Rr=fe.getTime(),er=0;if(bt.time&&(er=te(bt.time),isNaN(er)))return new Date(NaN);if(bt.timeZone||ve.timeZone){if(Ui=(0,B.default)(bt.timeZone||ve.timeZone,new Date(Rr+er)),isNaN(Ui))return new Date(NaN)}else Ui=(0,V.default)(new Date(Rr+er)),Ui=(0,V.default)(new Date(Rr+er+Ui));return new Date(Rr+er+Ui)}return new Date(NaN)};var k=$(x(6092)),V=$(x(47664)),B=$(x(1870)),G=$(x(32121));function $(Ee){return Ee&&Ee.__esModule?Ee:{default:Ee}}var R=36e5,ee={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 Ze,Oe={},ve=ee.dateTimePattern.exec(Ee);if(ve?(Oe.date=ve[1],Ze=ve[3]):(ve=ee.datePattern.exec(Ee))?(Oe.date=ve[1],Ze=ve[2]):(Oe.date=null,Ze=Ee),Ze){var bt=ee.timeZone.exec(Ze);bt?(Oe.time=Ze.replace(bt[1],""),Oe.timeZone=bt[1].trim()):Oe.time=Ze}return Oe}function ye(Ee,Oe){var bt,ve=ee.YYY[Oe],Ze=ee.YYYYY[Oe];if(bt=ee.YYYY.exec(Ee)||Ze.exec(Ee)){var ae=bt[1];return{year:parseInt(ae,10),restDateString:Ee.slice(ae.length)}}if(bt=ee.YY.exec(Ee)||ve.exec(Ee)){var Pi=bt[1];return{year:100*parseInt(Pi,10),restDateString:Ee.slice(Pi.length)}}return{year:null}}function je(Ee,Oe){if(null===Oe)return null;var ve,Ze,bt,ae;if(0===Ee.length)return(Ze=new Date(0)).setUTCFullYear(Oe),Ze;if(ve=ee.MM.exec(Ee))return Ze=new Date(0),z(Oe,bt=parseInt(ve[1],10)-1)?(Ze.setUTCFullYear(Oe,bt),Ze):new Date(NaN);if(ve=ee.DDD.exec(Ee)){Ze=new Date(0);var Pi=parseInt(ve[1],10);return function pe(Ee,Oe){if(Oe<1)return!1;var ve=j(Ee);return!(ve&&Oe>366||!ve&&Oe>365)}(Oe,Pi)?(Ze.setUTCFullYear(Oe,0,Pi),Ze):new Date(NaN)}if(ve=ee.MMDD.exec(Ee)){Ze=new Date(0),bt=parseInt(ve[1],10)-1;var Ti=parseInt(ve[2],10);return z(Oe,bt,Ti)?(Ze.setUTCFullYear(Oe,bt,Ti),Ze):new Date(NaN)}if(ve=ee.Www.exec(Ee))return Re(0,ae=parseInt(ve[1],10)-1)?J(Oe,ae):new Date(NaN);if(ve=ee.WwwD.exec(Ee)){ae=parseInt(ve[1],10)-1;var fe=parseInt(ve[2],10)-1;return Re(0,ae,fe)?J(Oe,ae,fe):new Date(NaN)}return null}function te(Ee){var Oe,ve,Ze;if(Oe=ee.HH.exec(Ee))return Se(ve=parseFloat(Oe[1].replace(",",".")))?ve%24*R:NaN;if(Oe=ee.HHMM.exec(Ee))return Se(ve=parseInt(Oe[1],10),Ze=parseFloat(Oe[2].replace(",",".")))?ve%24*R+6e4*Ze:NaN;if(Oe=ee.HHMMSS.exec(Ee)){ve=parseInt(Oe[1],10),Ze=parseInt(Oe[2],10);var bt=parseFloat(Oe[3].replace(",","."));return Se(ve,Ze,bt)?ve%24*R+6e4*Ze+1e3*bt:NaN}return null}function J(Ee,Oe,ve){Oe=Oe||0,ve=ve||0;var Ze=new Date(0);Ze.setUTCFullYear(Ee,0,4);var ae=7*Oe+ve+1-(Ze.getUTCDay()||7);return Ze.setUTCDate(Ze.getUTCDate()+ae),Ze}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,Oe,ve){if(Oe<0||Oe>11)return!1;if(null!=ve){if(ve<1)return!1;var Ze=j(Ee);if(Ze&&ve>W[Oe]||!Ze&&ve>U[Oe])return!1}return!0}function Re(Ee,Oe,ve){return!(Oe<0||Oe>52||null!=ve&&(ve<0||ve>6))}function Se(Ee,Oe,ve){return!(null!=Ee&&(Ee<0||Ee>=25)||null!=Oe&&(Oe<0||Oe>=60)||null!=ve&&(ve<0||ve>=60))}q.exports=E.default},17318:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function G($,R,P){var Y=(0,V.default)($,P),ee=(0,k.default)(R,Y,!0),se=new Date(Y.getTime()-ee),ze=new Date(0);return ze.setFullYear(se.getUTCFullYear(),se.getUTCMonth(),se.getUTCDate()),ze.setHours(se.getUTCHours(),se.getUTCMinutes(),se.getUTCSeconds(),se.getUTCMilliseconds()),ze};var k=B(x(1870)),V=B(x(29018));function B($){return $&&$.__esModule?$:{default:$}}q.exports=E.default},99679:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y,ee,se){if("string"==typeof Y&&!Y.match(B.default)){var ze=(0,k.default)(se);return ze.timeZone=ee,(0,V.default)(Y,ze)}var ye=(0,V.default)(Y,se),je=(0,$.default)(ye.getFullYear(),ye.getMonth(),ye.getDate(),ye.getHours(),ye.getMinutes(),ye.getSeconds(),ye.getMilliseconds()).getTime(),te=(0,G.default)(ee,new Date(je));return new Date(je+te)};var k=R(x(42926)),V=R(x(29018)),B=R(x(32121)),G=R(x(1870)),$=R(x(36930));function R(Y){return Y&&Y.__esModule?Y:{default:Y}}q.exports=E.default},36758:q=>{q.exports=function E(x){return x&&x.__esModule?x:{default:x}},q.exports.__esModule=!0,q.exports.default=q.exports},50590:q=>{function E(x){return q.exports=E="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,E(x)}q.exports=E,q.exports.__esModule=!0,q.exports.default=q.exports}},q=>{q(q.s=66664)}]); \ 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],{30361:(q,E,x)=>{"use strict";function k(n){return"function"==typeof n}let V=!1;const B={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.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 $={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 te=(()=>{function n(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return n.prototype=Object.create(Error.prototype),n})();class se{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof se)e.remove(this);else if(null!==e)for(let s=0;st.concat(e instanceof te?e.errors:e),[])}se.EMPTY=((n=new se).closed=!0,n);const ye="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class ne extends se{constructor(t,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=$;break;case 1:if(!t){this.destination=$;break}if("object"==typeof t){t instanceof ne?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new X(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new X(this,t,e,i)}}[ye](){return this}static create(t,e,i){const r=new ne(t,e,i);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class X extends ne{constructor(t,e,i,r){super(),this._parentSubscriber=t;let o,s=this;k(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==$&&(s=Object.create(e),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(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;B.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=B;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):G(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;G(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);B.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(i){if(this.unsubscribe(),B.useDeprecatedSynchronousErrorHandling)throw i;G(i)}}__tryOrSetError(t,e,i){if(!B.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return B.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(G(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const j="function"==typeof Symbol&&Symbol.observable||"@@observable";function z(n){return n}function pe(...n){return Re(n)}function Re(n){return 0===n.length?z:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}let Se=(()=>{class n{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function W(n,t,e){if(n){if(n instanceof ne)return n;if(n[ye])return n[ye]()}return n||t||e?new ne(n,t,e):new ne($)}(e,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(e){try{return this._subscribe(e)}catch(i){B.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function U(n){for(;n;){const{closed:t,destination:e,isStopped:i}=n;if(t||i)return!1;n=e&&e instanceof ne?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=Ee(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[j](){return this}pipe(...e){return 0===e.length?this:Re(e)(this)}toPromise(e){return new(e=Ee(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),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 Ze extends se{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class bt extends ne{constructor(t){super(t),this.destination=t}}let ae=(()=>{class n extends Se{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[ye](){return new bt(this)}lift(e){const i=new Pi(this,this);return i.operator=e,i}next(e){if(this.closed)throw new ve;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew Pi(t,e),n})();class Pi extends ae{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):se.EMPTY}}function Ti(n){return n&&"function"==typeof n.schedule}function fe(n,t){return function(i){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Rr(n,t))}}class Rr{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new er(t,this.project,this.thisArg))}}class er extends ne{constructor(t,e,i){super(t),this.project=e,this.count=0,this.thisArg=i||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const Ui=n=>t=>{for(let e=0,i=n.length;en&&"number"==typeof n.length&&"function"!=typeof n;function xo(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const Be=n=>{if(n&&"function"==typeof n[j])return(n=>t=>{const e=n[j]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)})(n);if(fa(n))return Ui(n);if(xo(n))return(n=>t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,G),t))(n);if(n&&"function"==typeof n[Eo])return(n=>t=>{const e=n[Eo]();for(;;){let i;try{i=e.next()}catch(r){return t.error(r),t}if(i.done){t.complete();break}if(t.next(i.value),t.closed)break}return"function"==typeof e.return&&t.add(()=>{e.return&&e.return()}),t})(n);{const e=`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(e)}};function Bt(n,t){return new Se(e=>{const i=new se;let r=0;return i.add(t.schedule(function(){r!==n.length?(e.next(n[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function Fr(n,t){if(null!=n){if(function ui(n){return n&&"function"==typeof n[j]}(n))return function jt(n,t){return new Se(e=>{const i=new se;return i.add(t.schedule(()=>{const r=n[j]();i.add(r.subscribe({next(o){i.add(t.schedule(()=>e.next(o)))},error(o){i.add(t.schedule(()=>e.error(o)))},complete(){i.add(t.schedule(()=>e.complete()))}}))})),i})}(n,t);if(xo(n))return function mt(n,t){return new Se(e=>{const i=new se;return i.add(t.schedule(()=>n.then(r=>{i.add(t.schedule(()=>{e.next(r),i.add(t.schedule(()=>e.complete()))}))},r=>{i.add(t.schedule(()=>e.error(r)))}))),i})}(n,t);if(fa(n))return Bt(n,t);if(function Hi(n){return n&&"function"==typeof n[Eo]}(n)||"string"==typeof n)return function On(n,t){if(!n)throw new Error("Iterable cannot be null");return new Se(e=>{const i=new se;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(()=>{r=n[Eo](),i.add(t.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(n,t)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}function wt(n,t){return t?Fr(n,t):n instanceof Se?n:new Se(Be(n))}class Hn extends ne{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class es extends ne{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function oc(n,t){if(t.closed)return;if(n instanceof Se)return n.subscribe(t);let e;try{e=Be(n)(t)}catch(i){t.error(i)}return e}function ni(n,t,e=Number.POSITIVE_INFINITY){return"function"==typeof t?i=>i.pipe(ni((r,o)=>wt(n(r,o)).pipe(fe((s,a)=>t(r,s,o,a))),e)):("number"==typeof t&&(e=t),i=>i.lift(new fw(n,e)))}class fw{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new pw(t,this.project,this.concurrent))}}class pw extends es{constructor(t,e,i=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}const vf=ni;function Ja(n=Number.POSITIVE_INFINITY){return ni(z,n)}function Xa(n,t){return t?Bt(n,t):new Se(Ui(n))}function ws(...n){let t=Number.POSITIVE_INFINITY,e=null,i=n[n.length-1];return Ti(i)?(e=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(t=n.pop())):"number"==typeof i&&(t=n.pop()),null===e&&1===n.length&&n[0]instanceof Se?n[0]:Ja(t)(Xa(n,e))}function sc(){return function(t){return t.lift(new Io(t))}}class Io{constructor(t){this.connectable=t}call(t,e){const{connectable:i}=this;i._refCount++;const r=new oy(t,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class oy extends ne{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=t._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class $u extends Se{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new se,t.add(this.source.subscribe(new sy(this.getSubject(),this))),t.closed&&(this._connection=null,t=se.EMPTY)),t}refCount(){return sc()(this)}}const mw=(()=>{const n=$u.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 sy extends bt{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}class gw{constructor(t,e){this.subjectFactory=t,this.selector=e}call(t,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(t);return o.add(e.subscribe(r)),o}}function ma(){return new ae}function Cn(n){for(let t in n)if(n[t]===Cn)return t;throw Error("Could not find renamed property on target object.")}function wf(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function _n(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(_n).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function ga(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const Cf=Cn({__forward_ref__:Cn});function Ut(n){return n.__forward_ref__=Ut,n.toString=function(){return _n(this())},n}function Je(n){return ya(n)?n():n}function ya(n){return"function"==typeof n&&n.hasOwnProperty(Cf)&&n.__forward_ref__===Ut}function Df(n){return n&&!!n.\u0275providers}const Wu="https://g.co/ng/security#xss";class Q extends Error{constructor(t,e){super(function Gu(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}}function at(n){return"string"==typeof n?n:null==n?"":String(n)}function Yu(n,t){throw new Q(-201,!1)}function jr(n,t){null==n&&function Yt(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}(t,n,null,"!=")}function H(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function ct(n){return{providers:n.providers||[],imports:n.imports||[]}}function qu(n){return uy(n,ac)||uy(n,dy)}function uy(n,t){return n.hasOwnProperty(t)?n[t]:null}function tl(n){return n&&(n.hasOwnProperty(Qu)||n.hasOwnProperty(Cw))?n[Qu]:null}const ac=Cn({\u0275prov:Cn}),Qu=Cn({\u0275inj:Cn}),dy=Cn({ngInjectableDef:Cn}),Cw=Cn({ngInjectorDef:Cn});var et=(()=>((et=et||{})[et.Default=0]="Default",et[et.Host=1]="Host",et[et.Self=2]="Self",et[et.SkipSelf=4]="SkipSelf",et[et.Optional=8]="Optional",et))();let Tf;function zr(n){const t=Tf;return Tf=n,t}function fy(n,t,e){const i=qu(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&et.Optional?null:void 0!==t?t:void Yu(_n(n))}const fn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Vr={},Mf="__NG_DI_FLAG__",Zu="ngTempTokenPath",Mw=/\n/gm,Ds="__source";let nl;function il(n){const t=nl;return nl=n,t}function Ju(n,t=et.Default){if(void 0===nl)throw new Q(-203,!1);return null===nl?fy(n,void 0,t):nl.get(n,t&et.Optional?null:void 0,t)}function F(n,t=et.Default){return(function hy(){return Tf}()||Ju)(Je(n),t)}function it(n,t=et.Default){return F(n,cc(t))}function cc(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function ed(n){const t=[];for(let e=0;e((so=so||{})[so.OnPush=0]="OnPush",so[so.Default=1]="Default",so))(),ie=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}(ie||(ie={})),ie))();const Te={},Ye=[],ut=Cn({\u0275cmp:Cn}),Nn=Cn({\u0275dir:Cn}),ii=Cn({\u0275pipe:Cn}),vi=Cn({\u0275mod:Cn}),rn=Cn({\u0275fac:Cn}),Mi=Cn({__NG_ELEMENT_ID__:Cn});let ao=0;function Me(n){return Ts(()=>{const e=!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===so.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||Ye,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||ie.Emulated,id:"c"+ao++,styles:n.styles||Ye,_:null,setInput:null,schemas:n.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=n.dependencies,s=n.features;return r.inputs=Sf(n.inputs,i),r.outputs=Sf(n.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(yr).filter(ns):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(_r).filter(ns):null,r})}function Si(n,t,e){const i=n.\u0275cmp;i.directiveDefs=()=>("function"==typeof t?t():t).map(yr),i.pipeDefs=()=>("function"==typeof e?e():e).map(_r)}function yr(n){return vn(n)||tr(n)}function ns(n){return null!==n}function Xe(n){return Ts(()=>({type:n.type,bootstrap:n.bootstrap||Ye,declarations:n.declarations||Ye,imports:n.imports||Ye,exports:n.exports||Ye,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function Sf(n,t){if(null==n)return Te;const e={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,t&&(t[r]=o)}return e}const we=Me;function qn(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 vn(n){return n[ut]||null}function tr(n){return n[Nn]||null}function _r(n){return n[ii]||null}function lo(n,t){const e=n[vi]||null;if(!e&&!0===t)throw new Error(`Type ${_n(n)} does not have '\u0275mod' property.`);return e}function co(n){return Array.isArray(n)&&"object"==typeof n[1]}function rs(n){return Array.isArray(n)&&!0===n[1]}function Ow(n){return 0!=(4&n.flags)}function Of(n){return n.componentOffset>-1}function vy(n){return 1==(1&n.flags)}function ss(n){return null!==n.template}function nB(n){return 0!=(256&n[2])}function hc(n,t){return n.hasOwnProperty(rn)?n[rn]:null}class cx{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function $i(){return ux}function ux(n){return n.type.prototype.ngOnChanges&&(n.setInput=sB),oB}function oB(){const n=hx(this),t=n?.current;if(t){const e=n.previous;if(e===Te)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function sB(n,t,e,i){const r=this.declaredInputs[e],o=hx(n)||function aB(n,t){return n[dx]=t}(n,{previous:Te,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new cx(l&&l.currentValue,t,a===Te),n[i]=t}$i.ngInherit=!0;const dx="__ngSimpleChanges__";function hx(n){return n[dx]||null}function Wi(n){for(;Array.isArray(n);)n=n[0];return n}function by(n,t){return Wi(t[n])}function uo(n,t){return Wi(t[n.index])}function mx(n,t){return n.data[t]}function sd(n,t){return n[t]}function ho(n,t){const e=t[n];return co(e)?e:e[0]}function wy(n){return 64==(64&n[2])}function ol(n,t){return null==t?null:n[t]}function gx(n){n[18]=0}function kw(n,t){n[5]+=t;let e=n,i=n[3];for(;null!==i&&(1===t&&1===e[5]||-1===t&&0===e[5]);)i[5]+=t,e=i,i=i[3]}const gt={lFrame:Sx(null),bindingsEnabled:!0};function _x(){return gt.bindingsEnabled}function oe(){return gt.lFrame.lView}function Xt(){return gt.lFrame.tView}function de(n){return gt.lFrame.contextLView=n,n[8]}function he(n){return gt.lFrame.contextLView=null,n}function Gi(){let n=vx();for(;null!==n&&64===n.type;)n=n.parent;return n}function vx(){return gt.lFrame.currentTNode}function Ss(n,t){const e=gt.lFrame;e.currentTNode=n,e.isParent=t}function Nw(){return gt.lFrame.isParent}function Pw(){gt.lFrame.isParent=!1}function br(){const n=gt.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function ad(){return gt.lFrame.bindingIndex++}function Da(n){const t=gt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function bB(n,t){const e=gt.lFrame;e.bindingIndex=e.bindingRootIndex=n,Lw(t)}function Lw(n){gt.lFrame.currentDirectiveIndex=n}function Dx(){return gt.lFrame.currentQueryIndex}function Fw(n){gt.lFrame.currentQueryIndex=n}function CB(n){const t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function Tx(n,t,e){if(e&et.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&et.Host||(r=CB(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;t=r,n=o}const i=gt.lFrame=Mx();return i.currentTNode=t,i.lView=n,!0}function jw(n){const t=Mx(),e=n[1];gt.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function Mx(){const n=gt.lFrame,t=null===n?null:n.child;return null===t?Sx(n):t}function Sx(n){const t={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=t),t}function Ex(){const n=gt.lFrame;return gt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const xx=Ex;function zw(){const n=Ex();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 wr(){return gt.lFrame.selectedIndex}function fc(n){gt.lFrame.selectedIndex=n}function Kn(){const n=gt.lFrame;return mx(n.tView,n.selectedIndex)}function Vw(){gt.lFrame.currentNamespace="svg"}function Bw(){!function SB(){gt.lFrame.currentNamespace=null}()}function Cy(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e=i)break}else t[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===t){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class kf{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function $w(n,t,e){let i=0;for(;it){s=o-1;break}}}for(;o>16}(n),i=t;for(;e>0;)i=i[15],e--;return i}let Ww=!0;function Ey(n){const t=Ww;return Ww=n,t}let PB=0;const Es={};function xy(n,t){const e=Rx(n,t);if(-1!==e)return e;const i=t[1];i.firstCreatePass&&(n.injectorIndex=t.length,Gw(i.data,n),Gw(t,null),Gw(i.blueprint,null));const r=Yw(n,t),o=n.injectorIndex;if(Nx(r)){const s=My(r),a=Sy(r,t),l=a[1].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function Gw(n,t){n.push(0,0,0,0,0,0,0,0,t)}function Rx(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function Yw(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=Hx(r),null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function qw(n,t,e){!function LB(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Mi)&&(i=e[Mi]),null==i&&(i=e[Mi]=PB++);const r=255&i;t.data[n+(r>>5)]|=1<=0?255&t:zB:t}(e);if("function"==typeof o){if(!Tx(t,n,i))return i&et.Host?Fx(r,0,i):jx(t,e,i,r);try{const s=o(i);if(null!=s||i&et.Optional)return s;Yu()}finally{xx()}}else if("number"==typeof o){let s=null,a=Rx(n,t),l=-1,c=i&et.Host?t[16][6]:null;for((-1===a||i&et.SkipSelf)&&(l=-1===a?Yw(n,t):t[a+8],-1!==l&&Ux(i,!1)?(s=t[1],a=My(l),t=Sy(l,t)):a=-1);-1!==a;){const u=t[1];if(Bx(o,a,u.data)){const d=FB(a,t,e,s,i,c);if(d!==Es)return d}l=t[a+8],-1!==l&&Ux(i,t[1].data[a+8]===c)&&Bx(o,a,t)?(s=u,a=My(l),t=Sy(l,t)):a=-1}}return r}function FB(n,t,e,i,r,o){const s=t[1],a=s.data[n+8],u=Iy(a,s,e,null==i?Of(a)&&Ww:i!=s&&0!=(3&a.type),r&et.Host&&o===a);return null!==u?pc(t,s,u,a):Es}function Iy(n,t,e,i,r){const o=n.providerIndexes,s=t.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===e)return f}if(r){const f=s[l];if(f&&ss(f)&&f.type===e)return l}return null}function pc(n,t,e,i){let r=n[e];const o=t.data;if(function OB(n){return n instanceof kf}(r)){const s=r;s.resolving&&function _a(n,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${n}`:"";throw new Q(-200,`Circular dependency in DI detected for ${n}${e}`)}(function Jt(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():at(n)}(o[e]));const a=Ey(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?zr(s.injectImpl):null;Tx(n,i,et.Default);try{r=n[e]=s.factory(void 0,o,n,i),t.firstCreatePass&&e>=i.directiveStart&&function xB(n,t,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){const s=ux(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-n,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,o))}(e,o[e],t)}finally{null!==l&&zr(l),Ey(a),s.resolving=!1,xx()}}return r}function Bx(n,t,e){return!!(e[t+(n>>5)]&1<{const t=n.prototype.constructor,e=t[rn]||Kw(t),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const o=r[rn]||Kw(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function Kw(n){return ya(n)?()=>{const t=Kw(Je(n));return t&&t()}:hc(n)}function Hx(n){const t=n[1],e=t.type;return 2===e?t.declTNode:1===e?n[6]:null}const dd="__parameters__";function fd(n,t,e){return Ts(()=>{const i=function Qw(n){return function(...e){if(n){const i=n(...e);for(const r in i)this[r]=i[r]}}}(t);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(dd)?l[dd]:Object.defineProperty(l,dd,{value:[]})[dd];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class Ce{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=H({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function mc(n,t){n.forEach(e=>Array.isArray(e)?mc(e,t):t(e))}function Wx(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function Ay(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function Rf(n,t){const e=[];for(let i=0;i=0?n[1|i]=e:(i=~i,function $B(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function Jw(n,t){const e=pd(n,t);if(e>=0)return n[1|e]}function pd(n,t){return function Gx(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=n[o<t?r=o:i=o+1}return~(r<({token:n})),-1),Ff=rl(fd("Optional"),8),jf=rl(fd("SkipSelf"),4);var Br=(()=>((Br=Br||{})[Br.Important=1]="Important",Br[Br.DashCase=2]="DashCase",Br))();const iC=new Map;let hU=0;const oC="__ngContext__";function rr(n,t){co(t)?(n[oC]=t[20],function pU(n){iC.set(n[20],n)}(t)):n[oC]=t}function aC(n,t){return undefined(n,t)}function Uf(n){const t=n[3];return rs(t)?t[3]:t}function lC(n){return hI(n[13])}function cC(n){return hI(n[4])}function hI(n){for(;null!==n&&!rs(n);)n=n[4];return n}function gd(n,t,e,i,r){if(null!=i){let o,s=!1;rs(i)?o=i:co(i)&&(s=!0,i=i[0]);const a=Wi(i);0===n&&null!==e?null==r?_I(t,e,a):gc(t,e,a,r||null,!0):1===n&&null!==e?gc(t,e,a,r||null,!0):2===n?function gC(n,t,e){const i=Ry(n,t);i&&function PU(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}(t,a,s):3===n&&t.destroyNode(a),null!=o&&function FU(n,t,e,i,r){const o=e[7];o!==Wi(e)&&gd(t,n,i,o,r);for(let a=10;a0&&(n[e-1][4]=i[4]);const o=Ay(n,10+t);!function SU(n,t){Hf(n,t,t[11],2,null,null),t[0]=null,t[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 mI(n,t){if(!(128&t[2])){const e=t[11];e.destroyNode&&Hf(n,t,e,3,null,null),function IU(n){let t=n[13];if(!t)return fC(n[1],n);for(;t;){let e=null;if(co(t))e=t[13];else{const i=t[10];i&&(e=i)}if(!e){for(;t&&!t[4]&&t!==n;)co(t)&&fC(t[1],t),t=t[3];null===t&&(t=n),co(t)&&fC(t[1],t),e=t&&t[4]}t=e}}(t)}}function fC(n,t){if(!(128&t[2])){t[2]&=-65,t[2]|=128,function NU(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=n.data[i.directiveStart+r];if(o===ie.None||o===ie.Emulated)return null}return uo(i,e)}}(n,t.parent,e)}function gc(n,t,e,i,r){n.insertBefore(t,e,i,r)}function _I(n,t,e){n.appendChild(t,e)}function vI(n,t,e,i,r){null!==i?gc(n,t,e,i,r):_I(n,t,e)}function Ry(n,t){return n.parentNode(t)}function bI(n,t,e){return CI(n,t,e)}let zy,vC,Vy,CI=function wI(n,t,e){return 40&n.type?uo(n,e):null};function Fy(n,t,e,i){const r=gI(n,i,t),o=t[11],a=bI(i.parent||t[6],i,t);if(null!=r)if(Array.isArray(e))for(let l=0;ln,createScript:n=>n,createScriptURL:n=>n})}catch{}return zy}()?.createHTML(n)||n}function II(n){return function bC(){if(void 0===Vy&&(Vy=null,fn.trustedTypes))try{Vy=fn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Vy}()?.createHTML(n)||n}class _c{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Wu})`}}class $U extends _c{getTypeName(){return"HTML"}}class WU extends _c{getTypeName(){return"Style"}}class GU extends _c{getTypeName(){return"Script"}}class YU extends _c{getTypeName(){return"URL"}}class qU extends _c{getTypeName(){return"ResourceURL"}}function po(n){return n instanceof _c?n.changingThisBreaksApplicationSecurity:n}function xs(n,t){const e=function KU(n){return n instanceof _c&&n.getTypeName()||null}(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${Wu})`)}return e===t}class t8{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(yc(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class n8{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const i=this.inertDocument.createElement("body");e.appendChild(i)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=yc(t),e;const i=this.inertDocument.createElement("body");return i.innerHTML=yc(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0"),!0}endElement(t){const e=t.nodeName.toLowerCase();wC.hasOwnProperty(e)&&!NI.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(FI(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const a8=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l8=/([^\#-~ |!])/g;function FI(n){return n.replace(/&/g,"&").replace(a8,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(l8,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Uy;function jI(n,t){let e=null;try{Uy=Uy||function kI(n){const t=new n8(n);return function i8(){try{return!!(new window.DOMParser).parseFromString(yc(""),"text/html")}catch{return!1}}()?new t8(t):t}(n);let i=t?String(t):"";e=Uy.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=e.innerHTML,e=Uy.getInertBodyElement(i)}while(i!==o);return yc((new s8).sanitizeChildren(DC(e)||e))}finally{if(e){const i=DC(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function DC(n){return"content"in n&&function c8(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Pn=(()=>((Pn=Pn||{})[Pn.NONE=0]="NONE",Pn[Pn.HTML=1]="HTML",Pn[Pn.STYLE=2]="STYLE",Pn[Pn.SCRIPT=3]="SCRIPT",Pn[Pn.URL=4]="URL",Pn[Pn.RESOURCE_URL=5]="RESOURCE_URL",Pn))();function vc(n){const t=Wf();return t?II(t.sanitize(Pn.HTML,n)||""):xs(n,"HTML")?II(po(n)):jI(function xI(){return void 0!==vC?vC:typeof document<"u"?document:void 0}(),at(n))}function sl(n){const t=Wf();return t?t.sanitize(Pn.URL,n)||"":xs(n,"URL")?po(n):By(at(n))}function Wf(){const n=oe();return n&&n[12]}const Hy=new Ce("ENVIRONMENT_INITIALIZER"),BI=new Ce("INJECTOR",-1),UI=new Ce("INJECTOR_DEF_TYPES");class HI{get(t,e=Vr){if(e===Vr){const i=new Error(`NullInjectorError: No provider for ${_n(t)}!`);throw i.name="NullInjectorError",i}return e}}function g8(...n){return{\u0275providers:$I(0,n),\u0275fromNgModule:!0}}function $I(n,...t){const e=[],i=new Set;let r;return mc(t,o=>{const s=o;TC(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&WI(r,e),e}function WI(n,t){for(let e=0;e{t.push(o)})}}function TC(n,t,e,i){if(!(n=Je(n)))return!1;let r=null,o=tl(n);const s=!o&&vn(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{const l=n.ngModule;if(o=tl(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)TC(c,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{mc(o.imports,u=>{TC(u,t,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&WI(c,t)}if(!a){const c=hc(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Ye},{provide:UI,useValue:r,multi:!0},{provide:Hy,useValue:()=>F(r),multi:!0})}const l=o.providers;null==l||a||MC(l,u=>{t.push(u)})}}return r!==n&&void 0!==n.providers}function MC(n,t){for(let e of n)Df(e)&&(e=e.\u0275providers),Array.isArray(e)?MC(e,t):t(e)}const y8=Cn({provide:String,useValue:Cn});function SC(n){return null!==n&&"object"==typeof n&&y8 in n}function bc(n){return"function"==typeof n}const EC=new Ce("Set Injector scope."),$y={},v8={};let xC;function Wy(){return void 0===xC&&(xC=new HI),xC}class Is{}class qI extends Is{get destroyed(){return this._destroyed}constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,OC(t,s=>this.processProvider(s)),this.records.set(BI,yd(void 0,this)),r.has("environment")&&this.records.set(Is,yd(void 0,this));const o=this.records.get(EC);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(UI.multi,Ye,et.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();for(const t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}runInContext(t){this.assertNotDestroyed();const e=il(this),i=zr(void 0);try{return t()}finally{il(e),zr(i)}}get(t,e=Vr,i=et.Default){this.assertNotDestroyed(),i=cc(i);const r=il(this),o=zr(void 0);try{if(!(i&et.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function T8(n){return"function"==typeof n||"object"==typeof n&&n instanceof Ce}(t)&&qu(t);a=l&&this.injectableDefInScope(l)?yd(IC(t),$y):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&et.Self?Wy():this.parent).get(t,e=i&et.Optional&&e===Vr?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Zu]=s[Zu]||[]).unshift(_n(t)),r)throw s;return function py(n,t,e,i){const r=n[Zu];throw t[Ds]&&r.unshift(t[Ds]),n.message=function Ew(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=_n(t);if(Array.isArray(t))r=t.map(_n).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):_n(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(Mw,"\n ")}`}("\n"+n.message,r,e,i),n.ngTokenPath=r,n[Zu]=null,n}(s,t,"R3InjectorError",this.source)}throw s}finally{zr(o),il(r)}}resolveInjectorInitializers(){const t=il(this),e=zr(void 0);try{const i=this.get(Hy.multi,Ye,et.Self);for(const r of i)r()}finally{il(t),zr(e)}}toString(){const t=[],e=this.records;for(const i of e.keys())t.push(_n(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Q(205,!1)}processProvider(t){let e=bc(t=Je(t))?t:Je(t&&t.provide);const i=function w8(n){return SC(n)?yd(void 0,n.useValue):yd(KI(n),$y)}(t);if(bc(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=yd(void 0,$y,!0),r.factory=()=>ed(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===$y&&(e.value=v8,e.value=e.factory()),"object"==typeof e.value&&e.value&&function D8(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=Je(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function IC(n){const t=qu(n),e=null!==t?t.factory:hc(n);if(null!==e)return e;if(n instanceof Ce)throw new Q(204,!1);if(n instanceof Function)return function b8(n){const t=n.length;if(t>0)throw Rf(t,"?"),new Q(204,!1);const e=function Ku(n){const t=n&&(n[ac]||n[dy]);if(t){const e=function ww(n){if(n.hasOwnProperty("name"))return n.name;const t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" 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 "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new Q(204,!1)}function KI(n,t,e){let i;if(bc(n)){const r=Je(n);return hc(r)||IC(r)}if(SC(n))i=()=>Je(n.useValue);else if(function YI(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...ed(n.deps||[]));else if(function GI(n){return!(!n||!n.useExisting)}(n))i=()=>F(Je(n.useExisting));else{const r=Je(n&&(n.useClass||n.provide));if(!function C8(n){return!!n.deps}(n))return hc(r)||IC(r);i=()=>new r(...ed(n.deps))}return i}function yd(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function OC(n,t){for(const e of n)Array.isArray(e)?OC(e,t):e&&Df(e)?OC(e.\u0275providers,t):t(e)}class M8{}class QI{}class E8{resolveComponentFactory(t){throw function S8(n){const t=Error(`No component factory found for ${_n(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}}let wc=(()=>{class n{}return n.NULL=new E8,n})();function x8(){return _d(Gi(),oe())}function _d(n,t){return new Tt(uo(n,t))}let Tt=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=x8,n})();function I8(n){return n instanceof Tt?n.nativeElement:n}class Gf{}let Cr=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function O8(){const n=oe(),e=ho(Gi().index,n);return(co(e)?e:n)[11]}(),n})(),A8=(()=>{class n{}return n.\u0275prov=H({token:n,providedIn:"root",factory:()=>null}),n})();class vd{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const k8=new vd("15.1.1"),AC={};function NC(n){return n.ngOriginalError}class bd{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&NC(t);for(;e&&NC(e);)e=NC(e);return e||null}}function JI(n){return n.ownerDocument.defaultView}function XI(n){return n.ownerDocument}function Ma(n){return n instanceof Function?n():n}function tO(n,t,e){let i=n.length;for(;;){const r=n.indexOf(t,e);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}const nO="ng-template";function B8(n,t,e){let i=0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==tO(f,c,0)||2&i&&c!==h){if(as(i))return!1;s=!0}}}}else{if(!s&&!as(i)&&!as(l))return!1;if(s&&as(l))continue;s=!1,i=l|1&i}}return as(i)||s}function as(n){return 0==(1&n)}function $8(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!as(s)&&(t+=oO(o,r),r=""),i=s,o=o||!as(i);e++}return""!==r&&(t+=oO(o,r)),t}const yt={};function C(n){sO(Xt(),oe(),wr()+n,!1)}function sO(n,t,e,i){if(!i)if(3==(3&t[2])){const o=n.preOrderCheckHooks;null!==o&&Dy(t,o,e)}else{const o=n.preOrderHooks;null!==o&&Ty(t,o,0,e)}fc(e)}function uO(n,t=null,e=null,i){const r=dO(n,t,e,i);return r.resolveInjectorInitializers(),r}function dO(n,t=null,e=null,i,r=new Set){const o=[e||Ye,g8(n)];return i=i||("object"==typeof n?void 0:_n(n)),new qI(o,t||Wy(),i||null,r)}let Dr=(()=>{class n{static create(e,i){if(Array.isArray(e))return uO({name:""},i,e,"");{const r=e.name??"";return uO({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=Vr,n.NULL=new HI,n.\u0275prov=H({token:n,providedIn:"any",factory:()=>F(BI)}),n.__NG_ELEMENT_ID__=-1,n})();function O(n,t=et.Default){const e=oe();return null===e?F(n,t):zx(Gi(),e,Je(n),t)}function vO(n,t){const e=n.contentQueries;if(null!==e)for(let i=0;i22&&sO(n,t,22,!1),e(i,r)}finally{fc(o)}}function VC(n,t,e){if(Ow(t)){const r=t.directiveEnd;for(let o=t.directiveStart;o0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(n,t,i,Yf(n,e,r.hostVars,yt),r)}function Os(n,t,e,i,r,o){const s=uo(n,t);!function GC(n,t,e,i,r,o,s){if(null==o)n.removeAttribute(t,r,e);else{const a=null==s?at(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}(t[11],s,o,n.value,e,i,r)}function LH(n,t,e,i,r,o){const s=o[t];if(null!==s){const a=i.setInput;for(let l=0;l0&&YC(e)}}function YC(n){for(let i=lC(n);null!==i;i=cC(i))for(let r=10;r0&&YC(o)}const e=n[1].components;if(null!==e)for(let i=0;i0&&YC(r)}}function VH(n,t){const e=ho(t,n),i=e[1];(function BH(n,t){for(let e=t.length;e-1&&(hC(t,i),Ay(e,i))}this._attachedToViewContainer=!1}mI(this._lView[1],this._lView)}onDestroy(t){CO(this._lView[1],this._lView,null,t)}markForCheck(){qC(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){Qy(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 xU(n,t){Hf(n,t,t[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Q(902,!1);this._appRef=t}}class UH extends qf{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Qy(t[1],t,t[8],!1)}checkNoChanges(){}get context(){return null}}class NO extends wc{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=vn(t);return new Kf(e,this.ngModule)}}function PO(n){const t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}class $H{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){i=cc(i);const r=this.injector.get(t,AC,i);return r!==AC||e===AC?r:this.parentInjector.get(t,e,i)}}class Kf extends QI{get inputs(){return PO(this.componentDef.inputs)}get outputs(){return PO(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function Q8(n){return n.map(K8).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof Is?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new $H(t,o):t,a=s.get(Gf,null);if(null===a)throw new Q(407,!1);const l=s.get(A8,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function bH(n,t,e){return n.selectRootElement(t,e===ie.ShadowDom)}(c,i,this.componentDef.encapsulation):dC(c,u,function HH(n){const t=n.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(u)),h=this.componentDef.onPush?288:272,f=HC(0,null,null,1,0,null,null,null,null,null),p=Yy(null,f,null,h,null,null,a,c,l,s,null);let m,g;jw(p);try{const y=this.componentDef;let b,w=null;y.findHostDirectiveDefs?(b=[],w=new Map,y.findHostDirectiveDefs(y,b,w),b.push(y)):b=[y];const _=function GH(n,t){const e=n[1];return n[22]=t,Dd(e,22,2,"#host",null)}(p,d),N=function YH(n,t,e,i,r,o,s,a){const l=r[1];!function qH(n,t,e,i){for(const r of n)t.mergedAttrs=Nf(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Zy(t,t.mergedAttrs,!0),null!==e&&EI(i,e,t))}(i,n,t,s);const c=o.createRenderer(t,e),u=Yy(r,wO(e),null,e.onPush?32:16,r[n.index],n,o,c,a||null,null,null);return l.firstCreatePass&&WC(l,n,i.length-1),Ky(r,u),r[n.index]=u}(_,d,y,b,p,a,c);g=mx(f,22),d&&function QH(n,t,e,i){if(i)$w(n,e,["ng-version",k8.full]);else{const{attrs:r,classes:o}=function Z8(n){const t=[],e=[];let i=1,r=2;for(;i0&&SI(n,e,o.join(" "))}}(c,y,d,i),void 0!==e&&function ZH(n,t,e){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Nf(r.hostAttrs,e=Nf(e,r.hostAttrs))}}(i)}function ZC(n){return n===Te?{}:n===Ye?[]:n}function e9(n,t){const e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function t9(n,t){const e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function n9(n,t){const e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}let Xy=null;function Cc(){if(!Xy){const n=fn.Symbol;if(n&&n.iterator)Xy=n.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;es(Wi(_[i.index])):i.index;let w=null;if(!s&&a&&(w=function g9(n,t,e,i){const r=n.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,t,r,i.index)),null!==w)(w.__ngLastListenerFn__||w).__ngNextListenerFn__=o,w.__ngLastListenerFn__=o,h=!1;else{o=JO(i,t,u,o,!1);const _=e.listen(g,r,o);d.push(o,_),c&&c.push(r,b,y,y+1)}}else o=JO(i,t,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?ho(n.index,t):t);let l=ZO(t,0,i,s),c=o.__ngNextListenerFn__;for(;c;)l=ZO(t,0,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function D(n=1){return function DB(n){return(gt.lFrame.contextLView=function TB(n,t){for(;n>0;)t=t[15],n--;return t}(n,gt.lFrame.contextLView))[8]}(n)}function y9(n,t){let e=null;const i=function W8(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(!(1&e))return t[e+1]}return null}(n);for(let r=0;r>17&32767}function tD(n){return 2|n}function Tc(n){return(131068&n)>>2}function nD(n,t){return-131069&n|t<<2}function iD(n){return 1|n}function aA(n,t,e,i,r){const o=n[e+1],s=null===t;let a=i?al(o):Tc(o),l=!1;for(;0!==a&&(!1===l||s);){const u=n[a+1];D9(n[a],t)&&(l=!0,n[a+1]=i?iD(u):tD(u)),a=i?al(u):Tc(u)}l&&(n[e+1]=i?tD(o):iD(o))}function D9(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&pd(n,t)>=0}const xi={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function lA(n){return n.substring(xi.key,xi.keyEnd)}function T9(n){return n.substring(xi.value,xi.valueEnd)}function cA(n,t){const e=xi.textEnd;return e===t?-1:(t=xi.keyEnd=function E9(n,t,e){for(;t32;)t++;return t}(n,xi.key=t,e),Nd(n,t,e))}function uA(n,t){const e=xi.textEnd;let i=xi.key=Nd(n,t,e);return e===i?-1:(i=xi.keyEnd=function x9(n,t,e){let i;for(;t=65&&(-33&i)<=90||i>=48&&i<=57);)t++;return t}(n,i,e),i=hA(n,i,e),i=xi.value=Nd(n,i,e),i=xi.valueEnd=function I9(n,t,e){let i=-1,r=-1,o=-1,s=t,a=s;for(;s32&&(a=s),o=r,r=i,i=-33&l}return a}(n,i,e),hA(n,i,e))}function dA(n){xi.key=0,xi.keyEnd=0,xi.value=0,xi.valueEnd=0,xi.textEnd=n.length}function Nd(n,t,e){for(;t=0;e=uA(t,e))gA(n,lA(t),T9(t))}function pn(n){us(fo,ks,n,!0)}function ks(n,t){for(let e=function M9(n){return dA(n),cA(n,Nd(n,0,xi.textEnd))}(t);e>=0;e=cA(t,e))fo(n,lA(t),!0)}function cs(n,t,e,i){const r=oe(),o=Xt(),s=Da(2);o.firstUpdatePass&&mA(o,n,s,i),t!==yt&&or(r,s,t)&&yA(o,o.data[wr()],r,r[11],n,r[s+1]=function F9(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=_n(po(n)))),n}(t,e),i,s)}function us(n,t,e,i){const r=Xt(),o=Da(2);r.firstUpdatePass&&mA(r,null,o,i);const s=oe();if(e!==yt&&or(s,o,e)){const a=r.data[wr()];if(vA(a,i)&&!pA(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=ga(l,e||"")),XC(r,a,s,e,i)}else!function R9(n,t,e,i,r,o,s,a){r===yt&&(r=Ye);let l=0,c=0,u=0=n.expandoStartIndex}function mA(n,t,e,i){const r=n.data;if(null===r[e+1]){const o=r[wr()],s=pA(n,e);vA(o,i)&&null===t&&!s&&(t=!1),t=function A9(n,t,e,i){const r=function Rw(n){const t=gt.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}(n);let o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=Jf(e=rD(null,n,t,e,i),t.attrs,i),o=null);else{const s=t.directiveStylingLast;if(-1===s||n[s]!==r)if(e=rD(r,n,t,e,i),null===o){let l=function k9(n,t,e){const i=e?t.classBindings:t.styleBindings;if(0!==Tc(i))return n[al(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=rD(null,n,t,l[1],i),l=Jf(l,t.attrs,i),function N9(n,t,e,i){n[al(e?t.classBindings:t.styleBindings)]=i}(n,t,i,l))}else o=function P9(n,t,e){let i;const r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=al(n[a+1]);n[i+1]=i_(h,a),0!==h&&(n[h+1]=nD(n[h+1],i)),n[a+1]=function v9(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=i_(a,0),0!==a&&(n[a+1]=nD(n[a+1],i)),a=i;else n[i+1]=i_(l,0),0===a?a=i:n[l+1]=nD(n[l+1],i),l=i;c&&(n[i+1]=tD(n[i+1])),aA(n,u,i,!0),aA(n,u,i,!1),function C9(n,t,e,i,r){const o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&pd(o,t)>=0&&(e[i+1]=iD(e[i+1]))}(t,u,n,i,o),s=i_(a,l),o?t.classBindings=s:t.styleBindings=s}(r,o,t,e,s,i)}}function rD(n,t,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===yt&&(h=d?Ye:void 0);let f=d?Jw(h,i):u===i?h:void 0;if(c&&!r_(f)&&(f=Jw(l,i)),r_(f)&&(a=f,s))return a;const p=n[r+1];r=s?al(p):Tc(p)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(a=Jw(l,i))}return a}function r_(n){return void 0!==n}function vA(n,t){return 0!=(n.flags&(t?8:16))}function Ne(n,t=""){const e=oe(),i=Xt(),r=n+22,o=i.firstCreatePass?Dd(i,r,1,t,null):i.data[r],s=e[r]=function uC(n,t){return n.createText(t)}(e[11],t);Fy(i,e,s,o),Ss(o,!1)}function At(n){return Yi("",n,""),At}function Yi(n,t,e){const i=oe(),r=Md(i,n,t,e);return r!==yt&&Sa(i,wr(),r),Yi}function o_(n,t,e,i,r){const o=oe(),s=Sd(o,n,t,e,i,r);return s!==yt&&Sa(o,wr(),s),o_}const Ld="en-US";let VA=Ld;function aD(n,t,e,i,r){if(n=Je(n),Array.isArray(n))for(let o=0;o>20;if(bc(n)||!n.multi){const f=new kf(l,r,O),p=cD(a,t,r?u:u+h,d);-1===p?(qw(xy(c,s),o,a),lD(o,n,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=cD(a,t,u+h,d),p=cD(a,t,u,u+h),g=p>=0&&e[p];if(r&&!g||!r&&!(f>=0&&e[f])){qw(xy(c,s),o,a);const y=function t6(n,t,e,i,r){const o=new kf(n,e,O);return o.multi=[],o.index=t,o.componentProviders=0,dk(o,r,i&&!e),o}(r?e6:X7,e.length,r,i,l);!r&&g&&(e[p].providerFactory=y),lD(o,n,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),s.push(y)}else lD(o,n,f>-1?f:p,dk(e[r?p:f],l,!r&&i));!r&&i&&g&&e[p].componentProviders++}}}function lD(n,t,e,i){const r=bc(t),o=function _8(n){return!!n.useClass}(t);if(r||o){const l=(o?Je(t.useClass):t).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function dk(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function cD(n,t,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function J7(n,t,e){const i=Xt();if(i.firstCreatePass){const r=ss(n);aD(e,i.data,i.blueprint,r,!0),aD(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}class Rd{}class hk{}class fk extends Rd{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new NO(this);const i=lo(t);this._bootstrapComponents=Ma(i.bootstrap),this._r3Injector=dO(t,e,[{provide:Rd,useValue:this},{provide:wc,useValue:this.componentFactoryResolver}],_n(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class dD extends hk{constructor(t){super(),this.moduleType=t}create(t){return new fk(this.moduleType,t)}}class i6 extends Rd{constructor(t,e,i){super(),this.componentFactoryResolver=new NO(this),this.instance=null;const r=new qI([...t,{provide:Rd,useValue:this},{provide:wc,useValue:this.componentFactoryResolver}],e||Wy(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function u_(n,t,e=null){return new i6(n,t,e).injector}let r6=(()=>{class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=$I(0,e.type),r=i.length>0?u_([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=H({token:n,providedIn:"environment",factory:()=>new n(F(Is))}),n})();function Ns(n){n.getStandaloneInjector=t=>t.get(r6).getOrCreateStandaloneInjector(n)}function Hr(n,t,e){const i=br()+n,r=oe();return r[i]===yt?As(r,i,e?t.call(e):t()):Qf(r,i)}function Mt(n,t,e,i){return wk(oe(),br(),n,t,e,i)}function bi(n,t,e,i,r){return function Ck(n,t,e,i,r,o,s){const a=t+e;return Dc(n,a,r,o)?As(n,a+2,s?i.call(s,r,o):i(r,o)):rp(n,a+2)}(oe(),br(),n,t,e,i,r)}function ll(n,t,e,i,r,o){return function Dk(n,t,e,i,r,o,s,a){const l=t+e;return function t_(n,t,e,i,r){const o=Dc(n,t,e,i);return or(n,t+2,r)||o}(n,l,r,o,s)?As(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):rp(n,l+3)}(oe(),br(),n,t,e,i,r,o)}function Fd(n,t,e,i,r,o,s){return function Tk(n,t,e,i,r,o,s,a,l){const c=t+e;return ko(n,c,r,o,s,a)?As(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):rp(n,c+4)}(oe(),br(),n,t,e,i,r,o,s)}function fD(n,t,e,i){return function Mk(n,t,e,i,r,o){let s=t+e,a=!1;for(let l=0;l=0;e--){const i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=hc(i.type)),s=zr(O);try{const a=Ey(!1),l=o();return Ey(a),function f9(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,oe(),r,l),l}finally{zr(s)}}function Zn(n,t,e){const i=n+22,r=oe(),o=sd(r,i);return function op(n,t){return n[1].data[t].pure}(r,i)?wk(r,br(),t,o.transform,e,o):o.transform(e)}function pD(n){return t=>{setTimeout(n,void 0,t)}}const re=class w6 extends ae{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&"object"==typeof t){const l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=pD(o),r&&(r=pD(r)),s&&(s=pD(s)));const a=super.subscribe({next:r,error:o,complete:s});return t instanceof se&&t.add(a),a}};function C6(){return this._results[Cc()]()}class sp{get changes(){return this._changes||(this._changes=new re)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=Cc(),i=sp.prototype;i[e]||(i[e]=C6)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const i=this;i.dirty=!1;const r=function Ao(n){return n.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function UB(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=M6,n})();const D6=No,T6=class extends D6{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){const i=this._declarationTContainer.tViews,r=Yy(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(r[19]=s.createEmbeddedView(i)),zC(i,r,t),new qf(r)}};function M6(){return d_(Gi(),oe())}function d_(n,t){return 4&n.type?new T6(t,n,_d(n,t)):null}let $r=(()=>{class n{}return n.__NG_ELEMENT_ID__=S6,n})();function S6(){return xk(Gi(),oe())}const E6=$r,Sk=class extends E6{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return _d(this._hostTNode,this._hostLView)}get injector(){return new cd(this._hostTNode,this._hostLView)}get parentInjector(){const t=Yw(this._hostTNode,this._hostLView);if(Nx(t)){const e=Sy(t,this._hostLView),i=My(t);return new cd(e[1].data[i+8],e)}return new cd(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Ek(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=t.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(t,e,i,r,o){const s=t&&!function Lf(n){return"function"==typeof n}(t);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?t:new Kf(vn(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Is,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(t,e){const i=t._lView,r=i[1];if(function hB(n){return rs(n[3])}(i)){const u=this.indexOf(t);if(-1!==u)this.detach(u);else{const d=i[3],h=new Sk(d,d[6],d[3]);h.detach(h.indexOf(t))}}const o=this._adjustIndex(e),s=this._lContainer;!function OU(n,t,e,i){const r=10+i,o=e.length;i>0&&(e[r-1][4]=t),i0)i.push(s[a/2]);else{const c=o[a+1],u=t[-l];for(let d=10;d{class n{constructor(e){this.appInits=e,this.resolve=f_,this.reject=f_,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(F(Vd,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const lp=new Ce("AppId",{providedIn:"root",factory:function Jk(){return`${MD()}${MD()}${MD()}`}});function MD(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Xk=new Ce("Platform Initializer"),m_=new Ce("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),eN=new Ce("appBootstrapListener"),tN=new Ce("AnimationModuleType");let X6=(()=>{class n{log(e){console.log(e)}warn(e){console.warn(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const Ps=new Ce("LocaleId",{providedIn:"root",factory:()=>it(Ps,et.Optional|et.SkipSelf)||function e$(){return typeof $localize<"u"&&$localize.locale||Ld}()});class n${constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}let nN=(()=>{class n{compileModuleSync(e){return new dD(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Ma(lo(e).declarations).reduce((s,a)=>{const l=vn(a);return l&&s.push(new Kf(l)),s},[]);return new n$(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const o$=(()=>Promise.resolve(0))();function SD(n){typeof Zone>"u"?o$.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class qt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!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)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function s$(){let n=fn.requestAnimationFrame,t=fn.cancelAnimationFrame;if(typeof Zone<"u"&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function c$(n){const t=()=>{!function l$(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(fn,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,xD(n),n.isCheckStableRunning=!0,ED(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),xD(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return oN(n),e.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),sN(n)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return oN(n),e.invoke(r,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),sN(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,xD(n),ED(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.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(!qt.isInAngularZone())throw new Q(909,!1)}static assertNotInAngularZone(){if(qt.isInAngularZone())throw new Q(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,a$,f_,f_);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}const a$={};function ED(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 xD(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function oN(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function sN(n){n._nesting--,ED(n)}class u${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(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}}const aN=new Ce(""),g_=new Ce("");let AD,ID=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,AD||(function d$(n){AD=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.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:()=>{qt.assertNotInAngularZone(),SD(()=>{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())SD(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,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(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(F(qt),F(OD),F(g_))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),OD=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return AD?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),cl=null;const lN=new Ce("AllowMultipleToken"),kD=new Ce("PlatformDestroyListeners");class cN{constructor(t,e){this.name=t,this.token=e}}function dN(n,t,e=[]){const i=`Platform: ${t}`,r=new Ce(i);return(o=[])=>{let s=ND();if(!s||s.injector.get(lN,!1)){const a=[...e,...o,{provide:r,useValue:!0}];n?n(a):function p$(n){if(cl&&!cl.get(lN,!1))throw new Q(400,!1);cl=n;const t=n.get(fN);(function uN(n){const t=n.get(Xk,null);t&&t.forEach(e=>e())})(n)}(function hN(n=[],t){return Dr.create({name:t,providers:[{provide:EC,useValue:"platform"},{provide:kD,useValue:new Set([()=>cl=null])},...n]})}(a,i))}return function g$(n){const t=ND();if(!t)throw new Q(401,!1);return t}()}}function ND(){return cl?.get(fN)??null}let fN=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function mN(n,t){let e;return e="noop"===n?new u$:("zone.js"===n?void 0:n)||new qt(t),e}(i?.ngZone,function pN(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:qt,useValue:r}];return r.run(()=>{const s=Dr.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(bd,null);if(!l)throw new Q(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{y_(this._modules,a),c.unsubscribe()})}),function gN(n,t,e){try{const i=e();return Zf(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(p_);return c.runInitializers(),c.donePromise.then(()=>(function BA(n){jr(n,"Expected localeId to be defined"),"string"==typeof n&&(VA=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Ps,Ld)||Ld),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=yN({},i);return function h$(n,t,e){const i=new dD(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Ec);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Q(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}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 e=this._injector.get(kD,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(F(Dr))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function yN(n,t){return Array.isArray(t)?t.reduce(yN,n):{...n,...t}}let Ec=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,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(()=>{qt.assertNotInAngularZone(),SD(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{qt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=ws(o,s.pipe(function cy(){return n=>sc()(function ly(n,t){return function(i){let r;if(r="function"==typeof n?n:function(){return n},"function"==typeof t)return i.lift(new gw(r,t));const o=Object.create(i,mw);return o.source=i,o.subjectFactory=r,o}}(ma)(n))}()))}bootstrap(e,i){const r=e instanceof QI;if(!this._injector.get(p_).done)throw!r&&function td(n){const t=vn(n)||tr(n)||_r(n);return null!==t&&t.standalone}(e),new Q(405,false);let s;s=r?e:this._injector.get(wc).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function f$(n){return n.isBoundToModule}(s)?void 0:this._injector.get(Rd),c=s.create(Dr.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(aN,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),y_(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 e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;y_(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(eN,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>y_(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Q(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(F(qt),F(Is),F(bd))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function y_(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}let Un=(()=>{class n{}return n.__NG_ELEMENT_ID__=v$,n})();function v$(n){return function b$(n,t,e){if(Of(n)&&!e){const i=ho(n.index,t);return new qf(i,i)}return 47&n.type?new qf(t[16],t):null}(Gi(),oe(),16==(16&n))}class CN{constructor(){}supports(t){return e_(t)}create(t){return new S$(t)}}const M$=(n,t)=>t;class S${constructor(t){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=t||M$}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new E$(e,i),o,r),t}_verifyReinsertion(t,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}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(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new DN),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new DN),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class E${constructor(t,e){this.item=t,this.trackById=e,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 x${constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class DN{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new x$,this.map.set(e,i)),i.add(t)}get(t,e){const r=this.map.get(t);return r?r.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function TN(n,t,e){const i=n.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;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(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,e);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 O$(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class O${constructor(t){this.key=t,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 SN(){return new b_([new CN])}let b_=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||SN()),deps:[[n,new jf,new Ff]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Q(901,!1)}}return n.\u0275prov=H({token:n,providedIn:"root",factory:SN}),n})();function EN(){return new cp([new MN])}let cp=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||EN()),deps:[[n,new jf,new Ff]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Q(901,!1)}}return n.\u0275prov=H({token:n,providedIn:"root",factory:EN}),n})();const N$=dN(null,"core",[]);let P$=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(F(Ec))},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({}),n})();let jD=null;function Ls(){return jD}class j${}const Ln=new Ce("DocumentToken");let zD=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return function z$(){return F(xN)}()},providedIn:"platform"}),n})();const V$=new Ce("Location Initialized");let xN=(()=>{class n extends zD{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ls().getBaseHref(this._doc)}onPopState(e){const i=Ls().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Ls().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}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(e){this._location.pathname=e}pushState(e,i,r){IN()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){IN()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:function(){return function B$(){return new xN(F(Ln))}()},providedIn:"platform"}),n})();function IN(){return!!window.history.pushState}function VD(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function ON(n){const t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function xa(n){return n&&"?"!==n[0]?"?"+n:n}let Ic=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return it(kN)},providedIn:"root"}),n})();const AN=new Ce("appBaseHref");let kN=(()=>{class n extends Ic{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??it(Ln).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return VD(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+xa(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+xa(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+xa(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(F(zD),F(AN,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),U$=(()=>{class n extends Ic{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=VD(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+xa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+xa(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(F(zD),F(AN,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),BD=(()=>{class n{constructor(e){this._subject=new re,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function W$(n){if(new RegExp("^(https?:)?//").test(n)){const[,e]=n.split(/\/\/[^\/]+/);return e}return n}(ON(NN(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(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+xa(i))}normalize(e){return n.stripTrailingSlash(function $$(n,t){return n&&new RegExp(`^${n}([/;?#]|$)`).test(t)?t.substring(n.length):t}(this._basePath,NN(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+xa(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+xa(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return n.normalizeQueryParams=xa,n.joinWithSlash=VD,n.stripTrailingSlash=ON,n.\u0275fac=function(e){return new(e||n)(F(Ic))},n.\u0275prov=H({token:n,factory:function(){return function H$(){return new BD(F(Ic))}()},providedIn:"root"}),n})();function NN(n){return n.replace(/\/index.html$/,"")}function UN(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}const ZD=/\s+/,HN=[];let fi=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=HN,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(ZD):HN}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(ZD):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[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(e,i){(e=e.trim()).length>0&&e.split(ZD).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(O(b_),O(cp),O(Tt),O(Cr))},n.\u0275dir=we({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class IW{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,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 Gr=(()=>{class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new IW(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),GN(a,r)}});for(let r=0,o=i.length;r{GN(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(O($r),O(No),O(b_))},n.\u0275dir=we({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function GN(n,t){n.context.$implicit=t.item}let Kt=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new AW,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){YN("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){YN("ngIfElse",e),this._elseTemplateRef=e,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(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(O($r),O(No))},n.\u0275dir=we({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class AW{constructor(){this.$implicit=null,this.ngIf=null}}function YN(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${_n(t)}'.`)}class JD{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let Ud=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==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(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),O_=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new JD(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(O($r),O(No),O(Ud,9))},n.\u0275dir=we({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),A_=(()=>{class n{constructor(e,i,r){r._addDefault(new JD(e,i))}}return n.\u0275fac=function(e){return new(e||n)(O($r),O(No),O(Ud,9))},n.\u0275dir=we({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),sr=(()=>{class n{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Br.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(cp),O(Cr))},n.\u0275dir=we({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),_o=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.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&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(O($r))},n.\u0275dir=we({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[$i]}),n})();function fs(n,t){return new Q(2100,!1)}class NW{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}}class PW{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}}const LW=new PW,RW=new NW;let k_=(()=>{class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(Zf(e))return LW;if(qO(e))return RW;throw fs()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(O(Un,16))},n.\u0275pipe=qn({name:"async",type:n,pure:!1,standalone:!0}),n})(),XD=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw fs();return e.toLowerCase()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=qn({name:"lowercase",type:n,pure:!0,standalone:!0}),n})();const FW=/(?:[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 KN=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw fs();return e.replace(FW,i=>i[0].toUpperCase()+i.slice(1).toLowerCase())}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=qn({name:"titlecase",type:n,pure:!0,standalone:!0}),n})(),wn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({}),n})();const ZN="browser";let nG=(()=>{class n{}return n.\u0275prov=H({token:n,providedIn:"root",factory:()=>new iG(F(Ln),window)}),n})();class iG{constructor(t,e){this.document=t,this.window=e,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const e=function rG(n,t){const e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;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(t)||o.querySelector(`[name="${t}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,t);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const t=JN(this.window.history)||JN(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function JN(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class XN{}class AG extends j${constructor(){super(...arguments),this.supportsDOMEvents=!0}}class rT extends AG{static makeCurrent(){!function F$(n){jD||(jD=n)}(new rT)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=function kG(){return fp=fp||document.querySelector("base"),fp?fp.getAttribute("href"):null}();return null==e?null:function NG(n){P_=P_||document.createElement("a"),P_.setAttribute("href",n);const t=P_.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){fp=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return UN(document.cookie,t)}}let P_,fp=null;const oP=new Ce("TRANSITION_ID"),LG=[{provide:Vd,useFactory:function PG(n,t,e){return()=>{e.get(p_).donePromise.then(()=>{const i=Ls(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const L_=new Ce("EventManagerPlugins");let R_=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>r.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(e){const i=new Set;e.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),pp=(()=>{class n extends aP{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}addHost(e){const i=[];this._addStylesToHost(this._stylesSet,e,i),this._hostNodes.set(e,i)}removeHost(e){const i=this._hostNodes.get(e);i&&i.forEach(lP),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(lP))}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function lP(n){Ls().remove(n)}const oT={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/"},sT=/%COMP%/g;function aT(n,t){return t.flat(100).map(e=>e.replace(sT,n))}function dP(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let F_=(()=>{class n{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new lT(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case ie.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new HG(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case ie.ShadowDom:return new $G(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=aT(i.id,i.styles);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(F(R_),F(pp),F(lp))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class lT{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(oT[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(fP(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(fP(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;const o=oT[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const r=oT[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Br.DashCase|Br.Important)?t.style.setProperty(e,i,r&Br.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Br.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,dP(i)):this.eventManager.addEventListener(t,e,dP(i))}}function fP(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class HG extends lT{constructor(t,e,i,r){super(t),this.component=i;const o=aT(r+"-"+i.id,i.styles);e.addStyles(o),this.contentAttr=function VG(n){return"_ngcontent-%COMP%".replace(sT,n)}(r+"-"+i.id),this.hostAttr=function BG(n){return"_nghost-%COMP%".replace(sT,n)}(r+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class $G extends lT{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=aT(r.id,r.styles);for(let s=0;s{class n extends sP{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const pP=["alt","control","meta","shift"],GG={"\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"},YG={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let qG=(()=>{class n extends sP{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ls().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.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."),pP.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(e,i){let r=GG[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),pP.forEach(s=>{s!==r&&(0,YG[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const gP=[{provide:m_,useValue:ZN},{provide:Xk,useValue:function KG(){rT.makeCurrent()},multi:!0},{provide:Ln,useFactory:function ZG(){return function HU(n){vC=n}(document),document},deps:[]}],JG=dN(N$,"browser",gP),yP=new Ce(""),_P=[{provide:g_,useClass:class RG{addToWindow(t){fn.getAngularTestability=(i,r=!0)=>{const o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},fn.getAllAngularTestabilities=()=>t.getAllTestabilities(),fn.getAllAngularRootElements=()=>t.getAllRootElements(),fn.frameworkStabilizers||(fn.frameworkStabilizers=[]),fn.frameworkStabilizers.push(i=>{const r=fn.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(t,e,i){return null==e?null:t.getTestability(e)??(i?Ls().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:aN,useClass:ID,deps:[qt,OD,g_]},{provide:ID,useClass:ID,deps:[qt,OD,g_]}],vP=[{provide:EC,useValue:"root"},{provide:bd,useFactory:function QG(){return new bd},deps:[]},{provide:L_,useClass:WG,multi:!0,deps:[Ln,qt,m_]},{provide:L_,useClass:qG,multi:!0,deps:[Ln]},{provide:F_,useClass:F_,deps:[R_,pp,lp]},{provide:Gf,useExisting:F_},{provide:aP,useExisting:pp},{provide:pp,useClass:pp,deps:[Ln]},{provide:R_,useClass:R_,deps:[L_,qt]},{provide:XN,useClass:FG,deps:[]},[]];let bP=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:lp,useValue:e.appId},{provide:oP,useExisting:lp},LG]}}}return n.\u0275fac=function(e){return new(e||n)(F(yP,12))},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({providers:[...vP,..._P],imports:[wn,P$]}),n})(),wP=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:function(e){let i=null;return i=e?new e:function eY(){return new wP(F(Ln))}(),i},providedIn:"root"}),n})();typeof window<"u"&&window;let dT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(e){let i=null;return i=e?new(e||n):F(hT),i},providedIn:"root"}),n})(),hT=(()=>{class n extends dT{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Pn.NONE:return i;case Pn.HTML:return xs(i,"HTML")?po(i):jI(this._doc,String(i)).toString();case Pn.STYLE:return xs(i,"Style")?po(i):i;case Pn.SCRIPT:if(xs(i,"Script"))return po(i);throw new Error("unsafe value used in a script context");case Pn.URL:return xs(i,"URL")?po(i):By(String(i));case Pn.RESOURCE_URL:if(xs(i,"ResourceURL"))return po(i);throw new Error(`unsafe value used in a resource URL context (see ${Wu})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Wu})`)}}bypassSecurityTrustHtml(e){return function QU(n){return new $U(n)}(e)}bypassSecurityTrustStyle(e){return function ZU(n){return new WU(n)}(e)}bypassSecurityTrustScript(e){return function JU(n){return new GU(n)}(e)}bypassSecurityTrustUrl(e){return function XU(n){return new YU(n)}(e)}bypassSecurityTrustResourceUrl(e){return function e8(n){return new qU(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(F(Ln))},n.\u0275prov=H({token:n,factory:function(e){let i=null;return i=e?new e:function aY(n){return new hT(n.get(Ln))}(F(Dr)),i},providedIn:"root"}),n})();function Le(...n){let t=n[n.length-1];return Ti(t)?(n.pop(),Bt(n,t)):Xa(n)}function dl(n,t){return ni(n,t,1)}function Tn(n,t){return function(i){return i.lift(new lY(n,t))}}class lY{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new cY(t,this.predicate,this.thisArg))}}class cY extends ne{constructor(t,e,i){super(t),this.predicate=e,this.thisArg=i,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)}}class j_{}class fT{}class Yr{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.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(t).forEach(e=>{let i=t[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Yr?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Yr;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Yr?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=t.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class uY{encodeKey(t){return TP(t)}encodeValue(t){return TP(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const hY=/%(\d[a-f0-9])/gi,fY={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function TP(n){return encodeURIComponent(n).replace(hY,(t,e)=>fY[e]??t)}function z_(n){return`${n}`}class ps{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new uY,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function dY(n,t){const e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e],r=Array.isArray(i)?i.map(z_):[z_(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(i=>{const r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new ps({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(z_(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(z_(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class pY{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function MP(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function SP(n){return typeof Blob<"u"&&n instanceof Blob}function EP(n){return typeof FormData<"u"&&n instanceof FormData}class Oa{constructor(t,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function mY(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 Yr),this.context||(this.context=new pY),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,t.setHeaders[h]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((d,h)=>d.set(h,t.setParams[h]),c)),new Oa(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var An=(()=>((An=An||{})[An.Sent=0]="Sent",An[An.UploadProgress=1]="UploadProgress",An[An.ResponseHeader=2]="ResponseHeader",An[An.DownloadProgress=3]="DownloadProgress",An[An.Response=4]="Response",An[An.User=5]="User",An))();class pT{constructor(t,e=200,i="OK"){this.headers=t.headers||new Yr,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class mT extends pT{constructor(t={}){super(t),this.type=An.ResponseHeader}clone(t={}){return new mT({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class V_ extends pT{constructor(t={}){super(t),this.type=An.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new V_({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class xP extends pT{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function gT(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let ar=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Oa)o=e;else{let l,c;l=r.headers instanceof Yr?r.headers:new Yr(r.headers),r.params&&(c=r.params instanceof ps?r.params:new ps({fromObject:r.params})),o=new Oa(e,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=Le(o).pipe(dl(l=>this.handler.handle(l)));if(e instanceof Oa||"events"===r.observe)return s;const a=s.pipe(Tn(l=>l instanceof V_));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(fe(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(fe(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(fe(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(fe(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new ps).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,gT(r,i))}post(e,i,r={}){return this.request("POST",e,gT(r,i))}put(e,i,r={}){return this.request("PUT",e,gT(r,i))}}return n.\u0275fac=function(e){return new(e||n)(F(j_))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function IP(n,t){return t(n)}function yY(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}const vY=new Ce("HTTP_INTERCEPTORS"),mp=new Ce("HTTP_INTERCEPTOR_FNS");function bY(){let n=null;return(t,e)=>(null===n&&(n=(it(vY,{optional:!0})??[]).reduceRight(yY,IP)),n(t,e))}let OP=(()=>{class n extends j_{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(mp)));this.chain=i.reduceRight((r,o)=>function _Y(n,t,e){return(i,r)=>e.runInContext(()=>t(i,o=>n(o,r)))}(r,o,this.injector),IP)}return this.chain(e,i=>this.backend.handle(i))}}return n.\u0275fac=function(e){return new(e||n)(F(fT),F(Is))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const TY=/^\)\]\}',?\n/;let kP=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Se(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Yr(r.getAllResponseHeaders()),m=function MY(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new mT({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 b=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof y){const w=y;y=y.replace(TY,"");try{y=""!==y?JSON.parse(y):null}catch(_){y=w,b&&(b=!1,y={error:_,text:y})}}b?(i.next(new V_({body:y,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new xP({error:y,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new xP({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:An.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:An.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),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:An.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(F(XN))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const yT=new Ce("XSRF_ENABLED"),NP="XSRF-TOKEN",PP=new Ce("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>NP}),LP="X-XSRF-TOKEN",RP=new Ce("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>LP});class FP{}let SY=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=UN(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(F(Ln),F(m_),F(PP))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function EY(n,t){const e=n.url.toLowerCase();if(!it(yT)||"GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t(n);const i=it(FP).getToken(),r=it(RP);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var pi=(()=>((pi=pi||{})[pi.Interceptors=0]="Interceptors",pi[pi.LegacyInterceptors=1]="LegacyInterceptors",pi[pi.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",pi[pi.NoXsrfProtection=3]="NoXsrfProtection",pi[pi.JsonpSupport=4]="JsonpSupport",pi[pi.RequestsMadeViaParent=5]="RequestsMadeViaParent",pi))();function Hd(n,t){return{\u0275kind:n,\u0275providers:t}}function xY(...n){const t=[ar,kP,OP,{provide:j_,useExisting:OP},{provide:fT,useExisting:kP},{provide:mp,useValue:EY,multi:!0},{provide:yT,useValue:!0},{provide:FP,useClass:SY}];for(const e of n)t.push(...e.\u0275providers);return function m8(n){return{\u0275providers:n}}(t)}const jP=new Ce("LEGACY_INTERCEPTOR_FN");function OY({cookieName:n,headerName:t}){const e=[];return void 0!==n&&e.push({provide:PP,useValue:n}),void 0!==t&&e.push({provide:RP,useValue:t}),Hd(pi.CustomXsrfConfiguration,e)}let _T=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({providers:[xY(Hd(pi.LegacyInterceptors,[{provide:jP,useFactory:bY},{provide:mp,useExisting:jP,multi:!0}]),OY({cookieName:NP,headerName:LP}))]}),n})();class AY extends se{constructor(t,e){super()}schedule(t,e=0){return this}}class B_ extends AY{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;try{this.work(t)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const t=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let zP=(()=>{class n{constructor(e,i=n.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return n.now=()=>Date.now(),n})();class ms extends zP{constructor(t,e=zP.now){super(t,()=>ms.delegate&&ms.delegate!==this?ms.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,i){return ms.delegate&&ms.delegate!==this?ms.delegate.schedule(t,e,i):super.schedule(t,e,i)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}const vT=new class NY extends ms{}(class kY extends B_{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(t,e,i):t.flush(this)}}),PY=vT,Rs=new Se(n=>n.complete());function U_(n){return n?function LY(n){return new Se(t=>n.schedule(()=>t.complete()))}(n):Rs}function vo(n,t){return new Se(t?e=>t.schedule(RY,0,{error:n,subscriber:e}):e=>e.error(n))}function RY({error:n,subscriber:t}){t.error(n)}class Ro{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)}toObservable(){switch(this.kind){case"N":return Le(this.value);case"E":return vo(this.error);case"C":return U_()}throw new Error("unexpected notification kind value")}static createNext(t){return typeof t<"u"?new Ro("N",t):Ro.undefinedValueNotification}static createError(t){return new Ro("E",void 0,t)}static createComplete(){return Ro.completeNotification}}Ro.completeNotification=new Ro("C"),Ro.undefinedValueNotification=new Ro("N",void 0);class jY{constructor(t,e=0){this.scheduler=t,this.delay=e}call(t,e){return e.subscribe(new H_(t,this.scheduler,this.delay))}}class H_ extends ne{constructor(t,e,i=0){super(t),this.scheduler=e,this.delay=i}static dispatch(t){const{notification:e,destination:i}=t;e.observe(i),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(H_.dispatch,this.delay,new zY(t,this.destination)))}_next(t){this.scheduleMessage(Ro.createNext(t))}_error(t){this.scheduleMessage(Ro.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(Ro.createComplete()),this.unsubscribe()}}class zY{constructor(t,e){this.notification=t,this.destination=e}}class $_ extends ae{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new VY(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,i=e?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;let s;if(this.closed)throw new ve;if(this.isStopped||this.hasError?s=se.EMPTY:(this.observers.push(t),s=new Ze(this,t)),r&&t.add(t=new H_(t,r)),e)for(let a=0;ae&&(s=Math.max(s,o-e)),s>0&&r.splice(0,s),r}}class VY{constructor(t,e){this.time=t,this.value=e}}function ai(n,t){return"function"==typeof t?e=>e.pipe(ai((i,r)=>wt(n(i,r)).pipe(fe((o,s)=>t(i,o,r,s))))):e=>e.lift(new BY(n))}class BY{constructor(t){this.project=t}call(t,e){return e.subscribe(new UY(t,this.project))}}class UY extends es{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const i=new Hn(this),r=this.destination;r.add(i),this.innerSubscription=oc(t,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;(!t||t.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const W_={schedule(n,t){const e=setTimeout(n,t);return()=>clearTimeout(e)},scheduleBeforeRender(n){if(typeof window>"u")return W_.schedule(n,0);if(typeof window.requestAnimationFrame>"u")return W_.schedule(n,16);const t=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(t)}};let bT;function ZY(n,t,e){let i=e;return function $Y(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&t.some((r,o)=>!("*"===r||!function GY(n,t){if(!bT){const e=Element.prototype;bT=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&bT.call(n,t)}(n,r)||(i=o,0))),i}class XY{constructor(t,e){this.componentFactory=e.get(wc).resolveComponentFactory(t)}create(t){return new eq(this.componentFactory,t)}}class eq{constructor(t,e){this.componentFactory=t,this.injector=e,this.eventEmitters=new $_(1),this.events=this.eventEmitters.pipe(ai(i=>ws(...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(qt),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=W_.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(t){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){this.runInZone(()=>{null!==this.componentRef?function YY(n,t){return n===t||n!=n&&t!=t}(e,this.getInputValue(t))&&(void 0!==e||!this.unchangedInputs.has(t))||(this.recordInputChange(t,e),this.unchangedInputs.delete(t),this.hasInputChanges=!0,this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e)})}initializeComponent(t){const e=Dr.create({providers:[],parent:this.injector}),i=function QY(n,t){const e=n.childNodes,i=t.map(()=>[]);let r=-1;t.some((o,s)=>"*"===o&&(r=s,!0));for(let o=0,s=e.length;o{this.initialInputValues.has(t)&&this.setInputValue(t,this.initialInputValues.get(t))}),this.initialInputValues.clear()}initializeOutputs(t){const e=this.componentFactory.outputs.map(({propName:i,templateName:r})=>t.instance[i].pipe(fe(s=>({name:r,value:s}))));this.eventEmitters.next(e)}callNgOnChanges(t){if(!this.implementsOnChanges||null===this.inputChanges)return;const e=this.inputChanges;this.inputChanges=null,t.instance.ngOnChanges(e)}markViewForCheck(t){this.hasInputChanges&&(this.hasInputChanges=!1,t.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=W_.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[t];if(i)return void(i.currentValue=e);const r=this.unchangedInputs.has(t),o=r?void 0:this.getInputValue(t);this.inputChanges[t]=new cx(o,e,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}}class tq extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function G_(n,t){return new Se(e=>{const i=n.length;if(0===i)return void e.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=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(t?t.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let VP=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(O(Cr),O(Tt))},n.\u0275dir=we({type:n}),n})(),Oc=(()=>{class n extends VP{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Li(n)))(i||n)}}(),n.\u0275dir=we({type:n,features:[bn]}),n})();const Sr=new Ce("NgValueAccessor"),oq={provide:Sr,useExisting:Ut(()=>hl),multi:!0},aq=new Ce("CompositionEventMode");let hl=(()=>{class n extends VP{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function sq(){const n=Ls()?Ls().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Cr),O(Tt),O(aq,8))},n.\u0275dir=we({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(e,i){1&e&&ue("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:[Pt([oq]),bn]}),n})();function fl(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function UP(n){return null!=n&&"number"==typeof n.length}const lr=new Ce("NgValidators"),pl=new Ce("NgAsyncValidators"),cq=/^(?=.{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 $d{static min(t){return function HP(n){return t=>{if(fl(t.value)||fl(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(fl(t.value)||fl(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return function WP(n){return fl(n.value)?{required:!0}:null}(t)}static requiredTrue(t){return function GP(n){return!0===n.value?null:{required:!0}}(t)}static email(t){return function YP(n){return fl(n.value)||cq.test(n.value)?null:{email:!0}}(t)}static minLength(t){return function qP(n){return t=>fl(t.value)||!UP(t.value)?null:t.value.lengthUP(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return function QP(n){if(!n)return Y_;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(fl(i.value))return null;const r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(t)}static nullValidator(t){return null}static compose(t){return n2(t)}static composeAsync(t){return r2(t)}}function Y_(n){return null}function ZP(n){return null!=n}function JP(n){return Zf(n)?wt(n):n}function XP(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function e2(n,t){return t.map(e=>e(n))}function t2(n){return n.map(t=>function uq(n){return!n.validate}(t)?t:e=>t.validate(e))}function n2(n){if(!n)return null;const t=n.filter(ZP);return 0==t.length?null:function(e){return XP(e2(e,t))}}function wT(n){return null!=n?n2(t2(n)):null}function r2(n){if(!n)return null;const t=n.filter(ZP);return 0==t.length?null:function(e){return function iq(...n){if(1===n.length){const t=n[0];if(R(t))return G_(t,null);if(P(t)&&Object.getPrototypeOf(t)===Object.prototype){const e=Object.keys(t);return G_(e.map(i=>t[i]),e)}}if("function"==typeof n[n.length-1]){const t=n.pop();return G_(n=1===n.length&&R(n[0])?n[0]:n,null).pipe(fe(e=>t(...e)))}return G_(n,null)}(e2(e,t).map(JP)).pipe(fe(XP))}}function CT(n){return null!=n?r2(t2(n)):null}function o2(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function s2(n){return n._rawValidators}function a2(n){return n._rawAsyncValidators}function DT(n){return n?Array.isArray(n)?n:[n]:[]}function q_(n,t){return Array.isArray(n)?n.includes(t):n===t}function l2(n,t){const e=DT(t);return DT(n).forEach(r=>{q_(e,r)||e.push(r)}),e}function c2(n,t){return DT(t).filter(e=>!q_(n,e))}class u2{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(t){this._rawValidators=t||[],this._composedValidatorFn=wT(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=CT(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class Er extends u2{get formDirective(){return null}get path(){return null}}class Fs extends u2{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class d2{constructor(t){this._cd=t}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 Ac=(()=>{class n extends d2{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Fs,2))},n.\u0275dir=we({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&yo("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:[bn]}),n})(),Wd=(()=>{class n extends d2{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Er,10))},n.\u0275dir=we({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&yo("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:[bn]}),n})();const gp="VALID",Q_="INVALID",Gd="PENDING",yp="DISABLED";function ET(n){return(Z_(n)?n.validators:n)||null}function xT(n,t){return(Z_(t)?t.asyncValidators:n)||null}function Z_(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function f2(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new Q(1e3,"");if(!i[e])throw new Q(1001,"")}function p2(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new Q(1002,"")})}class J_{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===gp}get invalid(){return this.status===Q_}get pending(){return this.status==Gd}get disabled(){return this.status===yp}get enabled(){return this.status!==yp}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(l2(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(l2(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(c2(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(c2(t,this._rawAsyncValidators))}hasValidator(t){return q_(this._rawValidators,t)}hasAsyncValidator(t){return q_(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=Gd,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=yp,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=gp,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===gp||this.status===Gd)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?yp:gp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Gd,this._hasOwnPendingAsyncValidator=!0;const e=JP(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new re,this.statusChanges=new re}_calculateStatus(){return this._allControlsDisabled()?yp:this.errors?Q_:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Gd)?Gd:this._anyControlsHaveStatus(Q_)?Q_:gp}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Z_(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function yq(n){return Array.isArray(n)?wT(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function _q(n){return Array.isArray(n)?CT(n):n||null}(this._rawAsyncValidators)}}class Yd extends J_{constructor(t,e,i){super(ET(e),xT(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){p2(this,0,t),Object.keys(t).forEach(i=>{f2(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}class m2 extends Yd{}const qd=new Ce("CallSetDisabledState",{providedIn:"root",factory:()=>X_}),X_="always";function ev(n,t){return[...t.path,n]}function _p(n,t,e=X_){IT(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function bq(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&g2(n,t)})}(n,t),function Cq(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function wq(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&g2(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function vq(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function tv(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),iv(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function nv(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function IT(n,t){const e=s2(n);null!==t.validator?n.setValidators(o2(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=a2(n);null!==t.asyncValidator?n.setAsyncValidators(o2(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();nv(t._rawValidators,r),nv(t._rawAsyncValidators,r)}function iv(n,t){let e=!1;if(null!==n){if(null!==t.validator){const r=s2(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){const r=a2(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}const i=()=>{};return nv(t._rawValidators,i),nv(t._rawAsyncValidators,i),e}function g2(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function AT(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function kT(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===hl?e=o:function Mq(n){return Object.getPrototypeOf(n.constructor)===Oc}(o)?i=o:r=o}),r||i||e||null}function v2(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function b2(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Kd=class extends J_{constructor(t=null,e,i){super(ET(e),xT(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Z_(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=b2(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){v2(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){v2(this._onDisabledChange,t)}_forEachChild(t){}_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(t){b2(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},Oq={provide:Fs,useExisting:Ut(()=>bp)},D2=(()=>Promise.resolve())();let bp=(()=>{class n extends Fs{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new Kd,this._registered=!1,this.update=new re,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=kT(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),AT(e,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(e){this.viewModel=e,this.update.emit(e)}_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(){_p(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(e){D2.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&function Bd(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}(i);D2.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ev(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(O(Er,9),O(lr,10),O(pl,10),O(Sr,10),O(Un,8),O(qd,8))},n.\u0275dir=we({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:[Pt([Oq]),bn,$i]}),n})(),Qd=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),M2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({}),n})();const PT=new Ce("NgModelWithFormControlWarning"),Rq={provide:Er,useExisting:Ut(()=>Aa)};let Aa=(()=>{class n extends Er{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new re,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(iv(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return _p(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){tv(e.control||null,e,!1),function Sq(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function _2(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(tv(i||null,e),(n=>n instanceof Kd)(r)&&(_p(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function y2(n,t){IT(n,t)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function Dq(n,t){return iv(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){IT(this.form,this),this._oldForm&&iv(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(O(lr,10),O(pl,10),O(qd,8))},n.\u0275dir=we({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&ue("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Pt([Rq]),bn,$i]}),n})();const zq={provide:Fs,useExisting:Ut(()=>kc)};let kc=(()=>{class n extends Fs{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new re,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=kT(0,o)}ngOnChanges(e){this._added||this._setUpControl(),AT(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return ev(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(e){return new(e||n)(O(Er,13),O(lr,10),O(pl,10),O(Sr,10),O(PT,8))},n.\u0275dir=we({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Pt([zq]),bn,$i]}),n})(),B2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[M2]}),n})();class U2 extends J_{constructor(t,e,i){super(ET(e),xT(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){p2(this,0,t),t.forEach((i,r)=>{f2(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}}function H2(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let rv=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new n;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return H2(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Yd(r,o)}record(e,i=null){const r=this._reduceControls(e);return new m2(r,i)}control(e,i,r){let o={};return this.useNonNullable?(H2(i)?o=i:(o.validators=i,o.asyncValidators=r),new Kd(e,{...o,nonNullable:!0})):new Kd(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new U2(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Kd||e instanceof J_?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ov=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:qd,useValue:e.callSetDisabledState??X_}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[B2]}),n})(),Zd=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:PT,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:qd,useValue:e.callSetDisabledState??X_}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[B2]}),n})();class $2{}class eK{}const ka="*";function sv(n,t){return{type:7,name:n,definitions:t,options:{}}}function Pc(n,t=null){return{type:4,styles:t,timings:n}}function W2(n,t=null){return{type:2,steps:n,options:t}}function Ai(n){return{type:6,styles:n,offset:null}}function G2(n,t,e){return{type:0,name:n,styles:t,options:e}}function Lc(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function av(n,t=null){return{type:8,animation:n,options:t}}function lv(n,t=null){return{type:10,animation:n,options:t}}function Y2(n){Promise.resolve().then(n)}class wp{constructor(t=0,e=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=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){Y2(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class q2{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0;const o=this.players.length;0==o?Y2(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==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(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}function K2(n){return new Q(3e3,!1)}function RK(){return typeof window<"u"&&typeof window.document<"u"}function BT(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function ml(n){switch(n.length){case 0:return new wp;case 1:return n[0];default:return new q2(n)}}function Q2(n,t,e,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=t.normalizePropertyName(g,s),y){case"!":y=r.get(m);break;case ka:y=o.get(m);break;default:y=t.normalizeStyleValue(m,g,y,s)}f.set(g,y)}),h||a.push(f),c=f,l=d}),s.length)throw function TK(n){return new Q(3502,!1)}();return a}function UT(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&HT(e,"start",n)));break;case"done":n.onDone(()=>i(e&&HT(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&HT(e,"destroy",n)))}}function HT(n,t,e){const o=$T(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),s=n._data;return null!=s&&(o._data=s),o}function $T(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function bo(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function Z2(n){const t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}let WT=(n,t)=>!1,J2=(n,t,e)=>[],X2=null;function GT(n){const t=n.parentNode||n.host;return t===X2?null:t}(BT()||typeof Element<"u")&&(RK()?(X2=(()=>document.documentElement)(),WT=(n,t)=>{for(;t;){if(t===n)return!0;t=GT(t)}return!1}):WT=(n,t)=>n.contains(t),J2=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));const i=n.querySelector(t);return i?[i]:[]});let Rc=null,eL=!1;const tL=WT,nL=J2;let iL=(()=>{class n{validateStyleProperty(e){return function jK(n){Rc||(Rc=function zK(){return typeof document<"u"?document.body:null}()||{},eL=!!Rc.style&&"WebkitAppearance"in Rc.style);let t=!0;return Rc.style&&!function FK(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in Rc.style,!t&&eL&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Rc.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return tL(e,i)}getParentElement(e){return GT(e)}query(e,i,r){return nL(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new wp(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),YT=(()=>{class n{}return n.NOOP=new iL,n})();const qT="ng-enter",cv="ng-leave",uv="ng-trigger",dv=".ng-trigger",oL="ng-animating",KT=".ng-animating";function Na(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:QT(parseFloat(t[1]),t[2])}function QT(n,t){return"s"===t?1e3*n:n}function hv(n,t,e){return n.hasOwnProperty("duration")?n:function UK(n,t,e){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 t.push(K2()),{duration:0,delay:0,easing:""};r=QT(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=QT(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=n;if(!e){let a=!1,l=t.length;r<0&&(t.push(function nK(){return new Q(3100,!1)}()),a=!0),o<0&&(t.push(function iK(){return new Q(3101,!1)}()),a=!0),a&&t.splice(l,0,K2())}return{duration:r,delay:o,easing:s}}(n,t,e)}function Cp(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function sL(n){const t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function gl(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function lL(n,t,e){return e?t+":"+e+";":""}function cL(n){let t="";for(let e=0;e{const o=JT(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),BT()&&cL(n))}function Fc(n,t){n.style&&(t.forEach((e,i)=>{const r=JT(i);n.style[r]=""}),BT()&&cL(n))}function Dp(n){return Array.isArray(n)?1==n.length?n[0]:W2(n):n}const ZT=new RegExp("{{\\s*(.+?)\\s*}}","g");function uL(n){let t=[];if("string"==typeof n){let e;for(;e=ZT.exec(n);)t.push(e[1]);ZT.lastIndex=0}return t}function Tp(n,t,e){const i=n.toString(),r=i.replace(ZT,(o,s)=>{let a=t[s];return null==a&&(e.push(function oK(n){return new Q(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function fv(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const WK=/-+([a-z0-9])/g;function JT(n){return n.replace(WK,(...t)=>t[1].toUpperCase())}function GK(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function wo(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw function sK(n){return new Q(3004,!1)}()}}function dL(n,t){return window.getComputedStyle(n)[t]}function JK(n,t){const e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function XK(n,t,e){if(":"==n[0]){const l=function eQ(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(n,e);if("function"==typeof l)return void t.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function vK(n){return new Q(3015,!1)}()),t;const r=i[1],o=i[2],s=i[3];t.push(hL(r,s));"<"==o[0]&&!("*"==r&&"*"==s)&&t.push(hL(s,r))}(i,e,t)):e.push(n),e}const yv=new Set(["true","1"]),_v=new Set(["false","0"]);function hL(n,t){const e=yv.has(n)||_v.has(n),i=yv.has(t)||_v.has(t);return(r,o)=>{let s="*"==n||n==r,a="*"==t||t==o;return!s&&e&&"boolean"==typeof r&&(s=r?yv.has(n):_v.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?yv.has(t):_v.has(t)),s&&a}}const tQ=new RegExp("s*:selfs*,?","g");function XT(n,t,e,i){return new nQ(n).build(t,e,i)}class nQ{constructor(t){this._driver=t}build(t,e,i){const r=new oQ(e);return this._resetContextStyleTimingState(r),wo(this,Dp(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push(function lK(){return new Q(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function cK(){return new Q(3007,!1)}())}),{type:7,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{uL(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(fv(o.values()),e.errors.push(function uK(n,t){return new Q(3008,!1)}()))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=wo(this,Dp(t.animation),e);return{type:1,matchers:JK(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:jc(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>wo(this,i,e)),options:jc(t.options)}}visitGroup(t,e){const i=e.currentTime;let r=0;const o=t.steps.map(s=>{e.currentTime=i;const a=wo(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:jc(t.options)}}visitAnimate(t,e){const i=function aQ(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return eM(hv(n,t).duration,0,"");const e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=eM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=hv(e,t);return eM(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:Ai({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Ai(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===ka?i.push(a):e.errors.push(new Q(3002,!1)):i.push(sL(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:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function hK(n,t,e,i,r){return new Q(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function $K(n,t,e){const i=t.params||{},r=uL(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function rK(n){return new Q(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function fK(){return new Q(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=t.steps.map(y=>{const b=this._makeStyleAst(y,e);let w=null!=b.offset?b.offset:function sQ(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(b.styles),_=0;return null!=w&&(o++,_=b.offset=w),l=l||_<0||_>1,a=a||_0&&o{const w=h>0?b==f?1:h*b:s[b],_=w*g;e.currentTime=p+m.delay+_,m.duration=_,this._validateStyleAst(y,e),y.offset=w,i.styles.push(y)}),i}visitReference(t,e){return{type:8,animation:wo(this,Dp(t.animation),e),options:jc(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:jc(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:jc(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[o,s]=function iQ(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(tQ,"")),n=n.replace(/@\*/g,dv).replace(/@\w+/g,e=>dv+"-"+e.slice(1)).replace(/:animating/g,KT),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,bo(e.collectedStyles,e.currentQuerySelector,new Map);const a=wo(this,Dp(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:jc(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function yK(){return new Q(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:hv(t.timings,e.errors,!0);return{type:12,animation:wo(this,Dp(t.animation),e),timings:i,options:null}}}class oQ{constructor(t){this.errors=t,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 jc(n){return n?(n=Cp(n)).params&&(n.params=function rQ(n){return n?Cp(n):null}(n.params)):n={},n}function eM(n,t,e){return{duration:n,delay:t,easing:e}}function tM(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class vv{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const uQ=new RegExp(":enter","g"),hQ=new RegExp(":leave","g");function nM(n,t,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new fQ).buildKeyframes(n,t,e,i,r,o,s,a,l,c)}class fQ{buildKeyframes(t,e,i,r,o,s,a,l,c,u=[]){c=c||new vv;const d=new iM(t,e,c,r,o,u,[]);d.options=l;const h=l.delay?Na(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),wo(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===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[tM(e,[],[],[],0,h,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(const r of t){const o=r?.delay;if(o){const s="number"==typeof o?o:Na(Tp(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Na(i.duration):null,a=null!=i.delay?Na(i.delay):null;return 0!==s&&t.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),wo(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let r=e;const o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=bv);const s=Na(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>wo(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let r=e.currentTimeline.currentTime;const o=t.options&&t.options.delay?Na(t.options.delay):0;t.steps.forEach(s=>{const a=e.createSubContext(t.options);o&&a.delayNextStep(o),wo(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return hv(e.params?Tp(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?Na(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=bv);let s=i;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(t.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),wo(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;wo(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const bv={};class iM{constructor(t,e,i,r,o,s,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=bv,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new wv(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=Na(i.duration)),null!=i.delay&&(r.delay=Na(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=Tp(o[a],s,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){const r=e||this.element,o=new iM(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(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=bv,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new pQ(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(uQ,"."+this._enterClassName)).replace(hQ,"."+this._leaveClassName);let c=this._driver.query(this.element,t,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 _K(n){return new Q(3014,!1)}()),a}}class wv{constructor(t,e,i,r){this._driver=t,this.element=e,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(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,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(t){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new wv(this._driver,t,e||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(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||ka),this._currentKeyframe.set(e,ka);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function mQ(n,t){const e=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let o of i)e.set(o,ka)}else gl(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of s){const c=Tp(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??ka),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=gl(a,new Map,this._backFill);c.forEach((u,d)=>{"!"===u?t.add(d):u===ka&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=t.size?fv(t.values()):[],s=e.size?fv(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return tM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class pQ extends wv{constructor(t,e,i,r,o,s,a=!1){super(t,e,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 t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=gl(t[0]);l.set("offset",0),o.push(l);const c=gl(t[0]);c.set("offset",mL(a)),o.push(c);const u=t.length-1;for(let d=1;d<=u;d++){let h=gl(t[d]);const f=h.get("offset");h.set("offset",mL((e+f*i)/s)),o.push(h)}i=s,e=0,r="",t=o}return tM(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function mL(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class rM{}const gQ=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 yQ extends rM{normalizePropertyName(t,e){return JT(t)}normalizeStyleValue(t,e,i,r){let o="";const s=i.toString().trim();if(gQ.has(e)&&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 aK(n,t){return new Q(3005,!1)}())}return s+o}}function gL(n,t,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const oM={};class yL{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function _Q(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||oM,p=this.buildStyles(i,a&&a.params||oM,d),m=l&&l.params||oM,g=this.buildStyles(r,m,d),y=new Set,b=new Map,w=new Map,_="void"===r,N={params:vQ(m,h),delay:this.ast.options?.delay},S=u?[]:nM(t,e,this.ast.animation,o,s,p,g,N,c,d);let J=0;if(S.forEach(ke=>{J=Math.max(ke.duration+ke.delay,J)}),d.length)return gL(e,this._triggerName,i,r,_,p,g,[],[],b,w,J,d);S.forEach(ke=>{const He=ke.element,vt=bo(b,He,new Set);ke.preStyleProps.forEach(st=>vt.add(st));const lt=bo(w,He,new Set);ke.postStyleProps.forEach(st=>lt.add(st)),He!==e&&y.add(He)});const K=fv(y.values());return gL(e,this._triggerName,i,r,_,p,g,S,K,b,w,J)}}function vQ(n,t){const e=Cp(t);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}class bQ{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){const i=new Map,r=Cp(this.defaultParams);return Object.keys(t).forEach(o=>{const s=t[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=Tp(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class CQ{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new bQ(r.style,r.options&&r.options.params||{},i))}),_L(this.states,"true","1"),_L(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new yL(t,r,this.states))}),this.fallbackTransition=function DQ(n,t,e){return new yL(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function _L(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}const TQ=new vv;class MQ{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const i=[],o=XT(this._driver,e,i,[]);if(i.length)throw function MK(n){return new Q(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,e,i){const r=t.element,o=Q2(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const r=[],o=this._animations.get(t);let s;const a=new Map;if(o?(s=nM(this._driver,e,o,qT,cv,new Map,new Map,i,TQ,r),s.forEach(u=>{const d=bo(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function SK(){return new Q(3300,!1)}()),s=[]),r.length)throw function EK(n){return new Q(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,ka))})});const c=ml(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function xK(n){return new Q(3301,!1)}();return e}listen(t,e,i,r){const o=$T(e,"","","");return UT(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});const o=this._getPlayer(t);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(t)}}}const vL="ng-animate-queued",sM="ng-animate-disabled",OQ=[],bL={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},AQ={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Fo="__ng_removed";class aM{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=function LQ(n){return n??null}(i?t.value:t),i){const o=Cp(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const e=t.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Mp="void",lM=new aM(Mp);class kQ{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,jo(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw function IK(n,t){return new Q(3302,!1)}();if(null==i||0==i.length)throw function OK(n){return new Q(3303,!1)}();if(!function RQ(n){return"start"==n||"done"==n}(i))throw function AK(n,t){return new Q(3400,!1)}();const o=bo(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);const a=bo(this._engine.statesByElement,t,new Map);return a.has(e)||(jo(t,uv),jo(t,uv+"-"+e),a.set(e,lM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){const e=this._triggers.get(t);if(!e)throw function kK(n){return new Q(3401,!1)}();return e}trigger(t,e,i,r=!0){const o=this._getTrigger(e),s=new cM(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(jo(t,uv),jo(t,uv+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new aM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=lM),c.value!==Mp&&l.value===c.value){if(!function zQ(n,t){const e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r{Fc(t,g),js(t,y)})}return}const h=bo(this._engine.playersByElement,t,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,t,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(jo(t,vL),s.onStart(()=>{Jd(t,vL)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(t);if(g){let y=g.indexOf(s);y>=0&&g.splice(y,1)}}),this.players.push(s),h.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,dv,!0);i.forEach(r=>{if(r[Fo])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){const o=this._engine.statesByElement.get(t),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(t,c,Mp,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&ml(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const r=new Set;e.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)||lM,u=new aM(Mp),d=new cM(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{const o=t[Fo];(!o||o===bL)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){jo(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];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=$T(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,UT(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.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(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}class NQ{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,i){this.bodyNode=t,this.driver=e,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 t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){const i=new kQ(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(t,e,i,r){if(Cv(e)){const o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!Cv(e))return;const o=e[Fo];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),jo(t,sM)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Jd(t,sM))}removeNode(t,e,i,r){if(Cv(e)){const o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==t&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[Fo]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return Cv(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,dv,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,KT,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return ml(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Fo];if(e&&e.setForRemoval){if(t[Fo]=bL,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(sM)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];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=[],e.length?ml(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function NK(n){return new Q(3402,!1)}()}_flushAnimations(t,e){const i=new vv,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(le=>{u.add(le);const me=this.driver.query(le,".ng-animate-queued",!0);for(let be=0;be{const be=qT+m++;p.set(me,be),le.forEach(Ue=>jo(Ue,be))});const g=[],y=new Set,b=new Set;for(let le=0;ley.add(Ue)):b.add(me))}const w=new Map,_=DL(h,Array.from(y));_.forEach((le,me)=>{const be=cv+m++;w.set(me,be),le.forEach(Ue=>jo(Ue,be))}),t.push(()=>{f.forEach((le,me)=>{const be=p.get(me);le.forEach(Ue=>Jd(Ue,be))}),_.forEach((le,me)=>{const be=w.get(me);le.forEach(Ue=>Jd(Ue,be))}),g.forEach(le=>{this.processLeaveNode(le)})});const N=[],S=[];for(let le=this._namespaceList.length-1;le>=0;le--)this._namespaceList[le].drainQueuedTransitions(e).forEach(be=>{const Ue=be.player,kt=be.element;if(N.push(Ue),this.collectedEnterElements.length){const In=kt[Fo];if(In&&In.setForMove){if(In.previousTriggersValues&&In.previousTriggersValues.has(be.triggerName)){const Gt=In.previousTriggersValues.get(be.triggerName),ft=this.statesByElement.get(be.element);if(ft&&ft.has(be.triggerName)){const zn=ft.get(be.triggerName);zn.value=Gt,ft.set(be.triggerName,zn)}}return void Ue.destroy()}}const cn=!d||!this.driver.containsElement(d,kt),Vt=w.get(kt),xn=p.get(kt),Ft=this._buildInstruction(be,i,xn,Vt,cn);if(Ft.errors&&Ft.errors.length)return void S.push(Ft);if(cn)return Ue.onStart(()=>Fc(kt,Ft.fromStyles)),Ue.onDestroy(()=>js(kt,Ft.toStyles)),void r.push(Ue);if(be.isFallbackTransition)return Ue.onStart(()=>Fc(kt,Ft.fromStyles)),Ue.onDestroy(()=>js(kt,Ft.toStyles)),void r.push(Ue);const Xi=[];Ft.timelines.forEach(In=>{In.stretchStartingKeyframe=!0,this.disabledNodes.has(In.element)||Xi.push(In)}),Ft.timelines=Xi,i.append(kt,Ft.timelines),s.push({instruction:Ft,player:Ue,element:kt}),Ft.queriedElements.forEach(In=>bo(a,In,[]).push(Ue)),Ft.preStyleProps.forEach((In,Gt)=>{if(In.size){let ft=l.get(Gt);ft||l.set(Gt,ft=new Set),In.forEach((zn,Pr)=>ft.add(Pr))}}),Ft.postStyleProps.forEach((In,Gt)=>{let ft=c.get(Gt);ft||c.set(Gt,ft=new Set),In.forEach((zn,Pr)=>ft.add(Pr))})});if(S.length){const le=[];S.forEach(me=>{le.push(function PK(n,t){return new Q(3505,!1)}())}),N.forEach(me=>me.destroy()),this.reportError(le)}const J=new Map,K=new Map;s.forEach(le=>{const me=le.element;i.has(me)&&(K.set(me,me),this._beforeAnimationBuild(le.player.namespaceId,le.instruction,J))}),r.forEach(le=>{const me=le.element;this._getPreviousPlayers(me,!1,le.namespaceId,le.triggerName,null).forEach(Ue=>{bo(J,me,[]).push(Ue),Ue.destroy()})});const ke=g.filter(le=>ML(le,l,c)),He=new Map;CL(He,this.driver,b,c,ka).forEach(le=>{ML(le,l,c)&&ke.push(le)});const lt=new Map;f.forEach((le,me)=>{CL(lt,this.driver,new Set(le),l,"!")}),ke.forEach(le=>{const me=He.get(le),be=lt.get(le);He.set(le,new Map([...Array.from(me?.entries()??[]),...Array.from(be?.entries()??[])]))});const st=[],yn=[],xt={};s.forEach(le=>{const{element:me,player:be,instruction:Ue}=le;if(i.has(me)){if(u.has(me))return be.onDestroy(()=>js(me,Ue.toStyles)),be.disabled=!0,be.overrideTotalTime(Ue.totalTime),void r.push(be);let kt=xt;if(K.size>1){let Vt=me;const xn=[];for(;Vt=Vt.parentNode;){const Ft=K.get(Vt);if(Ft){kt=Ft;break}xn.push(Vt)}xn.forEach(Ft=>K.set(Ft,kt))}const cn=this._buildAnimation(be.namespaceId,Ue,J,o,lt,He);if(be.setRealPlayer(cn),kt===xt)st.push(be);else{const Vt=this.playersByElement.get(kt);Vt&&Vt.length&&(be.parentPlayer=ml(Vt)),r.push(be)}}else Fc(me,Ue.fromStyles),be.onDestroy(()=>js(me,Ue.toStyles)),yn.push(be),u.has(me)&&r.push(be)}),yn.forEach(le=>{const me=o.get(le.element);if(me&&me.length){const be=ml(me);le.setRealPlayer(be)}}),r.forEach(le=>{le.parentPlayer?le.syncPlayerEvents(le.parentPlayer):le.destroy()});for(let le=0;le!cn.destroyed);kt.length?FQ(this,me,kt):this.processLeaveNode(me)}return g.length=0,st.forEach(le=>{this.players.push(le),le.onDone(()=>{le.destroy();const me=this.players.indexOf(le);this.players.splice(me,1)}),le.play()}),st}elementContainsData(t,e){let i=!1;const r=e[Fo];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(s=a)}else{const a=this.playersByElement.get(t);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(t,e,i){const o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=bo(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Fc(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const m=p.element;u.add(m);const g=m[Fo];if(g&&g.removedBeforeQueried)return new wp(p.duration,p.delay);const y=m!==l,b=function jQ(n){const t=[];return TL(n,t),t}((i.get(m)||OQ).map(J=>J.getRealPlayer())).filter(J=>!!J.element&&J.element===m),w=o.get(m),_=s.get(m),N=Q2(0,this._normalizer,0,p.keyframes,w,_),S=this._buildPlayer(p,N,b);if(p.subTimeline&&r&&d.add(m),y){const J=new cM(t,a,m);J.setRealPlayer(S),c.push(J)}return S});c.forEach(p=>{bo(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function PQ(n,t,e){let i=n.get(t);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>jo(p,oL));const f=ml(h);return f.onDestroy(()=>{u.forEach(p=>Jd(p,oL)),js(l,e.toStyles)}),d.forEach(p=>{bo(r,p,[]).push(f)}),f}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new wp(t.duration,t.delay)}}class cM{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new wp,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>UT(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){bo(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}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(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Cv(n){return n&&1===n.nodeType}function wL(n,t){const e=n.style.display;return n.style.display=t??"none",e}function CL(n,t,e,i,r){const o=[];e.forEach(l=>o.push(wL(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=t.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Fo]=AQ,s.push(c))}),n.set(c,u)});let a=0;return e.forEach(l=>wL(l,o[a++])),s}function DL(n,t){const e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;const r=new Set(t),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=e.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return t.forEach(a=>{const l=s(a);1!==l&&e.get(l).push(a)}),e}function jo(n,t){n.classList?.add(t)}function Jd(n,t){n.classList?.remove(t)}function FQ(n,t,e){ml(e).onDone(()=>n.processLeaveNode(t))}function TL(n,t){for(let e=0;er.add(o)):t.set(n,i),e.delete(n),!0}class Dv{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new NQ(t,e,i),this._timelineEngine=new MQ(t,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){const s=t+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],u=XT(this._driver,o,l,[]);if(l.length)throw function DK(n,t){return new Q(3404,!1)}();a=function wQ(n,t,e){return new CQ(n,t,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){const[o,s]=Z2(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=Z2(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let BQ=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&js(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(js(this._element,this._initialStyles),this._endStyles&&(js(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Fc(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Fc(this._element,this._endStyles),this._endStyles=null),js(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function uM(n){let t=null;return n.forEach((e,i)=>{(function UQ(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}class SL{constructor(t,e,i,r){this.element=t,this.keyframes=e,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(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),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(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:dL(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class HQ{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return tL(t,e)}getParentElement(t){return GT(t)}query(t,e,i){return nL(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,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 SL);(function YK(n,t){return 0===n||0===t})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function HK(n){return n.length?n[0]instanceof Map?n:n.map(t=>sL(t)):[]}(e).map(f=>gl(f));d=function qK(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,dL(n,a)))}}return t}(t,d,c);const h=function VQ(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=uM(t[0]),t.length>1&&(i=uM(t[t.length-1]))):t instanceof Map&&(e=uM(t)),e||i?new BQ(n,e,i):null}(t,d);return new SL(t,d,l,h)}}let $Q=(()=>{class n extends $2{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:ie.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?W2(e):e;return EL(this._renderer,null,i,"register",[r]),new WQ(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(F(Gf),F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class WQ extends eK{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new GQ(this._id,t,e||{},this._renderer)}}class GQ{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return EL(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}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(t){this._command("setPosition",t)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function EL(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}const xL="@.disabled";let YQ=(()=>{class n{constructor(e,i,r){this.delegate=e,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(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new IL("",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,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new qQ(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(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(e){return new(e||n)(F(Gf),F(Dv),F(qt))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class IL{constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==xL?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class qQ extends IL{constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==xL?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const r=function KQ(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function QQ(n){const t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}}let ZQ=(()=>{class n extends Dv{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(F(Ln),F(YT),F(rM),F(Ec))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();const OL=[{provide:$2,useClass:$Q},{provide:rM,useFactory:function JQ(){return new yQ}},{provide:Dv,useClass:ZQ},{provide:Gf,useFactory:function XQ(n,t,e){return new YQ(n,t,e)},deps:[F_,Dv,qt]}],dM=[{provide:YT,useFactory:()=>new HQ},{provide:tN,useValue:"BrowserAnimations"},...OL],AL=[{provide:YT,useClass:iL},{provide:tN,useValue:"NoopAnimations"},...OL];let eZ=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?AL:dM}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({providers:dM,imports:[bP]}),n})();class Lt{static equals(t,e,i){return i?this.resolveFieldData(t,i)===this.resolveFieldData(e,i):this.equalsByValue(t,e)}static equalsByValue(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var o,s,a,i=Array.isArray(t),r=Array.isArray(e);if(i&&r){if((s=t.length)!=e.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[o],e[o]))return!1;return!0}if(i!=r)return!1;var l=t instanceof Date,c=e instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==e.getTime();var u=t instanceof RegExp,d=e instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==e.toString();var h=Object.keys(t);if((s=h.length)!==Object.keys(e).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,h[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[a=h[o]],e[a]))return!1;return!0}return t!=t&&e!=e}static resolveFieldData(t,e){if(t&&e){if(this.isFunction(e))return e(t);if(-1==e.indexOf("."))return t[e];{let i=e.split("."),r=t;for(let o=0,s=i.length;o=t.length&&(i%=t.length,e%=t.length),t.splice(i,0,t.splice(e,1)[0]))}static insertIntoOrderedArray(t,e,i,r){if(i.length>0){let o=!1;for(let s=0;se){i.splice(s,0,t),o=!0;break}o||i.push(t)}else i.push(t)}static findIndexInList(t,e){let i=-1;if(e)for(let r=0;r-1&&(t=t.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")),t}static isEmpty(t){return null==t||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length}static isNotEmpty(t){return!this.isEmpty(t)}static compare(t,e,i,r=1){let o=-1;const s=this.isEmpty(t),a=this.isEmpty(e);return o=s&&a?0:s?r:a?-r:"string"==typeof t&&"string"==typeof e?t.localeCompare(e,i,{numeric:!0}):te?1:0,o}static sort(t,e,i=1,r,o=1){return(1===o?i:o)*Lt.compare(t,e,r,i)}static merge(t,e){if(null!=t||null!=e)return null!=t&&"object"!=typeof t||null!=e&&"object"!=typeof e?null!=t&&"string"!=typeof t||null!=e&&"string"!=typeof e?e||t:[t||"",e||""].join(" "):{...t||{},...e||{}}}}var kL=0;function NL(){return"pr_id_"+ ++kL}var yl=function tZ(){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 PL=["*"];let LL=(()=>{class n{constructor(){this.requireConfirmationSource=new ae,this.acceptConfirmationSource=new ae,this.requireConfirmation$=this.requireConfirmationSource.asObservable(),this.accept=this.acceptConfirmationSource.asObservable()}confirm(e){return this.requireConfirmationSource.next(e),this}close(){return this.requireConfirmationSource.next(null),this}onAccept(){this.acceptConfirmationSource.next(null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),cr=(()=>{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})(),RL=(()=>{class n{constructor(){this.filters={startsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r);return Lt.removeAccents(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1!==Lt.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},notContains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r);return-1===Lt.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},endsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Lt.removeAccents(i.toString()).toLocaleLowerCase(r),s=Lt.removeAccents(e.toString()).toLocaleLowerCase(r);return-1!==s.indexOf(o,s.length-o.length)},equals:(e,i,r)=>null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Lt.removeAccents(e.toString()).toLocaleLowerCase(r)==Lt.removeAccents(i.toString()).toLocaleLowerCase(r)),notEquals:(e,i,r)=>!(null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Lt.removeAccents(e.toString()).toLocaleLowerCase(r)==Lt.removeAccents(i.toString()).toLocaleLowerCase(r))),in:(e,i)=>{if(null==i||0===i.length)return!0;for(let r=0;rnull==i||null==i[0]||null==i[1]||null!=e&&(e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1]),lt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i),gt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>i.getTime():e>i),gte:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i),is:(e,i,r)=>this.filters.equals(e,i,r),isNot:(e,i,r)=>this.filters.notEquals(e,i,r),before:(e,i,r)=>this.filters.lt(e,i,r),after:(e,i,r)=>this.filters.gt(e,i,r),dateIs:(e,i)=>null==i||null!=e&&e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>null==i||null!=e&&e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>null==i||null!=e&&e.getTime()null==i||null!=e&&e.getTime()>i.getTime()}}filter(e,i,r,o,s){let a=[];if(e)for(let l of e)for(let c of i){let u=Lt.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}register(e,i){this.filters[e]=i}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),nZ=(()=>{class n{constructor(){this.messageSource=new ae,this.clearSource=new ae,this.messageObserver=this.messageSource.asObservable(),this.clearObserver=this.clearSource.asObservable()}add(e){e&&this.messageSource.next(e)}addAll(e){e&&e.length&&this.messageSource.next(e)}clear(e){this.clearSource.next(e||null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),iZ=(()=>{class n{constructor(){this.clickSource=new ae,this.clickObservable=this.clickSource.asObservable()}add(e){e&&this.clickSource.next(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),zc=(()=>{class n{constructor(){this.ripple=!1,this.overlayOptions={},this.filterMatchModeOptions={text:[cr.STARTS_WITH,cr.CONTAINS,cr.NOT_CONTAINS,cr.ENDS_WITH,cr.EQUALS,cr.NOT_EQUALS],numeric:[cr.EQUALS,cr.NOT_EQUALS,cr.LESS_THAN,cr.LESS_THAN_OR_EQUAL_TO,cr.GREATER_THAN,cr.GREATER_THAN_OR_EQUAL_TO],date:[cr.DATE_IS,cr.DATE_IS_NOT,cr.DATE_BEFORE,cr.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(e){return this.translation[e]}setTranslation(e){this.translation={...this.translation,...e},this.translationSource.next(this.translation)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),hM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["p-header"]],ngContentSelectors:PL,decls:1,vars:0,template:function(e,i){1&e&&(go(),Ri(0))},encapsulation:2}),n})(),fM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["p-footer"]],ngContentSelectors:PL,decls:1,vars:0,template:function(e,i){1&e&&(go(),Ri(0))},encapsulation:2}),n})(),qi=(()=>{class n{constructor(e){this.template=e}getType(){return this.name}}return n.\u0275fac=function(e){return new(e||n)(O(No))},n.\u0275dir=we({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),zo=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})(),Vc=(()=>{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})(),Z=(()=>{class n{static addClass(e,i){e&&i&&(e.classList?e.classList.add(i):e.className+=" "+i)}static addMultipleClasses(e,i){if(e&&i)if(e.classList){let r=i.trim().split(" ");for(let o=0;o{if(m)return"relative"===getComputedStyle(m).getPropertyValue("position")?m:r(m.parentElement)},o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),s=i.offsetHeight,a=i.getBoundingClientRect(),l=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),u=this.getViewport(),h=r(e)?.getBoundingClientRect()||{top:-1*l,left:-1*c};let f,p;a.top+s+o.height>u.height?(f=a.top-h.top-o.height,e.style.transformOrigin="bottom",a.top+f<0&&(f=-1*a.top)):(f=s+a.top-h.top,e.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,e.style.top=f+"px",e.style.left=p+"px"}static absolutePosition(e,i){const r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),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,e.style.transformOrigin="bottom",f<0&&(f=u)):(f=a+c.top+u,e.style.transformOrigin="top"),p=c.left+s>h.width?Math.max(0,c.left+d+l-s):c.left+d,e.style.top=f+"px",e.style.left=p+"px"}static getParents(e,i=[]){return null===e.parentNode?i:this.getParents(e.parentNode,i.concat([e.parentNode]))}static getScrollableParents(e){let i=[];if(e){let r=this.getParents(e);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(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementDimensions(e){let i={};return e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",i}static scrollInView(e,i){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=e.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=e.scrollTop,h=e.clientHeight,f=this.getOuterHeight(i);u<0?e.scrollTop=d+u:u+f>h&&(e.scrollTop=d+u-h+f)}static fadeIn(e,i){e.style.opacity=0;let r=+new Date,o=0,s=function(){o=+e.style.opacity.replace(",",".")+((new Date).getTime()-r)/i,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,i){var r=1,a=50/i;let l=setInterval(()=>{(r-=a)<=0&&(r=0,clearInterval(l)),e.style.opacity=r},50)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,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(e,i)}static getOuterWidth(e,i){let r=e.offsetWidth;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let i=getComputedStyle(e);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(e){let i=getComputedStyle(e);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(e,i){let r=e.offsetHeight;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let e=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0];return{width:e.innerWidth||r.clientWidth||o.clientWidth,height:e.innerHeight||r.clientHeight||o.clientHeight}}static getOffset(e){var i=e.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(e,i){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,e)}static getUserAgent(){return navigator.userAgent}static isIE(){var e=window.navigator.userAgent;return e.indexOf("MSIE ")>0||(e.indexOf("Trident/")>0?(e.indexOf("rv:"),!0):e.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(e,i){if(this.isElement(i))i.appendChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot append "+i+" to "+e;i.el.nativeElement.appendChild(e)}}static removeChild(e,i){if(this.isElement(i))i.removeChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot remove "+e+" from "+i;i.el.nativeElement.removeChild(e)}}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}static calculateScrollbarWidth(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.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 e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(e,i,r){e[i].apply(e,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 e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return!e||null===e.offsetParent}static isVisible(e){return e&&null!=e.offsetParent}static isExist(e){return null!==e&&typeof e<"u"&&e.nodeName&&e.parentNode}static focus(e,i){e&&document.activeElement!==e&&e.focus(i)}static getFocusableElements(e){let i=n.find(e,'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(e,i=!1){const r=n.getFocusableElements(e);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(e,i){if(!e)return null;switch(e){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 e;if("string"===r)return document.querySelector(e);if("object"===r&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;const s=(a=e)&&a.constructor&&a.call&&a.apply?e():e;return s&&9===s.nodeType||this.isExist(s)?s:null}var a}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class FL{constructor(t,e=(()=>{})){this.element=t,this.listener=e}bindScrollListener(){this.scrollableParents=Z.getScrollableParents(this.element);for(let t=0;t{class n{constructor(e,i,r){this.el=e,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(e){let i=this.getInk();if(!i||"none"===getComputedStyle(i,null).display)return;if(Z.removeClass(i,"p-ink-active"),!Z.getHeight(i)&&!Z.getWidth(i)){let a=Math.max(Z.getOuterWidth(this.el.nativeElement),Z.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=Z.getOffset(this.el.nativeElement),o=e.pageX-r.left+document.body.scrollTop-Z.getWidth(i)/2,s=e.pageY-r.top+document.body.scrollLeft-Z.getHeight(i)/2;i.style.top=s+"px",i.style.left=o+"px",Z.addClass(i,"p-ink-active"),this.timeout=setTimeout(()=>{let a=this.getInk();a&&Z.removeClass(a,"p-ink-active")},401)}getInk(){const e=this.el.nativeElement.children;for(let i=0;i{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();const rZ=["headerchkbox"],oZ=["filter"];function sZ(n,t){1&n&&_t(0)}function aZ(n,t){if(1&n&&(I(0,"div",7),Ri(1),M(2,sZ,1,0,"ng-container",8),A()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.headerTemplate)}}const jL=function(n){return{"p-checkbox-disabled":n}},lZ=function(n,t,e){return{"p-highlight":n,"p-focus":t,"p-disabled":e}},zL=function(n){return{"pi pi-check":n}};function cZ(n,t){if(1&n){const e=We();I(0,"div",12)(1,"div",13)(2,"input",14),ue("focus",function(){return de(e),he(D(2).onHeaderCheckboxFocus())})("blur",function(){return de(e),he(D(2).onHeaderCheckboxBlur())})("keydown.space",function(r){return de(e),he(D(2).toggleAll(r))}),A()(),I(3,"div",15,16),ue("click",function(r){return de(e),he(D(2).toggleAll(r))}),_e(5,"span",17),A()()}if(2&n){const e=D(2);v("ngClass",Mt(5,jL,e.disabled||e.toggleAllDisabled)),C(2),v("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),C(1),v("ngClass",ll(7,lZ,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),C(2),v("ngClass",Mt(11,zL,e.allChecked))}}function uZ(n,t){1&n&&_t(0)}const dZ=function(n){return{options:n}};function hZ(n,t){if(1&n&&(dt(0),M(1,uZ,1,0,"ng-container",18),ht()),2&n){const e=D(2);C(1),v("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",Mt(2,dZ,e.filterOptions))}}function fZ(n,t){if(1&n){const e=We();I(0,"div",20)(1,"input",21,22),ue("input",function(r){return de(e),he(D(3).onFilter(r))}),A(),_e(3,"span",23),A()}if(2&n){const e=D(3);C(1),v("value",e.filterValue||"")("disabled",e.disabled),Ot("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function pZ(n,t){1&n&&M(0,fZ,4,4,"div",19),2&n&&v("ngIf",D(2).filter)}function mZ(n,t){if(1&n&&(I(0,"div",7),M(1,cZ,6,13,"div",9),M(2,hZ,2,4,"ng-container",10),M(3,pZ,1,1,"ng-template",null,11,Bn),A()),2&n){const e=Dn(4),i=D();C(1),v("ngIf",i.checkbox&&i.multiple&&i.showToggleAll),C(1),v("ngIf",i.filterTemplate)("ngIfElse",e)}}function gZ(n,t){if(1&n&&(I(0,"span"),Ne(1),A()),2&n){const e=D().$implicit,i=D(2);C(1),At(i.getOptionGroupLabel(e)||"empty")}}function yZ(n,t){1&n&&_t(0)}function _Z(n,t){1&n&&_t(0)}const pM=function(n){return{$implicit:n}};function vZ(n,t){if(1&n&&(I(0,"li",25),M(1,gZ,2,1,"span",3),M(2,yZ,1,0,"ng-container",18),A(),M(3,_Z,1,0,"ng-container",18)),2&n){const e=t.$implicit,i=D(2),r=Dn(8);C(1),v("ngIf",!i.groupTemplate),C(1),v("ngTemplateOutlet",i.groupTemplate)("ngTemplateOutletContext",Mt(5,pM,e)),C(1),v("ngTemplateOutlet",r)("ngTemplateOutletContext",Mt(7,pM,i.getOptionGroupChildren(e)))}}function bZ(n,t){if(1&n&&(dt(0),M(1,vZ,4,9,"ng-template",24),ht()),2&n){const e=D();C(1),v("ngForOf",e.optionsToRender)}}function wZ(n,t){1&n&&_t(0)}function CZ(n,t){if(1&n&&(dt(0),M(1,wZ,1,0,"ng-container",18),ht()),2&n){const e=D(),i=Dn(8);C(1),v("ngTemplateOutlet",i)("ngTemplateOutletContext",Mt(2,pM,e.optionsToRender))}}const DZ=function(n){return{"p-highlight":n}};function TZ(n,t){if(1&n&&(I(0,"div",12)(1,"div",28),_e(2,"span",17),A()()),2&n){const e=D().$implicit,i=D(2);v("ngClass",Mt(3,jL,i.disabled||i.isOptionDisabled(e))),C(1),v("ngClass",Mt(5,DZ,i.isSelected(e))),C(1),v("ngClass",Mt(7,zL,i.isSelected(e)))}}function MZ(n,t){if(1&n&&(I(0,"span"),Ne(1),A()),2&n){const e=D().$implicit,i=D(2);C(1),At(i.getOptionLabel(e))}}function SZ(n,t){1&n&&_t(0)}const EZ=function(n,t){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":t}},xZ=function(n,t){return{$implicit:n,index:t}};function IZ(n,t){if(1&n){const e=We();I(0,"li",27),ue("click",function(r){const s=de(e).$implicit;return he(D(2).onOptionClick(r,s))})("dblclick",function(r){const s=de(e).$implicit;return he(D(2).onOptionDoubleClick(r,s))})("touchend",function(){const o=de(e).$implicit;return he(D(2).onOptionTouchEnd(o))})("keydown",function(r){const s=de(e).$implicit;return he(D(2).onOptionKeyDown(r,s))}),M(1,TZ,3,9,"div",9),M(2,MZ,2,1,"span",3),M(3,SZ,1,0,"ng-container",18),A()}if(2&n){const e=t.$implicit,i=t.index,r=D(2);v("ngClass",bi(8,EZ,r.isSelected(e),r.isOptionDisabled(e))),Ot("tabindex",r.disabled||r.isOptionDisabled(e)?null:"0")("aria-label",r.getOptionLabel(e))("aria-selected",r.isSelected(e)),C(1),v("ngIf",r.checkbox&&r.multiple),C(1),v("ngIf",!r.itemTemplate),C(1),v("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",bi(11,xZ,e,i))}}function OZ(n,t){1&n&&M(0,IZ,4,14,"li",26),2&n&&v("ngForOf",t.$implicit)}function AZ(n,t){if(1&n&&(dt(0),Ne(1),ht()),2&n){const e=D(2);C(1),Yi(" ",e.emptyFilterMessageLabel," ")}}function kZ(n,t){1&n&&_t(0,null,30)}function NZ(n,t){if(1&n&&(I(0,"li",29),M(1,AZ,2,1,"ng-container",10),M(2,kZ,2,0,"ng-container",8),A()),2&n){const e=D();C(1),v("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),C(1),v("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function PZ(n,t){if(1&n&&(dt(0),Ne(1),ht()),2&n){const e=D(2);C(1),Yi(" ",e.emptyMessageLabel," ")}}function LZ(n,t){1&n&&_t(0,null,31)}function RZ(n,t){if(1&n&&(I(0,"li",29),M(1,PZ,2,1,"ng-container",10),M(2,LZ,2,0,"ng-container",8),A()),2&n){const e=D();C(1),v("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),C(1),v("ngTemplateOutlet",e.emptyTemplate)}}function FZ(n,t){1&n&&_t(0)}function jZ(n,t){if(1&n&&(I(0,"div",32),Ri(1,1),M(2,FZ,1,0,"ng-container",8),A()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.footerTemplate)}}const zZ=[[["p-header"]],[["p-footer"]]],VZ=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},BZ=["p-header","p-footer"],UZ={provide:Sr,useExisting:Ut(()=>VL),multi:!0};let VL=(()=>{class n{constructor(e,i,r,o){this.el=e,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(e){this._options=e,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.filterBy&&(this.filterOptions={filter:e=>this.onFilter(e),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template}})}getOptionLabel(e){return this.optionLabel?Lt.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Lt.resolveFieldData(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?Lt.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Lt.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Lt.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(e,i):this.onOptionClickMultiple(e,i):this.onOptionClickSingle(e,i),this.onClick.emit({originalEvent:e,option:i,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(e){this.disabled||this.isOptionDisabled(e)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||this.onDblClick.emit({originalEvent:e,option:i,value:this.value})}onOptionClickSingle(e,i){let r=this.isSelected(i),o=!1;!this.optionTouched&&this.metaKeySelection?r?(e.metaKey||e.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:e,value:this.value}))}onOptionClickMultiple(e,i){let r=this.isSelected(i),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=e.metaKey||e.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:e,value:this.value}))}onOptionClickCheckbox(e,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:e,value:this.value}))}removeOption(e){this.value=this.value.filter(i=>!Lt.equals(i,this.getOptionValue(e),this.dataKey))}isSelected(e){let i=!1,r=this.getOptionValue(e);if(this.multiple){if(this.value)for(let o of this.value)if(Lt.equals(o,r,this.dataKey)){i=!0;break}}else i=Lt.equals(this.value,r,this.dataKey);return i}get allChecked(){let e=this.optionsToRender;if(!e||0===e.length)return!1;{let i=0,r=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of e)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(Vc.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Vc.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(){return!this.optionsToRender||this.optionsToRender&&0===this.optionsToRender.length}onFilter(e){this._filterValue=e.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=(this.filterBy||this.optionLabel||"label").split(","),i=[];for(let r of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(r),e,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&i.push({...r,[this.optionGroupChildren]:o})}this._filteredOptions=i}else this._filteredOptions=this._options.filter(e=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(e),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 e=this.optionsToRender;if(!e||0===e.length)return!0;for(let i of e)if(!this.isOptionDisabled(i))return!1;return!0}toggleAll(e){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),e.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(e,i){if(this.readonly)return;let r=e.currentTarget;switch(e.which){case 40:var o=this.findNextItem(r);o&&o.focus(),e.preventDefault();break;case 38:var s=this.findPrevItem(r);s&&s.focus(),e.preventDefault();break;case 13:this.onOptionClick(e,i),e.preventDefault()}}findNextItem(e){let i=e.nextElementSibling;return i?Z.hasClass(i,"p-disabled")||Z.isHidden(i)||Z.hasClass(i,"p-listbox-item-group")?this.findNextItem(i):i:null}findPrevItem(e){let i=e.previousElementSibling;return i?Z.hasClass(i,"p-disabled")||Z.isHidden(i)||Z.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(e){return new(e||n)(O(Tt),O(Un),O(RL),O(zc))},n.\u0275cmp=Me({type:n,selectors:[["p-listbox"]],contentQueries:function(e,i,r){if(1&e&&(Jn(r,hM,5),Jn(r,fM,5),Jn(r,qi,4)),2&e){let o;Ke(o=Qe())&&(i.headerFacet=o.first),Ke(o=Qe())&&(i.footerFacet=o.first),Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(rZ,5),en(oZ,5)),2&e){let r;Ke(r=Qe())&&(i.headerCheckboxViewChild=r.first),Ke(r=Qe())&&(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:[Pt([UZ])],ngContentSelectors:BZ,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(e,i){1&e&&(go(zZ),I(0,"div",0),M(1,aZ,3,1,"div",1),M(2,mZ,5,3,"div",1),I(3,"div",0)(4,"ul",2),M(5,bZ,2,1,"ng-container",3),M(6,CZ,2,4,"ng-container",3),M(7,OZ,1,1,"ng-template",null,4,Bn),M(9,NZ,3,3,"li",5),M(10,RZ,3,3,"li",5),A()(),M(11,jZ,3,1,"div",6),A()),2&e&&(pn(i.styleClass),v("ngClass",Mt(16,VZ,i.disabled))("ngStyle",i.style),C(1),v("ngIf",i.headerFacet||i.headerTemplate),C(1),v("ngIf",i.checkbox&&i.multiple&&i.showToggleAll||i.filter),C(1),pn(i.listStyleClass),v("ngClass","p-listbox-list-wrapper")("ngStyle",i.listStyle),C(1),Ot("aria-multiselectable",i.multiple),C(1),v("ngIf",i.group),C(1),v("ngIf",!i.group),C(3),v("ngIf",i.hasFilter()&&i.isEmpty()),C(1),v("ngIf",!i.hasFilter()&&i.isEmpty()),C(1),v("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[fi,Gr,Kt,_o,sr,Bc],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})(),mM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,zo,Pa,zo]}),n})();function HZ(n,t){1&n&&_t(0)}const $Z=function(n,t,e,i){return{"p-button-icon":!0,"p-button-icon-left":n,"p-button-icon-right":t,"p-button-icon-top":e,"p-button-icon-bottom":i}};function WZ(n,t){if(1&n&&_e(0,"span",4),2&n){const e=D();pn(e.loading?"p-button-loading-icon "+e.loadingIcon:e.icon),v("ngClass",Fd(4,$Z,"left"===e.iconPos&&e.label,"right"===e.iconPos&&e.label,"top"===e.iconPos&&e.label,"bottom"===e.iconPos&&e.label)),Ot("aria-hidden",!0)}}function GZ(n,t){if(1&n&&(I(0,"span",5),Ne(1),A()),2&n){const e=D();Ot("aria-hidden",e.icon&&!e.label),C(1),At(e.label)}}function YZ(n,t){if(1&n&&(I(0,"span",4),Ne(1),A()),2&n){const e=D();pn(e.badgeClass),v("ngClass",e.badgeStyleClass()),C(1),At(e.badge)}}const qZ=function(n,t,e,i,r){return{"p-button p-component":!0,"p-button-icon-only":n,"p-button-vertical":t,"p-disabled":e,"p-button-loading":i,"p-button-loading-label-only":r}},KZ=["*"],Uc={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 Vo=(()=>{class n{constructor(e){this.el=e,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1,this._internalClasses=Object.values(Uc)}get label(){return this._label}set label(e){this._label=e,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get htmlElement(){return this.el.nativeElement}ngAfterViewInit(){Z.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){const e=[Uc.button,Uc.component];return this.icon&&!this.label&&Lt.isEmpty(this.htmlElement.textContent)&&e.push(Uc.iconOnly),this.loading&&(e.push(Uc.disabled,Uc.loading),!this.icon&&this.label&&e.push(Uc.labelOnly)),e}setStyleClass(){const e=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...e)}createLabel(){if(this.label){let e=document.createElement("span");this.icon&&!this.label&&e.setAttribute("aria-hidden","true"),e.className="p-button-label",e.appendChild(document.createTextNode(this.label)),this.htmlElement.appendChild(e)}}createIcon(){if(this.icon||this.loading){let e=document.createElement("span");e.className="p-button-icon",e.setAttribute("aria-hidden","true");let i=this.label?"p-button-icon-"+this.iconPos:null;i&&Z.addClass(e,i);let r=this.getIconClass();r&&Z.addMultipleClasses(e,r),this.htmlElement.insertBefore(e,this.htmlElement.firstChild)}}updateLabel(){let e=Z.findSingle(this.htmlElement,".p-button-label");this.label?e?e.textContent=this.label:this.createLabel():e&&this.htmlElement.removeChild(e)}updateIcon(){let e=Z.findSingle(this.htmlElement,".p-button-icon");this.icon||this.loading?e?e.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIcon():e&&this.htmlElement.removeChild(e)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}ngOnDestroy(){this.initialized=!1}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275dir=we({type:n,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),n})(),BL=(()=>{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(e=>{e.getType(),this.contentTemplate=e.template})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&1===String(this.badge).length}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["p-button"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(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:KZ,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(e,i){1&e&&(go(),I(0,"button",0),ue("click",function(o){return i.onClick.emit(o)})("focus",function(o){return i.onFocus.emit(o)})("blur",function(o){return i.onBlur.emit(o)}),Ri(1),M(2,HZ,1,0,"ng-container",1),M(3,WZ,1,9,"span",2),M(4,GZ,2,2,"span",3),M(5,YZ,2,4,"span",2),A()),2&e&&(pn(i.styleClass),v("ngStyle",i.style)("disabled",i.disabled||i.loading)("ngClass",function bk(n,t,e,i,r,o,s,a){const l=br()+n,c=oe(),u=ko(c,l,e,i,r,o);return or(c,l+4,s)||u?As(c,l+5,a?t.call(a,e,i,r,o,s):t(e,i,r,o,s)):Qf(c,l+5)}(11,qZ,i.icon&&!i.label,("top"===i.iconPos||"bottom"===i.iconPos)&&i.label,i.disabled||i.loading,i.loading,i.loading&&!i.icon&&i.label)),Ot("type",i.type)("aria-label",i.ariaLabel),C(2),v("ngTemplateOutlet",i.contentTemplate),C(1),v("ngIf",!i.contentTemplate&&(i.icon||i.loading)),C(1),v("ngIf",!i.contentTemplate&&i.label),C(1),v("ngIf",!i.contentTemplate&&i.badge))},dependencies:[fi,Kt,_o,sr,Bc],encapsulation:2,changeDetection:0}),n})(),Bo=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,Pa]}),n})();function qr(n){return n instanceof Tt?n.nativeElement:n}function Mv(n,t,e,i){return k(e)&&(i=e,e=void 0),i?Mv(n,t,e).pipe(fe(r=>R(r)?i(...r):i(r))):new Se(r=>{HL(n,t,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function HL(n,t,e,i,r){let o;if(function eJ(n){return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener}(n)){const s=n;n.addEventListener(t,e,r),o=()=>s.removeEventListener(t,e,r)}else if(function XZ(n){return n&&"function"==typeof n.on&&"function"==typeof n.off}(n)){const s=n;n.on(t,e),o=()=>s.off(t,e)}else if(function JZ(n){return n&&"function"==typeof n.addListener&&"function"==typeof n.removeListener}(n)){const s=n;n.addListener(t,e),o=()=>s.removeListener(t,e)}else{if(!n||!n.length)throw new TypeError("Invalid event target");for(let s=0,a=n.length;s0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}});let iJ=1;const rJ=Promise.resolve(),Sv={};function WL(n){return n in Sv&&(delete Sv[n],!0)}const GL={setImmediate(n){const t=iJ++;return Sv[t]=!0,rJ.then(()=>WL(t)&&n()),t},clearImmediate(n){WL(n)}},gM=new class sJ extends ms{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++r0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=GL.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(GL.clearImmediate(e),t.scheduled=void 0)}}),Xd=new ms(B_);class lJ{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new cJ(t,this.durationSelector))}}class cJ extends es{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let e;try{const{durationSelector:r}=this;e=r(t)}catch(r){return this.destination.error(r)}const i=oc(e,new Hn(this));!i||i.closed?this.clearThrottle():this.add(this.throttled=i)}}clearThrottle(){const{value:t,hasValue:e,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}function yM(n){return!R(n)&&n-parseFloat(n)+1>=0}function YL(n=0,t,e){let i=-1;return yM(t)?i=Number(t)<1?1:Number(t):Ti(t)&&(e=t),Ti(e)||(e=Xd),new Se(r=>{const o=yM(n)?n:+n-e.now();return e.schedule(uJ,o,{index:0,period:i,subscriber:r})})}function uJ(n){const{index:t,period:e,subscriber:i}=n;if(i.next(t),!i.closed){if(-1===e)return i.complete();n.index=t+1,this.schedule(n,e)}}let _M;try{_M=typeof Intl<"u"&&Intl.v8BreakIterator}catch{_M=!1}let Sp,vM,KL=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?function tG(n){return n===ZN}(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&&!_M)&&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(e){return new(e||n)(F(m_))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Ep(n){return function dJ(){if(null==Sp&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Sp=!0}))}finally{Sp=Sp||!1}return Sp}()?n:!!n.capture}function ZL(n){if(function hJ(){if(null==vM){const n=typeof document<"u"?document.head:null;vM=!(!n||!n.createShadowRoot&&!n.attachShadow)}return vM}()){const t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function xv(n){return n.composedPath?n.composedPath()[0]:n.target}let gJ=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new ae,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.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 e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){const e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect();return{top:-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(function qL(n,t=Xd){return function aJ(n){return function(e){return e.lift(new lJ(n))}}(()=>YL(n,t))}(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(F(KL),F(qt),F(Ln,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),yJ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({}),n})();function vl(){}function hn(n,t,e){return function(r){return r.lift(new FJ(n,t,e))}}class FJ{constructor(t,e,i){this.nextOrObserver=t,this.error=e,this.complete=i}call(t,e){return e.subscribe(new jJ(t,this.nextOrObserver,this.error,this.complete))}}class jJ extends ne{constructor(t,e,i,r){super(t),this._tapNext=vl,this._tapError=vl,this._tapComplete=vl,this._tapError=i||vl,this._tapComplete=r||vl,k(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||vl,this._tapError=e.error||vl,this._tapComplete=e.complete||vl)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}function th(n,t=Xd){return e=>e.lift(new zJ(n,t))}class zJ{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new VJ(t,this.dueTime,this.scheduler))}}class VJ extends ne{constructor(t,e,i){super(t),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(BJ,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function BJ(n){n.debouncedNext()}class $J{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new ae,this._typeaheadSubscription=se.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new ae,this.change=new ae,t instanceof sp&&(this._itemChangesSubscription=t.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(hn(e=>this._pressedLetters.push(e)),th(t),Tn(()=>this._pressedLetters.length>0),fe(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){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[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.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(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof sp?this._items.toArray():this._items}}class eR extends $J{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}function eX(n){const{subscriber:t,counter:e,period:i}=n;t.next(e),this.schedule({subscriber:t,counter:e+1,period:i},i)}function mn(n){return t=>t.lift(new tX(n))}class tX{constructor(t){this.notifier=t}call(t,e){const i=new nX(t),r=oc(this.notifier,new Hn(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class nX extends es{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function bM(...n){return function iX(){return Ja(1)}()(Le(...n))}const nR=(()=>{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 Et(n){return t=>0===n?U_():t.lift(new rX(n))}class rX{constructor(t){if(this.total=t,this.total<0)throw new nR}call(t,e){return e.subscribe(new oX(t,this.total))}}class oX extends ne{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))}}function wM(n,t,e){for(let i in t)if(t.hasOwnProperty(i)){const r=t[i];r?n.setProperty(i,r,e?.has(i)?"important":""):n.removeProperty(i)}return n}function nh(n,t){const e=t?"":"none";wM(n.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function rR(n,t,e){wM(n.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function Ov(n,t){return t&&"none"!=t?n+" "+t:n}function oR(n){const t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function CM(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function DM(n){const t=n.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function TM(n,t,e){const{top:i,bottom:r,left:o,right:s}=n;return e>=i&&e<=r&&t>=o&&t<=s}function xp(n,t,e){n.top+=t,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function sR(n,t,e,i){const{top:r,right:o,bottom:s,left:a,width:l,height:c}=n,u=l*t,d=c*t;return i>r-d&&ia-u&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:DM(e)})})}handleScroll(t){const e=xv(t),i=this.positions.get(e);if(!i)return null;const r=i.scrollPosition;let o,s;if(e===this._document){const c=this.getViewportScrollPosition();o=c.top,s=c.left}else o=e.scrollTop,s=e.scrollLeft;const a=r.top-o,l=r.left-s;return this.positions.forEach((c,u)=>{c.clientRect&&e!==u&&e.contains(u)&&xp(c.clientRect,a,l)}),r.top=o,r.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function lR(n){const t=n.cloneNode(!0),e=t.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();t.removeAttribute("id");for(let r=0;rnh(i,e)))}constructor(t,e,i,r,o,s){this._config=e,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=se.EMPTY,this._pointerUpSubscription=se.EMPTY,this._scrollSubscription=se.EMPTY,this._resizeSubscription=se.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(t).withParent(e.parentDragRef||null),this._parentPositions=new aR(i),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>qr(i)),this._handles.forEach(i=>nh(i,this.disabled)),this._toggleNativeDragInteractions();const e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=qr(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,Av),e.addEventListener("touchstart",this._pointerDown,hR),e.addEventListener("dragstart",this._nativeDragStart,Av)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?qr(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,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(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),nh(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),nh(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_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(t){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:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){Ip(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){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(),rR(i,!1,MM),this._document.body.appendChild(r.replaceChild(o,i)),this._getPreviewInsertionPoint(r,a).appendChild(this._preview),this.started.next({source:this,event:t}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();const i=this.isDragging(),r=Ip(e),o=!r&&0!==e.button,s=this._rootElement,a=xv(e),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),c=r?function ZJ(n){const t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}(e):function QJ(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}(e);if(a&&a.draggable&&"mousedown"===e.type&&e.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=DM(this._boundaryElement));const u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,t,e);const d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){rR(this._rootElement,!0,MM),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 e=this._dropContainer,i=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),o=this._getDragDistance(r),s=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,s,o,r,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(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,t,e,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,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let r;if(i&&t){const o=t.matchSize?this._initialClientRect:null,s=t.viewContainer.createEmbeddedView(i,t.context);s.detectChanges(),r=pR(s,this._document),this._previewRef=s,t.matchSize?mR(r,o):r.style.transform=kv(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=lR(this._rootElement),mR(r,this._initialClientRect),this._initialTransform&&(r.style.transform=this._initialTransform);return wM(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},MM),nh(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>r.classList.add(o)):r.classList.add(e)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);const e=function uX(n){const t=getComputedStyle(n),e=CM(t,"transition-property"),i=e.find(a=>"transform"===a||"all"===a);if(!i)return 0;const r=e.indexOf(i),o=CM(t,"transition-duration"),s=CM(t,"transition-delay");return oR(o[r])+oR(s[r])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{const r=s=>{(!s||xv(s)===this._preview&&"transform"===s.propertyName)&&(this._preview?.removeEventListener("transitionend",r),i(),clearTimeout(o))},o=setTimeout(r,1.5*e);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=pR(this._placeholderRef,this._document)):i=lR(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e,i){const r=e===this._rootElement?null:e,o=r?r.getBoundingClientRect():t,s=Ip(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition();return{x:o.left-t.left+(s.pageX-o.left-a.left),y:o.top-t.top+(s.pageY-o.top-a.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=Ip(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=i.pageX-e.left,o=i.pageY-e.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(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:r}=this.constrainPosition?this.constrainPosition(t,this,this._initialClientRect,this._pickupPositionInElement):t;if("x"===this.lockAxis||"x"===e?r=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===e)&&(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=fR(i,a.left+o,a.right-(l-o)),r=fR(r,u,d)}return{x:i,y:r}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-o.x),a=Math.abs(i-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>o.y?1:-1,o.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,nh(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,Av),t.removeEventListener("touchstart",this._pointerDown,hR),t.removeEventListener("dragstart",this._nativeDragStart,Av)}_applyRootElementTransform(t,e){const i=kv(t,e),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=Ov(i,this._initialTransform)}_applyPreviewTransform(t,e){const i=this._previewTemplate?.template?void 0:this._initialTransform,r=kv(t,e);this._preview.style.transform=Ov(r,i)}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||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&&(t+=o),s>0&&(t-=s)):t=0,r.height>i.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:Ip(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=xv(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&xp(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.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=ZL(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){const i=this._previewContainer||"global";if("parent"===i)return t;if("global"===i){const r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return qr(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}}function kv(n,t){return`translate3d(${Math.round(n)}px, ${Math.round(t)}px, 0)`}function fR(n,t,e){return Math.max(t,Math.min(e,n))}function Ip(n){return"t"===n.type[0]}function pR(n,t){const e=n.rootNodes;if(1===e.length&&e[0].nodeType===t.ELEMENT_NODE)return e[0];const i=t.createElement("div");return e.forEach(r=>i.appendChild(r)),i}function mR(n,t){n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n.style.transform=kv(t.left,t.top)}function Op(n,t){return Math.max(0,Math.min(t,n))}class mX{constructor(t,e){this._element=t,this._dragDropRegistry=e,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(t){this.withItems(t)}sort(t,e,i,r){const o=this._itemPositions,s=this._getItemIndexFromPointerPosition(t,e,i,r);if(-1===s&&o.length>0)return null;const a="horizontal"===this.orientation,l=o.findIndex(g=>g.drag===t),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 pX(n,t,e){const i=Op(t,n.length-1),r=Op(e,n.length-1);if(i===r)return;const o=n[i],s=r{if(m[y]===g)return;const b=g.drag===t,w=b?f:p,_=b?t.getPlaceholderElement():g.drag.getRootElement();g.offset+=w,a?(_.style.transform=Ov(`translate3d(${Math.round(g.offset)}px, 0, 0)`,g.initialTransform),xp(g.clientRect,0,w)):(_.style.transform=Ov(`translate3d(0, ${Math.round(g.offset)}px, 0)`,g.initialTransform),xp(g.clientRect,w,0))}),this._previousSwap.overlaps=TM(d,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:s}}enter(t,e,i,r){const o=null==r||r<0?this._getItemIndexFromPointerPosition(t,e,i):r,s=this._activeDraggables,a=s.indexOf(t),l=t.getPlaceholderElement();let c=s[o];if(c===t&&(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,t)}else qr(this._element).appendChild(l),s.push(t);l.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables.forEach(t=>{const e=t.getRootElement();if(e){const i=this._itemPositions.find(r=>r.drag===t)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{xp(i,t,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}_cacheItemPositions(){const t="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(e=>{const i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:DM(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(t,e,i){const r="horizontal"===this.orientation;let o=r?e.left-t.left:e.top-t.top;return-1===i&&(o+=r?e.width-t.width:e.height-t.height),o}_getSiblingOffsetPx(t,e,i){const r="horizontal"===this.orientation,o=e[t].clientRect,s=e[t+-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(t,e){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?t>=s.right:e>=s.bottom}{const s=i[0].clientRect;return r?t<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(t,e,i,r){const o="horizontal"===this.orientation,s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>a!==t&&((!r||a!==this._previousSwap.drag||!this._previousSwap.overlaps||(o?r.x:r.y)!==this._previousSwap.delta)&&(o?e>=Math.floor(l.left)&&e=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=se.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new ae,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function XJ(n=0,t=Xd){return(!yM(n)||n<0)&&(n=0),(!t||"function"!=typeof t.schedule)&&(t=Xd),new Se(e=>(e.add(t.schedule(eX,n,{subscriber:e,counter:0,period:n})),e))}(0,$L).pipe(mn(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=qr(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new aR(i),this._sortStrategy=new mX(this.element,e),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(t,e,i,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,r,o,s,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:l})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(r=>r.isDragging()).every(r=>-1===t.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._sortStrategy.direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._sortStrategy.orientation=t,this}withScrollableParents(t){const e=qr(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,r){if(this.sortingDisabled||!this._clientRect||!sR(this._clientRect,.05,e,i))return;const o=this._sortStrategy.sort(t,e,i,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,r=0,o=0;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||i||sR(s.clientRect,.05,t,e)&&([r,o]=function yX(n,t,e,i){const r=_R(t,i),o=vR(t,e);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,t,e),(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=_R(l,e),o=vR(l,t),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 t=qr(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const t=qr(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_reset(){this._isDragging=!1;const t=qr(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(t,e){return null!=this._clientRect&&TM(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(r=>r._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._clientRect||!TM(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const r=this._getShadowRoot().elementFromPoint(e,i);if(!r)return!1;const o=qr(this.element);return r===o||o.contains(r)}_startReceiving(t,e){const i=this._activeSiblings;!i.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=ZL(qr(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}}function _R(n,t){const{top:e,bottom:i,height:r}=n,o=.05*r;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}function vR(n,t){const{left:e,right:i,width:r}=n,o=.05*r;return t>=e-o&&t<=e+o?1:t>=i-o&&t<=i+o?2:0}const Nv=Ep({passive:!1,capture:!0});let _X=(()=>{class n{constructor(e,i){this._ngZone=e,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(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,Nv)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,Nv)}startDragging(e,i){if(!(this._activeDragInstances.indexOf(e)>-1)&&(this._activeDragInstances.push(e),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:Nv}),r||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:Nv}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(e){const i=this._activeDragInstances.indexOf(e);i>-1&&(this._activeDragInstances.splice(i,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(e){return this._activeDragInstances.indexOf(e)>-1}scrolled(e){const i=[this.scroll];return e&&e!==this._document&&i.push(new Se(r=>this._ngZone.runOutsideAngular(()=>{const s=a=>{this._activeDragInstances.length&&r.next(a)};return e.addEventListener("scroll",s,!0),()=>{e.removeEventListener("scroll",s,!0)}}))),ws(...i)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,i)=>{this._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()}}return n.\u0275fac=function(e){return new(e||n)(F(qt),F(Ln))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const vX={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let SM=(()=>{class n{constructor(e,i,r,o){this._document=e,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=o}createDrag(e,i=vX){return new fX(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new gX(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return n.\u0275fac=function(e){return new(e||n)(F(Ln),F(qt),F(gJ),F(_X))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),TR=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({providers:[SM],imports:[yJ]}),n})(),OM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,Bo,zo,Pa,TR,zo,TR]}),n})();const UX=["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 hT(document),MR=[...Array(6).keys()].map(n=>{const t=n+1;return{label:`Heading ${t}`,icon:zs(UX[n]||""),id:`heading${t}`,attributes:{level:t}}}),AM={label:"Paragraph",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"},SR=[{label:"List Ordered",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"}],nee=[{label:"AI Content",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjA4NDEgOC43MjQ5M0wxMi41MjIgOS41MDc0MkMxMi40NTU2IDkuNTI3NjggMTIuMzk3MiA5LjU2OTczIDEyLjM1NTcgOS42MjcyOEMxMi4zMTQyIDkuNjg0ODMgMTIuMjkxOCA5Ljc1NDc4IDEyLjI5MTggOS44MjY2NkMxMi4yOTE4IDkuODk4NTQgMTIuMzE0MiA5Ljk2ODQ5IDEyLjM1NTcgMTAuMDI2QzEyLjM5NzIgMTAuMDgzNiAxMi40NTU2IDEwLjEyNTYgMTIuNTIyIDEwLjE0NTlMMTUuMDg0MSAxMC45Mjg0TDE1LjgzODEgMTMuNTg3M0MxNS44NTc3IDEzLjY1NjIgMTUuODk4MiAxMy43MTY4IDE1Ljk1MzYgMTMuNzU5OEMxNi4wMDkxIDEzLjgwMjkgMTYuMDc2NSAxMy44MjYyIDE2LjE0NTcgMTMuODI2MkMxNi4yMTUgMTMuODI2MiAxNi4yODI0IDEzLjgwMjkgMTYuMzM3OCAxMy43NTk4QzE2LjM5MzMgMTMuNzE2OCAxNi40MzM4IDEzLjY1NjIgMTYuNDUzMyAxMy41ODczTDE3LjIwNzcgMTAuOTI4NEwxOS43Njk3IDEwLjE0NTlDMTkuODM2MiAxMC4xMjU2IDE5Ljg5NDYgMTAuMDgzNiAxOS45MzYxIDEwLjAyNkMxOS45Nzc2IDkuOTY4NDkgMjAgOS44OTg1NCAyMCA5LjgyNjY2QzIwIDkuNzU0NzggMTkuOTc3NiA5LjY4NDgzIDE5LjkzNjEgOS42MjcyOEMxOS44OTQ2IDkuNTY5NzMgMTkuODM2MiA5LjUyNzY4IDE5Ljc2OTcgOS41MDc0MkwxNy4yMDc3IDguNzI0OTNMMTYuNDUzMyA2LjA2NjA0QzE2LjQzMzggNS45OTcwNyAxNi4zOTMzIDUuOTM2NTIgMTYuMzM3OCA1Ljg5MzQ1QzE2LjI4MjQgNS44NTAzNyAxNi4yMTUgNS44MjcwOSAxNi4xNDU3IDUuODI3MDlDMTYuMDc2NSA1LjgyNzA5IDE2LjAwOTEgNS44NTAzNyAxNS45NTM2IDUuODkzNDVDMTUuODk4MiA1LjkzNjUyIDE1Ljg1NzYgNS45OTcwNyAxNS44MzgxIDYuMDY2MDRMMTUuMDg0MSA4LjcyNDkzWiIgZmlsbD0iIzhEOTJBNSIvPgo8cGF0aCBkPSJNMTguMjE4NSAzLjk1MjMzTDE5LjYwODQgMy41Mjc0M0MxOS42NzQ5IDMuNTA3MTYgMTkuNzMzMiAzLjQ2NTExIDE5Ljc3NDcgMy40MDc1N0MxOS44MTYyIDMuMzUwMDIgMTkuODM4NiAzLjI4MDA4IDE5LjgzODYgMy4yMDgyQzE5LjgzODYgMy4xMzYzMyAxOS44MTYyIDMuMDY2MzggMTkuNzc0NyAzLjAwODg0QzE5LjczMzIgMi45NTEyOSAxOS42NzQ5IDIuOTA5MjQgMTkuNjA4NCAyLjg4ODk4TDE4LjIxODUgMi40NjQ0MUwxNy44MDkxIDEuMDIxNjdDMTcuNzg5NiAwLjk1MjY5OCAxNy43NDkxIDAuODkyMTQ0IDE3LjY5MzYgMC44NDkwNjlDMTcuNjM4MiAwLjgwNTk5NSAxNy41NzA3IDAuNzgyNzE1IDE3LjUwMTUgMC43ODI3MTVDMTcuNDMyMiAwLjc4MjcxNSAxNy4zNjQ4IDAuODA1OTk1IDE3LjMwOTQgMC44NDkwNjlDMTcuMjUzOSAwLjg5MjE0NCAxNy4yMTM0IDAuOTUyNjk4IDE3LjE5MzkgMS4wMjE2N0wxNi43ODQ4IDIuNDY0NDFMMTUuMzk0NiAyLjg4ODk4QzE1LjMyODEgMi45MDkyMyAxNS4yNjk4IDIuOTUxMjggMTUuMjI4MyAzLjAwODgzQzE1LjE4NjcgMy4wNjYzNyAxNS4xNjQzIDMuMTM2MzIgMTUuMTY0MyAzLjIwODJDMTUuMTY0MyAzLjI4MDA4IDE1LjE4NjcgMy4zNTAwMyAxNS4yMjgzIDMuNDA3NThDMTUuMjY5OCAzLjQ2NTEyIDE1LjMyODEgMy41MDcxNyAxNS4zOTQ2IDMuNTI3NDNMMTYuNzg0OCAzLjk1MjMzTDE3LjE5MzkgNS4zOTQ3NEMxNy4yMTM0IDUuNDYzNzEgMTcuMjUzOSA1LjUyNDI2IDE3LjMwOTQgNS41NjczM0MxNy4zNjQ4IDUuNjEwNDEgMTcuNDMyMiA1LjYzMzY5IDE3LjUwMTUgNS42MzM2OUMxNy41NzA3IDUuNjMzNjkgMTcuNjM4MiA1LjYxMDQxIDE3LjY5MzYgNS41NjczM0MxNy43NDkxIDUuNTI0MjYgMTcuNzg5NiA1LjQ2MzcxIDE3LjgwOTEgNS4zOTQ3NEwxOC4yMTg1IDMuOTUyMzNaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xMS4xNjcyIDQuNTU2MzVMOS43NjQ3OCA1LjE0OTk2QzkuNzA1NzggNS4xNzQ5NCA5LjY1NTI5IDUuMjE3NiA5LjYxOTc0IDUuMjcyNDlDOS41ODQyIDUuMzI3MzcgOS41NjUyMiA1LjM5MjAxIDkuNTY1MjIgNS40NTgxNEM5LjU2NTIyIDUuNTI0MjYgOS41ODQyIDUuNTg4OSA5LjYxOTc0IDUuNjQzNzhDOS42NTUyOSA1LjY5ODY3IDkuNzA1NzggNS43NDEzMyA5Ljc2NDc4IDUuNzY2MzFMMTEuMTY3MiA2LjM1OTkyTDExLjczOTIgNy44MTUzNEMxMS43NjMzIDcuODc2NTcgMTEuODA0NCA3LjkyODk3IDExLjg1NzMgNy45NjU4NUMxMS45MTAyIDguMDAyNzQgMTEuOTcyNCA4LjAyMjQzIDEyLjAzNjIgOC4wMjI0M0MxMi4wOTk5IDguMDIyNDMgMTIuMTYyMiA4LjAwMjc0IDEyLjIxNSA3Ljk2NTg1QzEyLjI2NzkgNy45Mjg5NyAxMi4zMDkgNy44NzY1NyAxMi4zMzMxIDcuODE1MzRMMTIuOTA1MSA2LjM1OTkyTDE0LjMwNzIgNS43NjYzMUMxNC4zNjYyIDUuNzQxMzIgMTQuNDE2NyA1LjY5ODY3IDE0LjQ1MjMgNS42NDM3OEMxNC40ODc4IDUuNTg4ODkgMTQuNTA2OCA1LjUyNDI2IDE0LjUwNjggNS40NTgxNEMxNC41MDY4IDUuMzkyMDEgMTQuNDg3OCA1LjMyNzM4IDE0LjQ1MjMgNS4yNzI0OUMxNC40MTY3IDUuMjE3NiAxNC4zNjYyIDUuMTc0OTUgMTQuMzA3MiA1LjE0OTk2TDEyLjkwNTEgNC41NTYzNUwxMi4zMzMxIDMuMTAxMjZDMTIuMzA5IDMuMDQwMDMgMTIuMjY3OSAyLjk4NzY0IDEyLjIxNSAyLjk1MDc1QzEyLjE2MjIgMi45MTM4NyAxMi4wOTk5IDIuODk0MTcgMTIuMDM2MiAyLjg5NDE3QzExLjk3MjQgMi44OTQxNyAxMS45MTAyIDIuOTEzODcgMTEuODU3MyAyLjk1MDc1QzExLjgwNDQgMi45ODc2NCAxMS43NjMzIDMuMDQwMDMgMTEuNzM5MiAzLjEwMTI2TDExLjE2NzIgNC41NTYzNVoiIGZpbGw9IiM4RDkyQTUiLz4KPHJlY3QgeT0iNC4yNjEyMyIgd2lkdGg9IjguNjk1NjUiIGhlaWdodD0iMS41NjUyMiIgcng9IjAuNzgyNjA5IiBmaWxsPSIjOEQ5MkE1Ii8+CjxyZWN0IHk9IjguOTU3MDMiIHdpZHRoPSIxMS4zMDQzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8cmVjdCB5PSIxMy42NTIzIiB3aWR0aD0iMTMuOTEzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8L3N2Zz4K"),id:"aiContentPrompt"},{label:"AI Image",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjUxNDI5IDUuNUMxLjg0NzQ2IDUuNSAxLjIwNzk0IDUuNzYxNjkgMC43MzY0MTcgNi4yMjc1MUMwLjI2NDg5NyA2LjY5MzMyIDAgNy4zMjUxMSAwIDcuOTgzODdWMTcuMDE2MUMwIDE3LjY3NDkgMC4yNjQ4OTcgMTguMzA2NyAwLjczNjQxNyAxOC43NzI1QzEuMjA3OTQgMTkuMjM4MyAxLjg0NzQ2IDE5LjUgMi41MTQyOSAxOS41SDEzLjQ4NTdDMTQuMTUyNSAxOS41IDE0Ljc5MjEgMTkuMjM4MyAxNS4yNjM2IDE4Ljc3MjVDMTUuNzM1MSAxOC4zMDY3IDE2IDE3LjY3NDkgMTYgMTcuMDE2MVYxN0wxNiAxNi43TDE0LjYyODYgMTUuMzgxM0wxMi4xNDE3IDEyLjkyNDVDMTIuMDc2NyAxMi44NTU5IDExLjk5NyAxMi44MDI0IDExLjkwODQgMTIuNzY4QzExLjgxOTkgMTIuNzMzNyAxMS43MjQ2IDEyLjcxOTIgMTEuNjI5NyAxMi43MjU4QzExLjUzMzcgMTIuNzMxMyAxMS40Mzk3IDEyLjc1NTcgMTEuMzUzNCAxMi43OTc2QzExLjI2NyAxMi44Mzk1IDExLjE5IDEyLjg5OCAxMS4xMjY5IDEyLjk2OTdMOS45NDc0MyAxNC4zNjk3TDUuNzQxNzEgMTAuMjE0OEM1LjY3OTc0IDEwLjE0OTggNS42MDQ1MSAxMC4wOTg0IDUuNTIwOTkgMTAuMDY0MkM1LjQzNzQ2IDEwLjAyOTkgNS4zNDc1NCAxMC4wMTM1IDUuMjU3MTQgMTAuMDE2MUM1LjE2MTExIDEwLjAyMTYgNS4wNjcxNiAxMC4wNDYxIDQuOTgwODEgMTAuMDg3OUM0Ljg5NDQ2IDEwLjEyOTggNC44MTc0NCAxMC4xODgzIDQuNzU0MjkgMTAuMjZMMS4zNzE0MyAxNC4yNDMyVjcuOTgzODdDMS4zNzE0MyA3LjY4NDQzIDEuNDkxODQgNy4zOTcyNiAxLjcwNjE2IDcuMTg1NTJDMS45MjA0OSA2Ljk3Mzc5IDIuMjExMTggNi44NTQ4NCAyLjUxNDI5IDYuODU0ODRINy4xMDk2OVY2LjE3NzQyVjUuNUgyLjUxNDI5Wk0xLjM3MTQgMTcuMDE2VjE2LjM1NjdMNS4zMDI4MyAxMS42OTZMOS4wNjk2OCAxNS40MTczTDYuNzY1NjkgMTguMTI3SDIuNTE0MjZDMi4yMTQyOSAxOC4xMjcxIDEuOTI2MzQgMTguMDEwNiAxLjcxMjUzIDE3LjgwMjdDMS40OTg3MiAxNy41OTQ5IDEuMzc2MiAxNy4zMTIzIDEuMzcxNCAxNy4wMTZaTTguNTQ4NTQgMTguMTQ1MUwxMS43MDI4IDE0LjQwNTdMMTQuNTgyOCAxNy4yNTA5QzE0LjUzMjMgMTcuNTAyIDE0LjM5NTQgMTcuNzI4MiAxNC4xOTU1IDE3Ljg5MTFDMTMuOTk1NiAxOC4wNTQgMTMuNzQ0OSAxOC4xNDM4IDEzLjQ4NTcgMTguMTQ1MUgxMS4wMTcxSDguNTQ4NTRaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xNC4zNDY3IDkuNjMzNTVMMTEuNDAwMyAxMC41MzM0QzExLjMyMzkgMTAuNTU2NyAxMS4yNTY4IDEwLjYwNTEgMTEuMjA5MSAxMC42NzEyQzExLjE2MTMgMTAuNzM3NCAxMS4xMzU1IDEwLjgxNzkgMTEuMTM1NSAxMC45MDA1QzExLjEzNTUgMTAuOTgzMiAxMS4xNjEzIDExLjA2MzYgMTEuMjA5MSAxMS4xMjk4QzExLjI1NjggMTEuMTk2IDExLjMyMzkgMTEuMjQ0NCAxMS40MDAzIDExLjI2NzdMMTQuMzQ2NyAxMi4xNjc1TDE1LjIxMzggMTUuMjI1M0MxNS4yMzYzIDE1LjMwNDYgMTUuMjgyOSAxNS4zNzQyIDE1LjM0NjcgMTUuNDIzN0MxNS40MTA0IDE1LjQ3MzIgMTUuNDg3OSAxNS41IDE1LjU2NzYgMTUuNUMxNS42NDcyIDE1LjUgMTUuNzI0NyAxNS40NzMyIDE1Ljc4ODUgMTUuNDIzN0MxNS44NTIzIDE1LjM3NDIgMTUuODk4OSAxNS4zMDQ2IDE1LjkyMTMgMTUuMjI1M0wxNi43ODg4IDEyLjE2NzVMMTkuNzM1MiAxMS4yNjc3QzE5LjgxMTYgMTEuMjQ0NCAxOS44Nzg3IDExLjE5NiAxOS45MjY1IDExLjEyOThDMTkuODc4NyAxMC42MDUxIDE5LjgxMTYgMTAuNTU2NyAxOS43MzUyIDEwLjUzMzRMMTYuNzg4OCA5LjYzMzU1TDE1LjkyMTMgNi41NzU4M0MxNS44OTg5IDYuNDk2NTEgMTUuODUyMyA2LjQyNjg4IDE1Ljc4ODUgNi4zNzczNEMxNS43MjQ4IDYuMzI3ODEgMTUuNjQ3MiA2LjMwMTA0IDE1LjU2NzYgNi4zMDEwNEMxNS40ODc5IDYuMzAxMDQgMTUuNDEwNCA2LjMyNzgxIDE1LjM0NjcgNi4zNzczNEMxNS4yODI5IDYuNDI2ODggMTUuMjM2MyA2LjQ5NjUxIDE1LjIxMzggNi41NzU4M0wxNC4zNDY3IDkuNjMzNTVaIiBmaWxsPSIjOEQ5MkE1Ii8+Cjwvc3ZnPg=="),id:"aiImagePrompt"},{label:"Blockquote",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalRule"}];function zs(n){return JX.bypassSecurityTrustUrl(n)}const Pv=[{label:"Image",icon:"image",id:"image"},{label:"Video",icon:"movie",id:"video"},...MR,{label:"Table",icon:"table_view",id:"table"},...SR,...nee,AM],iee=[...MR,AM,...SR],ree=[{name:"flip",options:{fallbackPlacements:["top"]}},{name:"preventOverflow",options:{altAxis:!1,tether:!1}}],see={horizontalRule:!0,table:!0,image:!0,video:!0},aee=[...Pv.filter(n=>!see[n.id])],ER=function({type:n,editor:t,range:e,suggestionKey:i,ItemsType:r}){const o={to:e.to+i.getState(t.view.state).query?.length,from:n===r.BLOCK?e.from:e.from+1};t.chain().deleteRange(o).run()},xR={duration:[250,0],interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}};function Ie(...n){const t=n.length;if(0===t)throw new Error("list of properties cannot be empty.");return e=>fe(function lee(n,t){return i=>{let r=i;for(let o=0;oe?r[e]:null}return i}camelize(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,i)=>0===i?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,"")}titleCase(t){return`${t.charAt(0).toLocaleUpperCase()}${t.slice(1)}`}}$c.\u0275fac=function(t){return new(t||$c)},$c.\u0275prov=H({token:$c,factory:$c.\u0275fac});class uee{getQueryParams(){const t=window.location.search.substring(1).split("&"),e=new Map;return t.forEach(i=>{const r=i.split("=");e.set(r[0],r[1])}),e}getQueryStringParam(t){let e=null;const r=new RegExp("[?&]"+t.replace(/[\[\]]/g,"\\$&")+"(=([^&#]*)|&|#|$)").exec(window.location.href);return r&&r[2]&&(e=decodeURIComponent(r[2].replace(/\+/g," "))),e}}class Co{constructor(t){this.stringUtils=t,this.showLogs=!0,this.httpRequestUtils=new uee,this.showLogs=this.shouldShowLogs(),this.showLogs&&console.info("Setting the logger --\x3e Developer mode logger on")}info(t,...e){e&&e.length>0?console.info(this.wrapMessage(t),e):console.info(this.wrapMessage(t))}error(t,...e){e&&e.length>0?console.error(this.wrapMessage(t),e):console.error(this.wrapMessage(t))}warn(t,...e){e&&e.length>0?console.warn(this.wrapMessage(t),e):console.warn(this.wrapMessage(t))}debug(t,...e){e&&e.length>0?console.debug(this.wrapMessage(t),e):console.debug(this.wrapMessage(t))}shouldShowLogs(){this.httpRequestUtils.getQueryStringParam("devMode");return!0}wrapMessage(t){return this.showLogs?t:this.getCaller()+">> "+t}getCaller(){let t="unknown";try{throw new Error}catch(e){t=this.cleanCaller(this.stringUtils.getLine(e.stack,4))}return t}cleanCaller(t){return t?t.trim().substr(3):"unknown"}}Co.\u0275fac=function(t){return new(t||Co)(F($c))},Co.\u0275prov=H({token:Co,factory:Co.\u0275fac});class ih{constructor(t,e){this.loggerService=t,this.suppressAlerts=!1,this.locale=e;try{const i=window.location.search.substring(1);this.locale=this.checkQueryForUrl(i)}catch{this.loggerService.error("Could not set locale from URL.")}}checkQueryForUrl(t){let e=this.locale;if(t&&t.length){const i=t,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,e=i.substring(o+r.length,s)}}return e}}ih.\u0275fac=function(t){return new(t||ih)(F(Co),F(Ps))},ih.\u0275prov=H({token:ih,factory:ih.\u0275fac});class Vs{constructor(t,e){this.loggerService=e,this.siteId="48190c8c-42c4-46af-8d1a-0cd5db894797",this.hideFireOn=!1,this.hideRulePushOptions=!1,this.authUser=t;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=Vs.parseQueryParam(i,"realmId");r&&(this.siteId=r,this.loggerService.debug("Site Id set to ",this.siteId));const o=Vs.parseQueryParam(i,"hideFireOn");o&&(this.hideFireOn="true"===o||"1"===o,this.loggerService.debug("hideFireOn set to ",this.hideFireOn));const s=Vs.parseQueryParam(i,"hideRulePushOptions");s&&(this.hideRulePushOptions="true"===s||"1"===s,this.loggerService.debug("hideRulePushOptions set to ",this.hideRulePushOptions)),this.configureUser(i,t)}catch(i){this.loggerService.error("Could not set baseUrl automatically.",i)}}static parseQueryParam(t,e){let i=-1,r=null;if(e+="=",t&&t.length&&(i=t.indexOf(e)),i>=0){let o=t.indexOf("&",i);o=-1!==o?o:t.length,r=t.substring(i+e.length,o)}return r}configureUser(t,e){e.suppressAlerts="true"===Vs.parseQueryParam(t,"suppressAlerts")}}Vs.\u0275fac=function(t){return new(t||Vs)(F(ih),F(Co))},Vs.\u0275prov=H({token:Vs,factory:Vs.\u0275fac});class Ap{isIE11(){return"Netscape"===navigator.appName&&-1!==navigator.appVersion.indexOf("Trident")}}function Fi(n){return function(e){const i=new hee(n),r=e.lift(i);return i.caught=r}}Ap.\u0275fac=function(t){return new(t||Ap)},Ap.\u0275prov=H({token:Ap,factory:Ap.\u0275fac});class hee{constructor(t){this.selector=t}call(t,e){return e.subscribe(new fee(t,this.selector,this.caught))}}class fee extends es{constructor(t,e,i){super(t),this.selector=e,this.caught=i}error(t){if(!this.isStopped){let e;try{e=this.selector(t,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new Hn(this);this.add(i);const r=oc(e,i);r!==i&&this.add(r)}}}var Wc=(()=>(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"}(Wc||(Wc={})),Wc))();const gee_1="Could not connect to server.";class kM{constructor(t,e,i,r,o){this.code=t,this.message=e,this.request=i,this.response=r,this.source=o}}class NM{constructor(t){this.resp=t;try{this.bodyJsonObject=t.body,this.headers=t.headers}catch{this.bodyJsonObject=null}}header(t){return this.headers.get(t)}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 t="";return this.bodyJsonObject.errors?this.bodyJsonObject.errors.forEach(e=>{t+=e.message}):t=this.bodyJsonObject.messages.toString(),t}get status(){return this.resp.status}get response(){return this.resp}existError(t){return this.bodyJsonObject.errors&&this.bodyJsonObject.errors.filter(e=>e.errorCode===t).length>0}}class Kr extends ae{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new ve;return this._value}next(t){super.next(this._value=t)}}const Lv=(()=>{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 OR extends ne{notifyNext(t,e,i,r,o){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class _ee extends ne{constructor(t,e,i){super(),this.parent=t,this.outerValue=e,this.outerIndex=i,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function AR(n,t,e,i,r=new _ee(n,e,i)){if(!r.closed)return t instanceof Se?t.subscribe(r):Be(t)(r)}const kR={};function PM(...n){let t,e;return Ti(n[n.length-1])&&(e=n.pop()),"function"==typeof n[n.length-1]&&(t=n.pop()),1===n.length&&R(n[0])&&(n=n[0]),Xa(n,e).lift(new vee(t))}class vee{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new bee(t,this.resultSelector))}}class bee extends OR{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(kR),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;i{let e;try{e=n()}catch(r){return void t.error(r)}return(e?wt(e):U_()).subscribe(t)})}function rh(n=null){return t=>t.lift(new wee(n))}class wee{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new Cee(t,this.defaultValue))}}class Cee extends ne{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function PR(n=Mee){return t=>t.lift(new Dee(n))}class Dee{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new Tee(t,this.errorFactory))}}class Tee extends ne{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}}function Mee(){return new Lv}function bl(n,t){const e=arguments.length>=2;return i=>i.pipe(n?Tn((r,o)=>n(r,o,i)):z,Et(1),e?rh(t):PR(()=>new Lv))}function Rv(n,t){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new See(n,t,e))}}class See{constructor(t,e,i=!1){this.accumulator=t,this.seed=e,this.hasSeed=i}call(t,e){return e.subscribe(new Eee(t,this.accumulator,this.seed,this.hasSeed))}}class Eee extends ne{constructor(t,e,i,r){super(t),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let i;try{i=this.accumulator(this.seed,t,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function kp(n){return function(e){return 0===n?U_():e.lift(new xee(n))}}class xee{constructor(t){if(this.total=t,this.total<0)throw new nR}call(t,e){return e.subscribe(new Iee(t,this.total))}}class Iee extends ne{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,i=this.total,r=this.count++;e.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?Tn((r,o)=>n(r,o,i)):z,kp(1),e?rh(t):PR(()=>new Lv))}class Aee{constructor(t,e){this.predicate=t,this.inclusive=e}call(t,e){return e.subscribe(new kee(t,this.predicate,this.inclusive))}}class kee extends ne{constructor(t,e,i){super(t),this.predicate=e,this.inclusive=i,this.index=0}_next(t){const e=this.destination;let i;try{i=this.predicate(t,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(t,i)}nextOrComplete(t,e){const i=this.destination;Boolean(e)?i.next(t):(this.inclusive&&i.next(t),i.complete())}}class Pee{constructor(t){this.value=t}call(t,e){return e.subscribe(new Lee(t,this.value))}}class Lee extends ne{constructor(t,e){super(t),this.value=e}_next(t){this.destination.next(this.value)}}function LM(n){return t=>t.lift(new Ree(n))}class Ree{constructor(t){this.callback=t}call(t,e){return e.subscribe(new Fee(t,this.callback))}}class Fee extends ne{constructor(t,e){super(t),this.add(new se(e))}}const Nt="primary",Np=Symbol("RouteTitle");class jee{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function oh(n){return new jee(n)}function zee(n,t,e){const i=e.path.split("/");if(i.length>n.length||"full"===e.pathMatch&&(t.hasChildren()||i.lengthi[o]===r)}return n===t}function FR(n){return Array.prototype.concat.apply([],n)}function jR(n){return n.length>0?n[n.length-1]:null}function Ki(n,t){for(const e in n)n.hasOwnProperty(e)&&t(n[e],e)}function wl(n){return eD(n)?n:Zf(n)?wt(Promise.resolve(n)):Le(n)}const Fv=!1,Bee={exact:function BR(n,t,e){if(!Yc(n.segments,t.segments)||!jv(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(const i in t.children)if(!n.children[i]||!BR(n.children[i],t.children[i],e))return!1;return!0},subset:UR},zR={exact:function Uee(n,t){return Bs(n,t)},subset:function Hee(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>RR(n[e],t[e]))},ignored:()=>!0};function VR(n,t,e){return Bee[e.paths](n.root,t.root,e.matrixParams)&&zR[e.queryParams](n.queryParams,t.queryParams)&&!("exact"===e.fragment&&n.fragment!==t.fragment)}function UR(n,t,e){return HR(n,t,t.segments,e)}function HR(n,t,e,i){if(n.segments.length>e.length){const r=n.segments.slice(0,e.length);return!(!Yc(r,e)||t.hasChildren()||!jv(r,e,i))}if(n.segments.length===e.length){if(!Yc(n.segments,e)||!jv(n.segments,e,i))return!1;for(const r in t.children)if(!n.children[r]||!UR(n.children[r],t.children[r],i))return!1;return!0}{const r=e.slice(0,n.segments.length),o=e.slice(n.segments.length);return!!(Yc(n.segments,r)&&jv(n.segments,r,i)&&n.children[Nt])&&HR(n.children[Nt],t,o,i)}}function jv(n,t,e){return t.every((i,r)=>zR[e](n[r].parameters,i.parameters))}class Gc{constructor(t=new Rt([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=oh(this.queryParams)),this._queryParamMap}toString(){return Gee.serialize(this)}}class Rt{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Ki(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return zv(this)}}class Pp{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=oh(this.parameters)),this._parameterMap}toString(){return GR(this)}}function Yc(n,t){return n.length===t.length&&n.every((e,i)=>e.path===t[i].path)}let Lp=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return new RM},providedIn:"root"}),n})();class RM{parse(t){const e=new tte(t);return new Gc(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){const e=`/${Rp(t.root,!0)}`,i=function Kee(n){const t=Object.keys(n).map(e=>{const i=n[e];return Array.isArray(i)?i.map(r=>`${Vv(e)}=${Vv(r)}`).join("&"):`${Vv(e)}=${Vv(i)}`}).filter(e=>!!e);return t.length?`?${t.join("&")}`:""}(t.queryParams),r="string"==typeof t.fragment?`#${function Yee(n){return encodeURI(n)}(t.fragment)}`:"";return`${e}${i}${r}`}}const Gee=new RM;function zv(n){return n.segments.map(t=>GR(t)).join("/")}function Rp(n,t){if(!n.hasChildren())return zv(n);if(t){const e=n.children[Nt]?Rp(n.children[Nt],!1):"",i=[];return Ki(n.children,(r,o)=>{o!==Nt&&i.push(`${o}:${Rp(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function Wee(n,t){let e=[];return Ki(n.children,(i,r)=>{r===Nt&&(e=e.concat(t(i,r)))}),Ki(n.children,(i,r)=>{r!==Nt&&(e=e.concat(t(i,r)))}),e}(n,(i,r)=>r===Nt?[Rp(n.children[Nt],!1)]:[`${r}:${Rp(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[Nt]?`${zv(n)}/${e[0]}`:`${zv(n)}/(${e.join("//")})`}}function $R(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Vv(n){return $R(n).replace(/%3B/gi,";")}function FM(n){return $R(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Bv(n){return decodeURIComponent(n)}function WR(n){return Bv(n.replace(/\+/g,"%20"))}function GR(n){return`${FM(n.path)}${function qee(n){return Object.keys(n).map(t=>`;${FM(t)}=${FM(n[t])}`).join("")}(n.parameters)}`}const Qee=/^[^\/()?;=#]+/;function Uv(n){const t=n.match(Qee);return t?t[0]:""}const Zee=/^[^=?&#]+/,Xee=/^[^&#]+/;class tte{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Rt([],{}):new Rt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[Nt]=new Rt(t,e)),i}parseSegment(){const t=Uv(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Q(4009,Fv);return this.capture(t),new Pp(Bv(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Uv(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Uv(this.remaining);r&&(i=r,this.capture(i))}t[Bv(e)]=Bv(i)}parseQueryParam(t){const e=function Jee(n){const t=n.match(Zee);return t?t[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function ete(n){const t=n.match(Xee);return t?t[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=WR(e),o=WR(i);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Uv(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Q(4010,Fv);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=Nt);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[Nt]:new Rt([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Q(4011,Fv)}}function jM(n){return n.segments.length>0?new Rt([],{[Nt]:n}):n}function Hv(n){const t={};for(const i of Object.keys(n.children)){const o=Hv(n.children[i]);(o.segments.length>0||o.hasChildren())&&(t[i]=o)}return function nte(n){if(1===n.numberOfChildren&&n.children[Nt]){const t=n.children[Nt];return new Rt(n.segments.concat(t.segments),t.children)}return n}(new Rt(n.segments,t))}function qc(n){return n instanceof Gc}function ote(n,t,e,i,r){if(0===e.length)return sh(t.root,t.root,t.root,i,r);const o=function KR(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new qR(!0,0,n);let t=0,e=!1;const i=n.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Ki(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?e=!0:".."===a?t++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new qR(e,t,i)}(e);return o.toRoot()?sh(t.root,t.root,new Rt([],{}),i,r):function s(l){const c=function ate(n,t,e,i){if(n.isAbsolute)return new ah(t.root,!0,0);if(-1===i)return new ah(e,e===t.root,0);return function QR(n,t,e){let i=n,r=t,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Q(4005,!1);r=i.segments.length}return new ah(i,!1,r-o)}(e,i+(Fp(n.commands[0])?0:1),n.numberOfDoubleDots)}(o,t,n.snapshot?._urlSegment,l),u=c.processChildren?zp(c.segmentGroup,c.index,o.commands):VM(c.segmentGroup,c.index,o.commands);return sh(t.root,c.segmentGroup,u,i,r)}(n.snapshot?._lastPathIndex)}function Fp(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function jp(n){return"object"==typeof n&&null!=n&&n.outlets}function sh(n,t,e,i,r){let s,o={};i&&Ki(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=n===t?e:YR(n,t,e);const a=jM(Hv(s));return new Gc(a,o,r)}function YR(n,t,e){const i={};return Ki(n.children,(r,o)=>{i[o]=r===t?e:YR(r,t,e)}),new Rt(n.segments,i)}class qR{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Fp(i[0]))throw new Q(4003,!1);const r=i.find(jp);if(r&&r!==jR(i))throw new Q(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ah{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function VM(n,t,e){if(n||(n=new Rt([],{})),0===n.segments.length&&n.hasChildren())return zp(n,t,e);const i=function cte(n,t,e){let i=0,r=t;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=n.segments[r],a=e[i];if(jp(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!JR(l,c,s))return o;i+=2}else{if(!JR(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=VM(n.children[s],t,o))}),Ki(n.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new Rt(n.segments,r)}}function BM(n,t,e){const i=n.segments.slice(0,t);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(t[i]=BM(new Rt([],{}),0,e))}),t}function ZR(n){const t={};return Ki(n,(e,i)=>t[i]=`${e}`),t}function JR(n,t,e){return n==e.path&&Bs(t,e.parameters)}const Vp="imperative";class Us{constructor(t,e){this.id=t,this.url=e}}class UM extends Us{constructor(t,e,i="imperative",r=null){super(t,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Kc extends Us{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class $v extends Us{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class XR extends Us{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=16}}class eF extends Us{constructor(t,e,i,r){super(t,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class dte extends Us{constructor(t,e,i,r){super(t,e),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 hte extends Us{constructor(t,e,i,r){super(t,e),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 fte extends Us{constructor(t,e,i,r,o){super(t,e),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 pte extends Us{constructor(t,e,i,r){super(t,e),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 mte extends Us{constructor(t,e,i,r){super(t,e),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 gte{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class yte{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class _te{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class vte{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class bte{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class wte{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class tF{constructor(t,e,i){this.routerEvent=t,this.position=e,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(e,i,r,o,s,a){return ote(e||i.root,r,o,s,a)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})(),Tte=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(t){return Dte.\u0275fac(t)},providedIn:"root"}),n})();class nF{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=HM(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){const e=HM(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=$M(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return $M(t,this._root).map(e=>e.value)}}function HM(n,t){if(n===t.value)return t;for(const e of t.children){const i=HM(n,e);if(i)return i}return null}function $M(n,t){if(n===t.value)return[t];for(const e of t.children){const i=$M(n,e);if(i.length)return i.unshift(t),i}return[]}class La{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function lh(n){const t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}class iF extends nF{constructor(t,e){super(t),this.snapshot=e,WM(this,t)}toString(){return this.snapshot.toString()}}function rF(n,t){const e=function Mte(n,t){const s=new Wv([],{},{},"",{},Nt,t,null,n.root,-1,{});return new sF("",new La(s,[]))}(n,t),i=new Kr([new Pp("",{})]),r=new Kr({}),o=new Kr({}),s=new Kr({}),a=new Kr(""),l=new ch(i,r,s,a,o,Nt,t,e.root);return l.snapshot=e.root,new iF(new La(l,[]),e)}class ch{constructor(t,e,i,r,o,s,a,l){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(fe(c=>c[Np]))??Le(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(fe(t=>oh(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(fe(t=>oh(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function oF(n,t="emptyOnly"){const e=n.pathFromRoot;let i=0;if("always"!==t)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function Ste(n){return n.reduce((t,e)=>({params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Wv{get title(){return this.data?.[Np]}constructor(t,e,i,r,o,s,a,l,c,u,d){this.url=t,this.params=e,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=oh(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=oh(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class sF extends nF{constructor(t,e){super(e),this.url=t,WM(this,e)}toString(){return aF(this._root)}}function WM(n,t){t.value._routerState=n,t.children.forEach(e=>WM(n,e))}function aF(n){const t=n.children.length>0?` { ${n.children.map(aF).join(", ")} } `:"";return`${n.value}${t}`}function GM(n){if(n.snapshot){const t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Bs(t.queryParams,e.queryParams)||n.queryParams.next(e.queryParams),t.fragment!==e.fragment&&n.fragment.next(e.fragment),Bs(t.params,e.params)||n.params.next(e.params),function Vee(n,t){if(n.length!==t.length)return!1;for(let e=0;eBs(e.parameters,t[i].parameters))}(n.url,t.url);return e&&!(!n.parent!=!t.parent)&&(!n.parent||YM(n.parent,t.parent))}function Bp(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=t.value;const r=function xte(n,t,e){return t.children.map(i=>{for(const r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Bp(n,i,r);return Bp(n,i)})}(n,t,e);return new La(i,r)}{if(n.shouldAttach(t.value)){const o=n.retrieve(t.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>Bp(n,a)),s}}const i=function Ite(n){return new ch(new Kr(n.url),new Kr(n.params),new Kr(n.queryParams),new Kr(n.fragment),new Kr(n.data),n.outlet,n.component,n)}(t.value),r=t.children.map(o=>Bp(n,o));return new La(i,r)}}const qM="ngNavigationCancelingError";function lF(n,t){const{redirectTo:e,navigationBehaviorOptions:i}=qc(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=cF(!1,0,t);return r.url=e,r.navigationBehaviorOptions=i,r}function cF(n,t,e){const i=new Error("NavigationCancelingError: "+(n||""));return i[qM]=!0,i.cancellationCode=t,e&&(i.url=e),i}function uF(n){return dF(n)&&qc(n.url)}function dF(n){return n&&n[qM]}class Ote{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Up,this.attachRef=null}}let Up=(()=>{class n{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new Ote,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Gv=!1;let hF=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=Nt,this.activateEvents=new re,this.deactivateEvents=new re,this.attachEvents=new re,this.detachEvents=new re,this.parentContexts=it(Up),this.location=it($r),this.changeDetector=it(Un),this.environmentInjector=it(Is)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.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(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Q(4012,Gv);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Q(4012,Gv);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Q(4012,Gv);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Q(4013,Gv);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new Ate(e,a,r.injector);if(i&&function kte(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(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[$i]}),n})();class Ate{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===ch?this.route:t===Up?this.childContexts:this.parent.get(t,e)}}let KM=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({type:n,selectors:[["ng-component"]],standalone:!0,features:[Ns],decls:1,vars:0,template:function(e,i){1&e&&_e(0,"router-outlet")},dependencies:[hF],encapsulation:2}),n})();function fF(n,t){return n.providers&&!n._injector&&(n._injector=u_(n.providers,t,`Route: ${n.path}`)),n._injector??t}function ZM(n){const t=n.children&&n.children.map(ZM),e=t?{...n,children:t}:{...n};return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Nt&&(e.component=KM),e}function Uo(n){return n.outlet||Nt}function pF(n,t){const e=n.filter(i=>Uo(i)===t);return e.push(...n.filter(i=>Uo(i)!==t)),e}function Hp(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){const e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class Fte{constructor(t,e,i,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),GM(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const r=lh(e);t.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Ki(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=lh(t);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(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=lh(t);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(t,e,i){const r=lh(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new wte(o.value.snapshot))}),t.children.length&&this.forwardEvent(new vte(t.value.snapshot))}activateRoutes(t,e,i){const r=t.value,o=e?e.value:null;if(GM(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,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),GM(a.route.value),this.activateChildRoutes(t,null,s.children)}else{const a=Hp(r.snapshot),l=a?.get(wc)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}}else this.activateChildRoutes(t,null,i)}}class mF{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Yv{constructor(t,e){this.component=t,this.route=e}}function jte(n,t,e){const i=n._root;return $p(i,t?t._root:null,e,[i.value])}function uh(n,t){const e=Symbol(),i=t.get(n,e);return i===e?"function"!=typeof n||function bw(n){return null!==qu(n)}(n)?t.get(n):n:i}function $p(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=lh(t);return n.children.forEach(s=>{(function Vte(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=n.value,s=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function Bte(n,t,e){if("function"==typeof e)return e(n,t);switch(e){case"pathParamsChange":return!Yc(n.url,t.url);case"pathParamsOrQueryParamsChange":return!Yc(n.url,t.url)||!Bs(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!YM(n,t)||!Bs(n.queryParams,t.queryParams);default:return!YM(n,t)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new mF(i)):(o.data=s.data,o._resolvedData=s._resolvedData),$p(n,t,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Yv(a.outlet.component,s))}else s&&Wp(t,a,r),r.canActivateChecks.push(new mF(i)),$p(n,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Ki(o,(s,a)=>Wp(s,e.getContext(a),r)),r}function Wp(n,t,e){const i=lh(n),r=n.value;Ki(i,(o,s)=>{Wp(o,r.component?t?t.children.getContext(s):null:t,e)}),e.canDeactivateChecks.push(new Yv(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function Gp(n){return"function"==typeof n}function JM(n){return n instanceof Lv||"EmptyError"===n?.name}const qv=Symbol("INITIAL_VALUE");function dh(){return ai(n=>PM(n.map(t=>t.pipe(Et(1),function Iv(...n){const t=n[n.length-1];return Ti(t)?(n.pop(),e=>bM(n,e,t)):e=>bM(n,e)}(qv)))).pipe(fe(t=>{for(const e of t)if(!0!==e){if(e===qv)return qv;if(!1===e||e instanceof Gc)return e}return!0}),Tn(t=>t!==qv),Et(1)))}function gF(n){return pe(hn(t=>{if(qc(t))throw lF(0,t)}),fe(t=>!0===t))}const XM={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function yF(n,t,e,i,r){const o=e1(n,t,e);return o.matched?function rne(n,t,e,i){const r=t.canMatch;return r&&0!==r.length?Le(r.map(s=>{const a=uh(s,n);return wl(function Yte(n){return n&&Gp(n.canMatch)}(a)?a.canMatch(t,e):n.runInContext(()=>a(t,e)))})).pipe(dh(),gF()):Le(!0)}(i=fF(t,i),t,e).pipe(fe(s=>!0===s?o:{...XM})):Le(o)}function e1(n,t,e){if(""===t.path)return"full"===t.pathMatch&&(n.hasChildren()||e.length>0)?{...XM}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(t.matcher||zee)(e,n,t);if(!r)return{...XM};const o={};Ki(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:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Kv(n,t,e,i){if(e.length>0&&function ane(n,t,e){return e.some(i=>Qv(n,t,i)&&Uo(i)!==Nt)}(n,e,i)){const o=new Rt(t,function sne(n,t,e,i){const r={};r[Nt]=i,i._sourceSegment=n,i._segmentIndexShift=t.length;for(const o of e)if(""===o.path&&Uo(o)!==Nt){const s=new Rt([],{});s._sourceSegment=n,s._segmentIndexShift=t.length,r[Uo(o)]=s}return r}(n,t,i,new Rt(e,n.children)));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function lne(n,t,e){return e.some(i=>Qv(n,t,i))}(n,e,i)){const o=new Rt(n.segments,function one(n,t,e,i,r){const o={};for(const s of i)if(Qv(n,e,s)&&!r[Uo(s)]){const a=new Rt([],{});a._sourceSegment=n,a._segmentIndexShift=t.length,o[Uo(s)]=a}return{...r,...o}}(n,t,e,i,n.children));return o._sourceSegment=n,o._segmentIndexShift=t.length,{segmentGroup:o,slicedSegments:e}}const r=new Rt(n.segments,n.children);return r._sourceSegment=n,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:e}}function Qv(n,t,e){return(!(n.hasChildren()||t.length>0)||"full"!==e.pathMatch)&&""===e.path}function _F(n,t,e,i){return!!(Uo(n)===i||i!==Nt&&Qv(t,e,n))&&("**"===n.path||e1(t,n,e).matched)}function vF(n,t,e){return 0===t.length&&!n.children[e]}const Zv=!1;class Jv{constructor(t){this.segmentGroup=t||null}}class bF{constructor(t){this.urlTree=t}}function Yp(n){return vo(new Jv(n))}function wF(n){return vo(new bF(n))}class hne{constructor(t,e,i,r,o){this.injector=t,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const t=Kv(this.urlTree.root,[],[],this.config).segmentGroup,e=new Rt(t.segments,t.children);return this.expandSegmentGroup(this.injector,this.config,e,Nt).pipe(fe(o=>this.createUrlTree(Hv(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Fi(o=>{if(o instanceof bF)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof Jv?this.noMatchError(o):o}))}match(t){return this.expandSegmentGroup(this.injector,this.config,t.root,Nt).pipe(fe(r=>this.createUrlTree(Hv(r),t.queryParams,t.fragment))).pipe(Fi(r=>{throw r instanceof Jv?this.noMatchError(r):r}))}noMatchError(t){return new Q(4002,Zv)}createUrlTree(t,e,i){const r=jM(t);return new Gc(r,e,i)}expandSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(fe(o=>new Rt([],o))):this.expandSegment(t,i,e,i.segments,r,!0)}expandChildren(t,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return wt(r).pipe(dl(o=>{const s=i.children[o],a=pF(e,o);return this.expandSegmentGroup(t,a,s,o).pipe(fe(l=>({segment:l,outlet:o})))}),Rv((o,s)=>(o[s.outlet]=s.segment,o),{}),LR())}expandSegment(t,e,i,r,o,s){return wt(i).pipe(dl(a=>this.expandSegmentAgainstRoute(t,e,i,a,r,o,s).pipe(Fi(c=>{if(c instanceof Jv)return Le(null);throw c}))),bl(a=>!!a),Fi((a,l)=>{if(JM(a))return vF(e,r,o)?Le(new Rt([],{})):Yp(e);throw a}))}expandSegmentAgainstRoute(t,e,i,r,o,s,a){return _F(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s):Yp(e):Yp(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?wF(o):this.lineralizeSegments(i,o).pipe(ni(s=>{const a=new Rt(s,{});return this.expandSegment(t,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=e1(e,r,o);if(!a)return Yp(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?wF(d):this.lineralizeSegments(r,d).pipe(ni(h=>this.expandSegment(t,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(t,e,i,r,o){return"**"===i.path?(t=fF(i,t),i.loadChildren?(i._loadedRoutes?Le({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(t,i)).pipe(fe(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new Rt(r,{})))):Le(new Rt(r,{}))):yF(e,i,r,t).pipe(ai(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(t=i._injector??t,i,r).pipe(ni(u=>{const d=u.injector??t,h=u.routes,{segmentGroup:f,slicedSegments:p}=Kv(e,a,l,h),m=new Rt(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(fe(w=>new Rt(a,w)));if(0===h.length&&0===p.length)return Le(new Rt(a,{}));const g=Uo(i)===o;return this.expandSegment(d,m,h,p,g?Nt:o,!0).pipe(fe(b=>new Rt(a.concat(b.segments),b.children)))})):Yp(e)))}getChildConfig(t,e,i){return e.children?Le({routes:e.children,injector:t}):e.loadChildren?void 0!==e._loadedRoutes?Le({routes:e._loadedRoutes,injector:e._loadedInjector}):function ine(n,t,e,i){const r=t.canLoad;return void 0===r||0===r.length?Le(!0):Le(r.map(s=>{const a=uh(s,n);return wl(function Hte(n){return n&&Gp(n.canLoad)}(a)?a.canLoad(t,e):n.runInContext(()=>a(t,e)))})).pipe(dh(),gF())}(t,e,i).pipe(ni(r=>r?this.configLoader.loadChildren(t,e).pipe(hn(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function une(n){return vo(cF(Zv,3))}())):Le({routes:[],injector:t})}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Le(i);if(r.numberOfChildren>1||!r.children[Nt])return vo(new Q(4e3,Zv));r=r.children[Nt]}}applyRedirectCommands(t,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreateUrlTree(t,e,i,r){const o=this.createSegmentGroup(t,e.root,i,r);return new Gc(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return Ki(t,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(t,e,i,r){const o=this.createSegments(t,e.segments,i,r);let s={};return Ki(e.children,(a,l)=>{s[l]=this.createSegmentGroup(t,a,i,r)}),new Rt(o,s)}createSegments(t,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,r):this.findOrReturn(o,i))}findPosParam(t,e,i){const r=i[e.path.substring(1)];if(!r)throw new Q(4001,Zv);return r}findOrReturn(t,e){let i=0;for(const r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}}class pne{}class yne{constructor(t,e,i,r,o,s,a){this.injector=t,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const t=Kv(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,t,Nt).pipe(fe(e=>{if(null===e)return null;const i=new Wv([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},Nt,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new La(i,e),o=new sF(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(t){const e=t.value,i=oF(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(t,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(t,e,i):this.processSegment(t,e,i,i.segments,r)}processChildren(t,e,i){return wt(Object.keys(i.children)).pipe(dl(r=>{const o=i.children[r],s=pF(e,r);return this.processSegmentGroup(t,s,o,r)}),Rv((r,o)=>r&&o?(r.push(...o),r):null),function Oee(n,t=!1){return e=>e.lift(new Aee(n,t))}(r=>null!==r),rh(null),LR(),fe(r=>{if(null===r)return null;const o=DF(r);return function _ne(n){n.sort((t,e)=>t.value.outlet===Nt?-1:e.value.outlet===Nt?1:t.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(t,e,i,r,o){return wt(e).pipe(dl(s=>this.processSegmentAgainstRoute(s._injector??t,s,i,r,o)),bl(s=>!!s),Fi(s=>{if(JM(s))return vF(i,r,o)?Le([]):Le(null);throw s}))}processSegmentAgainstRoute(t,e,i,r,o){if(e.redirectTo||!_F(e,i,r,o))return Le(null);let s;if("**"===e.path){const a=r.length>0?jR(r).parameters:{},l=MF(i)+r.length;s=Le({snapshot:new Wv(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,SF(e),Uo(e),e.component??e._loadedComponent??null,e,TF(i),l,EF(e)),consumedSegments:[],remainingSegments:[]})}else s=yF(i,e,r,t).pipe(fe(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=MF(i)+l.length;return{snapshot:new Wv(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,SF(e),Uo(e),e.component??e._loadedComponent??null,e,TF(i),d,EF(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(ai(a=>{if(null===a)return Le(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;t=e._injector??t;const d=e._loadedInjector??t,h=function vne(n){return n.children?n.children:n.loadChildren?n._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=Kv(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(fe(g=>null===g?null:[new La(l,g)]));if(0===h.length&&0===p.length)return Le([new La(l,[])]);const m=Uo(e)===o;return this.processSegment(d,h,f,p,m?Nt:o).pipe(fe(g=>null===g?null:[new La(l,g)]))}))}}function bne(n){const t=n.value.routeConfig;return t&&""===t.path&&void 0===t.redirectTo}function DF(n){const t=[],e=new Set;for(const i of n){if(!bne(i)){t.push(i);continue}const r=t.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):t.push(i)}for(const i of e){const r=DF(i.children);t.push(new La(i.value,r))}return t.filter(i=>!e.has(i))}function TF(n){let t=n;for(;t._sourceSegment;)t=t._sourceSegment;return t}function MF(n){let t=n,e=t._segmentIndexShift??0;for(;t._sourceSegment;)t=t._sourceSegment,e+=t._segmentIndexShift??0;return e-1}function SF(n){return n.data||{}}function EF(n){return n.resolve||{}}function xF(n){return"string"==typeof n.title||null===n.title}function t1(n){return ai(t=>{const e=n(t);return e?wt(e).pipe(fe(()=>t)):Le(t)})}const hh=new Ce("ROUTES");let n1=(()=>{class n{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return Le(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=wl(e.loadComponent()).pipe(fe(OF),hn(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),LM(()=>{this.componentLoaders.delete(e)})),r=new $u(i,()=>new ae).pipe(sc());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Le({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(fe(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=FR(l.get(hh,[],et.Self|et.Optional)));return{routes:c.map(ZM),injector:l}}),LM(()=>{this.childrenLoaders.delete(i)})),s=new $u(o,()=>new ae).pipe(sc());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return wl(e()).pipe(fe(OF),ni(r=>r instanceof hk||Array.isArray(r)?Le(r):wt(this.compiler.compileModuleAsync(r))))}}return n.\u0275fac=function(e){return new(e||n)(F(Dr),F(nN))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function OF(n){return function Ine(n){return n&&"object"==typeof n&&"default"in n}(n)?n.default:n}let eb=(()=>{class n{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new ae,this.configLoader=it(n1),this.environmentInjector=it(Is),this.urlSerializer=it(Lp),this.rootContexts=it(Up),this.navigationId=0,this.afterPreactivation=()=>Le(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new yte(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new gte(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Kr({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Vp,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Tn(i=>0!==i.id),fe(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),ai(i=>{let r=!1,o=!1;return Le(i).pipe(hn(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}}),ai(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new XR(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Rs}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return AF(s.source)&&(e.browserUrlTree=s.extractedUrl),Le(s).pipe(ai(u=>{const d=this.transitions?.getValue();return this.events.next(new UM(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Rs:Promise.resolve(u)}),function fne(n,t,e,i){return ai(r=>function dne(n,t,e,i,r){return new hne(n,t,e,i,r).apply()}(n,t,e,r.extractedUrl,i).pipe(fe(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),hn(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function Cne(n,t,e,i,r){return ni(o=>function gne(n,t,e,i,r,o,s="emptyOnly"){return new yne(n,t,e,i,r,s,o).recognize().pipe(ai(a=>null===a?function mne(n){return new Se(t=>t.error(n))}(new pne):Le(a)))}(n,t,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(fe(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),hn(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new dte(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new UM(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=rF(d,this.rootComponentType).snapshot;return Le(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new XR(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Rs}}),hn(s=>{const a=new hte(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),fe(s=>i={...s,guards:jte(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function Kte(n,t){return ni(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?Le({...e,guardsResult:!0}):function Qte(n,t,e,i){return wt(n).pipe(ni(r=>function nne(n,t,e,i,r){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return o&&0!==o.length?Le(o.map(a=>{const l=Hp(t)??r,c=uh(a,l);return wl(function Gte(n){return n&&Gp(n.canDeactivate)}(c)?c.canDeactivate(n,t,e,i):l.runInContext(()=>c(n,t,e,i))).pipe(bl())})).pipe(dh()):Le(!0)}(r.component,r.route,e,t,i)),bl(r=>!0!==r,!0))}(s,i,r,n).pipe(ni(a=>a&&function Ute(n){return"boolean"==typeof n}(a)?function Zte(n,t,e,i){return wt(t).pipe(dl(r=>bM(function Xte(n,t){return null!==n&&t&&t(new _te(n)),Le(!0)}(r.route.parent,i),function Jte(n,t){return null!==n&&t&&t(new bte(n)),Le(!0)}(r.route,i),function tne(n,t,e){const i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>function zte(n){const t=n.routeConfig?n.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:n,guards:t}:null}(s)).filter(s=>null!==s).map(s=>NR(()=>Le(s.guards.map(l=>{const c=Hp(s.node)??e,u=uh(l,c);return wl(function Wte(n){return n&&Gp(n.canActivateChild)}(u)?u.canActivateChild(i,n):c.runInContext(()=>u(i,n))).pipe(bl())})).pipe(dh())));return Le(o).pipe(dh())}(n,r.path,e),function ene(n,t,e){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return Le(!0);const r=i.map(o=>NR(()=>{const s=Hp(t)??e,a=uh(o,s);return wl(function $te(n){return n&&Gp(n.canActivate)}(a)?a.canActivate(t,n):s.runInContext(()=>a(t,n))).pipe(bl())}));return Le(r).pipe(dh())}(n,r.route,e))),bl(r=>!0!==r,!0))}(i,o,n,t):Le(a)),fe(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),hn(s=>{if(i.guardsResult=s.guardsResult,qc(s.guardsResult))throw lF(0,s.guardsResult);const a=new fte(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),Tn(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),t1(s=>{if(s.guards.canActivateChecks.length)return Le(s).pipe(hn(a=>{const l=new pte(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),ai(a=>{let l=!1;return Le(a).pipe(function Dne(n,t){return ni(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return Le(e);let o=0;return wt(r).pipe(dl(s=>function Tne(n,t,e,i){const r=n.routeConfig,o=n._resolve;return void 0!==r?.title&&!xF(r)&&(o[Np]=r.title),function Mne(n,t,e,i){const r=function Sne(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}(n);if(0===r.length)return Le({});const o={};return wt(r).pipe(ni(s=>function Ene(n,t,e,i){const r=Hp(t)??i,o=uh(n,r);return wl(o.resolve?o.resolve(t,e):r.runInContext(()=>o(t,e)))}(n[s],t,e,i).pipe(bl(),hn(a=>{o[s]=a}))),kp(1),function Nee(n){return t=>t.lift(new Pee(n))}(o),Fi(s=>JM(s)?Rs:vo(s)))}(o,n,t,i).pipe(fe(s=>(n._resolvedData=s,n.data=oF(n,e).resolve,r&&xF(r)&&(n.data[Np]=r.title),null)))}(s.route,i,n,t)),hn(()=>o++),kp(1),ni(s=>o===r.length?Le(e):Rs))})}(e.paramsInheritanceStrategy,this.environmentInjector),hn({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),hn(a=>{const l=new mte(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),t1(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(hn(u=>{l.component=u}),fe(()=>{})));for(const u of l.children)c.push(...a(u));return c};return PM(a(s.targetSnapshot.root)).pipe(rh(),Et(1))}),t1(()=>this.afterPreactivation()),fe(s=>{const a=function Ete(n,t,e){const i=Bp(n,t._root,e?e._root:void 0);return new iF(i,t)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),hn(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((n,t,e)=>fe(i=>(new Fte(t,i.targetRouterState,i.currentRouterState,e).activate(n),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),hn({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Kc(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),LM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Fi(s=>{if(o=!0,dF(s)){uF(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new $v(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),uF(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||AF(i.source)};e.scheduleNavigation(l,Vp,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new eF(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Rs}))}))}cancelNavigationTransition(e,i,r){const o=new $v(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function AF(n){return n!==Vp}let kF=(()=>{class n{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===Nt);return i}getResolvedTitleForRoute(e){return e.data[Np]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return it(One)},providedIn:"root"}),n})(),One=(()=>{class n extends kF{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return n.\u0275fac=function(e){return new(e||n)(F(wP))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ane=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return it(Nne)},providedIn:"root"}),n})();class kne{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}let Nne=(()=>{class n extends kne{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Li(n)))(i||n)}}(),n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const tb=new Ce("",{providedIn:"root",factory:()=>({})});let Lne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:function(){return it(Rne)},providedIn:"root"}),n})(),Rne=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Fne(n){throw n}function jne(n,t,e){return t.parse("/")}const zne={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Vne={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let xr=(()=>{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=it(X6),this.isNgZoneEnabled=!1,this.options=it(tb,{optional:!0})||{},this.errorHandler=this.options.errorHandler||Fne,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||jne,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=it(Lne),this.routeReuseStrategy=it(Ane),this.urlCreationStrategy=it(Tte),this.titleStrategy=it(kF),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=FR(it(hh,{optional:!0})??[]),this.navigationTransitions=it(eb),this.urlSerializer=it(Lp),this.location=it(BD),this.isNgZoneEnabled=it(qt)instanceof qt&&qt.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Gc,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=rF(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Vp,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,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(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(ZM),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(e,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,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=qc(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Vp,null,i)}navigate(e,i={skipLocationChange:!1}){return function Bne(n){for(let t=0;t{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,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:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),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(e,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class PF{}let $ne=(()=>{class n{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(Tn(e=>e instanceof Kc),dl(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=u_(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,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 wt(r).pipe(Ja())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):Le(null);const o=r.pipe(ni(s=>null===s?Le(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?wt([o,this.loader.loadComponent(i)]).pipe(Ja()):o})}}return n.\u0275fac=function(e){return new(e||n)(F(xr),F(nN),F(Is),F(PF),F(n1))},n.\u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const o1=new Ce("");let LF=(()=>{class n{constructor(e,i,r,o,s={}){this.urlSerializer=e,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(e=>{e instanceof UM?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Kc&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof tF&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new tF(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return n.\u0275fac=function(e){!function _O(){throw new Error("invalid")}()},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();function Qc(n,t){return{\u0275kind:n,\u0275providers:t}}function FF(){const n=it(Dr);return t=>{const e=n.get(Ec);if(t!==e.components[0])return;const i=n.get(xr),r=n.get(jF);1===n.get(a1)&&i.initialNavigation(),n.get(zF,null,et.Optional)?.setUpPreloading(),n.get(o1,null,et.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const jF=new Ce("",{factory:()=>new ae}),a1=new Ce("",{providedIn:"root",factory:()=>1});const zF=new Ce("");function Kne(n){return Qc(0,[{provide:zF,useExisting:$ne},{provide:PF,useExisting:n}])}const VF=new Ce("ROUTER_FORROOT_GUARD"),Qne=[BD,{provide:Lp,useClass:RM},xr,Up,{provide:ch,useFactory:function RF(n){return n.routerState.root},deps:[xr]},n1,[]];function Zne(){return new cN("Router",xr)}let BF=(()=>{class n{constructor(e){}static forRoot(e,i){return{ngModule:n,providers:[Qne,[],{provide:hh,multi:!0,useValue:e},{provide:VF,useFactory:tie,deps:[[xr,new Ff,new jf]]},{provide:tb,useValue:i||{}},i?.useHash?{provide:Ic,useClass:U$}:{provide:Ic,useClass:kN},{provide:o1,useFactory:()=>{const n=it(nG),t=it(qt),e=it(tb),i=it(eb),r=it(Lp);return e.scrollOffset&&n.setOffset(e.scrollOffset),new LF(r,i,n,t,e)}},i?.preloadingStrategy?Kne(i.preloadingStrategy).\u0275providers:[],{provide:cN,multi:!0,useFactory:Zne},i?.initialNavigation?nie(i):[],[{provide:UF,useFactory:FF},{provide:eN,multi:!0,useExisting:UF}]]}}static forChild(e){return{ngModule:n,providers:[{provide:hh,multi:!0,useValue:e}]}}}return n.\u0275fac=function(e){return new(e||n)(F(VF,8))},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[KM]}),n})();function tie(n){return"guarded"}function nie(n){return["disabled"===n.initialNavigation?Qc(3,[{provide:Vd,multi:!0,useFactory:()=>{const t=it(xr);return()=>{t.setUpLocationChangeListener()}}},{provide:a1,useValue:2}]).\u0275providers:[],"enabledBlocking"===n.initialNavigation?Qc(2,[{provide:a1,useValue:0},{provide:Vd,multi:!0,deps:[Dr],useFactory:t=>{const e=t.get(V$,Promise.resolve());return()=>e.then(()=>new Promise(r=>{const o=t.get(xr),s=t.get(jF);(function i(r){t.get(xr).events.pipe(Tn(s=>s instanceof Kc||s instanceof $v||s instanceof eF),fe(s=>s instanceof Kc||s instanceof $v&&(0===s.code||1===s.code)&&null),Tn(s=>null!==s),Et(1)).subscribe(()=>{r()})})(()=>{r(!0)}),t.get(eb).afterPreactivation=()=>(r(!0),s.closed?Le(void 0):s),o.initialNavigation()}))}}]).\u0275providers:[]]}const UF=new Ce("");class Ht{constructor(t,e,i){this.loggerService=t,this.router=e,this.http=i,this.httpErrosSubjects=[]}request(t){t.method||(t.method="GET");const e=this.getRequestOpts(t),i=t.body;return this.http.request(e).pipe(Tn(r=>r.type===An.Response),fe(r=>{try{return r.body}catch{return r}}),Fi((r,o)=>{if(r){if(this.emitHttpError(r.status),r.status===Wc.SERVER_ERROR||r.status===Wc.FORBIDDEN)throw r.statusText&&r.statusText.indexOf("ECONNREFUSED")>=0?new kM(1,gee_1,e,r,i):new kM(3,r.error.message,e,r,i);if(r.status===Wc.NOT_FOUND)throw this.loggerService.error("Could not execute request: 404 path not valid.",t.url),new kM(2,r.headers.get("error-message"),e,r,i)}return null}))}requestView(t){let e;return t.method||(t.method="GET"),e=this.getRequestOpts(t),this.http.request(e).pipe(Tn(i=>i.type===An.Response),fe(i=>i.body&&i.body.errors&&i.body.errors.length>0?this.handleRequestViewErrors(i):new NM(i)),Fi(i=>(this.emitHttpError(i.status),vo(this.handleResponseHttpErrors(i)))))}subscribeToHttpError(t){return this.httpErrosSubjects[t]||(this.httpErrosSubjects[t]=new ae),this.httpErrosSubjects[t].asObservable()}handleRequestViewErrors(t){return 401===t.status&&this.router.navigate(["/public/login"]),new NM(t)}handleResponseHttpErrors(t){return 401===t.status&&this.router.navigate(["/public/login"]),t}emitHttpError(t){this.httpErrosSubjects[t]&&this.httpErrosSubjects[t].next()}getRequestOpts(t){const e=this.getHttpHeaders(t.headers),i=this.getHttpParams(t.params),r=this.getFixedUrl(t.url);return"POST"===t.method||"PUT"===t.method||"PATCH"===t.method||"DELETE"===t.method?new Oa(t.method,r,t.body||null,{headers:e,params:i}):new Oa(t.method,r,{headers:e,params:i})}getHttpHeaders(t){let e=this.getDefaultRequestHeaders();return t&&Object.keys(t).length&&(Object.keys(t).forEach(i=>{e=e.set(i,t[i])}),"multipart/form-data"===t["Content-Type"]&&(e=e.delete("Content-Type"))),e}getFixedUrl(t){return t?.startsWith("api")?`/${t}`:(t?t.split("/")[0]:"").match(/v[1-9]/g)?`/api/${t}`:t}getHttpParams(t){if(t&&Object.keys(t).length){let e=new ps;return Object.keys(t).forEach(i=>{e=e.set(i,t[i])}),e}return null}getDefaultRequestHeaders(){return(new Yr).set("Accept","*/*").set("Content-Type","application/json")}}Ht.\u0275fac=function(t){return new(t||Ht)(F(Co),F(xr),F(ar))},Ht.\u0275prov=H({token:Ht,factory:Ht.\u0275fac});class Kp{constructor(){this.data=new ae}get showDialog$(){return this.data.asObservable()}open(t){this.data.next(t)}}Kp.\u0275fac=function(t){return new(t||Kp)},Kp.\u0275prov=H({token:Kp,factory:Kp.\u0275fac,providedIn:"root"});class ph{constructor(t){this.router=t}goToMain(){this.router.navigate(["/c"])}goToLogin(t){this.router.navigate(["/public/login"],t)}goToURL(t){this.router.navigate([t])}isPublicUrl(t){return t.startsWith("/public")}isFromCoreUrl(t){return t.startsWith("/fromCore")}isRootUrl(t){return"/"===t}gotoPortlet(t){this.router.navigate([`c/${t.replace(" ","_")}`])}goToForgotPassword(){this.router.navigate(["/public/forgotPassword"])}goToNotLicensed(){this.router.navigate(["c/notLicensed"])}}ph.\u0275fac=function(t){return new(t||ph)(F(xr))},ph.\u0275prov=H({token:ph,factory:ph.\u0275fac});class Zc{constructor(t,e){this.coreWebService=t,this.loggerService=e,this.configParamsSubject=new Kr(null),this.configUrl="v1/appconfiguration",this.loadConfig()}getConfig(){return this.configParamsSubject.asObservable().pipe(Tn(t=>!!t))}loadConfig(){this.loggerService.debug("Loading configuration on: ",this.configUrl),this.coreWebService.requestView({url:this.configUrl}).pipe(Ie("entity")).subscribe(t=>{this.loggerService.debug("Configuration Loaded!",t);const e={colors:t.config.colors,emailRegex:t.config.emailRegex,license:t.config.license,logos:t.config.logos,menu:t.menu,paginatorLinks:t.config["dotcms.paginator.links"],paginatorRows:t.config["dotcms.paginator.rows"],releaseInfo:{buildDate:t.config.releaseInfo?.buildDate,version:t.config.releaseInfo?.version},websocket:{websocketReconnectTime:t.config.websocket["dotcms.websocket.reconnect.time"],disabledWebsockets:t.config.websocket["dotcms.websocket.disable"]}};return this.configParamsSubject.next(e),this.loggerService.debug("this.configParams",e),t})}getTimeZones(){return this.coreWebService.requestView({url:this.configUrl}).pipe(Ie("entity","config","timezones"),fe(t=>t.sort((e,i)=>e.label>i.label?1:e.label{this.connect()},0)}destroy(){this._open.complete(),this._close.complete(),this._message.complete(),this._error.complete()}}var nb=(()=>(function(n){n[n.NORMAL_CLOSE_CODE=1e3]="NORMAL_CLOSE_CODE",n[n.GO_AWAY_CODE=1001]="GO_AWAY_CODE"}(nb||(nb={})),nb))();class $F extends HF{constructor(t,e){if(super(e),this.url=t,this.dataStream=new ae,!new RegExp("wss?://").test(t))throw new Error("Invalid url provided ["+t+"]")}connect(){this.errorThrown=!1,this.loggerService.debug("Connecting with Web socket",this.url);try{this.socket=new WebSocket(this.url),this.socket.onopen=t=>{this.loggerService.debug("Web socket connected",this.url),this._open.next(t)},this.socket.onmessage=t=>{this._message.next(JSON.parse(t.data))},this.socket.onclose=t=>{this.errorThrown||(t.code===nb.NORMAL_CLOSE_CODE?(this._close.next(t),this._message.complete()):this._error.next(t))},this.socket.onerror=t=>{this.errorThrown=!0,this._error.next(t)}}catch(t){this.loggerService.debug("Web EventsSocket connection error",t),this._error.next(t)}}close(){this.socket&&3!==this.socket.readyState&&this.socket.close()}}class cie extends HF{constructor(t,e,i){super(e),this.url=t,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(t){return this.lastCallback=t.length>0?t[t.length-1].creationDate+1:this.lastCallback,this.lastCallback}connectLongPooling(t){this.isClosed=!1,this.loggerService.info("Starting long polling connection"),this.coreWebService.requestView({url:this.url,params:t?{lastCallBack:t}:{}}).pipe(Ie("entity"),Et(1)).subscribe(e=>{this.loggerService.debug("new Events",e),this.triggerOpen(),e instanceof Array?e.forEach(i=>{this._message.next(i)}):this._message.next(e),this.isClosed||this.connectLongPooling(this.getLastCallback(e))},e=>{this.loggerService.info("A error occur connecting through long polling"),this._error.next(e)})}triggerOpen(){this.isAlreadyOpen||(this._open.next(!0),this.isAlreadyOpen=!0)}}class uie{constructor(t,e){this.url=t,this.useSSL=e}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 Qr=(()=>(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"}(Qr||(Qr={})),Qr))();class mh{constructor(t,e,i,r){this.dotEventsSocketURL=t,this.dotcmsConfigService=e,this.loggerService=i,this.coreWebService=r,this.status=Qr.NONE,this._message=new ae,this._open=new ae}connect(){return this.init().pipe(hn(()=>{this.status=Qr.CONNECTING,this.connectProtocol()}))}destroy(){this.protocolImpl&&(this.loggerService.debug("Closing socket"),this.status=Qr.CLOSED,this.protocolImpl.close())}messages(){return this._message.asObservable()}open(){return this._open.asObservable()}isConnected(){return this.status===Qr.CONNECTED}init(){return this.dotcmsConfigService.getConfig().pipe(Ie("websocket"),hn(t=>{this.webSocketConfigParams=t,this.protocolImpl=this.isWebSocketsBrowserSupport()&&!t.disabledWebsockets?this.getWebSocketProtocol():this.getLongPollingProtocol()}))}connectProtocol(){this.protocolImpl.open$().subscribe(()=>{this.status=Qr.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(t=>{this.status=Qr.CLOSED}),this.protocolImpl.message$().subscribe(t=>this._message.next(t),t=>this.loggerService.debug("Error in the System Events service: "+t.message),()=>this.loggerService.debug("Completed")),this.protocolImpl.connect()}getAfterErrorStatus(){return this.status===Qr.CONNECTING?Qr.CONNECTING:Qr.RECONNECTING}shouldTryWithLongPooling(){return this.isWebSocketProtocol()&&this.status!==Qr.CONNECTED&&this.status!==Qr.RECONNECTING}getWebSocketProtocol(){return new $F(this.dotEventsSocketURL.getWebSocketURL(),this.loggerService)}getLongPollingProtocol(){return new cie(this.dotEventsSocketURL.getLongPoolingURL(),this.loggerService,this.coreWebService)}isWebSocketsBrowserSupport(){return"WebSocket"in window||"MozWebSocket"in window}isWebSocketProtocol(){return this.protocolImpl instanceof $F}}mh.\u0275fac=function(t){return new(t||mh)(F(uie),F(Zc),F(Co),F(Ht))},mh.\u0275prov=H({token:mh,factory:mh.\u0275fac});class Cl{constructor(t,e){this.dotEventsSocket=t,this.loggerService=e,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(ai(()=>this.dotEventsSocket.messages())).subscribe(({event:t,payload:e})=>{this.subjects[t]||(this.subjects[t]=new ae),this.subjects[t].next(e.data)},t=>{this.loggerService.debug("Error in the System Events service: "+t.message)},()=>{this.loggerService.debug("Completed")}))}subscribeTo(t){return this.subjects[t]||(this.subjects[t]=new ae),this.subjects[t].asObservable()}subscribeToEvents(t){const e=new ae;return t.forEach(i=>{this.subscribeTo(i).subscribe(r=>{e.next({data:r,name:i})})}),e.asObservable()}open(){return this.dotEventsSocket.open()}}Cl.\u0275fac=function(t){return new(t||Cl)(F(mh),F(Co))},Cl.\u0275prov=H({token:Cl,factory:Cl.\u0275fac});var Qp=(()=>(function(n){n.SHOW_VIDEO_THUMBNAIL="SHOW_VIDEO_THUMBNAIL"}(Qp||(Qp={})),Qp))(),Zp=(()=>(function(n){n.FULFILLED="fulfilled",n.REJECTED="rejected"}(Zp||(Zp={})),Zp))(),ib=(()=>(function(n){n.EDIT="EDIT_MODE",n.PREVIEW="PREVIEW_MODE",n.LIVE="ADMIN_MODE"}(ib||(ib={})),ib))();class die{constructor(t){this._params=t}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((t,e)=>({...t,[e]:this.containers[e].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(t){this._params.numberContents=t}}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 Jp="variantName";var nm,$n=(()=>(function(n){n.INIT="INIT",n.LOADING="LOADING",n.LOADED="LOADED",n.SAVING="SAVING",n.IDLE="IDLE"}($n||($n={})),$n))();class Xc{constructor(t,e){this.coreWebService=t,this.dotcmsEventsService=e,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/"},e.subscribeTo("SESSION_DESTROYED").subscribe(()=>{this.logOutUser(),this.clearExperimentPersistence()}),e.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?Le(!0):this.loadAuth().pipe(fe(t=>!!t&&!!t.user))}getCurrentUser(){return this.coreWebService.request({url:this.urls.current}).pipe(fe(t=>t))}loadAuth(){return this.coreWebService.requestView({url:this.urls.getAuth}).pipe(Ie("entity"),hn(t=>{t.user&&this.setAuth(t)}),fe(t=>this.getFullAuth(t)))}changePassword(t,e){const i=JSON.stringify({password:t,token:e});return this.coreWebService.requestView({body:i,method:"POST",url:this.urls.changePassword}).pipe(Ie("entity"))}getLoginFormInfo(t,e){return this.setLanguage(t),this.coreWebService.requestView({body:{messagesKey:e,language:this.lang,country:this.country},method:"POST",url:this.urls.serverInfo}).pipe(Ie("bodyJsonObject"))}loginAs(t){return this.coreWebService.requestView({body:{password:t.password,userId:t.user.userId},method:"POST",url:this.urls.loginAs}).pipe(fe(e=>{if(!e.entity.loginAs)throw e.errorsMessages;return this.setAuth({loginAsUser:t.user,user:this._auth.user}),e}),Ie("entity","loginAs"))}loginUser({login:t,password:e,rememberMe:i,language:r,backEndLogin:o}){return this.setLanguage(r),this.coreWebService.requestView({body:{userId:t,password:e,rememberMe:i,language:this.lang,country:this.country,backEndLogin:o},method:"POST",url:this.urls.userAuth}).pipe(fe(s=>(this.setAuth({loginAsUser:null,user:s.entity}),this.coreWebService.subscribeToHttpError(Wc.UNAUTHORIZED).subscribe(()=>{this.logOutUser()}),s.entity)))}logoutAs(){return this.coreWebService.requestView({method:"PUT",url:`${this.urls.logoutAs}`}).pipe(fe(t=>(this.setAuth({loginAsUser:null,user:this._auth.user}),t.entity.logoutAs)))}recoverPassword(t){return this.coreWebService.requestView({body:{userId:t},method:"POST",url:this.urls.recoverPassword}).pipe(Ie("entity"))}watchUser(t){this.auth&&t(this.auth),this.auth$.subscribe(e=>{e.user&&t(e)})}setAuth(t){this._auth=this.getFullAuth(t),this._auth$.next(this.getFullAuth(t)),t.user?this.dotcmsEventsService.start():this._logout$.next()}setLanguage(t){if(void 0!==t&&""!==t){const e=t.split("_");this.lang=e[0],this.country=e[1]}else this.lang="",this.country=""}logOutUser(){window.location.href=`/dotAdmin/logout?r=${(new Date).getTime()}`}getFullAuth(t){const e=!!t.loginAsUser||!!Object.keys(t.loginAsUser||{}).length;return{...t,isLoginAs:e}}clearExperimentPersistence(){sessionStorage.removeItem(Jp)}}Xc.\u0275fac=function(t){return new(t||Xc)(F(Ht),F(Cl))},Xc.\u0275prov=H({token:Xc,factory:Xc.\u0275fac});class Xp{constructor(t,e,i,r){this.router=e,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,t.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 t=this.portlets.entries().next().value;return t?t[0]:null}addPortletURL(t,e){this.portlets.set(t.replace(" ","_"),e)}getPortletURL(t){return this.portlets.get(t)}goToPortlet(t){this.router.gotoPortlet(t),this._currentPortletId=t}isPortlet(t){let e=this.getPortletId(t);return e.indexOf("?")>=0&&(e=e.substr(0,e.indexOf("?"))),this.portlets.has(e)}setCurrentPortlet(t){let e=this.getPortletId(t);e.indexOf("?")>=0&&(e=e.substr(0,e.indexOf("?"))),this._currentPortletId=e,this._currentPortlet$.next(e)}get currentPortlet$(){return this._currentPortlet$}setMenus(t){if(this.menus=t,this.menus.length){this.portlets=new Map;for(let e=0;e{this.setMenus(t.entity)},t=>this._menusChange$.error(t))}getPortletId(t){const e=t.split("/");return e[e.length-1]}}Xp.\u0275fac=function(t){return new(t||Xp)(F(Xc),F(ph),F(Ht),F(Cl))},Xp.\u0275prov=H({token:Xp,factory:Xp.\u0275fac});class em{constructor(t,e,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"},e.subscribeToEvents(["ARCHIVE_SITE","UPDATE_SITE"]).subscribe(o=>this.eventResponse(o)),e.subscribeToEvents(this.events).subscribe(({data:o})=>this.siteEventsHandler(o)),e.subscribeToEvents(["SWITCH_SITE"]).subscribe(({data:o})=>this.setCurrentSite(o)),t.watchUser(()=>this.loadCurrentSite())}eventResponse({name:t,data:e}){this.loggerService.debug("Capturing Site event",t,e),e.identifier===this.selectedSite.identifier&&("ARCHIVE_SITE"===t?this.switchToDefaultSite().pipe(Et(1),ai(r=>this.switchSite(r))).subscribe():this.loadCurrentSite())}siteEventsHandler(t){this._refreshSites$.next(t)}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(Ie("entity"))}getSiteById(t){return this.coreWebService.requestView({url:`/api/content/render/false/query/+contentType:host%20+identifier:${t}`}).pipe(Ie("contentlets"),fe(e=>e[0]))}switchSiteById(t){return this.loggerService.debug("Applying a Site Switch"),this.getSiteById(t).pipe(ai(e=>e?this.switchSite(e):Le(null)),Et(1))}switchSite(t){return this.loggerService.debug("Applying a Site Switch",t.identifier),this.coreWebService.requestView({method:"PUT",url:`${this.urls.switchSiteUrl}/${t.identifier}`}).pipe(Et(1),hn(()=>this.setCurrentSite(t)),fe(()=>t))}getCurrentSite(){return ws(this.selectedSite?Le(this.selectedSite):this.requestCurrentSite(),this.switchSite$)}requestCurrentSite(){return this.coreWebService.requestView({url:this.urls.currentSiteUrl}).pipe(Ie("entity"))}setCurrentSite(t){this.selectedSite=t,this._switchSite$.next({...t})}loadCurrentSite(){this.getCurrentSite().pipe(Et(1)).subscribe(t=>{this.setCurrentSite(t)})}}em.\u0275fac=function(t){return new(t||em)(F(Xc),F(Cl),F(Ht),F(Co))},em.\u0275prov=H({token:em,factory:em.\u0275fac,providedIn:"root"});class eu{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}eu.\u0275fac=function(t){return new(t||eu)},eu.\u0275prov=H({token:eu,factory:eu.\u0275fac});class gh{storeValue(t,e){localStorage.setItem(t,e)}getValue(t){return localStorage.getItem(t)}clearValue(t){localStorage.removeItem(t)}clear(){localStorage.clear()}}gh.\u0275fac=function(t){return new(t||gh)},gh.\u0275prov=H({token:gh,factory:gh.\u0275fac});class tm{}tm.\u0275fac=function(t){return new(t||tm)},tm.\u0275mod=Xe({type:tm}),tm.\u0275inj=ct({providers:[gh]});let c1=((nm=class{constructor(t){this.iconPath=t.iconPath}displayErrorMessage(t){this.displayMessage("Error",t,"error")}displaySuccessMessage(t){this.displayMessage("Success",t,"success")}displayInfoMessage(t){this.displayMessage("Info",t,"info")}displayMessage(t,e,i){let r;return r=new Notification(i,{body:e,icon:this.iconPath+"/"+i+".png"}),r}}).\u0275prov=H({token:nm,factory:nm.\u0275fac}),nm);c1=function fie(n,t,e,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,t,e,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(t,e,o):s(t,e))||o);return r>3&&o&&Object.defineProperty(t,e,o),o}([Ny("config"),function pie(n,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,t)}("design:paramtypes",[eu])],c1);class im{}im.\u0275fac=function(t){return new(t||im)},im.\u0275mod=Xe({type:im}),im.\u0275inj=ct({providers:[eu,c1]});class rm{constructor(t){this._http=t}request(t){t.method||(t.method="GET");const e={params:new ps};return t.params&&Object.keys(t.params).forEach(i=>{e.params=e.params.set(i,t.params[i])}),this._http.request(new Oa(t.method,t.url,t.body,{params:e.params})).pipe(Tn(i=>i.type===An.Response),fe(i=>{try{return i.body}catch{return i}}))}requestView(t){t.method||(t.method="GET");const e={headers:new Yr,params:new ps};return t.params&&Object.keys(t.params).forEach(i=>{e.params=e.params.set(i,t.params[i])}),this._http.request(new Oa(t.method,t.url,t.body,{params:e.params})).pipe(Tn(i=>i.type===An.Response),fe(i=>new NM(i)))}subscribeTo(t){return Le({error:t})}}function qF(n,t){return n.replace(/{(\d+)}/g,(e,i)=>typeof t[i]<"u"?t[i]:e)}rm.\u0275fac=function(t){return new(t||rm)(F(ar))},rm.\u0275prov=H({token:rm,factory:rm.\u0275fac});class om{constructor(){this.display=!1}show(){this.display=!0}hide(){this.display=!1}}om.\u0275fac=function(t){return new(t||om)},om.\u0275prov=H({token:om,factory:om.\u0275fac,providedIn:"root"});class yh{constructor(t){this.coreWebService=t,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(fe(t=>t))}getUserPermissions(t,e=[],i=[]){let r=e.length?`${this.userPermissionsUrl}&permission={1}`:this.userPermissionsUrl;r=i.length?`${r}&permissiontype={2}`:r;const o=qF(r,[t,e.join(","),i.join(",")]);return this.coreWebService.requestView({url:o}).pipe(Et(1),Ie("entity"))}hasAccessToPortlet(t){return this.coreWebService.requestView({url:this.porletAccessUrl.replace("{0}",t)}).pipe(Et(1),Ie("entity","response"))}}yh.\u0275fac=function(t){return new(t||yh)(F(Ht))},yh.\u0275prov=H({token:yh,factory:yh.\u0275fac});class sm{constructor(t,e){this.coreWebService=t,this.currentUser=e,this.bundleUrl="api/bundle/getunsendbundles/userid",this.addToBundleUrl="/DotAjaxDirector/com.dotcms.publisher.ajax.RemotePublishAjaxAction/cmd/addToBundle"}getBundles(){return this.currentUser.getCurrentUser().pipe(ni(t=>this.coreWebService.requestView({url:`${this.bundleUrl}/${t.userId}`}).pipe(Ie("bodyJsonObject","items"))))}addToBundle(t,e){return this.coreWebService.request({body:`assetIdentifier=${t}&bundleName=${e.name}&bundleSelect=${e.id}`,headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"POST",url:this.addToBundleUrl}).pipe(fe(i=>i))}}sm.\u0275fac=function(t){return new(t||sm)(F(Ht),F(yh))},sm.\u0275prov=H({token:sm,factory:sm.\u0275fac});const QF=n=>{const t=parseInt(n,0);if(t)return t;try{return JSON.parse(n)}catch{return n}};class _h{setItem(t,e){let i;i="object"==typeof e?JSON.stringify(e):e,localStorage.setItem(t,i)}getItem(t){const e=localStorage.getItem(t);return QF(e)}removeItem(t){localStorage.removeItem(t)}clear(){localStorage.clear()}listen(t){return Mv(window,"storage").pipe(Tn(({key:e})=>e===t),fe(e=>QF(e.newValue)))}}_h.\u0275fac=function(t){return new(t||_h)},_h.\u0275prov=H({token:_h,factory:_h.\u0275fac,providedIn:"root"});class Zr{constructor(t,e){this.http=t,this.dotLocalstorageService=e,this.messageMap={},this.MESSAGES_LOCALSTORAGE_KEY="dotMessagesKeys",this.BUILDATE_LOCALSTORAGE_KEY="buildDate"}init(t){if(t&&(this.dotLocalstorageService.getItem(this.BUILDATE_LOCALSTORAGE_KEY)!==t?.buildDate||t.language))this.getAll(t.language||"default"),t.buildDate&&this.dotLocalstorageService.setItem(this.BUILDATE_LOCALSTORAGE_KEY,t.buildDate);else{const e=this.dotLocalstorageService.getItem(this.MESSAGES_LOCALSTORAGE_KEY);e?this.messageMap=e:this.getAll(t?.language||"default")}}get(t,...e){return this.messageMap[t]?e.length?qF(this.messageMap[t],e):this.messageMap[t]:t}getAll(t){this.http.get(this.geti18nURL(t)).pipe(Et(1),Ie("entity")).subscribe(e=>{this.messageMap=e,this.dotLocalstorageService.setItem(this.MESSAGES_LOCALSTORAGE_KEY,this.messageMap)})}geti18nURL(t){return`/api/v2/languages/${t||"default"}/keys`}}Zr.\u0275fac=function(t){return new(t||Zr)(F(ar),F(_h))},Zr.\u0275prov=H({token:Zr,factory:Zr.\u0275fac,providedIn:"root"});class am{constructor(t,e){this.confirmationService=t,this.dotMessageService=e,this.alertModel=null,this.confirmModel=null,this._confirmDialogOpened$=new ae}get confirmDialogOpened$(){return this._confirmDialogOpened$.asObservable()}confirm(t){t.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),reject:this.dotMessageService.get("dot.common.dialog.reject"),...t.footerLabel},this.confirmModel=t,setTimeout(()=>{this.confirmationService.confirm(t),this._confirmDialogOpened$.next(!0)},0)}alert(t){t.footerLabel={accept:this.dotMessageService.get("dot.common.dialog.accept"),...t.footerLabel},this.alertModel=t,setTimeout(()=>{this._confirmDialogOpened$.next(!0)},0)}alertAccept(t){this.alertModel.accept&&this.alertModel.accept(t),this.alertModel=null}alertReject(t){this.alertModel.reject&&this.alertModel.reject(t),this.alertModel=null}clearConfirm(){this.confirmModel=null}}am.\u0275fac=function(t){return new(t||am)(F(LL),F(Zr))},am.\u0275prov=H({token:am,factory:am.\u0275fac});class vh{constructor(t){this.http=t}getFiltered(t,e,i=!1){return this.http.get(`/api/v1/containers/?filter=${t}&perPage=${e}&system=${i}`).pipe(Ie("entity"))}}function wie(n,t,e){return 0===e?[t]:(n.push(t),n)}vh.\u0275fac=function(t){return new(t||vh)(F(ar))},vh.\u0275prov=H({token:vh,factory:vh.\u0275fac});class lm{constructor(t){this.coreWebService=t}getContentType(t){return this.coreWebService.requestView({url:`v1/contenttype/id/${t}`}).pipe(Et(1),Ie("entity"))}getContentTypes({filter:t="",page:e=40,type:i=""}){return this.coreWebService.requestView({url:`/api/v1/contenttype?filter=${t}&orderby=name&direction=ASC&per_page=${e}${i?`&type=${i}`:""}`}).pipe(Ie("entity"))}getAllContentTypes(){return this.getBaseTypes().pipe(vf(t=>t),Tn(t=>!this.isRecentContentType(t))).pipe(function Cie(){return function bie(n,t){return arguments.length>=2?function(i){return pe(Rv(n,t),kp(1),rh(t))(i)}:function(i){return pe(Rv((r,o,s)=>n(r,o,s+1)),kp(1))(i)}}(wie,[])}())}filterContentTypes(t="",e=""){return this.coreWebService.requestView({body:{filter:{types:e,query:t},orderBy:"name",direction:"ASC",perPage:40},method:"POST",url:"/api/v1/contenttype/_filter"}).pipe(Ie("entity"))}getUrlById(t){return this.getBaseTypes().pipe(vf(e=>e),Ie("types"),vf(e=>e),Tn(e=>e.variable.toLocaleLowerCase()===t),Ie("action"))}isContentTypeInMenu(t){return this.getUrlById(t).pipe(fe(e=>!!e),rh(!1))}saveCopyContentType(t,e){return this.coreWebService.requestView({body:{...e},method:"POST",url:`/api/v1/contenttype/${t}/_copy`}).pipe(Ie("entity"))}isRecentContentType(t){return t.name.startsWith("RECENT")}getBaseTypes(){return this.coreWebService.requestView({url:"v1/contenttype/basetypes"}).pipe(Ie("entity"))}}lm.\u0275fac=function(t){return new(t||lm)(F(Ht))},lm.\u0275prov=H({token:lm,factory:lm.\u0275fac});class cm{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(t){return this.getItem(t,"icon")}getClazz(t){return this.getItem(t,"clazz")}getLabel(t){return this.getItem(t,"label")}getItem(t,e){let i,r=!1;if(t.indexOf("_old")>0&&(r=!0,t=t.replace("_old","")),t){t=this.getTypeName(t);for(let o=0;or.lift(function Die({bufferSize:n=Number.POSITIVE_INFINITY,windowTime:t=Number.POSITIVE_INFINITY,refCount:e,scheduler:i}){let r,s,o=0,a=!1,l=!1;return function(u){let d;o++,!r||a?(a=!1,r=new $_(n,t,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&&e&&0===o&&(s.unsubscribe(),s=void 0,r=void 0)})}}(i))}dm.\u0275fac=function(t){return new(t||dm)(F(Ht))},dm.\u0275prov=H({token:dm,factory:dm.\u0275fac});class hm{constructor(t){this.http=t}copyInPage(t){const e={...t,personalization:t?.personalization||"dot:default"};return this.http.put("/api/v1/page/copyContent",e).pipe(ZF(),Ie("entity"))}}hm.\u0275fac=function(t){return new(t||hm)(F(ar))},hm.\u0275prov=H({token:hm,factory:hm.\u0275fac,providedIn:"root"});class fm{constructor(t){this.coreWebService=t}postData(t,e){return this.coreWebService.requestView({body:e,method:"POST",url:`${t}`}).pipe(Ie("entity"))}putData(t,e){return this.coreWebService.requestView({body:e,method:"PUT",url:`${t}`}).pipe(Ie("entity"))}getDataById(t,e,i="entity"){return this.coreWebService.requestView({url:`${t}/id/${e}`}).pipe(Ie(i))}delete(t,e){return this.coreWebService.requestView({method:"DELETE",url:`${t}/${e}`}).pipe(Ie("entity"))}}fm.\u0275fac=function(t){return new(t||fm)(F(Ht))},fm.\u0275prov=H({token:fm,factory:fm.\u0275fac});class pm{constructor(t){this.coreWebService=t}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(Ie("contentlets"))}}pm.\u0275fac=function(t){return new(t||pm)(F(Ht))},pm.\u0275prov=H({token:pm,factory:pm.\u0275fac});class ja{setVariationId(t){sessionStorage.setItem(Jp,t)}getVariationId(){return sessionStorage.getItem(Jp)||"DEFAULT"}removeVariantId(){sessionStorage.removeItem(Jp)}}ja.\u0275fac=function(t){return new(t||ja)},ja.\u0275prov=H({token:ja,factory:ja.\u0275fac});class mm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}save(t,e){const i={method:"POST",body:e,url:`v1/page/${t}/content`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Ie("entity"))}whatChange(t,e){return this.coreWebService.requestView({url:`v1/page/${t}/render/versions?langId=${e}`}).pipe(Ie("entity"))}}mm.\u0275fac=function(t){return new(t||mm)(F(Ht),F(ja))},mm.\u0275prov=H({token:mm,factory:mm.\u0275fac});var ob=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(ob||(ob={})),ob))();class gm{constructor(t){this.coreWebService=t,this._paginationPerPage=40,this._offset="0",this._url="/api/content/_search",this._defaultQueryParams={"+languageId":"1","+deleted":"false","+working":"true"},this._sortField="modDate",this._sortOrder=ob.DESC,this._extraParams=new Map(Object.entries(this._defaultQueryParams))}get(t){this.setBaseParams(t);const e=this.getESQuery(t,this.getObjectFromMap(this._extraParams));return this.coreWebService.requestView({body:JSON.stringify(e),method:"POST",url:this._url}).pipe(Ie("entity"),Et(1))}setExtraParams(t,e){null!=e&&this._extraParams.set(t,e.toString())}getESQuery(t,e){return{query:`${t.query} ${JSON.stringify(e).replace(/["{},]/g," ")}`,sort:`${this._sortField||""} ${this._sortOrder||""}`,limit:this._paginationPerPage,offset:this._offset}}setBaseParams(t){this._extraParams.clear(),this._paginationPerPage=t.itemsPerPage||this._paginationPerPage,this._sortField=t.sortField||this._sortField,this._sortOrder=t.sortOrder||this._sortOrder,this._offset=t.offset||this._offset,t.lang&&this.setExtraParams("+languageId",t.lang);let e=t.filter||"";e&&e.indexOf(" ")>0&&(e=`'${e.replace(/'/g,"\\'")}'`),e&&this.setExtraParams("+title",`${e}*`)}getObjectFromMap(t){return Array.from(t).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}}gm.\u0275fac=function(t){return new(t||gm)(F(Ht))},gm.\u0275prov=H({token:gm,factory:gm.\u0275fac});class bh{constructor(){this.subject=new ae}listen(t){return this.subject.asObservable().pipe(Tn(e=>e.name===t))}notify(t,e){this.subject.next({name:t,data:e})}}bh.\u0275fac=function(t){return new(t||bh)},bh.\u0275prov=H({token:bh,factory:bh.\u0275fac});class ym{constructor(){this.data=new ae}get showDialog$(){return this.data.asObservable()}open(t){this.data.next(t)}}ym.\u0275fac=function(t){return new(t||ym)},ym.\u0275prov=H({token:ym,factory:ym.\u0275fac});class _m{constructor(t){this.coreWebService=t}get(t){return this.coreWebService.requestView({url:t?`v2/languages?contentInode=${t}`:"v2/languages"}).pipe(Ie("entity"))}}_m.\u0275fac=function(t){return new(t||_m)(F(Ht))},_m.\u0275prov=H({token:_m,factory:_m.\u0275fac});const Sie=[{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 vm{constructor(t){this.coreWebService=t,this.unlicenseData=new Kr({icon:"",titleKey:"",url:""}),this.licenseURL="v1/appconfiguration"}isEnterprise(){return this.getLicense().pipe(fe(t=>t.level>=200))}canAccessEnterprisePortlet(t){return this.isEnterprise().pipe(Et(1),fe(e=>{const i=this.checksIfEnterpriseUrl(t);return!i||i&&e}))}checksIfEnterpriseUrl(t){const e=Sie.filter(i=>0===t.indexOf(i.url));return e.length&&this.unlicenseData.next(...e),!!e.length}getLicense(){return this.license?Le(this.license):this.coreWebService.requestView({url:this.licenseURL}).pipe(Ie("entity","config","license"),hn(t=>{this.setLicense(t)}))}updateLicense(){this.coreWebService.requestView({url:this.licenseURL}).pipe(Ie("entity","config","license")).subscribe(t=>{this.setLicense(t)})}setLicense(t){this.license={...t}}}vm.\u0275fac=function(t){return new(t||vm)(F(Ht))},vm.\u0275prov=H({token:vm,factory:vm.\u0275fac});class bm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}save(t,e){const i={body:e,method:"POST",url:`v1/page/${t}/layout`},r=this.dotSessionStorageService.getVariationId();return r&&(i.params={variantName:r}),this.coreWebService.requestView(i).pipe(Ie("entity"),fe(o=>new die(o)))}}bm.\u0275fac=function(t){return new(t||bm)(F(Ht),F(ja))},bm.\u0275prov=H({token:bm,factory:bm.\u0275fac});class wm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}checkPermission(t){return this.coreWebService.requestView({body:{...t},method:"POST",url:"v1/page/_check-permission"}).pipe(Ie("entity"))}get({viewAs:t,mode:e,url:i},r){const o=this.getOptionalViewAsParams(t,e);return this.coreWebService.requestView({url:`v1/page/render/${i?.replace(/^\//,"")}`,params:{...r,...o}}).pipe(Ie("entity"))}getOptionalViewAsParams(t={},e=ib.PREVIEW){return{...this.getPersonaParam(t.persona),...this.getDeviceParam(t.device),...this.getLanguageParam(t.language),...this.getModeParam(e),variantName:this.dotSessionStorageService.getVariationId()}}getModeParam(t){return t?{mode:t}:{}}getPersonaParam(t){return t?{"com.dotmarketing.persona.id":t.identifier||""}:{}}getDeviceParam(t){return t?{device_inode:t.inode}:{}}getLanguageParam(t){return t?{language_id:t.toString()}:{}}}wm.\u0275fac=function(t){return new(t||wm)(F(Ht),F(ja))},wm.\u0275prov=H({token:wm,factory:wm.\u0275fac});class Cm{constructor(t){this.coreWebService=t}getPages(t=""){return this.coreWebService.requestView({url:`/api/v1/page/types?filter=${t}`}).pipe(Et(1),Ie("entity"))}}Cm.\u0275fac=function(t){return new(t||Cm)(F(Ht))},Cm.\u0275prov=H({token:Cm,factory:Cm.\u0275fac});class Dm{constructor(t){this.http=t}getByUrl(t){return this.http.post("/api/v1/page/actions",{host_id:t.host_id,language_id:t.language_id,url:t.url,renderMode:t.renderMode}).pipe(Ie("entity"))}}Dm.\u0275fac=function(t){return new(t||Dm)(F(ar))},Dm.\u0275prov=H({token:Dm,factory:Dm.\u0275fac});class Tm{constructor(t,e){this.coreWebService=t,this.dotSessionStorageService=e}personalized(t,e){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"POST",url:"/api/v1/personalization/pagepersonas",params:{variantName:i},body:{pageId:t,personaTag:e}}).pipe(Ie("entity"))}despersonalized(t,e){const i=this.dotSessionStorageService.getVariationId();return this.coreWebService.requestView({method:"DELETE",url:`/api/v1/personalization/pagepersonas/page/${t}/personalization/${e}`,params:{variantName:i}}).pipe(Ie("entity"))}}Tm.\u0275fac=function(t){return new(t||Tm)(F(Ht),F(ja))},Tm.\u0275prov=H({token:Tm,factory:Tm.\u0275fac});class Mm{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:"content/respectFrontendRoles/false/render/false/query/+contentType:persona +live:true +deleted:false +working:true"}).pipe(Ie("contentlets"))}}Mm.\u0275fac=function(t){return new(t||Mm)(F(Ht))},Mm.\u0275prov=H({token:Mm,factory:Mm.\u0275fac});class Sm{constructor(t){this.http=t}getKey(t){return this.http.get("/api/v1/configuration/config",{params:{keys:t}}).pipe(Et(1),Ie("entity",t))}getKeys(t){return this.http.get("/api/v1/configuration/config",{params:{keys:t.join()}}).pipe(Et(1),Ie("entity"))}getKeyAsList(t){return this.http.get("/api/v1/configuration/config",{params:{keys:`list:${t}`}}).pipe(Et(1),Ie("entity",t))}getFeatureFlag(t){return this.getKey(t).pipe(fe(e=>"true"===e))}getFeatureFlags(t){return this.getKeys(t).pipe(fe(e=>Object.keys(e).reduce((i,r)=>(i[r]="true"===e[r],i),{})))}}Sm.\u0275fac=function(t){return new(t||Sm)(F(ar))},Sm.\u0275prov=H({token:Sm,factory:Sm.\u0275fac,providedIn:"root"});class Em{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:"/api/v1/pushpublish/filters/"}).pipe(Ie("entity"))}}Em.\u0275fac=function(t){return new(t||Em)(F(Ht))},Em.\u0275prov=H({token:Em,factory:Em.\u0275fac});class xm{constructor(t,e){this.dotMessageService=t,this.coreWebService=e}get(t,e){return this.coreWebService.requestView({url:`/api/v1/roles/${t}/rolehierarchyanduserroles?roleHierarchyForAssign=${e}`}).pipe(Ie("entity"),fe(this.processRolesResponse.bind(this)))}search(){return this.coreWebService.requestView({url:"/api/v1/roles/_search"}).pipe(Ie("entity"),fe(this.processRolesResponse.bind(this)))}processRolesResponse(t){return t.filter(e=>"anonymous"!==e.roleKey).map(e=>("CMS Anonymous"===e.roleKey?e.name=this.dotMessageService.get("current-user"):e.user&&(e.name=`${e.name}`),e))}}xm.\u0275fac=function(t){return new(t||xm)(F(Zr),F(Ht))},xm.\u0275prov=H({token:xm,factory:xm.\u0275fac});class wh{constructor(t){this.http=t,this.BASE_SITE_URL="/api/v1/site",this.params={archived:!1,live:!0,system:!0},this.defaultPerpage=10}set searchParam(t){this.params=t}getSites(t="*",e){return this.http.get(this.siteURL(t,e)).pipe(Ie("entity"))}siteURL(t,e){const r=`filter=${t}&perPage=${e||this.defaultPerpage}&${this.getQueryParams()}`;return`${this.BASE_SITE_URL}?${r}`}getQueryParams(){return Object.keys(this.params).map(t=>`${t}=${this.params[t]}`).join("&")}}wh.\u0275fac=function(t){return new(t||wh)(F(ar))},wh.\u0275prov=H({token:wh,factory:wh.\u0275fac,providedIn:"root"});class Im{constructor(t){this.coreWebService=t}setSelectedFolder(t){return this.coreWebService.requestView({body:{path:t},method:"PUT",url:"/api/v1/browser/selectedfolder"}).pipe(Et(1))}}Im.\u0275fac=function(t){return new(t||Im)(F(Ht))},Im.\u0275prov=H({token:Im,factory:Im.\u0275fac});class Om{constructor(t){this.coreWebService=t}getSuggestions(t){return this.coreWebService.requestView({url:"v1/tags"+(t?`?name=${t}`:"")}).pipe(Ie("bodyJsonObject"),fe(e=>Object.entries(e).map(([i,r])=>r)))}}Om.\u0275fac=function(t){return new(t||Om)(F(Ht))},Om.\u0275prov=H({token:Om,factory:Om.\u0275fac});class Am{constructor(t){this.coreWebService=t}get(t){return this.coreWebService.requestView({url:"v1/themes/id/"+t}).pipe(Ie("entity"))}}function JF(n,t,e,i,r,o,s){try{var a=n[o](s),l=a.value}catch(c){return void e(c)}a.done?t(l):Promise.resolve(l).then(i,r)}function Dl(n){return function(){var t=this,e=arguments;return new Promise(function(i,r){var o=n.apply(t,e);function s(l){JF(o,i,r,s,a,"next",l)}function a(l){JF(o,i,r,s,a,"throw",l)}s(void 0)})}}Am.\u0275fac=function(t){return new(t||Am)(F(Ht))},Am.\u0275prov=H({token:Am,factory:Am.\u0275fac});const xie={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"};class Ch{uploadFile({file:t,maxSize:e,signal:i}){return"string"==typeof t?this.uploadFileByURL(t,i):this.uploadBinaryFile({file:t,maxSize:e,signal:i})}uploadFileByURL(t,e){return fetch("/api/v1/temp/byUrl",{method:"POST",signal:e,headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:t})}).then(function(){var r=Dl(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:t,maxSize:e,signal:i}){let r="/api/v1/temp";r+=e?`?maxFileLength=${e}`:"";const o=new FormData;return o.append("file",t),fetch(r,{method:"POST",signal:i,headers:{Origin:window.location.hostname},body:o}).then(function(){var s=Dl(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(t,e){let i="";try{i=t.message||t.errors[0].message}catch{i=xie[e||500]}return{message:i,status:500|e}}}Ch.\u0275fac=function(t){return new(t||Ch)},Ch.\u0275prov=H({token:Ch,factory:Ch.\u0275fac,providedIn:"root"});class km{constructor(t){this.coreWebService=t}bringBack(t){return this.coreWebService.requestView({method:"PUT",url:`/api/v1/versionables/${t}/_bringback`}).pipe(Ie("entity"))}}km.\u0275fac=function(t){return new(t||km)(F(Ht))},km.\u0275prov=H({token:km,factory:km.\u0275fac});var tu=(()=>(function(n){n.NEW="NEW",n.DESTROY="DESTROY",n.PUBLISH="PUBLISH",n.EDIT="EDIT"}(tu||(tu={})),tu))();class Nm{constructor(t){this.coreWebService=t}fireTo(t,e,i){return this.coreWebService.requestView({body:i,method:"PUT",url:`v1/workflow/actions/${e}/fire?inode=${t}&indexPolicy=WAIT_FOR`}).pipe(Ie("entity"))}bulkFire(t){return this.coreWebService.requestView({body:t,method:"PUT",url:"/api/v1/workflow/contentlet/actions/bulk/fire"}).pipe(Ie("entity"))}newContentlet(t,e){return this.request({contentType:t,data:e,action:tu.NEW})}publishContentlet(t,e,i){return this.request({contentType:t,data:e,action:tu.PUBLISH,individualPermissions:i})}saveContentlet(t){return this.request({data:t,action:tu.EDIT})}deleteContentlet(t){return this.request({data:t,action:tu.DESTROY})}publishContentletAndWaitForIndex(t,e,i){return this.publishContentlet(t,{...e,indexPolicy:"WAIT_FOR"},i)}request({contentType:t,data:e,action:i,individualPermissions:r}){const o=t?{contentType:t,...e}:e;return this.coreWebService.requestView({method:"PUT",url:`v1/workflow/actions/default/fire/${i}${e.inode?`?inode=${e.inode}`:""}`,body:r?{contentlet:o,individualPermissions:r}:{contentlet:o}}).pipe(Et(1),Ie("entity"))}}Nm.\u0275fac=function(t){return new(t||Nm)(F(Ht))},Nm.\u0275prov=H({token:Nm,factory:Nm.\u0275fac});class Pm{constructor(t){this.coreWebService=t}get(){return this.coreWebService.requestView({url:"v1/workflow/schemes"}).pipe(Ie("entity"))}getSystem(){return this.get().pipe(ai(t=>t.filter(e=>e.system)),Et(1))}}Pm.\u0275fac=function(t){return new(t||Pm)(F(Ht))},Pm.\u0275prov=H({token:Pm,factory:Pm.\u0275fac});class Lm{constructor(t){this.coreWebService=t}getByWorkflows(t=[]){return this.coreWebService.requestView({method:"POST",url:"/api/v1/workflow/schemes/actions/NEW",body:{schemes:t.map(this.getWorkFlowId)}}).pipe(Ie("entity"))}getByInode(t,e){return this.coreWebService.requestView({url:`v1/workflow/contentlet/${t}/actions${e?`?renderMode=${e}`:""}`}).pipe(Ie("entity"))}getWorkFlowId(t){return t&&t.id}}Lm.\u0275fac=function(t){return new(t||Lm)(F(Ht))},Lm.\u0275prov=H({token:Lm,factory:Lm.\u0275fac});var sb=(()=>(function(n){n[n.ASC=1]="ASC",n[n.DESC=-1]="DESC"}(sb||(sb={})),sb))();class Qi{constructor(t){this.coreWebService=t,this.links={},this.paginationPerPage=40,this._extraParams=new Map}get url(){return this._url}set url(t){this._url!==t&&(this.links={},this._url=t)}get filter(){return this._filter}set filter(t){this._filter!==t&&(this.links={},this._filter=t)}set searchParam(t){this._searchParam!==t&&(this.links=t.length>0?{}:this.links,this._searchParam=t)}get searchParam(){return this._searchParam}setExtraParams(t,e){null!=e&&(this.extraParams.set(t,e.toString()),this.links={})}deleteExtraParams(t){this.extraParams.delete(t)}resetExtraParams(){this.extraParams.clear()}get extraParams(){return this._extraParams}get sortField(){return this._sortField}set sortField(t){this._sortField!==t&&(this.links={},this._sortField=t)}get sortOrder(){return this._sortOrder}set sortOrder(t){this._sortOrder!==t&&(this.links={},this._sortOrder=t)}get(t){const e={...this.getParams(),...this.getObjectFromMap(this.extraParams)},i=this.sanitizeQueryParams(t,e);return this.coreWebService.requestView({params:e,url:i||this.url}).pipe(fe(r=>(this.setLinks(r.header(Qi.LINK_HEADER_NAME)),this.paginationPerPage=parseInt(r.header(Qi.PAGINATION_PER_PAGE_HEADER_NAME),10),this.currentPage=parseInt(r.header(Qi.PAGINATION_CURRENT_PAGE_HEADER_NAME),10),this.maxLinksPage=parseInt(r.header(Qi.PAGINATION_MAX_LINK_PAGES_HEADER_NAME),10),this.totalRecords=parseInt(r.header(Qi.PAGINATION_TOTAL_ENTRIES_HEADER_NAME),10),r.entity)),Et(1))}getLastPage(){return this.get(this.links.last)}getFirstPage(){return this.get(this.links.first)}getPage(t=1){const e=this.links["x-page"]?this.links["x-page"].replace("pageValue",String(t)):void 0;return this.get(e)}getCurrentPage(){return this.getPage(this.currentPage)}getNextPage(){return this.get(this.links.next)}getPrevPage(){return this.get(this.links.prev)}getWithOffset(t){const e=this.getPageFromOffset(t);return this.getPage(e)}getPageFromOffset(t){return parseInt(String(t/this.paginationPerPage),10)+1}setLinks(t){(t?.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 t=new Map;return this.filter&&t.set("filter",this.filter),this.searchParam&&t.set("searchParam",this.searchParam),this.sortField&&t.set("orderby",this.sortField),this.sortOrder&&t.set("direction",sb[this.sortOrder]),this.paginationPerPage&&t.set("per_page",String(this.paginationPerPage)),this.getObjectFromMap(t)}getObjectFromMap(t){return Array.from(t).reduce((i,[r,o])=>Object.assign(i,{[r]:o}),{})}sanitizeQueryParams(t="",e){const i=t?.split("?"),r=i[0],o=i[1];if(!o)return t;const s=new URLSearchParams(o);for(const a in e)s.delete(a);return s.toString()?`${r}?${s.toString()}`:r}}Qi.LINK_HEADER_NAME="Link",Qi.PAGINATION_PER_PAGE_HEADER_NAME="X-Pagination-Per-Page",Qi.PAGINATION_CURRENT_PAGE_HEADER_NAME="X-Pagination-Current-Page",Qi.PAGINATION_MAX_LINK_PAGES_HEADER_NAME="X-Pagination-Link-Pages",Qi.PAGINATION_TOTAL_ENTRIES_HEADER_NAME="X-Pagination-Total-Entries",Qi.\u0275fac=function(t){return new(t||Qi)(F(Ht))},Qi.\u0275prov=H({token:Qi,factory:Qi.\u0275fac});class Rm{constructor(t){this.http=t,this.seoToolsUrl="assets/seo/page-tools.json"}get(){return this.http.get(this.seoToolsUrl).pipe(Ie("pageTools"))}}function ur(n){this.content=n}Rm.\u0275fac=function(t){return new(t||Rm)(F(ar))},Rm.\u0275prov=H({token:Rm,factory:Rm.\u0275fac}),ur.prototype={constructor:ur,find:function(n){for(var t=0;t>1}},ur.from=function(n){if(n instanceof ur)return n;var t=[];if(n)for(var e in n)t.push(e,n[e]);return new ur(t)};const XF=ur;function ej(n,t,e){for(let i=0;;i++){if(i==n.childCount||i==t.childCount)return n.childCount==t.childCount?null:e;let r=n.child(i),o=t.child(i);if(r!=o){if(!r.sameMarkup(o))return e;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)e++;return e}if(r.content.size||o.content.size){let s=ej(r.content,o.content,e+1);if(null!=s)return s}e+=r.nodeSize}else e+=r.nodeSize}}function tj(n,t,e,i){for(let r=n.childCount,o=t.childCount;;){if(0==r||0==o)return r==o?null:{a:e,b:i};let s=n.child(--r),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:e,b:i};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ct&&!1!==i(l,r+a,o||null,s)&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,e-u),i,r+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,i,r){let o="",s=!0;return this.nodesBetween(t,e,(a,l)=>{a.isText?(o+=a.text.slice(Math.max(t,l)-l,e-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(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,i=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(i)&&(r[r.length-1]=e.withText(e.text+i.text),o=1);ot)for(let o=0,s=0;st&&((se)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,e-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,e-s-1))),i.push(a),r+=a.nodeSize),s=l}return new ce(i,r)}cutByIndex(t,e){return t==e?ce.empty:0==t&&e==this.content.length?this:new ce(this.content.slice(t,e))}replaceChild(t,e){let i=this.content[t];if(i==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-i.nodeSize;return r[t]=e,new ce(r,o)}addToStart(t){return new ce([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ce(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let i=0,r=0;;i++){let s=r+this.child(i).nodeSize;if(s>=t)return s==t||e>0?ab(i+1,s):ab(i,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return ce.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new ce(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ce.empty;let e,i=0;for(let r=0;r{class n{constructor(e,i){this.type=e,this.attrs=i}addToSet(e){let i,r=!1;for(let o=0;othis.type.rank&&(i||(i=e.slice(0,o)),i.push(this),r=!0),i&&i.push(s)}}return i||(i=e.slice()),r||i.push(this),i}removeFromSet(e){for(let i=0;ir.type.rank-o.type.rank),i}}return n.none=[],n})();class cb extends Error{}class De{constructor(t,e,i){this.content=t,this.openStart=e,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let i=ij(this.content,t+this.openStart,e);return i&&new De(i,this.openStart,this.openEnd)}removeBetween(t,e){return new De(nj(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return De.empty;let i=e.openStart||0,r=e.openEnd||0;if("number"!=typeof i||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new De(ce.fromJSON(t,e.content),i,r)}static maxOpen(t,e=!0){let i=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new De(t,i,r)}}function nj(n,t,e){let{index:i,offset:r}=n.findIndex(t),o=n.maybeChild(i),{index:s,offset:a}=n.findIndex(e);if(r==t||o.isText){if(a!=e&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,t).append(n.cut(e))}if(i!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(i,o.copy(nj(o.content,t-r-1,e-r-1)))}function ij(n,t,e,i){let{index:r,offset:o}=n.findIndex(t),s=n.maybeChild(r);if(o==t||s.isText)return i&&!i.canReplace(r,r,e)?null:n.cut(0,t).append(e).append(n.cut(t));let a=ij(s.content,t-o-1,e);return a&&n.replaceChild(r,s.copy(a))}function Iie(n,t,e){if(e.openStart>n.depth)throw new cb("Inserted content deeper than insertion position");if(n.depth-e.openStart!=t.depth-e.openEnd)throw new cb("Inconsistent open depths");return rj(n,t,e,0)}function rj(n,t,e,i){let r=n.index(i),o=n.node(i);if(r==t.index(i)&&i=0;o--)r=t.node(o).copy(ce.from(r));return{start:r.resolveNoCache(n.openStart+e),end:r.resolveNoCache(r.content.size-n.openEnd-e)}}(e,n);return iu(o,sj(n,s,a,t,i))}{let s=n.parent,a=s.content;return iu(s,a.cut(0,n.parentOffset).append(e.content).append(a.cut(t.parentOffset)))}}return iu(o,ub(n,t,i))}function oj(n,t){if(!t.type.compatibleContent(n.type))throw new cb("Cannot join "+t.type.name+" onto "+n.type.name)}function d1(n,t,e){let i=n.node(e);return oj(i,t.node(e)),i}function nu(n,t){let e=t.length-1;e>=0&&n.isText&&n.sameMarkup(t[e])?t[e]=n.withText(t[e].text+n.text):t.push(n)}function Fm(n,t,e,i){let r=(t||n).node(e),o=0,s=t?t.index(e):r.childCount;n&&(o=n.index(e),n.depth>e?o++:n.textOffset&&(nu(n.nodeAfter,i),o++));for(let a=o;ar&&d1(n,t,r+1),s=i.depth>r&&d1(e,i,r+1),a=[];return Fm(null,n,r,a),o&&s&&t.index(r)==e.index(r)?(oj(o,s),nu(iu(o,sj(n,t,e,i,r+1)),a)):(o&&nu(iu(o,ub(n,t,r+1)),a),Fm(t,e,r,a),s&&nu(iu(s,ub(e,i,r+1)),a)),Fm(i,null,r,a),new ce(a)}function ub(n,t,e){let i=[];return Fm(null,n,e,i),n.depth>e&&nu(iu(d1(n,t,e+1),ub(n,t,e+1)),i),Fm(t,null,e,i),new ce(i)}De.empty=new De(ce.empty,0,0);class jm{constructor(t,e,i){this.pos=t,this.path=e,this.parentOffset=i,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=t.child(e);return i?t.child(e).cut(i):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let i=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;i--)if(t.pos<=this.end(i)&&(!e||e(this.node(i))))return new db(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let i=[],r=0,o=e;for(let s=t;;){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 jm(e,i,o)}static resolveCached(t,e){for(let r=0;rt&&this.nodesBetween(t,e,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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),aj(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,i=ce.empty,r=0,o=i.childCount){let s=this.contentMatchAt(t).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(let l=r;le.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(e=>e.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let i=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,i)}let r=ce.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,i)}}$s.prototype.text=void 0;class hb extends $s{constructor(t,e,i,r){if(super(t,e,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):aj(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new hb(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new hb(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function aj(n,t){for(let e=n.length-1;e>=0;e--)t=n[e].type.name+"("+t+")";return t}class ru{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let i=new Nie(t,e);if(null==i.next)return ru.empty;let r=lj(i);i.next&&i.err("Unexpected trailing text");let o=function Vie(n){let t=Object.create(null);return function e(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=t[i.join(",")]=new ru(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=e();return i(a,l),r(o(s.expr,l),l),[i(l)]}if("plus"==s.type){let l=e();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 Bie(n,t){for(let e=0,i=[n];ec.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(i){t.push(i);for(let r=0;r{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(i.next[s].next);return o}).join("\n")}}ru.empty=new ru(!0);class Nie{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.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(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function lj(n){let t=[];do{t.push(Pie(n))}while(n.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function Pie(n){let t=[];do{t.push(Lie(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function Lie(n){let t=function jie(n){if(n.eat("(")){let t=lj(n);return n.eat(")")||n.err("Missing closing paren"),t}if(!/\W/.test(n.next)){let t=function Fie(n,t){let e=n.nodeTypes,i=e[t];if(i)return[i];let r=[];for(let o in e){let s=e[o];s.groups.indexOf(t)>-1&&r.push(s)}return 0==r.length&&n.err("No node type or group '"+t+"' found"),r}(n,n.next).map(e=>(null==n.inline?n.inline=e.isInline:n.inline!=e.isInline&&n.err("Mixing inline and block content"),{type:"name",value:e}));return n.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}n.err("Unexpected token '"+n.next+"'")}(n);for(;;)if(n.eat("+"))t={type:"plus",expr:t};else if(n.eat("*"))t={type:"star",expr:t};else if(n.eat("?"))t={type:"opt",expr:t};else{if(!n.eat("{"))break;t=Rie(n,t)}return t}function cj(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let t=Number(n.next);return n.pos++,t}function Rie(n,t){let e=cj(n),i=e;return n.eat(",")&&(i="}"!=n.next?cj(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:e,max:i,expr:t}}function uj(n,t){return t-n}function dj(n,t){let e=[];return function i(r){let o=n[r];if(1==o.length&&!o[0].term)return i(o[0].to);e.push(r);for(let s=0;s-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;ei[o]=new fb(o,e,s));let r=e.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 Uie{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class pb{constructor(t,e,i,r){this.name=t,this.rank=e,this.schema=i,this.spec=r,this.attrs=pj(r.attrs),this.excluded=null;let o=hj(this.attrs);this.instance=o?new kn(this,o):null}create(t=null){return!t&&this.instance?this.instance:new kn(this,fj(this.attrs,t))}static compile(t,e){let i=Object.create(null),r=0;return t.forEach((o,s)=>i[o]=new pb(o,r++,e,s)),i}removeFromSet(t){for(var e=0;e-1}}class Hie{constructor(t){this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=XF.from(t.nodes),e.marks=XF.from(t.marks||{}),this.nodes=fb.compile(this.spec.nodes,this),this.marks=pb.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]=ru.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?mj(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?[]:mj(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(t,e=null,i,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof fb))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,i,r)}text(t,e){let i=this.nodes.text;return new hb(i,i.defaultAttrs,t,kn.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return $s.fromJSON(this,t)}markFromJSON(t){return kn.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function mj(n,t){let e=[];for(let i=0;i-1)&&e.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return e}class Dh{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.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=t.nodes[i.node];return r.contentMatch.matchType(r)})}parse(t,e={}){let i=new vj(this,e,!1);return i.addAll(t,e.from,e.to),i.finish()}parseSlice(t,e={}){let i=new vj(this,e,!0);return i.addAll(t,e.from,e.to),De.maxOpen(i.finish())}matchTag(t,e,i){for(let r=i?this.tags.indexOf(i)+1:0;rt.length&&(61!=a.charCodeAt(t.length)||a.slice(t.length+1)!=e))){if(s.getAttrs){let l=s.getAttrs(e);if(!1===l)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let e=[];function i(r){let o=null==r.priority?50:r.priority,s=0;for(;s{i(s=bj(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in t.nodes){let o=t.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=bj(s)),s.node||s.ignore||s.mark||(s.node=r)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Dh(t,Dh.schemaRules(t)))}}const gj={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},yj={ol:!0,ul:!0};function _j(n,t,e){return null!=t?(t?1:0)|("full"===t?2:0):n&&"pre"==n.whitespace?3:-5&e}class yb{constructor(t,e,i,r,o,s,a){this.type=t,this.attrs=e,this.marks=i,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=kn.none,this.stashMarks=[],this.match=s||(4&a?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(ce.from(t));if(!e){let r,i=this.type.contentMatch;return(r=i.findWrapping(t.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){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 e=ce.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(ce.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,i=this.pendingMarks;e{s.clearMark(a)&&(i=a.addToSet(i))}):e=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(e),!1!==s.consuming)break;o=s}return[e,i]}addElementByRule(t,e,i){let r,o,s;e.node?(o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs||null,e.preserveWhitespace)):(s=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,i);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;"string"==typeof e.contentElement?l=t.querySelector(e.contentElement):"function"==typeof e.contentElement?l=e.contentElement(t):e.contentElement&&(l=e.contentElement),this.findAround(t,l,!0),this.addAll(l)}r&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,e,i){let r=e||0;for(let o=e?t.childNodes[e]:t.firstChild,s=null==i?null:t.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o);this.findAtPoint(t,r)}findPlace(t){let e,i;for(let r=this.open;r>=0;r--){let o=this.nodes[r],s=o.findWrapping(t);if(s&&(!e||e.length>s.length)&&(e=s,i=o,!s.length)||o.solid)break}if(!e)return!1;this.sync(i);for(let r=0;rthis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));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(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let i=this.nodes[e].content;for(let r=i.length-1;r>=0;r--)t+=i[r].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let i=0;i-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.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=e[a];if(""==c){if(a==e.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(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let i=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let e in this.parser.schema.nodes){let i=this.parser.schema.nodes[e];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(t){let e=function Kie(n,t){for(let e=0;e=0;i--){let r=this.nodes[i];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let s=r.popFromStashMark(t);s&&r.type&&r.type.allowsMarkType(s.type)&&(r.activeMarks=s.addToSet(r.activeMarks))}if(r==e)break}}}function Gie(n,t){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,t)}function bj(n){let t={};for(let e in n)t[e]=n[e];return t}function qie(n,t){let e=t.schema.nodes;for(let i in e){let r=e[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(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,e,i={}){let r=this.marks[t.type.name];return r&&Ws.renderSpec(p1(i),r(t,e))}static renderSpec(t,e,i=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r=e[0],o=r.indexOf(" ");o>0&&(i=r.slice(0,o),r=r.slice(o+1));let s,a=i?t.createElementNS(i,r):t.createElement(r),l=e[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}=Ws.renderSpec(t,d,i);if(a.appendChild(h),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Ws(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=wj(t.nodes);return e.text||(e.text=i=>i.text),e}static marksFromSchema(t){return wj(t.marks)}}function wj(n){let t={};for(let e in n){let i=n[e].spec.toDOM;i&&(t[e]=i)}return t}function p1(n){return n.document||window.document}const Dj=Math.pow(2,16);function Qie(n,t){return n+t*Dj}function Tj(n){return 65535&n}class m1{constructor(t,e,i){this.pos=t,this.delInfo=e,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 Ho{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&Ho.empty)return Ho.empty}recover(t){let e=0,i=Tj(t);if(!this.inverted)for(let r=0;rt)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(t<=d){let f=l+r+((c?t==l?-1:t==d?1:e:e)<0?0:u);if(i)return f;let p=t==(e<0?l:d)?null:Qie(a/3,t-l),m=t==l?2:t==d?1:4;return(e<0?t!=l:t!=d)&&(m|=8),new m1(f,m,p)}r+=u-c}return i?t+r:new m1(t+r,0,null)}touches(t,e){let i=0,r=Tj(e),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+o];if(t<=l+c&&a==3*r)return!0;i+=this.ranges[a+s]-c}return!1}forEach(t){let e=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?i-r-1:void 0)}}invert(){let t=new Th;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let i=this.from;io&&ls.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,r),e.openStart,e.openEnd);return mi.fromReplace(t,this.from,this.to,o)}invert(){return new Gs(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new Tl(e.pos,i.pos,this.mark)}merge(t){return t instanceof Tl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Tl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Tl(e.from,e.to,t.markFromJSON(e.mark))}}ji.jsonID("addMark",Tl);class Gs extends ji{constructor(t,e,i){super(),this.from=t,this.to=e,this.mark=i}apply(t){let e=t.slice(this.from,this.to),i=new De(y1(e.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),e.openStart,e.openEnd);return mi.fromReplace(t,this.from,this.to,i)}invert(){return new Tl(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new Gs(e.pos,i.pos,this.mark)}merge(t){return t instanceof Gs&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Gs(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Gs(e.from,e.to,t.markFromJSON(e.mark))}}ji.jsonID("removeMark",Gs);class Ml extends ji{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return mi.fail("No node at mark step's position");let i=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return mi.fromReplace(t,this.pos,this.pos+1,new De(ce.from(i),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let i=this.mark.addToSet(e.marks);if(i.length==e.marks.length){for(let r=0;ri.pos?null:new zi(e.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new zi(e.from,e.to,e.gapFrom,e.gapTo,De.fromJSON(t,e.slice),e.insert,!!e.structure)}}function _1(n,t,e){let i=n.resolve(t),r=e-t,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 tre(n,t,e){return(0==t||n.canReplace(t,n.childCount))&&(e==n.childCount||n.canReplace(0,e))}function Sh(n){let e=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 Sl(n,t){let e=n.resolve(t),i=e.index();return Ij(e.nodeBefore,e.nodeAfter)&&e.parent.canReplace(i,i+1)}function Ij(n,t){return!(!n||!t||n.isLeaf||!n.canAppend(t))}function Oj(n,t,e=-1){let i=n.resolve(t);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):e>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&&Ij(o,s)&&i.node(r).canReplace(a,a+1))return t;if(0==r)break;t=e<0?i.before(r):i.after(r)}}function Aj(n,t,e){let i=n.resolve(t);if(!e.content.size)return t;let r=e.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 b1(n,t,e=t,i=De.empty){if(t==e&&!i.size)return null;let r=n.resolve(t),o=n.resolve(e);return kj(r,o,i)?new dr(t,e,i):new hre(r,o,i).fit()}function kj(n,t,e){return!e.openStart&&!e.openEnd&&n.start()==t.start()&&n.parent.canReplace(n.index(),t.index(),e.content)}ji.jsonID("replaceAround",zi);class hre{constructor(t,e,i){this.$from=t,this.$to=e,this.unplaced=i,this.frontier=[],this.placed=ce.empty;for(let r=0;r<=t.depth;r++){let o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=ce.from(t.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 t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(t<0?this.$to:i.doc.resolve(t));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 De(o,s,a);return t>-1?new zi(i.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||i.pos!=this.$to.pos?new dr(i.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,i=0,r=this.unplaced.openEnd;i1&&(r=0),o.type.spec.isolating&&r<=i){t=i;break}e=o.content}for(let e=1;e<=2;e++)for(let i=1==e?t:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=w1(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==e&&(s?c.matchType(s.type)||(d=c.fillBefore(ce.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(2==e&&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:t,openStart:e,openEnd:i}=this.unplaced,r=w1(t,e);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new De(t,e+1,Math.max(i,r.size+e>=t.size-i?e+1:0)),0))}dropNode(){let{content:t,openStart:e,openEnd:i}=this.unplaced,r=w1(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new De(Vm(t,e-1,1),e-1,o?e-1:i)}else this.unplaced=new De(Vm(t,e,1),e,i)}placeNodes({sliceDepth:t,frontierDepth:e,parent:i,inject:r,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let m=0;m1||0==l||m.content.size)&&(d=g,u.push(Nj(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=Bm(this.placed,e,ce.from(u)),this.frontier[e].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(t){e:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:i,type:r}=this.frontier[e],o=e=0;a--){let{match:l,type:c}=this.frontier[a],u=C1(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:e,fit:s,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Bm(this.placed,e.depth,e.fit)),t=e.move;for(let i=e.depth+1;i<=t.depth;i++){let r=t.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(i));this.openFrontierNode(r.type,r.attrs,o)}return t}openFrontierNode(t,e=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=Bm(this.placed,this.depth,ce.from(t.create(e,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(ce.empty,!0);e.childCount&&(this.placed=Bm(this.placed,this.frontier.length,e))}}function Vm(n,t,e){return 0==t?n.cutByIndex(e,n.childCount):n.replaceChild(0,n.firstChild.copy(Vm(n.firstChild.content,t-1,e)))}function Bm(n,t,e){return 0==t?n.append(e):n.replaceChild(n.childCount-1,n.lastChild.copy(Bm(n.lastChild.content,t-1,e)))}function w1(n,t){for(let e=0;e1&&(i=i.replaceChild(0,Nj(i.firstChild,t-1,1==i.childCount?e-1:0))),t>0&&(i=n.type.contentMatch.fillBefore(i).append(i),e<=0&&(i=i.append(n.type.contentMatch.matchFragment(i).fillBefore(ce.empty,!0)))),n.copy(i)}function C1(n,t,e,i,r){let o=n.node(t),s=r?n.indexAfter(t):n.index(t);if(s==o.childCount&&!e.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!function fre(n,t,e){for(let i=e;ii){let o=r.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(ce.empty,!0))}return n}function Lj(n,t){let e=[];for(let r=Math.min(n.depth,t.depth);r>=0;r--){let o=n.start(r);if(ot.pos+(t.depth-r)||n.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==n.depth&&r==t.depth&&n.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&e.push(r)}return e}class Eh extends ji{constructor(t,e,i){super(),this.pos=t,this.attr=e,this.value=i}apply(t){let e=t.nodeAt(this.pos);if(!e)return mi.fail("No node at attribute step's position");let i=Object.create(null);for(let o in e.attrs)i[o]=e.attrs[o];i[this.attr]=this.value;let r=e.type.create(i,null,e.marks);return mi.fromReplace(t,this.pos,this.pos+1,new De(ce.from(r),0,e.isLeaf?0:1))}getMap(){return Ho.empty}invert(t){return new Eh(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Eh(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new Eh(e.pos,e.attr,e.value)}}ji.jsonID("attr",Eh);let xh=class extends Error{};xh=function n(t){let e=Error.call(this,t);return e.__proto__=n.prototype,e},(xh.prototype=Object.create(Error.prototype)).constructor=xh,xh.prototype.name="TransformError";class D1{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Th}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new xh(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,i=De.empty){let r=b1(this.doc,t,e,i);return r&&this.step(r),this}replaceWith(t,e,i){return this.replace(t,e,new De(ce.from(i),0,0))}delete(t,e){return this.replace(t,e,De.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,i){return function mre(n,t,e,i){if(!i.size)return n.deleteRange(t,e);let r=n.doc.resolve(t),o=n.doc.resolve(e);if(kj(r,o,i))return n.step(new dr(t,e,i));let s=Lj(r,n.doc.resolve(e));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=pre(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(t,e,i),!(n.steps.length>d));h--){let f=s[h];f<0||(t=r.before(f),e=o.after(f))}}(this,t,e,i),this}replaceRangeWith(t,e,i){return function gre(n,t,e,i){if(!i.isInline&&t==e&&n.doc.resolve(t).parent.content.size){let r=function dre(n,t,e){let i=n.resolve(t);if(i.parent.canReplaceWith(i.index(),i.index(),e))return t;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,e))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,e))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(t-i.start(s)==i.depth-s&&e>i.end(s)&&r.end(s)-e!=r.depth-s)return n.delete(i.before(s),e);n.delete(t,e)}(this,t,e),this}lift(t,e){return function nre(n,t,e){let{$from:i,$to:r,depth:o}=t,s=i.before(o+1),a=r.after(o+1),l=s,c=a,u=ce.empty,d=0;for(let p=o,m=!1;p>e;p--)m||i.index(p)>0?(m=!0,u=ce.from(i.node(p).copy(u)),d++):l--;let h=ce.empty,f=0;for(let p=o,m=!1;p>e;p--)m||r.after(p+1)=0;s--){if(i.size){let a=e[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=ce.from(e[s].type.create(e[s].attrs,i))}let r=t.start,o=t.end;n.step(new zi(r,o,r,o,new De(i,0,0),e.length,!0))}(this,t,e),this}setBlockType(t,e=t,i,r=null){return function sre(n,t,e,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(t,e,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(i,r)&&function are(n,t,e){let i=n.resolve(t),r=i.index();return i.parent.canReplaceWith(r,r+1,e)}(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 zi(c,u,c+1,u-1,new De(ce.from(i.create(r,null,s.marks)),0,0),1,!0)),!1}})}(this,t,e,i,r),this}setNodeMarkup(t,e,i=null,r){return function lre(n,t,e,i,r){let o=n.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);let s=e.create(i,null,r||o.marks);if(o.isLeaf)return n.replaceWith(t,t+o.nodeSize,s);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);n.step(new zi(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new De(ce.from(s),0,0),1,!0))}(this,t,e,i,r),this}setNodeAttribute(t,e,i){return this.step(new Eh(t,e,i)),this}addNodeMark(t,e){return this.step(new Ml(t,e)),this}removeNodeMark(t,e){if(!(e instanceof kn)){let i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at position "+t);if(!(e=e.isInSet(i.marks)))return this}return this.step(new Mh(t,e)),this}split(t,e=1,i){return function cre(n,t,e=1,i){let r=n.doc.resolve(t),o=ce.empty,s=ce.empty;for(let a=r.depth,l=r.depth-e,c=e-1;a>l;a--,c--){o=ce.from(r.node(a).copy(o));let u=i&&i[c];s=ce.from(u?u.type.create(u.attrs,s):r.node(a).copy(s))}n.step(new dr(t,t,new De(o.append(s),e,e),!0))}(this,t,e,i),this}addMark(t,e,i){return function Jie(n,t,e,i){let s,a,r=[],o=[];n.doc.nodesBetween(t,e,(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,t),f=Math.min(c+l.nodeSize,e),p=i.addToSet(d);for(let m=0;mn.step(l)),o.forEach(l=>n.step(l))}(this,t,e,i),this}removeMark(t,e,i){return function Xie(n,t,e,i){let r=[],o=0;n.doc.nodesBetween(t,e,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof pb){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,e);for(let u=0;un.step(new Gs(s.from,s.to,s.style)))}(this,t,e,i),this}clearIncompatible(t,e,i){return function ere(n,t,e,i=e.contentMatch){let r=n.doc.nodeAt(t),o=[],s=t+1;for(let a=0;a=0;a--)n.step(o[a])}(this,t,e,i),this}}const T1=Object.create(null);class ot{constructor(t,e,i){this.$anchor=t,this.$head=e,this.ranges=i||[new Rj(t.min(e),t.max(e))]}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 t=this.ranges;for(let e=0;e=0;o--){let s=e<0?Ih(t.node(0),t.node(o),t.before(o+1),t.index(o),e,i):Ih(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,i);if(s)return s}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new To(t.node(0))}static atStart(t){return Ih(t,t,0,0,1)||new To(t)}static atEnd(t){return Ih(t,t,t.content.size,t.childCount,-1)||new To(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=T1[e.type];if(!i)throw new RangeError(`No selection type ${e.type} defined`);return i.fromJSON(t,e)}static jsonID(t,e){if(t in T1)throw new RangeError("Duplicate use of selection JSON ID "+t);return T1[t]=e,e.prototype.jsonID=t,e}getBookmark(){return nt.between(this.$anchor,this.$head).getBookmark()}}ot.prototype.visible=!0;class Rj{constructor(t,e){this.$from=t,this.$to=e}}let Fj=!1;function jj(n){!Fj&&!n.parent.inlineContent&&(Fj=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class nt extends ot{constructor(t,e=t){jj(t),jj(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let i=t.resolve(e.map(this.head));if(!i.parent.inlineContent)return ot.near(i);let r=t.resolve(e.map(this.anchor));return new nt(r.parent.inlineContent?r:i,i)}replace(t,e=De.empty){if(super.replace(t,e),e==De.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof nt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new vb(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new nt(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,i=e){let r=t.resolve(e);return new this(r,i==e?r:t.resolve(i))}static between(t,e,i){let r=t.pos-e.pos;if((!i||r)&&(i=r>=0?1:-1),!e.parent.inlineContent){let o=ot.findFrom(e,i,!0)||ot.findFrom(e,-i,!0);if(!o)return ot.near(e,i);e=o.$head}return t.parent.inlineContent||(0==r||(t=(ot.findFrom(t,-i,!0)||ot.findFrom(t,i,!0)).$anchor).posnew To(n)};function Ih(n,t,e,i,r,o=!1){if(t.inlineContent)return nt.create(n,e);for(let s=i-(r>0?0:1);r>0?s=0;s+=r){let a=t.child(s);if(a.isAtom){if(!o&&qe.isSelectable(a))return qe.create(n,e-(r<0?a.nodeSize:0))}else{let l=Ih(n,a,e+r,r<0?a.childCount:0,r,o);if(l)return l}e+=a.nodeSize*r}return null}function zj(n,t,e){let i=n.steps.length-1;if(i{null==s&&(s=u)}),n.setSelection(ot.near(n.doc.resolve(s),e)))}class vre extends D1{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return kn.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let i=this.selection;return e&&(t=t.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||kn.none))),i.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,i){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==i&&(i=e),i=i??e,!t)return this.deleteRange(e,i);let o=this.storedMarks;if(!o){let s=this.doc.resolve(e);o=i==e?s.marks():s.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(e,i,r.text(t,o)),this.selection.empty||this.setSelection(ot.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Uj(n,t){return t&&n?n.bind(t):n}class Um{constructor(t,e,i){this.name=t,this.init=Uj(e.init,i),this.apply=Uj(e.apply,i)}}const bre=[new Um("doc",{init:n=>n.doc||n.schema.topNodeType.createAndFill(),apply:n=>n.doc}),new Um("selection",{init:(n,t)=>n.selection||ot.atStart(t.doc),apply:n=>n.selection}),new Um("storedMarks",{init:n=>n.storedMarks||null,apply:(n,t,e,i)=>i.selection.$cursor?n.storedMarks:null}),new Um("scrollToSelection",{init:()=>0,apply:(n,t)=>n.scrolledIntoView?t+1:t})];class S1{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=bre.slice(),e&&e.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 Um(i.key,i.spec.state,i))})}}class Oh{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let i=0;ii.toJSON())),t&&"object"==typeof t)for(let i in t){if("doc"==i||"selection"==i)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[i],o=r.spec.state;o&&o.toJSON&&(e[i]=o.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,i){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new S1(t.schema,t.plugins),o=new Oh(r);return r.fields.forEach(s=>{if("doc"==s.name)o.doc=$s.fromJSON(t.schema,e.doc);else if("selection"==s.name)o.selection=ot.fromJSON(o.doc,e.selection);else if("storedMarks"==s.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.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(e,a))return void(o[s.name]=c.fromJSON.call(l,t,e[a],o))}o[s.name]=s.init(t,o)}}),o}}function Hj(n,t,e){for(let i in n){let r=n[i];r instanceof Function?r=r.bind(t):"handleDOMEvents"==i&&(r=Hj(r,t,{})),e[i]=r}return e}class Wt{constructor(t){this.spec=t,this.props={},t.props&&Hj(t.props,this,this.props),this.key=t.key?t.key.key:$j("plugin")}getState(t){return t[this.key]}}const E1=Object.create(null);function $j(n){return n in E1?n+"$"+ ++E1[n]:(E1[n]=0,n+"$")}class on{constructor(t="key"){this.key=$j(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}function Mo(n){if(null==n)return window;if("[object Window]"!==n.toString()){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function ou(n){return n instanceof Mo(n).Element||n instanceof Element}function $o(n){return n instanceof Mo(n).HTMLElement||n instanceof HTMLElement}function x1(n){return!(typeof ShadowRoot>"u")&&(n instanceof Mo(n).ShadowRoot||n instanceof ShadowRoot)}var su=Math.max,wb=Math.min,Ah=Math.round;function I1(){var n=navigator.userAgentData;return null!=n&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Wj(){return!/^((?!chrome|android).)*safari/i.test(I1())}function kh(n,t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=n.getBoundingClientRect(),r=1,o=1;t&&$o(n)&&(r=n.offsetWidth>0&&Ah(i.width)/n.offsetWidth||1,o=n.offsetHeight>0&&Ah(i.height)/n.offsetHeight||1);var a=(ou(n)?Mo(n):window).visualViewport,l=!Wj()&&e,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 O1(n){var t=Mo(n);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ys(n){return n?(n.nodeName||"").toLowerCase():null}function El(n){return((ou(n)?n.ownerDocument:n.document)||window.document).documentElement}function A1(n){return kh(El(n)).left+O1(n).scrollLeft}function Va(n){return Mo(n).getComputedStyle(n)}function k1(n){var t=Va(n);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function Tre(n,t,e){void 0===e&&(e=!1);var i=$o(t),r=$o(t)&&function Dre(n){var t=n.getBoundingClientRect(),e=Ah(t.width)/n.offsetWidth||1,i=Ah(t.height)/n.offsetHeight||1;return 1!==e||1!==i}(t),o=El(t),s=kh(n,r,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==Ys(t)||k1(o))&&(a=function Cre(n){return n!==Mo(n)&&$o(n)?function wre(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):O1(n)}(t)),$o(t)?((l=kh(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=A1(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function N1(n){var t=kh(n),e=n.offsetWidth,i=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:i}}function Cb(n){return"html"===Ys(n)?n:n.assignedSlot||n.parentNode||(x1(n)?n.host:null)||El(n)}function Gj(n){return["html","body","#document"].indexOf(Ys(n))>=0?n.ownerDocument.body:$o(n)&&k1(n)?n:Gj(Cb(n))}function Hm(n,t){var e;void 0===t&&(t=[]);var i=Gj(n),r=i===(null==(e=n.ownerDocument)?void 0:e.body),o=Mo(i),s=r?[o].concat(o.visualViewport||[],k1(i)?i:[]):i,a=t.concat(s);return r?a:a.concat(Hm(Cb(s)))}function Mre(n){return["table","td","th"].indexOf(Ys(n))>=0}function Yj(n){return $o(n)&&"fixed"!==Va(n).position?n.offsetParent:null}function $m(n){for(var t=Mo(n),e=Yj(n);e&&Mre(e)&&"static"===Va(e).position;)e=Yj(e);return e&&("html"===Ys(e)||"body"===Ys(e)&&"static"===Va(e).position)?t:e||function Sre(n){var t=/firefox/i.test(I1());if(/Trident/i.test(I1())&&$o(n)&&"fixed"===Va(n).position)return null;var r=Cb(n);for(x1(r)&&(r=r.host);$o(r)&&["html","body"].indexOf(Ys(r))<0;){var o=Va(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(n)||t}var Jr="top",Wo="bottom",Go="right",Xr="left",P1="auto",Wm=[Jr,Wo,Go,Xr],Nh="start",Gm="end",qj="viewport",Ym="popper",Kj=Wm.reduce(function(n,t){return n.concat([t+"-"+Nh,t+"-"+Gm])},[]),Qj=[].concat(Wm,[P1]).reduce(function(n,t){return n.concat([t,t+"-"+Nh,t+"-"+Gm])},[]),jre=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zre(n){var t=new Map,e=new Set,i=[];function r(o){e.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&r(l)}}),i.push(o)}return n.forEach(function(o){t.set(o.name,o)}),n.forEach(function(o){e.has(o.name)||r(o)}),i}function Bre(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}var Zj={placement:"bottom",modifiers:[],strategy:"absolute"};function Jj(){for(var n=arguments.length,t=new Array(n),e=0;e=0?"x":"y"}function Xj(n){var l,t=n.reference,e=n.element,i=n.placement,r=i?qs(i):null,o=i?Ph(i):null,s=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2;switch(r){case Jr:l={x:s,y:t.y-e.height};break;case Wo:l={x:s,y:t.y+t.height};break;case Go:l={x:t.x+t.width,y:a};break;case Xr:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var c=r?L1(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Nh:l[c]=l[c]-(t[u]/2-e[u]/2);break;case Gm:l[c]=l[c]+(t[u]/2-e[u]/2)}}return l}const Yre={name:"popperOffsets",enabled:!0,phase:"read",fn:function Gre(n){var t=n.state;t.modifiersData[n.name]=Xj({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var qre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function e3(n){var t,e=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"),b=s.hasOwnProperty("y"),w=Xr,_=Jr,N=window;if(c){var S=$m(e),J="clientHeight",K="clientWidth";S===Mo(e)&&"static"!==Va(S=El(e)).position&&"absolute"===a&&(J="scrollHeight",K="scrollWidth"),(r===Jr||(r===Xr||r===Go)&&o===Gm)&&(_=Wo,m-=(d&&S===N&&N.visualViewport?N.visualViewport.height:S[J])-i.height,m*=l?1:-1),r!==Xr&&(r!==Jr&&r!==Wo||o!==Gm)||(w=Go,f-=(d&&S===N&&N.visualViewport?N.visualViewport.width:S[K])-i.width,f*=l?1:-1)}var st,vt=Object.assign({position:a},c&&qre),lt=!0===u?function Kre(n,t){var i=n.y,r=t.devicePixelRatio||1;return{x:Ah(n.x*r)/r||0,y:Ah(i*r)/r||0}}({x:f,y:m},Mo(e)):{x:f,y:m};return f=lt.x,m=lt.y,Object.assign({},vt,l?((st={})[_]=b?"0":"",st[w]=y?"0":"",st.transform=(N.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",st):((t={})[_]=b?m+"px":"",t[w]=y?f+"px":"",t.transform="",t))}const Zre={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function Qre(n){var t=n.state,e=n.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,l=void 0===a||a,c={placement:qs(t.placement),variation:Ph(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,e3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,e3(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},t3={name:"applyStyles",enabled:!0,phase:"write",fn:function Jre(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];!$o(o)||!Ys(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 Xre(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],o=t.attributes[i]||{},a=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]).reduce(function(l,c){return l[c]="",l},{});!$o(r)||!Ys(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}},requires:["computeStyles"]},noe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function toe(n){var t=n.state,i=n.name,r=n.options.offset,o=void 0===r?[0,0]:r,s=Qj.reduce(function(u,d){return u[d]=function eoe(n,t,e){var i=qs(n),r=[Xr,Jr].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},t,{placement:n})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[Xr,Go].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,t.rects,o),u},{}),a=s[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}};var ioe={left:"right",right:"left",bottom:"top",top:"bottom"};function Tb(n){return n.replace(/left|right|bottom|top/g,function(t){return ioe[t]})}var roe={start:"end",end:"start"};function n3(n){return n.replace(/start|end/g,function(t){return roe[t]})}function r3(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&x1(e)){var i=t;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function R1(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function o3(n,t,e){return t===qj?R1(function ooe(n,t){var e=Mo(n),i=El(n),r=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=Wj();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+A1(n),y:l}}(n,e)):ou(t)?function aoe(n,t){var e=kh(n,!1,"fixed"===t);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}(t,e):R1(function soe(n){var t,e=El(n),i=O1(n),r=null==(t=n.ownerDocument)?void 0:t.body,o=su(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=su(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+A1(n),l=-i.scrollTop;return"rtl"===Va(r||e).direction&&(a+=su(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(El(n)))}function a3(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function l3(n,t){return t.reduce(function(e,i){return e[i]=n,e},{})}function qm(n,t){void 0===t&&(t={});var i=t.placement,r=void 0===i?n.placement:i,o=t.strategy,s=void 0===o?n.strategy:o,a=t.boundary,l=void 0===a?"clippingParents":a,c=t.rootBoundary,u=void 0===c?qj:c,d=t.elementContext,h=void 0===d?Ym:d,f=t.altBoundary,p=void 0!==f&&f,m=t.padding,g=void 0===m?0:m,y=a3("number"!=typeof g?g:l3(g,Wm)),w=n.rects.popper,_=n.elements[p?h===Ym?"reference":Ym:h],N=function coe(n,t,e,i){var r="clippingParents"===t?function loe(n){var t=Hm(Cb(n)),i=["absolute","fixed"].indexOf(Va(n).position)>=0&&$o(n)?$m(n):n;return ou(i)?t.filter(function(r){return ou(r)&&r3(r,i)&&"body"!==Ys(r)}):[]}(n):[].concat(t),o=[].concat(r,[e]),a=o.reduce(function(l,c){var u=o3(n,c,i);return l.top=su(u.top,l.top),l.right=wb(u.right,l.right),l.bottom=wb(u.bottom,l.bottom),l.left=su(u.left,l.left),l},o3(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}(ou(_)?_:_.contextElement||El(n.elements.popper),l,u,s),S=kh(n.elements.reference),J=Xj({reference:S,element:w,strategy:"absolute",placement:r}),K=R1(Object.assign({},w,J)),ke=h===Ym?K:S,He={top:N.top-ke.top+y.top,bottom:ke.bottom-N.bottom+y.bottom,left:N.left-ke.left+y.left,right:ke.right-N.right+y.right},vt=n.modifiersData.offset;if(h===Ym&&vt){var lt=vt[r];Object.keys(He).forEach(function(st){var yn=[Go,Wo].indexOf(st)>=0?1:-1,xt=[Jr,Wo].indexOf(st)>=0?"y":"x";He[st]+=lt[xt]*yn})}return He}const foe={name:"flip",enabled:!0,phase:"main",fn:function hoe(n){var t=n.state,e=n.options,i=n.name;if(!t.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,d=e.rootBoundary,h=e.altBoundary,f=e.flipVariations,p=void 0===f||f,m=e.allowedAutoPlacements,g=t.options.placement,y=qs(g),w=l||(y!==g&&p?function doe(n){if(qs(n)===P1)return[];var t=Tb(n);return[n3(n),t,n3(t)]}(g):[Tb(g)]),_=[g].concat(w).reduce(function(Ft,Xi){return Ft.concat(qs(Xi)===P1?function uoe(n,t){void 0===t&&(t={});var r=t.boundary,o=t.rootBoundary,s=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=void 0===l?Qj:l,u=Ph(t.placement),d=u?a?Kj:Kj.filter(function(p){return Ph(p)===u}):Wm,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]=qm(n,{placement:m,boundary:r,rootBoundary:o,padding:s})[qs(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}(t,{placement:Xi,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):Xi)},[]),N=t.rects.reference,S=t.rects.popper,J=new Map,K=!0,ke=_[0],He=0;He<_.length;He++){var vt=_[He],lt=qs(vt),st=Ph(vt)===Nh,yn=[Jr,Wo].indexOf(lt)>=0,xt=yn?"width":"height",le=qm(t,{placement:vt,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),me=yn?st?Go:Xr:st?Wo:Jr;N[xt]>S[xt]&&(me=Tb(me));var be=Tb(me),Ue=[];if(o&&Ue.push(le[lt]<=0),a&&Ue.push(le[me]<=0,le[be]<=0),Ue.every(function(Ft){return Ft})){ke=vt,K=!1;break}J.set(vt,Ue)}if(K)for(var cn=function(Xi){var oo=_.find(function(In){var Gt=J.get(In);if(Gt)return Gt.slice(0,Xi).every(function(ft){return ft})});if(oo)return ke=oo,"break"},Vt=p?3:1;Vt>0&&"break"!==cn(Vt);Vt--);t.placement!==ke&&(t.modifiersData[i]._skip=!0,t.placement=ke,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Km(n,t,e){return su(n,wb(t,e))}const yoe={name:"preventOverflow",enabled:!0,phase:"main",fn:function goe(n){var t=n.state,e=n.options,i=n.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,h=e.tether,f=void 0===h||h,p=e.tetherOffset,m=void 0===p?0:p,g=qm(t,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),y=qs(t.placement),b=Ph(t.placement),w=!b,_=L1(y),N=function poe(n){return"x"===n?"y":"x"}(_),S=t.modifiersData.popperOffsets,J=t.rects.reference,K=t.rects.popper,ke="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,He="number"==typeof ke?{mainAxis:ke,altAxis:ke}:Object.assign({mainAxis:0,altAxis:0},ke),vt=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,lt={x:0,y:0};if(S){if(o){var st,yn="y"===_?Jr:Xr,xt="y"===_?Wo:Go,le="y"===_?"height":"width",me=S[_],be=me+g[yn],Ue=me-g[xt],kt=f?-K[le]/2:0,cn=b===Nh?J[le]:K[le],Vt=b===Nh?-K[le]:-J[le],xn=t.elements.arrow,Ft=f&&xn?N1(xn):{width:0,height:0},Xi=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},oo=Xi[yn],In=Xi[xt],Gt=Km(0,J[le],Ft[le]),ft=w?J[le]/2-kt-Gt-oo-He.mainAxis:cn-Gt-oo-He.mainAxis,zn=w?-J[le]/2+kt+Gt+In+He.mainAxis:Vt+Gt+In+He.mainAxis,Pr=t.elements.arrow&&$m(t.elements.arrow),nc=null!=(st=vt?.[_])?st:0,Bu=me+zn-nc,ty=Km(f?wb(be,me+ft-nc-(Pr?"y"===_?Pr.clientTop||0:Pr.clientLeft||0:0)):be,me,f?su(Ue,Bu):Ue);S[_]=ty,lt[_]=ty-me}if(a){var ny,Qa=S[N],rc="y"===N?"height":"width",iy=Qa+g["x"===_?Jr:Xr],Uu=Qa-g["x"===_?Wo:Go],ry=-1!==[Jr,Xr].indexOf(y),aw=null!=(ny=vt?.[N])?ny:0,lw=ry?iy:Qa-J[rc]-K[rc]-aw+He.altAxis,cw=ry?Qa+J[rc]+K[rc]-aw-He.altAxis:Uu,uw=f&&ry?function moe(n,t,e){var i=Km(n,t,e);return i>e?e:i}(lw,Qa,cw):Km(f?lw:iy,Qa,f?cw:Uu);S[N]=uw,lt[N]=uw-Qa}t.modifiersData[i]=lt}},requiresIfExists:["offset"]},woe={name:"arrow",enabled:!0,phase:"main",fn:function voe(n){var t,e=n.state,i=n.name,r=n.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=qs(e.placement),l=L1(a),u=[Xr,Go].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(t,e){return a3("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:l3(t,Wm))}(r.padding,e),h=N1(o),f="y"===l?Jr:Xr,p="y"===l?Wo:Go,m=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],g=s[l]-e.rects.reference[l],y=$m(o),b=y?"y"===l?y.clientHeight||0:y.clientWidth||0:0,S=b/2-h[u]/2+(m/2-g/2),J=Km(d[f],S,b-h[u]-d[p]);e.modifiersData[i]=((t={})[l]=J,t.centerOffset=J-S,t)}},effect:function boe(n){var t=n.state,i=n.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||r3(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function c3(n,t,e){return void 0===e&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function u3(n){return[Jr,Go,Wo,Xr].some(function(t){return n[t]>=0})}var Doe=[Wre,Yre,Zre,t3,noe,foe,yoe,woe,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function Coe(n){var t=n.state,e=n.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=qm(t,{elementContext:"reference"}),a=qm(t,{altBoundary:!0}),l=c3(s,i),c=c3(a,r,o),u=u3(l),d=u3(c);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],Toe=Hre({defaultModifiers:Doe}),d3="tippy-content",f3="tippy-arrow",p3="tippy-svg-arrow",xl={passive:!0,capture:!0},m3=function(){return document.body};function F1(n,t,e){return Array.isArray(n)?n[t]??(Array.isArray(e)?e[t]:e):n}function j1(n,t){var e={}.toString.call(n);return 0===e.indexOf("[object")&&e.indexOf(t+"]")>-1}function g3(n,t){return"function"==typeof n?n.apply(void 0,t):n}function y3(n,t){return 0===t?n:function(i){clearTimeout(e),e=setTimeout(function(){n(i)},t)};var e}function Il(n){return[].concat(n)}function _3(n,t){-1===n.indexOf(t)&&n.push(t)}function Lh(n){return[].slice.call(n)}function b3(n){return Object.keys(n).reduce(function(t,e){return void 0!==n[e]&&(t[e]=n[e]),t},{})}function au(){return document.createElement("div")}function Mb(n){return["Element","Fragment"].some(function(t){return j1(n,t)})}function B1(n,t){n.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Qm(n,t){n.forEach(function(e){e&&e.setAttribute("data-state",t)})}function U1(n,t,e){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){n[i](r,e)})}function D3(n,t){for(var e=t;e;){var i;if(n.contains(e))return!0;e=null==e.getRootNode||null==(i=e.getRootNode())?void 0:i.host}return!1}var Ks={isTouch:!1},T3=0;function koe(){Ks.isTouch||(Ks.isTouch=!0,window.performance&&document.addEventListener("mousemove",M3))}function M3(){var n=performance.now();n-T3<20&&(Ks.isTouch=!1,document.removeEventListener("mousemove",M3)),T3=n}function Noe(){var n=document.activeElement;(function w3(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var Roe=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,eo=Object.assign({appendTo:m3,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}),Voe=Object.keys(eo);function O3(n){var e=(n.plugins||[]).reduce(function(i,r){var a,o=r.name;return o&&(i[o]=void 0!==n[o]?n[o]:null!=(a=eo[o])?a:r.defaultValue),i},{});return Object.assign({},n,e)}function A3(n,t){var e=Object.assign({},t,{content:g3(t.content,[n])},t.ignoreAttributes?{}:function Uoe(n,t){return(t?Object.keys(O3(Object.assign({},eo,{plugins:t}))):Voe).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,t.plugins));return e.aria=Object.assign({},eo.aria,e.aria),e.aria={expanded:"auto"===e.aria.expanded?t.interactive:e.aria.expanded,content:"auto"===e.aria.content?t.interactive?null:"describedby":e.aria.content},e}function H1(n,t){n.innerHTML=t}function k3(n){var t=au();return!0===n?t.className=f3:(t.className=p3,Mb(n)?t.appendChild(n):H1(t,n)),t}function N3(n,t){Mb(t.content)?(H1(n,""),n.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?H1(n,t.content):n.textContent=t.content)}function Sb(n){var t=n.firstElementChild,e=Lh(t.children);return{box:t,content:e.find(function(i){return i.classList.contains(d3)}),arrow:e.find(function(i){return i.classList.contains(f3)||i.classList.contains(p3)}),backdrop:e.find(function(i){return i.classList.contains("tippy-backdrop")})}}function P3(n){var t=au(),e=au();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=au();function r(o,s){var a=Sb(t),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)&&N3(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(k3(s.arrow))):l.appendChild(k3(s.arrow)):u&&l.removeChild(u)}return i.className=d3,i.setAttribute("data-state","hidden"),N3(i,n.props),t.appendChild(e),e.appendChild(i),r(n.props,n.props),{popper:t,onUpdate:r}}P3.$$tippy=!0;var $oe=1,Eb=[],xb=[];function Woe(n,t){var i,r,o,u,d,h,m,e=A3(n,Object.assign({},eo,O3(b3(t)))),s=!1,a=!1,l=!1,c=!1,f=[],p=y3(ic,e.interactiveDebounce),g=$oe++,b=function xoe(n){return n.filter(function(t,e){return n.indexOf(t)===e})}(e.plugins),_={id:g,reference:n,popper:au(),popperInstance:null,props:e,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function lw(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function cw(ee){if(!_.state.isDestroyed){be("onBeforeUpdate",[_,ee]),Vu();var $e=_.props,pt=A3(n,Object.assign({},$e,b3(ee),{ignoreAttributes:!0}));_.props=pt,Pr(),$e.interactiveDebounce!==pt.interactiveDebounce&&(cn(),p=y3(ic,pt.interactiveDebounce)),$e.triggerTarget&&!pt.triggerTarget?Il($e.triggerTarget).forEach(function(En){En.removeAttribute("aria-expanded")}):pt.triggerTarget&&n.removeAttribute("aria-expanded"),kt(),me(),J&&J($e,pt),_.popperInstance&&(ow(),rc().forEach(function(En){requestAnimationFrame(En._tippy.popperInstance.forceUpdate)})),be("onAfterUpdate",[_,ee])}},setContent:function uw(ee){_.setProps({content:ee})},show:function rCe(){var ee=_.state.isVisible,$e=_.state.isDestroyed,pt=!_.state.isEnabled,En=Ks.isTouch&&!_.props.touch,un=F1(_.props.duration,0,eo.duration);if(!(ee||$e||pt||En||st().hasAttribute("disabled")||(be("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,lt()&&(S.style.visibility="visible"),me(),Xi(),_.state.isMounted||(S.style.transition="none"),lt()){var Lr=xt();B1([Lr.box,Lr.content],0)}h=function(){var Hu;if(_.state.isVisible&&!c){if(c=!0,S.style.transition=_.props.moveTransition,lt()&&_.props.animation){var BE=xt(),dw=BE.box,_f=BE.content;B1([dw,_f],un),Qm([dw,_f],"visible")}Ue(),kt(),_3(xb,_),null==(Hu=_.popperInstance)||Hu.forceUpdate(),be("onMount",[_]),_.props.animation&<()&&function Gt(ee,$e){ft(ee,$e)}(un,function(){_.state.isShown=!0,be("onShown",[_])})}},function Qa(){var $e,ee=_.props.appendTo,pt=st();($e=_.props.interactive&&ee===m3||"parent"===ee?pt.parentNode:g3(ee,[pt])).contains(S)||$e.appendChild(S),_.state.isMounted=!0,ow()}()}},hide:function oCe(){var ee=!_.state.isVisible,$e=_.state.isDestroyed,pt=!_.state.isEnabled,En=F1(_.props.duration,1,eo.duration);if(!(ee||$e||pt)&&(be("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,c=!1,s=!1,lt()&&(S.style.visibility="hidden"),cn(),oo(),me(!0),lt()){var un=xt(),Lr=un.box,Xo=un.content;_.props.animation&&(B1([Lr,Xo],En),Qm([Lr,Xo],"hidden"))}Ue(),kt(),_.props.animation?lt()&&function In(ee,$e){ft(ee,function(){!_.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&$e()})}(En,_.unmount):_.unmount()}},hideWithInteractivity:function sCe(ee){yn().addEventListener("mousemove",p),_3(Eb,p),p(ee)},enable:function ry(){_.state.isEnabled=!0},disable:function aw(){_.hide(),_.state.isEnabled=!1},unmount:function aCe(){_.state.isVisible&&_.hide(),_.state.isMounted&&(sw(),rc().forEach(function(ee){ee._tippy.unmount()}),S.parentNode&&S.parentNode.removeChild(S),xb=xb.filter(function(ee){return ee!==_}),_.state.isMounted=!1,be("onHidden",[_]))},destroy:function lCe(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),Vu(),delete n._tippy,_.state.isDestroyed=!0,be("onDestroy",[_]))}};if(!e.render)return _;var N=e.render(_),S=N.popper,J=N.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+_.id,_.popper=S,n._tippy=_,S._tippy=_;var K=b.map(function(ee){return ee.fn(_)}),ke=n.hasAttribute("aria-expanded");return Pr(),kt(),me(),be("onCreate",[_]),e.showOnCreate&&iy(),S.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&yn().addEventListener("mousemove",p)}),_;function He(){var ee=_.props.touch;return Array.isArray(ee)?ee:[ee,0]}function vt(){return"hold"===He()[0]}function lt(){var ee;return!(null==(ee=_.props.render)||!ee.$$tippy)}function st(){return m||n}function yn(){var ee=st().parentNode;return ee?function C3(n){var t,i=Il(n)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}(ee):document}function xt(){return Sb(S)}function le(ee){return _.state.isMounted&&!_.state.isVisible||Ks.isTouch||u&&"focus"===u.type?0:F1(_.props.delay,ee?0:1,eo.delay)}function me(ee){void 0===ee&&(ee=!1),S.style.pointerEvents=_.props.interactive&&!ee?"":"none",S.style.zIndex=""+_.props.zIndex}function be(ee,$e,pt){var En;void 0===pt&&(pt=!0),K.forEach(function(un){un[ee]&&un[ee].apply(un,$e)}),pt&&(En=_.props)[ee].apply(En,$e)}function Ue(){var ee=_.props.aria;if(ee.content){var $e="aria-"+ee.content,pt=S.id;Il(_.props.triggerTarget||n).forEach(function(un){var Lr=un.getAttribute($e);if(_.state.isVisible)un.setAttribute($e,Lr?Lr+" "+pt:pt);else{var Xo=Lr&&Lr.replace(pt,"").trim();Xo?un.setAttribute($e,Xo):un.removeAttribute($e)}})}}function kt(){!ke&&_.props.aria.expanded&&Il(_.props.triggerTarget||n).forEach(function($e){_.props.interactive?$e.setAttribute("aria-expanded",_.state.isVisible&&$e===st()?"true":"false"):$e.removeAttribute("aria-expanded")})}function cn(){yn().removeEventListener("mousemove",p),Eb=Eb.filter(function(ee){return ee!==p})}function Vt(ee){if(!Ks.isTouch||!l&&"mousedown"!==ee.type){var $e=ee.composedPath&&ee.composedPath()[0]||ee.target;if(!_.props.interactive||!D3(S,$e)){if(Il(_.props.triggerTarget||n).some(function(pt){return D3(pt,$e)})){if(Ks.isTouch||_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else be("onClickOutside",[_,ee]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),a=!0,setTimeout(function(){a=!1}),_.state.isMounted||oo())}}}function xn(){l=!0}function Ft(){l=!1}function Xi(){var ee=yn();ee.addEventListener("mousedown",Vt,!0),ee.addEventListener("touchend",Vt,xl),ee.addEventListener("touchstart",Ft,xl),ee.addEventListener("touchmove",xn,xl)}function oo(){var ee=yn();ee.removeEventListener("mousedown",Vt,!0),ee.removeEventListener("touchend",Vt,xl),ee.removeEventListener("touchstart",Ft,xl),ee.removeEventListener("touchmove",xn,xl)}function ft(ee,$e){var pt=xt().box;function En(un){un.target===pt&&(U1(pt,"remove",En),$e())}if(0===ee)return $e();U1(pt,"remove",d),U1(pt,"add",En),d=En}function zn(ee,$e,pt){void 0===pt&&(pt=!1),Il(_.props.triggerTarget||n).forEach(function(un){un.addEventListener(ee,$e,pt),f.push({node:un,eventType:ee,handler:$e,options:pt})})}function Pr(){vt()&&(zn("touchstart",nc,{passive:!0}),zn("touchend",Bu,{passive:!0})),function Eoe(n){return n.split(/\s+/).filter(Boolean)}(_.props.trigger).forEach(function(ee){if("manual"!==ee)switch(zn(ee,nc),ee){case"mouseenter":zn("mouseleave",Bu);break;case"focus":zn(Roe?"focusout":"blur",ty);break;case"focusin":zn("focusout",ty)}})}function Vu(){f.forEach(function(ee){ee.node.removeEventListener(ee.eventType,ee.handler,ee.options)}),f=[]}function nc(ee){var $e,pt=!1;if(_.state.isEnabled&&!ny(ee)&&!a){var En="focus"===(null==($e=u)?void 0:$e.type);u=ee,m=ee.currentTarget,kt(),!_.state.isVisible&&function V1(n){return j1(n,"MouseEvent")}(ee)&&Eb.forEach(function(un){return un(ee)}),"click"===ee.type&&(_.props.trigger.indexOf("mouseenter")<0||s)&&!1!==_.props.hideOnClick&&_.state.isVisible?pt=!0:iy(ee),"click"===ee.type&&(s=!pt),pt&&!En&&Uu(ee)}}function ic(ee){var $e=ee.target,pt=st().contains($e)||S.contains($e);"mousemove"===ee.type&&pt||function Aoe(n,t){var e=t.clientX,i=t.clientY;return n.every(function(r){var o=r.popperRect,s=r.popperState,l=r.props.interactiveBorder,c=function v3(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-e+("right"===c?u.left.x:0)>l||e-o.right-("left"===c?u.right.x:0)>l})}(rc().concat(S).map(function(un){var Lr,yf=null==(Lr=un._tippy.popperInstance)?void 0:Lr.state;return yf?{popperRect:un.getBoundingClientRect(),popperState:yf,props:e}:null}).filter(Boolean),ee)&&(cn(),Uu(ee))}function Bu(ee){if(!(ny(ee)||_.props.trigger.indexOf("click")>=0&&s)){if(_.props.interactive)return void _.hideWithInteractivity(ee);Uu(ee)}}function ty(ee){_.props.trigger.indexOf("focusin")<0&&ee.target!==st()||_.props.interactive&&ee.relatedTarget&&S.contains(ee.relatedTarget)||Uu(ee)}function ny(ee){return!!Ks.isTouch&&vt()!==ee.type.indexOf("touch")>=0}function ow(){sw();var ee=_.props,$e=ee.popperOptions,pt=ee.placement,En=ee.offset,un=ee.getReferenceClientRect,Lr=ee.moveTransition,Xo=lt()?Sb(S).arrow:null,yf=un?{getBoundingClientRect:un,contextElement:un.contextElement||st()}:n,Hu=[{name:"offset",options:{offset:En}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Lr}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(dw){var _f=dw.state;if(lt()){var UE=xt().box;["placement","reference-hidden","escaped"].forEach(function(hw){"placement"===hw?UE.setAttribute("data-placement",_f.placement):_f.attributes.popper["data-popper-"+hw]?UE.setAttribute("data-"+hw,""):UE.removeAttribute("data-"+hw)}),_f.attributes.popper={}}}}];lt()&&Xo&&Hu.push({name:"arrow",options:{element:Xo,padding:3}}),Hu.push.apply(Hu,$e?.modifiers||[]),_.popperInstance=Toe(yf,S,Object.assign({},$e,{placement:pt,onFirstUpdate:h,modifiers:Hu}))}function sw(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function rc(){return Lh(S.querySelectorAll("[data-tippy-root]"))}function iy(ee){_.clearDelayTimeouts(),ee&&be("onTrigger",[_,ee]),Xi();var $e=le(!0),pt=He(),un=pt[1];Ks.isTouch&&"hold"===pt[0]&&un&&($e=un),$e?i=setTimeout(function(){_.show()},$e):_.show()}function Uu(ee){if(_.clearDelayTimeouts(),be("onUntrigger",[_,ee]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ee.type)>=0&&s)){var $e=le(!1);$e?r=setTimeout(function(){_.state.isVisible&&_.hide()},$e):o=requestAnimationFrame(function(){_.hide()})}}else oo()}}function Ol(n,t){void 0===t&&(t={});var e=eo.plugins.concat(t.plugins||[]);!function Poe(){document.addEventListener("touchstart",koe,xl),window.addEventListener("blur",Noe)}();var i=Object.assign({},t,{plugins:e}),a=function Ooe(n){return Mb(n)?[n]:function Ioe(n){return j1(n,"NodeList")}(n)?Lh(n):Array.isArray(n)?n:Lh(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&Woe(c,i);return u&&l.push(u),l},[]);return Mb(n)?a[0]:a}Ol.defaultProps=eo,Ol.setDefaultProps=function(t){Object.keys(t).forEach(function(i){eo[i]=t[i]})},Ol.currentInput=Ks,Object.assign({},t3,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}}),Ol.setDefaultProps({render:P3});const gs=Ol,Yo=function(n){for(var t=0;;t++)if(!(n=n.previousSibling))return t},Jm=function(n){let t=n.assignedSlot||n.parentNode;return t&&11==t.nodeType?t.host:t};let F3=null;const Ba=function(n,t,e){let i=F3||(F3=document.createRange());return i.setEnd(n,e??n.nodeValue.length),i.setStart(n,t||0),i},lu=function(n,t,e,i){return e&&(j3(n,t,e,i,-1)||j3(n,t,e,i,1))},Xoe=/^(img|br|input|textarea|hr)$/i;function j3(n,t,e,i,r){for(;;){if(n==e&&t==i)return!0;if(t==(r<0?0:Qs(n))){let o=n.parentNode;if(!o||1!=o.nodeType||tse(n)||Xoe.test(n.nodeName)||"false"==n.contentEditable)return!1;t=Yo(n)+(r<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[t+(r<0?-1:0)]).contentEditable)return!1;t=r<0?Qs(n):0}}}function Qs(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function tse(n){let t;for(let e=n;e&&!(t=e.pmViewDesc);e=e.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==n||t.contentDOM==n)}const Ob=function(n){return n.focusNode&&lu(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function cu(n,t){let e=document.createEvent("Event");return e.initEvent("keydown",!0,!0),e.keyCode=n,e.key=e.code=t,e}const Zs=typeof navigator<"u"?navigator:null,z3=typeof document<"u"?document:null,Al=Zs&&Zs.userAgent||"",W1=/Edge\/(\d+)/.exec(Al),V3=/MSIE \d/.exec(Al),G1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Al),to=!!(V3||G1||W1),kl=V3?document.documentMode:G1?+G1[1]:W1?+W1[1]:0,ys=!to&&/gecko\/(\d+)/i.test(Al);ys&&/Firefox\/(\d+)/.exec(Al);const Y1=!to&&/Chrome\/(\d+)/.exec(Al),hr=!!Y1,rse=Y1?+Y1[1]:0,Or=!to&&!!Zs&&/Apple Computer/.test(Zs.vendor),Rh=Or&&(/Mobile\/\w+/.test(Al)||!!Zs&&Zs.maxTouchPoints>2),qo=Rh||!!Zs&&/Mac/.test(Zs.platform),ose=!!Zs&&/Win/.test(Zs.platform),_s=/Android \d/.test(Al),Ab=!!z3&&"webkitFontSmoothing"in z3.documentElement.style,sse=Ab?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function ase(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Nl(n,t){return"number"==typeof n?n:n[t]}function lse(n){let t=n.getBoundingClientRect();return{left:t.left,right:t.left+n.clientWidth*(t.width/n.offsetWidth||1),top:t.top,bottom:t.top+n.clientHeight*(t.height/n.offsetHeight||1)}}function B3(n,t,e){let i=n.someProp("scrollThreshold")||0,r=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=e||n.dom;s;s=Jm(s)){if(1!=s.nodeType)continue;let a=s,l=a==o.body,c=l?ase(o):lse(a),u=0,d=0;if(t.topc.bottom-Nl(i,"bottom")&&(d=t.bottom-c.bottom+Nl(r,"bottom")),t.leftc.right-Nl(i,"right")&&(u=t.right-c.right+Nl(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;t={left:t.left-p,top:t.top-m,right:t.right-p,bottom:t.bottom-m}}if(l)break}}function U3(n){let t=[],e=n.ownerDocument;for(let i=n;i&&(t.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),n!=e);i=Jm(i));return t}function H3(n,t){for(let e=0;e=a){s=Math.max(p.bottom,s),a=Math.min(p.top,a);let m=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!l&&p.left<=t.left&&p.right>=t.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!e&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(o=d+1)}}return!e&&l&&(e=l,r=c,i=0),e&&3==e.nodeType?function hse(n,t){let e=n.nodeValue.length,i=document.createRange();for(let r=0;r=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}(e,r):!e||i&&1==e.nodeType?{node:n,offset:o}:$3(e,r)}function q1(n,t){return n.left>=t.left-1&&n.left<=t.right+1&&n.top>=t.top-1&&n.top<=t.bottom+1}function W3(n,t,e){let i=n.childNodes.length;if(i&&e.topt.top&&r++}i==n.dom&&r==i.childNodes.length-1&&1==i.lastChild.nodeType&&t.top>i.lastChild.getBoundingClientRect().bottom?a=n.state.doc.content.size:(0==r||1!=i.nodeType||"BR"!=i.childNodes[r-1].nodeName)&&(a=function mse(n,t,e,i){let r=-1;for(let o=t,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(t,e,-1)}(n,i,r,t))}null==a&&(a=function pse(n,t,e){let{node:i,offset:r}=$3(t,e),o=-1;if(1==i.nodeType&&!i.firstChild){let s=i.getBoundingClientRect();o=s.left!=s.right&&e.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(i,r,o)}(n,s,t));let l=n.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function G3(n){return n.top=0&&r==i.nodeValue.length?(l--,u=1):e<0?l--:c++,Xm(Pl(Ba(i,l,c),u),u<0)}{let l=Pl(Ba(i,r,r),e);if(ys&&r&&/\s/.test(i.nodeValue[r-1])&&r=0)}if(null==o&&r&&(e<0||r==Qs(i))){let l=i.childNodes[r-1],c=3==l.nodeType?Ba(l,Qs(l)-(s?0:1)):1!=l.nodeType||"BR"==l.nodeName&&l.nextSibling?null:l;if(c)return Xm(Pl(c,1),!1)}if(null==o&&r=0)}function Xm(n,t){if(0==n.width)return n;let e=t?n.left:n.right;return{top:n.top,bottom:n.bottom,left:e,right:e}}function K1(n,t){if(0==n.height)return n;let e=t?n.top:n.bottom;return{top:e,bottom:e,left:n.left,right:n.right}}function q3(n,t,e){let i=n.state,r=n.root.activeElement;i!=t&&n.updateState(t),r!=n.dom&&n.focus();try{return e()}finally{i!=t&&n.updateState(i),r!=n.dom&&r&&r.focus()}}const vse=/[\u0590-\u08ac]/;let K3=null,Q3=null,Z3=!1;class eg{constructor(t,e,i,r){this.parent=t,this.children=e,this.dom=i,this.contentDOM=r,this.dirty=0,i.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,i){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;eYo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!1;break}if(o.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!0;break}if(o.nextSibling)break}}return r??i>0?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let i=!0,r=t;r;r=r.parentNode){let s,o=this.getDesc(r);if(o&&(!e||o.node)){if(!i||!(s=o.nodeDOM)||(1==s.nodeType?s.contains(1==t.nodeType?t:t.parentNode):s==t))return o;i=!1}}}getDesc(t){let e=t.pmViewDesc;for(let i=e;i;i=i.parent)if(i==this)return e}posFromDOM(t,e,i){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,i)}return-1}descAt(t){for(let e=0,i=0;et||s instanceof t4){r=t-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,e);for(;i&&!(o=this.children[i-1]).size&&o instanceof X3&&o.side>=0;i--);if(e<=0){let o,s=!0;for(;o=i?this.children[i-1]:null,o&&o.dom.parentNode!=this.contentDOM;i--,s=!1);return o&&e&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,e):{node:this.contentDOM,offset:o?Yo(o.dom)+1:0}}{let o,s=!0;for(;o=i=u&&e<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,e,u);t=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=Yo(h.dom)+1;break}t-=h.size}-1==r&&(r=0)}if(r>-1&&(c>e||a==this.children.length-1)){e=c;for(let u=a+1;uf&&se){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(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let i=0,r=0;r=i:ti){let a=i+o.border,l=s-o.border;if(t>=a&&e<=l)return this.dirty=t==i||e==s?2:1,void(t!=a||e!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,e-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 t=1;for(let e=this.parent;e;e=e.parent,t++){let i=1==t?2:1;e.dirtyo?o.parent?o.parent.posBeforeChild(o):void 0:r)),!e.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(t,[],s,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.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 Cse extends eg{constructor(t,e,i,r){super(t,[],e,null),this.textDOM=i,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class du extends eg{constructor(t,e,i,r){super(t,[],i,r),this.mark=e}static create(t,e,i,r){let o=r.nodeViews[e.type.name],s=o&&o(e,r,i);return(!s||!s.dom)&&(s=Ws.renderSpec(document,e.type.spec.toDOM(e,i))),new du(t,e,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(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty0&&(o=J1(o,0,t,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(e.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(e.text);else u||({dom:u,contentDOM:d}=Ws.renderSpec(document,e.type.spec.toDOM(e)));!d&&!e.isText&&"BR"!=u.nodeName&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),e.type.spec.draggable&&(u.draggable=!0));let h=u;return u=o4(u,i,e),c?l=new Dse(t,e,i,r,u,d||null,h,c,o,s+1):e.isText?new kb(t,e,i,r,u,h,o):new Ll(t,e,i,r,u,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let i=this.children[e];if(this.dom.contains(i.dom.parentNode)){t.contentElement=i.dom.parentNode;break}}t.contentElement||(t.getContent=()=>ce.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,i){return 0==this.dirty&&t.eq(this.node)&&Z1(e,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let i=this.node.inlineContent,r=e,o=t.composing?this.localCompositionInfo(t,e):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new Mse(this,s&&s.node,t);(function xse(n,t,e,i){let r=t.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(),t.forChild(o,u),d),o=h}})(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,i,t):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?kn.none:this.node.child(u).marks,i,t),l.placeWidget(c,t,r)},(c,u,d,h)=>{let f;l.syncToMarks(c.marks,i,t),l.findNodeMatch(c,u,d,h)||a&&t.state.selection.from>r&&t.state.selection.to-1&&l.updateNodeAt(c,u,d,f,t)||l.updateNextNode(c,u,d,t,h,r)||l.addNode(c,u,d,t,r),r+=c.nodeSize}),l.syncToMarks([],i,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),n4(this.contentDOM,this.children,t),Rh&&function Ise(n){if("UL"==n.nodeName||"OL"==n.nodeName){let t=n.style.cssText;n.style.cssText=t+"; list-style: square !important",window.getComputedStyle(n),n.style.cssText=t}}(this.dom))}localCompositionInfo(t,e){let{from:i,to:r}=t.state.selection;if(!(t.state.selection instanceof nt)||ie+this.node.content.size)return null;let o=t.domSelectionRange(),s=function Ose(n,t){for(;;){if(3==n.nodeType)return n;if(1==n.nodeType&&t>0){if(n.childNodes.length>t&&3==n.childNodes[t].nodeType)return n.childNodes[t];t=Qs(n=n.childNodes[t-1])}else{if(!(1==n.nodeType&&t=e){let c=a=0&&c+t.length+a>=e)return a+c;if(e==i&&l.length>=i+t.length-a&&l.slice(i-a,i-a+t.length)==t)return i}}return-1}(this.node.content,a,i-e,r-e);return l<0?null:{node:s,pos:l,text:a}}return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:i,text:r}){if(this.getDesc(e))return;let o=e;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 Cse(this,o,e,r);t.input.compositionNodes.push(s),this.children=J1(this.children,i,i+r.length,t,s)}update(t,e,i,r){return!(3==this.dirty||!t.sameMarkup(this.node)||(this.updateInner(t,e,i,r),0))}updateInner(t,e,i,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=i,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(Z1(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,i=this.dom;this.dom=r4(this.dom,this.nodeDOM,Q1(this.outerDeco,this.node,e),Q1(t,this.node,e)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}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 e4(n,t,e,i,r){o4(i,t,n);let o=new Ll(void 0,n,t,e,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}class kb extends Ll{constructor(t,e,i,r,o,s,a){super(t,e,i,r,o,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,i,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node)||(this.updateOuterDeco(e),(0!=this.dirty||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,0))}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,i){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,i)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,i){let r=this.node.cut(t,e),o=document.createTextNode(r.text);return new kb(this.parent,r,this.outerDeco,this.innerDeco,o,o,i)}markDirty(t,e){super.markDirty(t,e),this.dom!=this.nodeDOM&&(0==t||e==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}}class t4 extends eg{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Dse extends Ll{constructor(t,e,i,r,o,s,a,l,c,u){super(t,e,i,r,o,s,a,c,u),this.spec=l}update(t,e,i,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(t,e,i);return o&&this.updateInner(t,e,i,r),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,i,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,i,r){this.spec.setSelection?this.spec.setSelection(t,e,i):super.setSelection(t,e,i,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function n4(n,t,e){let i=n.firstChild,r=!1;for(let o=0;o0;){let a;for(;;)if(i){let c=e.children[i-1];if(!(c instanceof du)){a=c,i--;break}e=c,i=c.children.length}else{if(e==t)break e;i=e.parent.children.indexOf(e),e=e.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()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let i=t;i>1,s=Math.min(o,t.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=du.create(this.top,t[o],e,i);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,i,r){let s,o=-1;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(t,e,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=e||u<=t?o.push(l):(ce&&o.push(l.slice(e-c,l.size,i)))}return o}function X1(n,t=null){let e=n.domSelectionRange(),i=n.state.doc;if(!e.focusNode)return null;let r=n.docView.nearestDesc(e.focusNode),o=r&&0==r.size,s=n.docView.posFromDOM(e.focusNode,e.focusOffset,1);if(s<0)return null;let l,c,a=i.resolve(s);if(Ob(e)){for(l=a;r&&!r.node;)r=r.parent;let u=r.node;if(r&&u.isAtom&&qe.isSelectable(u)&&r.parent&&(!u.isInline||!function ese(n,t,e){for(let i=0==t,r=t==Qs(n);i||r;){if(n==e)return!0;let o=Yo(n);if(!(n=n.parentNode))return!1;i=i&&0==o,r=r&&o==Qs(n)}}(e.focusNode,e.focusOffset,r.dom))){let d=r.posBefore;c=new qe(s==d?a:i.resolve(d))}}else{let u=n.docView.posFromDOM(e.anchorNode,e.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}return c||(c=tS(n,l,a,"pointer"==t||n.state.selection.head{(e.anchorNode!=i||e.anchorOffset!=r)&&(t.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!a4(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const l4=Or||hr&&rse<63;function c4(n,t){let{node:e,offset:i}=n.docView.domFromPos(t,0),r=ir(n,t,e))||nt.between(t,e,i)}function f4(n){return!(n.editable&&!n.hasFocus())&&p4(n)}function p4(n){let t=n.domSelectionRange();if(!t.anchorNode)return!1;try{return n.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(n.editable||n.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function nS(n,t){let{$anchor:e,$head:i}=n.selection,r=t>0?e.max(i):e.min(i),o=r.parent.inlineContent?r.depth?n.doc.resolve(t>0?r.after():r.before()):null:r;return o&&ot.findFrom(o,t)}function fu(n,t){return n.dispatch(n.state.tr.setSelection(t).scrollIntoView()),!0}function m4(n,t,e){let i=n.state.selection;if(!(i instanceof nt)){if(i instanceof qe&&i.node.isInline)return fu(n,new nt(t>0?i.$to:i.$from));{let r=nS(n.state,t);return!!r&&fu(n,r)}}if(!i.empty||e.indexOf("s")>-1)return!1;if(n.endOfTextblock(t>0?"forward":"backward")){let r=nS(n.state,t);return!!(r&&r instanceof qe)&&fu(n,r)}if(!(qo&&e.indexOf("m")>-1)){let s,r=i.$head,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText)return!1;let a=t<0?r.pos-o.nodeSize:r.pos;return!!(o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM)&&(qe.isSelectable(o)?fu(n,new qe(t<0?n.state.doc.resolve(r.pos-o.nodeSize):r)):!!Ab&&fu(n,new nt(n.state.doc.resolve(t<0?a:a+o.nodeSize))))}}function Nb(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function ng(n){let t=n.pmViewDesc;return t&&0==t.size&&(n.nextSibling||"BR"!=n.nodeName)}function ig(n,t){return t<0?function Lse(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let r,o,s=!1;for(ys&&1==e.nodeType&&i0){if(1!=e.nodeType)break;{let a=e.childNodes[i-1];if(ng(a))r=e,o=--i;else{if(3!=a.nodeType)break;e=a,i=e.nodeValue.length}}}else{if(y4(e))break;{let a=e.previousSibling;for(;a&&ng(a);)r=e.parentNode,o=Yo(a),a=a.previousSibling;if(a)e=a,i=Nb(e);else{if(e=e.parentNode,e==n.dom)break;i=0}}}s?iS(n,e,i):r&&iS(n,r,o)}(n):g4(n)}function g4(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let o,s,r=Nb(e);for(;;)if(i{n.state==r&&Ua(n)},50)}function _4(n,t){let e=n.state.doc.resolve(t);if(!hr&&!ose&&e.parent.inlineContent){let r=n.coordsAtPos(t);if(t>e.start()){let o=n.coordsAtPos(t-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 v4(n,t,e){let i=n.state.selection;if(i instanceof nt&&!i.empty||e.indexOf("s")>-1||qo&&e.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||n.endOfTextblock(t<0?"up":"down")){let s=nS(n.state,t);if(s&&s instanceof qe)return fu(n,s)}if(!r.parent.inlineContent){let s=t<0?r:o,a=i instanceof To?ot.near(s,t):ot.findFrom(s,t);return!!a&&fu(n,a)}return!1}function b4(n,t){if(!(n.state.selection instanceof nt))return!0;let{$head:e,$anchor:i,empty:r}=n.state.selection;if(!e.sameParent(i))return!0;if(!r)return!1;if(n.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!e.textOffset&&(t<0?e.nodeBefore:e.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return t<0?s.delete(e.pos-o.nodeSize,e.pos):s.delete(e.pos,e.pos+o.nodeSize),n.dispatch(s),!0}return!1}function w4(n,t,e){n.domObserver.stop(),t.contentEditable=e,n.domObserver.start()}function C4(n,t){n.someProp("transformCopied",f=>{t=f(t,n)});let e=[],{content:i,openStart:r,openEnd:o}=t;for(;r>1&&o>1&&1==i.childCount&&1==i.firstChild.childCount;){r--,o--;let f=i.firstChild;e.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),i=f.content}let s=n.someProp("clipboardSerializer")||Ws.fromSchema(n.state.schema),a=O4(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u,c=l.firstChild,d=0;for(;c&&1==c.nodeType&&(u=x4[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(e)}`),{dom:l,text:n.someProp("clipboardTextSerializer",f=>f(t,n))||t.content.textBetween(0,t.content.size,"\n\n")}}function D4(n,t,e,i,r){let s,a,o=r.parent.type.spec.code;if(!e&&!t)return null;let l=t&&(i||o||!e);if(l){if(n.someProp("transformPastedText",h=>{t=h(t,o||i,n)}),o)return t?new De(ce.from(n.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):De.empty;let d=n.someProp("clipboardTextParser",h=>h(t,r,i,n));if(d)a=d;else{let h=r.marks(),{schema:f}=n.state,p=Ws.fromSchema(f);s=document.createElement("div"),t.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=>{e=d(e,n)}),s=function Bse(n){let t=/^(\s*]*>)*/.exec(n);t&&(n=n.slice(t[0].length));let r,e=O4().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(n);if((r=i&&x4[i[1].toLowerCase()])&&(n=r.map(o=>"<"+o+">").join("")+n+r.map(o=>"").reverse().join("")),e.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")||Dh.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!(!l&&!u),context:r,ruleFromNode:h=>"BR"!=h.nodeName||h.nextSibling||!h.parentNode||zse.test(h.parentNode.nodeName)?null:{ignore:!0}})),u)a=function Hse(n,t){if(!n.size)return n;let i,e=n.content.firstChild.type.schema;try{i=JSON.parse(t)}catch{return n}let{content:r,openStart:o,openEnd:s}=n;for(let a=i.length-2;a>=0;a-=2){let l=e.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=ce.from(l.create(i[a+1],r)),o++,s++}return new De(r,o,s)}(E4(a,+u[1],+u[2]),u[4]);else if(a=De.maxOpen(function Vse(n,t){if(n.childCount<2)return n;for(let e=t.depth;e>=0;e--){let o,r=t.node(e).contentMatchAt(t.index(e)),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&&M4(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=S4(s[s.length-1],o.length));let u=T4(a,l);s.push(u),r=r.matchType(u.type),o=l}}),s)return ce.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 zse=/^(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 T4(n,t,e=0){for(let i=t.length-1;i>=e;i--)n=t[i].create(null,ce.from(n));return n}function M4(n,t,e,i,r){if(r1&&(o=0),r=e&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(ce.empty,!0))),n.replaceChild(t<0?0:n.childCount-1,s.copy(a))}function E4(n,t,e){return t{for(let e in t)n.input.eventHandlers[e]||n.dom.addEventListener(e,n.input.eventHandlers[e]=i=>sS(n,i))})}function sS(n,t){return n.someProp("handleDOMEvents",e=>{let i=e[t.type];return!!i&&(i(n,t)||t.defaultPrevented)})}function qse(n,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let e=t.target;e!=n.dom;e=e.parentNode)if(!e||11==e.nodeType||e.pmViewDesc&&e.pmViewDesc.stopEvent(t))return!1;return!0}function Pb(n){return{left:n.clientX,top:n.clientY}}function aS(n,t,e,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(t,a=>s>o.depth?a(n,e,o.nodeAfter,o.before(s),r,!0):a(n,e,o.node(s),o.before(s),r,!1)))return!0;return!1}function jh(n,t,e){n.focused||n.focus();let i=n.state.tr.setSelection(t);"pointer"==e&&i.setMeta("pointer",!0),n.dispatch(i)}function eae(n,t,e,i){return aS(n,"handleDoubleClickOn",t,e,i)||n.someProp("handleDoubleClick",r=>r(n,t,i))}function tae(n,t,e,i){return aS(n,"handleTripleClickOn",t,e,i)||n.someProp("handleTripleClick",r=>r(n,t,i))||function nae(n,t,e){if(0!=e.button)return!1;let i=n.state.doc;if(-1==t)return!!i.inlineContent&&(jh(n,nt.create(i,0,i.content.size),"pointer"),!0);let r=i.resolve(t);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)jh(n,nt.create(i,a+1,a+1+s.content.size),"pointer");else{if(!qe.isSelectable(s))continue;jh(n,qe.create(i,a),"pointer")}return!0}}(n,e,i)}function lS(n){return Lb(n)}kr.keydown=(n,t)=>{let e=t;if(n.input.shiftKey=16==e.keyCode||e.shiftKey,!k4(n,e)&&(n.input.lastKeyCode=e.keyCode,n.input.lastKeyCodeTime=Date.now(),!_s||!hr||13!=e.keyCode))if(229!=e.keyCode&&n.domObserver.forceFlush(),!Rh||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)n.someProp("handleKeyDown",i=>i(n,e))||function jse(n,t){let e=t.keyCode,i=function Fse(n){let t="";return n.ctrlKey&&(t+="c"),n.metaKey&&(t+="m"),n.altKey&&(t+="a"),n.shiftKey&&(t+="s"),t}(t);if(8==e||qo&&72==e&&"c"==i)return b4(n,-1)||ig(n,-1);if(46==e||qo&&68==e&&"c"==i)return b4(n,1)||ig(n,1);if(13==e||27==e)return!0;if(37==e||qo&&66==e&&"c"==i){let r=37==e?"ltr"==_4(n,n.state.selection.from)?-1:1:-1;return m4(n,r,i)||ig(n,r)}if(39==e||qo&&70==e&&"c"==i){let r=39==e?"ltr"==_4(n,n.state.selection.from)?1:-1:1;return m4(n,r,i)||ig(n,r)}return 38==e||qo&&80==e&&"c"==i?v4(n,-1,i)||ig(n,-1):40==e||qo&&78==e&&"c"==i?function Rse(n){if(!Or||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:e}=n.domSelectionRange();if(t&&1==t.nodeType&&0==e&&t.firstChild&&"false"==t.firstChild.contentEditable){let i=t.firstChild;w4(n,i,"true"),setTimeout(()=>w4(n,i,"false"),20)}return!1}(n)||v4(n,1,i)||g4(n):i==(qo?"m":"c")&&(66==e||73==e||89==e||90==e)}(n,e)?e.preventDefault():Rl(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,cu(13,"Enter"))),n.input.lastIOSEnter=0)},200)}},kr.keyup=(n,t)=>{16==t.keyCode&&(n.input.shiftKey=!1)},kr.keypress=(n,t)=>{let e=t;if(k4(n,e)||!e.charCode||e.ctrlKey&&!e.altKey||qo&&e.metaKey)return;if(n.someProp("handleKeyPress",r=>r(n,e)))return void e.preventDefault();let i=n.state.selection;if(!(i instanceof nt&&i.$from.sameParent(i.$to))){let r=String.fromCharCode(e.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()),e.preventDefault()}};const A4=qo?"metaKey":"ctrlKey";Ar.mousedown=(n,t)=>{let e=t;n.input.shiftKey=e.shiftKey;let i=lS(n),r=Date.now(),o="singleClick";r-n.input.lastClick.time<500&&function Qse(n,t){let e=t.x-n.clientX,i=t.y-n.clientY;return e*e+i*i<100}(e,n.input.lastClick)&&!e[A4]&&("singleClick"==n.input.lastClick.type?o="doubleClick":"doubleClick"==n.input.lastClick.type&&(o="tripleClick")),n.input.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};let s=n.posAtCoords(Pb(e));s&&("singleClick"==o?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new iae(n,s,e,!!i)):("doubleClick"==o?eae:tae)(n,s.pos,s.inside,e)?e.preventDefault():Rl(n,"pointer"))};class iae{constructor(t,e,i,r){let o,s;if(this.view=t,this.pos=e,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!i[A4],this.allowDefault=i.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let u=t.state.doc.resolve(e.pos);o=u.parent,s=u.depth?u.before():0}const a=r?null:i.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(0==i.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof qe&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!ys||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()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Rl(t,"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(()=>Ua(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(Pb(t))),this.updateAllowDefault(t),this.allowDefault||!e?Rl(this.view,"pointer"):function Xse(n,t,e,i,r){return aS(n,"handleClickOn",t,e,i)||n.someProp("handleClick",o=>o(n,t,i))||(r?function Jse(n,t){if(-1==t)return!1;let i,r,e=n.state.selection;e instanceof qe&&(i=e.node);let o=n.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(qe.isSelectable(a)){r=i&&e.$from.depth>0&&s>=e.$from.depth&&o.before(e.$from.depth+1)==e.$from.pos?o.before(e.$from.depth):o.before(s);break}}return null!=r&&(jh(n,qe.create(n.state.doc,r),"pointer"),!0)}(n,e):function Zse(n,t){if(-1==t)return!1;let e=n.state.doc.resolve(t),i=e.nodeAfter;return!!(i&&i.isAtom&&qe.isSelectable(i))&&(jh(n,new qe(e),"pointer"),!0)}(n,e))}(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||Or&&this.mightDrag&&!this.mightDrag.node.isAtom||hr&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(jh(this.view,ot.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Rl(this.view,"pointer")}move(t){this.updateAllowDefault(t),Rl(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function k4(n,t){return!!n.composing||!!(Or&&Math.abs(t.timeStamp-n.input.compositionEndedAt)<500)&&(n.input.compositionEndedAt=-2e8,!0)}Ar.touchstart=n=>{n.input.lastTouch=Date.now(),lS(n),Rl(n,"pointer")},Ar.touchmove=n=>{n.input.lastTouch=Date.now(),Rl(n,"pointer")},Ar.contextmenu=n=>lS(n);const rae=_s?5e3:-1;function N4(n,t){clearTimeout(n.input.composingTimeout),t>-1&&(n.input.composingTimeout=setTimeout(()=>Lb(n),t))}function P4(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=function oae(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function Lb(n,t=!1){if(!(_s&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),P4(n),t||n.docView&&n.docView.dirty){let e=X1(n);return e&&!e.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(e)):n.updateState(n.state),!0}return!1}}kr.compositionstart=kr.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:t}=n,e=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!e.textOffset&&e.parentOffset&&e.nodeBefore.marks.some(i=>!1===i.type.spec.inclusive)))n.markCursor=n.state.storedMarks||e.marks(),Lb(n,!0),n.markCursor=null;else if(Lb(n),ys&&t.selection.empty&&e.parentOffset&&!e.textOffset&&e.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}N4(n,rae)},kr.compositionend=(n,t)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=t.timeStamp,n.input.compositionID++,N4(n,20))};const zh=to&&kl<15||Rh&&sse<604;function rg(n,t,e,i,r){let o=D4(n,t,e,i,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,r,o||De.empty)))return!0;if(!o)return!1;let s=function aae(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}Ar.copy=kr.cut=(n,t)=>{let e=t,i=n.state.selection,r="cut"==e.type;if(i.empty)return;let o=zh?null:e.clipboardData,s=i.content(),{dom:a,text:l}=C4(n,s);o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function sae(n,t){if(!n.dom.parentNode)return;let e=n.dom.parentNode.appendChild(document.createElement("div"));e.appendChild(t),e.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(t),n.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e),n.focus()},50)}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},kr.paste=(n,t)=>{let e=t;if(n.composing&&!_s)return;let i=zh?null:e.clipboardData;i&&rg(n,i.getData("text/plain"),i.getData("text/html"),n.input.shiftKey,e)?e.preventDefault():function lae(n,t){if(!n.dom.parentNode)return;let e=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,i=n.dom.parentNode.appendChild(document.createElement(e?"textarea":"div"));e||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{n.focus(),i.parentNode&&i.parentNode.removeChild(i),e?rg(n,i.value,null,n.input.shiftKey,t):rg(n,i.textContent,i.innerHTML,n.input.shiftKey,t)},50)}(n,e)};class cae{constructor(t,e){this.slice=t,this.move=e}}const L4=qo?"altKey":"ctrlKey";Ar.dragstart=(n,t)=>{let e=t,i=n.input.mouseDown;if(i&&i.done(),!e.dataTransfer)return;let r=n.state.selection,o=r.empty?null:n.posAtCoords(Pb(e));if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof qe?r.to-1:r.to)))if(i&&i.mightDrag)n.dispatch(n.state.tr.setSelection(qe.create(n.state.doc,i.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){let c=n.docView.nearestDesc(e.target,!0);c&&c.node.type.spec.draggable&&c!=n.docView&&n.dispatch(n.state.tr.setSelection(qe.create(n.state.doc,c.posBefore)))}let s=n.state.selection.content(),{dom:a,text:l}=C4(n,s);e.dataTransfer.clearData(),e.dataTransfer.setData(zh?"Text":"text/html",a.innerHTML),e.dataTransfer.effectAllowed="copyMove",zh||e.dataTransfer.setData("text/plain",l),n.dragging=new cae(s,!e[L4])},Ar.dragend=n=>{let t=n.dragging;window.setTimeout(()=>{n.dragging==t&&(n.dragging=null)},50)},kr.dragover=kr.dragenter=(n,t)=>t.preventDefault(),kr.drop=(n,t)=>{let e=t,i=n.dragging;if(n.dragging=null,!e.dataTransfer)return;let r=n.posAtCoords(Pb(e));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=D4(n,e.dataTransfer.getData(zh?"Text":"text/plain"),zh?null:e.dataTransfer.getData("text/html"),!1,o);let a=!(!i||e[L4]);if(n.someProp("handleDrop",p=>p(n,e,s||De.empty,a)))return void e.preventDefault();if(!s)return;e.preventDefault();let l=s?Aj(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&&qe.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new qe(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,g,y,b)=>p=b),c.setSelection(tS(n,f,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},Ar.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())&&Ua(n)},20))},Ar.blur=(n,t)=>{let e=t;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),e.relatedTarget&&n.dom.contains(e.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},Ar.beforeinput=(n,t)=>{if(hr&&_s&&"deleteContentBackward"==t.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,cu(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 kr)Ar[n]=kr[n];function og(n,t){if(n==t)return!0;for(let e in n)if(n[e]!==t[e])return!1;for(let e in t)if(!(e in n))return!1;return!0}class cS{constructor(t,e){this.toDOM=t,this.spec=e||pu,this.side=this.spec.side||0}map(t,e,i,r){let{pos:o,deleted:s}=t.mapResult(e.from+r,this.side<0?-1:1);return s?null:new ki(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof cS&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&og(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Fl{constructor(t,e){this.attrs=t,this.spec=e||pu}map(t,e,i,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-i,s=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new ki(o,s,this)}valid(t,e){return e.from=t&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,e-a,i,r+a,o)}}map(t,e,i){return this==fr||0==t.maps.length?this:this.mapInner(t,e,0,0,i||pu)}mapInner(t,e,i,r,o){let s;for(let a=0;a{let g=m-p-(f-h);for(let y=0;yb+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=e.maps[c].map(u,-1)}let l=!1;for(let c=0;c=i.content.size){l=!0;continue}let f=e.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(e,g,u+1,n[c]+o+1,s);y!=fr?(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 dae(n,t,e,i,r,o,s){function a(l,c){for(let u=0;u{let u,c=l+i;if(u=F4(e,a,c)){for(r||(r=this.children.slice());oa&&d.to=t){this.children[a]==t&&(i=this.children[a+2]);break}let o=t+1,s=o+e.content.size;for(let a=0;ao&&l.type instanceof Fl){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;cr.map(t,e,pu));return jl.from(i)}forChild(t,e){if(e.isLeaf)return Fn.empty;let i=[];for(let r=0;re instanceof Fn)?t:t.reduce((e,i)=>e.concat(i instanceof Fn?i:i.members),[]))}}}function R4(n,t){if(!t||!n.length)return n;let e=[];for(let i=0;ie&&s.to{let c=F4(n,a,l+e);if(c){o=!0;let u=Rb(c,a,e+l+1,i);u!=fr&&r.push(l,l+a.nodeSize,u)}});let s=R4(o?j4(n):n,-e).sort(mu);for(let a=0;a0;)t++;n.splice(t,0,e)}function hS(n){let t=[];return n.someProp("decorations",e=>{let i=e(n.state);i&&i!=fr&&t.push(i)}),n.cursorWrapper&&t.push(Fn.create(n.state.doc,[n.cursorWrapper.deco])),jl.from(t)}const hae={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fae=to&&kl<=11;class pae{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class mae{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new pae,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()}),fae&&(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,hae)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;ethis.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(f4(this.view)){if(this.suppressingSelectionUpdates)return Ua(this.view);if(to&&kl<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&lu(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let i,e=new Set;for(let o=t.focusNode;o;o=Jm(o))e.add(o);for(let o=t.anchorNode;o;o=Jm(o))if(e.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:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);let i=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&f4(t)&&!this.ignoreSelectionChange(i),o=-1,s=-1,a=!1,l=[];if(t.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&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||r)&&(o>-1&&(t.docView.markDirty(o,s),function gae(n){if(!V4.has(n)&&(V4.set(n,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace))){if(n.requiresGeckoHackNode=ys,B4)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."),B4=!0}}(t)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(i)||Ua(t),this.currentSelection.set(i))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let i=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(i==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style"))||!i||i.ignoreMutation(t))return null;if("childList"==t.type){for(let u=0;ut.content.size?null:tS(n,t.resolve(e.anchor),t.resolve(e.head))}function fS(n,t,e){let i=n.depth,r=t?n.end():n.pos;for(;i>0&&(t||n.indexAfter(i)==n.node(i).childCount);)i--,r++,t=!1;if(e){let o=n.node(i).maybeChild(n.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,r++}return r}class Mae{constructor(t,e){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 Wse,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(Y4),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=W4(this),$4(this),this.nodeViews=G4(this),this.docView=e4(this.state.doc,H4(this),hS(this),this.dom,this),this.domObserver=new mae(this,(i,r,o,s)=>function wae(n,t,e,i,r){if(t<0){let K=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,ke=X1(n,K);if(ke&&!n.state.selection.eq(ke)){if(hr&&_s&&13===n.input.lastKeyCode&&Date.now()-100vt(n,cu(13,"Enter"))))return;let He=n.state.tr.setSelection(ke);"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(t),s=o.sharedDepth(e);t=o.before(s+1),e=n.state.doc.resolve(e).after(s+1);let d,h,a=n.state.selection,l=function _ae(n,t,e){let c,{node:i,fromOffset:r,toOffset:o,from:s,to:a}=n.docView.parseRange(t,e),l=n.domSelectionRange(),u=l.anchorNode;if(u&&n.dom.contains(1==u.nodeType?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Ob(l)||c.push({node:l.focusNode,offset:l.focusOffset})),hr&&8===n.input.lastKeyCode)for(let g=o;g>r;g--){let y=i.childNodes[g-1],b=y.pmViewDesc;if("BR"==y.nodeName&&!b){o=g;break}if(!b||b.size)break}let d=n.state.doc,h=n.someProp("domParser")||Dh.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:vae,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,t,e),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((Rh&&n.input.lastIOSEnter>Date.now()-225||_s)&&r.some(K=>1==K.nodeType&&!bae.test(K.nodeName))&&(!f||f.endA>=f.endB)&&n.someProp("handleKeyDown",K=>K(n,cu(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(!f){if(!(i&&a instanceof nt&&!a.empty&&a.$head.sameParent(a.$anchor))||n.composing||l.sel&&l.sel.anchor!=l.sel.head){if(l.sel){let K=U4(n,n.state.doc,l.sel);if(K&&!K.eq(n.state.selection)){let ke=n.state.tr.setSelection(K);n.composing&&ke.setMeta("composition",n.input.compositionID),n.dispatch(ke)}}return}f={start:a.from,endA:a.to,endB:a.to}}if(hr&&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)),to&&kl<=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 b,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((Rh&&n.input.lastIOSEnter>Date.now()-225&&(!y||r.some(K=>"DIV"==K.nodeName||"P"==K.nodeName))||!y&&p.posK(n,cu(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(n.state.selection.anchor>f.start&&function Dae(n,t,e,i,r){if(!i.parent.isTextblock||e-t<=r.pos-i.pos||fS(i,!0,!1)e||fS(s,!0,!1)K(n,cu(8,"Backspace"))))return void(_s&&hr&&n.domObserver.suppressSelectionUpdates());hr&&_s&&f.endB==f.start&&(n.input.lastAndroidDelete=Date.now()),_s&&!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,cu(13,"Enter"))})},20));let N,S,J,w=f.start,_=f.endA;if(y)if(p.pos==m.pos)to&&kl<=11&&0==p.parentOffset&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ua(n),20)),N=n.state.tr.delete(w,_),S=c.resolve(f.start).marksAcross(c.resolve(f.endA));else if(f.endA==f.endB&&(J=function Cae(n,t){let s,a,l,e=n.firstChild.marks,i=t.firstChild.marks,r=e,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;uke(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=U4(n,N.doc,l.sel);K&&!(hr&&_s&&n.composing&&K.empty&&(f.start!=f.endB||n.input.lastAndroidDelete{qse(n,i)&&!sS(n,i)&&(n.editable||!(i.type in kr))&&e(n,i)},$se[t]?{passive:!0}:void 0)}Or&&n.dom.addEventListener("input",()=>null),oS(n)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&oS(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Y4),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let i in this._props)e[i]=this._props[i];e.state=this.state;for(let i in t)e[i]=t[i];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){let i=this.state,r=!1,o=!1;t.storedMarks&&this.composing&&(P4(this),o=!0),this.state=t;let s=i.plugins!=t.plugins||this._props.plugins!=e.plugins;if(s||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let h=G4(this);(function Eae(n,t){let e=0,i=0;for(let r in n){if(n[r]!=t[r])return!0;e++}for(let r in t)i++;return e!=i})(h,this.nodeViews)&&(this.nodeViews=h,r=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&oS(this),this.editable=W4(this),$4(this);let a=hS(this),l=H4(this),c=i.plugins==t.plugins||i.doc.eq(t.doc)?t.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",u=r||!this.docView.matchesNode(t.doc,l,a);(u||!t.selection.eq(i.selection))&&(o=!0);let d="preserve"==c&&o&&null==this.dom.style.overflowAnchor&&function cse(n){let i,r,t=n.dom.getBoundingClientRect(),e=Math.max(0,t.top);for(let o=(t.left+t.right)/2,s=e+1;s=e-20){i=a,r=l.top;break}}return{refDOM:i,refTop:r,stack:U3(n.dom)}}(this);if(o){this.domObserver.stop();let h=u&&(to||hr)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&function Sae(n,t){let e=Math.min(n.$anchor.sharedDepth(n.head),t.$anchor.sharedDepth(t.head));return n.$anchor.start(e)!=t.$anchor.start(e)}(i.selection,t.selection);if(u){let f=hr?this.trackWrites=this.domSelectionRange().focusNode:null;(r||!this.docView.update(t.doc,l,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=e4(t.doc,l,a,this.dom,this)),f&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function Pse(n){let t=n.docView.domFromPos(n.state.selection.anchor,0),e=n.domSelectionRange();return lu(t.node,t.offset,e.anchorNode,e.anchorOffset)}(this))?Ua(this,h):(d4(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():d&&function use({refDOM:n,refTop:t,stack:e}){let i=n?n.getBoundingClientRect().top:0;H3(e,0==i?0:i-t)}(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",e=>e(this)))if(this.state.selection instanceof qe){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&B3(this,e.getBoundingClientRect(),t)}else B3(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;ee.ownerDocument.getSelection()),this._root=e;return t||document}posAtCoords(t){return gse(this,t)}coordsAtPos(t,e=1){return Y3(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,i=-1){let r=this.docView.posFromDOM(t,e,i);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return function wse(n,t,e){return K3==t&&Q3==e?Z3:(K3=t,Q3=e,Z3="up"==e||"down"==e?function _se(n,t,e){let i=t.selection,r="up"==e?i.$from:i.$to;return q3(n,t,()=>{let{node:o}=n.docView.domFromPos(r.pos,"up"==e?-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=Y3(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=Ba(a,0,a.nodeValue.length).getClientRects()}for(let c=0;cu.top+1&&("up"==e?s.top-u.top>2*(u.bottom-s.top):u.bottom-s.bottom>2*(s.bottom-u.top)))return!1}}return!0})}(n,t,e):function bse(n,t,e){let{$head:i}=t.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=!r,s=r==i.parent.content.size,a=n.domSelection();return vse.test(i.parent.textContent)&&a.modify?q3(n,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",e,"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"==e||"backward"==e?o:s}(n,t,e))}(this,e||this.state,t)}pasteHTML(t,e){return rg(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return rg(this,t,null,!0,e||new ClipboardEvent("paste"))}destroy(){this.docView&&(function Yse(n){n.domObserver.stop();for(let t in n.input.eventHandlers)n.dom.removeEventListener(t,n.input.eventHandlers[t]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],hS(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(t){return function Kse(n,t){!sS(n,t)&&Ar[t.type]&&(n.editable||!(t.type in kr))&&Ar[t.type](n,t)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return Or&&11===this.root.nodeType&&function nse(n){let t=n.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom?function yae(n){let t;function e(l){l.preventDefault(),l.stopImmediatePropagation(),t=l.getTargetRanges()[0]}n.dom.addEventListener("beforeinput",e,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",e,!0);let i=t.startContainer,r=t.startOffset,o=t.endContainer,s=t.endOffset,a=n.domAtPos(n.state.selection.anchor);return lu(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 H4(n){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(n.editable),n.someProp("attributes",e=>{if("function"==typeof e&&(e=e(n.state)),e)for(let i in e)"class"==i?t.class+=" "+e[i]:"style"==i?t.style=(t.style?t.style+";":"")+e[i]:!t[i]&&"contenteditable"!=i&&"nodeName"!=i&&(t[i]=String(e[i]))}),t.translate||(t.translate="no"),[ki.node(0,n.state.doc.content.size,t)]}function $4(n){if(n.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),n.cursorWrapper={dom:t,deco:ki.widget(n.state.selection.head,t,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function W4(n){return!n.someProp("editable",t=>!1===t(n.state))}function G4(n){let t=Object.create(null);function e(i){for(let r in i)Object.prototype.hasOwnProperty.call(t,r)||(t[r]=i[r])}return n.someProp("nodeViews",e),n.someProp("markViews",e),t}function Y4(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 zl={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:"'"},Fb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},xae=typeof navigator<"u"&&/Mac/.test(navigator.platform),Iae=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Zi=0;Zi<10;Zi++)zl[48+Zi]=zl[96+Zi]=String(Zi);for(Zi=1;Zi<=24;Zi++)zl[Zi+111]="F"+Zi;for(Zi=65;Zi<=90;Zi++)zl[Zi]=String.fromCharCode(Zi+32),Fb[Zi]=String.fromCharCode(Zi);for(var pS in zl)Fb.hasOwnProperty(pS)||(Fb[pS]=zl[pS]);const Aae=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function kae(n){let i,r,o,s,t=n.split(/-(?!$)/),e=t[t.length-1];"Space"==e&&(e=" ");for(let a=0;a127)&&(o=zl[i.keyCode])&&o!=r){let a=t[mS(o,i)];if(a&&a(e.state,e.dispatch,e))return!0}}return!1}}const yS=(n,t)=>!n.selection.empty&&(t&&t(n.tr.deleteSelection().scrollIntoView()),!0);const K4=(n,t,e)=>{let i=function q4(n,t){let{$cursor:e}=n.selection;return!e||(t?!t.endOfTextblock("backward",n):e.parentOffset>0)?null:e}(n,e);if(!i)return!1;let r=_S(i);if(!r){let s=i.blockRange(),a=s&&Sh(s);return null!=a&&(t&&t(n.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(!o.type.spec.isolating&&a5(n,r,t))return!0;if(0==i.parent.content.size&&(Bh(o,"end")||qe.isSelectable(o))){let s=b1(n.doc,i.before(),i.after(),De.empty);if(s&&s.slice.size{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(e?!e.endOfTextblock("backward",n):i.parentOffset>0)return!1;o=_S(i)}let s=o&&o.nodeBefore;return!(!s||!qe.isSelectable(s)||(t&&t(n.tr.setSelection(qe.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),0))};function _S(n){if(!n.parent.type.spec.isolating)for(let t=n.depth-1;t>=0;t--){if(n.index(t)>0)return n.doc.resolve(n.before(t+1));if(n.node(t).type.spec.isolating)break}return null}const X4=(n,t,e)=>{let i=function J4(n,t){let{$cursor:e}=n.selection;return!e||(t?!t.endOfTextblock("forward",n):e.parentOffset{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(e?!e.endOfTextblock("forward",n):i.parentOffset=0;t--){let e=n.node(t);if(n.index(t)+1{let{$head:e,$anchor:i}=n.selection;return!(!e.parent.type.spec.code||!e.sameParent(i)||(t&&t(n.tr.insertText("\n").scrollIntoView()),0))};function bS(n){for(let t=0;t{let{$head:e,$anchor:i}=n.selection;if(!e.parent.type.spec.code||!e.sameParent(i))return!1;let r=e.node(-1),o=e.indexAfter(-1),s=bS(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(t){let a=e.after(),l=n.tr.replaceWith(a,a,s.createAndFill());l.setSelection(ot.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},r5=(n,t)=>{let e=n.selection,{$from:i,$to:r}=e;if(e instanceof To||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=bS(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!i.parentOffset&&r.index(){let{$cursor:e}=n.selection;if(!e||e.parent.content.size)return!1;if(e.depth>1&&e.after()!=e.end(-1)){let o=e.before();if(za(n.doc,o))return t&&t(n.tr.split(o).scrollIntoView()),!0}let i=e.blockRange(),r=i&&Sh(i);return null!=r&&(t&&t(n.tr.lift(i,r).scrollIntoView()),!0)},s5=function jae(n){return(t,e)=>{let{$from:i,$to:r}=t.selection;if(t.selection instanceof qe&&t.selection.node.isBlock)return!(!i.parentOffset||!za(t.doc,i.pos)||(e&&e(t.tr.split(i.pos).scrollIntoView()),0));if(!i.parent.isBlock)return!1;if(e){let o=r.parentOffset==r.parent.content.size,s=t.tr;(t.selection instanceof nt||t.selection instanceof To)&&s.deleteSelection();let a=0==i.depth?null:bS(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=n&&n(r.parent,o),c=l?[l]:o&&a?[{type:a}]:void 0,u=za(s.doc,s.mapping.map(i.pos),1,c);if(!c&&!u&&za(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)}e(s.scrollIntoView())}return!0}}();function a5(n,t,e){let o,s,i=t.nodeBefore,r=t.nodeAfter;if(i.type.spec.isolating||r.type.spec.isolating)return!1;if(function Bae(n,t,e){let i=t.nodeBefore,r=t.nodeAfter,o=t.index();return!(!(i&&r&&i.type.compatibleContent(r.type))||(!i.content.size&&t.parent.canReplace(o-1,o)?(e&&e(n.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!r.isTextblock&&!Sl(n.doc,t.pos)||(e&&e(n.tr.clearIncompatible(t.pos,i.type,i.contentMatchAt(i.childCount)).join(t.pos).scrollIntoView()),0)))}(n,t,e))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(r.type))&&s.matchType(o[0]||r.type).validEnd){if(e){let d=t.pos+r.nodeSize,h=ce.empty;for(let m=o.length-1;m>=0;m--)h=ce.from(o[m].create(null,h));h=ce.from(i.copy(h));let f=n.tr.step(new zi(t.pos-1,d,t.pos,d,new De(h,1,0),o.length,!0)),p=d+2*o.length;Sl(f.doc,p)&&f.join(p),e(f.scrollIntoView())}return!0}let l=ot.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&Sh(c);if(null!=u&&u>=t.depth)return e&&e(n.tr.lift(c,u).scrollIntoView()),!0;if(a&&Bh(r,"start",!0)&&Bh(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(e){let m=ce.empty;for(let y=h.length-1;y>=0;y--)m=ce.from(h[y].copy(m));e(n.tr.step(new zi(t.pos-h.length,t.pos+r.nodeSize,t.pos+p,t.pos+r.nodeSize-p,new De(m,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function l5(n){return function(t,e){let i=t.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&&(e&&e(t.tr.setSelection(nt.create(t.doc,n<0?r.start(o):r.end(o)))),!0)}}const c5=l5(-1),u5=l5(1);function d5(n,t=null){return function(e,i){let r=!1;for(let o=0;o{if(r)return!1;if(l.isTextblock&&!l.hasMarkup(n,t))if(l.type==n)r=!0;else{let u=e.doc.resolve(c),d=u.index();r=u.parent.canReplaceWith(d,d+1,n)}})}if(!r)return!1;if(i){let o=e.tr;for(let s=0;s(t&&t(n.tr.setSelection(new To(n.doc))),!0)},Wae={"Ctrl-h":Vl.Backspace,"Alt-Backspace":Vl["Mod-Backspace"],"Ctrl-d":Vl.Delete,"Ctrl-Alt-Backspace":Vl["Mod-Delete"],"Alt-Delete":Vl["Mod-Delete"],"Alt-d":Vl["Mod-Delete"],"Ctrl-a":c5,"Ctrl-e":u5};for(let n in Vl)Wae[n]=Vl[n];function jb(n){const{state:t,transaction:e}=n;let{selection:i}=e,{doc:r}=e,{storedMarks:o}=e;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=e.selection,r=e.doc,o=e.storedMarks,e}}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform();class zb{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:i}=this,{view:r}=e,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).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(t,e=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!t,c=t||o.tr,d={...Object.fromEntries(Object.entries(i).map(([h,f])=>[h,(...m)=>{const g=this.buildProps(c,e),y=f(...m)(g);return a.push(y),d}])),run:()=>(!l&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(h=>!0===h))};return d}createCan(t){const{rawCommands:e,state:i}=this,o=t||i.tr,s=this.buildProps(o,!1);return{...Object.fromEntries(Object.entries(e).map(([l,c])=>[l,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,!1)}}buildProps(t,e=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r;o.storedMarks&&t.setStoredMarks(o.storedMarks);const a={tr:t,editor:r,view:s,state:jb({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(i).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class rle{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const i=this.callbacks[t];return i&&i.forEach(r=>r.apply(this,e)),this}off(t,e){const i=this.callbacks[t];return i&&(e?this.callbacks[t]=i.filter(r=>r!==e):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function Ve(n,t,e){return void 0===n.config[t]&&n.parent?Ve(n.parent,t,e):"function"==typeof n.config[t]?n.config[t].bind({...e,parent:n.parent?Ve(n.parent,t,e):null}):n.config[t]}function Vb(n){return{baseExtensions:n.filter(r=>"extension"===r.type),nodeExtensions:n.filter(r=>"node"===r.type),markExtensions:n.filter(r=>"mark"===r.type)}}function f5(n){const t=[],{nodeExtensions:e,markExtensions:i}=Vb(n),r=[...e,...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])=>{t.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,t.push({type:s.name,name:u,attribute:h})})}),t}function Vi(n,t){if("string"==typeof n){if(!t.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return t.nodes[n]}return n}function tn(...n){return n.filter(t=>!!t).reduce((t,e)=>{const i={...t};return Object.entries(e).forEach(([r,o])=>{i[r]=i[r]?"class"===r?[i[r],o].join(" "):"style"===r?[i[r],o].join("; "):o:o}),i},{})}function TS(n,t){return t.filter(e=>e.attribute.rendered).map(e=>e.attribute.renderHTML?e.attribute.renderHTML(n.attrs)||{}:{[e.name]:n.attrs[e.name]}).reduce((e,i)=>tn(e,i),{})}function p5(n){return"function"==typeof n}function Ct(n,t,...e){return p5(n)?t?n.bind(t)(...e):n(...e):n}function m5(n,t){return n.style?n:{...n,getAttrs:e=>{const i=n.getAttrs?n.getAttrs(e):n.attrs;if(!1===i)return!1;const r=t.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(e):function sle(n){return"string"!=typeof n?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):"true"===n||"false"!==n&&n}(e.getAttribute(s.name));return null==a?o:{...o,[s.name]:a}},{});return{...i,...r}}}}function g5(n){return Object.fromEntries(Object.entries(n).filter(([t,e])=>("attrs"!==t||!function ole(n={}){return 0===Object.keys(n).length&&n.constructor===Object}(e))&&null!=e))}function MS(n,t){return t.nodes[n]||t.marks[n]||null}function _5(n,t){return Array.isArray(t)?t.some(e=>("string"==typeof e?e:e.name)===n.name):t}function SS(n){return"[object RegExp]"===Object.prototype.toString.call(n)}class sg{constructor(t){this.find=t.find,this.handler=t.handler}}function ES(n){var t;const{editor:e,from:i,to:r,text:o,rules:s,plugin:a}=n,{view:l}=e;if(l.composing)return!1;const c=l.state.doc.resolve(i);if(c.parent.type.spec.code||null!==(t=c.nodeBefore||c.nodeAfter)&&void 0!==t&&t.marks.find(h=>h.type.spec.code))return!1;let u=!1;const d=((n,t=500)=>{let e="";const i=n.parentOffset;return n.parent.nodesBetween(Math.max(0,i-t),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%";e+=u.slice(0,Math.max(0,i-o))}),e})(c)+o;return s.forEach(h=>{if(u)return;const f=((n,t)=>{if(SS(t))return t.exec(n);const e=t(n);if(!e)return null;const i=[e.text];return i.index=e.index,i.input=n,i.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(e.replaceWith)),i})(d,h.find);if(!f)return;const p=l.state.tr,m=jb({state:l.state,transaction:p}),g={from:i-(f[0].length-o.length),to:r},{commands:y,chain:b,can:w}=new zb({editor:e,state:m});null===h.handler({state:m,range:g,match:f,commands:y,chain:b,can:w})||!p.steps.length||(p.setMeta(a,{transform:p,from:i,to:r,text:o}),l.dispatch(p),u=!0)}),u}function cle(n){const{editor:t,rules:e}=n,i=new Wt({state:{init:()=>null,apply:(r,o)=>r.getMeta(i)||(r.selectionSet||r.docChanged?null:o)},props:{handleTextInput:(r,o,s,a)=>ES({editor:t,from:o,to:s,text:a,rules:e,plugin:i}),handleDOMEvents:{compositionend:r=>(setTimeout(()=>{const{$cursor:o}=r.state.selection;o&&ES({editor:t,from:o.pos,to:o.pos,text:"",rules:e,plugin:i})}),!1)},handleKeyDown(r,o){if("Enter"!==o.key)return!1;const{$cursor:s}=r.state.selection;return!!s&&ES({editor:t,from:s.pos,to:s.pos,text:"\n",rules:e,plugin:i})}},isInputRules:!0});return i}class xS{constructor(t){this.find=t.find,this.handler=t.handler}}function fle(n){const{editor:t,rules:e}=n;let i=null,r=!1,o=!1;return e.map(a=>new Wt({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 ule(n){return"number"==typeof n}(p)||!m||p===m.b)return;const g=u.tr,y=jb({state:u,transaction:g});return function hle(n){const{editor:t,state:e,from:i,to:r,rule:o}=n,{commands:s,chain:a,can:l}=new zb({editor:t,state:e}),c=[];return e.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,t)=>{if(SS(t))return[...n.matchAll(t)];const e=t(n);return e?e.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 b=f+y.index+1,w=b+y[0].length,_={from:e.tr.mapping.map(b),to:e.tr.mapping.map(w)},N=o.handler({state:e,range:_,match:y,commands:s,chain:a,can:l});c.push(N)})}),c.every(d=>null!==d)}({editor:t,state:y,from:Math.max(p-1,0),to:m.b-1,rule:a})&&g.steps.length?g:void 0}}))}class gu{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=gu.resolve(t),this.schema=function y5(n,t){var e;const i=f5(n),{nodeExtensions:r,markExtensions:o}=Vb(n),s=null===(e=r.find(c=>Ve(c,"topNode")))||void 0===e?void 0:e.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:t},f=g5({...n.reduce((y,b)=>{const w=Ve(b,"extendNodeSchema",d);return{...y,...w?w(c):{}}},{}),content:Ct(Ve(c,"content",d)),marks:Ct(Ve(c,"marks",d)),group:Ct(Ve(c,"group",d)),inline:Ct(Ve(c,"inline",d)),atom:Ct(Ve(c,"atom",d)),selectable:Ct(Ve(c,"selectable",d)),draggable:Ct(Ve(c,"draggable",d)),code:Ct(Ve(c,"code",d)),defining:Ct(Ve(c,"defining",d)),isolating:Ct(Ve(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var b;return[y.name,{default:null===(b=y?.attribute)||void 0===b?void 0:b.default}]}))}),p=Ct(Ve(c,"parseHTML",d));p&&(f.parseDOM=p.map(y=>m5(y,u)));const m=Ve(c,"renderHTML",d);m&&(f.toDOM=y=>m({node:y,HTMLAttributes:TS(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:t},f=g5({...n.reduce((g,y)=>{const b=Ve(y,"extendMarkSchema",d);return{...g,...b?b(c):{}}},{}),inclusive:Ct(Ve(c,"inclusive",d)),excludes:Ct(Ve(c,"excludes",d)),group:Ct(Ve(c,"group",d)),spanning:Ct(Ve(c,"spanning",d)),code:Ct(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=Ct(Ve(c,"parseHTML",d));p&&(f.parseDOM=p.map(g=>m5(g,u)));const m=Ve(c,"renderHTML",d);return m&&(f.toDOM=g=>m({mark:g,HTMLAttributes:TS(g,u)})),[c.name,f]}));return new Hie({topNode:s,nodes:a,marks:l})}(this.extensions,e),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:MS(i.name,this.schema)};"mark"===i.type&&(null===(r=Ct(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(t){const e=gu.sort(gu.flatten(t)),i=function ple(n){const t=n.filter((e,i)=>n.indexOf(e)!==i);return[...new Set(t)]}(e.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.`),e}static flatten(t){return t.map(e=>{const r=Ve(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return r?[e,...this.flatten(r())]:e}).flat(10)}static sort(t){return t.sort((i,r)=>{const o=Ve(i,"priority")||100,s=Ve(r,"priority")||100;return o>s?-1:o{const r=Ve(e,"addCommands",{name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:MS(e.name,this.schema)});return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this,e=gu.sort([...this.extensions].reverse()),i=[],r=[],o=e.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:t,type:MS(s.name,this.schema)},l=[],c=Ve(s,"addKeyboardShortcuts",a);let u={};if("mark"===s.type&&s.config.exitable&&(u.ArrowRight=()=>Nr.handleExit({editor:t,mark:s})),c){const m=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:t})]));u={...u,...m}}const d=function Pae(n){return new Wt({props:{handleKeyDown:gS(n)}})}(u);l.push(d);const h=Ve(s,"addInputRules",a);_5(s,t.options.enableInputRules)&&h&&i.push(...h());const f=Ve(s,"addPasteRules",a);_5(s,t.options.enablePasteRules)&&f&&r.push(...f());const p=Ve(s,"addProseMirrorPlugins",a);if(p){const m=p();l.push(...m)}return l}).flat();return[cle({editor:t,rules:i}),...fle({editor:t,rules:r}),...o]}get attributes(){return f5(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Vb(this.extensions);return Object.fromEntries(e.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:t,type:Vi(i.name,this.schema)},s=Ve(i,"addNodeView",o);return s?[i.name,(l,c,u,d)=>{const h=TS(l,r);return s()({editor:t,node:l,getPos:u,decorations:d,HTMLAttributes:h,extension:i})}]:[]}))}}function IS(n){return"Object"===function mle(n){return Object.prototype.toString.call(n).slice(8,-1)}(n)&&n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Bb(n,t){const e={...n};return IS(n)&&IS(t)&&Object.keys(t).forEach(i=>{IS(t[i])?i in n?e[i]=Bb(n[i],t[i]):Object.assign(e,{[i]:t[i]}):Object.assign(e,{[i]:t[i]})}),e}class Mn{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.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=Ct(Ve(this,"addOptions",{name:this.name}))),this.storage=Ct(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Mn(t)}configure(t={}){const e=this.extend();return e.options=Bb(this.options,t),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Mn(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Ct(Ve(e,"addOptions",{name:e.name})),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}}function v5(n,t,e){const{from:i,to:r}=t,{blockSeparator:o="\n\n",textSerializers:s={}}=e||{};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:t}))):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 OS(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,t])=>t.spec.toText).map(([t,e])=>[t,e.spec.toText]))}const gle=Mn.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Wt({key:new on("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:t,schema:e}=n,{doc:i,selection:r}=t,{ranges:o}=r;return v5(i,{from:Math.min(...o.map(u=>u.$from.pos)),to:Math.max(...o.map(u=>u.$to.pos))},{textSerializers:OS(e)})}}})]}});function Ub(n,t,e={strict:!0}){const i=Object.keys(t);return!i.length||i.every(r=>e.strict?t[r]===n[r]:SS(t[r])?t[r].test(n[r]):t[r]===n[r])}function AS(n,t,e={}){return n.find(i=>i.type===t&&Ub(i.attrs,e))}function xle(n,t,e={}){return!!AS(n,t,e)}function kS(n,t,e={}){if(!n||!t)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=AS([...i.node.marks],t,e);if(!r)return;let o=i.index,s=n.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(AS([...i.node.marks],t,e);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(t,"text/html").body}function Wb(n,t,e){if(e={slice:!0,parseOptions:{},...e},"object"==typeof n&&null!==n)try{return Array.isArray(n)&&n.length>0?ce.fromArray(n.map(i=>t.nodeFromJSON(i))):t.nodeFromJSON(n)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),Wb("",t,e)}if("string"==typeof n){const i=Dh.fromSchema(t);return e.slice?i.parseSlice(NS(n),e.parseOptions).content:i.parse(NS(n),e.parseOptions)}return Wb("",t,e)}function w5(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)}function ag(n,t,e={}){const{from:i,to:r,empty:o}=n.selection,s=t?Vi(t,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=>Ub(d.node.attrs,e,{strict:!1}));return o?!!c.length:c.reduce((d,h)=>d+h.to-h.from,0)>=l}function Gb(n,t){return t.nodes[n]?"node":t.marks[n]?"mark":null}function C5(n,t){const e="string"==typeof t?[t]:t;return Object.keys(n).reduce((i,r)=>(e.includes(r)||(i[r]=n[r]),i),{})}function D5(n,t,e={}){return Wb(n,t,{slice:!1,parseOptions:e})}function T5(n,t){for(let e=n.depth;e>0;e-=1){const i=n.node(e);if(t(i))return{pos:e>0?n.before(e):0,start:n.start(e),depth:e,node:i}}}function PS(n){return t=>T5(t.$from,n)}function Yb(n,t){const e=Bl(t,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===e.name);return a?{...a.attrs}:{}}function E5(n,t){const e=Gb("string"==typeof t?t:t.name,n.schema);return"node"===e?function oce(n,t){const e=Vi(t,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===e.name);return s?{...s.attrs}:{}}(n,t):"mark"===e?Yb(n,t):{}}function qb(n,t,e){const i=[];return n===t?e.resolve(n).marks().forEach(r=>{const s=kS(e.resolve(n-1),r.type);s&&i.push({mark:r,...s})}):e.nodesBetween(n,t,(r,o)=>{i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}function Kb(n,t,e){return Object.fromEntries(Object.entries(e).filter(([i])=>{const r=n.find(o=>o.type===t&&o.name===i);return!!r&&r.attribute.keepOnSplit}))}function RS(n,t,e={}){const{empty:i,ranges:r}=n.selection,o=t?Bl(t,n.schema):null;if(i)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>!o||o.name===d.type.name).find(d=>Ub(d.attrs,e,{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),b=Math.min(p,g+m.nodeSize);s+=b-y,a.push(...m.marks.map(_=>({mark:_,from:y,to:b})))})}),0===s)return!1;const l=a.filter(d=>!o||o.name===d.mark.type.name).filter(d=>Ub(d.mark.attrs,e,{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 x5(n,t){const{nodeExtensions:e}=Vb(t),i=e.find(s=>s.name===n);if(!i)return!1;const o=Ct(Ve(i,"group",{name:i.name,options:i.options,storage:i.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function yu(n,t,e){const r=n.state.doc.content.size,o=Ha(t,0,r),s=Ha(e,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 I5(n,t){const e=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(e){const i=e.filter(r=>t?.includes(r.type.name));n.tr.ensureMarks(i)}}const FS=(n,t)=>{const e=PS(s=>s.type===t)(n.selection);if(!e)return!0;const i=n.doc.resolve(Math.max(0,e.pos-1)).before(e.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return e.node.type===r?.type&&Sl(n.doc,e.pos)&&n.join(e.pos),!0},jS=(n,t)=>{const e=PS(s=>s.type===t)(n.selection);if(!e)return!0;const i=n.doc.resolve(e.start).after(e.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return e.node.type===r?.type&&Sl(n.doc,i)&&n.join(i),!0};var Cce=Object.freeze({__proto__:null,blur:()=>({editor:n,view:t})=>(requestAnimationFrame(()=>{var e;n.isDestroyed||(t.dom.blur(),null===(e=window?.getSelection())||void 0===e||e.removeAllRanges())}),!0),clearContent:(n=!1)=>({commands:t})=>t.setContent("",n),clearNodes:()=>({state:n,tr:t,dispatch:e})=>{const{selection:i}=t,{ranges:r}=i;return e&&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}=t,d=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),f=d.blockRange(h);if(!f)return;const p=Sh(f);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(f.start,m)}(p||0===p)&&t.lift(f,p)})}),!0},command:n=>t=>n(t),createParagraphNear:()=>({state:n,dispatch:t})=>r5(n,t),deleteCurrentNode:()=>({tr:n,dispatch:t})=>{const{selection:e}=n,i=e.$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(t){const a=r.before(o),l=r.after(o);n.delete(a,l).scrollIntoView()}return!0}return!1},deleteNode:n=>({tr:t,state:e,dispatch:i})=>{const r=Vi(n,e.schema),o=t.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);t.delete(l,c).scrollIntoView()}return!0}return!1},deleteRange:n=>({tr:t,dispatch:e})=>{const{from:i,to:r}=n;return e&&t.delete(i,r),!0},deleteSelection:()=>({state:n,dispatch:t})=>yS(n,t),enter:()=>({commands:n})=>n.keyboardShortcut("Enter"),exitCode:()=>({state:n,dispatch:t})=>n5(n,t),extendMarkRange:(n,t={})=>({tr:e,state:i,dispatch:r})=>{const o=Bl(n,i.schema),{doc:s,selection:a}=e,{$from:l,from:c,to:u}=a;if(r){const d=kS(l,o,t);if(d&&d.from<=c&&d.to>=u){const h=nt.create(s,d.from,d.to);e.setSelection(h)}}return!0},first:n=>t=>{const e="function"==typeof n?n(t):n;for(let i=0;i({editor:e,view:i,tr:r,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{$b()&&i.dom.focus(),requestAnimationFrame(()=>{e.isDestroyed||(i.focus(),t?.scrollIntoView&&e.commands.scrollIntoView())})};if(i.hasFocus()&&null===n||!1===n)return!0;if(o&&null===n&&!Hb(e.state.selection))return s(),!0;const a=b5(r.doc,n)||e.state.selection,l=e.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},forEach:(n,t)=>e=>n.every((i,r)=>t(i,{...e,index:r})),insertContent:(n,t)=>({tr:e,commands:i})=>i.insertContentAt({from:e.selection.from,to:e.selection.to},n,t),insertContentAt:(n,t,e)=>({tr:i,dispatch:r,editor:o})=>{if(r){e={parseOptions:{},updateSelection:!0,...e};const s=Wb(t,o.schema,{parseOptions:{preserveWhitespace:"full",...e.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(t)?i.insertText(t.map(h=>h.text||"").join(""),a,l):i.insertText("object"==typeof t&&t&&t.text?t.text:t,a,l):i.replaceWith(a,l,s),e.updateSelection&&function Ple(n,t,e){const i=n.steps.length-1;if(i{0===s&&(s=u)}),n.setSelection(ot.near(n.doc.resolve(s),e))}(i,i.steps.length-1,-1)}return!0},joinUp:()=>({state:n,dispatch:t})=>((n,t)=>{let r,e=n.selection,i=e instanceof qe;if(i){if(e.node.isTextblock||!Sl(n.doc,e.from))return!1;r=e.from}else if(r=Oj(n.doc,e.from,-1),null==r)return!1;if(t){let o=n.tr.join(r);i&&o.setSelection(qe.create(o.doc,r-n.doc.resolve(r).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0})(n,t),joinDown:()=>({state:n,dispatch:t})=>((n,t)=>{let i,e=n.selection;if(e instanceof qe){if(e.node.isTextblock||!Sl(n.doc,e.to))return!1;i=e.to}else if(i=Oj(n.doc,e.to,1),null==i)return!1;return t&&t(n.tr.join(i).scrollIntoView()),!0})(n,t),joinBackward:()=>({state:n,dispatch:t})=>K4(n,t),joinForward:()=>({state:n,dispatch:t})=>X4(n,t),keyboardShortcut:n=>({editor:t,view:e,tr:i,dispatch:r})=>{const o=function Ble(n){const t=n.split(/-(?!$)/);let i,r,o,s,e=t[t.length-1];"Space"===e&&(e=" ");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 t.captureTransaction(()=>{e.someProp("handleKeyDown",c=>c(e,a))})?.steps.forEach(c=>{const u=c.map(i.mapping);u&&r&&i.maybeStep(u)}),!0},lift:(n,t={})=>({state:e,dispatch:i})=>!!ag(e,Vi(n,e.schema),t)&&((n,t)=>{let{$from:e,$to:i}=n.selection,r=e.blockRange(i),o=r&&Sh(r);return null!=o&&(t&&t(n.tr.lift(r,o).scrollIntoView()),!0)})(e,i),liftEmptyBlock:()=>({state:n,dispatch:t})=>o5(n,t),liftListItem:n=>({state:t,dispatch:e})=>function ele(n){return function(t,e){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,s=>s.childCount>0&&s.firstChild.type==n);return!!o&&(!e||(i.node(o.depth-1).type==n?function tle(n,t,e,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(e.start),s=o.nodeAfter;if(i.mapping.map(e.end)!=e.start+o.nodeAfter.nodeSize)return!1;let a=0==e.startIndex,l=e.endIndex==r.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?ce.empty:ce.from(r))))return!1;let d=o.pos,h=d+s.nodeSize;return i.step(new zi(d-(a?1:0),h+(l?1:0),d+1,h-1,new De((a?ce.empty:ce.from(r.copy(ce.empty))).append(l?ce.empty:ce.from(r.copy(ce.empty))),a?0:1,l?0:1),a?0:1)),t(i.scrollIntoView()),!0}(t,e,o)))}}(Vi(n,t.schema))(t,e),newlineInCode:()=>({state:n,dispatch:t})=>t5(n,t),resetAttributes:(n,t)=>({tr:e,state:i,dispatch:r})=>{let o=null,s=null;const a=Gb("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=Vi(n,i.schema)),"mark"===a&&(s=Bl(n,i.schema)),r&&e.selection.ranges.forEach(l=>{i.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&e.setNodeMarkup(u,void 0,C5(c.attrs,t)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&e.addMark(u,u+c.nodeSize,s.create(C5(d.attrs,t)))})})}),!0)},scrollIntoView:()=>({tr:n,dispatch:t})=>(t&&n.scrollIntoView(),!0),selectAll:()=>({tr:n,commands:t})=>t.setTextSelection({from:0,to:n.doc.content.size}),selectNodeBackward:()=>({state:n,dispatch:t})=>Z4(n,t),selectNodeForward:()=>({state:n,dispatch:t})=>e5(n,t),selectParentNode:()=>({state:n,dispatch:t})=>((n,t)=>{let r,{$from:e,to:i}=n.selection,o=e.sharedDepth(i);return 0!=o&&(r=e.before(o),t&&t(n.tr.setSelection(qe.create(n.doc,r))),!0)})(n,t),selectTextblockEnd:()=>({state:n,dispatch:t})=>u5(n,t),selectTextblockStart:()=>({state:n,dispatch:t})=>c5(n,t),setContent:(n,t=!1,e={})=>({tr:i,editor:r,dispatch:o})=>{const{doc:s}=i,a=D5(n,r.schema,e);return o&&i.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(n,t={})=>({tr:e,state:i,dispatch:r})=>{const{selection:o}=e,{empty:s,ranges:a}=o,l=Bl(n,i.schema);if(r)if(s){const c=Yb(i,l);e.addStoredMark(l.create({...c,...t}))}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&&e.addMark(p,m,l.create({...y.attrs,...t}))}):e.addMark(p,m,l.create(t))})});return function fce(n,t,e){var i;const{selection:r}=t;let o=null;if(Hb(r)&&(o=r.$cursor),o){const a=null!==(i=n.storedMarks)&&void 0!==i?i:o.marks();return!!e.isInSet(a)||!a.some(l=>l.type.excludes(e))}const{ranges:s}=r;return s.some(({$from:a,$to:l})=>{let c=0===a.depth&&n.doc.inlineContent&&n.doc.type.allowsMarkType(e);return n.doc.nodesBetween(a.pos,l.pos,(u,d,h)=>{if(c)return!1;if(u.isInline){const f=!h||h.type.allowsMarkType(e),p=!!e.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(e));c=f&&p}return!c}),c})}(i,e,l)},setMeta:(n,t)=>({tr:e})=>(e.setMeta(n,t),!0),setNode:(n,t={})=>({state:e,dispatch:i,chain:r})=>{const o=Vi(n,e.schema);return o.isTextblock?r().command(({commands:s})=>!!d5(o,t)(e)||s.clearNodes()).command(({state:s})=>d5(o,t)(s,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:i}=t,r=Ha(n,0,i.content.size),o=qe.create(i,r);t.setSelection(o)}return!0},setTextSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:i}=t,{from:r,to:o}="number"==typeof n?{from:n,to:n}:n,s=nt.atStart(i).from,a=nt.atEnd(i).to,l=Ha(r,s,a),c=Ha(o,s,a),u=nt.create(i,l,c);t.setSelection(u)}return!0},sinkListItem:n=>({state:t,dispatch:e})=>function ile(n){return function(t,e){let{$from:i,$to:r}=t.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(e){let c=l.lastChild&&l.lastChild.type==a.type,u=ce.from(c?n.create():null),d=new De(ce.from(n.create(null,ce.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;e(t.tr.step(new zi(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}(Vi(n,t.schema))(t,e),splitBlock:({keepMarks:n=!0}={})=>({tr:t,state:e,dispatch:i,editor:r})=>{const{selection:o,doc:s}=t,{$from:a,$to:l}=o,u=Kb(r.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof qe&&o.node.isBlock)return!(!a.parentOffset||!za(s,a.pos)||(i&&(n&&I5(e,r.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(i){const d=l.parentOffset===l.parent.content.size;o instanceof nt&&t.deleteSelection();const h=0===a.depth?void 0:function ice(n){for(let t=0;t({tr:t,state:e,dispatch:i,editor:r})=>{var o;const s=Vi(n,e.schema),{$from:a,$to:l}=e.selection,c=e.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=ce.empty;const y=a.index(-1)?1:a.index(-2)?2:3;for(let J=a.depth-y;J>=a.depth-3;J-=1)g=ce.from(a.node(J).copy(g));const b=a.indexAfter(-1){if(S>-1)return!1;J.isTextblock&&0===J.content.size&&(S=K+1)}),S>-1&&t.setSelection(nt.near(t.doc.resolve(S))),t.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);t.delete(a.pos,l.pos);const m=h?[{type:s,attrs:f},{type:h,attrs:p}]:[{type:s,attrs:f}];if(!za(t.doc,a.pos,2))return!1;if(i){const{selection:g,storedMarks:y}=e,{splittableMarks:b}=r.extensionManager,w=y||g.$to.parentOffset&&g.$from.marks();if(t.split(a.pos,2,m).scrollIntoView(),!w||!i)return!0;const _=w.filter(N=>b.includes(N.type.name));t.ensureMarks(_)}return!0},toggleList:(n,t,e,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:h}=r.extensionManager,f=Vi(n,s.schema),p=Vi(t,s.schema),{selection:m,storedMarks:g}=s,{$from:y,$to:b}=m,w=y.blockRange(b),_=g||m.$to.parentOffset&&m.$from.marks();if(!w)return!1;const N=PS(S=>x5(S.type.name,d))(m);if(w.depth>=1&&N&&w.depth-N.depth<=1){if(N.node.type===f)return c.liftListItem(p);if(x5(N.node.type.name,d)&&f.validContent(N.node.content)&&a)return l().command(()=>(o.setNodeMarkup(N.pos,f),!0)).command(()=>FS(o,f)).command(()=>jS(o,f)).run()}return e&&_&&a?l().command(()=>{const S=u().wrapInList(f,i),J=_.filter(K=>h.includes(K.type.name));return o.ensureMarks(J),!!S||c.clearNodes()}).wrapInList(f,i).command(()=>FS(o,f)).command(()=>jS(o,f)).run():l().command(()=>!!u().wrapInList(f,i)||c.clearNodes()).wrapInList(f,i).command(()=>FS(o,f)).command(()=>jS(o,f)).run()},toggleMark:(n,t={},e={})=>({state:i,commands:r})=>{const{extendEmptyMarkRange:o=!1}=e,s=Bl(n,i.schema);return RS(i,s,t)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,t)},toggleNode:(n,t,e={})=>({state:i,commands:r})=>{const o=Vi(n,i.schema),s=Vi(t,i.schema);return ag(i,o,e)?r.setNode(s):r.setNode(o,e)},toggleWrap:(n,t={})=>({state:e,commands:i})=>{const r=Vi(n,e.schema);return ag(e,r,t)?i.lift(r):i.wrapIn(r,t)},undoInputRule:()=>({state:n,dispatch:t})=>{const e=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:t})=>{const{selection:e}=n,{empty:i,ranges:r}=e;return i||t&&r.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0},unsetMark:(n,t={})=>({tr:e,state:i,dispatch:r})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=e,l=Bl(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=kS(c,l,p);m&&(h=m.from,f=m.to),e.removeMark(h,f,l)}else d.forEach(h=>{e.removeMark(h.$from.pos,h.$to.pos,l)});return e.removeStoredMark(l),!0},updateAttributes:(n,t={})=>({tr:e,state:i,dispatch:r})=>{let o=null,s=null;const a=Gb("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=Vi(n,i.schema)),"mark"===a&&(s=Bl(n,i.schema)),r&&e.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;i.doc.nodesBetween(c,u,(d,h)=>{o&&o===d.type&&e.setNodeMarkup(h,void 0,{...d.attrs,...t}),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);e.addMark(p,m,s.create({...f.attrs,...t}))}})})}),!0)},wrapIn:(n,t={})=>({state:e,dispatch:i})=>function Uae(n,t=null){return function(e,i){let{$from:r,$to:o}=e.selection,s=r.blockRange(o),a=s&&v1(s,n,t);return!!a&&(i&&i(e.tr.wrap(s,a).scrollIntoView()),!0)}}(Vi(n,e.schema),t)(e,i),wrapInList:(n,t={})=>({state:e,dispatch:i})=>function Jae(n,t=null){return function(e,i){let{$from:r,$to:o}=e.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=e.doc.resolve(s.start-2);l=new db(u,u,s.depth),s.endIndex=0;u--)o=ce.from(e[u].type.create(e[u].attrs,o));n.step(new zi(t.start-(i?2:0),t.end,t.start,t.end,new De(o,0,0),e.length,!0));let s=0;for(let u=0;u({...Cce})}),Tce=Mn.create({name:"editable",addProseMirrorPlugins(){return[new Wt({key:new on("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Mce=Mn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new Wt({key:new on("focusEvents"),props:{handleDOMEvents:{focus:(t,e)=>{n.isFocused=!0;const i=n.state.tr.setMeta("focus",{event:e}).setMeta("addToHistory",!1);return t.dispatch(i),!1},blur:(t,e)=>{n.isFocused=!1;const i=n.state.tr.setMeta("blur",{event:e}).setMeta("addToHistory",!1);return t.dispatch(i),!1}}}})]}}),Sce=Mn.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=ot.atStart(c).from===h;return!(!(u&&p&&f.type.isTextblock)||f.textContent.length)&&s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>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:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...i},o={...i,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return $b()||w5()?o:r},addProseMirrorPlugins(){return[new Wt({key:new on("clearDocument"),appendTransaction:(n,t,e)=>{if(!n.some(p=>p.docChanged)||t.doc.eq(e.doc))return;const{empty:r,from:o,to:s}=t.selection,a=ot.atStart(t.doc).from,l=ot.atEnd(t.doc).to;if(r||o!==a||s!==l||0!==e.doc.textBetween(0,e.doc.content.size," "," ").length)return;const d=e.tr,h=jb({state:e,transaction:d}),{commands:f}=new zb({editor:this.editor,state:h});return f.clearNodes(),d.steps.length?d:void 0}})]}}),Ece=Mn.create({name:"tabindex",addProseMirrorPlugins(){return[new Wt({key:new on("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var xce=Object.freeze({__proto__:null,ClipboardTextSerializer:gle,Commands:Dce,Editable:Tce,FocusEvents:Mce,Keymap:Sce,Tabindex:Ece});class Ace extends rle{constructor(t={}){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(t),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 Oce(n,t){const e=document.querySelector("style[data-tiptap-style]");if(null!==e)return e;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),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(t={}){this.options={...this.options,...t},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&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(t,e){const i=p5(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:i});this.view.updateState(r)}unregisterPlugin(t){if(this.isDestroyed)return;const e="string"==typeof t?`${t}$`:t.key,i=this.state.reconfigure({plugins:this.state.plugins.filter(r=>!r.key.startsWith(e))});this.view.updateState(i)}createExtensionManager(){const e=[...this.options.enableCoreExtensions?Object.values(xce):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new gu(e,this)}createCommandManager(){this.commandManager=new zb({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=D5(this.options.content,this.schema,this.options.parseOptions),e=b5(t,this.options.autofocus);this.view=new Mae(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Oh.create({doc:t,selection:e||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(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach(s=>{var a;return null===(a=this.capturedTransaction)||void 0===a?void 0:a.step(s)}):void(this.capturedTransaction=t);const e=this.state.apply(t),i=!this.state.selection.eq(e.selection);this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),i&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),o=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),o&&this.emit("blur",{editor:this,event:o.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return E5(this.state,t)}isActive(t,e){return function uce(n,t,e={}){if(!t)return ag(n,null,e)||RS(n,null,e);const i=Gb(t,n.schema);return"node"===i?ag(n,t,e):"mark"===i&&RS(n,t,e)}(this.state,"string"==typeof t?t:null,"string"==typeof t?e:t)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function M5(n,t){const e=Ws.fromSchema(t).serializeFragment(n),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(e),r.innerHTML}(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:i={}}=t||{};return function S5(n,t){return v5(n,{from:0,to:n.content.size},t)}(this.state.doc,{blockSeparator:e,textSerializers:{...OS(this.schema),...i}})}get isEmpty(){return function dce(n){var t;const e=null===(t=n.type.createAndFill())||void 0===t?void 0:t.toJSON(),i=n.toJSON();return JSON.stringify(e)===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 t;return!(null!==(t=this.view)&&void 0!==t&&t.docView)}}function _u(n){return new sg({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Ct(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=t,s=i[i.length-1],a=i[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),d=u+s.length;if(qb(e.from,e.to,t.doc).filter(f=>f.mark.type.excluded.find(m=>m===n.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;de.from&&o.delete(e.from+c,u),l=e.from+c+s.length,o.addMark(e.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function O5(n){return new sg({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Ct(n.getAttributes,void 0,i)||{},{tr:o}=t,s=e.from;let a=e.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 zS(n){return new sg({find:n.find,handler:({state:t,range:e,match:i})=>{const r=t.doc.resolve(e.from),o=Ct(n.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),n.type))return null;t.tr.delete(e.from,e.to).setBlockType(e.from,e.from,n.type,o)}})}function lg(n){return new sg({find:n.find,handler:({state:t,range:e,match:i,chain:r})=>{const o=Ct(n.getAttributes,void 0,i)||{},s=t.tr.delete(e.from,e.to),l=s.doc.resolve(e.from).blockRange(),c=l&&v1(l,n.type,o);if(!c)return null;if(s.wrap(l,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:h}=t,{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(e.from-1).nodeBefore;u&&u.type===n.type&&Sl(s.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(i,u))&&s.join(e.from-1)}})}class Nr{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.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=Ct(Ve(this,"addOptions",{name:this.name}))),this.storage=Ct(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Nr(t)}configure(t={}){const e=this.extend();return e.options=Bb(this.options,t),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Nr(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Ct(Ve(e,"addOptions",{name:e.name})),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:i}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){const s=r.marks();if(!s.find(c=>c?.type.name===e.name))return!1;const l=s.find(c=>c?.type.name===e.name);return l&&i.removeStoredMark(l),i.insertText(" ",r.pos),t.view.dispatch(i),!0}return!1}}class jn{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.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=Ct(Ve(this,"addOptions",{name:this.name}))),this.storage=Ct(Ve(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new jn(t)}configure(t={}){const e=this.extend();return e.options=Bb(this.options,t),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new jn(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Ct(Ve(e,"addOptions",{name:e.name})),e.storage=Ct(Ve(e,"addStorage",{name:e.name,options:e.options})),e}}class kce{constructor(t,e,i){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...i},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,i,r,o,s,a,l;const{view:c}=this.editor,u=t.target,d=3===u.nodeType?null===(e=u.parentElement)||void 0===e?void 0:e.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(),b=null!==(r=t.offsetX)&&void 0!==r?r:null===(o=t.nativeEvent)||void 0===o?void 0:o.offsetX,w=null!==(s=t.offsetY)&&void 0!==s?s:null===(a=t.nativeEvent)||void 0===a?void 0:a.offsetY;h=y.x-g.x+b,f=y.y-g.y+w}null===(l=t.dataTransfer)||void 0===l||l.setDragImage(this.dom,h,f);const p=qe.create(c.state.doc,this.getPos()),m=c.state.tr.setSelection(p);c.dispatch(m)}stopEvent(t){var e;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:t});const i=t.target;if(!this.dom.contains(i)||null!==(e=this.contentDOM)&&void 0!==e&&e.contains(i))return!1;const o=t.type.startsWith("drag"),s="drop"===t.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=qe.isSelectable(this.node),h="copy"===t.type,f="paste"===t.type,p="cut"===t.type,m="mousedown"===t.type;if(!u&&d&&o&&t.preventDefault(),u&&o&&!c)return t.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(t){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:t}):!(!this.node.isLeaf&&!this.node.isAtom&&("selection"===t.type||this.dom.contains(t.target)&&"childList"===t.type&&$b()&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(i=>i.isContentEditable)||(this.contentDOM!==t.target||"attributes"!==t.type)&&this.contentDOM.contains(t.target))))}updateAttributes(t){this.editor.commands.command(({tr:e})=>{const i=this.getPos();return e.setNodeMarkup(i,void 0,{...this.node.attrs,...t}),!0})}deleteNode(){const t=this.getPos();this.editor.commands.deleteRange({from:t,to:t+this.node.nodeSize})}}function Ul(n){return new xS({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Ct(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=t,s=i[i.length-1],a=i[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),d=u+s.length;if(qb(e.from,e.to,t.doc).filter(f=>f.mark.type.excluded.find(m=>m===n.type&&m!==f.mark.type)).filter(f=>f.to>u).length)return null;de.from&&o.delete(e.from+c,u),l=e.from+c+s.length,o.addMark(e.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function Pce(n){return new xS({find:n.find,handler({match:t,chain:e,range:i}){const r=Ct(n.getAttributes,void 0,t);if(!1===r||null===r)return null;t.input&&e().deleteRange(i).insertContentAt(i.from,{type:n.type.name,attrs:r})}})}const Rce=new on("suggestion");function Fce({pluginKey:n=Rce,editor:t,char:e="@",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 Wt({key:n,view(){var g,m=this;return{update:(g=Dl(function*(y,b){var w,_,N,S,J,K,ke;const He=null===(w=m.key)||void 0===w?void 0:w.getState(b),vt=null===(_=m.key)||void 0===_?void 0:_.getState(y.state),lt=He.active&&vt.active&&He.range.from!==vt.range.from,st=!He.active&&vt.active,yn=He.active&&!vt.active,le=st||lt,me=!st&&!yn&&He.query!==vt.query&&!lt,be=yn||lt;if(!le&&!me&&!be)return;const Ue=be&&!le?He:vt,kt=y.dom.querySelector(`[data-decoration-id="${Ue.decorationId}"]`);h={editor:t,range:Ue.range,query:Ue.query,text:Ue.text,items:[],command:cn=>{l({editor:t,range:Ue.range,props:cn})},decorationNode:kt,clientRect:kt?()=>{var cn;const{decorationId:Vt}=null===(cn=m.key)||void 0===cn?void 0:cn.getState(t.state);return y.dom.querySelector(`[data-decoration-id="${Vt}"]`)?.getBoundingClientRect()||null}:null},le&&(null===(N=f?.onBeforeStart)||void 0===N||N.call(f,h)),me&&(null===(S=f?.onBeforeUpdate)||void 0===S||S.call(f,h)),(me||le)&&(h.items=yield c({editor:t,query:Ue.query})),be&&(null===(J=f?.onExit)||void 0===J||J.call(f,h)),me&&(null===(K=f?.onUpdate)||void 0===K||K.call(f,h)),le&&(null===(ke=f?.onStart)||void 0===ke||ke.call(f,h))}),function(b,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,b){const{isEditable:w}=t,{composing:_}=t.view,{selection:N}=m,{empty:S,from:J}=N,K={...g};if(K.composing=_,w&&(S||t.view.composing)){(Jg.range.to)&&!_&&!g.composing&&(K.active=!1);const ke=function Lce(n){var t;const{char:e,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:s}=n,a=function Nce(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}(e),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===(t=s.nodeBefore)||void 0===t?void 0:t.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(e.length),text:f[0]}:null}({char:e,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:N.$from}),He=`id_${Math.floor(4294967295*Math.random())}`;ke&&d({editor:t,state:b,range:ke.range})?(K.active=!0,K.decorationId=g.decorationId?g.decorationId:He,K.range=ke.range,K.query=ke.query,K.text=ke.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:b,range:w}=p.getState(m.state);return b&&(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:b}=p.getState(m);return g?Fn.create(m.doc,[ki.inline(y.from,y.to,{nodeName:s,class:a,"data-decoration-id":b})]):null}}});return p}const jce=function(){return{padding:".75rem 2rem",borderRadius:"2px"}};function zce(n,t){if(1&n){const e=We();I(0,"button",2),ue("mousedown",function(){return de(e),he(D().back.emit())}),A()}2&n&&oi(Hr(2,jce))}class Uh{constructor(){this.title="No Results",this.showBackBtn=!1,this.back=new re}}function Vce(n,t){if(1&n&&(I(0,"i",7),Ne(1),A()),2&n){const e=D();C(1),At(e.url)}}function Bce(n,t){1&n&&_e(0,"dot-contentlet-thumbnail",9),2&n&&v("contentlet",D(2).data.contentlet)("width",42)("height",42)("iconSize","42px")}function Uce(n,t){if(1&n&&M(0,Bce,1,4,"dot-contentlet-thumbnail",8),2&n){const e=D(),i=Dn(10);v("ngIf",null==e.data?null:e.data.contentlet)("ngIfElse",i)}}function Hce(n,t){if(1&n&&(I(0,"span",10),Ne(1),A()),2&n){const e=D();C(1),At(e.data.contentlet.url)}}function $ce(n,t){if(1&n&&(I(0,"div",11),_e(1,"dot-state-icon",12),I(2,"dot-badge",13),Ne(3),Qn(4,"lowercase"),A()()),2&n){const e=D();C(1),v("state",e.data.contentlet),C(2),At(Zn(4,2,e.data.contentlet.language))}}function Wce(n,t){1&n&&_e(0,"img",14),2&n&&v("src",D().url,sl)}Uh.\u0275fac=function(t){return new(t||Uh)},Uh.\u0275cmp=Me({type:Uh,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(t,e){1&t&&(_e(0,"p",0),M(1,zce,1,3,"button",1)),2&t&&(v("innerHTML",e.title,vc),C(1),v("ngIf",e.showBackBtn))},dependencies:[Kt,Vo],styles:["[_nghost-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:16px;height:240px}"]});class vu{constructor(t){this.element=t,this.role="list-item",this.tabindex="-1",this.disabled=!1,this.label="",this.url="",this.page=!1,this.data=null,this.icon=!1}onMouseDown(t){t.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 t=this.element.nativeElement,e=t.parentElement,{top:i,top:r,height:o}=e.getBoundingClientRect(),{top:s,bottom:a}=t.getBoundingClientRect(),l=s-i,c=a-r;e.scrollTop+=this.alignToTop()?l:c-o}}isIntoView(){const{bottom:t,top:e}=this.element.nativeElement.getBoundingClientRect(),i=this.element.nativeElement.parentElement.getBoundingClientRect();return e>=i.top&&t<=i.bottom}alignToTop(){const{top:t}=this.element.nativeElement.getBoundingClientRect(),{top:e}=this.element.nativeElement.parentElement.getBoundingClientRect();return t 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 Hh{constructor(){this.id="editor-suggestion-list",this.suggestionItems=[],this.destroy$=new ae,this.mouseMove=!0}onMouseMove(){this.mouseMove=!0}onMouseOver(t){const e=t.target,i=e.dataset?.index;if(isNaN(i)||!this.mouseMove)return;const r=Number(e?.dataset.index);e.getAttribute("disabled")?this.keyManager.activeItem?.unfocus():this.updateActiveItem(r)}onMouseDownHandler(t){t.preventDefault()}ngAfterViewInit(){this.keyManager=new eR(this.items).withWrap(),requestAnimationFrame(()=>this.setFirstItemActive()),this.items.changes.pipe(mn(this.destroy$)).subscribe(()=>requestAnimationFrame(()=>this.setFirstItemActive()))}ngOnDestroy(){this.destroy$.next(!0)}updateSelection(t){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(t),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 eR(this.items).withWrap(),this.setFirstItemActive()}updateActiveItem(t){this.keyManager.activeItem?.unfocus(),this.keyManager.setActiveItem(t)}}function Yce(n,t){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()()()())}Hh.\u0275fac=function(t){return new(t||Hh)},Hh.\u0275cmp=Me({type:Hh,selectors:[["dot-suggestion-list"]],contentQueries:function(t,e,i){if(1&t&&Jn(i,vu,4),2&t){let r;Ke(r=Qe())&&(e.items=r)}},hostVars:1,hostBindings:function(t,e){1&t&&ue("mousemove",function(r){return e.onMouseMove(r)})("mouseover",function(r){return e.onMouseOver(r)})("mousedown",function(r){return e.onMouseDownHandler(r)}),2&t&&Ot("id",e.id)},inputs:{suggestionItems:"suggestionItems"},ngContentSelectors:["*"],decls:1,vars:0,template:function(t,e){1&t&&(go(),Ri(0))},styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}"]});class cg{constructor(){this.items=Array(4).fill(0)}}cg.\u0275fac=function(t){return new(t||cg)},cg.\u0275cmp=Me({type:cg,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(t,e){1&t&&M(0,Yce,10,0,"div",0),2&t&&v("ngForOf",e.items)},dependencies:[Gr],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 Hl{constructor(t){this.http=t}get defaultHeaders(){const t=new Yr;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getLanguages(){return this.languages?Le(this.languages):this.http.get("/api/v2/languages",{headers:this.defaultHeaders}).pipe(Ie("entity"),fe(t=>{const e=this.getDotLanguageObject(t);return this.languages=e,e}))}getDotLanguageObject(t){return t.reduce((e,i)=>Object.assign(e,{[i.id]:i}),{})}}Hl.\u0275fac=function(t){return new(t||Hl)(F(ar))},Hl.\u0275prov=H({token:Hl,factory:Hl.\u0275fac,providedIn:"root"});const qce={SHOW_VIDEO_THUMBNAIL:!0};class bu{constructor(){this.config=qce}get configObject(){return this.config}setProperty(t,e){this.config={...this.config,[t]:e}}getProperty(t){return this.config[t]||!1}}bu.\u0275fac=function(t){return new(t||bu)},bu.\u0275prov=H({token:bu,factory:bu.\u0275fac,providedIn:"root"});var $l=(()=>(function(n){n.DOWNLOAD="DOWNLOADING",n.IMPORT="IMPORTING",n.COMPLETED="COMPLETED",n.ERROR="ERROR"}($l||($l={})),$l))();class Xs{constructor(t,e){this.http=t,this.dotUploadService=e}publishContent({data:t,maxSize:e,statusCallback:i=(o=>{}),signal:r}){return i($l.DOWNLOAD),this.setTempResource({data:t,maxSize:e,signal:r}).pipe(ai(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($l.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(Ie("entity","results"))}),Fi(o=>vo(o)))}setTempResource({data:t,maxSize:e,signal:i}){return wt(this.dotUploadService.uploadFile({file:t,maxSize:e,signal:i}))}}Xs.\u0275fac=function(t){return new(t||Xs)(F(ar),F(Ch))},Xs.\u0275prov=H({token:Xs,factory:Xs.\u0275fac});var Qb=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(Qb||(Qb={})),Qb))();class $h{constructor(t){this.http=t}get({query:t,limit:e=0,offset:i=0}){return this.http.post("/api/content/_search",{query:t,sort:"score,modDate desc",limit:e,offset:i}).pipe(Ie("entity"))}}$h.\u0275fac=function(t){return new(t||$h)(F(ar))},$h.\u0275prov=H({token:$h,factory:$h.\u0275fac,providedIn:"root"});class Wl{constructor(t){this.http=t}get defaultHeaders(){const t=new Yr;return t.set("Accept","*/*").set("Content-Type","application/json"),t}getContentTypes(t="",e=""){return this.http.post("/api/v1/contenttype/_filter",{filter:{types:e,query:t},orderBy:"name",direction:"ASC",perPage:40}).pipe(Ie("entity"))}getContentlets({contentType:t,filter:e,currentLanguage:i,contentletIdentifier:r}){const o=r?`-identifier:${r}`:"",s=e.includes("-")?e:`*${e}*`;return this.http.post("/api/content/_search",{query:`+contentType:${t} ${o} +languageId:${i} +deleted:false +working:true +catchall:${s} title:'${e}'^15`,sort:"modDate desc",offset:0,limit:40}).pipe(Ie("entity","jsonObjectView","contentlets"))}getContentletsByLink({link:t,currentLanguage:e=pg}){return this.http.post("/api/content/_search",{query:`+languageId:${e} +deleted:false +working:true +(urlmap:*${t}* OR (contentType:(dotAsset OR htmlpageasset OR fileAsset) AND +path:*${t}*))`,sort:"modDate desc",offset:0,limit:40}).pipe(Ie("entity","jsonObjectView","contentlets"))}}Wl.\u0275fac=function(t){return new(t||Wl)(F(ar))},Wl.\u0275prov=H({token:Wl,factory:Wl.\u0275fac});const VS="/api/v1/ai",BS=new Yr({"Content-Type":"application/json"});class $a{constructor(){this.http=it(ar)}generateContent(t){return this.http.post(`${VS}/text/generate`,JSON.stringify({prompt:t}),{headers:BS}).pipe(Fi(()=>vo("Error fetching AI content")),fe(({choices:e})=>e[0].message.content))}generateAndPublishImage(t,e="1024x1024"){return this.http.post(`${VS}/image/generate`,JSON.stringify({prompt:t,size:e}),{headers:BS}).pipe(Fi(()=>vo("Error fetching AI content")),ai(i=>this.createAndPublishContentlet(i)))}checkPluginInstallation(){return this.http.get(`${VS}/image/test`,{observe:"response"})}createAndPublishContentlet(t){const{response:e,tempFileName:i}=t;return this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:[{baseType:"dotAsset",asset:e,title:i,hostFolder:"",indexPolicy:"WAIT_FOR"}]}),{headers:BS}).pipe(Ie("entity","results"),Fi(o=>vo(o)))}}$a.\u0275fac=function(t){return new(t||$a)},$a.\u0275prov=H({token:$a,factory:$a.\u0275fac});const Qce=["list"];function Zce(n,t){if(1&n&&(I(0,"h3"),Ne(1),A()),2&n){const e=D(2);C(1),At(e.title)}}function Jce(n,t){if(1&n&&_e(0,"dot-suggestions-list-item",7),2&n){const e=D(),i=e.$implicit,r=e.index;v("command",i.command)("index",i.tabindex||r)("label",i.label)("url",i.icon)("data",i.data)("disabled",i.disabled)}}function Xce(n,t){1&n&&_e(0,"div",8)}function eue(n,t){if(1&n&&(dt(0),M(1,Jce,1,6,"dot-suggestions-list-item",5),M(2,Xce,1,0,"ng-template",null,6,Bn),ht()),2&n){const e=t.$implicit,i=Dn(3);C(1),v("ngIf","divider"!==e.id)("ngIfElse",i)}}function tue(n,t){if(1&n&&(I(0,"div"),M(1,Zce,2,1,"h3",2),I(2,"dot-suggestion-list",null,3),M(4,eue,4,2,"ng-container",4),A()()),2&n){const e=D();C(1),v("ngIf",!!e.title),C(3),v("ngForOf",e.items)}}function nue(n,t){if(1&n){const e=We();I(0,"dot-empty-message",9),ue("back",function(){return de(e),he(D().handleBackButton())}),A()}if(2&n){const e=D();v("title",e.noResultsMessage)("showBackBtn",!e.isFilterActive)}}var pr=(()=>(function(n){n.BLOCK="block",n.CONTENTTYPE="contentType",n.CONTENT="content"}(pr||(pr={})),pr))();class Gl{constructor(t,e,i){this.suggestionsService=t,this.dotLanguageService=e,this.cd=i,this.items=[],this.title="Select a block",this.noResultsMessage="No Results",this.currentLanguage=pg,this.allowedContentTypes="",this.contentletIdentifier="",this.isFilterActive=!1}onMouseDownHandler(t){t.preventDefault()}ngOnInit(){this.initialItems=this.items,this.itemsLoaded=pr.BLOCK,this.dotLanguageService.getLanguages().pipe(Et(1)).subscribe(t=>this.dotLangs=t)}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(t){this.list.updateSelection(t)}handleBackButton(){return this.itemsLoaded=this.itemsLoaded===pr.CONTENT?pr.CONTENTTYPE:pr.BLOCK,this.filterItems(),!1}filterItems(t=""){switch(this.itemsLoaded){case pr.BLOCK:this.items=this.initialItems.filter(e=>e.label.toLowerCase().includes(t.trim().toLowerCase()));break;case pr.CONTENTTYPE:this.loadContentTypes(t);break;case pr.CONTENT:this.loadContentlets(this.selectedContentType,t)}this.isFilterActive=!!t.length}loadContentTypes(t=""){this.suggestionsService.getContentTypes(t,this.allowedContentTypes).pipe(fe(e=>e.map(i=>({label:i.name,icon:i.icon,command:()=>{this.selectedContentType=i,this.itemsLoaded=pr.CONTENT,this.loadContentlets(i)}}))),Et(1)).subscribe(e=>{this.items=e,this.itemsLoaded=pr.CONTENTTYPE,this.items.length?this.title="Select a content type":this.noResultsMessage="No results",this.cd.detectChanges()})}loadContentlets(t,e=""){this.suggestionsService.getContentlets({contentType:t.variable,filter:e,currentLanguage:this.currentLanguage,contentletIdentifier:this.contentletIdentifier}).pipe(Et(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 ${t.name}`,this.cd.detectChanges()})}getContentletLanguage(t){const{languageCode:e,countryCode:i}=this.dotLangs[t];return e&&i?`${e}-${i}`:""}}Gl.\u0275fac=function(t){return new(t||Gl)(O(Wl),O(Hl),O(Un))},Gl.\u0275cmp=Me({type:Gl,selectors:[["dot-suggestions"]],viewQuery:function(t,e){if(1&t&&en(Qce,5),2&t){let i;Ke(i=Qe())&&(e.list=i.first)}},hostBindings:function(t,e){1&t&&ue("mousedown",function(r){return e.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(t,e){if(1&t&&(M(0,tue,5,2,"div",0),M(1,nue,1,2,"ng-template",null,1,Bn)),2&t){const i=Dn(2);v("ngIf",e.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 US{constructor({editor:t,element:e,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&&Hb(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:b}=g,w=Math.min(...b.map(S=>S.$from.pos)),_=Math.max(...b.map(S=>S.$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 hce(n){return n instanceof qe}(p.selection)){let S=a.nodeDOM(w);const J=S.dataset.nodeViewWrapper?S:S.querySelector("[data-node-view-wrapper]");if(J&&(S=J.firstChild),S)return S.getBoundingClientRect()}return yu(a,w,_)})}),this.show()):this.hide()},this.editor=t,this.element=e,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:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t,{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(t,e){const{state:i}=t;if(this.updateDelay>0&&i.selection.$from.pos!==i.selection.$to.pos)return void this.handleDebouncedUpdate(t,e);const o=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,o,s,e)}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;!(null===(t=this.tippy)||void 0===t)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.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 A5=n=>new Wt({key:"string"==typeof n.pluginKey?new on(n.pluginKey):n.pluginKey,view:t=>new US({view:t,...n})}),HS=Mn.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[A5({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class Zb{constructor(t){this._el=t,this.pluginKey="NgxTiptapBubbleMenu",this.tippyOptions={},this.shouldShow=null}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");this.editor.registerPlugin(A5({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(t){return new(t||Zb)(O(Tt))},Zb.\u0275dir=we({type:Zb,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(t){return new(t||Jb)},Jb.\u0275dir=we({type:Jb,selectors:[["","tiptapDraggable",""]],hostVars:2,hostBindings:function(t,e){2&t&&Ot("draggable",e.draggable)("data-drag-handle",e.handle)}});class Wh{constructor(t,e){this.el=t,this._renderer=e,this.onChange=()=>{},this.onTouched=()=>{},this.handleChange=({transaction:i})=>{i.docChanged&&this.onChange(this.editor.getJSON())}}writeValue(t){t&&this.editor.chain().setContent(t,!0).run()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.editor.setEditable(!t),this._renderer.setProperty(this.el.nativeElement,"disabled",t)}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");const t=this.el.nativeElement.innerHTML;this.el.nativeElement.innerHTML="",this.el.nativeElement.appendChild(this.editor.options.element.firstChild),this.editor.setOptions({element:this.el.nativeElement}),t&&this.editor.chain().setContent(t,!1).run(),this.editor.on("blur",()=>{this.onTouched()}),this.editor.on("transaction",this.handleChange)}ngOnDestroy(){this.editor.destroy()}}Wh.\u0275fac=function(t){return new(t||Wh)(O(Tt),O(Cr))},Wh.\u0275dir=we({type:Wh,selectors:[["tiptap","editor",""],["","tiptap","","editor",""],["tiptap-editor","editor",""],["","tiptapEditor","","editor",""]],inputs:{editor:"editor"},features:[Pt([{provide:Sr,useExisting:Ut(()=>Wh),multi:!0}])]});class iue{constructor({editor:t,element:e,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=t,this.element=e,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:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t,{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(t,e){var i,r,o;const{state:s}=t,{doc:a,selection:l}=s,{from:c,to:u}=l;e&&e.doc.eq(a)&&e.selection.eq(l)||(this.createTooltip(),(null===(i=this.shouldShow)||void 0===i?void 0:i.call(this,{editor:this.editor,view:t,state:s,oldState:e}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>yu(t,c,u))}),this.show()):this.hide())}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;!(null===(t=this.tippy)||void 0===t)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const k5=n=>new Wt({key:"string"==typeof n.pluginKey?new on(n.pluginKey):n.pluginKey,view:t=>new iue({view:t,...n})});Mn.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[k5({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class Xb{constructor(t){this._el=t,this.pluginKey="NgxTiptapFloatingMenu",this.tippyOptions={},this.shouldShow=null}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");this.editor.registerPlugin(k5({pluginKey:this.pluginKey,editor:this.editor,element:this._el.nativeElement,tippyOptions:this.tippyOptions,shouldShow:this.shouldShow}))}ngOnDestroy(){this.editor.unregisterPlugin(this.pluginKey)}}Xb.\u0275fac=function(t){return new(t||Xb)(O(Tt))},Xb.\u0275dir=we({type:Xb,selectors:[["tiptap-floating-menu","editor",""],["","tiptapFloatingMenu","","editor",""]],inputs:{pluginKey:"pluginKey",editor:"editor",tippyOptions:"tippyOptions",shouldShow:"shouldShow"}});class e0{constructor(){this.handle=""}}e0.\u0275fac=function(t){return new(t||e0)},e0.\u0275dir=we({type:e0,selectors:[["","tiptapNodeViewContent",""]],hostVars:1,hostBindings:function(t,e){2&t&&Ot("data-node-view-content",e.handle)}});const N5={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 dg{transform({live:t,working:e,deleted:i,hasLiveVersion:r}){return{live:t,working:e,deleted:i,hasLiveVersion:r}}}dg.\u0275fac=function(t){return new(t||dg)},dg.\u0275pipe=qn({name:"contentletState",type:dg,pure:!0});const $S="menuFloating";class sue{constructor({editor:t,view:e,render:i,command:r,key:o}){this.invalidNodes=["codeBlock","blockquote"],this.editor=t,this.view=e,this.editor.on("focus",()=>{this.update(this.editor.view)}),this.render=i,this.command=r,this.key=o}update(t,e){const i=this.key?.getState(t.state),r=e?this.key?.getState(e):null;if(i.open){const{from:o,to:s}=this.editor.state.selection,a=yu(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 P5=new on($S),aue=n=>new Wt({key:P5,view:t=>new sue({key:P5,view:t,...n}),state:{init:()=>({open:!1}),apply(t){const e=t.getMeta($S);return e?.open?{open:e?.open}:{open:!1}}},props:{handleKeyDown(t,e){const{open:i,range:r}=this.getState(t.state);return!!i&&n.render().onKeyDown({event:e,range:r,view:t})}}}),fue={paragrah:!0,text:!0,doc:!0},L5={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}},pue=(n,t)=>{const{type:e,attrs:i}=n;return"heading"===e&&t[e+i.level]},R5=(n,t)=>{if(!n?.length)return n;const e=[];for(const i in n){const r=n[i];(t[r.type]||pue(r,t))&&e.push({...r,content:R5(r.content,t)})}return e},yue=new RegExp(/]*)>(\s|\n|]*src="[^"]*"[^>]*>)*?<\/a>/gm),WS=new RegExp(/]*src="[^"]*"[^>]*>/gm),wu=(n,t)=>{let i,e=n.depth;do{if(i=n.node(e),i){if(Array.isArray(t)&&t.includes(i.type.name))break;e--}}while(e>0&&i);return i},t0=n=>{const t=n.match(WS)||[];return(new DOMParser).parseFromString(n,"text/html").documentElement.textContent.trim().length>0?n.replace(WS,"")+t.join(""):t.join("")},F5=n=>{const{state:t}=n,{doc:e}=t.tr,i=t.selection.to,r=nt.create(e,i,i);n.dispatch(t.tr.setSelection(r))},n0=(n,t)=>{let e=null,i=null,r=null;return n.state.doc.descendants((o,s)=>{o.type.name===t&&(e=o,i=s,r=i+e.nodeSize)}),e?{node:e,from:i,to:r}:null},j5=n=>/^https?:\/\/.+\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(n),z5=new Ce("is AI Plugin installed");class Cu extends ji{constructor(t,e){super(),this.STEP_TYPE="setDocAttr",this.key=t,this.value=e}get stepType(){return this.STEP_TYPE}static fromJSON(t,e){return new Cu(e.key,e.value)}static register(){try{ji.jsonID(this.prototype.STEP_TYPE,Cu)}catch(t){if(t.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw t}return!0}apply(t){return this.prevValue=t.attrs[this.key],t.attrs===t.type.defaultAttrs&&(t.attrs=Object.assign({},t.attrs)),t.attrs[this.key]=this.value,mi.ok(t)}invert(){return new Cu(this.key,this.prevValue)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}}class r0 extends ji{constructor(){super(),this.STEP_TYPE="restoreDefaultDOMAttrs"}get stepType(){return this.STEP_TYPE}static register(){try{ji.jsonID(this.prototype.STEP_TYPE,r0)}catch(t){if(t.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw t}return!0}apply(t){return t.attrs=Object.assign({},t.type.defaultAttrs),mi.ok(t)}invert(){return new r0}map(){return this}toJSON(){return{stepType:this.stepType}}}function V5(n){return!!n&&(n instanceof Se||"function"==typeof n.lift&&"function"==typeof n.subscribe)}function Gh(...n){return t=>{let e;return"function"==typeof n[n.length-1]&&(e=n.pop()),t.lift(new xue(n,e))}}class xue{constructor(t,e){this.observables=t,this.project=e}call(t,e){return e.subscribe(new Iue(t,this.observables,this.project))}}class Iue extends OR{constructor(t,e,i){super(t),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(t){if(0===this.toRespond.length){const e=[t,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(t){let e;try{e=this.project.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Aue{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new kue(t,this.compare,this.keySelector))}}class kue extends ne{constructor(t,e,i){super(t),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:r}=this;e=r?r(t):t}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}const Pue=new Ce("@ngrx/component-store Initial State");let qS=(()=>{class n{constructor(e){this.destroySubject$=new $_(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new $_(1),this.isInitialized=!1,this.state$=this.select(i=>i),this.\u0275hasProvider=!1,e&&this.initState(e),this.checkProviderForHooks()}ngOnDestroy(){this.stateSubject$.complete(),this.destroySubject$.next()}updater(e){return i=>{let o,r=!0;const a=(V5(i)?i:Le(i)).pipe(function FY(n,t=0){return function(i){return i.lift(new jY(n,t))}}(vT),hn(()=>this.assertStateIsInitialized()),Gh(this.stateSubject$),fe(([l,c])=>e(c,l)),hn(l=>this.stateSubject$.next(l)),Fi(l=>r?(o=l,Rs):vo(()=>l)),mn(this.destroy$)).subscribe();if(o)throw o;return r=!1,a}}initState(e){Fr([e],vT).subscribe(i=>{this.isInitialized=!0,this.stateSubject$.next(i)})}setState(e){"function"!=typeof e?this.initState(e):this.updater(e)()}patchState(e){const i="function"==typeof e?e(this.get()):e;this.updater((r,o)=>({...r,...o}))(i)}get(e){let i;return this.assertStateIsInitialized(),this.stateSubject$.pipe(Et(1)).subscribe(r=>{i=e?e(r):r}),i}select(...e){const{observablesOrSelectorsObject:i,projector:r,config:o}=function Lue(n){const t=Array.from(n);let e={debounce:!1};if(function Rue(n){return typeof n.debounce<"u"}(t[t.length-1])&&(e={...e,...t.pop()}),1===t.length&&"function"!=typeof t[0])return{observablesOrSelectorsObject:t[0],projector:void 0,config:e};const i=t.pop();return{observablesOrSelectorsObject:t,projector:i,config:e}}(e);return(function Fue(n,t){return Array.isArray(n)&&0===n.length&&t}(i,r)?this.stateSubject$:PM(i)).pipe(o.debounce?function Nue(){return n=>new Se(t=>{let e,i;const r=new se;return r.add(n.subscribe({complete:()=>{e&&t.next(i),t.complete()},error:o=>{t.error(o)},next:o=>{i=o,e||(e=gM.schedule(()=>{t.next(i),e=void 0}),r.add(e))}})),r})}():n=>n,r?fe(a=>i.length>0&&Array.isArray(a)?r(...a):r(a)):n=>n,function Oue(n,t){return e=>e.lift(new Aue(n,t))}(),ZF({refCount:!0,bufferSize:1}),mn(this.destroy$))}effect(e){const i=new ae;return e(i).pipe(mn(this.destroy$)).subscribe(),r=>(V5(r)?r:Le(r)).pipe(mn(this.destroy$)).subscribe(s=>{i.next(s)})}checkProviderForHooks(){gM.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(e){return new(e||n)(F(Pue,8))},n.\u0275prov=H({token:n,factory:n.\u0275fac}),n})();class Yl extends qS{constructor(t){super({prompt:"",content:"",acceptContent:!1,deleteContent:!1,status:$n.INIT}),this.dotAiService=t,this.prompt$=this.select(e=>e.prompt),this.content$=this.select(e=>e.content),this.deleteContent$=this.select(e=>e.deleteContent),this.status$=this.select(e=>e.status),this.vm$=this.select(e=>e),this.setStatus=this.updater((e,i)=>({...e,status:i})),this.setAcceptContent=this.updater((e,i)=>({...e,acceptContent:i})),this.setDeleteContent=this.updater((e,i)=>({...e,deleteContent:i})),this.generateContent=this.effect(e=>e.pipe(ai(i=>(this.patchState({status:$n.LOADING,prompt:i}),this.dotAiService.generateContent(i).pipe(hn(r=>this.patchState({status:$n.LOADED,content:r})),Fi(()=>(this.patchState({status:$n.LOADED,content:""}),Le(null)))))))),this.reGenerateContent=this.effect(e=>e.pipe(Gh(this.state$),hn(([i,{prompt:r}])=>this.generateContent(Le(r)))))}}Yl.\u0275fac=function(t){return new(t||Yl)(F($a))},Yl.\u0275prov=H({token:Yl,factory:Yl.\u0275fac,providedIn:"root"});let hg=(()=>{class n{constructor(e,i,r){this.el=e,this.ngModel=i,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(e){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(bp,8),O(Un))},n.\u0275dir=we({type:n,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(e,i){1&e&&ue("input",function(o){return i.onInput(o)}),2&e&&yo("p-filled",i.filled)}}),n})(),U5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();class ea{constructor(t){this.dotMessageService=t}transform(t,e=[]){return t?this.dotMessageService.get(t,...e):""}}ea.\u0275fac=function(t){return new(t||ea)(O(Zr,16))},ea.\u0275pipe=qn({name:"dm",type:ea,pure:!0,standalone:!0});const zue=["input"];function Vue(n,t){1&n&&(dt(0),_e(1,"span",7),ht())}function Bue(n,t){1&n&&_e(0,"button",8)}function Uue(n,t){if(1&n){const e=We();dt(0),I(1,"form",1),ue("ngSubmit",function(){return de(e),he(D().onSubmit())}),I(2,"span",2)(3,"input",3,4),ue("keyup.escape",function(r){return de(e),he(D().handleScape(r))})("keydown.escape",function(r){return r.stopPropagation()}),Qn(5,"dm"),A(),M(6,Vue,2,0,"ng-container",5),M(7,Bue,1,0,"ng-template",null,6,Bn),A()(),ht()}if(2&n){const e=t.ngIf,i=Dn(8),r=D();C(1),v("formGroup",r.form),C(2),ls("placeholder",Zn(5,5,"block-editor.extension.ai-content.ask-ai-to-write-something")),Ot("disabled",e.status===r.ComponentStatus.LOADING||null),C(3),v("ngIf",e.status===r.ComponentStatus.LOADING)("ngIfElse",i)}}class fg{constructor(t){this.aiContentPromptStore=t,this.vm$=this.aiContentPromptStore.vm$,this.ComponentStatus=$n,this.destroy$=new ae,this.form=new Yd({textPrompt:new Kd("",$d.required)})}ngOnInit(){this.aiContentPromptStore.status$.pipe(mn(this.destroy$),Tn(t=>t===$n.IDLE)).subscribe(()=>{this.form.reset(),this.input.nativeElement.focus()})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onSubmit(){const t=this.form.value.textPrompt;t&&this.aiContentPromptStore.generateContent(t)}handleScape(t){this.aiContentPromptStore.setStatus($n.INIT),t.stopPropagation()}}function o0(n){return t=>t.lift(new Hue(n))}fg.\u0275fac=function(t){return new(t||fg)(O(Yl))},fg.\u0275cmp=Me({type:fg,selectors:[["dot-ai-content-prompt"]],viewQuery:function(t,e){if(1&t&&en(zue,5),2&t){let i;Ke(i=Qe())&&(e.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","pInputText","","type","text",3,"placeholder","keyup.escape","keydown.escape"],["input",""],[4,"ngIf","ngIfElse"],["submitButton",""],[1,"pi","pi-spin","pi-spinner"],["icon","pi pi-send","pButton","","type","submit",1,"p-button-rounded","p-button-text"]],template:function(t,e){1&t&&(M(0,Uue,9,7,"ng-container",0),Qn(1,"async")),2&t&&v("ngIf",Zn(1,1,e.vm$))},dependencies:[Kt,Qd,hl,Ac,Wd,Aa,kc,Vo,hg,k_,ea],styles:["form[_ngcontent-%COMP%]{margin:0 1rem}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%] .pi-spinner[_ngcontent-%COMP%]{position:absolute;right:0;top:0;bottom:0;margin:auto 0;background:none}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] .pi-spinner[_ngcontent-%COMP%]{margin-right:.5rem;color:var(--color-palette-primary-500)}"],changeDetection:0});class Hue{constructor(t){this.total=t}call(t,e){return e.subscribe(new $ue(t,this.total))}}class $ue extends ne{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}const pg=1;var gi=(()=>(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",n.AI_CONTENT="aiContent"}(gi||(gi={})),gi))();const Wue=[gi.DOT_IMAGE,gi.DOT_CONTENT],Gue={duration:[500,0],interactive:!0,maxWidth:"100%",trigger:"manual",hideOnClick:!1,placement:"bottom-start",popperOptions:{modifiers:[{name:"flip",enabled:!1},{name:"preventOverflow",options:{altAxis:!0}}]}};class Yue{constructor(t){this.destroy$=new ae,this.boundClickHandler=this.handleClick.bind(this);const{editor:e,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=t;this.editor=e,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.componentStore=this.component.injector.get(Yl),this.componentStore.content$.pipe(mn(this.destroy$),Tn(l=>!!l)).subscribe(l=>{this.editor.chain().closeAIPrompt().insertAINode(l).openAIContentActions(mg).run()}),this.componentStore.vm$.pipe(mn(this.destroy$),hn(l=>this.storeSate=l),Tn(l=>l.acceptContent)).subscribe(l=>{const c=n0(this.editor,gi.AI_CONTENT);((n,t,e)=>{const{node:i,from:r,to:o}=t;i&&n.chain().deleteRange({from:r,to:o}).insertContentAt(r,e).run()})(this.editor,c,l.content),this.componentStore.setAcceptContent(!1)}),this.componentStore.status$.pipe(o0(1),mn(this.destroy$)).subscribe(l=>{l===$n.INIT?this.tippy?.hide():l===$n.LOADING&&this.editor.commands.setLoadingAIContentNode(!0)}),this.componentStore.deleteContent$.pipe(o0(1),mn(this.destroy$),Tn(l=>l)).subscribe(()=>{const l=n0(this.editor,gi.AI_CONTENT);l&&this.editor.commands.deleteRange({from:l.from,to:l.to}),this.componentStore.setDeleteContent(!1)})}update(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{aIContentPromptOpen:!1};i?.aIContentPromptOpen!==r?.aIContentPromptOpen&&(i.aIContentPromptOpen?this.show():this.hide(this.storeSate.status===$n.IDLE||this.storeSate.status===$n.LOADED))}createTooltip(){const{element:t}=this.editor.options;if(!t.parentElement)return;const{selection:i}=this.editor.state;if(i instanceof nt){const{pos:r}=i.$cursor,s=this.editor.view.domAtPos(r).node;this.tippy=gs(t,{...Gue,...this.tippyOptions,content:this.element,getReferenceClientRect:s.getBoundingClientRect.bind(s),onHide:()=>{this.editor.commands.closeAIPrompt()},onShow:a=>{const l=a.popper;l.style.width="100%",setTimeout(()=>{l.style.marginTop="-40px"},0)}})}}show(){this.createTooltip(),this.manageClickListener(!0),this.editor.setEditable(!1),this.tippy?.show(),this.componentStore.setStatus($n.IDLE)}hide(t=!0){this.tippy?.hide(),this.editor.setEditable(!0),this.editor.view.focus(),t&&this.componentStore.setStatus($n.INIT),this.manageClickListener(!1)}destroy(){this.tippy?.destroy(),this.destroy$.next(!0),this.destroy$.complete(),this.manageClickListener(!1)}handleClick(){(this.storeSate.status===$n.IDLE||this.storeSate.status===$n.LOADED)&&this.tippy.hide()}manageClickListener(t){t?this.editor.view.dom.addEventListener("click",this.boundClickHandler):this.editor.view.dom.removeEventListener("click",this.boundClickHandler)}}const que=n=>new Wt({key:n.pluginKey,view:t=>new Yue({view:t,...n}),state:{init:()=>({aIContentPromptOpen:!1}),apply(t,e,i){const{aIContentPromptOpen:r}=t.getMeta(gg)||{},o=gg.getState(i);return"boolean"==typeof r?{aIContentPromptOpen:r}:o||e}}}),mg="dotAITextContent",gg=new on(mg),H5="aiContentPrompt",Kue=n=>Mn.create({name:H5,addOptions:()=>({element:null,tippyOptions:{},pluginKey:gg}),addCommands:()=>({openAIPrompt:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(gg,{aIContentPromptOpen:!0}),!0)).freezeScroll(!0).run(),closeAIPrompt:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(gg,{aIContentPromptOpen:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const t=n.createComponent(fg);return t.changeDetectorRef.detectChanges(),[que({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,component:t})]}});let Que=(()=>{class n{constructor(e){this.el=e}onkeydown(e){if(!0!==this.pFocusTrapDisabled){e.preventDefault();const i=Z.getNextFocusableElement(this.el.nativeElement,e.shiftKey);i&&(i.focus(),i.select?.())}}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275dir=we({type:n,selectors:[["","pFocusTrap",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,i){1&e&&ue("keydown.tab",function(o){return i.onkeydown(o)})("keydown.shift.tab",function(o){return i.onkeydown(o)})},inputs:{pFocusTrapDisabled:"pFocusTrapDisabled"}}),n})(),Zue=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();const Jue=["titlebar"],Xue=["content"],ede=["footer"];function tde(n,t){if(1&n){const e=We();I(0,"div",11),ue("mousedown",function(r){return de(e),he(D(3).initResize(r))}),A()}}function nde(n,t){if(1&n&&(I(0,"span",18),Ne(1),A()),2&n){const e=D(4);Ot("id",e.id+"-label"),C(1),At(e.header)}}function ide(n,t){1&n&&(I(0,"span",18),Ri(1,1),A()),2&n&&Ot("id",D(4).id+"-label")}function rde(n,t){1&n&&_t(0)}const ode=function(){return{"p-dialog-header-icon p-dialog-header-maximize p-link":!0}};function sde(n,t){if(1&n){const e=We();I(0,"button",19),ue("click",function(){return de(e),he(D(4).maximize())})("keydown.enter",function(){return de(e),he(D(4).maximize())}),_e(1,"span",20),A()}if(2&n){const e=D(4);v("ngClass",Hr(2,ode)),C(1),v("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}const ade=function(){return{"p-dialog-header-icon p-dialog-header-close p-link":!0}};function lde(n,t){if(1&n){const e=We();I(0,"button",21),ue("click",function(r){return de(e),he(D(4).close(r))})("keydown.enter",function(r){return de(e),he(D(4).close(r))}),_e(1,"span",22),A()}if(2&n){const e=D(4);v("ngClass",Hr(4,ade)),Ot("aria-label",e.closeAriaLabel)("tabindex",e.closeTabindex),C(1),v("ngClass",e.closeIcon)}}function cde(n,t){if(1&n){const e=We();I(0,"div",12,13),ue("mousedown",function(r){return de(e),he(D(3).initDrag(r))}),M(2,nde,2,2,"span",14),M(3,ide,2,1,"span",14),M(4,rde,1,0,"ng-container",9),I(5,"div",15),M(6,sde,2,3,"button",16),M(7,lde,2,5,"button",17),A()()}if(2&n){const e=D(3);C(2),v("ngIf",!e.headerFacet&&!e.headerTemplate),C(1),v("ngIf",e.headerFacet),C(1),v("ngTemplateOutlet",e.headerTemplate),C(2),v("ngIf",e.maximizable),C(1),v("ngIf",e.closable)}}function ude(n,t){1&n&&_t(0)}function dde(n,t){1&n&&_t(0)}function hde(n,t){if(1&n&&(I(0,"div",23,24),Ri(2,2),M(3,dde,1,0,"ng-container",9),A()),2&n){const e=D(3);C(3),v("ngTemplateOutlet",e.footerTemplate)}}const fde=function(n,t,e,i){return{"p-dialog p-component":!0,"p-dialog-rtl":n,"p-dialog-draggable":t,"p-dialog-resizable":e,"p-dialog-maximized":i}},pde=function(n,t){return{transform:n,transition:t}},mde=function(n){return{value:"visible",params:n}};function gde(n,t){if(1&n){const e=We();I(0,"div",3,4),ue("@animation.start",function(r){return de(e),he(D(2).onAnimationStart(r))})("@animation.done",function(r){return de(e),he(D(2).onAnimationEnd(r))}),M(2,tde,1,0,"div",5),M(3,cde,8,5,"div",6),I(4,"div",7,8),Ri(6),M(7,ude,1,0,"ng-container",9),A(),M(8,hde,4,1,"div",10),A()}if(2&n){const e=D(2);pn(e.styleClass),v("ngClass",Fd(15,fde,e.rtl,e.draggable,e.resizable,e.maximized))("ngStyle",e.style)("pFocusTrapDisabled",!1===e.focusTrap)("@animation",Mt(23,mde,bi(20,pde,e.transformOptions,e.transitionOptions))),Ot("aria-labelledby",e.id+"-label"),C(2),v("ngIf",e.resizable),C(1),v("ngIf",e.showHeader),C(1),pn(e.contentStyleClass),v("ngClass","p-dialog-content")("ngStyle",e.contentStyle),C(3),v("ngTemplateOutlet",e.contentTemplate),C(1),v("ngIf",e.footerFacet||e.footerTemplate)}}const yde=function(n,t,e,i,r,o,s,a,l,c){return{"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter":n,"p-dialog-mask-scrollblocker":t,"p-dialog-left":e,"p-dialog-right":i,"p-dialog-top":r,"p-dialog-top-left":o,"p-dialog-top-right":s,"p-dialog-bottom":a,"p-dialog-bottom-left":l,"p-dialog-bottom-right":c}};function _de(n,t){if(1&n&&(I(0,"div",1),M(1,gde,9,25,"div",2),A()),2&n){const e=D();pn(e.maskStyleClass),v("ngClass",fD(4,yde,[e.modal,e.modal||e.blockScroll,"left"===e.position,"right"===e.position,"top"===e.position,"topleft"===e.position||"top-left"===e.position,"topright"===e.position||"top-right"===e.position,"bottom"===e.position,"bottomleft"===e.position||"bottom-left"===e.position,"bottomright"===e.position||"bottom-right"===e.position])),C(1),v("ngIf",e.visible)}}const vde=["*",[["p-header"]],[["p-footer"]]],bde=["*","p-header","p-footer"],wde=av([Ai({transform:"{{transform}}",opacity:0}),Pc("{{transition}}")]),Cde=av([Pc("{{transition}}",Ai({transform:"{{transform}}",opacity:0}))]);let Dde=(()=>{class n{constructor(e,i,r,o,s){this.el=e,this.renderer=i,this.zone=r,this.cd=o,this.config=s,this.draggable=!0,this.resizable=!0,this.closeOnEscape=!0,this.closable=!0,this.showHeader=!0,this.blockScroll=!1,this.autoZIndex=!0,this.baseZIndex=0,this.minX=0,this.minY=0,this.focusOnShow=!0,this.keepInViewport=!0,this.focusTrap=!0,this.transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)",this.closeIcon="pi pi-times",this.closeTabindex="-1",this.minimizeIcon="pi pi-window-minimize",this.maximizeIcon="pi pi-window-maximize",this.onShow=new re,this.onHide=new re,this.visibleChange=new re,this.onResizeInit=new re,this.onResizeEnd=new re,this.onDragEnd=new re,this.onMaximize=new re,this.id=NL(),this._style={},this._position="center",this.transformOptions="scale(0.7)"}get positionLeft(){return 0}set positionLeft(e){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(e){console.log("positionTop property is deprecated.")}get responsive(){return!1}set responsive(e){console.log("Responsive property is deprecated.")}get breakpoint(){return 649}set breakpoint(e){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngOnInit(){this.breakpoints&&this.createStyle()}get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(e){e&&(this._style={...e},this.originalStyle=e)}get position(){return this._position}set position(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)"}}focus(){let e=Z.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}close(e){this.visibleChange.emit(!1),e.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)})),this.modal&&Z.addClass(document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.dismissableMask&&this.unbindMaskClickListener(),this.modal&&Z.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?Z.addClass(document.body,"p-overflow-hidden"):Z.removeClass(document.body,"p-overflow-hidden")),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&(yl.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let i in this.breakpoints)e+=`\n @media screen and (max-width: ${i}) {\n .p-dialog[${this.id}] {\n width: ${this.breakpoints[i]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}}initDrag(e){Z.hasClass(e.target,"p-dialog-header-icon")||Z.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",Z.addClass(document.body,"p-unselectable-text"))}onKeydown(e){if(this.focusTrap&&9===e.which){e.preventDefault();let i=Z.getFocusableElements(this.container);if(i&&i.length>0)if(i[0].ownerDocument.activeElement){let r=i.indexOf(i[0].ownerDocument.activeElement);e.shiftKey?-1==r||0===r?i[i.length-1].focus():i[r-1].focus():-1==r||r===i.length-1?i[0].focus():i[r+1].focus()}else i[0].focus()}}onDrag(e){if(this.dragging){let i=Z.getOuterWidth(this.container),r=Z.getOuterHeight(this.container),o=e.pageX-this.lastPageX,s=e.pageY-this.lastPageY,a=this.container.getBoundingClientRect(),l=a.left+o,c=a.top+s,u=Z.getViewport();this.container.style.position="fixed",this.keepInViewport?(l>=this.minX&&l+i=this.minY&&c+rparseInt(u))&&h.left+lparseInt(d))&&h.top+c{this.documentDragListener=this.onDrag.bind(this),window.document.addEventListener("mousemove",this.documentDragListener)})}unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)}bindDocumentDragEndListener(){this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.endDrag.bind(this),window.document.addEventListener("mouseup",this.documentDragEndListener)})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}bindDocumentResizeListeners(){this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.resizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){this.documentEscapeListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","keydown",i=>{27==i.which&&this.close(i)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.wrapper):Z.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.container.setAttribute(this.id,""),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&Z.addClass(document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&Z.addClass(this.wrapper,"p-component-overlay-leave")}}onAnimationEnd(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({}),this.cd.markForCheck();break;case"visible":this.onShow.emit({})}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(Z.removeClass(document.body,"p-overflow-hidden"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&Z.removeClass(document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&&yl.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?{...this.originalStyle}:{}}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle()}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(Cr),O(qt),O(Un),O(zc))},n.\u0275cmp=Me({type:n,selectors:[["p-dialog"]],contentQueries:function(e,i,r){if(1&e&&(Jn(r,hM,5),Jn(r,fM,5),Jn(r,qi,4)),2&e){let o;Ke(o=Qe())&&(i.headerFacet=o.first),Ke(o=Qe())&&(i.footerFacet=o.first),Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(Jue,5),en(Xue,5),en(ede,5)),2&e){let r;Ke(r=Qe())&&(i.headerViewChild=r.first),Ke(r=Qe())&&(i.contentViewChild=r.first),Ke(r=Qe())&&(i.footerViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",draggable:"draggable",resizable:"resizable",positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:"modal",closeOnEscape:"closeOnEscape",dismissableMask:"dismissableMask",rtl:"rtl",closable:"closable",responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",showHeader:"showHeader",breakpoint:"breakpoint",blockScroll:"blockScroll",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",minX:"minX",minY:"minY",focusOnShow:"focusOnShow",maximizable:"maximizable",keepInViewport:"keepInViewport",focusTrap:"focusTrap",transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",visible:"visible",style:"style",position:"position"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},ngContentSelectors:bde,decls:1,vars:1,consts:[[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","pFocusTrapDisabled"],["container",""],["class","p-resizable-handle","style","z-index: 90;",3,"mousedown",4,"ngIf"],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],["content",""],[4,"ngTemplateOutlet"],["class","p-dialog-footer",4,"ngIf"],[1,"p-resizable-handle",2,"z-index","90",3,"mousedown"],[1,"p-dialog-header",3,"mousedown"],["titlebar",""],["class","p-dialog-title",4,"ngIf"],[1,"p-dialog-header-icons"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],["type","button","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-close-icon",3,"ngClass"],[1,"p-dialog-footer"],["footer",""]],template:function(e,i){1&e&&(go(vde),M(0,_de,2,15,"div",0)),2&e&&v("ngIf",i.maskVisible)},dependencies:[fi,Kt,_o,sr,Que,Bc],styles:[".p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}\n"],encapsulation:2,data:{animation:[sv("animation",[Lc("void => visible",[lv(wde)]),Lc("visible => void",[lv(Cde)])])]},changeDetection:0}),n})(),Tde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,Zue,Pa,zo]}),n})(),Ide=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,Pa,zo,zo]}),n})(),yg=(()=>{class n{constructor(e,i,r,o,s){this.el=e,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(e){this._disabled=e,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 e=this.getTarget(this.el.nativeElement);e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.text&&(this.setOption({tooltipLabel:e.text.currentValue}),this.active&&(e.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.autoHide&&this.setOption({autoHide:e.autoHide.currentValue}),e.tooltipOptions&&(this._tooltipOptions={...this._tooltipOptions,...e.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(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){(this.isAutoHide()||!(Z.hasClass(e.toElement,"p-tooltip")||Z.hasClass(e.toElement,"p-tooltip-arrow")||Z.hasClass(e.toElement,"p-tooltip-text")||Z.hasClass(e.relatedTarget,"p-tooltip")))&&this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onInputClick(e){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 e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}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 e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),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")?Z.appendChild(this.container,this.el.nativeElement):Z.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(),Z.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?yl.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&&yl.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 e=this.el.nativeElement.getBoundingClientRect();return{left:e.left+Z.getWindowScrollLeft(),top:e.top+Z.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),i=e.left+Z.getOuterWidth(this.el.nativeElement),r=e.top+(Z.getOuterHeight(this.el.nativeElement)-Z.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 e=this.getHostOffset(),i=e.left-Z.getOuterWidth(this.container),r=e.top+(Z.getOuterHeight(this.el.nativeElement)-Z.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 e=this.getHostOffset(),i=e.left+(Z.getOuterWidth(this.el.nativeElement)-Z.getOuterWidth(this.container))/2,r=e.top-Z.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 e=this.getHostOffset(),i=e.left+(Z.getOuterWidth(this.el.nativeElement)-Z.getOuterWidth(this.container))/2,r=e.top+Z.getOuterHeight(this.el.nativeElement);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions={...this._tooltipOptions,...e}}getOption(e){return this._tooltipOptions[e]}getTarget(e){return Z.hasClass(e,"p-inputwrapper")?Z.findSingle(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let e=this.container.getBoundingClientRect(),i=e.top,r=e.left,o=Z.getOuterWidth(this.container),s=Z.getOuterHeight(this.container),a=Z.getViewport();return r+o>a.width||r<0||i<0||i+s>a.height}onWindowResize(e){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 FL(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 e=this.getTarget(this.el.nativeElement);e.removeEventListener("focus",this.focusListener),e.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):Z.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&&yl.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(qt),O(zc),O(Cr),O(Un))},n.\u0275dir=we({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:[$i]}),n})(),Du=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();class _g{}_g.\u0275fac=function(t){return new(t||_g)},_g.\u0275mod=Xe({type:_g}),_g.\u0275inj=ct({imports:[wn]});class Tu{}Tu.\u0275fac=function(t){return new(t||Tu)},Tu.\u0275mod=Xe({type:Tu}),Tu.\u0275inj=ct({imports:[wn]});const Ode=function(n,t,e){return{"border-width":n,width:t,height:e}};class Yh{constructor(){this.borderSize="",this.size=""}}Yh.\u0275fac=function(t){return new(t||Yh)},Yh.\u0275cmp=Me({type:Yh,selectors:[["dot-spinner"]],inputs:{borderSize:"borderSize",size:"size"},decls:1,vars:5,consts:[[3,"ngStyle"]],template:function(t,e){1&t&&_e(0,"div",0),2&t&&v("ngStyle",ll(1,Ode,e.borderSize,e.size,e.size))},dependencies:[sr],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 s0{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(t){this._accept=t?.filter(e=>"*/*"!==e).map(e=>e.toLowerCase().replace(/\*/g,""))}get validity(){return this._validity}onDrop(t){t.stopPropagation(),t.preventDefault();const{dataTransfer:e}=t,i=this.getFiles(e),r=1===i?.length?i[0]:null;0!==i.length&&(this.setValidity(i),e.items?.clear(),e.clearData(),this.fileDropped.emit({file:r,validity:this._validity}))}onDragEnter(t){t.stopPropagation(),t.preventDefault(),this.fileDragEnter.emit(!0)}onDragOver(t){t.stopPropagation(),t.preventDefault(),this.fileDragOver.emit(!0)}onDragLeave(t){t.stopPropagation(),t.preventDefault(),this.fileDragLeave.emit(!0)}typeMatch(t){if(!this._accept.length)return!0;const e=t.name.split(".").pop().toLowerCase(),i=t.type.toLowerCase();return this._accept.some(o=>i.includes(o)||o.includes(`.${e}`))}getFiles(t){const{items:e,files:i}=t;return e?Array.from(e).filter(r=>"file"===r.kind).map(r=>r.getAsFile()):Array.from(i)||[]}isFileTooLong(t){return!!this.maxFileSize&&t.size>this.maxFileSize}setValidity(t){const e=t[0],i=t.length>1,r=!this.typeMatch(e),o=this.isFileTooLong(e);this._validity={...this._validity,multipleFilesDropped:i,fileTypeMismatch:r,maxFileSizeExceeded:o,valid:!r&&!o&&!i}}}s0.\u0275fac=function(t){return new(t||s0)},s0.\u0275cmp=Me({type:s0,selectors:[["dot-drop-zone"]],hostBindings:function(t,e){1&t&&ue("drop",function(r){return e.onDrop(r)})("dragenter",function(r){return e.onDragEnter(r)})("dragover",function(r){return e.onDragOver(r)})("dragleave",function(r){return e.onDragLeave(r)})},inputs:{maxFileSize:"maxFileSize",accept:"accept"},outputs:{fileDropped:"fileDropped",fileDragEnter:"fileDragEnter",fileDragOver:"fileDragOver",fileDragLeave:"fileDragLeave"},standalone:!0,features:[Ns],ngContentSelectors:["*"],decls:1,vars:0,template:function(t,e){1&t&&(go(),Ri(0))},dependencies:[wn],changeDetection:0});class a0{}a0.\u0275fac=function(t){return new(t||a0)},a0.\u0275cmp=Me({type:a0,selectors:[["dot-icon"]],inputs:{name:"name",size:"size"},decls:2,vars:3,consts:[[1,"material-icons"]],template:function(t,e){1&t&&(I(0,"i",0),Ne(1),A()),2&t&&(Mc("font-size",e.size,"px"),C(1),At(e.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}"]});const kde=function(n){return[n]};function Nde(n,t){if(1&n&&_e(0,"i",6),2&n){const e=D();v("ngClass",Mt(1,kde,e.configuration.icon))}}function Pde(n,t){if(1&n&&(I(0,"h2",7),Ne(1),A()),2&n){const e=D();C(1),Yi(" ",null==e.configuration?null:e.configuration.subtitle," ")}}function Lde(n,t){if(1&n){const e=We();I(0,"p-button",10),ue("onClick",function(){return de(e),he(D(2).buttonAction.emit())}),A()}2&n&&v("label",D(2).buttonLabel)}function Rde(n,t){1&n&&(I(0,"span"),Ne(1),Qn(2,"dm"),A()),2&n&&(C(1),At(Zn(2,1,"dot.common.or.text")))}function Fde(n,t){if(1&n&&(dt(0),M(1,Rde,3,3,"span",5),I(2,"a",11),Ne(3),Qn(4,"dm"),A(),ht()),2&n){const e=D(2);C(1),v("ngIf",!e.hideContactUsLink&&e.buttonLabel),C(2),At(Zn(4,2,"Contact-Us-for-more-Information"))}}function jde(n,t){if(1&n&&(dt(0),I(1,"div",8),M(2,Lde,1,1,"p-button",9),M(3,Fde,5,4,"ng-container",5),A(),ht()),2&n){const e=D();C(2),v("ngIf",e.buttonLabel),C(1),v("ngIf",!e.hideContactUsLink)}}class l0{constructor(){this.hideContactUsLink=!1,this.buttonAction=new re}}l0.\u0275fac=function(t){return new(t||l0)},l0.\u0275cmp=Me({type:l0,selectors:[["dot-empty-container"]],inputs:{configuration:"configuration",buttonLabel:"buttonLabel",hideContactUsLink:"hideContactUsLink"},outputs:{buttonAction:"buttonAction"},standalone:!0,features:[Ns],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(t,e){1&t&&(I(0,"div",0)(1,"div",1),M(2,Nde,1,3,"i",2),I(3,"h1",3),Ne(4),A(),M(5,Pde,2,1,"h2",4),A(),M(6,jde,4,2,"ng-container",5),A()),2&t&&(C(2),v("ngIf",null==e.configuration?null:e.configuration.icon),C(2),At(null==e.configuration?null:e.configuration.title),C(1),v("ngIf",null==e.configuration?null:e.configuration.subtitle),C(1),v("ngIf",!e.hideContactUsLink||e.buttonLabel))},dependencies:[Bo,BL,Kt,fi,ea],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});const zde=function(n){return{"dot-tab-dropdown--active":n}};function Vde(n,t){if(1&n){const e=We();I(0,"button",7),ue("click",function(r){de(e);const o=D().$implicit;return he(D().onClickDropdown(r,o.value.id))}),_e(1,"i",8),A()}if(2&n){const e=D().$implicit,i=D();v("disabled",e.disabled)("aria-disabled",e.disabled)("ngClass",Mt(5,zde,i.activeId===e.value.id)),C(1),pn(e.value.toggle?i.dropDownOpenIcon:i.dropDownCloseIcon)}}function Bde(n,t){1&n&&_e(0,"div",9)}const Ude=function(n,t){return{"dot-tab--active":n,"dot-tab__button--right":t}};function Hde(n,t){if(1&n){const e=We();I(0,"div",2)(1,"div",3)(2,"button",4),ue("click",function(r){const s=de(e).$implicit;return he(D().onClickOption(r,s.value.id))}),Qn(3,"dm"),Ne(4),A(),M(5,Vde,2,7,"button",5),A(),M(6,Bde,1,0,"div",6),A()}if(2&n){const e=t.$implicit,i=D();C(2),v("ngClass",bi(10,Ude,i.activeId===e.value.id,e.value.showDropdownButton))("value",e.value.id)("disabled",e.disabled)("item.disabled",e.disabled)("pTooltip",Zn(3,8,"editpage.toolbar."+e.label.toLowerCase()+".page.clipboard")),C(2),Yi(" ",e.label," "),C(1),v("ngIf",e.value.showDropdownButton),C(1),v("ngIf",i.activeId===e.value.id)}}class c0{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(t){t.options&&(this._options=this.options.map(e=>({...e,value:{...e.value,toggle:!e.value.showDropdownButton&&void 0}})))}onClickOption(t,e){e!==this.activeId&&this.clickOption.emit({event:t,optionId:e})}onClickDropdown(t,e){if(!this.shouldOpenMenu(e))return;this._options=this._options.map(o=>(e.includes(o.value.id)&&(o.value.toggle=!o.value.toggle),o));const r=t?.target?.closest(".dot-tab");this.openMenu.emit({event:t,menuId:e,target:r})}resetDropdowns(){this._options=this._options.map(t=>(t.value.toggle=!1,t))}resetDropdownById(t){this._options=this._options.map(e=>(e.value.id===t&&(e.value.toggle=!1),e))}shouldOpenMenu(t){return Boolean(this._options.find(e=>e.value.id===t&&e.value.showDropdownButton))}}function $de(n,t){if(1&n&&(I(0,"small",1),Ne(1),Qn(2,"dm"),A()),2&n){const e=D();C(1),Yi(" ",Zn(2,1,e.errorMsg),"\n")}}c0.\u0275fac=function(t){return new(t||c0)},c0.\u0275cmp=Me({type:c0,selectors:[["dot-tab-buttons"]],inputs:{activeId:"activeId",options:"options"},outputs:{openMenu:"openMenu",clickOption:"clickOption",dropdownClick:"dropdownClick"},standalone:!0,features:[$i,Ns],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(t,e){1&t&&(I(0,"div",0),M(1,Hde,7,13,"div",1),A()),2&t&&(C(1),v("ngForOf",e._options))},dependencies:[Gr,Bo,Kt,fi,Du,yg,ea],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 u0={maxlength:"error.form.validator.maxlength",required:"error.form.validator.required",pattern:"error.form.validator.pattern"};class vg{constructor(t,e){this.cd=t,this.dotMessageService=e,this.errorMsg="",this.destroy$=new ae}set message(t){this.defaultMessage=t,this.cd.markForCheck()}set field(t){t&&(this._field=t,t.statusChanges.pipe(mn(this.destroy$)).subscribe(()=>{this.errorMsg=this.getErrors(t.errors),this.cd.detectChanges()}))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getErrors(t){let e=[];return t&&(e=[...this.getMsgDefaultValidators(t),...this.getMsgCustomsValidators(t)]),this.defaultMessage?this.defaultMessage:e.slice(0,1)[0]}getMsgDefaultValidators(t){let e=[];return Object.entries(t).forEach(([i,r])=>{if(i in u0){let o="";const{requiredLength:s,requiredPattern:a}=r;switch(i){case"maxlength":o=this.dotMessageService.get(u0[i],s);break;case"pattern":o=this.dotMessageService.get(this.patternErrorMessage||u0[i],a);break;default:o=u0[i]}e=[...e,o]}}),e}getMsgCustomsValidators(t){let e=[];return Object.entries(t).forEach(([,i])=>{"string"==typeof i&&(e=[...e,i])}),e}}vg.\u0275fac=function(t){return new(t||vg)(O(Un),O(Zr))},vg.\u0275cmp=Me({type:vg,selectors:[["dot-field-validation-message"]],inputs:{patternErrorMessage:"patternErrorMessage",message:"message",field:"field"},standalone:!0,features:[Ns],decls:1,vars:1,consts:[["class","p-invalid","data-testId","error-msg",4,"ngIf"],["data-testId","error-msg",1,"p-invalid"]],template:function(t,e){1&t&&M(0,$de,3,3,"small",0),2&t&&v("ngIf",e._field&&e._field.enabled&&e._field.dirty&&!e._field.valid)},dependencies:[Kt,ea],encapsulation:2,changeDetection:0});class Mu{copy(t){const e=document.createElement("textarea");let i;return e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.opacity="0",e.value=t,document.body.appendChild(e),e.select(),new Promise((r,o)=>{try{i=document.execCommand("copy"),r(i)}catch{o(i)}document.body.removeChild(e)})}}function Wde(n,t){if(1&n&&(I(0,"span",3),Ne(1),A()),2&n){const e=D();C(1),At(e.label)}}Mu.\u0275fac=function(t){return new(t||Mu)},Mu.\u0275prov=H({token:Mu,factory:Mu.\u0275fac});class d0{constructor(t,e){this.dotClipboardUtil=t,this.dotMessageService=e,this.copy=""}ngOnInit(){this.tooltipText=this.tooltipText||this.dotMessageService.get("Copy")}copyUrlToClipboard(t){t.stopPropagation(),this.dotClipboardUtil.copy(this.copy).then(()=>{const e=this.tooltipText;this.tooltipText=this.dotMessageService.get("Copied"),setTimeout(()=>{this.tooltipText=e},1e3)}).catch(()=>{this.tooltipText="Error"})}}d0.\u0275fac=function(t){return new(t||d0)(O(Mu),O(Zr))},d0.\u0275cmp=Me({type:d0,selectors:[["dot-copy-button"]],inputs:{copy:"copy",label:"label",tooltipText:"tooltipText"},standalone:!0,features:[Pt([Mu]),Ns],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(t,e){1&t&&(I(0,"button",0),ue("click",function(r){return e.copyUrlToClipboard(r)}),_e(1,"i",1),M(2,Wde,2,1,"span",2),A()),2&t&&(v("pTooltip",e.tooltipText),C(2),v("ngIf",!!e.label))},dependencies:[Du,yg,Bo,Vo,Kt],changeDetection:0});class bg{constructor(t,e,i){this.el=t,this.renderer=e,this.formGroupDirective=i,e.addClass(this.el.nativeElement,"p-label-input-required")}set checkIsRequiredControl(t){this.isRequiredControl(t)||this.renderer.removeClass(this.el.nativeElement,"p-label-input-required")}isRequiredControl(t){const e=this.formGroupDirective.control?.get(t);return!(!e||!e.hasValidator($d.required))}}bg.\u0275fac=function(t){return new(t||bg)(O(Tt),O(Cr),O(Aa))},bg.\u0275dir=we({type:bg,selectors:[["","dotFieldRequired",""]],inputs:{checkIsRequiredControl:"checkIsRequiredControl"},standalone:!0});class h0{constructor(){this.confirmationService=it(LL)}onPressEscape(){this.confirmationService.close()}}h0.\u0275fac=function(t){return new(t||h0)},h0.\u0275dir=we({type:h0,selectors:[["p-confirmPopup","dotRemoveConfirmPopupWithEscape",""]],hostBindings:function(t,e){1&t&&ue("keydown.escape",function(r){return e.onPressEscape(r)},0,XI)},standalone:!0});let Gde=(()=>{class n{constructor(e){this.host=e,this.focused=!1}ngAfterViewChecked(){if(!this.focused&&this.autofocus){const e=Z.getFocusableElements(this.host.nativeElement);0===e.length&&this.host.nativeElement.focus(),e.length>0&&e[0].focus(),this.focused=!0}}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275dir=we({type:n,selectors:[["","pAutoFocus",""]],hostAttrs:[1,"p-element"],inputs:{autofocus:"autofocus"}}),n})(),Yde=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();const qde=["overlay"],Kde=["content"];function Qde(n,t){1&n&&_t(0)}const Zde=function(n,t,e){return{showTransitionParams:n,hideTransitionParams:t,transform:e}},Jde=function(n){return{value:"visible",params:n}},Xde=function(n){return{mode:n}},ehe=function(n){return{$implicit:n}};function the(n,t){if(1&n){const e=We();I(0,"div",1,3),ue("click",function(r){return de(e),he(D(2).onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){return de(e),he(D(2).onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){return de(e),he(D(2).onOverlayContentAnimationDone(r))}),Ri(2),M(3,Qde,1,0,"ng-container",4),A()}if(2&n){const e=D(2);pn(e.contentStyleClass),v("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",Mt(11,Jde,ll(7,Zde,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),C(3),v("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",Mt(15,ehe,Mt(13,Xde,e.overlayMode)))}}const nhe=function(n,t,e,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":t,"p-overlay-top":e,"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 ihe(n,t){if(1&n){const e=We();I(0,"div",1,2),ue("click",function(r){return de(e),he(D().onOverlayClick(r))}),M(2,the,4,17,"div",0),A()}if(2&n){const e=D();pn(e.styleClass),v("ngStyle",e.style)("ngClass",fD(5,nhe,[e.modal,e.modal&&"center"===e.overlayResponsiveDirection,e.modal&&"top"===e.overlayResponsiveDirection,e.modal&&"top-start"===e.overlayResponsiveDirection,e.modal&&"top-end"===e.overlayResponsiveDirection,e.modal&&"bottom"===e.overlayResponsiveDirection,e.modal&&"bottom-start"===e.overlayResponsiveDirection,e.modal&&"bottom-end"===e.overlayResponsiveDirection,e.modal&&"left"===e.overlayResponsiveDirection,e.modal&&"left-start"===e.overlayResponsiveDirection,e.modal&&"left-end"===e.overlayResponsiveDirection,e.modal&&"right"===e.overlayResponsiveDirection,e.modal&&"right-start"===e.overlayResponsiveDirection,e.modal&&"right-end"===e.overlayResponsiveDirection])),C(2),v("ngIf",e.visible)}}const rhe=["*"],ohe={provide:Sr,useExisting:Ut(()=>$5),multi:!0},she=av([Ai({transform:"{{transform}}",opacity:0}),Pc("{{showTransitionParams}}")]),ahe=av([Pc("{{hideTransitionParams}}",Ai({transform:"{{transform}}",opacity:0}))]);let $5=(()=>{class n{constructor(e,i,r,o,s,a){this.document=e,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(e){this._visible=e,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(e){this._mode=e}get style(){return Lt.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(e){this._style=e}get styleClass(){return Lt.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(e){this._styleClass=e}get contentStyle(){return Lt.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(e){this._contentStyle=e}get contentStyleClass(){return Lt.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(e){this._contentStyleClass=e}get target(){const e=this._target||this.overlayOptions?.target;return void 0===e?"@prev":e}set target(e){this._target=e}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(e){this._appendTo=e}get autoZIndex(){const e=this._autoZIndex||this.overlayOptions?.autoZIndex;return void 0===e||e}set autoZIndex(e){this._autoZIndex=e}get baseZIndex(){const e=this._baseZIndex||this.overlayOptions?.baseZIndex;return void 0===e?0:e}set baseZIndex(e){this._baseZIndex=e}get showTransitionOptions(){const e=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return void 0===e?".12s cubic-bezier(0, 0, 0.2, 1)":e}set showTransitionOptions(e){this._showTransitionOptions=e}get hideTransitionOptions(){const e=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return void 0===e?".1s linear":e}set hideTransitionOptions(e){this._hideTransitionOptions=e}get listener(){return this._listener||this.overlayOptions?.listener}set listener(e){this._listener=e}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(e){this._responsive=e}get options(){return this._options}set options(e){this._options=e}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 Z.getTargetElement(this.target,this.el?.nativeElement)}ngAfterContentInit(){this.templates?.forEach(e=>{e.getType(),this.contentTemplate=e.template})}show(e,i=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&Z.focus(this.targetEl),this.modal&&Z.addClass(this.document?.body,"p-overflow-hidden")}hide(e,i=!1){this.visible&&(this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&Z.focus(this.targetEl),this.modal&&Z.removeClass(this.document?.body,"p-overflow-hidden"))}alignOverlay(){!this.modal&&Z.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(e){this._visible=e,this.visibleChange.emit(e)}onOverlayClick(e){this.isOverlayClicked=!0}onOverlayContentClick(e){this.overlayService.add({originalEvent:e,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(e){switch(e.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&yl.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),Z.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&&Z.addClass(this.overlayEl,"p-component-overlay-leave")}this.handleEvents("onAnimationStart",e)}onOverlayContentAnimationDone(e){const i=this.overlayEl||e.element.parentElement;switch(e.toState){case"visible":this.show(i,!0),this.bindListeners();break;case"void":this.hide(i,!0),this.unbindListeners(),Z.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),yl.clear(i),this.modalVisible=!1}this.handleEvents("onAnimationDone",e)}handleEvents(e,i){this[e].emit(i),this.options&&this.options[e]&&this.options[e](i),this.config?.overlayOptions&&this.config?.overlayOptions[e]&&this.config?.overlayOptions[e](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 FL(this.targetEl,e=>{(!this.listener||this.listener(e,{type:"scroll",mode:this.overlayMode,valid:!0}))&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",e=>{const r=!(this.targetEl&&(this.targetEl.isSameNode(e.target)||!this.isOverlayClicked&&this.targetEl.contains(e.target))||this.isOverlayContentClicked);(this.listener?this.listener(e,{type:"outside",mode:this.overlayMode,valid:3!==e.which&&r}):r)&&this.hide(e),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",e=>{(this.listener?this.listener(e,{type:"resize",mode:this.overlayMode,valid:!Z.isTouchDevice()}):!Z.isTouchDevice())&&this.hide(e,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.window,"keydown",e=>{this.overlayOptions.hideOnEscape&&27===e.keyCode&&(this.listener?this.listener(e,{type:"keydown",mode:this.overlayMode,valid:!Z.isTouchDevice()}):!Z.isTouchDevice())&&this.zone.run(()=>{this.hide(e,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(Z.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),yl.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners()}}return n.\u0275fac=function(e){return new(e||n)(O(Ln),O(Tt),O(Cr),O(zc),O(iZ),O(qt))},n.\u0275cmp=Me({type:n,selectors:[["p-overlay"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(qde,5),en(Kde,5)),2&e){let r;Ke(r=Qe())&&(i.overlayViewChild=r.first),Ke(r=Qe())&&(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:[Pt([ohe])],ngContentSelectors:rhe,decls:1,vars:1,consts:[[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"ngStyle","ngClass","click"],["overlay",""],["content",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(go(),M(0,ihe,3,20,"div",0)),2&e&&v("ngIf",i.modalVisible)},dependencies:[fi,Kt,_o,sr],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:[sv("overlayContentAnimation",[Lc(":enter",[lv(she)]),Lc(":leave",[lv(ahe)])])]},changeDetection:0}),n})();const lhe=["element"],che=["content"];function uhe(n,t){1&n&&_t(0)}const KS=function(n,t){return{$implicit:n,options:t}};function dhe(n,t){if(1&n&&(dt(0),M(1,uhe,1,0,"ng-container",7),ht()),2&n){const e=D(2);C(1),v("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",bi(2,KS,e.loadedItems,e.getContentOptions()))}}function hhe(n,t){1&n&&_t(0)}function fhe(n,t){if(1&n&&(dt(0),M(1,hhe,1,0,"ng-container",7),ht()),2&n){const e=t.$implicit,i=t.index,r=D(3);C(1),v("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",bi(2,KS,e,r.getOptions(i)))}}const phe=function(n){return{"p-scroller-loading":n}};function mhe(n,t){if(1&n&&(I(0,"div",8,9),M(2,fhe,2,5,"ng-container",10),A()),2&n){const e=D(2);v("ngClass",Mt(4,phe,e.d_loading))("ngStyle",e.contentStyle),C(2),v("ngForOf",e.loadedItems)("ngForTrackBy",e._trackBy||e.index)}}function ghe(n,t){1&n&&_e(0,"div",11),2&n&&v("ngStyle",D(2).spacerStyle)}function yhe(n,t){1&n&&_t(0)}const _he=function(n){return{numCols:n}},W5=function(n){return{options:n}};function vhe(n,t){if(1&n&&(dt(0),M(1,yhe,1,0,"ng-container",7),ht()),2&n){const e=t.index,i=D(4);C(1),v("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",Mt(4,W5,i.getLoaderOptions(e,i.both&&Mt(2,_he,i._numItemsInViewport.cols))))}}function bhe(n,t){if(1&n&&(dt(0),M(1,vhe,2,6,"ng-container",14),ht()),2&n){const e=D(3);C(1),v("ngForOf",e.loaderArr)}}function whe(n,t){1&n&&_t(0)}const Che=function(){return{styleClass:"p-scroller-loading-icon"}};function Dhe(n,t){if(1&n&&(dt(0),M(1,whe,1,0,"ng-container",7),ht()),2&n){const e=D(4);C(1),v("ngTemplateOutlet",e.loaderIconTemplate)("ngTemplateOutletContext",Mt(3,W5,Hr(2,Che)))}}function The(n,t){1&n&&_e(0,"i",16)}function Mhe(n,t){if(1&n&&(M(0,Dhe,2,5,"ng-container",0),M(1,The,1,0,"ng-template",null,15,Bn)),2&n){const e=Dn(2);v("ngIf",D(3).loaderIconTemplate)("ngIfElse",e)}}const She=function(n){return{"p-component-overlay":n}};function Ehe(n,t){if(1&n&&(I(0,"div",12),M(1,bhe,2,1,"ng-container",0),M(2,Mhe,3,2,"ng-template",null,13,Bn),A()),2&n){const e=Dn(3),i=D(2);v("ngClass",Mt(3,She,!i.loaderTemplate)),C(1),v("ngIf",i.loaderTemplate)("ngIfElse",e)}}const xhe=function(n,t,e){return{"p-scroller":!0,"p-scroller-inline":n,"p-both-scroll":t,"p-horizontal-scroll":e}};function Ihe(n,t){if(1&n){const e=We();dt(0),I(1,"div",2,3),ue("scroll",function(r){return de(e),he(D().onContainerScroll(r))}),M(3,dhe,2,5,"ng-container",0),M(4,mhe,3,6,"ng-template",null,4,Bn),M(6,ghe,1,1,"div",5),M(7,Ehe,4,5,"div",6),A(),ht()}if(2&n){const e=Dn(5),i=D();C(1),pn(i._styleClass),v("ngStyle",i._style)("ngClass",ll(10,xhe,i.inline,i.both,i.horizontal)),Ot("id",i._id)("tabindex",i.tabindex),C(2),v("ngIf",i.contentTemplate)("ngIfElse",e),C(3),v("ngIf",i._showSpacer),C(1),v("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function Ohe(n,t){1&n&&_t(0)}const Ahe=function(n,t){return{rows:n,columns:t}};function khe(n,t){if(1&n&&(dt(0),M(1,Ohe,1,0,"ng-container",7),ht()),2&n){const e=D(2);C(1),v("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",bi(5,KS,e.items,bi(2,Ahe,e._items,e.loadedColumns)))}}function Nhe(n,t){if(1&n&&(Ri(0),M(1,khe,2,8,"ng-container",17)),2&n){const e=D();C(1),v("ngIf",e.contentTemplate)}}const Phe=["*"];let G5=(()=>{class n{constructor(e,i){this.cd=e,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(e){this._id=e}get style(){return this._style}set style(e){this._style=e}get styleClass(){return this._styleClass}set styleClass(e){this._styleClass=e}get tabindex(){return this._tabindex}set tabindex(e){this._tabindex=e}get items(){return this._items}set items(e){this._items=e}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e}get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e}get scrollWidth(){return this._scrollWidth}set scrollWidth(e){this._scrollWidth=e}get orientation(){return this._orientation}set orientation(e){this._orientation=e}get step(){return this._step}set step(e){this._step=e}get delay(){return this._delay}set delay(e){this._delay=e}get resizeDelay(){return this._resizeDelay}set resizeDelay(e){this._resizeDelay=e}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=e}get inline(){return this._inline}set inline(e){this._inline=e}get lazy(){return this._lazy}set lazy(e){this._lazy=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(e){this._loaderDisabled=e}get columns(){return this._columns}set columns(e){this._columns=e}get showSpacer(){return this._showSpacer}set showSpacer(e){this._showSpacer=e}get showLoader(){return this._showLoader}set showLoader(e){this._showLoader=e}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(e){this._numToleratedItems=e}get loading(){return this._loading}set loading(e){this._loading=e}get autoSize(){return this._autoSize}set autoSize(e){this._autoSize=e}get trackBy(){return this._trackBy}set trackBy(e){this._trackBy=e}get options(){return this._options}set options(e){this._options=e,e&&"object"==typeof e&&Object.entries(e).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(e=>this._columns?e:e.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(e){let i=!1;if(e.loading){const{previousValue:r,currentValue:o}=e.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,i=!0)}if(e.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),e.numToleratedItems){const{previousValue:r,currentValue:o}=e.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(e.options){const{previousValue:r,currentValue:o}=e.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&&(e.items?.previousValue?.length!==e.items?.currentValue?.length||e.itemSize||e.scrollHeight||e.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"item":default:this.itemTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"loadericon":this.loaderIconTemplate=e.template}})}ngAfterViewInit(){this.viewInit()}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1}viewInit(){Z.isVisible(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=Z.getWidth(this.elementViewChild.nativeElement),this.defaultHeight=Z.getHeight(this.elementViewChild.nativeElement),this.defaultContentWidth=Z.getWidth(this.contentEl),this.defaultContentHeight=Z.getHeight(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(e){this.contentEl=e||this.contentViewChild?.nativeElement||Z.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(e){this.lastScrollPos=this.both?{top:0,left:0}:0,this.elementViewChild?.nativeElement?.scrollTo(e)}scrollToIndex(e,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(e[0],r[0]),cols:s(e[1],r[1])},l(a(c.cols,this._itemSize[1],o.left),a(c.rows,this._itemSize[0],o.top))):(c=s(e,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(e,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>e[0]?a(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-o.cols>e[1]&&a((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-o>e){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<=e[0]+1?a(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-o.cols<=e[1]+1&&a((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-o<=e+1){const u=(s.first+1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else this.scrollToIndex(e,r)}getRenderedRange(){const e=(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:e(o,this._itemSize[0]),cols:e(s,this._itemSize[1])},r={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols}):(i=e(this.horizontal?s:o,this._itemSize),r=i+this.numItemsInViewport)}return{first:this.first,last:this.last,viewport:{first:i,last:r}}}calculateNumItems(){const e=this.getContentPosition(),i=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-e.left:0,r=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-e.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:e,numToleratedItems:i}=this.calculateNumItems(),r=(a,l,c,u=!1)=>this.getLast(a+l+(aArray.from({length:e.cols})):Array.from({length:e})),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[e,i]=[Z.getWidth(this.contentEl),Z.getHeight(this.contentEl)];e!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");const[r,o]=[Z.getWidth(this.elementViewChild.nativeElement),Z.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 e=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],e.y),i("width",this._columns||this._items[1],this._itemSize[1],e.x)):this.horizontal?i("width",this._columns||this._items,this._itemSize,e.x):i("height",this._items,this._itemSize,e.y)}}setContentPosition(e){if(this.contentEl&&!this._appendOnly){const i=e?e.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(e){const i=e.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,b,w,_,N)=>g<=_?_:N?b-w-_:y+_-1,l=(g,y,b,w,_,N,S)=>g<=N?0:Math.max(0,S?gy?b:g-2*N),c=(g,y,b,w,_,N=!1)=>{let S=y+w+2*_;return g>=_&&(S+=_+1),this.getLast(S,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 b={rows:s(u,this._itemSize[0]),cols:s(d,this._itemSize[1])},w={rows:a(b.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],g),cols:a(b.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],y)};h={rows:l(b.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],g),cols:l(b.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],y)},f={rows:c(b.rows,h.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(b.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 b=s(g,this._itemSize);h=l(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,y),this.first,0,0,this.d_numToleratedItems,y),f=c(b,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(e){const{first:i,last:r,isRangeChanged:o,scrollPos:s}=this.onScrollPositionChange(e);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(e){if(this.handleEvents("onScroll",{originalEvent:e}),this._delay&&this.isPageChanged){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:i}=this.onScrollPositionChange(e);(i||this._step&&this.isPageChanged)&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(e),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(e)}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(Z.isVisible(this.elementViewChild?.nativeElement)){const[e,i]=[Z.getWidth(this.elementViewChild.nativeElement),Z.getHeight(this.elementViewChild.nativeElement)],[r,o]=[e!==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=e,this.defaultHeight=i,this.defaultContentWidth=Z.getWidth(this.contentEl),this.defaultContentHeight=Z.getHeight(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(e,i){return this.options&&this.options[e]?this.options[e](i):this[e].emit(i)}getContentOptions(){return{contentStyleClass:"p-scroller-content "+(this.d_loading?"p-scroller-loading":""),items:this.loadedItems,getItemOptions:e=>this.getOptions(e),loading:this.d_loading,getLoaderOptions:(e,i)=>this.getLoaderOptions(e,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(e){const i=(this._items||[]).length,r=this.both?this.first.rows+e:this.first+e;return{index:r,count:i,first:0===r,last:r===i-1,even:r%2==0,odd:r%2!=0}}getLoaderOptions(e,i){const r=this.loaderArr.length;return{index:e,count:r,first:0===e,last:e===r-1,even:e%2==0,odd:e%2!=0,...i}}}return n.\u0275fac=function(e){return new(e||n)(O(Un),O(qt))},n.\u0275cmp=Me({type:n,selectors:[["p-scroller"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(lhe,5),en(che,5)),2&e){let r;Ke(r=Qe())&&(i.elementViewChild=r.first),Ke(r=Qe())&&(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:[$i],ngContentSelectors:Phe,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(e,i){if(1&e&&(go(),M(0,Ihe,8,14,"ng-container",0),M(1,Nhe,2,1,"ng-template",null,1,Bn)),2&e){const r=Dn(2);v("ngIf",!i._disabled)("ngIfElse",r)}},dependencies:[fi,Gr,Kt,_o,sr],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})(),Y5=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();function Lhe(n,t){if(1&n&&(I(0,"span"),Ne(1),A()),2&n){const e=D();let i;C(1),At(null!==(i=e.label)&&void 0!==i?i:"empty")}}function Rhe(n,t){1&n&&_t(0)}const wg=function(n){return{height:n}},Fhe=function(n,t){return{"p-dropdown-item":!0,"p-highlight":n,"p-disabled":t}},QS=function(n){return{$implicit:n}},jhe=["container"],zhe=["filter"],Vhe=["in"],Bhe=["editableInput"],Uhe=["items"],Hhe=["scroller"],$he=["overlay"];function Whe(n,t){if(1&n&&(dt(0),Ne(1),ht()),2&n){const e=D(2);C(1),At(e.label||"empty")}}function Ghe(n,t){1&n&&_t(0)}const Yhe=function(n){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":n}};function qhe(n,t){if(1&n&&(I(0,"span",14),M(1,Whe,2,1,"ng-container",15),M(2,Ghe,1,0,"ng-container",16),A()),2&n){const e=D();v("ngClass",Mt(9,Yhe,null==e.label||0===e.label.length))("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),Ot("id",e.labelId),C(1),v("ngIf",!e.selectedItemTemplate),C(1),v("ngTemplateOutlet",e.selectedItemTemplate)("ngTemplateOutletContext",Mt(11,QS,e.selectedOption))}}const Khe=function(n){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":n}};function Qhe(n,t){if(1&n&&(I(0,"span",17),Ne(1),A()),2&n){const e=D();v("ngClass",Mt(2,Khe,null==e.placeholder||0===e.placeholder.length)),C(1),At(e.placeholder||"empty")}}function Zhe(n,t){if(1&n){const e=We();I(0,"input",18,19),ue("input",function(r){return de(e),he(D().onEditableInputChange(r))})("focus",function(r){return de(e),he(D().onEditableInputFocus(r))})("blur",function(r){return de(e),he(D().onInputBlur(r))}),A()}if(2&n){const e=D();v("disabled",e.disabled),Ot("maxlength",e.maxlength)("placeholder",e.placeholder)("aria-expanded",e.overlayVisible)}}function Jhe(n,t){if(1&n){const e=We();I(0,"i",20),ue("click",function(r){return de(e),he(D().clear(r))}),A()}}function Xhe(n,t){1&n&&_t(0)}function efe(n,t){1&n&&_t(0)}const q5=function(n){return{options:n}};function tfe(n,t){if(1&n&&(dt(0),M(1,efe,1,0,"ng-container",16),ht()),2&n){const e=D(3);C(1),v("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",Mt(2,q5,e.filterOptions))}}function nfe(n,t){if(1&n){const e=We();I(0,"div",30)(1,"input",31,32),ue("keydown.enter",function(r){return r.preventDefault()})("keydown",function(r){return de(e),he(D(3).onKeydown(r,!1))})("input",function(r){return de(e),he(D(3).onFilterInputChange(r))}),A(),_e(3,"span",33),A()}if(2&n){const e=D(3);C(1),v("value",e.filterValue||""),Ot("placeholder",e.filterPlaceholder)("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.overlayVisible?"p-highlighted-option":e.labelId)}}function ife(n,t){if(1&n&&(I(0,"div",27),ue("click",function(i){return i.stopPropagation()}),M(1,tfe,2,4,"ng-container",28),M(2,nfe,4,4,"ng-template",null,29,Bn),A()),2&n){const e=Dn(3),i=D(2);C(1),v("ngIf",i.filterTemplate)("ngIfElse",e)}}function rfe(n,t){1&n&&_t(0)}const K5=function(n,t){return{$implicit:n,options:t}};function ofe(n,t){if(1&n&&M(0,rfe,1,0,"ng-container",16),2&n){const e=t.$implicit,i=t.options;D(2),v("ngTemplateOutlet",Dn(7))("ngTemplateOutletContext",bi(2,K5,e,i))}}function sfe(n,t){1&n&&_t(0)}function afe(n,t){if(1&n&&M(0,sfe,1,0,"ng-container",16),2&n){const e=t.options;v("ngTemplateOutlet",D(4).loaderTemplate)("ngTemplateOutletContext",Mt(2,q5,e))}}function lfe(n,t){1&n&&(dt(0),M(1,afe,1,4,"ng-template",36),ht())}function cfe(n,t){if(1&n){const e=We();I(0,"p-scroller",34,35),ue("onLazyLoad",function(r){return de(e),he(D(2).onLazyLoad.emit(r))}),M(2,ofe,1,5,"ng-template",13),M(3,lfe,2,0,"ng-container",15),A()}if(2&n){const e=D(2);oi(Mt(8,wg,e.scrollHeight)),v("items",e.optionsToDisplay)("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),C(3),v("ngIf",e.loaderTemplate)}}function ufe(n,t){1&n&&_t(0)}const dfe=function(){return{}};function hfe(n,t){if(1&n&&(dt(0),M(1,ufe,1,0,"ng-container",16),ht()),2&n){D();const e=Dn(7),i=D();C(1),v("ngTemplateOutlet",e)("ngTemplateOutletContext",bi(3,K5,i.optionsToDisplay,Hr(2,dfe)))}}function ffe(n,t){if(1&n&&(I(0,"span"),Ne(1),A()),2&n){const e=D().$implicit,i=D(4);C(1),At(i.getOptionGroupLabel(e)||"empty")}}function pfe(n,t){1&n&&_t(0)}function mfe(n,t){1&n&&_t(0)}const Q5=function(n,t){return{$implicit:n,selectedOption:t}};function gfe(n,t){if(1&n&&(I(0,"li",42),M(1,ffe,2,1,"span",15),M(2,pfe,1,0,"ng-container",16),A(),M(3,mfe,1,0,"ng-container",16)),2&n){const e=t.$implicit,i=D(2).options,r=Dn(5),o=D(2);v("ngStyle",Mt(6,wg,i.itemSize+"px")),C(1),v("ngIf",!o.groupTemplate),C(1),v("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",Mt(8,QS,e)),C(1),v("ngTemplateOutlet",r)("ngTemplateOutletContext",bi(10,Q5,o.getOptionGroupChildren(e),o.selectedOption))}}function yfe(n,t){if(1&n&&(dt(0),M(1,gfe,4,13,"ng-template",41),ht()),2&n){const e=D().$implicit;C(1),v("ngForOf",e)}}function _fe(n,t){1&n&&_t(0)}function vfe(n,t){if(1&n&&(dt(0),M(1,_fe,1,0,"ng-container",16),ht()),2&n){const e=D().$implicit,i=Dn(5),r=D(2);C(1),v("ngTemplateOutlet",i)("ngTemplateOutletContext",bi(2,Q5,e,r.selectedOption))}}function bfe(n,t){if(1&n){const e=We();I(0,"p-dropdownItem",43),ue("onClick",function(r){return de(e),he(D(4).onItemClick(r))}),A()}if(2&n){const e=t.$implicit,i=D().selectedOption,r=D(3);v("option",e)("selected",i==e)("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)}}function wfe(n,t){1&n&&M(0,bfe,1,5,"ng-template",41),2&n&&v("ngForOf",t.$implicit)}function Cfe(n,t){if(1&n&&(dt(0),Ne(1),ht()),2&n){const e=D(4);C(1),Yi(" ",e.emptyFilterMessageLabel," ")}}function Dfe(n,t){1&n&&_t(0,null,45)}function Tfe(n,t){if(1&n&&(I(0,"li",44),M(1,Cfe,2,1,"ng-container",28),M(2,Dfe,2,0,"ng-container",22),A()),2&n){const e=D().options,i=D(2);v("ngStyle",Mt(4,wg,e.itemSize+"px")),C(1),v("ngIf",!i.emptyFilterTemplate&&!i.emptyTemplate)("ngIfElse",i.emptyFilter),C(1),v("ngTemplateOutlet",i.emptyFilterTemplate||i.emptyTemplate)}}function Mfe(n,t){if(1&n&&(dt(0),Ne(1),ht()),2&n){const e=D(4);C(1),Yi(" ",e.emptyMessageLabel," ")}}function Sfe(n,t){1&n&&_t(0,null,46)}function Efe(n,t){if(1&n&&(I(0,"li",44),M(1,Mfe,2,1,"ng-container",28),M(2,Sfe,2,0,"ng-container",22),A()),2&n){const e=D().options,i=D(2);v("ngStyle",Mt(4,wg,e.itemSize+"px")),C(1),v("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),C(1),v("ngTemplateOutlet",i.emptyTemplate)}}function xfe(n,t){if(1&n&&(I(0,"ul",37,38),M(2,yfe,2,1,"ng-container",15),M(3,vfe,2,5,"ng-container",15),M(4,wfe,1,1,"ng-template",null,39,Bn),M(6,Tfe,3,6,"li",40),M(7,Efe,3,6,"li",40),A()),2&n){const e=t.options,i=D(2);oi(e.contentStyle),v("ngClass",e.contentStyleClass),Ot("id",i.listId),C(2),v("ngIf",i.group),C(1),v("ngIf",!i.group),C(3),v("ngIf",i.filterValue&&i.isEmpty()),C(1),v("ngIf",!i.filterValue&&i.isEmpty())}}function Ife(n,t){1&n&&_t(0)}function Ofe(n,t){if(1&n&&(I(0,"div",21),M(1,Xhe,1,0,"ng-container",22),M(2,ife,4,2,"div",23),I(3,"div",24),M(4,cfe,4,10,"p-scroller",25),M(5,hfe,2,6,"ng-container",15),M(6,xfe,8,8,"ng-template",null,26,Bn),A(),M(8,Ife,1,0,"ng-container",22),A()),2&n){const e=D();pn(e.panelStyleClass),v("ngClass","p-dropdown-panel p-component")("ngStyle",e.panelStyle),C(1),v("ngTemplateOutlet",e.headerTemplate),C(1),v("ngIf",e.filter),C(1),Mc("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),C(1),v("ngIf",e.virtualScroll),C(1),v("ngIf",!e.virtualScroll),C(3),v("ngTemplateOutlet",e.footerTemplate)}}const Afe=function(n,t,e,i){return{"p-dropdown p-component":!0,"p-disabled":n,"p-dropdown-open":t,"p-focus":e,"p-dropdown-clearable":i}},kfe={provide:Sr,useExisting:Ut(()=>ZS),multi:!0};let Nfe=(()=>{class n{constructor(){this.onClick=new re}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({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(e,i){1&e&&(I(0,"li",0),ue("click",function(o){return i.onOptionClick(o)}),M(1,Lhe,2,1,"span",1),M(2,Rhe,1,0,"ng-container",2),A()),2&e&&(v("ngStyle",Mt(8,wg,i.itemSize+"px"))("id",i.selected?"p-highlighted-option":"")("ngClass",bi(10,Fhe,i.selected,i.disabled)),Ot("aria-label",i.label)("aria-selected",i.selected),C(1),v("ngIf",!i.template),C(1),v("ngTemplateOutlet",i.template)("ngTemplateOutletContext",Mt(13,QS,i.option)))},dependencies:[fi,Kt,_o,sr,Bc],encapsulation:2}),n})(),ZS=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,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=NL()}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"loader":this.loaderTemplate=e.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list",this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}get options(){return this._options}set options(e){this._options=e,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.selectedOption=this.findOption(this.value,this.optionsToDisplay),!this.selectedOption&&Lt.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(e){this._filterValue=e,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(Vc.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Vc.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(e){return this.optionLabel?Lt.resolveFieldData(e,this.optionLabel):e&&void 0!==e.label?e.label:e}getOptionValue(e){return this.optionValue?Lt.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&void 0!==e.value?e.value:e}isOptionDisabled(e){return this.optionDisabled?Lt.resolveFieldData(e,this.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled}getOptionGroupLabel(e){return this.optionGroupLabel?Lt.resolveFieldData(e,this.optionGroupLabel):e&&void 0!==e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Lt.resolveFieldData(e,this.optionGroupChildren):e.items}onItemClick(e){const i=e.option;this.isOptionDisabled(i)||(this.selectItem(e.originalEvent,i),this.accessibleViewChild.nativeElement.focus({preventScroll:!0})),setTimeout(()=>{this.hide()},1)}selectItem(e,i){this.selectedOption!=i&&(this.selectedOption=i,this.value=this.getOptionValue(i),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:e,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 e=Z.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,"li.p-highlight");e&&Z.scrollInView(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}writeValue(e){this.filter&&this.resetFilter(),this.value=e,this.updateSelectedOption(e),this.updateEditableLabel(),this.cd.markForCheck()}resetFilter(){this._filterValue=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this.optionsToDisplay=this.options}updateSelectedOption(e){this.selectedOption=this.findOption(e,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(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onMouseclick(e){this.disabled||this.readonly||this.isInputClick(e)||(this.onClick.emit(e),this.accessibleViewChild.nativeElement.focus({preventScroll:!0}),this.overlayVisible?this.hide():this.show(),this.cd.detectChanges())}isInputClick(e){return Z.hasClass(e.target,"p-dropdown-clear-icon")||e.target.isSameNode(this.accessibleViewChild.nativeElement)||this.editableInputViewChild&&e.target.isSameNode(this.editableInputViewChild.nativeElement)}isEmpty(){return!this.optionsToDisplay||this.optionsToDisplay&&0===this.optionsToDisplay.length}onEditableInputFocus(e){this.focused=!0,this.hide(),this.onFocus.emit(e)}onEditableInputChange(e){this.value=e.target.value,this.updateSelectedOption(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value})}show(){this.overlayVisible=!0,this.cd.markForCheck()}onOverlayAnimationStart(e){if("visible"===e.toState){if(this.itemsWrapper=Z.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=Z.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(e)}"void"===e.toState&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e-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>=e;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}}return i}findNextEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e+1;r0&&this.selectItem(e,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(e,o),this.selectedOptionUpdated=!0)}e.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(e,this.getOptionGroupChildren(this.optionsToDisplay[r.groupIndex])[o]),this.selectedOptionUpdated=!0;else if(o<0){let s=this.optionsToDisplay[r.groupIndex-1];s&&(this.selectItem(e,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(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:i&&(this.overlayVisible?this.hide():this.show(),e.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),e.preventDefault();break;case 27:case 9:this.hide();break;default:i&&!e.metaKey&&17!==e.which&&this.search(e)}}search(e){this.searchTimeout&&clearTimeout(this.searchTimeout);const i=e.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(e,r),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(e){let i;return this.searchValue&&(i=this.searchOptionInRange(e,this.optionsToDisplay.length),i||(i=this.searchOptionInRange(0,e))),i}searchOptionInRange(e,i){for(let r=e;r{this.getSitesList(o.filter)}):console.warn("ContainerOptionsDirective is for use with PrimeNg Dropdown")}ngOnInit(){this.getSitesList(),this.dotEvents.forEach(t=>{this.dotEventsService.listen(t).pipe(mn(this.destroy$)).subscribe(()=>this.getSitesList())})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}setOptions(t){this.primeDropdown.options=[...t],this.cd.detectChanges()}getSitesList(t=""){this.dotSiteService.getSites(t,this.pageSize).pipe(Et(1)).subscribe(e=>this.setOptions(e))}}f0.\u0275fac=function(t){return new(t||f0)(O(ZS,10),O(bh),O(wh),O(Un))},f0.\u0275dir=we({type:f0,selectors:[["","dotSiteSelector",""]],inputs:{archive:"archive",live:"live",system:"system",pageSize:"pageSize"},standalone:!0,features:[Pt([Qi])]});class Cg{constructor(t){this.el=t}ngOnInit(){this.el.nativeElement.disabled||setTimeout(()=>{this.el.nativeElement.focus()},100)}}Cg.\u0275fac=function(t){return new(t||Cg)(O(Tt))},Cg.\u0275dir=we({type:Cg,selectors:[["","dotAutofocus",""]],standalone:!0});class p0{constructor(t,e){this.ngControl=t,this.el=e}onBlur(){this.ngControl.control.setValue(this.ngControl.value.trim())}ngAfterViewInit(){"input"!==this.el.nativeElement.tagName.toLowerCase()&&console.warn("DotTrimInputDirective is for use with Inputs")}}p0.\u0275fac=function(t){return new(t||p0)(O(Fs,10),O(Tt))},p0.\u0275dir=we({type:p0,selectors:[["","dotTrimInput",""]],hostBindings:function(t,e){1&t&&ue("blur",function(){return e.onBlur()})},standalone:!0});class m0{constructor(t,e,i,r){this.primeDropdown=t,this.dotContainersService=e,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(t=>{this.control.options=this.control.options||t}),this.control.onFilter.pipe(mn(this.destroy$),th(500),ai(t=>this.fetchContainerOptions(t.filter))).subscribe(t=>this.setOptions(t))}fetchContainerOptions(t=""){return this.dotContainersService.getFiltered(t,this.maxOptions,!0).pipe(fe(e=>{const i=e.map(r=>({label:r.title,value:r,inactive:!1})).sort((r,o)=>r.label.localeCompare(o.label));return this.getOptionsGroupedByHost(i)}),Fi(()=>this.handleContainersLoadError()))}handleContainersLoadError(){return this.control.disabled=!0,Le([])}setOptions(t){this.control.options=[...t],this.changeDetectorRef.detectChanges()}getOptionsGroupedByHost(t){const e=this.getContainerGroupedByHost(t);return Object.keys(e).map(i=>({label:i,items:e[i].items}))}getContainerGroupedByHost(t){return t.reduce((e,i)=>{const{hostname:r}=i.value.parentPermissionable;return e[r]||(e[r]={items:[]}),e[r].items.push(i),e},{})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}function Wa(n){return(Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(n)}function Gn(n,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Rfe(n){return Gn(1,arguments),n instanceof Date||"object"===Wa(n)&&"[object Date]"===Object.prototype.toString.call(n)}function ei(n){Gn(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||"object"===Wa(n)&&"[object Date]"===t?new Date(n.getTime()):"number"==typeof n||"[object Number]"===t?new Date(n):(("string"==typeof n||"[object String]"===t)&&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 Z5(n){if(Gn(1,arguments),!Rfe(n)&&"number"!=typeof n)return!1;var t=ei(n);return!isNaN(Number(t))}function J5(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e=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(){e=e.call(n)},n:function(){var c=e.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&null!=e.return&&e.return()}finally{if(s)throw a}}}}m0.\u0275fac=function(t){return new(t||m0)(O(ZS,10),O(vh),O(Zr),O(Un))},m0.\u0275dir=we({type:m0,selectors:[["p-dropdown","dotContainerOptions",""]],standalone:!0});const JS=x(61348).default;function no(n){if(null===n||!0===n||!1===n)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function zfe(n,t){Gn(2,arguments);var e=ei(n).getTime(),i=no(t);return new Date(e+i)}function ez(n,t){Gn(2,arguments);var e=no(t);return zfe(n,-e)}function XS(n,t){if(null==n)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}var tz=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},nz=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}};const eE={p:nz,P:function(t,e){var s,i=t.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return tz(t,e);switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"})}return s.replace("{{date}}",tz(r,e)).replace("{{time}}",nz(o,e))}};function qh(n){var t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),n.getTime()-t.getTime()}var Ufe=["D","DD"],Hfe=["YY","YYYY"];function iz(n){return-1!==Ufe.indexOf(n)}function rz(n){return-1!==Hfe.indexOf(n)}function g0(n,t,e){if("YYYY"===n)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; 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(t,"`) for formatting years to the input `").concat(e,"`; 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(t,"`) for formatting days of the month to the input `").concat(e,"`; 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(t,"`) for formatting days of the month to the input `").concat(e,"`; 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 tE(n,t){return(tE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i})(n,t)}function sn(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&tE(n,t)}function y0(n){return(y0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(n)}function Wfe(n,t){if(t&&("object"===Wa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Fe(n)}function an(n){var t=function $fe(){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=y0(n);if(t){var o=y0(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Wfe(this,r)}}function Qt(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function oz(n){var t=function Gfe(n,t){if("object"!==Wa(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var i=e.call(n,t||"default");if("object"!==Wa(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(n)}(n,"string");return"symbol"===Wa(t)?t:String(t)}function sz(n,t){for(var e=0;e0,i=e?t:1-t;if(i<=50)r=n||100;else{var o=i+50;r=n+100*Math.floor(o/100)-(n>=o%100?100:0)}return e?r:1-r}function dz(n){return n%400==0||n%4==0&&n%100!=0}var ope=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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=uz(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}}]),e}(gn),hz={};function Su(){return hz}function Eu(n,t){var e,i,r,o,s,a,l,c;Gn(1,arguments);var u=Su(),d=no(null!==(e=null!==(i=null!==(r=null!==(o=t?.weekStartsOn)&&void 0!==o?o:null==t||null===(s=t.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!==e?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=ei(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=Eu(p,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var y=Eu(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}var spe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s0}},{key:"set",value:function(r,o,s,a){var l=iE(r,a);if(s.isTwoDigitYear){var c=uz(s.year,l);return r.setUTCFullYear(c,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Eu(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),Eu(r,a)}}]),e}(gn);function Kh(n){Gn(1,arguments);var t=1,e=ei(n),i=e.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}}]),e}(gn),upe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),dpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),hpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn);function fpe(n,t){var e,i,r,o,s,a,l,c;Gn(1,arguments);var u=Su(),d=no(null!==(e=null!==(i=null!==(r=null!==(o=t?.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(s=t.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!==e?e:1),h=iE(n,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=Eu(f,t);return p}function fz(n,t){Gn(1,arguments);var e=ei(n),i=Eu(e,t).getTime()-fpe(e,t).getTime();return Math.round(i/6048e5)+1}var gpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=53}},{key:"set",value:function(r,o,s,a){return Eu(function mpe(n,t,e){Gn(2,arguments);var i=ei(n),r=no(t),o=fz(i,e)-r;return i.setUTCDate(i.getUTCDate()-7*o),i}(r,s,a),a)}}]),e}(gn);function pz(n){Gn(1,arguments);var t=ei(n),e=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(e+1,0,4),i.setUTCHours(0,0,0,0);var r=Kh(i),o=new Date(0);o.setUTCFullYear(e,0,4),o.setUTCHours(0,0,0,0);var s=Kh(o);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function ype(n){Gn(1,arguments);var t=pz(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var i=Kh(e);return i}function mz(n){Gn(1,arguments);var t=ei(n),e=Kh(t).getTime()-ype(t).getTime();return Math.round(e/6048e5)+1}var bpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=53}},{key:"set",value:function(r,o,s){return Kh(function vpe(n,t){Gn(2,arguments);var e=ei(n),i=no(t),r=mz(e)-i;return e.setUTCDate(e.getUTCDate()-7*r),e}(r,s))}}]),e}(gn),wpe=[31,28,31,30,31,30,31,31,30,31,30,31],Cpe=[31,29,31,30,31,30,31,31,30,31,30,31],Dpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s=1&&o<=Cpe[l]:o>=1&&o<=wpe[l]}},{key:"set",value:function(r,o,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),e}(gn),Tpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn);function rE(n,t,e){var i,r,o,s,a,l,c,u;Gn(2,arguments);var d=Su(),h=no(null!==(i=null!==(r=null!==(o=null!==(s=e?.weekStartsOn)&&void 0!==s?s:null==e||null===(a=e.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=ei(n),p=no(t),m=f.getUTCDay(),g=p%7,y=(g+7)%7,b=(y=0&&o<=6}},{key:"set",value:function(r,o,s,a){return(r=rE(r,s,a)).setUTCHours(0,0,0,0),r}}]),e}(gn),Spe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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=rE(r,s,a)).setUTCHours(0,0,0,0),r}}]),e}(gn),Epe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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=rE(r,s,a)).setUTCHours(0,0,0,0),r}}]),e}(gn),Ipe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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 xpe(n,t){Gn(2,arguments);var e=no(t);e%7==0&&(e-=7);var i=1,r=ei(n),o=r.getUTCDay(),s=e%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}}]),e}(gn),Ppe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),Lpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),Rpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),Fpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),jpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);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}}]),e}(gn),zpe=function(n){sn(e,n);var t=an(e);function e(){var i;Qt(this,e);for(var r=arguments.length,o=new Array(r),s=0;s0?i:1-i;return Sn("yy"===e?r%100:r,e.length)},ql_M=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Sn(i+1,2)},ql_d=function(t,e){return Sn(t.getUTCDate(),e.length)},ql_h=function(t,e){return Sn(t.getUTCHours()%12||12,e.length)},ql_H=function(t,e){return Sn(t.getUTCHours(),e.length)},ql_m=function(t,e){return Sn(t.getUTCMinutes(),e.length)},ql_s=function(t,e){return Sn(t.getUTCSeconds(),e.length)},ql_S=function(t,e){var i=e.length,r=t.getUTCMilliseconds();return Sn(Math.floor(r*Math.pow(10,i-3)),e.length)};var rme={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){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(t,e,i){if("yo"===e){var r=t.getUTCFullYear();return i.ordinalNumber(r>0?r:1-r,{unit:"year"})}return ql_y(t,e)},Y:function(t,e,i,r){var o=iE(t,r),s=o>0?o:1-o;return"YY"===e?Sn(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Sn(s,e.length)},R:function(t,e){return Sn(pz(t),e.length)},u:function(t,e){return Sn(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Sn(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(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Sn(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(t,e,i){var r=t.getUTCMonth();switch(e){case"M":case"MM":return ql_M(t,e);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(t,e,i){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Sn(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(t,e,i,r){var o=fz(t,r);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):Sn(o,e.length)},I:function(t,e,i){var r=mz(t);return"Io"===e?i.ordinalNumber(r,{unit:"week"}):Sn(r,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):ql_d(t,e)},D:function(t,e,i){var r=function nme(n){Gn(1,arguments);var t=ei(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=e-i;return Math.floor(r/864e5)+1}(t);return"Do"===e?i.ordinalNumber(r,{unit:"dayOfYear"}):Sn(r,e.length)},E:function(t,e,i){var r=t.getUTCDay();switch(e){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(t,e,i,r){var o=t.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Sn(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(t,e,i,r){var o=t.getUTCDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Sn(s,e.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(t,e,i){var r=t.getUTCDay(),o=0===r?7:r;switch(e){case"i":return String(o);case"ii":return Sn(o,e.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(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){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(t,e,i){var o,r=t.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){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(t,e,i){var o,r=t.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){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(t,e,i){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return ql_h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ql_H(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(r,{unit:"hour"}):Sn(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?i.ordinalNumber(r,{unit:"hour"}):Sn(r,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ql_m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):ql_s(t,e)},S:function(t,e){return ql_S(t,e)},X:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return _z(s);case"XXXX":case"XX":return xu(s);default:return xu(s,":")}},x:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return _z(s);case"xxxx":case"xx":return xu(s);default:return xu(s,":")}},O:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+yz(s,":");default:return"GMT"+xu(s,":")}},z:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+yz(s,":");default:return"GMT"+xu(s,":")}},t:function(t,e,i,r){return Sn(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,r){return Sn((r._originalDate||t).getTime(),e.length)}};function yz(n,t){var e=n>0?"-":"+",i=Math.abs(n),r=Math.floor(i/60),o=i%60;if(0===o)return e+String(r);var s=t||"";return e+String(r)+s+Sn(o,2)}function _z(n,t){return n%60==0?(n>0?"-":"+")+Sn(Math.abs(n)/60,2):xu(n,t)}function xu(n,t){var e=t||"",i=n>0?"-":"+",r=Math.abs(n);return i+Sn(Math.floor(r/60),2)+e+Sn(r%60,2)}const ome=rme;var sme=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ame=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lme=/^'([^]*?)'?$/,cme=/''/g,ume=/[a-zA-Z]/;function hme(n){var t=n.match(lme);return t?t[1].replace(cme,"'"):n}function fme(n,t){Gn(2,arguments);var e=ei(n),i=ei(t),r=e.getTime()-i.getTime();return r<0?-1:r>0?1:r}function pme(n){return XS({},n)}var vz=6e4,bz=43200,wz=525600,Cz=x(30298);class Zh{constructor(t){t.getSystemTimeZone().subscribe(e=>this._systemTimeZone=e)}get localeOptions(){return this._localeOptions}set localeOptions(t){this._localeOptions=t}setLang(t){var e=this;return Dl(function*(){let o,[i,r]=t.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))}}e.localeOptions={locale:o.default}})()}differenceInCalendarDays(t,e){return function eme(n,t){Gn(2,arguments);var e=gz(n),i=gz(t),r=e.getTime()-qh(e),o=i.getTime()-qh(i);return Math.round((r-o)/864e5)}(t,e)}isValid(t,e){return function gme(n,t){return Z5(function Zpe(n,t,e,i){var r,o,s,a,l,c,u,d,h,f,p,m,g,y,b,w,_,N;Gn(3,arguments);var S=String(n),J=String(t),K=Su(),ke=null!==(r=null!==(o=i?.locale)&&void 0!==o?o:K.locale)&&void 0!==r?r:JS;if(!ke.match)throw new RangeError("locale must contain match property");var He=no(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 vt=no(null!==(p=null!==(m=null!==(g=null!==(y=i?.weekStartsOn)&&void 0!==y?y:null==i||null===(b=i.locale)||void 0===b||null===(w=b.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(!(vt>=0&&vt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===J)return""===S?ei(e):new Date(NaN);var me,lt={firstWeekContainsDate:He,weekStartsOn:vt,locale:ke},st=[new Kfe],yn=J.match(Gpe).map(function(Gt){var ft=Gt[0];return ft in eE?(0,eE[ft])(Gt,ke.formatLong):Gt}).join("").match(Wpe),xt=[],le=X5(yn);try{var be=function(){var ft=me.value;!(null!=i&&i.useAdditionalWeekYearTokens)&&rz(ft)&&g0(ft,J,n),(null==i||!i.useAdditionalDayOfYearTokens)&&iz(ft)&&g0(ft,J,n);var zn=ft[0],Pr=$pe[zn];if(Pr){var Vu=Pr.incompatibleTokens;if(Array.isArray(Vu)){var nc=xt.find(function(Bu){return Vu.includes(Bu.token)||Bu.token===zn});if(nc)throw new RangeError("The format string mustn't contain `".concat(nc.fullToken,"` and `").concat(ft,"` at the same time"))}else if("*"===Pr.incompatibleTokens&&xt.length>0)throw new RangeError("The format string mustn't contain `".concat(ft,"` and any other token at the same time"));xt.push({token:zn,fullToken:ft});var ic=Pr.run(S,ft,ke.match,lt);if(!ic)return{v:new Date(NaN)};st.push(ic.setter),S=ic.rest}else{if(zn.match(Qpe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+zn+"`");if("''"===ft?ft="'":"'"===zn&&(ft=Jpe(ft)),0!==S.indexOf(ft))return{v:new Date(NaN)};S=S.slice(ft.length)}};for(le.s();!(me=le.n()).done;){var Ue=be();if("object"===Wa(Ue))return Ue.v}}catch(Gt){le.e(Gt)}finally{le.f()}if(S.length>0&&Kpe.test(S))return new Date(NaN);var kt=st.map(function(Gt){return Gt.priority}).sort(function(Gt,ft){return ft-Gt}).filter(function(Gt,ft,zn){return zn.indexOf(Gt)===ft}).map(function(Gt){return st.filter(function(ft){return ft.priority===Gt}).sort(function(ft,zn){return zn.subPriority-ft.subPriority})}).map(function(Gt){return Gt[0]}),cn=ei(e);if(isNaN(cn.getTime()))return new Date(NaN);var Xi,Vt=ez(cn,qh(cn)),xn={},Ft=X5(kt);try{for(Ft.s();!(Xi=Ft.n()).done;){var oo=Xi.value;if(!oo.validate(Vt,lt))return new Date(NaN);var In=oo.set(Vt,xn,lt);Array.isArray(In)?(Vt=In[0],XS(xn,In[1])):Vt=In}}catch(Gt){Ft.e(Gt)}finally{Ft.f()}return Vt}(n,t,new Date))}(t,e)}format(t,e){return function dme(n,t,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,y,b,w,_;Gn(2,arguments);var N=String(t),S=Su(),J=null!==(i=null!==(r=e?.locale)&&void 0!==r?r:S.locale)&&void 0!==i?i:JS,K=no(null!==(o=null!==(s=null!==(a=null!==(l=e?.firstWeekContainsDate)&&void 0!==l?l:null==e||null===(c=e.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:S.firstWeekContainsDate)&&void 0!==s?s:null===(d=S.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 ke=no(null!==(f=null!==(p=null!==(m=null!==(g=e?.weekStartsOn)&&void 0!==g?g:null==e||null===(y=e.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==m?m:S.weekStartsOn)&&void 0!==p?p:null===(w=S.locale)||void 0===w||null===(_=w.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==f?f:0);if(!(ke>=0&&ke<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!J.localize)throw new RangeError("locale must contain localize property");if(!J.formatLong)throw new RangeError("locale must contain formatLong property");var He=ei(n);if(!Z5(He))throw new RangeError("Invalid time value");var vt=qh(He),lt=ez(He,vt),st={firstWeekContainsDate:K,weekStartsOn:ke,locale:J,_originalDate:He},yn=N.match(ame).map(function(xt){var le=xt[0];return"p"===le||"P"===le?(0,eE[le])(xt,J.formatLong):xt}).join("").match(sme).map(function(xt){if("''"===xt)return"'";var le=xt[0];if("'"===le)return hme(xt);var me=ome[le];if(me)return!(null!=e&&e.useAdditionalWeekYearTokens)&&rz(xt)&&g0(xt,t,String(n)),!(null!=e&&e.useAdditionalDayOfYearTokens)&&iz(xt)&&g0(xt,t,String(n)),me(lt,xt,J.localize,st);if(le.match(ume))throw new RangeError("Format string contains an unescaped latin alphabet character `"+le+"`");return xt}).join("");return yn}(t,e,{...this.localeOptions})}formatTZ(t,e){const i=(0,Cz.utcToZonedTime)(t,this._systemTimeZone.id);return(0,Cz.format)(i,e,{timeZone:this._systemTimeZone.id})}getRelative(t,e=this.getUTC()){return function mme(n,t,e){var i,r,o;Gn(2,arguments);var s=Su(),a=null!==(i=null!==(r=e?.locale)&&void 0!==r?r:s.locale)&&void 0!==i?i:JS;if(!a.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var l=fme(n,t);if(isNaN(l))throw new RangeError("Invalid time value");var u,d,c=XS(pme(e),{addSuffix:Boolean(e?.addSuffix),comparison:l});l>0?(u=ei(t),d=ei(n)):(u=ei(n),d=ei(t));var f,h=String(null!==(o=e?.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/vz,g=qh(d)-qh(u),y=(p-g)/vz,b=e?.unit;if("second"===(w=b?String(b):m<1?"second":m<60?"minute":m<1440?"hour":yi?this.dotFormatDateService.format(s,e):this.dotFormatDateService.getRelative(s)}}b0.\u0275fac=function(t){return new(t||b0)(O(Zh,16))},b0.\u0275pipe=qn({name:"dotRelativeDate",type:b0,pure:!0,standalone:!0});class w0{transform(t,e){return e.forEach((i,r)=>{t=t.replace(`{${r}}`,i)}),t}}w0.\u0275fac=function(t){return new(t||w0)},w0.\u0275pipe=qn({name:"dotStringFormat",type:w0,pure:!0,standalone:!0});const _me={selectedPromptType:null,showDialog:!1,status:$n.INIT,contentlets:[],prompt:null,editorContent:null,error:null};class Ga extends qS{constructor(t){super(_me),this.dotAiService=t,this.isOpenDialog$=this.select(this.state$,({showDialog:e})=>e),this.isLoading$=this.select(this.state$,({status:e})=>e===$n.LOADING),this.getContentlets$=this.select(this.state$,({contentlets:e})=>e),this.setPromptType=this.updater((e,i)=>({...e,selectedPromptType:i})),this.showDialog=this.updater((e,i)=>({...e,showDialog:!0,selectedPromptType:"input",editorContent:i})),this.hideDialog=this.updater(e=>({...e,showDialog:!1,selectedPromptType:null})),this.vm$=this.select(this.state$,({selectedPromptType:e,showDialog:i,status:r})=>({selectedPromptType:e,showDialog:i,status:r})),this.generateImage=this.effect(e=>e.pipe(Gh(this.state$),ai(([i,{selectedPromptType:r,editorContent:o}])=>{const s=i?.trim()??"",a="auto"===r&&o?`${s} to illustrate the following content: ${o}`:s;return this.patchState({status:$n.LOADING,prompt:a}),this.dotAiService.generateAndPublishImage(a).pipe(function jue(n,t,e){return i=>i.pipe(hn({next:n,complete:e}),Fi(r=>(t(r),Rs)))}(l=>{this.patchState({status:$n.IDLE,contentlets:l})},()=>(this.patchState({status:$n.IDLE}),Le(null))))}))),this.reGenerateContent=this.effect(e=>e.pipe(Gh(this.state$),hn(([i,{prompt:r}])=>r?this.generateImage(Le(r)):Rs)))}}Ga.\u0275fac=function(t){return new(t||Ga)(F($a))},Ga.\u0275prov=H({token:Ga,factory:Ga.\u0275fac,providedIn:"root"});let vme=(()=>{class n{constructor(e,i,r,o){this.el=e,this.ngModel=i,this.control=r,this.cd=o,this.onResize=new re}ngOnInit(){this.ngModel&&(this.ngModelSubscription=this.ngModel.valueChanges.subscribe(()=>{this.updateState()})),this.control&&(this.ngControlSubscription=this.control.valueChanges.subscribe(()=>{this.updateState()}))}ngAfterViewInit(){this.autoResize&&this.resize(),this.updateFilledState(),this.cd.detectChanges()}onInput(e){this.updateState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length}onFocus(e){this.autoResize&&this.resize(e)}onBlur(e){this.autoResize&&this.resize(e)}resize(e){this.el.nativeElement.style.height="auto",this.el.nativeElement.style.height=this.el.nativeElement.scrollHeight+"px",parseFloat(this.el.nativeElement.style.height)>=parseFloat(this.el.nativeElement.style.maxHeight)?(this.el.nativeElement.style.overflowY="scroll",this.el.nativeElement.style.height=this.el.nativeElement.style.maxHeight):this.el.nativeElement.style.overflow="hidden",this.onResize.emit(e||{})}updateState(){this.updateFilledState(),this.autoResize&&this.resize()}ngOnDestroy(){this.ngModelSubscription&&this.ngModelSubscription.unsubscribe(),this.ngControlSubscription&&this.ngControlSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(bp,8),O(Fs,8),O(Un))},n.\u0275dir=we({type:n,selectors:[["","pInputTextarea",""]],hostAttrs:[1,"p-inputtextarea","p-inputtext","p-component","p-element"],hostVars:4,hostBindings:function(e,i){1&e&&ue("input",function(o){return i.onInput(o)})("focus",function(o){return i.onFocus(o)})("blur",function(o){return i.onBlur(o)}),2&e&&yo("p-filled",i.filled)("p-inputtextarea-resizable",i.autoResize)},inputs:{autoResize:"autoResize"},outputs:{onResize:"onResize"}}),n})(),bme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();function wme(n,t){1&n&&(dt(0),I(1,"div",4),Vw(),I(2,"svg",5),_e(3,"path",6)(4,"path",7)(5,"path",8)(6,"path",9),A()(),Bw(),I(7,"div",10)(8,"p",11),_e(9,"span",12),Qn(10,"dm"),_e(11,"i",13),Qn(12,"dm"),A()(),ht()),2&n&&(C(9),ls("innerHTML",Zn(10,2,"block-editor.extension.ai-image.input-text.title"),vc),C(2),ls("pTooltip",Zn(12,4,"block-editor.extension.ai-image.input-text.tooltip")))}function Cme(n,t){if(1&n){const e=We();I(0,"form",14)(1,"div",15),_e(2,"textarea",16),A(),_e(3,"dot-field-validation-message",17),Qn(4,"dm"),I(5,"button",18),ue("click",function(){return de(e),he(D().generateImage())}),Qn(6,"dm"),A()()}if(2&n){const e=D();v("formGroup",e.form),C(2),v("placeholder",e.placeholder),C(1),n_("message"," ",Zn(4,6,"block-editor.common.input-prompt-required-error"),""),v("field",e.promptControl),C(2),ls("label",Zn(6,8,"block-editor.common.generate")),v("loading",e.isLoading)}}function Dme(n,t){1&n&&(I(0,"div",4),Vw(),I(1,"svg",19),_e(2,"path",20)(3,"path",21)(4,"path",22),A()(),Bw(),I(5,"div",10)(6,"p",11),_e(7,"span",12),Qn(8,"dm"),_e(9,"i",13),Qn(10,"dm"),A()()),2&n&&(C(7),ls("innerHTML",Zn(8,2,"block-editor.extension.ai-image.auto-text.title"),vc),C(2),ls("pTooltip",Zn(10,4,"block-editor.extension.ai-image.auto-text.tooltip")))}class Dg{constructor(){this.isSelected=!1,this.promptChanged=new re,this.form=it(rv).group({prompt:["",$d.required]})}set selected(t){this.isSelected=t,this.resetForm()}get promptControl(){return this.form.get("prompt")}generateImage(){this.form.valid&&(this.promptChanged.emit(this.promptControl.value),this.disableForm())}ngOnChanges(t){const{type:e}=t;e&&"auto"===e.currentValue&&(this.promptControl.clearValidators(),this.form.updateValueAndValidity())}resetForm(){this.form.enable(),this.form.reset()}disableForm(){this.form.disable()}}Dg.\u0275fac=function(t){return new(t||Dg)},Dg.\u0275cmp=Me({type:Dg,selectors:[["dot-ai-image-prompt-input"]],inputs:{placeholder:"placeholder",isLoading:"isLoading",type:"type",selected:"selected"},outputs:{promptChanged:"promptChanged"},standalone:!0,features:[$i,Ns],decls:5,vars:5,consts:[[1,"prompt-input__wrapper","flex","flex-column","align-items-center","h-full","justify-content-center","flex-wrap"],[4,"ngIf","ngIfElse"],["class","w-full text-center",3,"formGroup",4,"ngIf"],["autoHeaderTpl",""],[1,"prompt-input__icon"],["fill","none","height","40","viewBox","0 0 40 40","width","40","xmlns","http://www.w3.org/2000/svg"],["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","fill-rule","evenodd"],["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"],[1,"flex","gap-1"],[1,"text-center"],[3,"innerHTML"],["tooltipZIndex","999999",1,"pi","pi-info-circle",3,"pTooltip"],[1,"w-full","text-center",3,"formGroup"],[1,"field"],["autoResize","false","dotAutofocus","","formControlName","prompt","pInputTextarea","","rows","12",1,"w-full","h-full",3,"placeholder"],[3,"field","message"],["icon","pi pi-send","pButton","","type","submit",1,"p-button-outlined",3,"loading","label","click"],["fill","none","height","42","viewBox","0 0 34 42","width","34","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"]],template:function(t,e){if(1&t&&(I(0,"div",0),M(1,wme,13,6,"ng-container",1),M(2,Cme,7,10,"form",2),M(3,Dme,11,6,"ng-template",null,3,Bn),A()),2&t){const i=Dn(4);yo("selected",e.isSelected),C(1),v("ngIf","input"===e.type)("ngIfElse",i),C(1),v("ngIf",e.isSelected)}},dependencies:[Bo,Vo,Kt,Zd,Qd,hl,Ac,Wd,Aa,kc,Du,yg,bme,vme,ea,Cg,Yde,vg],styles:["[_nghost-%COMP%] form[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%] form[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{margin-bottom:2rem}[_nghost-%COMP%] form[_ngcontent-%COMP%] dot-field-validation-message[_ngcontent-%COMP%]{position:absolute;left:0;bottom:50px}[_nghost-%COMP%] .prompt-input__wrapper[_ngcontent-%COMP%]{border-radius:.5rem;border:2px solid #ebecef;cursor:pointer;padding:1.5rem;gap:1.5rem;transition:all .15s ease;min-height:540px}[_nghost-%COMP%] .prompt-input__wrapper[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{display:inline-flex;color:var(--color-palette-primary-500)}[_nghost-%COMP%] .prompt-input__wrapper[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .prompt-input__wrapper[_ngcontent-%COMP%]:hover{border-color:var(--color-palette-secondary-200)}[_nghost-%COMP%] .prompt-input__wrapper.selected[_ngcontent-%COMP%]{border-color:var(--color-palette-secondary-300);box-shadow:0 0 4px #14151a0a,0 8px 16px #14151a14;cursor:default}"],changeDetection:0});const Tme=function(){return{width:"800px"}};function Mme(n,t){if(1&n){const e=We();dt(0),I(1,"p-dialog",1),ue("visibleChange",function(r){return he(de(e).ngIf.showDialog=r)})("onHide",function(){return de(e),he(D().hideDialog())}),Qn(2,"dm"),I(3,"div",2)(4,"dot-ai-image-prompt-input",3),ue("click",function(){const o=de(e).ngIf;return he(D().selectType("input",o.selectedPromptType))})("promptChanged",function(r){return de(e),he(D().generateImage(r))}),Qn(5,"dm"),A(),I(6,"dot-ai-image-prompt-input",4),ue("click",function(){const o=de(e).ngIf;return he(D().selectType("auto",o.selectedPromptType))})("promptChanged",function(r){return de(e),he(D().generateImage(r))}),Qn(7,"dm"),A()()(),ht()}if(2&n){const e=t.ngIf,i=D();C(1),oi(Hr(19,Tme)),ls("header",Zn(2,13,"block-editor.extension.ai-image.dialog-title")),v("visible",e.showDialog)("dismissableMask",!0)("draggable",!1)("resizable",!1),C(3),ls("placeholder",Zn(5,15,"block-editor.extension.ai-image.input-text.placeholder")),v("isLoading",e.status===i.ComponentStatus.LOADING)("selected","input"===e.selectedPromptType),C(2),ls("placeholder",Zn(7,17,"block-editor.extension.ai-image.auto-text.placeholder")),v("isLoading",e.status===i.ComponentStatus.LOADING)("selected","auto"===e.selectedPromptType)}}class Jh{constructor(){this.vm$=it(Ga).vm$,this.ComponentStatus=$n,this.store=it(Ga)}hideDialog(){this.store.hideDialog()}selectType(t,e){e!=t&&this.store.setPromptType(t)}generateImage(t){this.store.generateImage(t)}}Jh.\u0275fac=function(t){return new(t||Jh)},Jh.\u0275cmp=Me({type:Jh,selectors:[["dot-ai-image-prompt"]],standalone:!0,features:[Ns],decls:2,vars:3,consts:[[4,"ngIf"],["appendTo","body",3,"visible","dismissableMask","draggable","resizable","header","visibleChange","onHide"],[1,"dialog-prompts__wrapper","grid"],["type","input",1,"col",3,"isLoading","selected","placeholder","click","promptChanged"],["type","auto",1,"col",3,"isLoading","selected","placeholder","click","promptChanged"]],template:function(t,e){1&t&&(M(0,Mme,8,20,"ng-container",0),Qn(1,"async")),2&t&&v("ngIf",Zn(1,1,e.vm$))},dependencies:[Bo,Du,Zd,Ide,Kt,Tde,Dde,Dg,k_,ea],styles:["dialog-prompts__wrapper[_ngcontent-%COMP%]{gap:2rem}"],changeDetection:0});class Sme{constructor(t){this.destroy$=new ae;const{editor:e,element:i,view:r,pluginKey:o,component:s}=t;this.editor=e,this.element=i,this.view=r,this.element.remove(),this.pluginKey=o,this.component=s,this.store=this.component.injector.get(Ga),this.store.isOpenDialog$.pipe(o0(1),Tn(a=>!1===a),mn(this.destroy$)).subscribe(()=>{this.editor.commands.closeImagePrompt()}),this.store.isLoading$.pipe(Tn(a=>!0===a),mn(this.destroy$)).subscribe(()=>{this.store.hideDialog(),this.editor.chain().insertLoaderNode().closeImagePrompt().run()}),this.store.getContentlets$.pipe(Tn(a=>a.length>0),mn(this.destroy$)).subscribe(a=>{const l=Object.values(a[0])[0];this.editor.chain().deleteSelection().insertImage(l).openAIContentActions(oE).run()})}update(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{open:!1};i.open&&!1===r.open&&this.store.showDialog(this.editor.getText())}destroy(){this.destroy$.next(!0),this.destroy$.complete()}}const Eme=n=>new Wt({key:n.pluginKey,view:t=>new Sme({view:t,...n}),state:{init:()=>({open:!1}),apply(t,e,i){const{open:r}=t.getMeta(Tg)||{},o=Tg.getState(i);return"boolean"==typeof r?{open:r}:o||e}}}),oE="dotAIImageContent",Tg=new on("aiImagePrompt-form"),Dz="aiImagePrompt",xme=n=>Mn.create({name:Dz,addOptions:()=>({element:null,pluginKey:Tg}),addCommands:()=>({openImagePrompt:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(Tg,{open:!0}),!0)).freezeScroll(!0).run(),closeImagePrompt:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(Tg,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const t=n.createComponent(Jh);return t.changeDetectorRef.detectChanges(),[Eme({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,component:t})]}}),Ime=[H5,Dz];function Tz({editor:n,range:t,props:e,customBlocks:i}){const{type:r,payload:o}=e,s={dotContent:()=>{n.chain().addContentletBlock({range:t,payload:o}).addNextLine().run()},heading:()=>{n.chain().addHeading({range:t,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(Et(1),Tn(a=>!!a)).subscribe(a=>{requestAnimationFrame(()=>{n.chain().insertTable({rows:a.rows,cols:a.columns,withHeaderRow:!!a.header}).focus().run()})})},orderedList:()=>{n.chain().deleteRange(t).toggleOrderedList().focus().run()},bulletList:()=>{n.chain().deleteRange(t).toggleBulletList().focus().run()},blockquote:()=>{n.chain().deleteRange(t).setBlockquote().focus().run()},codeBlock:()=>{n.chain().deleteRange(t).setCodeBlock().focus().run()},horizontalRule:()=>{n.chain().deleteRange(t).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()};Mz(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(t).focus().run()}function Mz(n){return n.extensions.map(t=>function Ame(n){return n.map(t=>({icon:t.icon,label:t.menuLabel,commandKey:t.command,id:`${t.command}-id`}))}(t.actions||[])).flat()}const kme=(n,t,e)=>{let i,r;const o=new on("suggestionPlugin"),s=new ae;let a=!0;function l({editor:y,range:b,clientRect:w}){a&&(function u(y,b){const{allowedBlocks:w,allowedContentTypes:_,lang:N,contentletIdentifier:S}=y.storage.dotConfig,K=function d({allowedBlocks:y=[],editor:b,range:w}){let _=[...Pv];e?.shouldShowAIExtensions||(_=Pv.filter(J=>!Ime.includes(J.id)));const S=[...y.length?_.filter(J=>y.includes(J.id)):_,...Mz(t)];return S.forEach(J=>J.command=()=>function h({item:y,editor:b,range:w}){const{id:_,attributes:N}=y,S={type:{name:_.includes("heading")?"heading":_,...N}};ER({type:pr.BLOCK,editor:b,range:w,suggestionKey:o,ItemsType:pr}),f({editor:b,range:w,props:S})}({item:J,editor:b,range:w})),S}({allowedBlocks:w.length>1?w:[],editor:y,range:b});r=n.createComponent(Gl),r.instance.items=K,r.instance.currentLanguage=N,r.instance.allowedContentTypes=_,r.instance.contentletIdentifier=S,r.instance.onSelectContentlet=ke=>{ER({type:pr.CONTENT,editor:y,range:b,suggestionKey:o,ItemsType:pr}),f({editor:y,range:b,props:ke})},r.changeDetectorRef.detectChanges(),(w.length<=1||w.includes("dotContent"))&&r.instance.addContentletItem()}(y,b),i=function Ome({element:n,content:t,rect:e,onHide:i}){return gs(n,{content:t,placement:"bottom",popperOptions:{modifiers:ree},getReferenceClientRect:e,showOnCreate:!0,interactive:!0,offset:[120,10],trigger:"manual",maxWidth:"none",onHide:i})}({element:y.options.element.parentElement,content:r.location.nativeElement,rect:w,onHide:()=>{y.commands.focus();const _=p({editor:y,range:b});"/"===y.state.doc.textBetween(_.from,_.to," ")&&y.commands.deleteRange(_);const S=y.state.tr.setMeta($S,{open:!1});y.view.dispatch(S),y.commands.freezeScroll(!1)}}))}function c({editor:y}){y.commands.freezeScroll(!0);const b=wu(y.view.state.selection.$from,[gi.TABLE_CELL])?.type.name===gi.TABLE_CELL,w=wu(y.view.state.selection.$from,[gi.CODE_BLOCK])?.type.name===gi.CODE_BLOCK;a=!b&&!w}function f({editor:y,range:b,props:w}){Tz({editor:y,range:p({editor:y,range:b}),props:w,customBlocks:t})}function p({editor:y,range:b}){const w=o.getState(y.view.state).query?.length||0;return b.to=b.to+w,b}function m({event:y}){const{key:b}=y;return"Escape"===b?(y.stopImmediatePropagation(),i.hide(),!0):"Enter"===b?(r.instance.execCommand(),!0):("ArrowDown"===b||"ArrowUp"===b)&&(r.instance.updateSelection(y),!0)}function g({editor:y}){i?.destroy(),y.commands.freezeScroll(!1),r?.destroy(),r=null,s.next(!0),s.complete()}return Mn.create({name:"actionsMenu",addOptions:()=>({pluginKey:"actionsMenu",element:null,suggestion:{char:"/",pluginKey:o,allowSpaces:!0,startOfLine:!0,render:()=>({onBeforeStart:c,onStart:l,onKeyDown:m,onExit:g}),items:({query:y})=>(r&&r.instance.filterItems(y),[])}}),addCommands:()=>({addHeading:({range:y,type:b})=>({chain:w})=>w().focus().deleteRange(y).toggleHeading({level:b.level}).focus().run(),addContentletBlock:({range:y,payload:b})=>({chain:w})=>w().deleteRange(y).command(_=>{const N=_.editor.schema.nodes.dotContent.create({data:b});return _.tr.replaceSelectionWith(N),!0}).run(),addNextLine:()=>({chain:y})=>y().command(b=>{const{selection:w}=b.state;return b.commands.insertContentAt(w.head,{type:"paragraph"}),!0}).focus().run()}),addProseMirrorPlugins(){return[aue({command:Tz,editor:this.editor,render:()=>({onStart:l,onKeyDown:m,onExit:g})}),Fce({editor:this.editor,...this.options.suggestion})]}})};function Nme(n,t){if(1&n){const e=We();I(0,"div",5)(1,"dot-asset-search",6),ue("addAsset",function(r){return de(e),he(D().onSelectAsset(r))}),A()()}if(2&n){const e=D();C(1),v("type",e.type)("languageId",e.languageId)}}function Pme(n,t){if(1&n){const e=We();I(0,"div",5)(1,"dot-upload-asset",7),ue("uploadedFile",function(r){return de(e),he(D().onSelectAsset(r))})("preventClose",function(r){return de(e),he(D().onPreventClose(r))})("hide",function(r){return de(e),he(D().onHide(r))}),A()()}if(2&n){const e=D();C(1),v("type",e.type)}}function Lme(n,t){if(1&n){const e=We();I(0,"div",5)(1,"dot-external-asset",8),ue("addAsset",function(r){return de(e),he(D().onSelectAsset(r))}),A()()}if(2&n){const e=D();C(1),v("type",e.type)}}class Xh{constructor(){this.languageId=pg,this.disableTabs=!1}onPreventClose(t){this.preventClose(t),this.disableTabs=t}}Xh.\u0275fac=function(t){return new(t||Xh)},Xh.\u0275cmp=Me({type:Xh,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(t,e){1&t&&(I(0,"div",0)(1,"p-tabView")(2,"p-tabPanel",1),M(3,Nme,2,2,"ng-template",2),A(),I(4,"p-tabPanel",3),M(5,Pme,2,1,"ng-template",2),A(),I(6,"p-tabPanel",4),M(7,Lme,2,1,"ng-template",2),A()()()),2&t&&(C(2),v("cache",!1)("disabled",e.disableTabs),C(2),v("cache",!1)("header","Upload "+e.type)("disabled",e.disableTabs),C(2),v("cache",!1)("header",e.type+" URL")("disabled",e.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 Rme{constructor({editor:t,view:e,pluginKey:i,render:r}){this.editor=t,this.view=e,this.pluginKey=i,this.render=r,this.editor.on("focus",()=>this.render().onHide(this.editor))}update(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{open:!1},{state:o}=t,{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 yu(t,a,l)}}):this.render().onHide(this.editor))}destroy(){this.render().onDestroy()}}const Fme=n=>new Wt({key:n.pluginKey,view:t=>new Rme({view:t,...n}),state:{init:()=>({open:!1,type:null}),apply(t,e,i){const{open:r,type:o}=t.getMeta(n.pluginKey)||{},s=n.pluginKey?.getState(i);return"boolean"==typeof r?{open:r,type:o}:s||e}}}),C0=new on("bubble-image-form"),jme={interactive:!0,duration:0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},zme=n=>{let t,e,i,r=!1;function o({editor:d,type:h,getPosition:f}){(function l(d){const{element:h}=d.options;t||!!!h.parentElement||(t=gs(h.parentElement,jme))})(d),function c(d,h){e=n.createComponent(Xh),e.instance.languageId=d.storage.dotConfig.lang,e.instance.type=h,e.instance.onSelectAsset=f=>{u(d,!1),d.chain().insertAsset({type:h,payload:f}).addNextLine().closeAssetForm().run()},e.instance.preventClose=f=>u(d,f),e.instance.onHide=()=>{u(d,!1),s(d)},i=e.location.nativeElement,e.changeDetectorRef.detectChanges()}(d,h),t.setProps({content:i,getReferenceClientRect:f,onClickOutside:()=>s(d)}),t.show()}function s(d){r||(d.commands.closeAssetForm(),t?.hide(),e?.destroy())}function a(){t?.destroy(),e?.destroy()}function u(d,h){r=h,d.setOptions({editable:!h})}return HS.extend({name:"bubbleAssetForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:C0}),addCommands:()=>({openAssetForm:({type:d})=>({chain:h})=>h().command(({tr:f})=>(f.setMeta(C0,{open:!0,type:d}),!0)).freezeScroll(!0).run(),closeAssetForm:()=>({chain:d})=>d().command(({tr:h})=>(h.setMeta(C0,{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[Fme({pluginKey:C0,editor:this.editor,render:()=>({onStart:o,onHide:s,onDestroy:a})})]}})};function Vme(n,t){if(1&n){const e=We();I(0,"div",3)(1,"div",4),_e(2,"video",5),A(),I(3,"div",6)(4,"div"),_e(5,"dot-spinner",7),Ne(6," Uploading video, wait until finished. "),A(),I(7,"button",8),ue("click",function(){return de(e),he(D().cancel.emit(!0))}),A()()()}}function Bme(n,t){1&n&&(I(0,"span",9),Ne(1,"Uploading..."),A())}class ef{constructor(){this.cancel=new re}}ef.\u0275fac=function(t){return new(t||ef)},ef.\u0275cmp=Me({type:ef,selectors:[["dot-upload-placeholder"]],inputs:{type:"type"},outputs:{cancel:"cancel"},standalone:!0,features:[Ns],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(t,e){1&t&&(dt(0,0),M(1,Vme,8,0,"div",1),M(2,Bme,2,0,"span",2),ht()),2&t&&(v("ngSwitch",e.type),C(1),v("ngSwitchCase","video"))},dependencies:[wn,Ud,O_,A_,Bo,Vo,Tu,Yh],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 sE=new Wt({state:{init:()=>Fn.empty,apply(n,t){t=t.map(n.mapping,n.doc);const e=n.getMeta(this);if(e&&e.add){const r=ki.widget(e.add.pos,e.add.element,{key:e.add.id});t=t.add(n.doc,[r])}else e&&e.remove&&(t=t.remove(t.find(null,null,i=>i.key==e.remove.id)));return t}},props:{decorations(n){return this.getState(n)}}});class Ume{constructor(t,e,i){this.applicationRef=e.get(Ec),this.componentRef=function R$(n,t){const e=vn(n),i=t.elementInjector||Wy();return new Kf(e).create(i,t.projectableNodes,t.hostElement,t.environmentInjector)}(t,{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(Tt)}get dom(){return this.elementRef.nativeElement}updateProps(t){Object.entries(t).forEach(([e,i])=>{this.instance[e]=i})}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy(),this.applicationRef.detachView(this.componentRef.hostView)}}class Mg{}Mg.\u0275fac=function(t){return new(t||Mg)},Mg.\u0275cmp=Me({type:Mg,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(t,e){},encapsulation:2});class Hme extends kce{mount(){this.renderer=new Ume(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 t=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&t&&!t.contains(this.contentDOMElement)&&t.appendChild(this.contentDOMElement)}update(t,e){return this.options.update?this.options.update(t,e):t.type===this.node.type&&(t===this.node&&this.decorations===e||(this.node=t,this.decorations=e,this.renderer.updateProps({node:t,decorations:e}),this.maybeMoveContentDOM()),!0)}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy()}}function Wme(n,t){1&n&&_t(0)}function Gme(n,t){if(1&n&&(I(0,"div",8),Ri(1,1),M(2,Wme,1,0,"ng-container",6),A()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.headerTemplate)}}function Yme(n,t){1&n&&_t(0)}function qme(n,t){if(1&n&&(I(0,"div",9),Ne(1),M(2,Yme,1,0,"ng-container",6),A()),2&n){const e=D();C(1),Yi(" ",e.header," "),C(1),v("ngTemplateOutlet",e.titleTemplate)}}function Kme(n,t){1&n&&_t(0)}function Qme(n,t){if(1&n&&(I(0,"div",10),Ne(1),M(2,Kme,1,0,"ng-container",6),A()),2&n){const e=D();C(1),Yi(" ",e.subheader," "),C(1),v("ngTemplateOutlet",e.subtitleTemplate)}}function Zme(n,t){1&n&&_t(0)}function Jme(n,t){1&n&&_t(0)}function Xme(n,t){if(1&n&&(I(0,"div",11),Ri(1,2),M(2,Jme,1,0,"ng-container",6),A()),2&n){const e=D();C(2),v("ngTemplateOutlet",e.footerTemplate)}}const ege=["*",[["p-header"]],[["p-footer"]]],tge=["*","p-header","p-footer"];let aE=(()=>{class n{constructor(e){this.el=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"title":this.titleTemplate=e.template;break;case"subtitle":this.subtitleTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275cmp=Me({type:n,selectors:[["p-card"]],contentQueries:function(e,i,r){if(1&e&&(Jn(r,hM,5),Jn(r,fM,5),Jn(r,qi,4)),2&e){let o;Ke(o=Qe())&&(i.headerFacet=o.first),Ke(o=Qe())&&(i.footerFacet=o.first),Ke(o=Qe())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:tge,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(e,i){1&e&&(go(ege),I(0,"div",0),M(1,Gme,3,1,"div",1),I(2,"div",2),M(3,qme,3,2,"div",3),M(4,Qme,3,2,"div",4),I(5,"div",5),Ri(6),M(7,Zme,1,0,"ng-container",6),A(),M(8,Xme,3,1,"div",7),A()()),2&e&&(pn(i.styleClass),v("ngClass","p-card p-component")("ngStyle",i.style),C(1),v("ngIf",i.headerFacet||i.headerTemplate),C(2),v("ngIf",i.header||i.titleTemplate),C(1),v("ngIf",i.subheader||i.subtitleTemplate),C(3),v("ngTemplateOutlet",i.contentTemplate),C(1),v("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[fi,Kt,_o,sr],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),Sz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,zo]}),n})();function nge(n,t){if(1&n&&_e(0,"dot-contentlet-thumbnail",4),2&n){const e=D();v("width",94)("height",94)("iconSize","72px")("contentlet",e.data)}}function ige(n,t){if(1&n&&(I(0,"h3",5),Ne(1),A()),2&n){const e=D();C(1),At(e.data.title)}}function rge(n,t){if(1&n&&(I(0,"span"),Ne(1),A()),2&n){const e=D();C(1),At(e.data.contentType)}}function oge(n,t){if(1&n&&(I(0,"div",6),_e(1,"dot-state-icon",7),Qn(2,"contentletState"),I(3,"dot-badge",8),Ne(4),Qn(5,"lowercase"),A()()),2&n){const e=D();C(1),v("state",Zn(2,3,e.data)),C(2),v("bordered",!0),C(1),At(Zn(5,5,e.data.language))}}class tf extends Mg{ngOnInit(){this.data=this.node.attrs.data}}tf.\u0275fac=function(){let n;return function(e){return(n||(n=Li(tf)))(e||tf)}}(),tf.\u0275cmp=Me({type:tf,selectors:[["dot-contentlet-block"]],features:[bn],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(t,e){1&t&&(I(0,"p-card"),M(1,nge,1,4,"ng-template",0),M(2,ige,2,1,"h3",1),M(3,rge,2,1,"span",2),M(4,oge,6,7,"ng-template",3),A()),2&t&&(C(2),v("pTemplate","title"),C(1),v("pTemplate","subtitle"))},dependencies:[aE,qi,XD,dg],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 sge=n=>jn.create({name:"dotContent",group:"block",inline:!1,draggable:!0,addAttributes:()=>({data:{default:null,parseHTML:t=>({data:t.getAttribute("data")}),renderHTML:t=>({data:t.data})}}),parseHTML:()=>[{tag:"dotcms-contentlet-block"}],renderHTML({HTMLAttributes:t}){let e=["span",{}];return t.data.hasTitleImage&&(e=["img",{src:t.data.image}]),["div",["h3",{class:t.data.title},t.data.title],["div",t.data.identifier],e,["div",{},t.data.language]]},addNodeView:()=>((n,t)=>e=>new Hme(n,e,t))(tf,{injector:n})}),age=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,lge=jn.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",tn(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:t})=>t.insertContent({type:this.name,attrs:n})}},addInputRules(){return[O5({find:age,type:this.type,getAttributes:n=>{const[,,t,e,i]=n;return{src:e,alt:t,title:i}}})]}}),Ez="language_id",cge=(n,t)=>{const{href:e=null,target:i}=t;return["a",{href:e,target:i},xz(n,t)]},xz=(n,t)=>["img",tn(n,t)],Iz=(n,t)=>n.includes(Ez)?n:`${n}?${Ez}=${t}`,uge=n=>{if("string"==typeof n)return{src:n,data:"null"};const{fileAsset:t,asset:e,title:i,languageId:r}=n;return{data:n,src:Iz(t||e,r),title:i,alt:i}},io=lge.extend({name:"dotImage",addOptions:()=>({inline:!1,allowBase64:!0,HTMLAttributes:{}}),addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:Iz(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:t})=>t.updateAttributes(this.name,n),unsetImageLink:()=>({commands:n})=>n.updateAttributes(this.name,{href:""}),insertImage:(n,t)=>({chain:e,state:i})=>{const{selection:r}=i,{head:o}=r,s={attrs:uge(n),type:io.name};return e().insertContentAt(t??o,s).run()}}},renderHTML({HTMLAttributes:n}){const{href:t=null,style:e}=n||{};return["div",{class:"image-container",style:e},t?cge(this.options.HTMLAttributes,n):xz(this.options.HTMLAttributes,n)]}}),dge=jn.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:t})=>({orientation:n>t?"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,t)=>({commands:e,state:i})=>{const{selection:r}=i,{head:o}=r;return e.insertContentAt(t??o,{type:this.name,attrs:hge(n)})}}},renderHTML:({HTMLAttributes:n})=>["div",{class:"video-container"},["video",tn(n,{controls:!0})]]}),hge=n=>{if("string"==typeof n)return{src:n};const{assetMetaData:t,asset:e,mimeType:i,fileAsset:r}=n,{width:o="auto",height:s="auto",contentType:a}=t||{},l=s>o?"vertical":"horizontal";return{src:r||e,data:{...n},width:o,height:s,mimeType:i||a,orientation:l}},pge=jn.create({name:"aiContent",addAttributes:()=>({content:{default:""},loading:{default:!1}}),parseHTML:()=>[{tag:"div[ai-content]"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertAINode:n=>({commands:t,editor:e,tr:i})=>{const r=n0(e,gi.AI_CONTENT);return r?(i.setNodeMarkup(r.from,void 0,{content:n,loading:!1}),t.setNodeSelection(r.from),!0):t.insertContent({type:this.name,attrs:{content:n}})},setLoadingAIContentNode:n=>({tr:t,editor:e})=>{const i=n0(e,gi.AI_CONTENT);return i&&t.setNodeMarkup(i.from,void 0,{...i.node.attrs,loading:n}),!0}}},renderHTML:()=>["div[ai-content]"],addNodeView:()=>({node:n})=>{const t=document.createElement("div"),e=document.createElement("div");return e.innerHTML=n.attrs.loading?'':n.attrs.content,t.contentEditable="true",t.className="ai-content-container "+(n.attrs.loading?"ai-loading":""),t.append(e),{dom:t}}}),mge=jn.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:t})=>t.insertContent({type:this.name,attrs:{isLoading:n}})}},renderHTML:()=>["div",{class:"p-d-flex p-jc-center"}],addNodeView:()=>({node:n})=>{const t=document.createElement("div");if(t.classList.add("loader-style"),n.attrs.isLoading){const e=document.createElement("div");e.classList.add("p-progress-spinner"),t.append(e)}return{dom:t}}}),gge={video:"dotVideo",image:"dotImage"},yge=(n,t)=>Mn.create({name:"assetUploader",addProseMirrorPlugins(){const e=n.get(Xs),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(sE,{remove:{id:m}})),F5(g)}function u({view:m,file:g,position:y}){const b=s(g),w=g.name;(function l({view:m,position:g,id:y,type:b}){const w=t.createComponent(ef),_=m.state.tr;w.instance.type=b,w.instance.cancel.subscribe(()=>{c(y),o.abort(),r.unsubscribe()}),w.changeDetectorRef.detectChanges(),_.setMeta(sE,{add:{id:y,pos:g,element:w.location.nativeElement}}),m.dispatch(_)})({view:m,position:y,id:w,type:b}),o=new AbortController;const{signal:_}=o;r=e.publishContent({data:g,signal:_}).pipe(Et(1)).subscribe(N=>{const S=N[0][Object.keys(N[0])[0]];i.commands.insertAsset({type:b,payload:S,position:y})},N=>alert(N.message),()=>c(w))}function d(m){return i.commands.isNodeRegistered(gge[m])}return[sE,new Wt({key:new on("assetUploader"),props:{handleDOMEvents:{click(m,g){!function h(m,g){const{doc:y,selection:b}=m.state,{ranges:w}=b,_=Math.min(...w.map(J=>J.$from.pos)),N=y.nodeAt(_);if(g.target?.closest("a")&&N.type.name===io.name)g.preventDefault(),g.stopPropagation()}(m,g)},paste(m,g){!function f(m,g){const{clipboardData:y}=g,{files:b}=y,w=y.getData("Text")||"",_=s(b[0]),N=d(_);if(_&&!N)return void a(_);if(w&&!j5(w))return;const{from:S}=(n=>{const{state:t}=n,{selection:e}=t,{ranges:i}=e;return{from:Math.min(...i.map(s=>s.$from.pos)),to:Math.max(...i.map(s=>s.$to.pos))}})(m);j5(w)&&d("image")?i.chain().insertImage(w,S).addNextLine().run():u({view:m,file:b[0],position:S}),g.preventDefault(),g.stopPropagation()}(m,g)},drop(m,g){!function p(m,g){const{files:y}=g.dataTransfer,{length:b}=y,w=y[0],_=s(w);if(!d(_))return;if(b>1)return void a(_);g.preventDefault(),g.stopPropagation();const{clientX:N,clientY:S}=g,{pos:J}=m.posAtCoords({left:N,top:S});u({view:m,file:w,position:J})}(m,g)}}}})]}}),_ge=["cb"],vge=function(n,t,e){return{"p-checkbox-label":!0,"p-checkbox-label-active":n,"p-disabled":t,"p-checkbox-label-focus":e}};function bge(n,t){if(1&n){const e=We();I(0,"label",7),ue("click",function(r){de(e);const o=D(),s=Dn(3);return he(o.onClick(r,s,!0))}),Ne(1),A()}if(2&n){const e=D();pn(e.labelStyleClass),v("ngClass",ll(5,vge,e.checked(),e.disabled,e.focused)),Ot("for",e.inputId),C(1),At(e.label)}}const wge=function(n,t,e){return{"p-checkbox p-component":!0,"p-checkbox-checked":n,"p-checkbox-disabled":t,"p-checkbox-focused":e}},Cge=function(n,t,e){return{"p-highlight":n,"p-disabled":t,"p-focus":e}},Dge={provide:Sr,useExisting:Ut(()=>lE),multi:!0};let lE=(()=>{class n{constructor(e){this.cd=e,this.checkboxIcon="pi pi-check",this.trueValue=!0,this.falseValue=!1,this.onChange=new re,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.focused=!1}onClick(e,i,r){e.preventDefault(),!this.disabled&&!this.readonly&&(this.updateModel(e),r&&i.focus())}updateModel(e){let i;this.binary?(i=this.checked()?this.falseValue:this.trueValue,this.model=i,this.onModelChange(i)):(i=this.checked()?this.model.filter(r=>!Lt.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:e})}handleChange(e){this.readonly||this.updateModel(e)}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(e){this.model=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:Lt.contains(this.value,this.model)}}return n.\u0275fac=function(e){return new(e||n)(O(Un))},n.\u0275cmp=Me({type:n,selectors:[["p-checkbox"]],viewQuery:function(e,i){if(1&e&&en(_ge,5),2&e){let r;Ke(r=Qe())&&(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:[Pt([Dge])],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(e,i){if(1&e){const r=We();I(0,"div",0)(1,"div",1)(2,"input",2,3),ue("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("change",function(s){return i.handleChange(s)}),A()(),I(4,"div",4),ue("click",function(s){de(r);const a=Dn(3);return he(i.onClick(s,a,!0))}),_e(5,"span",5),A()(),M(6,bge,2,9,"label",6)}2&e&&(pn(i.styleClass),v("ngStyle",i.style)("ngClass",ll(18,wge,i.checked(),i.disabled,i.focused)),C(2),v("readonly",i.readonly)("value",i.value)("checked",i.checked())("disabled",i.disabled),Ot("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),v("ngClass",ll(22,Cge,i.checked(),i.disabled,i.focused)),C(1),v("ngClass",i.checked()?i.checkboxIcon:null),C(1),v("ngIf",i.label))},dependencies:[fi,Kt,sr],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})(),Oz=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();const Tge=["group"];function Mge(n,t){if(1&n&&(dt(0),_e(1,"p-checkbox",11),I(2,"label",12),Ne(3),Qn(4,"titlecase"),A(),ht()),2&n){const e=D().$implicit;C(1),v("formControlName",e.key)("binary",!0)("id",e.key),C(1),v("checkIsRequiredControl",e.key)("for",e.key),C(1),At(Zn(4,6,e.label))}}const Sge=function(){return{width:"100%",fontSize:"14px",height:"40px"}};function Ege(n,t){if(1&n&&_e(0,"input",15,16),2&n){const e=D(2).$implicit;oi(Hr(6,Sge)),v("formControlName",e.key)("id",e.key)("type",e.type)("min",e.min)}}const xge=function(n){return{"p-label-input-required":n}};function Ige(n,t){if(1&n&&(dt(0),I(1,"label",13),Ne(2),Qn(3,"titlecase"),A(),M(4,Ege,2,7,"input",14),ht()),2&n){const e=D().$implicit;C(1),v("ngClass",Mt(5,xge,e.required))("for",e.key),C(1),At(Zn(3,3,e.label))}}function Oge(n,t){1&n&&(I(0,"span",17),Ne(1,"This field is required"),A())}function Age(n,t){if(1&n&&(I(0,"div",6),dt(1,7),M(2,Mge,5,8,"ng-container",8),M(3,Ige,5,7,"ng-container",9),ht(),M(4,Oge,2,0,"span",10),A()),2&n){const e=t.$implicit,i=D(2);v("ngClass",e.type),C(1),v("ngSwitch",e.type),C(1),v("ngSwitchCase","checkbox"),C(2),v("ngIf",i.form.controls[e.key].invalid&&i.form.controls[e.key].dirty)}}const kge=function(){return{width:"120px"}},Nge=function(){return{padding:"11.5px 24px"}};function Pge(n,t){if(1&n){const e=We();I(0,"form",1),ue("ngSubmit",function(){return de(e),he(D().onSubmit())}),M(1,Age,5,4,"div",2),I(2,"div",3)(3,"button",4),ue("click",function(){return de(e),he(D().hide.emit(!0))}),A(),_e(4,"button",5),A()()}if(2&n){const e=D();v("ngClass",null==e.options?null:e.options.customClass)("formGroup",e.form),C(1),v("ngForOf",e.dynamicControls),C(2),oi(Hr(8,kge)),C(1),oi(Hr(9,Nge)),v("disabled",e.form.invalid)}}class Sg{constructor(t){this.fb=t,this.formValues=new re,this.hide=new re,this.options=null,this.dynamicControls=[]}onSubmit(){this.formValues.emit({...this.form.value})}setFormValues(t){this.form.setValue(t)}buildForm(t){this.dynamicControls=t,this.form=this.fb.group({}),this.dynamicControls.forEach(e=>{this.form.addControl(e.key,this.fb.control(e.value||null,e.required?$d.required:[]))})}cleanForm(){this.form=null}}Sg.\u0275fac=function(t){return new(t||Sg)(O(rv))},Sg.\u0275cmp=Me({type:Sg,selectors:[["dot-bubble-form"]],viewQuery:function(t,e){if(1&t&&en(Tge,5),2&t){let i;Ke(i=Qe())&&(e.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(t,e){1&t&&M(0,Pge,5,10,"form",0),2&t&&v("ngIf",e.form)},dependencies:[fi,Gr,Kt,Ud,O_,A_,Qd,hl,Ac,Wd,Aa,kc,lE,Vo,hg,bg,KN],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 Lge=["list"];function Rge(n,t){if(1&n&&_e(0,"dot-suggestions-list-item",5),2&n){const e=t.$implicit,i=t.index;v("command",e.command)("index",i)("label",e.label)("url",e.icon)("data",e.data)("page",!0)}}function Fge(n,t){if(1&n&&(I(0,"div")(1,"dot-suggestion-list",null,3),M(3,Rge,1,6,"dot-suggestions-list-item",4),A()()),2&n){const e=D();C(3),v("ngForOf",e.items)}}function jge(n,t){1&n&&_e(0,"dot-suggestion-loading-list")}function zge(n,t){if(1&n){const e=We();I(0,"dot-empty-message",6),ue("back",function(){return de(e),he(D().handleBackButton())}),A()}2&n&&v("title",D().title)("showBackBtn",!0)}class nf{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(t){this.list.updateSelection(t)}}nf.\u0275fac=function(t){return new(t||nf)},nf.\u0275cmp=Me({type:nf,selectors:[["dot-suggestion-page"]],viewQuery:function(t,e){if(1&t&&en(Lge,5),2&t){let i;Ke(i=Qe())&&(e.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(t,e){if(1&t&&(M(0,Fge,4,1,"div",0),M(1,jge,1,0,"ng-template",null,1,Bn),M(3,zge,1,2,"ng-template",null,2,Bn)),2&t){const i=Dn(2),r=Dn(4);v("ngIf",e.items.length)("ngIfElse",e.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 Vge=["input"],Bge=["suggestions"];function Uge(n,t){1&n&&_e(0,"hr",11)}const Hge=function(){return{fontSize:"32px"}};function $ge(n,t){if(1&n&&(I(0,"div",12)(1,"a",13)(2,"span",14),Ne(3,"language"),A(),I(4,"span",15),Ne(5),A()(),I(6,"div",16)(7,"div",17),_e(8,"p-checkbox",18),A(),I(9,"label",19),Ne(10,"Open link in new window"),A()()()),2&n){const e=D();C(1),v("href",e.currentLink,sl),C(1),oi(Hr(5,Hge)),C(3),At(e.currentLink),C(3),v("binary",!0)}}function Wge(n,t){if(1&n){const e=We();I(0,"dot-suggestion-page",20,21),ue("back",function(){return de(e),he(D().resetForm())}),A()}if(2&n){const e=D();v("items",e.items)("loading",e.loading)("title",e.noResultsTitle)}}function Gge(n,t){if(1&n){const e=We();I(0,"dot-form-actions",22),ue("hide",function(r){return de(e),he(D().hide.emit(r))})("remove",function(r){return de(e),he(D().removeLink.emit(r))}),A()}2&n&&v("link",D().currentLink)}const Yge=function(){return{width:"5rem",padding:".75rem 1rem",borderRadius:"0 2px 2px 0"}};class rf{constructor(t,e,i){this.fb=t,this.suggestionsService=e,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=pg,this.initialValues={link:"",blank:!0},this.minChars=3,this.loading=!1,this.items=[]}onMouseDownHandler(t){const{target:e}=t;e!==this.input.nativeElement&&t.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(th(500)).subscribe(t=>{t.lengththis.setNodeProps.emit({link:this.currentLink,blank:t})),this.dotLanguageService.getLanguages().pipe(Et(1)).subscribe(t=>this.dotLangs=t)}submitForm(){this.setNodeProps.emit(this.form.value),this.hide.emit(!0)}setLoading(){const t=this.newLink.length>=this.minChars&&!D0(this.newLink);this.items=t?this.items:[],this.showSuggestions=t,this.loading=t,t&&requestAnimationFrame(()=>this.isSuggestionOpen.emit(!0))}setFormValue({link:t="",blank:e=!0}){this.form.setValue({link:t,blank:e},{emitEvent:!1})}focusInput(){this.input.nativeElement.focus()}onKeyDownEvent(t){const e=this.suggestionsComponent?.items;if(t.stopImmediatePropagation(),"Escape"===t.key)return this.hide.emit(!0),!0;if(!this.showSuggestions||!e?.length)return!0;switch(t.key){case"Enter":return this.suggestionsComponent?.execCommand(),!1;case"ArrowUp":case"ArrowDown":this.suggestionsComponent?.updateSelection(t)}}resetForm(){this.showSuggestions=!1,this.setFormValue({...this.initialValues})}onSelection({payload:{url:t}}){this.setFormValue({...this.form.value,link:t}),this.submitForm()}searchContentlets({link:t=""}){this.loading=!0,this.suggestionsService.getContentletsByLink({link:t,currentLanguage:this.languageId}).pipe(Et(1)).subscribe(e=>{this.items=e.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(t){const{languageCode:e,countryCode:i}=this.dotLangs[t];return e&&i?`${e}-${i}`:""}}rf.\u0275fac=function(t){return new(t||rf)(O(rv),O(Wl),O(Hl))},rf.\u0275cmp=Me({type:rf,selectors:[["dot-bubble-link-form"]],viewQuery:function(t,e){if(1&t&&(en(Vge,5),en(Bge,5)),2&t){let i;Ke(i=Qe())&&(e.input=i.first),Ke(i=Qe())&&(e.suggestionsComponent=i.first)}},hostBindings:function(t,e){1&t&&ue("mousedown",function(r){return e.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(t,e){1&t&&(I(0,"div",0)(1,"form",1),ue("keydown",function(r){return e.onKeyDownEvent(r)})("ngSubmit",function(){return e.submitForm()}),I(2,"div",2)(3,"div",3)(4,"input",4,5),ue("input",function(){return e.setLoading()}),A(),_e(6,"button",6),A()(),M(7,Uge,1,0,"hr",7),M(8,$ge,11,6,"div",8),A(),M(9,Wge,2,3,"dot-suggestion-page",9),M(10,Gge,1,1,"dot-form-actions",10),A()),2&t&&(C(1),v("formGroup",e.form),C(5),oi(Hr(7,Yge)),C(1),v("ngIf",e.showSuggestions||e.currentLink),C(1),v("ngIf",e.currentLink&&!e.showSuggestions),C(1),v("ngIf",e.showSuggestions),C(1),v("ngIf",!e.showSuggestions&&e.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 qge=x(88222),Kge=x.n(qge);const Az=({editor:n,view:t,pos:e})=>{const i=t.state.doc?.resolve(e),r=((n,t)=>{const e=t-n?.textOffset;return{to:e,from:n.index(){const{state:l}=this.editor,{to:c}=l.selection,{openOnClick:u}=Ya.getState(l);this.pluginKey.getState(l).isOpen&&(u?(this.editor.commands.closeLinkForm(),requestAnimationFrame(()=>this.editor.commands.setTextSelection(c))):this.editor.commands.closeLinkForm())},this.editor=t,this.element=e,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(t,e){const i=this.pluginKey.getState(t.state),r=this.pluginKey.getState(e);i.isOpen!==r.isOpen?(this.createTooltip(),i.isOpen?this.show():this.hide(),this.detectLinkFormChanges()):this.detectLinkFormChanges()}createTooltip(){const{element:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t.parentElement,{...this.tippyOptions,...xR,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:t}=this.editor,{state:e}=t,{doc:i,selection:r}=e,{ranges:o}=r,s=Math.min(...o.map(m=>m.$from.pos)),l=yu(t,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(mn(this.$destroy)).subscribe(()=>this.removeLink()),this.component.instance.isSuggestionOpen.pipe(mn(this.$destroy)).subscribe(()=>this.tippy.popperInstance.update()),this.component.instance.setNodeProps.pipe(mn(this.$destroy)).subscribe(t=>this.setLinkValues(t))}detectLinkFormChanges(){this.component.changeDetectorRef.detectChanges(),requestAnimationFrame(()=>this.tippy?.popperInstance?.forceUpdate())}getLinkProps(){const{href:t="",target:e="_top"}=this.editor.isActive("link")?this.editor.getAttributes("link"):this.editor.getAttributes(io.name);return{link:t,blank:"_blank"===e}}getLinkSelect(){const{state:t}=this.editor,{from:e,to:i}=t.selection,r=t.doc.textBetween(e,i," ");return D0(r)?r:""}isImageNode(){const{type:t}=this.editor.state.doc.nodeAt(this.editor.state.selection.from)||{};return t?.name===io.name}destroy(){this.tippy?.destroy(),this.editor.off("focus",this.focusHandler),this.$destroy.next(!0),this.component.destroy()}hanlderScroll(t){if(!this.tippy?.state.isMounted)return;const e=t.target,i=e?.parentElement?.parentElement;this.scrollElementMap[e.id]||this.scrollElementMap[i.id]||this.hide()}}const Zge=n=>{let t;return new Wt({key:n.pluginKey,view:e=>new Qge({view:e,...n}),state:{init:()=>({isOpen:!1,openOnClick:!1}),apply(e,i,r){const{isOpen:o,openOnClick:s}=e.getMeta(Ya)||{},a=Ya.getState(r);return"boolean"==typeof o?{isOpen:o,openOnClick:s}:a||i}},props:{handleDOMEvents:{mousedown(e,i){const r=n.editor,o=((n,t)=>{const{clientX:e,clientY:i}=t,{pos:r}=n.posAtCoords({left:e,top:i});return r})(e,i),{isOpen:s,openOnClick:a}=Ya.getState(r.state);s&&a&&r.chain().unsetHighlight().setTextSelection(o).run()}},handleClickOn(e,i,r){const o=n.editor;if(o.isActive("link")&&i){if(!Kge()(t,r))return Az({editor:o,view:e,pos:i}),t=r,!0;o.chain().setTextSelection(i).closeLinkForm().run()}else t=r},handleDoubleClickOn(e,i){const r=n.editor;if(r.isActive("link"))return Az({editor:r,view:e,pos:i}),!0}}})},Ya=new on("addLink"),Jge=(n,t)=>Mn.create({name:"bubbleLinkForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Ya}),addCommands:()=>({openLinkForm:({openOnClick:e})=>({chain:i})=>i().setMeta("preventAutolink",!0).setHighlight().command(({tr:r})=>(r.setMeta(Ya,{isOpen:!0,openOnClick:e}),!0)).freezeScroll(!0).run(),closeLinkForm:()=>({chain:e})=>e().setMeta("preventAutolink",!0).unsetHighlight().command(({tr:i})=>(i.setMeta(Ya,{isOpen:!1,openOnClick:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const e=n.createComponent(rf);return e.changeDetectorRef.detectChanges(),[Zge({pluginKey:this.options.pluginKey,editor:this.editor,element:e.location.nativeElement,tippyOptions:this.options.tippyOptions,component:e,languageId:t})]}}),kz={tableCell:!0,table:!0,youtube:!0,dotVideo:!0,aiContent:!0,loader:!0},Xge=({editor:n,state:t,from:e,to:i})=>{const{doc:r,selection:o}=t,{view:s}=n,{empty:a}=o,{isOpen:l,openOnClick:c}=Ya.getState(t),u=n.state.doc.nodeAt(n.state.selection.from),d=wu(n.state.selection.$from),h=!r.textBetween(e,i).length&&Hb(t.selection);return"text"===u?.type.name&&"table"===d?.type.name&&!h||!(!l&&(!s.hasFocus()||a||h||kz[d?.type.name]||kz[u?.type.name])||l&&c)},D0=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),Nz=(n,t)=>t===io.name&&n?.firstElementChild?n.firstElementChild.getBoundingClientRect():n.getBoundingClientRect(),Pz=n=>n.isActive("bulletList")||n.isActive("orderedList"),Lz=[{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}],cE=[{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}],nye=[...Lz,...cE,{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}],iye=[...cE,{icon:"link",markAction:"link",active:!1,divider:!0},{text:"Properties",markAction:"properties",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],rye=[...Lz,...cE,{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],oye=[{icon:"delete",markAction:"deleteNode",active:!1}],Rz=[{name:"offset",options:{offset:[0,5]}},{name:"flip",options:{fallbackPlacements:["bottom-start","top-start"]}},{name:"preventOverflow",options:{altAxis:!0,tether:!0}}],aye=[{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 lye extends US{constructor(t){const{editor:e,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=t;super(t),this.$destroy=new ae,this.focusHandler=()=>{this.editor.commands.closeForm(),setTimeout(()=>this.update(this.editor.view))},this.editor=e,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(aye),this.component.instance.formValues.pipe(mn(this.$destroy)).subscribe(l=>{this.editor.commands.updateValue(l)}),this.component.instance.hide.pipe(mn(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(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{open:!1},{state:o}=t,{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 qe){const d=t.nodeDOM(c);if(d)return this.node=s.nodeAt(c),this.tippyRect(d,this.node.type.name)}return yu(t,c,u)}}),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t.parentElement,{...this.tippyOptions,...xR,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(t){if(!this.shouldHideOnScroll(t.target))return!0;setTimeout(()=>this.update(this.editor.view))}tippyRect(t,e){return document.querySelector("#bubble-menu")?.getBoundingClientRect()||((n,t)=>t===io.name&&n.getElementsByTagName("img")[0]?.getBoundingClientRect()||n.getBoundingClientRect())(t,e)}shouldHideOnScroll(t){return this.tippy?.state.isMounted&&this.tippy?.popper.contains(t)}}const cye=n=>new Wt({key:n.pluginKey,view:t=>new lye({view:t,...n}),state:{init:()=>({open:!1,form:[],options:null}),apply(t,e,i){const{open:r,form:o,options:s}=t.getMeta(Iu)||{},a=Iu?.getState(i);return"boolean"==typeof r?{open:r,form:o,options:s}:a||e}}}),Iu=new on("bubble-form"),uye={interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},dye=n=>{const t=new ae;return HS.extend({name:"bubbleForm",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Iu,shouldShow:()=>!0}),addCommands:()=>({openForm:(e,i)=>({chain:r})=>(r().command(({tr:o})=>(o.setMeta(Iu,{form:e,options:i,open:!0}),!0)).freezeScroll(!0).run(),t),closeForm:()=>({chain:e})=>(t.next(null),e().command(({tr:i})=>(i.setMeta(Iu,{open:!1}),!0)).freezeScroll(!1).run()),updateValue:e=>({editor:i})=>{t.next(e),i.commands.closeForm()}}),addProseMirrorPlugins(){const e=n.createComponent(Sg),i=e.location.nativeElement;return e.changeDetectorRef.detectChanges(),[cye({pluginKey:Iu,editor:this.editor,element:i,tippyOptions:uye,component:e,form$:t})]}})},Fz=function(){return{width:"50%"}};function hye(n,t){if(1&n){const e=We();I(0,"div")(1,"div",1)(2,"button",2),ue("click",function(){return de(e),he(D().copy())}),A(),I(3,"button",3),ue("click",function(){return de(e),he(D().remove.emit(!0))}),A()()()}2&n&&(C(2),oi(Hr(4,Fz)),C(1),oi(Hr(5,Fz)))}class Eg{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 fye(n,t){if(1&n){const e=We();dt(0),I(1,"button",3),ue("click",function(){return de(e),he(D().toggleChangeTo.emit())}),Ne(2),A(),_e(3,"div",4),ht()}if(2&n){const e=D();C(2),At(e.selected)}}function pye(n,t){1&n&&_e(0,"div",4)}function mye(n,t){if(1&n){const e=We();dt(0),I(1,"dot-bubble-menu-button",5),ue("click",function(){const o=de(e).$implicit;return he(D().command.emit(o))}),A(),M(2,pye,1,0,"div",6),ht()}if(2&n){const e=t.$implicit;C(1),v("active",e.active)("item",e),C(1),v("ngIf",e.divider)}}Eg.\u0275fac=function(t){return new(t||Eg)},Eg.\u0275cmp=Me({type:Eg,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(t,e){1&t&&M(0,hye,4,6,"div",0),2&t&&v("ngIf",e.link.length)},dependencies:[Kt,Vo],styles:[".form-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;padding:1rem;gap:.5rem}"]});class sf{constructor(){this.items=[],this.command=new re,this.toggleChangeTo=new re}preventDeSelection(t){t.preventDefault()}}sf.\u0275fac=function(t){return new(t||sf)},sf.\u0275cmp=Me({type:sf,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(t,e){1&t&&(I(0,"div",0),ue("mousedown",function(r){return e.preventDeSelection(r)}),M(1,fye,4,1,"ng-container",1),M(2,mye,3,3,"ng-container",2),A()),2&t&&(C(1),v("ngIf",e.selected),C(1),v("ngForOf",e.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 gye=function(n,t){return{"btn-bubble-menu":!0,"btn-icon":n,"btn-active":t}},yye=function(n){return{"material-icons":n}};class xg{constructor(){this.active=!1}}xg.\u0275fac=function(t){return new(t||xg)},xg.\u0275cmp=Me({type:xg,selectors:[["dot-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:8,consts:[[3,"ngClass"]],template:function(t,e){1&t&&(I(0,"button",0)(1,"span",0),Ne(2),A()()),2&t&&(v("ngClass",bi(3,gye,e.item.icon,e.active)),C(1),v("ngClass",Mt(6,yye,e.item.icon)),C(1),At(e.item.icon||e.item.text))},dependencies:[fi],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 _ye=n=>{const t=n.component.instance,e=n.changeToComponent.instance;return new Wt({key:n.pluginKey,view:i=>new vye({view:i,...n}),props:{handleKeyDown(i,r){const{key:o}=r,{changeToIsOpen:s}=n.editor?.storage.bubbleMenu||{};if(s){if("Escape"===o)return t.toggleChangeTo.emit(),!0;if("Enter"===o)return e.execCommand(),!0;if("ArrowDown"===o||"ArrowUp"===o)return e.updateSelection(r),!0}return!1}}})};class vye extends US{constructor(t){super(t),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:e,changeToComponent:i}=t;this.component=e,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(t,e){const{state:i,composing:r}=t,{doc:o,selection:s}=i,a=e&&e.doc.eq(o)&&e.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:t,state:i,oldState:e,from:c,to:u}),!this.shouldShowProp)return this.hide(),void this.tippyChangeTo?.hide();this.tippy?.setProps({getReferenceClientRect:()=>{const d=t.nodeDOM(c),h=o.nodeAt(c)?.type.name;return(({viewCoords:n,nodeCoords:t,padding:e})=>{const{top:i,bottom:r}=t,{top:o,bottom:s}=n,a=Math.ceil(i-o){this.changeTo.instance.list.updateActiveItem(t),this.changeTo.changeDetectorRef.detectChanges()})}setMenuItems(t,e){const i=t.nodeAt(e),o="table"===wu(this.editor.state.selection.$from).type.name?"table":i?.type.name;this.selectionNode=i,this.component.instance.items=((n="")=>{switch(n){case"dotImage":return iye;case"dotContent":return oye;case"table":return rye;default:return nye}})(o)}openImageProperties(){const{open:t}=Iu.getState(this.editor.state),{alt:e,src:i,title:r,data:o}=this.editor.getAttributes(io.name),{title:s="",asset:a}=o||{};t?this.editor.commands.closeForm():this.editor.commands.openForm([{value:i||a,key:"src",label:"path",required:!0,controlType:"text",type:"text"},{value:e||s,key:"alt",label:"alt",controlType:"text",type:"text"},{value:r||s,key:"title",label:"caption",controlType:"text",type:"text"}]).pipe(Et(1),Tn(l=>null!=l)).subscribe(l=>{requestAnimationFrame(()=>{this.editor.commands.updateAttributes(io.name,{...l}),this.editor.commands.closeForm()})})}exeCommand(t){const{markAction:e,active:i}=t;switch(e){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(e,i);break;case"bulletList":this.editor.commands.toggleBulletList();break;case"orderedList":this.editor.commands.toggleOrderedList();break;case"indent":Pz(this.editor)&&this.editor.commands.sinkListItem("listItem");break;case"outdent":Pz(this.editor)&&this.editor.commands.liftListItem("listItem");break;case"link":const{isOpen:r}=Ya.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,t)=>{const e=t.$from.pos,i=t.$to.pos+1;this.editor.chain().deleteRange({from:e,to:i}).blur().run()})(0,this.selectionRange):(({editor:n,nodeType:t,selectionRange:e})=>{Wue.includes(t)?((n,t)=>{const e=t.$from.pos,i=e+1;n.chain().deleteRange({from:e,to:i}).blur().run()})(n,e):((n,t)=>{const e=wu(t.$from),i=e.type.name,r=wu(t.$from,[gi.ORDERED_LIST,gi.BULLET_LIST]),{childCount:o}=r;switch(i){case gi.ORDERED_LIST:case gi.BULLET_LIST:o>1?n.chain().deleteNode(gi.LIST_ITEM).blur().run():n.chain().deleteNode(r.type).blur().run();break;default:n.chain().deleteNode(e.type).blur().run()}})(n,e)})({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(t,e){e?this.editor.commands.unsetTextAlign():this.editor.commands.setTextAlign(t)}changeToItems(){const t=this.editor.storage.dotConfig.allowedBlocks;let i="table"===wu(this.editor.state.selection.$from).type.name?iee:aee;t.length>1&&(i=i.filter(o=>t.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 t=this.changeToItems(),e=t.filter(o=>o?.isActive()),i=e.length>1?e[1]:e[0],r=t.findIndex(o=>o===i);return{activeItem:i,index:r}}createChangeToTooltip(){const{element:t}=this.editor.options;this.tippyChangeTo||(this.tippyChangeTo=gs(t,{...this.tippyOptions,appendTo:document.body,getReferenceClientRect:null,content:this.changeToElement,placement:"bottom-start",duration:0,hideOnClick:!1,popperOptions:{modifiers:Rz},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:t}=this.editor?.storage.bubbleMenu||{};t?this.tippyChangeTo?.hide():this.tippyChangeTo?.show()}hanlderScroll(){this.tippyChangeTo?.state.isVisible&&this.tippyChangeTo?.hide()}}const bye={duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0},wye=new on("bubble-menu");function Cye(n){const t=n.createComponent(sf),e=t.location.nativeElement,i=n.createComponent(Gl),r=i.location.nativeElement;return HS.extend({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:bye,pluginKey:"bubbleMenu",shouldShow:Xge}),addStorage:()=>({changeToIsOpen:!1}),addProseMirrorPlugins(){return e?[_ye({...this.options,component:t,changeToComponent:i,pluginKey:wye,editor:this.editor,element:e,changeToElement:r})]:[]}})}const Dye=Mn.create({name:"dotComands",addCommands:()=>({isNodeRegistered:n=>({view:t})=>{const{schema:e}=t.state,{nodes:i}=e;return Boolean(i[n])}})}),Tye=n=>Mn.create({name:"dotConfig",addStorage:()=>({...n})}),Mye=jn.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const t=n.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:n}){return["td",tn(this.options.HTMLAttributes,n),0]}});class Eye{constructor(t,e){this.tippy=e}init(){}update(){}destroy(){this.tippy.destroy()}}const xye=n=>{let t;function e(s){return ki.node(s.$to.before(3),s.$to.after(3),{class:"focus"})}function i(s){s.preventDefault(),s.stopPropagation(),t?.setProps({getReferenceClientRect:()=>s.target.getBoundingClientRect()}),t.show()}function o(s){return"tableCell"===s?.type.name||"tableHeader"===s?.type.name||"tableRow"===s?.type.name}return new Wt({key:new on("dotTableCell"),state:{apply:()=>{},init:()=>{const{editor:s,viewContainerRef:a}=n,l=a.createComponent(Gl),c=l.location.nativeElement;l.instance.currentLanguage=s.storage.dotConfig.lang;const{element:d}=s.options;t=gs(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:Rz},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,t)=>[{label:"Toggle row Header",icon:"check",id:"toggleRowHeader",command:()=>{n.commands.toggleHeaderRow(),t.hide()},tabindex:"0"},{label:"Toggle column Header",icon:"check",id:"toggleColumnHeader",command:()=>{n.commands.toggleHeaderColumn(),t.hide()},tabindex:"1"},{id:"divider"},{label:"Merge Cells",icon:"call_merge",id:"mergeCells",command:()=>{n.commands.mergeCells(),t.hide()},disabled:!0,tabindex:"2"},{label:"Split Cells",icon:"call_split",id:"splitCells",command:()=>{n.commands.splitCell(),t.hide()},disabled:!0,tabindex:"3"},{id:"divider"},{label:"Insert row above",icon:"arrow_upward",id:"insertAbove",command:()=>{n.commands.addRowBefore(),t.hide()},tabindex:"4"},{label:"Insert row below",icon:"arrow_downward",id:"insertBellow",command:()=>{n.commands.addRowAfter(),t.hide()},tabindex:"5"},{label:"Insert column left",icon:"arrow_back",id:"insertLeft",command:()=>{n.commands.addColumnBefore(),t.hide()},tabindex:"6"},{label:"Insert column right",icon:"arrow_forward",id:"insertRight",command:()=>{n.commands.addColumnAfter(),t.hide()},tabindex:"7"},{id:"divider"},{label:"Delete row",icon:"delete",id:"deleteRow",command:()=>{n.commands.deleteRow(),t.hide()},tabindex:"8"},{label:"Delete Column",icon:"delete",id:"deleteColumn",command:()=>{n.commands.deleteColumn(),t.hide()},tabindex:"9"},{label:"Delete Table",icon:"delete",id:"deleteTable",command:()=>{n.commands.deleteTable(),t.hide()},tabindex:"10"}])(n.editor,t),l.instance.title="",l.changeDetectorRef.detectChanges()}},view:s=>new Eye(s,t),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?Fn.create(s.doc,[e(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 Iye(n){return Mye.extend({renderHTML({HTMLAttributes:t}){return["td",tn(this.options.HTMLAttributes,t),["button",{class:"dot-cell-arrow"}],["p",0]]},addProseMirrorPlugins(){return[xye({editor:this.editor,viewContainerRef:n})]}})}const Oye=jn.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const t=n.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:n}){return["th",tn(this.options.HTMLAttributes,n),0]}});var uE,dE;if(typeof WeakMap<"u"){let n=new WeakMap;uE=t=>n.get(t),dE=(t,e)=>(n.set(t,e),e)}else{const n=[];let e=0;uE=i=>{for(let r=0;r(10==e&&(e=0),n[e++]=i,n[e++]=r)}var Yn=class{constructor(n,t,e,i){this.width=n,this.height=t,this.map=e,this.problems=i}findCell(n){for(let t=0;ti&&(o+=c.attrs.colspan)}}for(let s=0;s1&&(e=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(n),e=n.childCount,i=[];let r=0,o=null;const s=[];for(let c=0,u=t*e;c=e){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:y-w});break}const _=r+w*t;for(let N=0;N0;t--)if("row"==n.node(t).type.spec.tableRole)return n.node(0).resolve(n.before(t+1));return null}function vs(n){const t=n.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function T0(n){const t=n.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;const e=af(t.$head)||function Fye(n){for(let t=n.nodeAfter,e=n.pos;t;t=t.firstChild,e++){const i=t.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(e)}for(let t=n.nodeBefore,e=n.pos;t;t=t.lastChild,e--){const i=t.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(e-t.nodeSize)}}(t.$head);if(e)return e;throw new RangeError(`No cell found around position ${t.head}`)}function hE(n){return"row"==n.parent.type.spec.tableRole&&!!n.nodeAfter}function fE(n,t){return n.depth==t.depth&&n.pos>=t.start(-1)&&n.pos<=t.end(-1)}function Vz(n,t,e){const i=n.node(-1),r=Yn.get(i),o=n.start(-1),s=r.nextCell(n.pos-o,t,e);return null==s?null:n.node(0).resolve(o+s)}function Ou(n,t,e=1){const i={...n,colspan:n.colspan-e};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(t,e),i.colwidth.some(r=>r>0)||(i.colwidth=null)),i}function Bz(n,t,e=1){const i={...n,colspan:n.colspan+e};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let r=0;rc!=t.pos-r);a.unshift(t.pos-r);const l=a.map(c=>{const u=e.nodeAt(c);if(!u)throw RangeError(`No cell with offset ${c} found`);const d=r+c+1;return new Rj(s.resolve(d),s.resolve(d+u.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=n,this.$headCell=t}map(n,t){const e=n.resolve(t.map(this.$anchorCell.pos)),i=n.resolve(t.map(this.$headCell.pos));if(hE(e)&&hE(i)&&fE(e,i)){const r=this.$anchorCell.node(-1)!=e.node(-1);return r&&this.isRowSelection()?nn.rowSelection(e,i):r&&this.isColSelection()?nn.colSelection(e,i):new nn(e,i)}return nt.between(e,i)}content(){const n=this.$anchorCell.node(-1),t=Yn.get(n),e=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-e,this.$headCell.pos-e),r={},o=[];for(let a=i.top;a0||m>0){let g=f.attrs;if(p>0&&(g=Ou(g,0,p)),m>0&&(g=Ou(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,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(n,t=n){const e=n.node(-1),i=Yn.get(e),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(t.pos-r),a=n.node(0);return o.top<=s.top?(o.top>0&&(n=a.resolve(r+i.map[o.left])),s.bottom0&&(t=a.resolve(r+i.map[s.left])),o.bottom0)&&Math.max(i+this.$anchorCell.nodeAfter.attrs.colspan,r+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(n){return n instanceof nn&&n.$anchorCell.pos==this.$anchorCell.pos&&n.$headCell.pos==this.$headCell.pos}static rowSelection(n,t=n){const e=n.node(-1),i=Yn.get(e),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(t.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&&(t=a.resolve(r+i.map[s.top*i.width])),o.right{t.push(ki.node(i,i+e.nodeSize,{class:"selectedCell"}))}),Fn.create(n.doc,t)}var $ye=new on("fix-tables");function Hz(n,t,e,i){const r=n.childCount,o=t.childCount;e:for(let s=0,a=0;s{"table"==r.type.spec.tableRole&&(e=function Wye(n,t,e,i){const r=Yn.get(t);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;gt.width)for(let d=0,h=0;dt.height){const d=[];for(let p=0,m=(t.height-1)*t.width;p=t.width)&&e.nodeAt(t.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,ce.from(d)),f=[];for(let p=t.height;p{if(!r)return!1;const o=e.selection;if(o instanceof nn)return M0(e,i,ot.near(o.$headCell,t));if("horiz"!=n&&!o.empty)return!1;const s=qz(r,n,t);if(null==s)return!1;if("horiz"==n)return M0(e,i,ot.near(e.doc.resolve(o.head+t),t));{const a=e.doc.resolve(s),l=Vz(a,n,t);let c;return c=l?ot.near(l,1):t<0?ot.near(e.doc.resolve(a.before(-1)),-1):ot.near(e.doc.resolve(a.after(-1)),1),M0(e,i,c)}}}function E0(n,t){return(e,i,r)=>{if(!r)return!1;const o=e.selection;let s;if(o instanceof nn)s=o;else{const l=qz(r,n,t);if(null==l)return!1;s=new nn(e.doc.resolve(l))}const a=Vz(s.$headCell,n,t);return!!a&&M0(e,i,new nn(s.$anchorCell,a))}}function x0(n,t){const e=n.selection;if(!(e instanceof nn))return!1;if(t){const i=n.tr,r=mr(n.schema).cell.createAndFill().content;e.forEachCell((o,s)=>{o.content.eq(r)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new De(r,0,0))}),i.docChanged&&t(i)}return!0}function Zye(n,t){const i=af(n.state.doc.resolve(t));return!!i&&(n.dispatch(n.state.tr.setSelection(new nn(i))),!0)}function Jye(n,t,e){if(!vs(n.state))return!1;let i=function Gye(n){if(!n.size)return null;let{content:t,openStart:e,openEnd:i}=n;for(;1==t.childCount&&(e>0&&i>0||"table"==t.child(0).type.spec.tableRole);)e--,i--,t=t.child(0).content;const r=t.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=t.length&&t.push(ce.empty),e[r]i&&(h=h.type.createChecked(Ou(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(ce.from(l))}e=o,t=r}return{width:n,height:t,rows:e}}(i,a.right-a.left,a.bottom-a.top),Yz(n.state,n.dispatch,s,a,i),!0}if(i){const o=T0(n.state),s=o.start(-1);return Yz(n.state,n.dispatch,s,Yn.get(o.node(-1)).findCell(o.pos-s),i),!0}return!1}function Xye(n,t){var e;if(t.ctrlKey||t.metaKey)return;const i=Kz(n,t.target);let r;if(t.shiftKey&&n.state.selection instanceof nn)o(n.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=af(n.state.selection.$anchor))&&(null==(e=mE(n,t))?void 0:e.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(l,c){let u=mE(n,c);const d=null==Kl.getState(n.state);if(!u||!fE(l,u)){if(!d)return;u=l}const h=new nn(l,u);if(d||!n.state.selection.eq(h)){const f=n.state.tr.setSelection(h);d&&f.setMeta(Kl,l.pos),n.dispatch(f)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",a),null!=Kl.getState(n.state)&&n.dispatch(n.state.tr.setMeta(Kl,-1))}function a(l){const c=l,u=Kl.getState(n.state);let d;if(null!=u)d=n.state.doc.resolve(u);else if(Kz(n,c.target)!=i&&(d=mE(n,t),!d))return s();d&&o(d,c)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",a)}function qz(n,t,e){if(!(n.state.selection instanceof nt))return null;const{$head:i}=n.state.selection;for(let r=i.depth-1;r>=0;r--){const o=i.node(r);if((e<0?i.index(r):i.indexAfter(r))!=(e<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"==t?e>0?"down":"up":e>0?"right":"left")?a:null}}return null}function Kz(n,t){for(;t&&t!=n.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function mE(n,t){const e=n.posAtCoords({left:t.clientX,top:t.clientY});return e&&e?af(n.state.doc.resolve(e.pos)):null}var e_e=class{constructor(n,t){this.node=n,this.cellMinWidth=t,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")),gE(n,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type==this.node.type&&(this.node=n,gE(n,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(n){return"attributes"==n.type&&(n.target==this.table||this.colgroup.contains(n.target))}};function gE(n,t,e,i,r,o){var s;let a=0,l=!0,c=t.firstChild;const u=n.firstChild;if(u){for(let d=0,h=0;d(r.spec.props.nodeViews[mr(s.schema).table.name]=(a,l)=>new e(a,t,l),new I0(-1,!1)),apply:(o,s)=>s.apply(o)},props:{attributes:o=>{const s=Qo.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{!function n_e(n,t,e,i,r){const o=Qo.getState(n.state);if(o&&!o.dragging){const s=function s_e(n){for(;n&&"TD"!=n.nodeName&&"TH"!=n.nodeName;)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}(t.target);let a=-1;if(s){const{left:l,right:c}=s.getBoundingClientRect();t.clientX-l<=e?a=Qz(n,t,"left"):c-t.clientX<=e&&(a=Qz(n,t,"right"))}if(a!=o.activeHandle){if(!r&&-1!==a){const l=n.state.doc.resolve(a),c=l.node(-1),u=Yn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}Jz(n,a)}}}(o,s,n,0,i)},mouseleave:o=>{!function i_e(n){const t=Qo.getState(n.state);t&&t.activeHandle>-1&&!t.dragging&&Jz(n,-1)}(o)},mousedown:(o,s)=>{!function r_e(n,t,e){const i=Qo.getState(n.state);if(!i||-1==i.activeHandle||i.dragging)return!1;const r=n.state.doc.nodeAt(i.activeHandle),o=function o_e(n,t,{colspan:e,colwidth:i}){const r=i&&i[i.length-1];if(r)return r;const o=n.domAtPos(t);let a=o.node.childNodes[o.offset].offsetWidth,l=e;if(i)for(let c=0;c{const s=Qo.getState(o);if(s&&s.activeHandle>-1)return function u_e(n,t){const e=[],i=n.doc.resolve(t),r=i.node(-1);if(!r)return Fn.empty;const o=Yn.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(t.activeHandle,-1);return hE(n.doc.resolve(i))||(i=-1),new I0(i,t.dragging)}return t}};function Qz(n,t,e){const i=n.posAtCoords({left:t.clientX,top:t.clientY});if(!i)return-1;const{pos:r}=i,o=af(n.state.doc.resolve(r));if(!o)return-1;if("right"==e)return o.pos;const s=Yn.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 Zz(n,t,e){return Math.max(e,n.startWidth+(t.clientX-n.startX))}function Jz(n,t){n.dispatch(n.state.tr.setMeta(Qo,{setHandle:t}))}function c_e(n){return Array(n).fill(0)}function ia(n){const t=n.selection,e=T0(n),i=e.node(-1),r=e.start(-1),o=Yn.get(i);return{...t instanceof nn?o.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):o.findCell(e.pos-r),tableStart:r,map:o,table:i}}function Xz(n,{map:t,tableStart:e,table:i},r){let o=r>0?-1:0;(function zye(n,t,e){const i=mr(t.type.schema).header_cell;for(let r=0;r0&&r0&&t.map[a-1]==l||r0?-1:0;(function m_e(n,t,e){var i;const r=mr(t.type.schema).header_cell;for(let o=0;o0&&r0&&u==t.map[c-t.width]){const d=e.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&&e[o]==e[o-1]||i.right0&&e[r]==e[r-n]||i.bottom{var i;const r=t.selection;let o,s;if(r instanceof nn){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{if(o=function Rye(n){for(let t=n.depth;t>0;t--){const e=n.node(t).type.spec.tableRole;if("cell"===e||"header_cell"===e)return n.node(t)}return null}(r.$from),!o)return!1;s=null==(i=af(r.$from))?void 0:i.pos}if(null==o||null==s||1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(e){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=ia(t),d=t.tr;for(let f=0;fe[i.type.spec.tableRole])(n,t)}function rV(n,t,e){const i=t.map.cellsInRect({left:0,top:0,right:"row"==n?t.map.width:1,bottom:"column"==n?t.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}}Ig("row",{useDeprecatedLogic:!0}),Ig("column",{useDeprecatedLogic:!0});var T_e=Ig("cell",{useDeprecatedLogic:!0});function oV(n){return function(t,e){if(!vs(t))return!1;const i=function M_e(n,t){if(t<0){const e=n.nodeBefore;if(e)return n.pos-e.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(t,e){const i=t.getMeta(Kl);if(null!=i)return-1==i?null:i;if(null==e||!t.docChanged)return e;const{deleted:r,pos:o}=t.mapping.mapResult(e);return r?null:o}},props:{decorations:Vye,handleDOMEvents:{mousedown:Xye},createSelectionBetween:t=>null!=Kl.getState(t.state)?t.state.selection:null,handleTripleClick:Zye,handleKeyDown:Qye,handlePaste:Jye},appendTransaction:(t,e,i)=>function Hye(n,t,e){const i=(t||n).selection,r=(t||n).doc;let o,s;if(i instanceof qe&&(s=i.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)o=nn.create(r,i.from);else if("row"==s){const a=r.resolve(i.from+1);o=nn.rowSelection(a,a)}else if(!e){const a=Yn.get(i.node),l=i.from+1;o=nn.create(r,l+1,l+a.map[a.width*a.height-1])}}else i instanceof nt&&function Bye({$from:n,$to:t}){if(n.pos==t.pos||n.pos=0&&!(n.after(r+1)=0&&!(t.before(o+1)>t.start(o));o--,i--);return e==i&&/row|table/.test(n.node(r).type.spec.tableRole)}(i)?o=nt.create(r,i.from):i instanceof nt&&function Uye({$from:n,$to:t}){let e,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){e=o;break}}for(let r=t.depth;r>0;r--){const o=t.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){i=o;break}}return e!==i&&0===t.parentOffset}(i)&&(o=nt.create(r,i.$from.start(),i.$from.end()));return o&&(t||(t=n.tr)).setSelection(o),t}(i,$z(i,e),n)})}function sV(n,t,e,i,r,o){let s=0,a=!0,l=t.firstChild;const c=n.firstChild;for(let u=0,d=0;u{const{selection:t}=n.state;if(!function A_e(n){return n instanceof nn}(t))return!1;let e=0;return T5(t.ranges[0].$from,o=>"table"===o.type.name)?.node.descendants(o=>{if("table"===o.type.name)return!1;["tableCell","tableHeader"].includes(o.type.name)&&(e+=1)}),e===t.ranges.length&&(n.commands.deleteTable(),!0)},k_e=jn.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:x_e,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:n}){return["table",tn(this.options.HTMLAttributes,n),["tbody",0]]},addCommands:()=>({insertTable:({rows:n=3,cols:t=3,withHeaderRow:e=!0}={})=>({tr:i,dispatch:r,editor:o})=>{const s=function O_e(n,t,e,i,r){const o=function I_e(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const t={};return Object.keys(n.nodes).forEach(e=>{const i=n.nodes[e];i.spec.tableRole&&(t[i.spec.tableRole]=i)}),n.cached.tableNodeTypes=t,t}(n),s=[],a=[];for(let c=0;c({state:n,dispatch:t})=>function d_e(n,t){if(!vs(n))return!1;if(t){const e=ia(n);t(Xz(n.tr,e,e.left))}return!0}(n,t),addColumnAfter:()=>({state:n,dispatch:t})=>function h_e(n,t){if(!vs(n))return!1;if(t){const e=ia(n);t(Xz(n.tr,e,e.right))}return!0}(n,t),deleteColumn:()=>({state:n,dispatch:t})=>function p_e(n,t){if(!vs(n))return!1;if(t){const e=ia(n),i=n.tr;if(0==e.left&&e.right==e.map.width)return!1;for(let r=e.right-1;f_e(i,e,r),r!=e.left;r--){const o=e.tableStart?i.doc.nodeAt(e.tableStart-1):i.doc;if(!o)throw RangeError("No table found");e.table=o,e.map=Yn.get(o)}t(i)}return!0}(n,t),addRowBefore:()=>({state:n,dispatch:t})=>function g_e(n,t){if(!vs(n))return!1;if(t){const e=ia(n);t(eV(n.tr,e,e.top))}return!0}(n,t),addRowAfter:()=>({state:n,dispatch:t})=>function y_e(n,t){if(!vs(n))return!1;if(t){const e=ia(n);t(eV(n.tr,e,e.bottom))}return!0}(n,t),deleteRow:()=>({state:n,dispatch:t})=>function v_e(n,t){if(!vs(n))return!1;if(t){const e=ia(n),i=n.tr;if(0==e.top&&e.bottom==e.map.height)return!1;for(let r=e.bottom-1;__e(i,e,r),r!=e.top;r--){const o=e.tableStart?i.doc.nodeAt(e.tableStart-1):i.doc;if(!o)throw RangeError("No table found");e.table=o,e.map=Yn.get(e.table)}t(i)}return!0}(n,t),deleteTable:()=>({state:n,dispatch:t})=>function S_e(n,t){const e=n.selection.$anchor;for(let i=e.depth;i>0;i--)if("table"==e.node(i).type.spec.tableRole)return t&&t(n.tr.delete(e.before(i),e.after(i)).scrollIntoView()),!0;return!1}(n,t),mergeCells:()=>({state:n,dispatch:t})=>nV(n,t),splitCell:()=>({state:n,dispatch:t})=>iV(n,t),toggleHeaderColumn:()=>({state:n,dispatch:t})=>Ig("column")(n,t),toggleHeaderRow:()=>({state:n,dispatch:t})=>Ig("row")(n,t),toggleHeaderCell:()=>({state:n,dispatch:t})=>T_e(n,t),mergeOrSplit:()=>({state:n,dispatch:t})=>!!nV(n,t)||iV(n,t),setCellAttribute:(n,t)=>({state:e,dispatch:i})=>function C_e(n,t){return function(e,i){if(!vs(e))return!1;const r=T0(e);if(r.nodeAfter.attrs[n]===t)return!1;if(i){const o=e.tr;e.selection instanceof nn?e.selection.forEachCell((s,a)=>{s.attrs[n]!==t&&o.setNodeMarkup(a,null,{...s.attrs,[n]:t})}):o.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[n]:t}),i(o)}return!0}}(n,t)(e,i),goToNextCell:()=>({state:n,dispatch:t})=>oV(1)(n,t),goToPreviousCell:()=>({state:n,dispatch:t})=>oV(-1)(n,t),fixTables:()=>({state:n,dispatch:t})=>(t&&$z(n),!0),setCellSelection:n=>({tr:t,dispatch:e})=>{if(e){const i=nn.create(t.doc,n.anchorCell,n.headCell);t.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:O0,"Mod-Backspace":O0,Delete:O0,"Mod-Delete":O0}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[t_e({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],E_e({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema:n=>({tableRole:Ct(Ve(n,"tableRole",{name:n.name,options:n.options,storage:n.storage}))})});class Og{}Og.\u0275fac=function(t){return new(t||Og)},Og.\u0275cmp=Me({type:Og,selectors:[["dot-drag-handler"]],decls:2,vars:0,consts:[[1,"material-icons"]],template:function(t,e){1&t&&(I(0,"i",0),Ne(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 P_e=n=>Mn.create({name:"dragHandler",addProseMirrorPlugins(){let t=null;const r=n.createComponent(Og).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 Wt({key:new on("dragHandler"),view:m=>(requestAnimationFrame(()=>function d(m){r.setAttribute("draggable","true"),r.addEventListener("dragstart",g=>function l(m,g){if(!m.dataTransfer)return;const b=function a(m,g){const y=g.posAtCoords(m);if(y){const b=c(g.nodeDOM(y.inside));if(b&&1===b.nodeType){const w=g.docView.nearestDesc(b,!0);if(w&&w!==g.docView)return w.posBefore}}return null}({left:m.clientX+50,top:m.clientY},g);if(null!=b){g.dispatch(g.state.tr.setSelection(qe.create(g.state.doc,b)));const w=g.state.selection.content();m.dataTransfer.clearData(),m?.dataTransfer?.setDragImage(t,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")})(),F5(m),"TABLE"===t.nodeName&&s(t)}),!1),mousemove(m,g){const b=m.posAtCoords({left:g.clientX+50,top:g.clientY});if(b&&function u(m,g){const y=m.nodeDOM(g);return!(!y?.hasChildNodes()||1===y.childNodes.length&&"BR"==y.childNodes[0].nodeName)}(m,b.inside))if(t=c(m.nodeDOM(b.inside)),function f(m){return m&&!m.classList?.contains("ProseMirror")&&!m.innerText.startsWith("/")}(t)){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,t);r.style.left=_-25+"px",r.style.top=w<0?0:w+"px",r.classList.add("visible")}else r.classList.remove("visible");else t=null,r.classList.remove("visible");return!1}}}})]}}),L_e=function(n){return{completed:n}};function R_e(n,t){if(1&n){const e=We();I(0,"button",2),ue("click",function(){return de(e),he(D().byClick.emit())}),A()}if(2&n){const e=D();v("disabled",e.isCompleted||e.isLoading)("icon",e.isCompleted?"pi pi-check":null)("label",e.title)("loading",e.isLoading)("ngClass",Mt(5,L_e,e.isCompleted))}}function F_e(n,t){1&n&&(I(0,"div",3),_e(1,"i",4),I(2,"span"),Ne(3,"Something went wrong, please try again later or "),I(4,"a",5),Ne(5," contact support "),A()()())}class Ag{constructor(){this.label="",this.isLoading=!1,this.byClick=new re,this.status=$l}get title(){return this.label?this.label[0].toUpperCase()+this.label?.substring(1).toLowerCase():""}get isCompleted(){return this.label===this.status.COMPLETED}}Ag.\u0275fac=function(t){return new(t||Ag)},Ag.\u0275cmp=Me({type:Ag,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(t,e){if(1&t&&(M(0,R_e,1,7,"button",0),M(1,F_e,6,0,"ng-template",null,1,Bn)),2&t){const i=Dn(2);v("ngIf",e.label!==e.status.ERROR)("ngIfElse",i)}},dependencies:[fi,Kt,Vo],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 z_e=n=>new Wt({key:n.pluginKey,view:t=>new V_e({view:t,...n})});class V_e{constructor({dotUploadFileService:t,editor:e,component:i,element:r,view:o}){this.preventHide=!1,this.$destroy=new ae,this.initialLabel="Import to dotCMS",this.offset=10,this.editor=e,this.element=r,this.view=o,this.component=i,this.dotUploadFileService=t,this.component.instance.byClick.pipe(mn(this.$destroy)).subscribe(()=>this.uploadImagedotCMS()),this.element.remove(),this.element.style.visibility="visible"}update(t,e){const{state:i,composing:r}=t,{doc:o,selection:s}=i,{empty:a,ranges:l}=s,c=e&&e.doc.eq(o)&&e.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(io.name);if(a||d!==io.name||h?.data)return void this.hide();const p=t.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:t})=>{const{bottom:i,left:r,top:o}=t,{bottom:s}=n,l=Math.ceil(s-i)<0?s:o-65,c=othis.updateButtonLabel(t)}).pipe(Et(1),hn(()=>this.updateButtonLoading(!1))).subscribe(t=>{const e=t[0];this.updateButtonLabel($l.COMPLETED),this.updateImageNode(e[Object.keys(e)[0]])},()=>{this.updateButtonLoading(!1),this.updateButtonLabel($l.ERROR),this.setPreventHide()})}updateButtonLabel(t){this.component.instance.label=t,this.component.changeDetectorRef.detectChanges()}updateButtonLoading(t){this.component.instance.isLoading=t,this.component.changeDetectorRef.detectChanges()}}const B_e=new on("floating-button");function U_e(n,t){const e=t.createComponent(Ag),i=e.location.nativeElement,r=n.get(Xs);return Mn.create({addProseMirrorPlugins(){return i?[z_e({...this.options,dotUploadFileService:r,component:e,pluginKey:B_e,editor:this.editor,element:i})]:[]}})}const kg=new on("freeze-scroll"),H_e=Mn.create({name:"freezeScroll",addCommands:()=>({freezeScroll:n=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(kg,{freezeScroll:n}),!0)).run()}),addProseMirrorPlugins:()=>[$_e]}),$_e=new Wt({key:kg,state:{init:()=>({freezeScroll:!1}),apply(n,t,e){const{freezeScroll:i}=n.getMeta(kg)||{},r=kg?.getState(e);return"boolean"==typeof i?{freezeScroll:i}:r||t}}});function W_e(n,t){if(1&n&&(I(0,"div",2),_e(1,"i"),Ne(2),A()),2&n){const e=t.$implicit;C(1),pn(e.icon),C(1),Yi(" ",e.label," ")}}var qa=(()=>(function(n){n.ACCEPT="ACCEPT",n.DELETE="DELETE",n.REGENERATE="REGENERATE"}(qa||(qa={})),qa))();class Ng{constructor(){this.actionEmitter=new re,this.tooltipContent="Describe the size, color palette, style, mood, etc.",this.dotMessageService=it(Zr)}ngOnInit(){this.actionOptions=[{label:this.dotMessageService.get("block-editor.common.accept"),icon:"pi pi-check",callback:()=>this.emitAction(qa.ACCEPT),selectedOption:!0},{label:this.dotMessageService.get("block-editor.common.regenerate"),icon:"pi pi-sync",callback:()=>this.emitAction(qa.REGENERATE),selectedOption:!1},{label:this.dotMessageService.get("block-editor.common.delete"),icon:"pi pi-trash",callback:()=>this.emitAction(qa.DELETE),selectedOption:!1}]}emitAction(t){this.actionEmitter.emit(t)}}Ng.\u0275fac=function(t){return new(t||Ng)},Ng.\u0275cmp=Me({type:Ng,selectors:[["dot-ai-content-actions"]],outputs:{actionEmitter:"actionEmitter"},decls:2,vars:1,consts:[[3,"options","onClick"],["pTemplate","item"],[1,"action-content"]],template:function(t,e){1&t&&(I(0,"p-listbox",0),ue("onClick",function(r){return r.value.callback()}),M(1,W_e,3,3,"ng-template",1),A()),2&t&&v("options",e.actionOptions)},dependencies:[qi,VL],styles:["[_nghost-%COMP%] .p-listbox{display:block;width:12.5rem;padding:.5rem;margin-left:4rem}[_nghost-%COMP%] .p-listbox .p-listbox-list .p-listbox-item{padding:.75rem 1rem;border-bottom:1px solid #ebecef;background-color:#fff}[_nghost-%COMP%] .p-listbox .p-listbox-list .p-listbox-item:last-child{border-bottom:none}[_nghost-%COMP%] .p-listbox .p-listbox-list .p-listbox-item: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 G_e={duration:[500,0],interactive:!0,maxWidth:200,trigger:"manual",hideOnClick:!1,placement:"bottom-start",popperOptions:{modifiers:[{name:"preventOverflow",options:{altAxis:!0}}]}};class Y_e{constructor(t){this.destroy$=new ae;const{editor:e,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=t;this.editor=e,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.pluginKey=s,this.component=a,this.aiContentPromptStore=this.component.injector.get(Yl),this.dotAiImagePromptStore=this.component.injector.get(Ga),this.component.instance.actionEmitter.pipe(mn(this.destroy$)).subscribe(l=>{switch(l){case qa.ACCEPT:this.acceptContent();break;case qa.REGENERATE:this.generateContent();break;case qa.DELETE:this.deleteContent()}}),this.view.dom.addEventListener("keydown",this.handleKeyDown.bind(this))}update(t,e){const i=this.pluginKey?.getState(t.state),r=e?this.pluginKey?.getState(e):{open:!1};i?.open!==r?.open?(this.createTooltip(),i.open?this.show():this.hide()):this.tippy?.popperInstance?.forceUpdate()}createTooltip(){const{element:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=gs(t.parentElement,{...G_e,...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)}acceptContent(){const t=this.pluginKey?.getState(this.view.state);this.editor.commands.closeAIContentActions(),t.nodeType===mg&&this.aiContentPromptStore.setAcceptContent(!0)}generateContent(){const t=this.pluginKey?.getState(this.view.state);switch(this.editor.commands.closeAIContentActions(),t.nodeType){case mg:this.aiContentPromptStore.reGenerateContent();break;case oE:this.dotAiImagePromptStore.reGenerateContent()}}deleteContent(){switch(this.pluginKey?.getState(this.view.state).nodeType){case mg:this.aiContentPromptStore.setDeleteContent(!0);break;case oE:this.editor.commands.deleteSelection()}this.editor.commands.closeAIContentActions()}handleKeyDown(t){"Backspace"===t.key&&this.editor.commands.closeAIContentActions()}}const q_e=n=>new Wt({key:n.pluginKey,view:t=>new Y_e({view:t,...n}),state:{init:()=>({open:!1,nodeType:null}),apply(t,e,i){const{open:r,nodeType:o}=t.getMeta(Pg)||{},s=Pg?.getState(i);return"boolean"==typeof r?{open:r,nodeType:o}:s||e}}}),Pg=new on("aiContentActions-form"),K_e=n=>Mn.create({name:"aiContentActions",addOptions:()=>({element:null,tippyOptions:{},pluginKey:Pg}),addCommands:()=>({openAIContentActions:t=>({chain:e})=>e().command(({tr:i})=>(i.setMeta(Pg,{open:!0,nodeType:t}),!0)).freezeScroll(!0).run(),closeAIContentActions:()=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(Pg,{open:!1}),!0)).freezeScroll(!1).run()}),addProseMirrorPlugins(){const t=n.createComponent(Ng);return t.changeDetectorRef.detectChanges(),[q_e({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,component:t})]}}),lV={leading:!0,trailing:!1};class X_e{constructor(t,e,i,r){this.duration=t,this.scheduler=e,this.leading=i,this.trailing=r}call(t,e){return e.subscribe(new eve(t,this.duration,this.scheduler,this.leading,this.trailing))}}class eve extends ne{constructor(t,e,i,r,o){super(t),this.duration=e,this.scheduler=i,this.leading=r,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}_next(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(tve,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)}}function tve(n){const{subscriber:t}=n;t.clearThrottle()}const nve={loading:!0,preventScroll:!1,contentlets:[],languageId:1,search:"",assetType:null};class Au extends qS{constructor(t,e){super(nve),this.searchService=t,this.dotLanguageService=e,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(hn(r=>{this.updateLoading(!0),this.updateSearch(r)}),Gh(this.state$),fe(([r,o])=>({...o,search:r})),ni(r=>this.searchContentletsRequest(this.params({...r}),[])))),this.nextBatch=this.effect(i=>i.pipe(Gh(this.state$),fe(([r,o])=>({...o,offset:r})),ni(({contentlets:r,...o})=>this.searchContentletsRequest(this.params(o),r)))),this.dotLanguageService.getLanguages().subscribe(i=>{this.languages=i})}searchContentletsRequest(t,e){return this.searchService.get(t).pipe(fe(({jsonObjectView:{contentlets:i}})=>{const r=this.setContentletLanguage(i);return this.updateLoading(!1),this.updatePreventScroll(!i?.length),this.updateContentlets([...e,...r])}))}params({search:t,assetType:e,offset:i=0,languageId:r}){return{query:`+catchall:${t.includes("-")?t:`${t}*`} title:'${t}'^15 +languageId:${r} +baseType:(4 OR 9) +metadata.contenttype:${e||""}/* +deleted:false +working:true`,sortOrder:Qb.ASC,limit:20,offset:i}}setContentletLanguage(t){return t.map(e=>({...e,language:this.getLanguage(e.languageId)}))}getLanguage(t){const{languageCode:e,countryCode:i}=this.languages[t];return e&&i?`${e}-${i}`:""}}function ive(n,t){if(1&n&&(I(0,"div",3),_e(1,"dot-contentlet-thumbnail",4),A()),2&n){const e=D();C(1),v("contentlet",e.contentlet)("cover",!1)("iconSize","72px")("showVideoThumbnail",e.showVideoThumbnail)}}function rve(n,t){if(1&n&&(I(0,"h2",5),Ne(1),A()),2&n){const e=D();C(1),At((null==e.contentlet?null:e.contentlet.fileName)||(null==e.contentlet?null:e.contentlet.title))}}function ove(n,t){if(1&n&&(I(0,"div",6)(1,"span",7),Ne(2),A(),_e(3,"dot-state-icon",8),A()),2&n){const e=D();C(2),At(e.contentlet.language),C(1),v("state",e.contentlet)}}Au.\u0275fac=function(t){return new(t||Au)(F($h),F(Hl))},Au.\u0275prov=H({token:Au,factory:Au.\u0275fac});class Lg{constructor(t){this.dotMarketingConfigService=t,this.showVideoThumbnail=!0}ngOnInit(){this.showVideoThumbnail=this.dotMarketingConfigService.getProperty(Qp.SHOW_VIDEO_THUMBNAIL)}getImage(t){return`/dA/${t}/500w/50q`}getContentletIcon(){return"FILEASSET"!==this.contentlet?.baseType?this.contentlet?.contentTypeIcon:this.contentlet?.__icon__}}Lg.\u0275fac=function(t){return new(t||Lg)(O(bu))},Lg.\u0275cmp=Me({type:Lg,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(t,e){1&t&&(I(0,"p-card"),M(1,ive,2,4,"ng-template",0),M(2,rve,2,1,"h2",1),M(3,ove,4,2,"ng-template",2),A()),2&t&&(C(2),v("pTemplate","title"))},dependencies:[aE,qi],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 sve=(()=>{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(e){return new(e||n)},n.\u0275cmp=Me({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(e,i){1&e&&_e(0,"div",0),2&e&&(pn(i.styleClass),v("ngClass",i.containerClass())("ngStyle",i.containerStyle()))},dependencies:[fi,sr],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})(),cV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();function ave(n,t){1&n&&_e(0,"p-skeleton",3)}function lve(n,t){1&n&&(I(0,"div",4),_e(1,"p-skeleton",5)(2,"p-skeleton",6),A())}class Rg{}function cve(n,t){if(1&n){const e=We();I(0,"dot-asset-card",7),ue("click",function(){de(e);const r=D().$implicit;return he(D(2).selectedItem.emit(r[0]))}),A()}2&n&&v("contentlet",D().$implicit[0])}function uve(n,t){if(1&n){const e=We();I(0,"dot-asset-card",7),ue("click",function(){de(e);const r=D().$implicit;return he(D(2).selectedItem.emit(r[1]))}),A()}2&n&&v("contentlet",D().$implicit[1])}function dve(n,t){if(1&n&&(I(0,"div",5),M(1,cve,1,1,"dot-asset-card",6),M(2,uve,1,1,"dot-asset-card",6),A()),2&n){const e=t.$implicit;C(1),v("ngIf",e[0]),C(1),v("ngIf",e[1])}}function hve(n,t){if(1&n){const e=We();I(0,"p-scroller",3),ue("onScrollIndexChange",function(r){return de(e),he(D().onScrollIndexChange(r))}),M(1,dve,3,2,"ng-template",4),A()}if(2&n){const e=D();v("itemSize",110)("items",e.rows)("lazy",!0)}}function fve(n,t){1&n&&(I(0,"div",5),_e(1,"dot-asset-card-skeleton")(2,"dot-asset-card-skeleton"),A())}function pve(n,t){if(1&n&&(I(0,"div",8),M(1,fve,3,0,"div",9),A()),2&n){const e=D();C(1),v("ngForOf",e.loadingItems)}}function mve(n,t){if(1&n&&(I(0,"div",10),_e(1,"img",11),I(2,"p"),Ne(3,"No results found, try searching again"),A()()),2&n){const e=D();C(1),v("src",e.icon,sl)}}Rg.\u0275fac=function(t){return new(t||Rg)},Rg.\u0275cmp=Me({type:Rg,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(t,e){1&t&&(I(0,"p-card"),M(1,ave,1,0,"ng-template",0),_e(2,"p-skeleton",1),M(3,lve,3,0,"ng-template",2),A())},dependencies:[aE,qi,sve],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 Fg{constructor(){this.nextBatch=new re,this.selectedItem=new re,this.done=!1,this.loading=!0,this.loadingItems=[null,null,null],this.icon=zs("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDEiIHZpZXdCb3g9IjAgMCA0MCA0MSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuMDc2MTcgOC41NTcxMkgwLjA5NTIxNDhWMzYuNDIzOEMwLjA5NTIxNDggMzguNjEzMyAxLjg4NjY0IDQwLjQwNDcgNC4wNzYxNyA0MC40MDQ3SDMxLjk0MjhWMzYuNDIzOEg0LjA3NjE3VjguNTU3MTJaTTM1LjkyMzggMC41OTUyMTVIMTIuMDM4MUM5Ljg0ODU1IDAuNTk1MjE1IDguMDU3MTIgMi4zODY2NCA4LjA1NzEyIDQuNTc2MTdWMjguNDYxOUM4LjA1NzEyIDMwLjY1MTQgOS44NDg1NSAzMi40NDI4IDEyLjAzODEgMzIuNDQyOEgzNS45MjM4QzM4LjExMzMgMzIuNDQyOCAzOS45MDQ3IDMwLjY1MTQgMzkuOTA0NyAyOC40NjE5VjQuNTc2MTdDMzkuOTA0NyAyLjM4NjY0IDM4LjExMzMgMC41OTUyMTUgMzUuOTIzOCAwLjU5NTIxNVpNMzUuOTIzOCAyOC40NjE5SDEyLjAzODFWNC41NzYxN0gzNS45MjM4VjI4LjQ2MTlaTTIxLjk5MDUgMjQuNDgwOUgyNS45NzE0VjE4LjUwOTVIMzEuOTQyOFYxNC41Mjg1SDI1Ljk3MTRWOC41NTcxMkgyMS45OTA1VjE0LjUyODVIMTYuMDE5VjE4LjUwOTVIMjEuOTkwNVYyNC40ODA5WiIgZmlsbD0iIzU3NkJFOCIvPgo8L3N2Zz4K"),this._itemRows=[],this._offset=0}set contentlets(t){this._offset=t?.length||0,this._itemRows=this.createRowItem(t)}get rows(){return[...this._itemRows]}onScrollIndexChange(t){this.done||t.last===this.rows.length&&this.nextBatch.emit(this._offset)}createRowItem(t=[]){const e=[];return t.forEach(i=>{const r=e.length-1;e[r]?.length<2?e[r].push(i):e.push([i])}),e}}Fg.\u0275fac=function(t){return new(t||Fg)},Fg.\u0275cmp=Me({type:Fg,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(t,e){if(1&t&&(M(0,hve,2,3,"p-scroller",0),M(1,pve,2,1,"ng-template",null,1,Bn),M(3,mve,4,1,"ng-template",null,2,Bn)),2&t){const i=Dn(2),r=Dn(4);v("ngIf",(null==e.rows?null:e.rows.length)&&!e.loading)("ngIfElse",e.loading?i:r)}},dependencies:[Gr,Kt,qi,G5,Lg,Rg],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 gve=["input"];function yve(n,t){if(1&n){const e=We();dt(0),I(1,"dot-asset-card-list",6),ue("selectedItem",function(r){return de(e),he(D().addAsset.emit(r))})("nextBatch",function(r){return de(e),he(D().offset$.next(r))}),A(),ht()}if(2&n){const e=t.ngIf;C(1),v("contentlets",e.contentlets)("done",e.preventScroll)("loading",e.loading)}}class jg{constructor(t){this.store=t,this.addAsset=new re,this.vm$=this.store.vm$,this.offset$=new Kr(0),this.destroy$=new ae}set languageId(t){this.store.updatelanguageId(t)}set type(t){this.store.updateAssetType(t)}ngOnInit(){this.store.searchContentlet(""),this.offset$.pipe(mn(this.destroy$),o0(1),function J_e(n,t=Xd,e=lV){return i=>i.lift(new X_e(n,t,e.leading,e.trailing))}(450)).subscribe(this.store.nextBatch),requestAnimationFrame(()=>this.input.nativeElement.focus())}ngAfterViewInit(){Mv(this.input.nativeElement,"input").pipe(mn(this.destroy$),th(450)).subscribe(({target:t})=>{this.store.searchContentlet(t.value)})}ngOnDestroy(){this.destroy$.next(!0)}}jg.\u0275fac=function(t){return new(t||jg)(O(Au))},jg.\u0275cmp=Me({type:jg,selectors:[["dot-asset-search"]],viewQuery:function(t,e){if(1&t&&en(gve,5),2&t){let i;Ke(i=Qe())&&(e.input=i.first)}},inputs:{languageId:"languageId",type:"type"},outputs:{addAsset:"addAsset"},features:[Pt([Au])],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(t,e){1&t&&(dt(0),I(1,"div",0)(2,"span",1),_e(3,"input",2,3)(5,"i",4),A()(),ht(),M(6,yve,2,3,"ng-container",5),Qn(7,"async")),2&t&&(C(6),v("ngIf",Zn(7,1,e.vm$)))},dependencies:[Kt,hg,Fg,k_],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 _ve=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'}},vve=["input"],wve=/(youtube\.com\/watch\?v=.*)|(youtu\.be\/.*)/;class zg{constructor(t,e){this.fb=t,this.cd=e,this.addAsset=new re,this.disableAction=!1,this.form=this.fb.group({url:["",[$d.required,$d.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(wve)&&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:t}){this.addAsset.emit(t)}tryToPlayVideo(t){const e=document.createElement("video");this.disableAction=!0,e.addEventListener("error",i=>{this.form.controls.url.setErrors({message:_ve(i)}),this.cd.detectChanges()}),e.addEventListener("canplay",()=>{this.form.controls.url.setErrors(null),this.disableAction=!1,this.cd.detectChanges()}),e.src=`${t}#t=0.1`}}zg.\u0275fac=function(t){return new(t||zg)(O(rv),O(Un))},zg.\u0275cmp=Me({type:zg,selectors:[["dot-external-asset"]],viewQuery:function(t,e){if(1&t&&en(vve,5),2&t){let i;Ke(i=Qe())&&(e.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(t,e){1&t&&(I(0,"form",0),ue("ngSubmit",function(){return e.onSubmit(e.form.value)}),I(1,"div",1)(2,"label",2),Ne(3),A(),_e(4,"input",3,4),A(),I(6,"div",5),_e(7,"span",6),I(8,"button",7),Ne(9,"Insert"),A()()()),2&t&&(v("formGroup",e.form),C(3),Yi("Insert ",e.type," URL"),C(1),v("placeholder",e.placerHolder),C(3),yo("hide",!e.isInvalid||e.form.pristine),v("innerHTML",e.error||"Enter a valid url",vc),C(1),v("disabled",e.form.invalid||e.disableAction))},dependencies:[Qd,hl,Ac,Wd,Aa,kc,Vo,hg],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 Cve=sv("shakeit",[G2("shakestart",Ai({transform:"scale(1.1)"})),G2("shakeend",Ai({transform:"scale(1)"})),Lc("shakestart => shakeend",Pc("1000ms ease-in",function tK(n){return{type:5,steps:n}}([Ai({transform:"translate3d(-2px, 0, 0)",offset:.1}),Ai({transform:"translate3d(4px, 0, 0)",offset:.2}),Ai({transform:"translate3d(-4px, 0, 0)",offset:.3}),Ai({transform:"translate3d(4px, 0, 0)",offset:.4}),Ai({transform:"translate3d(-4px, 0, 0)",offset:.5}),Ai({transform:"translate3d(4px, 0, 0)",offset:.6}),Ai({transform:"translate3d(-4px, 0, 0)",offset:.7}),Ai({transform:"translate3d(4px, 0, 0)",offset:.8}),Ai({transform:"translate3d(-2px, 0, 0)",offset:.9})])))]);function Dve(n,t){1&n&&_e(0,"span",11),2&n&&v("innerHTML",D(2).$implicit.summary,vc)}function Tve(n,t){1&n&&_e(0,"span",12),2&n&&v("innerHTML",D(2).$implicit.detail,vc)}function Mve(n,t){if(1&n&&(dt(0),M(1,Dve,1,1,"span",9),M(2,Tve,1,1,"span",10),ht()),2&n){const e=D().$implicit;C(1),v("ngIf",e.summary),C(1),v("ngIf",e.detail)}}function Sve(n,t){if(1&n&&(I(0,"span",15),Ne(1),A()),2&n){const e=D(2).$implicit;C(1),At(e.summary)}}function Eve(n,t){if(1&n&&(I(0,"span",16),Ne(1),A()),2&n){const e=D(2).$implicit;C(1),At(e.detail)}}function xve(n,t){if(1&n&&(M(0,Sve,2,1,"span",13),M(1,Eve,2,1,"span",14)),2&n){const e=D().$implicit;v("ngIf",e.summary),C(1),v("ngIf",e.detail)}}function Ive(n,t){if(1&n){const e=We();I(0,"button",17),ue("click",function(){de(e);const r=D().index;return he(D(2).removeMessage(r))}),_e(1,"i",18),A()}}const Ove=function(n,t){return{showTransitionParams:n,hideTransitionParams:t}},Ave=function(n){return{value:"visible",params:n}},kve=function(n,t,e,i){return{"pi-info-circle":n,"pi-check":t,"pi-exclamation-triangle":e,"pi-times-circle":i}};function Nve(n,t){if(1&n&&(I(0,"div",4)(1,"div",5),_e(2,"span",6),M(3,Mve,3,2,"ng-container",1),M(4,xve,2,2,"ng-template",null,7,Bn),M(6,Ive,2,0,"button",8),A()()),2&n){const e=t.$implicit,i=Dn(5),r=D(2);pn("p-message p-message-"+e.severity),v("@messageAnimation",Mt(12,Ave,bi(9,Ove,r.showTransitionOptions,r.hideTransitionOptions))),C(2),pn("p-message-icon pi"+(e.icon?" "+e.icon:"")),v("ngClass",Fd(14,kve,"info"===e.severity,"success"===e.severity,"warn"===e.severity,"error"===e.severity)),C(1),v("ngIf",!r.escape)("ngIfElse",i),C(3),v("ngIf",r.closable)}}function Pve(n,t){if(1&n&&(dt(0),M(1,Nve,7,19,"div",3),ht()),2&n){const e=D();C(1),v("ngForOf",e.messages)}}function Lve(n,t){1&n&&_t(0)}function Rve(n,t){if(1&n&&(I(0,"div",19)(1,"div",5),M(2,Lve,1,0,"ng-container",20),A()()),2&n){const e=D();v("ngClass","p-message p-message-"+e.severity),C(2),v("ngTemplateOutlet",e.contentTemplate)}}let Fve=(()=>{class n{constructor(e,i,r){this.messageService=e,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(e){this.messages=e,this.startMessageLifes(this.messages)}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template}),this.messageService&&this.enableService&&!this.contentTemplate&&(this.messageSubscription=this.messageService.messageObserver.subscribe(e=>{if(e){e instanceof Array||(e=[e]);const i=e.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(e=>{e?this.key===e&&(this.messages=null):this.messages=null,this.cd.markForCheck()}))}hasMessages(){let e=this.el.nativeElement.parentElement;return!(!e||!e.offsetParent)&&(null!=this.contentTemplate||this.messages&&this.messages.length>0)}clear(){this.messages=[],this.valueChange.emit(this.messages)}removeMessage(e){this.messages=this.messages.filter((i,r)=>r!==e),this.valueChange.emit(this.messages)}get icon(){const e=this.severity||(this.hasMessages()?this.messages[0].severity:null);if(this.hasMessages())switch(e){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(e=>e.unsubscribe())}startMessageLifes(e){e?.forEach(i=>i.life&&this.startMessageLife(i))}startMessageLife(e){const i=YL(e.life).subscribe(()=>{this.messages=this.messages?.filter(r=>r!==e),this.timerSubscriptions=this.timerSubscriptions?.filter(r=>r!==i),this.valueChange.emit(this.messages),this.cd.markForCheck()});this.timerSubscriptions.push(i)}}return n.\u0275fac=function(e){return new(e||n)(O(nZ,8),O(Tt),O(Un))},n.\u0275cmp=Me({type:n,selectors:[["p-messages"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(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(e,i){if(1&e&&(I(0,"div",0),M(1,Pve,2,1,"ng-container",1),M(2,Rve,3,2,"ng-template",null,2,Bn),A()),2&e){const r=Dn(3);pn(i.styleClass),v("ngStyle",i.style),C(1),v("ngIf",!i.contentTemplate)("ngIfElse",r)}},dependencies:[fi,Gr,Kt,_o,sr,Bc],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:[sv("messageAnimation",[Lc(":enter",[Ai({opacity:0,transform:"translateY(-25%)"}),Pc("{{showTransitionParams}}")]),Lc(":leave",[Pc("{{hideTransitionParams}}",Ai({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0}),n})(),uV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,Pa]}),n})();function jve(n,t){if(1&n&&(I(0,"div",5),Ne(1),A()),2&n){const e=D(2);Mc("display",null!=e.value&&0!==e.value?"flex":"none"),C(1),o_("",e.value,"",e.unit,"")}}function zve(n,t){if(1&n&&(I(0,"div",3),M(1,jve,2,4,"div",4),A()),2&n){const e=D();Mc("width",e.value+"%")("background",e.color),C(1),v("ngIf",e.showValue)}}function Vve(n,t){if(1&n&&(I(0,"div",6),_e(1,"div",7),A()),2&n){const e=D();C(1),Mc("background",e.color)}}const Bve=function(n,t){return{"p-progressbar p-component":!0,"p-progressbar-determinate":n,"p-progressbar-indeterminate":t}};let Uve=(()=>{class n{constructor(){this.showValue=!0,this.unit="%",this.mode="determinate"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Me({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(e,i){1&e&&(I(0,"div",0),M(1,zve,2,5,"div",1),M(2,Vve,2,2,"div",2),A()),2&e&&(pn(i.styleClass),v("ngStyle",i.style)("ngClass",bi(7,Bve,"determinate"===i.mode,"indeterminate"===i.mode)),Ot("aria-valuenow",i.value),C(1),v("ngIf","determinate"===i.mode),C(1),v("ngIf","indeterminate"===i.mode))},dependencies:[fi,Kt,sr],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})(),dV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn]}),n})();const Hve=["advancedfileinput"],$ve=["basicfileinput"],Wve=["content"];function Gve(n,t){if(1&n){const e=We();I(0,"p-button",17),ue("onClick",function(){return de(e),he(D(2).upload())}),A()}if(2&n){const e=D(2);v("label",e.uploadButtonLabel)("icon",e.uploadIcon)("disabled",!e.hasFiles()||e.isFileLimitExceeded())("styleClass",e.uploadStyleClass)}}function Yve(n,t){if(1&n){const e=We();I(0,"p-button",17),ue("onClick",function(){return de(e),he(D(2).clear())}),A()}if(2&n){const e=D(2);v("label",e.cancelButtonLabel)("icon",e.cancelIcon)("disabled",!e.hasFiles()||e.uploading)("styleClass",e.cancelStyleClass)}}function qve(n,t){1&n&&_t(0)}function Kve(n,t){1&n&&_e(0,"p-progressBar",18),2&n&&v("value",D(2).progress)("showValue",!1)}function Qve(n,t){if(1&n){const e=We();I(0,"img",26),ue("error",function(r){return de(e),he(D(5).imageError(r))}),A()}if(2&n){const e=D().$implicit,i=D(4);v("src",e.objectURL,sl)("width",i.previewWidth)}}function Zve(n,t){if(1&n){const e=We();I(0,"div",22)(1,"div"),M(2,Qve,1,2,"img",23),A(),I(3,"div",24),Ne(4),A(),I(5,"div"),Ne(6),A(),I(7,"div")(8,"button",25),ue("click",function(r){const s=de(e).index;return he(D(4).remove(r,s))}),A()()()}if(2&n){const e=t.$implicit,i=D(4);C(2),v("ngIf",i.isImage(e)),C(2),At(e.name),C(2),At(i.formatSize(e.size)),C(2),pn(i.removeStyleClass),v("disabled",i.uploading)}}function Jve(n,t){if(1&n&&(I(0,"div"),M(1,Zve,9,6,"div",21),A()),2&n){const e=D(3);C(1),v("ngForOf",e.files)}}function Xve(n,t){}function ebe(n,t){if(1&n&&(I(0,"div"),M(1,Xve,0,0,"ng-template",27),A()),2&n){const e=D(3);C(1),v("ngForOf",e.files)("ngForTemplate",e.fileTemplate)}}function tbe(n,t){if(1&n&&(I(0,"div",19),M(1,Jve,2,1,"div",20),M(2,ebe,2,2,"div",20),A()),2&n){const e=D(2);C(1),v("ngIf",!e.fileTemplate),C(1),v("ngIf",e.fileTemplate)}}function nbe(n,t){1&n&&_t(0)}const ibe=function(n,t){return{"p-focus":n,"p-disabled":t}},rbe=function(n){return{$implicit:n}};function obe(n,t){if(1&n){const e=We();I(0,"div",2)(1,"div",3)(2,"span",4),ue("focus",function(){return de(e),he(D().onFocus())})("blur",function(){return de(e),he(D().onBlur())})("click",function(){return de(e),he(D().choose())})("keydown.enter",function(){return de(e),he(D().choose())}),I(3,"input",5,6),ue("change",function(r){return de(e),he(D().onFileSelect(r))}),A(),_e(5,"span",7),I(6,"span",8),Ne(7),A()(),M(8,Gve,1,4,"p-button",9),M(9,Yve,1,4,"p-button",9),M(10,qve,1,0,"ng-container",10),A(),I(11,"div",11,12),ue("dragenter",function(r){return de(e),he(D().onDragEnter(r))})("dragleave",function(r){return de(e),he(D().onDragLeave(r))})("drop",function(r){return de(e),he(D().onDrop(r))}),M(13,Kve,1,2,"p-progressBar",13),_e(14,"p-messages",14),M(15,tbe,3,2,"div",15),M(16,nbe,1,0,"ng-container",16),A()()}if(2&n){const e=D();pn(e.styleClass),v("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",e.style),C(2),pn(e.chooseStyleClass),v("ngClass",bi(24,ibe,e.focus,e.disabled||e.isChooseDisabled())),C(1),v("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),Ot("title",""),C(2),pn(e.chooseIcon),v("ngClass","p-button-icon p-button-icon-left"),C(2),At(e.chooseButtonLabel),C(1),v("ngIf",!e.auto&&e.showUploadButton),C(1),v("ngIf",!e.auto&&e.showCancelButton),C(1),v("ngTemplateOutlet",e.toolbarTemplate),C(3),v("ngIf",e.hasFiles()),C(1),v("value",e.msgs)("enableService",!1),C(1),v("ngIf",e.hasFiles()),C(1),v("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",Mt(27,rbe,e.files))}}function sbe(n,t){if(1&n&&(I(0,"span",8),Ne(1),A()),2&n){const e=D(2);C(1),At(e.basicButtonLabel)}}function abe(n,t){if(1&n){const e=We();I(0,"input",33,34),ue("change",function(r){return de(e),he(D(2).onFileSelect(r))})("focus",function(){return de(e),he(D(2).onFocus())})("blur",function(){return de(e),he(D(2).onBlur())}),A()}if(2&n){const e=D(2);v("accept",e.accept)("multiple",e.multiple)("disabled",e.disabled)}}const lbe=function(n,t,e,i){return{"p-button p-component p-fileupload-choose":!0,"p-button-icon-only":n,"p-fileupload-choose-selected":t,"p-focus":e,"p-disabled":i}};function cbe(n,t){if(1&n){const e=We();I(0,"div",28),_e(1,"p-messages",14),I(2,"span",29),ue("mouseup",function(){return de(e),he(D().onBasicUploaderClick())})("keydown",function(r){return de(e),he(D().onBasicKeydown(r))}),_e(3,"span",30),M(4,sbe,2,1,"span",31),M(5,abe,2,3,"input",32),A()()}if(2&n){const e=D();C(1),v("value",e.msgs)("enableService",!1),C(1),pn(e.styleClass),v("ngClass",Fd(9,lbe,!e.basicButtonLabel,e.hasFiles(),e.focus,e.disabled))("ngStyle",e.style),C(1),v("ngClass",e.hasFiles()&&!e.auto?e.uploadIcon:e.chooseIcon),C(1),v("ngIf",e.basicButtonLabel),C(1),v("ngIf",!e.hasFiles())}}let ube=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,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(e){this._files=[];for(let i=0;i{switch(e.getType()){case"file":default:this.fileTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"toolbar":this.toolbarTemplate=e.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(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.msgs=[],this.multiple||(this.files=[]);let i=e.dataTransfer?e.dataTransfer.files:e.target.files;for(let r=0;rthis.maxFileSize&&(this.msgs.push({severity:"error",summary:this.invalidFileSizeMessageSummary.replace("{0}",e.name),detail:this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}),1))}isFileTypeValid(e){let i=this.accept.split(",").map(r=>r.trim());for(let r of i)if(this.isWildcard(r)?this.getTypeClass(e.type)===this.getTypeClass(r):e.type==r||this.getFileExtension(e).toLowerCase()===r.toLowerCase())return!0;return!1}getTypeClass(e){return e.substring(0,e.indexOf("/"))}isWildcard(e){return-1!==e.indexOf("*")}getFileExtension(e){return"."+e.name.split(".").pop()}isImage(e){return/^image\//.test(e.type)}onImageLoad(e){window.URL.revokeObjectURL(e.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 e=new FormData;this.onBeforeUpload.emit({formData:e});for(let i=0;i{switch(i.type){case An.Sent:this.onSend.emit({originalEvent:i,formData:e});break;case An.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 An.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(e,i){this.clearInputElement(),this.onRemove.emit({originalEvent:e,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(e){this.disabled||(e.stopPropagation(),e.preventDefault())}onDragOver(e){this.disabled||(Z.addClass(this.content.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,e.stopPropagation(),e.preventDefault())}onDragLeave(e){this.disabled||Z.removeClass(this.content.nativeElement,"p-fileupload-highlight")}onDrop(e){if(!this.disabled){Z.removeClass(this.content.nativeElement,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault();let i=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||i&&1===i.length)&&this.onFileSelect(e)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(e){if(0==e)return"0 B";let s=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/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(e){switch(e.code){case"Space":case"Enter":this.onBasicUploaderClick(),e.preventDefault()}}imageError(e){this.onImageError.emit(e)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(Vc.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(Vc.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(Vc.CANCEL)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.content.nativeElement.removeEventListener("dragover",this.onDragOver),this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(dT),O(qt),O(ar),O(Un),O(zc))},n.\u0275cmp=Me({type:n,selectors:[["p-fileUpload"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(en(Hve,5),en($ve,5),en(Wve,5)),2&e){let r;Ke(r=Qe())&&(i.advancedFileInput=r.first),Ke(r=Qe())&&(i.basicFileInput=r.first),Ke(r=Qe())&&(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(e,i){1&e&&(M(0,obe,17,29,"div",0),M(1,cbe,6,14,"div",1)),2&e&&(v("ngIf","advanced"===i.mode),C(1),v("ngIf","basic"===i.mode))},dependencies:[fi,Gr,Kt,_o,sr,Vo,BL,Uve,Fve,Bc],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})(),hV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,zo,Bo,dV,uV,Pa,zo,Bo,dV,uV]}),n})();function dbe(n,t){if(1&n&&(dt(0),_e(1,"img",3),ht()),2&n){const e=D();C(1),v("src",e.src||e.file.objectURL,sl)("alt",e.file.name)}}function hbe(n,t){if(1&n&&(dt(0),I(1,"video",4),_e(2,"source",5),A(),ht()),2&n){const e=D();C(2),v("src",e.src||e.file.objectURL,sl)}}function fbe(n,t){1&n&&(I(0,"p"),Ne(1,"Select an accepted asset type"),A())}class Vg{}function pbe(n,t){if(1&n){const e=We();I(0,"p-fileUpload",2),ue("onSelect",function(r){return de(e),he(D().onSelectFile(r.files))}),A()}2&n&&v("accept",D().type+"/*")("customUpload",!0)}function mbe(n,t){if(1&n&&_e(0,"dot-asset-preview",11),2&n){const e=D(2);v("type",e.type)("file",e.file)("src",e.src)}}function gbe(n,t){if(1&n&&(I(0,"span",13),Ne(1),A()),2&n){const e=D(3);C(1),At(e.error)}}function ybe(n,t){1&n&&M(0,gbe,2,1,"ng-template",null,12,Bn)}function _be(n,t){if(1&n){const e=We();I(0,"div",3),M(1,mbe,1,3,"dot-asset-preview",4),M(2,ybe,2,0,null,5),A(),I(3,"div",6)(4,"div",7),_e(5,"dot-spinner",8),I(6,"span",9),ue("@shakeit.done",function(r){return de(e),he(D().shakeEnd(r))}),Ne(7),A()(),I(8,"button",10),ue("click",function(){return de(e),he(D().cancelAction())}),Ne(9," Cancel "),A()()}if(2&n){const e=D();C(1),v("ngIf","UPLOAD"===e.status),C(1),v("ngIf","ERROR"===e.status),C(3),v("size","30px"),C(1),v("@shakeit",e.animation),C(1),Yi(" ",e.errorMessage," ")}}Vg.\u0275fac=function(t){return new(t||Vg)},Vg.\u0275cmp=Me({type:Vg,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(t,e){1&t&&(dt(0,0),M(1,dbe,2,2,"ng-container",1),M(2,hbe,3,1,"ng-container",1),M(3,fbe,2,0,"p",2),ht()),2&t&&(v("ngSwitch",e.type),C(1),v("ngSwitchCase","image"),C(1),v("ngSwitchCase","video"))},dependencies:[Ud,O_,A_],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 ra=(()=>(function(n){n.SELECT="SELECT",n.PREVIEW="PREVIEW",n.UPLOAD="UPLOAD",n.ERROR="ERROR"}(ra||(ra={})),ra))();class Bg{constructor(t,e,i,r){this.sanitizer=t,this.dotUploadFileService=e,this.cd=i,this.el=r,this.uploadedFile=new re,this.preventClose=new re,this.hide=new re,this.status=ra.SELECT,this.animation="shakeend"}get errorMessage(){return` Don't close this window while the ${this.type} uploads`}onClick(t){const e=!this.el.nativeElement.contains(t);this.status===ra.UPLOAD&&e&&this.shakeMe()}ngOnDestroy(){this.preventClose.emit(!1)}onSelectFile(t){const e=t[0],i=new FileReader;this.preventClose.emit(!0),i.onload=r=>this.setFile(e,r.target.result),i.readAsArrayBuffer(e)}cancelAction(){this.file=null,this.status=ra.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=ra.UPLOAD,this.$uploadRequestSubs=this.dotUploadFileService.publishContent({data:this.file,signal:this.controller.signal}).pipe(Et(1),Fi(t=>this.handleError(t))).subscribe(t=>{const e=t[0];this.uploadedFile.emit(e[Object.keys(e)[0]]),this.status=ra.SELECT})}setFile(t,e){const i=new Blob([new Uint8Array(e)],{type:"video/mp4"});this.src=this.sanitizer.bypassSecurityTrustResourceUrl(URL.createObjectURL(i)),this.file=t,this.status=ra.UPLOAD,this.uploadFile(),this.cd.markForCheck()}handleError(t){return this.status=ra.ERROR,this.preventClose.emit(!1),this.error=t?.error?.errors[0]||t.error,console.error(t),vo(t)}cancelUploading(){this.$uploadRequestSubs.unsubscribe(),this.controller?.abort()}}Bg.\u0275fac=function(t){return new(t||Bg)(O(dT),O(Xs),O(Un),O(Tt))},Bg.\u0275cmp=Me({type:Bg,selectors:[["dot-upload-asset"]],hostBindings:function(t,e){1&t&&ue("click",function(r){return e.onClick(r.target)},0,JI)},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(t,e){if(1&t&&(M(0,pbe,1,2,"p-fileUpload",0),M(1,_be,10,5,"ng-template",null,1,Bn)),2&t){const i=Dn(2);v("ngIf","SELECT"===e.status)("ngIfElse",i)}},dependencies:[Kt,Yh,Vo,ube,Vg],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:[Cve]},changeDetection:0});let pV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,BF,Pa,Du,BF,Du]}),n})();function Wbe(n,t){1&n&&_t(0)}function Gbe(n,t){if(1&n&&(dt(0),M(1,Wbe,1,0,"ng-container",3),ht()),2&n){const e=D(2);C(1),v("ngTemplateOutlet",e.contentTemplate)}}function Ybe(n,t){if(1&n&&(I(0,"div",1),Ri(1),M(2,Gbe,2,1,"ng-container",2),A()),2&n){const e=D();v("hidden",!e.selected),Ot("id",e.id)("aria-hidden",!e.selected)("aria-labelledby",e.id+"-label"),C(2),v("ngIf",e.contentTemplate&&(e.cache?e.loaded:e.selected))}}const mV=["*"],qbe=["content"],Kbe=["navbar"],Qbe=["prevBtn"],Zbe=["nextBtn"],Jbe=["inkbar"];function Xbe(n,t){if(1&n){const e=We();I(0,"button",12,13),ue("click",function(){return de(e),he(D().navBackward())}),_e(2,"span",14),A()}}function e0e(n,t){1&n&&_e(0,"span",24),2&n&&v("ngClass",D(3).$implicit.leftIcon)}function t0e(n,t){1&n&&_e(0,"span",25),2&n&&v("ngClass",D(3).$implicit.rightIcon)}function n0e(n,t){if(1&n&&(dt(0),M(1,e0e,1,1,"span",21),I(2,"span",22),Ne(3),A(),M(4,t0e,1,1,"span",23),ht()),2&n){const e=D(2).$implicit;C(1),v("ngIf",e.leftIcon),C(2),At(e.header),C(1),v("ngIf",e.rightIcon)}}function i0e(n,t){1&n&&_t(0)}function r0e(n,t){if(1&n){const e=We();I(0,"span",26),ue("click",function(r){de(e);const o=D(2).$implicit;return he(D().close(r,o))}),A()}}const o0e=function(n,t){return{"p-highlight":n,"p-disabled":t}};function s0e(n,t){if(1&n){const e=We();I(0,"li",16)(1,"a",17),ue("click",function(r){de(e);const o=D().$implicit;return he(D().open(r,o))})("keydown.enter",function(r){de(e);const o=D().$implicit;return he(D().open(r,o))}),M(2,n0e,5,3,"ng-container",18),M(3,i0e,1,0,"ng-container",19),M(4,r0e,1,0,"span",20),A()()}if(2&n){const e=D().$implicit;pn(e.headerStyleClass),v("ngClass",bi(16,o0e,e.selected,e.disabled))("ngStyle",e.headerStyle),C(1),v("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),Ot("id",e.id+"-label")("aria-selected",e.selected)("aria-controls",e.id)("aria-selected",e.selected)("tabindex",e.disabled?null:"0"),C(1),v("ngIf",!e.headerTemplate),C(1),v("ngTemplateOutlet",e.headerTemplate),C(1),v("ngIf",e.closable)}}function a0e(n,t){1&n&&M(0,s0e,5,19,"li",15),2&n&&v("ngIf",!t.$implicit.closed)}function l0e(n,t){if(1&n){const e=We();I(0,"button",27,28),ue("click",function(){return de(e),he(D().navForward())}),_e(2,"span",29),A()}}const c0e=function(n){return{"p-tabview p-component":!0,"p-tabview-scrollable":n}};let u0e=0,gV=(()=>{class n{constructor(e,i,r){this.viewContainer=i,this.cd=r,this.cache=!0,this.tooltipPosition="top",this.tooltipPositionStyle="absolute",this.id="p-tabpanel-"+u0e++,this.tabView=e}ngAfterContentInit(){this.templates.forEach(e=>{"header"===e.getType()?this.headerTemplate=e.template:this.contentTemplate=e.template})}get selected(){return this._selected}set selected(e){this._selected=e,this.loaded||this.cd.detectChanges(),e&&(this.loaded=!0)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.tabView.cd.markForCheck()}get header(){return this._header}set header(e){this._header=e,Promise.resolve().then(()=>{this.tabView.updateInkBar(),this.tabView.cd.markForCheck()})}get leftIcon(){return this._leftIcon}set leftIcon(e){this._leftIcon=e,this.tabView.cd.markForCheck()}get rightIcon(){return this._rightIcon}set rightIcon(e){this._rightIcon=e,this.tabView.cd.markForCheck()}ngOnDestroy(){this.view=null}}return n.\u0275fac=function(e){return new(e||n)(O(Ut(()=>yV)),O($r),O(Un))},n.\u0275cmp=Me({type:n,selectors:[["p-tabPanel"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,qi,4),2&e){let o;Ke(o=Qe())&&(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:mV,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(e,i){1&e&&(go(),M(0,Ybe,3,5,"div",0)),2&e&&v("ngIf",!i.closed)},dependencies:[Kt,_o],encapsulation:2}),n})(),yV=(()=>{class n{constructor(e,i){this.el=e,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(e=>{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(e,i){if(i.disabled)e&&e.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:e,index:o}),this.updateScrollBar(o)}e&&e.preventDefault()}}close(e,i){this.controlClose?this.onClose.emit({originalEvent:e,index:this.findTabIndex(i),close:()=>{this.closeTab(i)}}):(this.closeTab(i),this.onClose.emit({originalEvent:e,index:this.findTabIndex(i)})),e.stopPropagation()}closeTab(e){if(!e.disabled){if(e.selected){this.tabChanged=!0,e.selected=!1;for(let i=0;ithis._activeIndex&&(this.findSelectedTab().selected=!1,this.tabs[this._activeIndex].selected=!0,this.tabChanged=!0,this.updateScrollBar(e))}updateInkBar(){if(this.navbar){const e=Z.findSingle(this.navbar.nativeElement,"li.p-highlight");if(!e)return;this.inkbar.nativeElement.style.width=Z.getWidth(e)+"px",this.inkbar.nativeElement.style.left=Z.getOffset(e).left-Z.getOffset(this.navbar.nativeElement).left+"px"}}updateScrollBar(e){this.navbar.nativeElement.children[e].scrollIntoView({block:"nearest"})}updateButtonState(){const e=this.content.nativeElement,{scrollLeft:i,scrollWidth:r}=e,o=Z.getWidth(e);this.backwardIsDisabled=0===i,this.forwardIsDisabled=parseInt(i)===r-o}onScroll(e){this.scrollable&&this.updateButtonState(),e.preventDefault()}getVisibleButtonWidths(){return[this.prevBtn?.nativeElement,this.nextBtn?.nativeElement].reduce((e,i)=>i?e+Z.getWidth(i):e,0)}navBackward(){const e=this.content.nativeElement,i=Z.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft-i;e.scrollLeft=r<=0?0:r}navForward(){const e=this.content.nativeElement,i=Z.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft+i,o=e.scrollWidth-i;e.scrollLeft=r>=o?o:r}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(Un))},n.\u0275cmp=Me({type:n,selectors:[["p-tabView"]],contentQueries:function(e,i,r){if(1&e&&Jn(r,gV,4),2&e){let o;Ke(o=Qe())&&(i.tabPanels=o)}},viewQuery:function(e,i){if(1&e&&(en(qbe,5),en(Kbe,5),en(Qbe,5),en(Zbe,5),en(Jbe,5)),2&e){let r;Ke(r=Qe())&&(i.content=r.first),Ke(r=Qe())&&(i.navbar=r.first),Ke(r=Qe())&&(i.prevBtn=r.first),Ke(r=Qe())&&(i.nextBtn=r.first),Ke(r=Qe())&&(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:mV,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(e,i){1&e&&(go(),I(0,"div",0)(1,"div",1),M(2,Xbe,3,0,"button",2),I(3,"div",3,4),ue("scroll",function(o){return i.onScroll(o)}),I(5,"ul",5,6),M(7,a0e,1,1,"ng-template",7),_e(8,"li",8,9),A()(),M(10,l0e,3,0,"button",10),A(),I(11,"div",11),Ri(12),A()()),2&e&&(pn(i.styleClass),v("ngClass",Mt(7,c0e,i.scrollable))("ngStyle",i.style),C(2),v("ngIf",i.scrollable&&!i.backwardIsDisabled),C(5),v("ngForOf",i.tabs),C(3),v("ngIf",i.scrollable&&!i.forwardIsDisabled))},dependencies:[fi,Gr,Kt,_o,sr,yg,Bc],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})(),_V=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Xe({type:n}),n.\u0275inj=ct({imports:[wn,zo,Du,Pa,zo]}),n})();class ku{}ku.\u0275fac=function(t){return new(t||ku)},ku.\u0275mod=Xe({type:ku}),ku.\u0275inj=ct({imports:[pV,Oz,Bo,U5,Sz,OM,mM,_V,cV,Y5,hV,_T,pV,Oz,Bo,U5,Sz,OM,mM,_V,cV,Y5,hV,_T]});class lf{}lf.\u0275fac=function(t){return new(t||lf)},lf.\u0275mod=Xe({type:lf}),lf.\u0275inj=ct({providers:[Xs],imports:[wn,ov,Zd,Tu,ku]}),Si(Xh,[qi,yV,gV,zg,jg,Bg],[]);class Ql{constructor(){this.dotAiService=it($a),this._isPluginInstalled=!1}get isPluginInstalled(){return this._isPluginInstalled}initializeBlockEditor(){return Promise.all([this.verifyAiDotCMSPlugin()])}verifyAiDotCMSPlugin(){var t=this;return Dl(function*(){if(t._isPluginInstalled)return Promise.resolve(t._isPluginInstalled);t._isPluginInstalled=!1;try{const e=yield t.dotAiService.checkPluginInstallation().toPromise();t._isPluginInstalled=200===e.status}catch(e){console.error("Error checking plugin installation:",e)}return t._isPluginInstalled})()}}Ql.\u0275fac=function(t){return new(t||Ql)},Ql.\u0275prov=H({token:Ql,factory:Ql.\u0275fac,providedIn:"root"});class Nu{}Nu.\u0275fac=function(t){return new(t||Nu)},Nu.\u0275mod=Xe({type:Nu}),Nu.\u0275inj=ct({providers:[Wl],imports:[wn,ov,Zd,Bo]}),Si(Gl,[Gr,Kt,Hh,vu,Uh],[]);class cf{}cf.\u0275fac=function(t){return new(t||cf)},cf.\u0275mod=Xe({type:cf}),cf.\u0275inj=ct({providers:[Xs,Co,$c,$a,Zr,Ql,{provide:Vd,useFactory:n=>()=>n.init(),deps:[Zr],multi:!0},{provide:Vd,useFactory:n=>()=>n.initializeBlockEditor(),deps:[Ql],multi:!0},{provide:z5,useFactory:n=>n.isPluginInstalled,deps:[Ql]}],imports:[wn,ov,Zd,Nu,ku,lf,ef,Jh,Zd,Nu]}),Si(sf,[Gr,Kt,xg],[]),Si(rf,[Kt,Qd,hl,Ac,Wd,Aa,kc,lE,Vo,hg,Eg,nf],[]),Si(nf,[Gr,Kt,Hh,vu,cg,Uh],[]);class f0e extends TypeError{constructor(t,e){let i;const{message:r,explanation:o,...s}=t,{path:a}=t,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=[t,...e()])}}function Zo(n){return"object"==typeof n&&null!=n}function Ni(n){return"symbol"==typeof n?n.toString():"string"==typeof n?JSON.stringify(n):`${n}`}function g0e(n,t,e,i){if(!0===n)return;!1===n?n={}:"string"==typeof n&&(n={message:n});const{path:r,branch:o}=t,{type:s}=e,{refinement:a,message:l=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${Ni(i)}\``}=n;return{value:i,type:s,refinement:a,key:r[r.length-1],path:r,branch:o,...n,message:l}}function*yE(n,t,e,i){(function p0e(n){return Zo(n)&&"function"==typeof n[Symbol.iterator]})(n)||(n=[n]);for(const r of n){const o=g0e(r,t,e,i);o&&(yield o)}}function*_E(n,t,e={}){const{path:i=[],branch:r=[n],coerce:o=!1,mask:s=!1}=e,a={path:i,branch:r};if(o&&(n=t.coercer(n,a),s&&"type"!==t.type&&Zo(t.schema)&&Zo(n)&&!Array.isArray(n)))for(const c in n)void 0===t.schema[c]&&delete n[c];let l="valid";for(const c of t.validator(n,a))c.explanation=e.message,l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(n,a)){const h=_E(u,d,{path:void 0===c?i:[...i,c],branch:void 0===c?r:[...r,u],coerce:o,mask:s,message:e.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):Zo(n)&&(void 0!==u||c in n)&&(n[c]=u))}if("not_valid"!==l)for(const c of t.refiner(n,a))c.explanation=e.message,l="not_refined",yield[c,void 0];"valid"===l&&(yield[void 0,n])}class Di{constructor(t){const{type:e,schema:i,validator:r,refiner:o,coercer:s=(l=>l),entries:a=function*(){}}=t;this.type=e,this.schema=i,this.entries=a,this.coercer=s,this.validator=r?(l,c)=>yE(r(l,c),c,this,l):()=>[],this.refiner=o?(l,c)=>yE(o(l,c),c,this,l):()=>[]}assert(t,e){return bV(t,this,e)}create(t,e){return function y0e(n,t,e){const i=Hg(n,t,{coerce:!0,message:e});if(i[0])throw i[0];return i[1]}(t,this,e)}is(t){return function wV(n,t){return!Hg(n,t)[0]}(t,this)}mask(t,e){return function _0e(n,t,e){const i=Hg(n,t,{coerce:!0,mask:!0,message:e});if(i[0])throw i[0];return i[1]}(t,this,e)}validate(t,e={}){return Hg(t,this,e)}}function bV(n,t,e){const i=Hg(n,t,{message:e});if(i[0])throw i[0]}function Hg(n,t,e={}){const i=_E(n,t,e),r=function m0e(n){const{done:t,value:e}=n.next();return t?void 0:e}(i);return r[0]?[new f0e(r[0],function*(){for(const s of i)s[0]&&(yield s[0])}),void 0]:[void 0,r[1]]}function So(n,t){return new Di({type:n,schema:null,validator:t})}function CV(n){return new Di({type:"array",schema:n,*entries(t){if(n&&Array.isArray(t))for(const[e,i]of t.entries())yield[e,i,n]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${Ni(t)}`})}function Pu(n){const t=n?Object.keys(n):[],e=function DV(){return So("never",()=>!1)}();return new Di({type:"object",schema:n||null,*entries(i){if(n&&Zo(i)){const r=new Set(Object.keys(i));for(const o of t)r.delete(o),yield[o,i[o],n[o]];for(const o of r)yield[o,i[o],e]}},validator:i=>Zo(i)||`Expected an object, but received: ${Ni(i)}`,coercer:i=>Zo(i)?{...i}:i})}function TV(n){return new Di({...n,validator:(t,e)=>void 0===t||n.validator(t,e),refiner:(t,e)=>void 0===t||n.refiner(t,e)})}function $g(){return So("string",n=>"string"==typeof n||`Expected a string, but received: ${Ni(n)}`)}const b0e=Mn.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=n=>{const t=n?.node||this.editor.state.doc;return"textSize"===(n?.mode||this.options.mode)?t.textBetween(0,t.content.size,void 0," ").length:t.nodeSize},this.storage.words=n=>{const t=n?.node||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter(r=>""!==r).length}},addProseMirrorPlugins(){return[new Wt({key:new on("characterCount"),filterTransaction:(n,t)=>{const e=this.options.limit;if(!n.docChanged||0===e||null==e)return!0;const i=this.storage.characters({node:t.doc}),r=this.storage.characters({node:n.doc});if(r<=e||i>e&&r>e&&r<=i)return!0;if(i>e&&r>e&&r>i||!n.getMeta("paste"))return!1;const s=n.selection.$head.pos;return n.deleteRange(s-(r-e),s),!(this.storage.characters({node:n.doc})>e)}})]}}),w0e=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,C0e=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,D0e=Nr.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",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:t})=>t.setMark(this.name,n),toggleHighlight:n=>({commands:t})=>t.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[_u({find:w0e,type:this.type})]},addPasteRules(){return[Ul({find:C0e,type:this.type})]}}),Lu=(n,t)=>{for(const e in t)n[e]=t[e];return n},vE="numeric",bE="ascii",wE="alpha",A0="asciinumeric",k0="alphanumeric",CE="domain",IV="whitespace";function x0e(n,t){return n in t||(t[n]=[]),t[n]}function Ru(n,t,e){t[vE]&&(t[A0]=!0,t[k0]=!0),t[bE]&&(t[A0]=!0,t[wE]=!0),t[A0]&&(t[k0]=!0),t[wE]&&(t[k0]=!0),t[k0]&&(t[CE]=!0),t.emoji&&(t[CE]=!0);for(const i in t){const r=x0e(i,e);r.indexOf(n)<0&&r.push(n)}}function ro(n){void 0===n&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}ro.groups={},ro.prototype={accepts(){return!!this.t},go(n){const t=this,e=t.j[n];if(e)return e;for(let i=0;i=0&&(e[i]=!0);return e}(s.t,i),e);Ru(o,l,i)}else e&&Ru(o,e,i);s.t=o}return r.j[n]=s,s}};const Ge=(n,t,e,i,r)=>n.ta(t,e,i,r),Jo=(n,t,e,i,r)=>n.tr(t,e,i,r),OV=(n,t,e,i,r)=>n.ts(t,e,i,r),ge=(n,t,e,i,r)=>n.tt(t,e,i,r),Ka="WORD",DE="UWORD",Wg="LOCALHOST",ME="UTLD",N0="SCHEME",df="SLASH_SCHEME",hf="OPENBRACE",Gg="OPENBRACKET",Yg="OPENANGLEBRACKET",qg="OPENPAREN",Fu="CLOSEBRACE",ff="CLOSEBRACKET",pf="CLOSEANGLEBRACKET",ju="CLOSEPAREN",P0="AMPERSAND",L0="APOSTROPHE",R0="ASTERISK",Zl="AT",F0="BACKSLASH",j0="BACKTICK",z0="CARET",Jl="COLON",xE="COMMA",V0="DOLLAR",oa="DOT",B0="EQUALS",IE="EXCLAMATION",sa="HYPHEN",U0="PERCENT",H0="PIPE",$0="PLUS",W0="POUND",G0="QUERY",OE="QUOTE",AE="SEMI",aa="SLASH",Kg="TILDE",Y0="UNDERSCORE",q0="SYM";var NV=Object.freeze({__proto__:null,WORD:Ka,UWORD:DE,LOCALHOST:Wg,TLD:"TLD",UTLD:ME,SCHEME:N0,SLASH_SCHEME:df,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:hf,OPENBRACKET:Gg,OPENANGLEBRACKET:Yg,OPENPAREN:qg,CLOSEBRACE:Fu,CLOSEBRACKET:ff,CLOSEANGLEBRACKET:pf,CLOSEPAREN:ju,AMPERSAND:P0,APOSTROPHE:L0,ASTERISK:R0,AT:Zl,BACKSLASH:F0,BACKTICK:j0,CARET:z0,COLON:Jl,COMMA:xE,DOLLAR:V0,DOT:oa,EQUALS:B0,EXCLAMATION:IE,HYPHEN:sa,PERCENT:U0,PIPE:H0,PLUS:$0,POUND:W0,QUERY:G0,QUOTE:OE,SEMI:AE,SLASH:aa,TILDE:Kg,UNDERSCORE:Y0,EMOJI:"EMOJI",SYM:q0});const zu=/[a-z]/,K0=/\p{L}/u,Q0=/\p{Emoji}/u,Z0=/\d/,kE=/\s/;let J0=null,X0=null;function Xl(n,t,e,i,r){let o;const s=t.length;for(let a=0;a=0;)o++;if(o>0){t.push(e.join(""));for(let s=parseInt(n.substring(i,i+o),10);s>0;s--)e.pop();i+=o}else e.push(n[i]),i++}return t}const mf={defaultProtocol:"http",events:null,format:RV,formatHref:RV,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ew(n,t){void 0===t&&(t=null);let e=Lu({},mf);n&&(e=Lu(e,n instanceof ew?n.o:n));const i=e.ignoreTags,r=[];for(let o=0;on,check(n){return this.get("validate",n.toString(),n)},get(n,t,e){const i=null!=t;let r=this.o[n];return r&&("object"==typeof r?(r=e.t in r?r[e.t]:mf[n],"function"==typeof r&&i&&(r=r(t,e))):"function"==typeof r&&i&&(r=r(t,e.t,e)),r)},getObj(n,t,e){let i=this.o[n];return"function"==typeof i&&null!=t&&(i=i(t,e.t,e)),i},render(n){const t=n.render(this);return(this.get("render",null,n)||this.defaultRender)(t,n.t,n)}},tw.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const t=this.toString(),e=n.get("truncate",t,this),i=n.get("format",t,this);return e&&i.length>e?i.substring(0,e)+"\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=mf.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 t=this,e=this.toHref(n.get("defaultProtocol")),i=n.get("formatHref",e,this),r=n.get("tagName",e,t),o=this.toFormattedString(n),s={},a=n.get("className",e,t),l=n.get("target",e,t),c=n.get("rel",e,t),u=n.getObj("attributes",e,t),d=n.getObj("events",e,t);return s.href=i,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&Lu(s,u),{tagName:r,attributes:s,content:o,eventListeners:d}}};const NE=Qg("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),PE=Qg("text"),FV=Qg("nl"),ec=Qg("url",{isLink:!0,toHref(n){return void 0===n&&(n=mf.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==Wg&&n[1].t===Jl}}),Bi=n=>new ro(n);function LE(n,t,e){return new n(t.slice(e[0].s,e[e.length-1].e),e)}const Zg=typeof console<"u"&&console&&console.warn||(()=>{}),ln={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function jV(n,t){if(void 0===t&&(t=!1),ln.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');ln.customSchemes.push([n,t])}function zV(n){return ln.initialized||function z0e(){ln.scanner=function N0e(n){void 0===n&&(n=[]);const t={};ro.groups=t;const e=new ro;null==J0&&(J0=LV("aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==X0&&(X0=LV("\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")),ge(e,"'",L0),ge(e,"{",hf),ge(e,"[",Gg),ge(e,"<",Yg),ge(e,"(",qg),ge(e,"}",Fu),ge(e,"]",ff),ge(e,">",pf),ge(e,")",ju),ge(e,"&",P0),ge(e,"*",R0),ge(e,"@",Zl),ge(e,"`",j0),ge(e,"^",z0),ge(e,":",Jl),ge(e,",",xE),ge(e,"$",V0),ge(e,".",oa),ge(e,"=",B0),ge(e,"!",IE),ge(e,"-",sa),ge(e,"%",U0),ge(e,"|",H0),ge(e,"+",$0),ge(e,"#",W0),ge(e,"?",G0),ge(e,'"',OE),ge(e,"/",aa),ge(e,";",AE),ge(e,"~",Kg),ge(e,"_",Y0),ge(e,"\\",F0);const i=Jo(e,Z0,"NUM",{[vE]:!0});Jo(i,Z0,i);const r=Jo(e,zu,Ka,{[bE]:!0});Jo(r,zu,r);const o=Jo(e,K0,DE,{[wE]:!0});Jo(o,zu),Jo(o,K0,o);const s=Jo(e,kE,"WS",{[IV]:!0});ge(e,"\n","NL",{[IV]:!0}),ge(s,"\n"),Jo(s,kE,s);const a=Jo(e,Q0,"EMOJI",{emoji:!0});Jo(a,Q0,a),ge(a,"\ufe0f",a);const l=ge(a,"\u200d");Jo(l,Q0,a);const c=[[zu,r]],u=[[zu,null],[K0,o]];for(let d=0;dd[0]>h[0]?1:-1);for(let d=0;d=0?p[CE]=!0:zu.test(h)?Z0.test(h)?p[A0]=!0:p[bE]=!0:p[vE]=!0,OV(e,h,h,p)}return OV(e,"localhost",Wg,{ascii:!0}),e.jd=new ro(q0),{start:e,tokens:Lu({groups:t},NV)}}(ln.customSchemes);for(let n=0;n=0&&h++,r++,u++;if(h<0)r-=u,r0&&(o.push(LE(PE,t,s)),s=[]),r-=h,u-=h;const f=d.t,p=e.slice(r-u,r);o.push(LE(f,t,p))}}return s.length>0&&o.push(LE(PE,t,s)),o}(ln.parser.start,n,function P0e(n,t){const e=function L0e(n){const t=[],e=n.length;let i=0;for(;i56319||i+1===e||(o=n.charCodeAt(i+1))<56320||o>57343?n[i]:n.slice(i,i+2);t.push(s),i+=s.length}return t}(t.replace(/[A-Z]/g,a=>a.toLowerCase())),i=e.length,r=[];let o=0,s=0;for(;s=0&&(d+=e[s].length,h++),c+=e[s].length,o+=e[s].length,s++;o-=d,s-=h,c-=d,r.push({t:u.t,v:t.slice(o-c,o),s:o-c,e:o})}return r}(ln.scanner.start,n))}function FE(n,t,e){if(void 0===t&&(t=null),void 0===e&&(e=null),t&&"object"==typeof t){if(e)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);e=t,t=null}const i=new ew(e),r=zV(n),o=[];for(let s=0;s{const r=t.some(u=>u.docChanged)&&!e.doc.eq(i.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!r||o)return;const{tr:s}=i,a=function nce(n,t){const e=new D1(n);return t.forEach(i=>{i.steps.forEach(r=>{e.step(r)})}),e}(e.doc,[...t]),{mapping:l}=a;return function lce(n){const{mapping:t,steps:e}=n,i=[];return t.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}=e[o];if(void 0===a||void 0===l)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=t.slice(o).map(a,-1),u=t.slice(o).map(l),d=t.invert().map(c,-1),h=t.invert().map(u);i.push({oldRange:{from:d,to:h},newRange:{from:c,to:u}})})}),function ace(n){const t=function sce(n,t=JSON.stringify){const e={};return n.filter(i=>{const r=t(i);return!Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=!0)})}(n);return 1===t.length?t:t.filter((e,i)=>!t.filter((o,s)=>s!==i).some(o=>e.oldRange.from>=o.oldRange.from&&e.oldRange.to<=o.oldRange.to&&e.newRange.from>=o.newRange.from&&e.newRange.to<=o.newRange.to))}(i)}(a).forEach(({oldRange:u,newRange:d})=>{qb(u.from,u.to,e.doc).filter(m=>m.mark.type===n.type).forEach(m=>{const b=qb(l.map(m.from),l.map(m.to),i.doc).filter(K=>K.mark.type===n.type);if(!b.length)return;const w=b[0],_=e.doc.textBetween(m.from,m.to,void 0," "),N=i.doc.textBetween(w.from,w.to,void 0," "),S=VV(_),J=VV(N);S&&!J&&s.removeMark(w.from,w.to,n.type)});const h=function rce(n,t,e){const i=[];return n.nodesBetween(t.from,t.to,(r,o)=>{e(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(b=>""!==b);if(m.length<=0)return!1;const g=m[m.length-1],y=f.pos+p.lastIndexOf(g);if(!g)return!1;FE(g).filter(b=>b.isLink).filter(b=>!n.validate||n.validate(b.value)).map(b=>({...b,from:y+b.start+1,to:y+b.end+1})).forEach(b=>{s.addMark(b.from,b.to,n.type.create({href:b.href}))})}}),s.steps.length?s:void 0}})}const H0e=Nr.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{"string"!=typeof n?jV(n.scheme,n.optionalSlashes):jV(n)})},onDestroy(){!function j0e(){ro.groups={},ln.scanner=null,ln.parser=null,ln.tokenQueue=[],ln.pluginQueue=[],ln.customSchemes=[],ln.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",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:t})=>t().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:t})=>t().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[Ul({find:n=>FE(n).filter(t=>!this.options.validate||this.options.validate(t.value)).filter(t=>t.isLink).map(t=>({text:t.value,index:t.start,data:t})),type:this.type,getAttributes:n=>{var t;return{href:null===(t=n.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(V0e({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(function B0e(n){return new Wt({key:new on("handleClickLink"),props:{handleClick:(t,e,i)=>{var r,o,s;if(0!==i.button)return!1;const a=E5(t.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 U0e(n){return new Wt({key:new on("handlePasteLink"),props:{handlePaste:(t,e,i)=>{const{state:r}=t,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach(c=>{a+=c.textContent});const l=FE(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}}),$0e=Nr.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:n=>"sub"===n&&null}],renderHTML({HTMLAttributes:n}){return["sub",tn(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()}}}),W0e=Nr.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:n=>"super"===n&&null}],renderHTML({HTMLAttributes:n}){return["sup",tn(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()}}}),G0e=jn.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:n}){return["tr",tn(this.options.HTMLAttributes,n),0]}}),Y0e=Mn.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:t})=>!!this.options.alignments.includes(n)&&this.options.types.every(e=>t.updateAttributes(e,{textAlign:n})),unsetTextAlign:()=>({commands:n})=>this.options.types.every(t=>n.resetAttributes(t,"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")}}}),q0e=Nr.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("underline")&&{}}],renderHTML({HTMLAttributes:n}){return["u",tn(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()}}}),K0e=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/,Q0e=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/g,BV=n=>n?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",X0e=jn.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:t})=>!!(n=>n.match(K0e))(n.src)&&t.insertContent({type:this.name,attrs:n})}},addPasteRules(){return this.options.addPasteHandler?[Pce({find:Q0e,type:this.type,getAttributes:n=>({src:n.input})})]:[]},renderHTML({HTMLAttributes:n}){const t=(n=>{const{url:t,allowFullscreen:e,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:b}=n;if(t.includes("/embed/"))return t;if(t.includes("youtu.be")){const J=t.split("/").pop();return J?`${BV(p)}${J}`:null}const _=/v=([-\w]+)/gm.exec(t);if(!_||!_[1])return null;let N=`${BV(p)}${_[1]}`;const S=[];return!1===e&&S.push("fs=0"),i&&S.push("autoplay=1"),r&&S.push(`cc_lang_pref=${r}`),o&&S.push("cc_load_policy=1"),s||S.push("controls=0"),a&&S.push("disablekb=1"),l&&S.push("enablejsapi=1"),c&&S.push(`end=${c}`),u&&S.push(`hl=${u}`),d&&S.push(`iv_load_policy=${d}`),h&&S.push("loop=1"),f&&S.push("modestbranding=1"),m&&S.push(`origin=${m}`),g&&S.push(`playlist=${g}`),b&&S.push(`start=${b}`),y&&S.push(`color=${y}`),S.length&&(N+=`?${S.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=t,["div",{"data-youtube-video":""},["iframe",tn(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)]]}}),ewe=/^\s*>\s$/,twe=jn.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:n}){return["blockquote",tn(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[lg({find:ewe,type:this.type})]}}),nwe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,iwe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,rwe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,owe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,swe=Nr.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",tn(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[_u({find:nwe,type:this.type}),_u({find:rwe,type:this.type})]},addPasteRules(){return[Ul({find:iwe,type:this.type}),Ul({find:owe,type:this.type})]}}),awe=jn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",tn(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)}}}),UV=Nr.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:t})=>{const e=Yb(n,this.type);return!!Object.entries(e).some(([,r])=>!!r)||t.unsetMark(this.name)}}}}),HV=/^\s*([-+*])\s$/,lwe=jn.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",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(awe.name,this.editor.getAttributes(UV.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=lg({find:HV,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=lg({find:HV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(UV.name),editor:this.editor})),[n]}}),cwe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,uwe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,dwe=Nr.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:n}){return["code",tn(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[_u({find:cwe,type:this.type})]},addPasteRules(){return[Ul({find:uwe,type:this.type})]}}),hwe=/^```([a-z]+)?[\s\n]$/,fwe=/^~~~([a-z]+)?[\s\n]$/,pwe=jn.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 t;const{languageClassPrefix:e}=this.options;return[...(null===(t=n.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(s=>s.startsWith(e)).map(s=>s.replace(e,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:n,HTMLAttributes:t}){return["pre",tn(this.options.HTMLAttributes,t),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:t})=>t.setNode(this.name,n),toggleCodeBlock:n=>({commands:t})=>t.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:t}=this.editor.state.selection;return!(!n||t.parent.type.name!==this.name)&&!(1!==t.pos&&t.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=n,{selection:e}=t,{$from:i,empty:r}=e;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:t}=n,{selection:e,doc:i}=t,{$from:r,empty:o}=e;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[zS({find:hwe,type:this.type,getAttributes:n=>({language:n[1]})}),zS({find:fwe,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new Wt({key:new on("codeBlockVSCodeHandler"),props:{handlePaste:(n,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const e=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),o=(i?JSON.parse(i):void 0)?.mode;if(!e||!o)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(nt.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(e.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),mwe=jn.create({name:"doc",topNode:!0,content:"block+"});function gwe(n={}){return new Wt({view:t=>new ywe(t,n)})}class ywe{constructor(t,e){var i;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(i=e.width)&&void 0!==i?i:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=s=>{this[r](s)};return t.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let i,t=this.editorView.state.doc.resolve(this.cursorPos),e=!t.parent.inlineContent;if(e){let a=t.nodeBefore,l=t.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",e),this.element.classList.toggle("prosemirror-dropcursor-inline",!e),!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(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),i=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=i&&i.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,e,t):r;if(e&&!o){let s=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Aj(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(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const _we=Mn.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[gwe(this.options)]}});class ci extends ot{constructor(t){super(t,t)}map(t,e){let i=t.resolve(e.map(this.head));return ci.valid(i)?new ci(i):ot.near(i)}content(){return De.empty}eq(t){return t instanceof ci&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new ci(t.resolve(e.pos))}getBookmark(){return new jE(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function vwe(n){for(let t=n.depth;t>=0;t--){let e=n.index(t),i=n.node(t);if(0!=e)for(let r=i.child(e-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}(t)||!function bwe(n){for(let t=n.depth;t>=0;t--){let e=n.indexAfter(t),i=n.node(t);if(e!=i.childCount)for(let r=i.child(e);;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}(t))return!1;let i=e.type.spec.allowGapCursor;if(null!=i)return i;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,i=!1){e:for(;;){if(!i&&ci.valid(t))return t;let r=t.pos,o=null;for(let s=t.depth;;s--){let a=t.node(s);if(e>0?t.indexAfter(s)0){o=a.child(e>0?t.indexAfter(s):t.index(s)-1);break}if(0==s)return null;r+=e;let l=t.doc.resolve(r);if(ci.valid(l))return l}for(;;){let s=e>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!qe.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*e),i=!1;continue e}break}o=s,r+=e;let a=t.doc.resolve(r);if(ci.valid(a))return a}return null}}}ci.prototype.visible=!1,ci.findFrom=ci.findGapCursorFrom,ot.jsonID("gapcursor",ci);class jE{constructor(t){this.pos=t}map(t){return new jE(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return ci.valid(e)?new ci(e):ot.near(e)}}const Cwe=gS({ArrowLeft:nw("horiz",-1),ArrowRight:nw("horiz",1),ArrowUp:nw("vert",-1),ArrowDown:nw("vert",1)});function nw(n,t){const e="vert"==n?t>0?"down":"up":t>0?"right":"left";return function(i,r,o){let s=i.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof nt){if(!o.endOfTextblock(e)||0==a.depth)return!1;l=!1,a=i.doc.resolve(t>0?a.after():a.before())}let c=ci.findGapCursorFrom(a,t,l);return!!c&&(r&&r(i.tr.setSelection(new ci(c))),!0)}}function Dwe(n,t,e){if(!n||!n.editable)return!1;let i=n.state.doc.resolve(t);if(!ci.valid(i))return!1;let r=n.posAtCoords({left:e.clientX,top:e.clientY});return!(r&&r.inside>-1&&qe.isSelectable(n.state.doc.nodeAt(r.inside))||(n.dispatch(n.state.tr.setSelection(new ci(i))),0))}function Twe(n,t){if("insertCompositionText"!=t.inputType||!(n.state.selection instanceof ci))return!1;let{$from:e}=n.state.selection,i=e.parent.contentMatchAt(e.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;let r=ce.empty;for(let s=i.length-1;s>=0;s--)r=ce.from(i[s].createAndFill(null,r));let o=n.state.tr.replace(e.pos,e.pos,new De(r,0,0));return o.setSelection(nt.near(o.doc.resolve(e.pos+1))),n.dispatch(o),!1}function Mwe(n){if(!(n.selection instanceof ci))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Fn.create(n.doc,[ki.widget(n.selection.head,t,{key:"gapcursor"})])}const Swe=Mn.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Wt({props:{decorations:Mwe,createSelectionBetween:(n,t,e)=>t.pos==e.pos&&ci.valid(e)?new ci(e):null,handleClick:Dwe,handleKeyDown:Cwe,handleDOMEvents:{beforeinput:Twe}}})],extendNodeSchema(n){var t;return{allowGapCursor:null!==(t=Ct(Ve(n,"allowGapCursor",{name:n.name,options:n.options,storage:n.storage})))&&void 0!==t?t:null}}}),Ewe=jn.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:n}){return["br",tn(this.options.HTMLAttributes,n)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:n,chain:t,state:e,editor:i})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:r,storedMarks:o}=e;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 t().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()}}}),xwe=jn.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:t}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,tn(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:n=>({commands:t})=>!!this.options.levels.includes(n.level)&&t.setNode(this.name,n),toggleHeading:n=>({commands:t})=>!!this.options.levels.includes(n.level)&&t.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return this.options.levels.reduce((n,t)=>({...n,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(n=>zS({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Ji=function(){};Ji.prototype.append=function(t){return t.length?(t=Ji.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},Ji.prototype.prepend=function(t){return t.length?Ji.from(t).append(this):this},Ji.prototype.appendInner=function(t){return new Iwe(this,t)},Ji.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?Ji.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Ji.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Ji.prototype.forEach=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=this.length),e<=i?this.forEachInner(t,e,i,0):this.forEachInvertedInner(t,e,i,0)},Ji.prototype.map=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(t(o,s))},e,i),r},Ji.from=function(t){return t instanceof Ji?t:t&&t.length?new $V(t):Ji.empty};var $V=function(n){function t(i){n.call(this),this.values=i}n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t;var e={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,o){return 0==r&&o==this.length?this:new t(this.values.slice(r,o))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,o,s,a){for(var l=o;l=s;l--)if(!1===r(this.values[l],a+l))return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=200)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=200)return new t(r.flatten().concat(this.values))},e.length.get=function(){return this.values.length},e.depth.get=function(){return 0},Object.defineProperties(t.prototype,e),t}(Ji);Ji.empty=new $V([]);var Iwe=function(n){function t(e,i){n.call(this),this.left=e,this.right=i,this.length=e.length+i.length,this.depth=Math.max(e.depth,i.depth)+1}return n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.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},t.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))},t.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new t(r,this.right)},t.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new t(this.left,new t(this.right,i)):new t(this,i)},t}(Ji);const WV=Ji;class bs{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let r,o,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}e&&(r=this.remapping(i,this.items.length),o=r.maps.length);let a,l,s=t.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 la(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 la(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 bs(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(t,e,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let u=0;ukwe&&(a=function Awe(n,t){let e;return n.forEach((i,r)=>{if(i.selection&&0==t--)return e=r,!1}),n.slice(e)}(a,c),s-=c),new bs(a.append(o),s)}remapping(t,e){let i=new Th;return this.items.forEach((r,o)=>{i.appendMap(r.map,null!=r.mirrorOffset&&o-r.mirrorOffset>=t?i.maps.length-r.mirrorOffset:void 0)},t,e),i}addMaps(t){return 0==this.eventCount?this:new bs(this.items.append(t.map(e=>new la(e))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-e),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},r);let l=e;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=t.steps[f].invert(t.docs[f]),g=h.selection&&h.selection.map(o.slice(l+1,f));g&&a++,i.push(new la(p,m,g))}else i.push(new la(p))},r);let c=[];for(let h=e;h500&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let t=0;return this.items.forEach(e=>{e.step||t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),i=e.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(e.slice(i)),c=l&&l.getMap();if(i--,c&&e.appendMap(c,i),l){let u=s.selection&&s.selection.map(e.slice(i));u&&o++;let h,d=new la(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 bs(WV.from(r.reverse()),o)}}bs.empty=new bs(WV.empty,0);class la{constructor(t,e,i,r){this.map=t,this.step=e,this.selection=i,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new la(e.getMap().invert(),e,this.selection)}}}class tc{constructor(t,e,i,r,o){this.done=t,this.undone=e,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}}const kwe=20;function GV(n){let t=[];return n.forEach((e,i,r,o)=>t.push(r,o)),t}function zE(n,t){if(!n)return null;let e=[];for(let i=0;inew tc(bs.empty,bs.empty,null,0,-1),apply:(t,e,i)=>function Nwe(n,t,e,i){let o,r=e.getMeta(ca);if(r)return r.historyState;e.getMeta(KV)&&(n=new tc(n.done,n.undone,null,0,-1));let s=e.getMeta("appendedTransaction");if(0==e.steps.length)return n;if(s&&s.getMeta(ca))return s.getMeta(ca).redo?new tc(n.done.addTransform(e,void 0,i,rw(t)),n.undone,GV(e.mapping.maps[e.steps.length-1]),n.prevTime,n.prevComposition):new tc(n.done,n.undone.addTransform(e,void 0,i,rw(t)),null,n.prevTime,n.prevComposition);if(!1===e.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=e.getMeta("rebased"))?new tc(n.done.rebased(e,o),n.undone.rebased(e,o),zE(n.prevRanges,e.mapping),n.prevTime,n.prevComposition):new tc(n.done.addMaps(e.mapping.maps),n.undone.addMaps(e.mapping.maps),zE(n.prevRanges,e.mapping),n.prevTime,n.prevComposition);{let a=e.getMeta("composition"),l=0==n.prevTime||!s&&n.prevComposition!=a&&(n.prevTime<(e.time||0)-i.newGroupDelay||!function Pwe(n,t){if(!t)return!1;if(!n.docChanged)return!0;let e=!1;return n.mapping.maps[0].forEach((i,r)=>{for(let o=0;o=t[o]&&(e=!0)}),e}(e,n.prevRanges)),c=s?zE(n.prevRanges,e.mapping):GV(e.mapping.maps[e.steps.length-1]);return new tc(n.done.addTransform(e,l?t.selection.getBookmark():void 0,i,rw(t)),bs.empty,c,e.time,a??n.prevComposition)}}(e,i,t,n)},config:n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},props:{handleDOMEvents:{beforeinput(t,e){let i=e.inputType,r="historyUndo"==i?QV:"historyRedo"==i?ZV:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}const QV=(n,t)=>{let e=ca.getState(n);return!(!e||0==e.done.eventCount||(t&&YV(e,n,t,!1),0))},ZV=(n,t)=>{let e=ca.getState(n);return!(!e||0==e.undone.eventCount||(t&&YV(e,n,t,!0),0))},Rwe=Mn.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:n,dispatch:t})=>QV(n,t),redo:()=>({state:n,dispatch:t})=>ZV(n,t)}),addProseMirrorPlugins(){return[Lwe(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()}}}),Fwe=jn.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:n}){return["hr",tn(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{var i;if(e){const{$to:r}=t.selection,o=r.end();if(r.nodeAfter)t.setSelection(nt.create(t.doc,r.pos));else{const s=null===(i=r.parent.type.contentMatch.defaultType)||void 0===i?void 0:i.create();s&&(t.insert(o,s),t.setSelection(nt.create(t.doc,o)))}t.scrollIntoView()}return!0}).run()}},addInputRules(){return[O5({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),jwe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,zwe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,Vwe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,Bwe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,Uwe=Nr.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",tn(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[_u({find:jwe,type:this.type}),_u({find:Vwe,type:this.type})]},addPasteRules(){return[Ul({find:zwe,type:this.type}),Ul({find:Bwe,type:this.type})]}}),Hwe=jn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",tn(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)}}}),$we=jn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",tn(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)}}}),JV=Nr.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:t})=>{const e=Yb(n,this.type);return!!Object.entries(e).some(([,r])=>!!r)||t.unsetMark(this.name)}}}}),XV=/^(\d+)\.\s$/,Wwe=jn.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:t,...e}=n;return 1===t?["ol",tn(this.options.HTMLAttributes,e),0]:["ol",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes($we.name,this.editor.getAttributes(JV.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=lg({find:XV,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=lg({find:XV,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(JV.name)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[n]}}),Gwe=jn.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:n}){return["p",tn(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Ywe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,qwe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,Kwe=Nr.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",tn(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[_u({find:Ywe,type:this.type})]},addPasteRules(){return[Ul({find:qwe,type:this.type})]}}),Qwe=jn.create({name:"text",group:"inline"}),eB=Mn.create({name:"starterKit",addExtensions(){var n,t,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,y;const b=[];return!1!==this.options.blockquote&&b.push(twe.configure(null===(n=this.options)||void 0===n?void 0:n.blockquote)),!1!==this.options.bold&&b.push(swe.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&b.push(lwe.configure(null===(e=this.options)||void 0===e?void 0:e.bulletList)),!1!==this.options.code&&b.push(dwe.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&b.push(pwe.configure(null===(r=this.options)||void 0===r?void 0:r.codeBlock)),!1!==this.options.document&&b.push(mwe.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&b.push(_we.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&b.push(Swe.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&b.push(Ewe.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&b.push(xwe.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&b.push(Rwe.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&b.push(Fwe.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&b.push(Uwe.configure(null===(h=this.options)||void 0===h?void 0:h.italic)),!1!==this.options.listItem&&b.push(Hwe.configure(null===(f=this.options)||void 0===f?void 0:f.listItem)),!1!==this.options.orderedList&&b.push(Wwe.configure(null===(p=this.options)||void 0===p?void 0:p.orderedList)),!1!==this.options.paragraph&&b.push(Gwe.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&b.push(Kwe.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&b.push(Qwe.configure(null===(y=this.options)||void 0===y?void 0:y.text)),b}});var Jg=(()=>(function(n){n.TOP_INITIAL="40px",n.TOP_CURRENT="26px"}(Jg||(Jg={})),Jg))();function Zwe(n){return n.replace(/\p{L}+('\p{L}+)?/gu,function(t){return t.charAt(0).toUpperCase()+t.slice(1)})}const Xwe=Mn.create({name:"dotPlaceholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new Wt({key:new on("dotPlaceholder"),props:{decorations:({doc:n,selection:t})=>{const e=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,r=[];if(!e)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=ki.widget(l,((n,t,e)=>{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&&t.type.name===gi.HEADING&&(i.style.top=Jg.TOP_INITIAL),0!==n&&t.type.name===gi.HEADING&&(i.style.top=Jg.TOP_CURRENT),i.innerHTML='',i.setAttribute("draggable","false"),i.addEventListener("mousedown",o=>{o.preventDefault(),e.chain().insertContent("/").run()},{once:!0}),r.appendChild(i),r})(l,a,this.editor)),f=ki.node(l,l+a.nodeSize,{class:d.join(" "),"data-placeholder":a.type.name===gi.HEADING?`${Zwe(a.type.name)} ${a.attrs.level}`:this.options.placeholder});r.push(f),r.push(h)}return this.options.includeChildren}),Fn.create(n,r)}}})]}});class Xg{constructor(){}}function eCe(n,t){if(1&n&&_e(0,"dot-editor-count-bar",4),2&n){const e=D(2);v("characterCount",e.characterCount)("charLimit",e.charLimit)("readingTime",e.readingTime)}}Xg.\u0275fac=function(t){return new(t||Xg)},Xg.\u0275cmp=Me({type:Xg,selectors:[["dot-editor-count-bar"]],inputs:{characterCount:"characterCount",charLimit:"charLimit",readingTime:"readingTime"},decls:8,vars:6,template:function(t,e){1&t&&(I(0,"span"),Ne(1),A(),I(2,"span"),Ne(3,"\u25cf"),A(),Ne(4),I(5,"span"),Ne(6,"\u25cf"),A(),Ne(7)),2&t&&(yo("error-message",e.charLimit&&e.characterCount.characters()>e.charLimit),C(1),o_(" ",e.characterCount.characters(),"",e.charLimit?"/"+e.charLimit:""," chars\n"),C(3),Yi("\n",e.characterCount.words()," words\n"),C(3),Yi("\n",e.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 tCe=function(n,t){return{"editor-wrapper--fullscreen":n,"editor-wrapper--default":t}},nCe=function(n){return{"overflow-hidden":n}};function iCe(n,t){if(1&n){const e=We();dt(0),I(1,"div",1)(2,"tiptap-editor",2),ue("ngModelChange",function(r){return de(e),he(D().onChange(r))})("keyup",function(){return de(e),he(D().subject.next())}),A()(),M(3,eCe,1,3,"dot-editor-count-bar",3),ht()}if(2&n){const e=D();C(1),oi(e.customStyles),v("ngClass",bi(7,tCe,"true"===e.isFullscreen,"true"!==e.isFullscreen)),C(1),v("ngModel",e.content)("editor",e.editor)("ngClass",Mt(10,nCe,e.freezeScroll)),C(1),v("ngIf",e.showCharData)}}class ey{constructor(t,e,i){this.injector=t,this.viewContainerRef=e,this.dotMarketingConfigService=i,this.lang=pg,this.displayCountBar=!0,this.customBlocks="",this.content="",this.isFullscreen=!1,this.valueChange=new re,this.subject=new ae,this.freezeScroll=!0,this._allowedBlocks=["paragraph"],this._customNodes=new Map([["dotContent",sge(this.injector)],["image",io],["video",dge],["table",k_e.extend({resizable:!0})],["aiContent",pge],["loader",mge]]),this.isAIPluginInstalled=it(z5),this.destroy$=new ae}set showVideoThumbnail(t){this.dotMarketingConfigService.setProperty(Qp.SHOW_VIDEO_THUMBNAIL,t)}set allowedBlocks(t){const e=t?t.replace(/ /g,"").split(",").filter(Boolean):[];this._allowedBlocks=[...this._allowedBlocks,...e]}set value(t){"string"!=typeof t?this.setEditorJSONContent(t):this.content=(n=>{const t=new RegExp(/]*)>(.|\n)*?<\/p>/gm),e=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(yue,o=>(n=>{const t=document.createElement("div");t.innerHTML=n;const e=t.querySelector("a").getAttribute("href"),i=t.querySelector("a").getAttribute("href"),r=t.querySelector("a").getAttribute("alt");return n.replace(/]*)>/gm,"").replace(//gm,"").replace(WS,o=>o.replace(/img/gm,`img href="${e}" title="${i}" alt="${r}"`))})(o)).replace(t,o=>t0(o)).replace(e,o=>t0(o)).replace(i,o=>t0(o)).replace(r,o=>t0(o))})(t)}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(t){return Dl(function*(){return Promise.allSettled(t.map(function(){var e=Dl(function*(i){return import(i)});return function(i){return e.apply(this,arguments)}}()))})()}ngOnInit(){wt(this.getCustomRemoteExtensions()).pipe(Et(1)).subscribe(t=>{this.editor=new Ace({extensions:[...this.getEditorExtensions(),...this.getEditorMarks(),...this.getEditorNodes(),...t]}),this.editor.on("create",()=>this.updateCharCount()),this.subject.pipe(mn(this.destroy$),th(250)).subscribe(()=>this.updateCharCount()),this.editor.on("transaction",({editor:e})=>{this.freezeScroll=kg.getState(e.view.state)?.freezeScroll})})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onChange(t){this.valueChange.emit(t)}updateCharCount(){const t=this.editor.state.tr.setMeta("addToHistory",!1);0!=this.characterCount.characters()?t.step(new Cu("charCount",this.characterCount.characters())).step(new Cu("wordCount",this.characterCount.words())).step(new Cu("readingTime",this.readingTime)):t.step(new r0),this.editor.view.dispatch(t)}isValidSchema(t){bV(t,Pu({extensions:CV(Pu({url:$g(),actions:TV(CV(Pu({command:$g(),menuLabel:$g(),icon:$g()})))}))}))}getParsedCustomBlocks(){if(!this.customBlocks?.length)return{extensions:[]};try{const e=JSON.parse(this.customBlocks);return this.isValidSchema(e),e}catch(e){return console.warn("JSON parse fails, please check the JSON format.",e),{extensions:[]}}}parsedCustomModules(t,e){return e.status===Zp.REJECTED&&console.warn("Failed to load the module",e.reason),e.status===Zp.FULFILLED?{...t,...e?.value}:{...t}}getCustomRemoteExtensions(){var t=this;return Dl(function*(){const e=t.getParsedCustomBlocks(),i=e?.extensions?.map(a=>a.url),r=yield t.loadCustomBlocks(i),o=[];e.extensions.forEach(a=>{o.push(...a.actions?.map(l=>l.name)||[])});const s=r.reduce(t.parsedCustomModules,{});return Object.values(s)})()}getEditorNodes(){return[this._allowedBlocks?.length>1?eB.configure(this.starterConfig()):eB,...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 t=[];if(this._allowedBlocks.length<=1)return[...this._customNodes.values()];for(const e of this._allowedBlocks){const i=this._customNodes.get(e);i&&t.push(i)}return t}getEditorExtensions(){const t=[Tye({lang:this.lang,allowedContentTypes:this.allowedContentTypes,allowedBlocks:this._allowedBlocks,contentletIdentifier:this.contentletIdentifier}),Dye,Xwe.configure({placeholder:'Type "/" for commands'}),X0e.configure({height:300,width:400,interfaceLanguage:"us",nocookie:!0,modestBranding:!0}),$0e,W0e,kme(this.viewContainerRef,this.getParsedCustomBlocks(),{shouldShowAIExtensions:this.isAIPluginInstalled}),P_e(this.viewContainerRef),Jge(this.viewContainerRef,this.lang),Cye(this.viewContainerRef),dye(this.viewContainerRef),U_e(this.injector,this.viewContainerRef),Iye(this.viewContainerRef),zme(this.viewContainerRef),Oye.extend({renderHTML({HTMLAttributes:n}){return["th",tn(this.options.HTMLAttributes,n),["button",{class:"dot-cell-arrow"}],["p",0]]}}),G0e,H_e,b0e,yge(this.injector,this.viewContainerRef)];return this.isAIPluginInstalled&&t.push(Kue(this.viewContainerRef),xme(this.viewContainerRef),K_e(this.viewContainerRef)),t}getEditorMarks(){return[q0e,Y0e.configure({types:["heading","paragraph","listItem","dotImage"]}),D0e.configure({HTMLAttributes:{style:"background: #accef7;"}}),H0e.configure({autolink:!1,openOnClick:!1})]}setEditorJSONContent(t){this.content=this._allowedBlocks?.length>1?((n,t)=>{const e=(n=>n.reduce((t,e)=>L5[e]?{...t,...L5[e]}:{...t,[e]:!0},fue))(this._allowedBlocks),i=Array.isArray(n)?[...n]:[...n.content];return R5(i,e)})(t):t}}ey.\u0275fac=function(t){return new(t||ey)(O(Dr),O($r),O(bu))},ey.\u0275cmp=Me({type:ey,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(t,e){1&t&&M(0,iCe,4,12,"ng-container",0),2&t&&v("ngIf",e.editor)},dependencies:[fi,Kt,Ac,bp,Wh,Xg],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%] .ai-loading{display:flex;justify-content:center;align-items:center;min-width:100%;padding:.5rem;border-radius:.5rem;border:1px solid #d1d4db;color:var(--color-palette-primary-500)}[_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 gf{constructor(t){this.injector=t}ngDoBootstrap(){if(void 0===customElements.get("dotcms-block-editor")){const t=function nq(n,t){const e=function KY(n,t){return t.get(wc).resolveComponentFactory(n).inputs}(n,t.injector),i=t.strategyFactory||new XY(n,t.injector),r=function qY(n){const t={};return n.forEach(({propName:e,templateName:i})=>{t[function HY(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}(i)]=e}),t}(e);class o extends tq{get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=i.create(this.injector||t.injector);e.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),e.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}(ey,{injector:this.injector});customElements.define("dotcms-block-editor",t)}}}gf.\u0275fac=function(t){return new(t||gf)(F(Dr))},gf.\u0275mod=Xe({type:gf}),gf.\u0275inj=ct({imports:[bP,eZ,wn,ov,cf,OM,mM,_T]}),JG().bootstrapModule(gf).catch(n=>console.error(n))},10152:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(k,V){for(var B=k<0?"-":"",G=Math.abs(k).toString();G.length{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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=E.default},42926:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function B(G){return(0,V.default)({},G)};var V=k(x(32963));q.exports=E.default},73215:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(33338));E.default=V.default,q.exports=E.default},40150:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.getDefaultOptions=function k(){return x},E.setDefaultOptions=function V(B){x=B};var x={}},1635:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(90448)),B=k(x(71074)),G=k(x(23122)),$=k(x(8622)),R=k(x(68450)),P=k(x(10152)),Y=k(x(21393));function ze(X,U){var W=X>0?"-":"+",j=Math.abs(X),z=Math.floor(j/60),pe=j%60;if(0===pe)return W+String(z);var Re=U||"";return W+String(z)+Re+(0,P.default)(pe,2)}function ye(X,U){return X%60==0?(X>0?"-":"+")+(0,P.default)(Math.abs(X)/60,2):je(X,U)}function je(X,U){var W=U||"",j=X>0?"-":"+",z=Math.abs(X);return j+(0,P.default)(Math.floor(z/60),2)+W+(0,P.default)(z%60,2)}E.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 pe=(0,R.default)(U,z),Re=pe>0?pe:1-pe;return"YY"===W?(0,P.default)(Re%100,2):"Yo"===W?j.ordinalNumber(Re,{unit:"year"}):(0,P.default)(Re,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 pe=(0,$.default)(U,z);return"wo"===W?j.ordinalNumber(pe,{unit:"week"}):(0,P.default)(pe,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 pe=U.getUTCDay(),Re=(pe-z.weekStartsOn+8)%7||7;switch(W){case"e":return String(Re);case"ee":return(0,P.default)(Re,2);case"eo":return j.ordinalNumber(Re,{unit:"day"});case"eee":return j.day(pe,{width:"abbreviated",context:"formatting"});case"eeeee":return j.day(pe,{width:"narrow",context:"formatting"});case"eeeeee":return j.day(pe,{width:"short",context:"formatting"});default:return j.day(pe,{width:"wide",context:"formatting"})}},c:function(U,W,j,z){var pe=U.getUTCDay(),Re=(pe-z.weekStartsOn+8)%7||7;switch(W){case"c":return String(Re);case"cc":return(0,P.default)(Re,W.length);case"co":return j.ordinalNumber(Re,{unit:"day"});case"ccc":return j.day(pe,{width:"abbreviated",context:"standalone"});case"ccccc":return j.day(pe,{width:"narrow",context:"standalone"});case"cccccc":return j.day(pe,{width:"short",context:"standalone"});default:return j.day(pe,{width:"wide",context:"standalone"})}},i:function(U,W,j){var z=U.getUTCDay(),pe=0===z?7:z;switch(W){case"i":return String(pe);case"ii":return(0,P.default)(pe,W.length);case"io":return j.ordinalNumber(pe,{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 pe=U.getUTCHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"});case"aaa":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return j.dayPeriod(pe,{width:"narrow",context:"formatting"});default:return j.dayPeriod(pe,{width:"wide",context:"formatting"})}},b:function(U,W,j){var pe,z=U.getUTCHours();switch(pe=12===z?"noon":0===z?"midnight":z/12>=1?"pm":"am",W){case"b":case"bb":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"});case"bbb":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return j.dayPeriod(pe,{width:"narrow",context:"formatting"});default:return j.dayPeriod(pe,{width:"wide",context:"formatting"})}},B:function(U,W,j){var pe,z=U.getUTCHours();switch(pe=z>=17?"evening":z>=12?"afternoon":z>=4?"morning":"night",W){case"B":case"BB":case"BBB":return j.dayPeriod(pe,{width:"abbreviated",context:"formatting"});case"BBBBB":return j.dayPeriod(pe,{width:"narrow",context:"formatting"});default:return j.dayPeriod(pe,{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 Re=(z._originalDate||U).getTimezoneOffset();if(0===Re)return"Z";switch(W){case"X":return ye(Re);case"XXXX":case"XX":return je(Re);default:return je(Re,":")}},x:function(U,W,j,z){var Re=(z._originalDate||U).getTimezoneOffset();switch(W){case"x":return ye(Re);case"xxxx":case"xx":return je(Re);default:return je(Re,":")}},O:function(U,W,j,z){var Re=(z._originalDate||U).getTimezoneOffset();switch(W){case"O":case"OO":case"OOO":return"GMT"+ze(Re,":");default:return"GMT"+je(Re,":")}},z:function(U,W,j,z){var Re=(z._originalDate||U).getTimezoneOffset();switch(W){case"z":case"zz":case"zzz":return"GMT"+ze(Re,":");default:return"GMT"+je(Re,":")}},t:function(U,W,j,z){var Re=Math.floor((z._originalDate||U).getTime()/1e3);return(0,P.default)(Re,W.length)},T:function(U,W,j,z){var Re=(z._originalDate||U).getTime();return(0,P.default)(Re,W.length)}},q.exports=E.default},21393:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(10152));E.default={y:function(R,P){var Y=R.getUTCFullYear(),te=Y>0?Y:1-Y;return(0,V.default)("yy"===P?te%100:te,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,te=R.getUTCMilliseconds(),se=Math.floor(te*Math.pow(10,Y-3));return(0,V.default)(se,P.length)}},q.exports=E.default},75852:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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"})}};E.default={p:k,P:function(R,P){var ze,Y=R.match(/(P+)(p+)?/)||[],te=Y[1],se=Y[2];if(!se)return x(R,P);switch(te){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(te,P)).replace("{{time}}",k(se,P))}},q.exports=E.default},47664:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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=E.default},90448:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(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 te=P.getTime(),se=Y-te;return Math.floor(se/G)+1};var V=k(x(90798)),B=k(x(61886)),G=864e5;q.exports=E.default},71074:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y){(0,$.default)(1,arguments);var te=(0,V.default)(Y),se=(0,B.default)(te).getTime()-(0,G.default)(te).getTime();return Math.round(se/R)+1};var V=k(x(90798)),B=k(x(96729)),G=k(x(50525)),$=k(x(61886)),R=6048e5;q.exports=E.default},23122:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(R){(0,B.default)(1,arguments);var P=(0,V.default)(R),Y=P.getUTCFullYear(),te=new Date(0);te.setUTCFullYear(Y+1,0,4),te.setUTCHours(0,0,0,0);var se=(0,G.default)(te),ze=new Date(0);ze.setUTCFullYear(Y,0,4),ze.setUTCHours(0,0,0,0);var ye=(0,G.default)(ze);return P.getTime()>=se.getTime()?Y+1:P.getTime()>=ye.getTime()?Y:Y-1};var V=k(x(90798)),B=k(x(61886)),G=k(x(96729));q.exports=E.default},8622:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y,te){(0,$.default)(1,arguments);var se=(0,V.default)(Y),ze=(0,B.default)(se,te).getTime()-(0,G.default)(se,te).getTime();return Math.round(ze/R)+1};var V=k(x(90798)),B=k(x(88314)),G=k(x(72447)),$=k(x(61886)),R=6048e5;q.exports=E.default},68450:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y,te){var se,ze,ye,je,ne,X,U,W;(0,B.default)(1,arguments);var j=(0,V.default)(Y),z=j.getUTCFullYear(),pe=(0,R.getDefaultOptions)(),Re=(0,$.default)(null!==(se=null!==(ze=null!==(ye=null!==(je=te?.firstWeekContainsDate)&&void 0!==je?je:null==te||null===(ne=te.locale)||void 0===ne||null===(X=ne.options)||void 0===X?void 0:X.firstWeekContainsDate)&&void 0!==ye?ye:pe.firstWeekContainsDate)&&void 0!==ze?ze:null===(U=pe.locale)||void 0===U||null===(W=U.options)||void 0===W?void 0:W.firstWeekContainsDate)&&void 0!==se?se:1);if(!(Re>=1&&Re<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Se=new Date(0);Se.setUTCFullYear(z+1,0,Re),Se.setUTCHours(0,0,0,0);var Ee=(0,G.default)(Se,te),Oe=new Date(0);Oe.setUTCFullYear(z,0,Re),Oe.setUTCHours(0,0,0,0);var ve=(0,G.default)(Oe,te);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)),$=k(x(6092)),R=x(40150);q.exports=E.default},70183:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.isProtectedDayOfYearToken=function V($){return-1!==x.indexOf($)},E.isProtectedWeekYearToken=function B($){return-1!==k.indexOf($)},E.throwProtectedError=function G($,R,P){if("YYYY"===$)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"===$)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"===$)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"===$)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,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(k,V){if(V.length1?"s":"")+" required, but only "+V.length+" present")},q.exports=E.default},96729:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function G($){(0,B.default)(1,arguments);var R=1,P=(0,V.default)($),Y=P.getUTCDay(),te=(Y{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(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 te=(0,B.default)(Y);return te};var V=k(x(23122)),B=k(x(96729)),G=k(x(61886));q.exports=E.default},88314:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function R(P,Y){var te,se,ze,ye,je,ne,X,U;(0,B.default)(1,arguments);var W=(0,$.getDefaultOptions)(),j=(0,G.default)(null!==(te=null!==(se=null!==(ze=null!==(ye=Y?.weekStartsOn)&&void 0!==ye?ye:null==Y||null===(je=Y.locale)||void 0===je||null===(ne=je.options)||void 0===ne?void 0:ne.weekStartsOn)&&void 0!==ze?ze:W.weekStartsOn)&&void 0!==se?se:null===(X=W.locale)||void 0===X||null===(U=X.options)||void 0===U?void 0:U.weekStartsOn)&&void 0!==te?te:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var z=(0,V.default)(P),pe=z.getUTCDay(),Re=(pe{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y,te){var se,ze,ye,je,ne,X,U,W;(0,B.default)(1,arguments);var j=(0,R.getDefaultOptions)(),z=(0,$.default)(null!==(se=null!==(ze=null!==(ye=null!==(je=te?.firstWeekContainsDate)&&void 0!==je?je:null==te||null===(ne=te.locale)||void 0===ne||null===(X=ne.options)||void 0===X?void 0:X.firstWeekContainsDate)&&void 0!==ye?ye: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!==se?se:1),pe=(0,V.default)(Y,te),Re=new Date(0);Re.setUTCFullYear(pe,0,z),Re.setUTCHours(0,0,0,0);var Se=(0,G.default)(Re,te);return Se};var V=k(x(68450)),B=k(x(61886)),G=k(x(88314)),$=k(x(6092)),R=x(40150);q.exports=E.default},6092:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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=E.default},50405:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(R,P){(0,G.default)(2,arguments);var Y=(0,B.default)(R).getTime(),te=(0,V.default)(P);return new Date(Y+te)};var V=k(x(6092)),B=k(x(90798)),G=k(x(61886));q.exports=E.default},61348:(q,E,x)=>{"use strict";x.r(E),x.d(E,{default:()=>xo});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 jt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},mt=jt.width?String(jt.width):Be.defaultWidth,Bt=Be.formats[mt]||Be.formats[Be.defaultWidth];return Bt}}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"})},se={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(jt,mt){var On;if("formatting"===(null!=mt&&mt.context?String(mt.context):"standalone")&&Be.formattingValues){var ui=Be.defaultFormattingWidth||Be.defaultWidth,Hi=null!=mt&&mt.width?String(mt.width):ui;On=Be.formattingValues[Hi]||Be.formattingValues[ui]}else{var Fr=Be.defaultWidth,wt=null!=mt&&mt.width?String(mt.width):Be.defaultWidth;On=Be.values[wt]||Be.values[Fr]}return On[Be.argumentCallback?Be.argumentCallback(jt):jt]}}function Ee(Be){return function(jt){var mt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Bt=mt.width,On=Bt&&Be.matchPatterns[Bt]||Be.matchPatterns[Be.defaultMatchWidth],ui=jt.match(On);if(!ui)return null;var Hn,Hi=ui[0],Fr=Bt&&Be.parsePatterns[Bt]||Be.parsePatterns[Be.defaultParseWidth],wt=Array.isArray(Fr)?ve(Fr,function(es){return es.test(Hi)}):Oe(Fr,function(es){return es.test(Hi)});Hn=Be.valueCallback?Be.valueCallback(wt):wt,Hn=mt.valueCallback?mt.valueCallback(Hn):Hn;var pa=jt.slice(Hi.length);return{value:Hn,rest:pa}}}function Oe(Be,jt){for(var mt in Be)if(Be.hasOwnProperty(mt)&&jt(Be[mt]))return mt}function ve(Be,jt){for(var mt=0;mt0?"in "+On:On+" ago":On},formatLong:Y,formatRelative:function(jt,mt,Bt,On){return se[jt]},localize:{ordinalNumber:function(jt,mt){var Bt=Number(jt),On=Bt%100;if(On>20||On<10)switch(On%10){case 1:return Bt+"st";case 2:return Bt+"nd";case 3:return Bt+"rd"}return Bt+"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(jt){return jt-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 Ze(Be){return function(jt){var mt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Bt=jt.match(Be.matchPattern);if(!Bt)return null;var On=Bt[0],ui=jt.match(Be.parsePattern);if(!ui)return null;var Hi=Be.valueCallback?Be.valueCallback(ui[0]):ui[0];Hi=mt.valueCallback?mt.valueCallback(Hi):Hi;var Fr=jt.slice(On.length);return{value:Hi,rest:Fr}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(jt){return parseInt(jt,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(jt){return jt+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,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function j(pe,Re,Se){var Ee,Oe,ve,Ze,bt,ae,Pi,Ti,fe,Rr,er,Ui,ua,da,Eo,Za,ha,dn;(0,se.default)(2,arguments);var fa=String(Re),xo=(0,ze.getDefaultOptions)(),Be=null!==(Ee=null!==(Oe=Se?.locale)&&void 0!==Oe?Oe:xo.locale)&&void 0!==Ee?Ee:ye.default,jt=(0,te.default)(null!==(ve=null!==(Ze=null!==(bt=null!==(ae=Se?.firstWeekContainsDate)&&void 0!==ae?ae:null==Se||null===(Pi=Se.locale)||void 0===Pi||null===(Ti=Pi.options)||void 0===Ti?void 0:Ti.firstWeekContainsDate)&&void 0!==bt?bt:xo.firstWeekContainsDate)&&void 0!==Ze?Ze:null===(fe=xo.locale)||void 0===fe||null===(Rr=fe.options)||void 0===Rr?void 0:Rr.firstWeekContainsDate)&&void 0!==ve?ve:1);if(!(jt>=1&&jt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var mt=(0,te.default)(null!==(er=null!==(Ui=null!==(ua=null!==(da=Se?.weekStartsOn)&&void 0!==da?da:null==Se||null===(Eo=Se.locale)||void 0===Eo||null===(Za=Eo.options)||void 0===Za?void 0:Za.weekStartsOn)&&void 0!==ua?ua:xo.weekStartsOn)&&void 0!==Ui?Ui:null===(ha=xo.locale)||void 0===ha||null===(dn=ha.options)||void 0===dn?void 0:dn.weekStartsOn)&&void 0!==er?er:0);if(!(mt>=0&&mt<=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 Bt=(0,G.default)(pe);if(!(0,V.default)(Bt))throw new RangeError("Invalid time value");var On=(0,P.default)(Bt),ui=(0,B.default)(Bt,On),Hi={firstWeekContainsDate:jt,weekStartsOn:mt,locale:Be,_originalDate:Bt},Fr=fa.match(ne).map(function(wt){var Hn=wt[0];return"p"===Hn||"P"===Hn?(0,R.default[Hn])(wt,Be.formatLong):wt}).join("").match(je).map(function(wt){if("''"===wt)return"'";var Hn=wt[0];if("'"===Hn)return z(wt);var pa=$.default[Hn];if(pa)return!(null!=Se&&Se.useAdditionalWeekYearTokens)&&(0,Y.isProtectedWeekYearToken)(wt)&&(0,Y.throwProtectedError)(wt,Re,String(pe)),!(null!=Se&&Se.useAdditionalDayOfYearTokens)&&(0,Y.isProtectedDayOfYearToken)(wt)&&(0,Y.throwProtectedError)(wt,Re,String(pe)),pa(ui,wt,Be.localize,Hi);if(Hn.match(W))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Hn+"`");return wt}).join("");return Fr};var V=k(x(88830)),B=k(x(65726)),G=k(x(90798)),$=k(x(1635)),R=k(x(75852)),P=k(x(47664)),Y=x(70183),te=k(x(6092)),se=k(x(61886)),ze=x(40150),ye=k(x(73215)),je=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ne=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,X=/^'([^]*?)'?$/,U=/''/g,W=/[a-zA-Z]/;function z(pe){var Re=pe.match(X);return Re?Re[1].replace(U,"'"):pe}q.exports=E.default},73085:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function G($){return(0,B.default)(1,arguments),$ instanceof Date||"object"===(0,V.default)($)&&"[object Date]"===Object.prototype.toString.call($)};var V=k(x(50590)),B=k(x(61886));q.exports=E.default},88830:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(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=E.default},88995:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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=E.default},77579:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(k){return function(V,B){var $;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;$=k.formattingValues[P]||k.formattingValues[R]}else{var Y=k.defaultWidth,te=null!=B&&B.width?String(B.width):k.defaultWidth;$=k.values[te]||k.values[Y]}return $[k.argumentCallback?k.argumentCallback(V):V]}},q.exports=E.default},84728:(q,E)=>{"use strict";function k(B,G){for(var $ in B)if(B.hasOwnProperty($)&&G(B[$]))return $}function V(B,G){for(var $=0;$1&&void 0!==arguments[1]?arguments[1]:{},R=$.width,P=R&&B.matchPatterns[R]||B.matchPatterns[B.defaultMatchWidth],Y=G.match(P);if(!Y)return null;var ye,te=Y[0],se=R&&B.parsePatterns[R]||B.parsePatterns[B.defaultParseWidth],ze=Array.isArray(se)?V(se,function(ne){return ne.test(te)}):k(se,function(ne){return ne.test(te)});ye=B.valueCallback?B.valueCallback(ze):ze,ye=$.valueCallback?$.valueCallback(ye):ye;var je=G.slice(te.length);return{value:ye,rest:je}}},q.exports=E.default},27223:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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 $=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($.length);return{value:P,rest:Y}}},q.exports=E.default},39563:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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"}};E.default=function(G,$,R){var P,Y=x[G];return P="string"==typeof Y?Y:1===$?Y.one:Y.other.replace("{{count}}",$.toString()),null!=R&&R.addSuffix?R.comparison&&R.comparison>0?"in "+P:P+" ago":P},q.exports=E.default},66929:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.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"})};E.default=R,q.exports=E.default},21656:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.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"};E.default=function(G,$,R,P){return x[G]},q.exports=E.default},31098:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(77579)),se={ordinalNumber:function(je,ne){var X=Number(je),U=X%100;if(U>20||U<10)switch(U%10){case 1:return X+"st";case 2:return X+"nd";case 3:return X+"rd"}return X+"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"})};E.default=se,q.exports=E.default},53239:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.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"})};E.default=U,q.exports=E.default},33338:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var V=k(x(39563)),B=k(x(66929)),G=k(x(21656)),$=k(x(31098)),R=k(x(53239));E.default={code:"en-US",formatDistance:V.default,formatLong:B.default,formatRelative:G.default,localize:$.default,match:R.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},q.exports=E.default},65726:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(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=E.default},90798:(q,E,x)=>{"use strict";var k=x(36758).default;Object.defineProperty(E,"__esModule",{value:!0}),E.default=function G($){(0,B.default)(1,arguments);var R=Object.prototype.toString.call($);return $ instanceof Date||"object"===(0,V.default)($)&&"[object Date]"===R?new Date($.getTime()):"number"==typeof $||"[object Number]"===R?new Date($):(("string"==typeof $||"[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=E.default},88222:(q,E,x)=>{q=x.nmd(q);var V="__lodash_hash_undefined__",$=9007199254740991,R="[object Arguments]",P="[object Array]",te="[object Boolean]",se="[object Date]",ze="[object Error]",ye="[object Function]",ne="[object Map]",X="[object Number]",W="[object Object]",j="[object Promise]",pe="[object RegExp]",Re="[object Set]",Se="[object String]",ve="[object WeakMap]",Ze="[object ArrayBuffer]",bt="[object DataView]",Za=/^\[object .+?Constructor\]$/,ha=/^(?:0|[1-9]\d*)$/,dn={};dn["[object Float32Array]"]=dn["[object Float64Array]"]=dn["[object Int8Array]"]=dn["[object Int16Array]"]=dn["[object Int32Array]"]=dn["[object Uint8Array]"]=dn["[object Uint8ClampedArray]"]=dn["[object Uint16Array]"]=dn["[object Uint32Array]"]=!0,dn[R]=dn[P]=dn[Ze]=dn[te]=dn[bt]=dn[se]=dn[ze]=dn[ye]=dn[ne]=dn[X]=dn[W]=dn[pe]=dn[Re]=dn[Se]=dn[ve]=!1;var fa="object"==typeof global&&global&&global.Object===Object&&global,xo="object"==typeof self&&self&&self.Object===Object&&self,Be=fa||xo||Function("return this")(),jt=E&&!E.nodeType&&E,mt=jt&&q&&!q.nodeType&&q,Bt=mt&&mt.exports===jt,On=Bt&&fa.process,ui=function(){try{return On&&On.binding&&On.binding("util")}catch{}}(),Hi=ui&&ui.isTypedArray;function Hn(T,L){for(var ie=-1,Te=null==T?0:T.length;++ieii))return!1;var rn=ut.get(T);if(rn&&ut.get(L))return rn==L;var Mi=-1,ao=!0,Me=2&ie?new Yt:void 0;for(ut.set(T,L),ut.set(L,T);++Mi-1},ts.prototype.set=function QE(T,L){var ie=this.__data__,Te=Ku(ie,T);return Te<0?(++this.size,ie.push([T,L])):ie[Te][1]=L,this},el.prototype.clear=function _w(){this.size=0,this.__data__={hash:new _a,map:new(ga||ts),string:new _a}},el.prototype.delete=function ZE(T){var L=fn(this,T).delete(T);return this.size-=L?1:0,L},el.prototype.get=function vw(T){return fn(this,T).get(T)},el.prototype.has=function JE(T){return fn(this,T).has(T)},el.prototype.set=function jr(T,L){var ie=fn(this,T),Te=ie.size;return ie.set(T,L),this.size+=ie.size==Te?0:1,this},Yt.prototype.add=Yt.prototype.push=function XE(T){return this.__data__.set(T,V),this},Yt.prototype.has=function ex(T){return this.__data__.has(T)},va.prototype.clear=function H(){this.__data__=new ts,this.size=0},va.prototype.delete=function tx(T){var L=this.__data__,ie=L.delete(T);return this.size=L.size,ie},va.prototype.get=function ct(T){return this.__data__.get(T)},va.prototype.has=function qu(T){return this.__data__.has(T)},va.prototype.set=function bw(T,L){var ie=this.__data__;if(ie instanceof ts){var Te=ie.__data__;if(!ga||Te.length<199)return Te.push([T,L]),this.size=++ie.size,this;ie=this.__data__=new el(Te)}return ie.set(T,L),this.size=ie.size,this};var ix=cy?function(T){return null==T?[]:(T=Object(T),function Fr(T,L){for(var ie=-1,Te=null==T?0:T.length,Ye=0,ut=[];++ie-1&&T%1==0&&T-1&&T%1==0&&T<=$}function rl(T){var L=typeof T;return null!=T&&("object"==L||"function"==L)}function uc(T){return null!=T&&"object"==typeof T}var py=Hi?function es(T){return function(L){return T(L)}}(Hi):function et(T){return uc(T)&&ed(T.length)&&!!dn[tl(T)]};function Ew(T){return function F(T){return null!=T&&ed(T.length)&&!cc(T)}(T)?function uy(T,L){var ie=Ju(T),Te=!ie&&il(T),Ye=!ie&&!Te&&Xu(T),ut=!ie&&!Te&&!Ye&&py(T),Nn=ie||Te||Ye||ut,ii=Nn?function pa(T,L){for(var ie=-1,Te=Array(T);++ie{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],$=G[0];return Promise.all(G.slice(1).map(x.e)).then(()=>x.t($,23))}V.keys=()=>Object.keys(k),V.id=13131,q.exports=V},71213:(q,E,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],$=G[0];return Promise.all(G.slice(2).map(x.e)).then(()=>x.t($,16|G[1]))}V.keys=()=>Object.keys(k),V.id=71213,q.exports=V},36930:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(k,V,B,G,$,R,P){var Y=new Date(0);return Y.setUTCFullYear(k,V,B),Y.setUTCHours(G,$,R,P),Y},q.exports=E.default},47:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(G,$,R){var P=function B(G,$,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:$,timeZoneName:G})}(G,R.timeZone,R.locale);return P.formatToParts?function k(G,$){for(var R=G.formatToParts($),P=R.length-1;P>=0;--P)if("timeZoneName"===R[P].type)return R[P].value}(P,$):function V(G,$){var R=G.format($).replace(/\u200E/g,""),P=/ [\w-+ ]+$/.exec(R);return P?P[0].substr(1):""}(P,$)},q.exports=E.default},1870:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(ne,X,U){var W,j,z;if(!ne||(W=R.timezoneZ.exec(ne)))return 0;if(W=R.timezoneHH.exec(ne))return ze(z=parseInt(W[1],10))?-z*G:NaN;if(W=R.timezoneHHMM.exec(ne)){z=parseInt(W[1],10);var pe=parseInt(W[2],10);return ze(z,pe)?(j=Math.abs(z)*G+6e4*pe,z>0?-j:j):NaN}if(function je(ne){if(ye[ne])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:ne}),ye[ne]=!0,!0}catch{return!1}}(ne)){X=new Date(X||Date.now());var Re=U?X:function Y(ne){return(0,V.default)(ne.getFullYear(),ne.getMonth(),ne.getDate(),ne.getHours(),ne.getMinutes(),ne.getSeconds(),ne.getMilliseconds())}(X),Se=te(Re,ne),Ee=U?Se:function se(ne,X,U){var j=ne.getTime()-X,z=te(new Date(j),U);if(X===z)return X;j-=z-X;var pe=te(new Date(j),U);return z===pe?z:Math.max(z,pe)}(X,Se,ne);return-Ee}return NaN};var k=B(x(78598)),V=B(x(36930));function B(ne){return ne&&ne.__esModule?ne:{default:ne}}var G=36e5,R={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function te(ne,X){var U=(0,k.default)(ne,X),W=(0,V.default)(U[0],U[1]-1,U[2],U[3]%24,U[4],U[5],0).getTime(),j=ne.getTime(),z=j%1e3;return W-(j-(z>=0?z:1e3+z))}function ze(ne,X){return-23<=ne&&ne<=23&&(null==X||0<=X&&X<=59)}var ye={};q.exports=E.default},32121:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0,E.default=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,q.exports=E.default},78598:(q,E)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function x(R,P){var Y=function $(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),te=[],se=0;se=0&&(te[ze]=parseInt(Y[se].value,10))}return te}catch(ye){if(ye instanceof RangeError)return[NaN];throw ye}}(Y,R):function B(R,P){var Y=R.format(P).replace(/\u200E/g,""),te=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(Y);return[te[3],te[1],te[2],te[4],te[5],te[6]]}(Y,R)};var k={year:0,month:1,day:2,hour:3,minute:4,second:5},G={};q.exports=E.default},65660:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=void 0;var k=B(x(47)),V=B(x(1870));function B(ye){return ye&&ye.__esModule?ye:{default:ye}}function R(ye,je){var ne=ye?(0,V.default)(ye,je,!0)/6e4:je.getTimezoneOffset();if(Number.isNaN(ne))throw new RangeError("Invalid time zone specified: "+ye);return ne}function P(ye,je){for(var ne=ye<0?"-":"",X=Math.abs(ye).toString();X.length0?"-":"+",U=Math.abs(ye);return X+P(Math.floor(U/60),2)+ne+P(Math.floor(U%60),2)}function te(ye,je){return ye%60==0?(ye>0?"-":"+")+P(Math.abs(ye)/60,2):Y(ye,je)}E.default={X:function(ye,je,ne,X){var U=R(X.timeZone,X._originalDate||ye);if(0===U)return"Z";switch(je){case"X":return te(U);case"XXXX":case"XX":return Y(U);default:return Y(U,":")}},x:function(ye,je,ne,X){var U=R(X.timeZone,X._originalDate||ye);switch(je){case"x":return te(U);case"xxxx":case"xx":return Y(U);default:return Y(U,":")}},O:function(ye,je,ne,X){var U=R(X.timeZone,X._originalDate||ye);switch(je){case"O":case"OO":case"OOO":return"GMT"+function se(ye,je){var ne=ye>0?"-":"+",X=Math.abs(ye),U=Math.floor(X/60),W=X%60;if(0===W)return ne+String(U);var j=je||"";return ne+String(U)+j+P(W,2)}(U,":");default:return"GMT"+Y(U,":")}},z:function(ye,je,ne,X){var U=X._originalDate||ye;switch(je){case"z":case"zz":case"zzz":return(0,k.default)("short",U,X);default:return(0,k.default)("long",U,X)}}},q.exports=E.default},34294:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function R(P,Y,te){var se=String(Y),ze=te||{},ye=se.match($);if(ye){var je=(0,B.default)(P,ze);se=ye.reduce(function(ne,X){if("'"===X[0])return ne;var U=ne.indexOf(X),W="'"===ne[U-1],j=ne.replace(X,"'"+V.default[X[0]](je,X,null,ze)+"'");return W?j.substring(0,U-1)+j.substring(U+1):j},se)}return(0,k.default)(P,se,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 $=/([xXOz]+)|''|'(''|[^'])+('|$)/g;q.exports=E.default},28032:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function $(R,P,Y,te){var se=(0,k.default)(te);return se.timeZone=P,(0,V.default)((0,B.default)(R,P),Y,se)};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=E.default},46167:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function B(G,$){return-(0,k.default)(G,$)};var k=function V(G){return G&&G.__esModule?G:{default:G}}(x(1870));q.exports=E.default},30298:(q,E,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,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function se(Ee,Oe){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===Ee)return new Date(NaN);var ve=Oe||{},Ze=null==ve.additionalDigits?2:(0,k.default)(ve.additionalDigits);if(2!==Ze&&1!==Ze&&0!==Ze)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 bt=ze(Ee),ae=ye(bt.date,Ze),Pi=ae.year,Ti=ae.restDateString,fe=je(Ti,Pi);if(isNaN(fe))return new Date(NaN);if(fe){var Ui,Rr=fe.getTime(),er=0;if(bt.time&&(er=ne(bt.time),isNaN(er)))return new Date(NaN);if(bt.timeZone||ve.timeZone){if(Ui=(0,B.default)(bt.timeZone||ve.timeZone,new Date(Rr+er)),isNaN(Ui))return new Date(NaN)}else Ui=(0,V.default)(new Date(Rr+er)),Ui=(0,V.default)(new Date(Rr+er+Ui));return new Date(Rr+er+Ui)}return new Date(NaN)};var k=$(x(6092)),V=$(x(47664)),B=$(x(1870)),G=$(x(32121));function $(Ee){return Ee&&Ee.__esModule?Ee:{default:Ee}}var R=36e5,te={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 Ze,Oe={},ve=te.dateTimePattern.exec(Ee);if(ve?(Oe.date=ve[1],Ze=ve[3]):(ve=te.datePattern.exec(Ee))?(Oe.date=ve[1],Ze=ve[2]):(Oe.date=null,Ze=Ee),Ze){var bt=te.timeZone.exec(Ze);bt?(Oe.time=Ze.replace(bt[1],""),Oe.timeZone=bt[1].trim()):Oe.time=Ze}return Oe}function ye(Ee,Oe){var bt,ve=te.YYY[Oe],Ze=te.YYYYY[Oe];if(bt=te.YYYY.exec(Ee)||Ze.exec(Ee)){var ae=bt[1];return{year:parseInt(ae,10),restDateString:Ee.slice(ae.length)}}if(bt=te.YY.exec(Ee)||ve.exec(Ee)){var Pi=bt[1];return{year:100*parseInt(Pi,10),restDateString:Ee.slice(Pi.length)}}return{year:null}}function je(Ee,Oe){if(null===Oe)return null;var ve,Ze,bt,ae;if(0===Ee.length)return(Ze=new Date(0)).setUTCFullYear(Oe),Ze;if(ve=te.MM.exec(Ee))return Ze=new Date(0),z(Oe,bt=parseInt(ve[1],10)-1)?(Ze.setUTCFullYear(Oe,bt),Ze):new Date(NaN);if(ve=te.DDD.exec(Ee)){Ze=new Date(0);var Pi=parseInt(ve[1],10);return function pe(Ee,Oe){if(Oe<1)return!1;var ve=j(Ee);return!(ve&&Oe>366||!ve&&Oe>365)}(Oe,Pi)?(Ze.setUTCFullYear(Oe,0,Pi),Ze):new Date(NaN)}if(ve=te.MMDD.exec(Ee)){Ze=new Date(0),bt=parseInt(ve[1],10)-1;var Ti=parseInt(ve[2],10);return z(Oe,bt,Ti)?(Ze.setUTCFullYear(Oe,bt,Ti),Ze):new Date(NaN)}if(ve=te.Www.exec(Ee))return Re(0,ae=parseInt(ve[1],10)-1)?X(Oe,ae):new Date(NaN);if(ve=te.WwwD.exec(Ee)){ae=parseInt(ve[1],10)-1;var fe=parseInt(ve[2],10)-1;return Re(0,ae,fe)?X(Oe,ae,fe):new Date(NaN)}return null}function ne(Ee){var Oe,ve,Ze;if(Oe=te.HH.exec(Ee))return Se(ve=parseFloat(Oe[1].replace(",",".")))?ve%24*R:NaN;if(Oe=te.HHMM.exec(Ee))return Se(ve=parseInt(Oe[1],10),Ze=parseFloat(Oe[2].replace(",",".")))?ve%24*R+6e4*Ze:NaN;if(Oe=te.HHMMSS.exec(Ee)){ve=parseInt(Oe[1],10),Ze=parseInt(Oe[2],10);var bt=parseFloat(Oe[3].replace(",","."));return Se(ve,Ze,bt)?ve%24*R+6e4*Ze+1e3*bt:NaN}return null}function X(Ee,Oe,ve){Oe=Oe||0,ve=ve||0;var Ze=new Date(0);Ze.setUTCFullYear(Ee,0,4);var ae=7*Oe+ve+1-(Ze.getUTCDay()||7);return Ze.setUTCDate(Ze.getUTCDate()+ae),Ze}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,Oe,ve){if(Oe<0||Oe>11)return!1;if(null!=ve){if(ve<1)return!1;var Ze=j(Ee);if(Ze&&ve>W[Oe]||!Ze&&ve>U[Oe])return!1}return!0}function Re(Ee,Oe,ve){return!(Oe<0||Oe>52||null!=ve&&(ve<0||ve>6))}function Se(Ee,Oe,ve){return!(null!=Ee&&(Ee<0||Ee>=25)||null!=Oe&&(Oe<0||Oe>=60)||null!=ve&&(ve<0||ve>=60))}q.exports=E.default},17318:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function G($,R,P){var Y=(0,V.default)($,P),te=(0,k.default)(R,Y,!0),se=new Date(Y.getTime()-te),ze=new Date(0);return ze.setFullYear(se.getUTCFullYear(),se.getUTCMonth(),se.getUTCDate()),ze.setHours(se.getUTCHours(),se.getUTCMinutes(),se.getUTCSeconds(),se.getUTCMilliseconds()),ze};var k=B(x(1870)),V=B(x(29018));function B($){return $&&$.__esModule?$:{default:$}}q.exports=E.default},99679:(q,E,x)=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0}),E.default=function P(Y,te,se){if("string"==typeof Y&&!Y.match(B.default)){var ze=(0,k.default)(se);return ze.timeZone=te,(0,V.default)(Y,ze)}var ye=(0,V.default)(Y,se),je=(0,$.default)(ye.getFullYear(),ye.getMonth(),ye.getDate(),ye.getHours(),ye.getMinutes(),ye.getSeconds(),ye.getMilliseconds()).getTime(),ne=(0,G.default)(te,new Date(je));return new Date(je+ne)};var k=R(x(42926)),V=R(x(29018)),B=R(x(32121)),G=R(x(1870)),$=R(x(36930));function R(Y){return Y&&Y.__esModule?Y:{default:Y}}q.exports=E.default},36758:q=>{q.exports=function E(x){return x&&x.__esModule?x:{default:x}},q.exports.__esModule=!0,q.exports.default=q.exports},50590:q=>{function E(x){return q.exports=E="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,E(x)}q.exports=E,q.exports.__esModule=!0,q.exports.default=q.exports}},q=>{q(q.s=30361)}]); \ No newline at end of file