{"ast":null,"code":"var _MenuService, _NzSubmenuService, _NzMenuItemComponent, _NzSubmenuInlineChildComponent, _NzSubmenuNoneInlineChildComponent, _NzSubMenuTitleComponent, _NzSubMenuComponent, _NzMenuDirective, _NzMenuGroupComponent, _NzMenuDividerDirective, _NzMenuModule;\nconst _c0 = [\"nz-menu-item\", \"\"];\nconst _c1 = [\"*\"];\nconst _c2 = [\"nz-submenu-inline-child\", \"\"];\nfunction _NzSubmenuInlineChildComponent_ng_template_0_Template(rf, ctx) {}\nconst _c3 = [\"nz-submenu-none-inline-child\", \"\"];\nfunction _NzSubmenuNoneInlineChildComponent_ng_template_1_Template(rf, ctx) {}\nconst _c4 = [\"nz-submenu-title\", \"\"];\nfunction _NzSubMenuTitleComponent_Conditional_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 0);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"nzType\", ctx_r0.nzIcon);\n }\n}\nfunction _NzSubMenuTitleComponent_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"span\", 4);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx_r0.nzTitle);\n }\n}\nfunction _NzSubMenuTitleComponent_Conditional_3_Case_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 5);\n }\n}\nfunction _NzSubMenuTitleComponent_Conditional_3_Case_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 6);\n }\n}\nfunction _NzSubMenuTitleComponent_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 2);\n i0.ɵɵtemplate(1, _NzSubMenuTitleComponent_Conditional_3_Case_1_Template, 1, 0, \"span\", 5)(2, _NzSubMenuTitleComponent_Conditional_3_Case_2_Template, 1, 0, \"span\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n let tmp_1_0;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵconditional((tmp_1_0 = ctx_r0.dir) === \"rtl\" ? 1 : 2);\n }\n}\nfunction _NzSubMenuTitleComponent_Conditional_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 3);\n }\n}\nconst _c5 = [\"nz-submenu\", \"\"];\nconst _c6 = [[[\"\", \"title\", \"\"]], \"*\"];\nconst _c7 = [\"[title]\", \"*\"];\nfunction _NzSubMenuComponent_Conditional_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0);\n }\n}\nfunction _NzSubMenuComponent_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 3);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n const subMenuTemplate_r3 = i0.ɵɵreference(6);\n i0.ɵɵproperty(\"mode\", ctx_r1.mode)(\"nzOpen\", ctx_r1.nzOpen)(\"@.disabled\", !!(ctx_r1.noAnimation == null ? null : ctx_r1.noAnimation.nzNoAnimation))(\"nzNoAnimation\", ctx_r1.noAnimation == null ? null : ctx_r1.noAnimation.nzNoAnimation)(\"menuClass\", ctx_r1.nzMenuClassName)(\"templateOutlet\", subMenuTemplate_r3);\n }\n}\nfunction _NzSubMenuComponent_Conditional_4_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵlistener(\"subMenuMouseState\", function _NzSubMenuComponent_Conditional_4_ng_template_0_Template_div_subMenuMouseState_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.setMouseEnterState($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n const subMenuTemplate_r3 = i0.ɵɵreference(6);\n i0.ɵɵproperty(\"theme\", ctx_r1.theme)(\"mode\", ctx_r1.mode)(\"nzOpen\", ctx_r1.nzOpen)(\"position\", ctx_r1.position)(\"nzDisabled\", ctx_r1.nzDisabled)(\"isMenuInsideDropDown\", ctx_r1.isMenuInsideDropDown)(\"templateOutlet\", subMenuTemplate_r3)(\"menuClass\", ctx_r1.nzMenuClassName)(\"@.disabled\", !!(ctx_r1.noAnimation == null ? null : ctx_r1.noAnimation.nzNoAnimation))(\"nzNoAnimation\", ctx_r1.noAnimation == null ? null : ctx_r1.noAnimation.nzNoAnimation);\n }\n}\nfunction _NzSubMenuComponent_Conditional_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵtemplate(0, _NzSubMenuComponent_Conditional_4_ng_template_0_Template, 1, 10, \"ng-template\", 5);\n i0.ɵɵlistener(\"positionChange\", function _NzSubMenuComponent_Conditional_4_Template_ng_template_positionChange_0_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onPositionChange($event));\n });\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n const origin_r6 = i0.ɵɵreference(1);\n i0.ɵɵproperty(\"cdkConnectedOverlayPositions\", ctx_r1.overlayPositions)(\"cdkConnectedOverlayOrigin\", origin_r6)(\"cdkConnectedOverlayWidth\", ctx_r1.triggerWidth)(\"cdkConnectedOverlayOpen\", ctx_r1.nzOpen)(\"cdkConnectedOverlayTransformOriginOn\", \".ant-menu-submenu\");\n }\n}\nfunction _NzSubMenuComponent_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0, 1);\n }\n}\nconst _c8 = [\"titleElement\"];\nconst _c9 = [\"nz-menu-group\", \"\"];\nconst _c10 = [\"*\", [[\"\", \"title\", \"\"]]];\nconst _c11 = [\"*\", \"[title]\"];\nfunction _NzMenuGroupComponent_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(ctx_r0.nzTitle);\n }\n}\nfunction _NzMenuGroupComponent_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0, 1);\n }\n}\nimport * as i1 from '@angular/cdk/bidi';\nimport { Directionality } from '@angular/cdk/bidi';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, inject, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ContentChildren, EventEmitter, Output, ElementRef, ViewChild, forwardRef, Directive, NgModule } from '@angular/core';\nimport { Subject, BehaviorSubject, merge, combineLatest } from 'rxjs';\nimport { map, mergeMap, filter, mapTo, auditTime, distinctUntilChanged, takeUntil, startWith, switchMap } from 'rxjs/operators';\nimport { RouterLink, Router, NavigationEnd } from '@angular/router';\nimport { numberAttributeWithZeroFallback } from 'ng-zorro-antd/core/util';\nimport * as i4 from '@angular/cdk/overlay';\nimport { CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';\nimport { NzNoAnimationDirective } from 'ng-zorro-antd/core/no-animation';\nimport { POSITION_MAP, getPlacementName } from 'ng-zorro-antd/core/overlay';\nimport { NgTemplateOutlet, NgClass } from '@angular/common';\nimport { collapseMotion, zoomBigMotion, slideMotion } from 'ng-zorro-antd/core/animation';\nimport * as i3 from 'ng-zorro-antd/core/outlet';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport * as i2 from 'ng-zorro-antd/icon';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport * as i3$1 from '@angular/cdk/platform';\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nconst NzIsMenuInsideDropDownToken = new InjectionToken('NzIsInDropDownMenuToken');\nconst NzMenuServiceLocalToken = new InjectionToken('NzMenuServiceLocalToken');\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass MenuService {\n constructor() {\n /** all descendant menu click **/\n this.descendantMenuItemClick$ = new Subject();\n /** child menu item click **/\n this.childMenuItemClick$ = new Subject();\n this.theme$ = new BehaviorSubject('light');\n this.mode$ = new BehaviorSubject('vertical');\n this.inlineIndent$ = new BehaviorSubject(24);\n this.isChildSubMenuOpen$ = new BehaviorSubject(false);\n }\n onDescendantMenuItemClick(menu) {\n this.descendantMenuItemClick$.next(menu);\n }\n onChildMenuItemClick(menu) {\n this.childMenuItemClick$.next(menu);\n }\n setMode(mode) {\n this.mode$.next(mode);\n }\n setTheme(theme) {\n this.theme$.next(theme);\n }\n setInlineIndent(indent) {\n this.inlineIndent$.next(indent);\n }\n}\n_MenuService = MenuService;\n_MenuService.ɵfac = function _MenuService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || _MenuService)();\n};\n_MenuService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: _MenuService,\n factory: _MenuService.ɵfac\n});\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(MenuService, [{\n type: Injectable\n }], null, null);\n})();\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass NzSubmenuService {\n /**\n * menu item inside submenu clicked\n *\n * @param menu\n */\n onChildMenuItemClick(menu) {\n this.childMenuItemClick$.next(menu);\n }\n setOpenStateWithoutDebounce(value) {\n this.isCurrentSubMenuOpen$.next(value);\n }\n setMouseEnterTitleOrOverlayState(value) {\n this.isMouseEnterTitleOrOverlay$.next(value);\n }\n constructor(nzMenuService) {\n this.nzMenuService = nzMenuService;\n this.mode$ = this.nzMenuService.mode$.pipe(map(mode => {\n if (mode === 'inline') {\n return 'inline';\n /** if inside another submenu, set the mode to vertical **/\n } else if (mode === 'vertical' || this.nzHostSubmenuService) {\n return 'vertical';\n } else {\n return 'horizontal';\n }\n }));\n this.level = 1;\n this.isMenuInsideDropDown = inject(NzIsMenuInsideDropDownToken);\n this.isCurrentSubMenuOpen$ = new BehaviorSubject(false);\n this.isChildSubMenuOpen$ = new BehaviorSubject(false);\n /** submenu title & overlay mouse enter status **/\n this.isMouseEnterTitleOrOverlay$ = new Subject();\n this.childMenuItemClick$ = new Subject();\n this.destroy$ = new Subject();\n this.nzHostSubmenuService = inject(NzSubmenuService, {\n optional: true,\n skipSelf: true\n });\n if (this.nzHostSubmenuService) {\n this.level = this.nzHostSubmenuService.level + 1;\n }\n /** close if menu item clicked **/\n const isClosedByMenuItemClick = this.childMenuItemClick$.pipe(mergeMap(() => this.mode$), filter(mode => mode !== 'inline' || this.isMenuInsideDropDown), mapTo(false));\n const isCurrentSubmenuOpen$ = merge(this.isMouseEnterTitleOrOverlay$, isClosedByMenuItemClick);\n /** combine the child submenu status with current submenu status to calculate host submenu open **/\n const isSubMenuOpenWithDebounce$ = combineLatest([this.isChildSubMenuOpen$, isCurrentSubmenuOpen$]).pipe(map(([isChildSubMenuOpen, isCurrentSubmenuOpen]) => isChildSubMenuOpen || isCurrentSubmenuOpen), auditTime(150), distinctUntilChanged(), takeUntil(this.destroy$));\n isSubMenuOpenWithDebounce$.pipe(distinctUntilChanged()).subscribe(data => {\n this.setOpenStateWithoutDebounce(data);\n if (this.nzHostSubmenuService) {\n /** set parent submenu's child submenu open status **/\n this.nzHostSubmenuService.isChildSubMenuOpen$.next(data);\n } else {\n this.nzMenuService.isChildSubMenuOpen$.next(data);\n }\n });\n }\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n_NzSubmenuService = NzSubmenuService;\n_NzSubmenuService.ɵfac = function _NzSubmenuService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || _NzSubmenuService)(i0.ɵɵinject(MenuService));\n};\n_NzSubmenuService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: _NzSubmenuService,\n factory: _NzSubmenuService.ɵfac\n});\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(NzSubmenuService, [{\n type: Injectable\n }], () => [{\n type: MenuService\n }], null);\n})();\n\n/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\nclass NzMenuItemComponent {\n /** clear all item selected status except this */\n clickMenuItem(e) {\n if (this.nzDisabled) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n this.nzMenuService.onDescendantMenuItemClick(this);\n if (this.nzSubmenuService) {\n /** menu item inside the submenu **/\n this.nzSubmenuService.onChildMenuItemClick(this);\n } else {\n /** menu item inside the root menu **/\n this.nzMenuService.onChildMenuItemClick(this);\n }\n }\n }\n setSelectedState(value) {\n this.nzSelected = value;\n this.selected$.next(value);\n }\n updateRouterActive() {\n if (!this.listOfRouterLink || !this.router || !this.router.navigated || !this.nzMatchRouter) {\n return;\n }\n Promise.resolve().then(() => {\n const hasActiveLinks = this.hasActiveLinks();\n if (this.nzSelected !== hasActiveLinks) {\n this.nzSelected = hasActiveLinks;\n this.setSelectedState(this.nzSelected);\n this.cdr.markForCheck();\n }\n });\n }\n hasActiveLinks() {\n const isActiveCheckFn = this.isLinkActive(this.router);\n return this.routerLink && isActiveCheckFn(this.routerLink) || this.listOfRouterLink.some(isActiveCheckFn);\n }\n isLinkActive(router) {\n return link => router.isActive(link.urlTree || '', {\n paths: this.nzMatchRouterExact ? 'exact' : 'subset',\n queryParams: this.nzMatchRouterExact ? 'exact' : 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored'\n });\n }\n constructor(nzMenuService, cdr) {\n this.nzMenuService = nzMenuService;\n this.cdr = cdr;\n this.destroy$ = new Subject();\n this.nzSubmenuService = inject(NzSubmenuService, {\n optional: true\n });\n this.directionality = inject(Directionality);\n this.routerLink = inject(RouterLink, {\n optional: true\n });\n this.router = inject(Router, {\n optional: true\n });\n this.isMenuInsideDropDown = inject(NzIsMenuInsideDropDownToken);\n this.level = this.nzSubmenuService ? this.nzSubmenuService.level + 1 : 1;\n this.selected$ = new Subject();\n this.inlinePaddingLeft = null;\n this.dir = 'ltr';\n this.nzDisabled = false;\n this.nzSelected = false;\n this.nzDanger = false;\n this.nzMatchRouterExact = false;\n this.nzMatchRouter = false;\n if (this.router) {\n this.router.events.pipe(takeUntil(this.destroy$), filter(e => e instanceof NavigationEnd)).subscribe(() => {\n this.updateRouterActive();\n });\n }\n }\n ngOnInit() {\n var _this$directionality$;\n /** store origin padding in padding */\n combineLatest([this.nzMenuService.mode$, this.nzMenuService.inlineIndent$]).pipe(takeUntil(this.destroy$)).subscribe(([mode, inlineIndent]) => {\n this.inlinePaddingLeft = mode === 'inline' ? this.level * inlineIndent : null;\n });\n this.dir = this.directionality.value;\n (_this$directionality$ = this.directionality.change) === null || _this$directionality$ === void 0 || _this$directionality$.pipe(takeUntil(this.destroy$)).subscribe(direction => {\n this.dir = direction;\n });\n }\n ngAfterContentInit() {\n this.listOfRouterLink.changes.pipe(takeUntil(this.destroy$)).subscribe(() => this.updateRouterActive());\n this.updateRouterActive();\n }\n ngOnChanges(changes) {\n if (changes.nzSelected) {\n this.setSelectedState(this.nzSelected);\n }\n }\n ngOnDestroy() {\n this.destroy$.next(true);\n this.destroy$.complete();\n }\n}\n_NzMenuItemComponent = NzMenuItemComponent;\n_NzMenuItemComponent.ɵfac = function _NzMenuItemComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || _NzMenuItemComponent)(i0.ɵɵdirectiveInject(MenuService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n};\n_NzMenuItemComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: _NzMenuItemComponent,\n selectors: [[\"\", \"nz-menu-item\", \"\"]],\n contentQueries: function _NzMenuItemComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, RouterLink, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.listOfRouterLink = _t);\n }\n },\n hostVars: 20,\n hostBindings: function _NzMenuItemComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function _NzMenuItemComponent_click_HostBindingHandler($event) {\n return ctx.clickMenuItem($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"padding-left\", ctx.dir === \"rtl\" ? null : ctx.nzPaddingLeft || ctx.inlinePaddingLeft, \"px\")(\"padding-right\", ctx.dir === \"rtl\" ? ctx.nzPaddingLeft || ctx.inlinePaddingLeft : null, \"px\");\n i0.ɵɵclassProp(\"ant-dropdown-menu-item\", ctx.isMenuInsideDropDown)(\"ant-dropdown-menu-item-selected\", ctx.isMenuInsideDropDown && ctx.nzSelected)(\"ant-dropdown-menu-item-danger\", ctx.isMenuInsideDropDown && ctx.nzDanger)(\"ant-dropdown-menu-item-disabled\", ctx.isMenuInsideDropDown && ctx.nzDisabled)(\"ant-menu-item\", !ctx.isMenuInsideDropDown)(\"ant-menu-item-selected\", !ctx.isMenuInsideDropDown && ctx.nzSelected)(\"ant-menu-item-danger\", !ctx.isMenuInsideDropDown && ctx.nzDanger)(\"ant-menu-item-disabled\", !ctx.isMenuInsideDropDown && ctx.nzDisabled);\n }\n },\n inputs: {\n nzPaddingLeft: [2, \"nzPaddingLeft\", \"nzPaddingLeft\", numberAttributeWithZeroFallback],\n nzDisabled: [2, \"nzDisabled\", \"nzDisabled\", booleanAttribute],\n nzSelected: [2, \"nzSelected\", \"nzSelected\", booleanAttribute],\n nzDanger: [2, \"nzDanger\", \"nzDanger\", booleanAttribute],\n nzMatchRouterExact: [2, \"nzMatchRouterExact\", \"nzMatchRouterExact\", booleanAttribute],\n nzMatchRouter: [2, \"nzMatchRouter\", \"nzMatchRouter\", booleanAttribute]\n },\n exportAs: [\"nzMenuItem\"],\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature],\n attrs: _c0,\n ngContentSelectors: _c1,\n decls: 2,\n vars: 0,\n consts: [[1, \"ant-menu-title-content\"]],\n template: function _NzMenuItemComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"span\", 0);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n});\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(NzMenuItemComponent, [{\n type: Component,\n args: [{\n selector: '[nz-menu-item]',\n exportAs: 'nzMenuItem',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n template: `\n