import { __spread, __decorate, __metadata } from 'tslib';
import { CdkOverlayOrigin, CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
import { ɵɵdirectiveInject, ElementRef, ɵɵdefineDirective, ɵɵlistener, ɵɵProvidersFeature, ɵsetClassMetadata, Directive, Input, HostListener, ɵɵelementStart, ɵɵtext, ɵɵelementEnd, ɵɵnextContext, ɵɵadvance, ɵɵtextInterpolate, ɵɵgetCurrentView, ɵɵrestoreView, ɵɵpipe, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate1, ɵɵpipeBind2, ɵɵelementContainerStart, ɵɵtemplate, ɵɵelementContainerEnd, ɵɵproperty, ɵɵclassMapInterpolate2, ɵɵtextInterpolate1, ɵɵpipeBind1, EventEmitter, ChangeDetectorRef, ɵɵdefineComponent, ɵɵviewQuery, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵclassMap, ɵɵNgOnChangesFeature, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Output, ɵɵelement, ɵɵattribute, Renderer2, ɵɵstaticViewQuery, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
import { NG_VALUE_ACCESSOR, DefaultValueAccessor, NgControlStatus, NgModel, FormsModule } from '@angular/forms';
import { isNotNil, reqAnimFrame, NzUpdateHostClassService, InputBoolean, NzConfigService, NzConnectedOverlayDirective, slideMotion, WithConfig, NzOverlayModule } from 'ng-zorro-antd/core';
import { DateHelperService, NzI18nPipe, NzI18nModule } from 'ng-zorro-antd/i18n';
import { NzIconDirective, NzIconModule } from 'ng-zorro-antd/icon';
import { NgIf, NgForOf, NgTemplateOutlet, DecimalPipe, NgClass, CommonModule } from '@angular/common';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
var NzTimeValueAccessorDirective = /** @class */ (function () {
    function NzTimeValueAccessorDirective(dateHelper, elementRef) {
        this.dateHelper = dateHelper;
        this.elementRef = elementRef;
    }
    NzTimeValueAccessorDirective.prototype.keyup = function () {
        this.changed();
    };
    NzTimeValueAccessorDirective.prototype.blur = function () {
        this.touched();
    };
    NzTimeValueAccessorDirective.prototype.changed = function () {
        if (this._onChange) {
            var value = this.dateHelper.parseTime(this.elementRef.nativeElement.value);
            this._onChange(value);
        }
    };
    NzTimeValueAccessorDirective.prototype.touched = function () {
        if (this._onTouch) {
            this._onTouch();
        }
    };
    NzTimeValueAccessorDirective.prototype.setRange = function () {
        this.elementRef.nativeElement.focus();
        this.elementRef.nativeElement.setSelectionRange(0, this.elementRef.nativeElement.value.length);
    };
    NzTimeValueAccessorDirective.prototype.writeValue = function (value) {
        this.elementRef.nativeElement.value = this.dateHelper.format(value, this.nzTime);
    };
    NzTimeValueAccessorDirective.prototype.registerOnChange = function (fn) {
        this._onChange = fn;
    };
    NzTimeValueAccessorDirective.prototype.registerOnTouched = function (fn) {
        this._onTouch = fn;
    };
    /** @nocollapse */ NzTimeValueAccessorDirective.ɵfac = function NzTimeValueAccessorDirective_Factory(t) { return new (t || NzTimeValueAccessorDirective)(ɵɵdirectiveInject(DateHelperService), ɵɵdirectiveInject(ElementRef)); };
    /** @nocollapse */ NzTimeValueAccessorDirective.ɵdir = ɵɵdefineDirective({ type: NzTimeValueAccessorDirective, selectors: [["input", "nzTime", ""]], hostBindings: function NzTimeValueAccessorDirective_HostBindings(rf, ctx) { if (rf & 1) {
            ɵɵlistener("keyup", function NzTimeValueAccessorDirective_keyup_HostBindingHandler() { return ctx.keyup(); })("blur", function NzTimeValueAccessorDirective_blur_HostBindingHandler() { return ctx.blur(); });
        } }, inputs: { nzTime: "nzTime" }, exportAs: ["nzTime"], features: [ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: NzTimeValueAccessorDirective, multi: true }])] });
    return NzTimeValueAccessorDirective;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzTimeValueAccessorDirective, [{
        type: Directive,
        args: [{
                selector: 'input[nzTime]',
                exportAs: 'nzTime',
                providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: NzTimeValueAccessorDirective, multi: true }]
            }]
    }], function () { return [{ type: DateHelperService }, { type: ElementRef }]; }, { nzTime: [{
            type: Input
        }], keyup: [{
            type: HostListener,
            args: ['keyup']
        }], blur: [{
            type: HostListener,
            args: ['blur']
        }] }); })();

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
var TimeHolder = /** @class */ (function () {
    function TimeHolder() {
        this._seconds = undefined;
        this._hours = undefined;
        this._minutes = undefined;
        this._selected12Hours = undefined;
        this._use12Hours = false;
        this._defaultOpenValue = new Date();
        this._changes = new Subject();
    }
    TimeHolder.prototype.setDefaultValueIfNil = function () {
        if (!isNotNil(this._value)) {
            this._value = new Date(this.defaultOpenValue);
        }
    };
    TimeHolder.prototype.setMinutes = function (value, disabled) {
        if (disabled) {
            return this;
        }
        this.setDefaultValueIfNil();
        this.minutes = value;
        return this;
    };
    TimeHolder.prototype.setHours = function (value, disabled) {
        if (disabled) {
            return this;
        }
        this.setDefaultValueIfNil();
        this.hours = value;
        return this;
    };
    TimeHolder.prototype.setSeconds = function (value, disabled) {
        if (disabled) {
            return this;
        }
        this.setDefaultValueIfNil();
        this.seconds = value;
        return this;
    };
    TimeHolder.prototype.setUse12Hours = function (value) {
        this._use12Hours = value;
        return this;
    };
    Object.defineProperty(TimeHolder.prototype, "changes", {
        get: function () {
            return this._changes.asObservable();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "value", {
        get: function () {
            return this._value;
        },
        set: function (value) {
            if (value !== this._value) {
                this._value = value;
                if (isNotNil(this._value)) {
                    this._hours = this._value.getHours();
                    this._minutes = this._value.getMinutes();
                    this._seconds = this._value.getSeconds();
                    if (this._use12Hours && isNotNil(this._hours)) {
                        this._selected12Hours = this._hours >= 12 ? 'PM' : 'AM';
                    }
                }
                else {
                    this._clear();
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    TimeHolder.prototype.setValue = function (value, use12Hours) {
        if (isNotNil(use12Hours)) {
            this._use12Hours = use12Hours;
        }
        this.value = value;
        return this;
    };
    TimeHolder.prototype.clear = function () {
        this._clear();
        this.update();
    };
    Object.defineProperty(TimeHolder.prototype, "isEmpty", {
        get: function () {
            return !(isNotNil(this._hours) || isNotNil(this._minutes) || isNotNil(this._seconds));
        },
        enumerable: true,
        configurable: true
    });
    TimeHolder.prototype._clear = function () {
        this._hours = undefined;
        this._minutes = undefined;
        this._seconds = undefined;
        this._selected12Hours = undefined;
    };
    TimeHolder.prototype.update = function () {
        if (this.isEmpty) {
            this._value = undefined;
        }
        else {
            if (!isNotNil(this._hours)) {
                this._hours = this.defaultHours;
            }
            else {
                this._value.setHours(this.hours);
            }
            if (!isNotNil(this._minutes)) {
                this._minutes = this.defaultMinutes;
            }
            else {
                this._value.setMinutes(this.minutes);
            }
            if (!isNotNil(this._seconds)) {
                this._seconds = this.defaultSeconds;
            }
            else {
                this._value.setSeconds(this.seconds);
            }
            if (this._use12Hours) {
                if (!isNotNil(this._selected12Hours)) {
                    this._selected12Hours = this.default12Hours;
                }
                if (this.selected12Hours === 'PM' && this._hours < 12) {
                    this._hours += 12;
                    this._value.setHours(this._hours);
                }
                if (this.selected12Hours === 'AM' && this._hours >= 12) {
                    this._hours -= 12;
                    this._value.setHours(this._hours);
                }
            }
            this._value = new Date(this._value);
        }
        this.changed();
    };
    TimeHolder.prototype.changed = function () {
        this._changes.next(this._value);
    };
    Object.defineProperty(TimeHolder.prototype, "viewHours", {
        /**
         * @description
         * UI view hours
         * Get viewHours which is selected in `time-picker-panel` and its range is [12, 1, 2, ..., 11]
         */
        get: function () {
            return this._use12Hours && isNotNil(this._hours) ? this.calculateViewHour(this._hours) : this._hours;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "realHours", {
        /**
         * @description
         * Value hours
         * Get realHours and its range is [0, 1, 2, ..., 22, 23]
         */
        get: function () {
            return this._hours;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "hours", {
        /**
         * @description
         * Same as realHours
         * @see realHours
         */
        get: function () {
            return this._hours;
        },
        /**
         * @description
         * Set viewHours to realHours
         */
        set: function (value) {
            if (value !== this._hours) {
                if (this._use12Hours) {
                    if (this.selected12Hours === 'PM' && value !== 12) {
                        this._hours = value + 12;
                    }
                    else if (this.selected12Hours === 'AM' && value === 12) {
                        this._hours = 0;
                    }
                    else {
                        this._hours = value;
                    }
                }
                else {
                    this._hours = value;
                }
                this.update();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "minutes", {
        get: function () {
            return this._minutes;
        },
        set: function (value) {
            if (value !== this._minutes) {
                this._minutes = value;
                this.update();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "seconds", {
        get: function () {
            return this._seconds;
        },
        set: function (value) {
            if (value !== this._seconds) {
                this._seconds = value;
                this.update();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "selected12Hours", {
        get: function () {
            return this._selected12Hours;
        },
        set: function (value) {
            if (value.toUpperCase() !== this._selected12Hours) {
                this._selected12Hours = value.toUpperCase();
                this.update();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "defaultOpenValue", {
        get: function () {
            return this._defaultOpenValue;
        },
        set: function (value) {
            if (this._defaultOpenValue !== value) {
                this._defaultOpenValue = value;
                this.update();
            }
        },
        enumerable: true,
        configurable: true
    });
    TimeHolder.prototype.setDefaultOpenValue = function (value) {
        this.defaultOpenValue = value;
        return this;
    };
    Object.defineProperty(TimeHolder.prototype, "defaultViewHours", {
        /**
         * @description
         * Get deafultViewHours when defaultOpenValue is setted
         * @see viewHours
         */
        get: function () {
            var hours = this._defaultOpenValue.getHours();
            return this._use12Hours && isNotNil(hours) ? this.calculateViewHour(hours) : hours;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "defaultRealHours", {
        /**
         * @description
         * Get defaultRealHours when defaultOpenValue is setted
         * @see realHours
         */
        get: function () {
            return this._defaultOpenValue.getHours();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "defaultHours", {
        /**
         * @description
         * Same as defaultRealHours
         */
        get: function () {
            return this._defaultOpenValue.getHours();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "defaultMinutes", {
        get: function () {
            return this._defaultOpenValue.getMinutes();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "defaultSeconds", {
        get: function () {
            return this._defaultOpenValue.getSeconds();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TimeHolder.prototype, "default12Hours", {
        get: function () {
            return this._defaultOpenValue.getHours() >= 12 ? 'PM' : 'AM';
        },
        enumerable: true,
        configurable: true
    });
    TimeHolder.prototype.calculateViewHour = function (value) {
        var selected12Hours = this._selected12Hours || this.default12Hours;
        if (selected12Hours === 'PM' && value > 12) {
            return value - 12;
        }
        if (selected12Hours === 'AM' && value === 0) {
            return 12;
        }
        return value;
    };
    return TimeHolder;
}());

var _c0 = ["hourListElement"];
var _c1 = ["minuteListElement"];
var _c2 = ["secondListElement"];
var _c3 = ["use12HoursListElement"];
function NzTimePickerPanelComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementStart(0, "div", 4);
    ɵɵelementStart(1, "div", 5);
    ɵɵtext(2);
    ɵɵelementEnd();
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r976 = ɵɵnextContext();
    ɵɵadvance(2);
    ɵɵtextInterpolate(ctx_r976.dateHelper.format(ctx_r976.time == null ? null : ctx_r976.time.value, ctx_r976.format) || "\u00A0");
} }
function NzTimePickerPanelComponent_ul_2_ng_container_2_li_1_Template(rf, ctx) { if (rf & 1) {
    var _r988 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "li", 9);
    ɵɵlistener("click", function NzTimePickerPanelComponent_ul_2_ng_container_2_li_1_Template_li_click_0_listener() { ɵɵrestoreView(_r988); var hour_r984 = ɵɵnextContext().$implicit; var ctx_r986 = ɵɵnextContext(2); return ctx_r986.selectHour(hour_r984); });
    ɵɵelementStart(1, "div");
    ɵɵtext(2);
    ɵɵpipe(3, "number");
    ɵɵelementEnd();
    ɵɵelementEnd();
} if (rf & 2) {
    var hour_r984 = ɵɵnextContext().$implicit;
    var ctx_r985 = ɵɵnextContext(2);
    ɵɵclassMapInterpolate3("\n                ", ctx_r985.prefixCls, "-cell\n                ", ctx_r985.isSelectedHour(hour_r984) ? ctx_r985.prefixCls + "-cell-selected" : "", "\n                ", hour_r984.disabled ? ctx_r985.prefixCls + "-cell-disabled" : "", "\n              ");
    ɵɵadvance(1);
    ɵɵclassMapInterpolate1("", ctx_r985.prefixCls, "-cell-inner");
    ɵɵadvance(1);
    ɵɵtextInterpolate(ɵɵpipeBind2(3, 9, hour_r984.index, "2.0-0"));
} }
function NzTimePickerPanelComponent_ul_2_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementContainerStart(0);
    ɵɵtemplate(1, NzTimePickerPanelComponent_ul_2_ng_container_2_li_1_Template, 4, 12, "li", 8);
    ɵɵelementContainerEnd();
} if (rf & 2) {
    var hour_r984 = ctx.$implicit;
    var ctx_r983 = ɵɵnextContext(2);
    ɵɵadvance(1);
    ɵɵproperty("ngIf", !(ctx_r983.nzHideDisabledOptions && hour_r984.disabled));
} }
function NzTimePickerPanelComponent_ul_2_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementStart(0, "ul", null, 6);
    ɵɵtemplate(2, NzTimePickerPanelComponent_ul_2_ng_container_2_Template, 2, 1, "ng-container", 7);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r977 = ɵɵnextContext();
    ɵɵclassMapInterpolate1("", ctx_r977.prefixCls, "-column");
    ɵɵadvance(2);
    ɵɵproperty("ngForOf", ctx_r977.hourRange);
} }
function NzTimePickerPanelComponent_ul_3_ng_container_2_li_1_Template(rf, ctx) { if (rf & 1) {
    var _r996 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "li", 9);
    ɵɵlistener("click", function NzTimePickerPanelComponent_ul_3_ng_container_2_li_1_Template_li_click_0_listener() { ɵɵrestoreView(_r996); var minute_r992 = ɵɵnextContext().$implicit; var ctx_r994 = ɵɵnextContext(2); return ctx_r994.selectMinute(minute_r992); });
    ɵɵelementStart(1, "div");
    ɵɵtext(2);
    ɵɵpipe(3, "number");
    ɵɵelementEnd();
    ɵɵelementEnd();
} if (rf & 2) {
    var minute_r992 = ɵɵnextContext().$implicit;
    var ctx_r993 = ɵɵnextContext(2);
    ɵɵclassMapInterpolate3("\n                ", ctx_r993.prefixCls, "-cell\n                ", ctx_r993.isSelectedMinute(minute_r992) ? ctx_r993.prefixCls + "-cell-selected" : "", "\n                ", minute_r992.disabled ? ctx_r993.prefixCls + "-cell-disabled" : "", "\n              ");
    ɵɵadvance(1);
    ɵɵclassMapInterpolate1("", ctx_r993.prefixCls, "-cell-inner");
    ɵɵadvance(1);
    ɵɵtextInterpolate(ɵɵpipeBind2(3, 9, minute_r992.index, "2.0-0"));
} }
function NzTimePickerPanelComponent_ul_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementContainerStart(0);
    ɵɵtemplate(1, NzTimePickerPanelComponent_ul_3_ng_container_2_li_1_Template, 4, 12, "li", 8);
    ɵɵelementContainerEnd();
} if (rf & 2) {
    var minute_r992 = ctx.$implicit;
    var ctx_r991 = ɵɵnextContext(2);
    ɵɵadvance(1);
    ɵɵproperty("ngIf", !(ctx_r991.nzHideDisabledOptions && minute_r992.disabled));
} }
function NzTimePickerPanelComponent_ul_3_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementStart(0, "ul", null, 10);
    ɵɵtemplate(2, NzTimePickerPanelComponent_ul_3_ng_container_2_Template, 2, 1, "ng-container", 7);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r978 = ɵɵnextContext();
    ɵɵclassMapInterpolate1("", ctx_r978.prefixCls, "-column");
    ɵɵadvance(2);
    ɵɵproperty("ngForOf", ctx_r978.minuteRange);
} }
function NzTimePickerPanelComponent_ul_4_ng_container_2_li_1_Template(rf, ctx) { if (rf & 1) {
    var _r1004 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "li", 9);
    ɵɵlistener("click", function NzTimePickerPanelComponent_ul_4_ng_container_2_li_1_Template_li_click_0_listener() { ɵɵrestoreView(_r1004); var second_r1000 = ɵɵnextContext().$implicit; var ctx_r1002 = ɵɵnextContext(2); return ctx_r1002.selectSecond(second_r1000); });
    ɵɵelementStart(1, "div");
    ɵɵtext(2);
    ɵɵpipe(3, "number");
    ɵɵelementEnd();
    ɵɵelementEnd();
} if (rf & 2) {
    var second_r1000 = ɵɵnextContext().$implicit;
    var ctx_r1001 = ɵɵnextContext(2);
    ɵɵclassMapInterpolate3("\n                ", ctx_r1001.prefixCls, "-cell\n                ", ctx_r1001.isSelectedSecond(second_r1000) ? ctx_r1001.prefixCls + "-cell-selected" : "", "\n                ", second_r1000.disabled ? ctx_r1001.prefixCls + "-cell-disabled" : "", "\n              ");
    ɵɵadvance(1);
    ɵɵclassMapInterpolate1("", ctx_r1001.prefixCls, "-cell-inner");
    ɵɵadvance(1);
    ɵɵtextInterpolate(ɵɵpipeBind2(3, 9, second_r1000.index, "2.0-0"));
} }
function NzTimePickerPanelComponent_ul_4_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementContainerStart(0);
    ɵɵtemplate(1, NzTimePickerPanelComponent_ul_4_ng_container_2_li_1_Template, 4, 12, "li", 8);
    ɵɵelementContainerEnd();
} if (rf & 2) {
    var second_r1000 = ctx.$implicit;
    var ctx_r999 = ɵɵnextContext(2);
    ɵɵadvance(1);
    ɵɵproperty("ngIf", !(ctx_r999.nzHideDisabledOptions && second_r1000.disabled));
} }
function NzTimePickerPanelComponent_ul_4_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementStart(0, "ul", null, 11);
    ɵɵtemplate(2, NzTimePickerPanelComponent_ul_4_ng_container_2_Template, 2, 1, "ng-container", 7);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r979 = ɵɵnextContext();
    ɵɵclassMapInterpolate1("", ctx_r979.prefixCls, "-column");
    ɵɵadvance(2);
    ɵɵproperty("ngForOf", ctx_r979.secondRange);
} }
function NzTimePickerPanelComponent_ul_5_ng_container_2_li_1_Template(rf, ctx) { if (rf & 1) {
    var _r1012 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "li", 9);
    ɵɵlistener("click", function NzTimePickerPanelComponent_ul_5_ng_container_2_li_1_Template_li_click_0_listener() { ɵɵrestoreView(_r1012); var range_r1008 = ɵɵnextContext().$implicit; var ctx_r1010 = ɵɵnextContext(2); return ctx_r1010.select12Hours(range_r1008); });
    ɵɵelementStart(1, "div");
    ɵɵtext(2);
    ɵɵelementEnd();
    ɵɵelementEnd();
} if (rf & 2) {
    var range_r1008 = ɵɵnextContext().$implicit;
    var ctx_r1009 = ɵɵnextContext(2);
    ɵɵclassMapInterpolate2("\n                ", ctx_r1009.prefixCls, "-cell\n                ", ctx_r1009.isSelected12Hours(range_r1008) ? ctx_r1009.prefixCls + "-cell-selected" : "", "\n              ");
    ɵɵadvance(1);
    ɵɵclassMapInterpolate1("", ctx_r1009.prefixCls, "-cell-inner");
    ɵɵadvance(1);
    ɵɵtextInterpolate(range_r1008.value);
} }
function NzTimePickerPanelComponent_ul_5_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementContainerStart(0);
    ɵɵtemplate(1, NzTimePickerPanelComponent_ul_5_ng_container_2_li_1_Template, 3, 8, "li", 8);
    ɵɵelementContainerEnd();
} if (rf & 2) {
    var ctx_r1007 = ɵɵnextContext(2);
    ɵɵadvance(1);
    ɵɵproperty("ngIf", !ctx_r1007.nzHideDisabledOptions);
} }
function NzTimePickerPanelComponent_ul_5_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementStart(0, "ul", null, 12);
    ɵɵtemplate(2, NzTimePickerPanelComponent_ul_5_ng_container_2_Template, 2, 1, "ng-container", 7);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r980 = ɵɵnextContext();
    ɵɵclassMapInterpolate1("", ctx_r980.prefixCls, "-column");
    ɵɵadvance(2);
    ɵɵproperty("ngForOf", ctx_r980.use12HoursRange);
} }
function NzTimePickerPanelComponent_div_6_div_1_ng_template_1_Template(rf, ctx) { }
function NzTimePickerPanelComponent_div_6_div_1_Template(rf, ctx) { if (rf & 1) {
    ɵɵelementStart(0, "div", 17);
    ɵɵtemplate(1, NzTimePickerPanelComponent_div_6_div_1_ng_template_1_Template, 0, 0, "ng-template", 18);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r1014 = ɵɵnextContext(2);
    ɵɵadvance(1);
    ɵɵproperty("ngTemplateOutlet", ctx_r1014.nzAddOn);
} }
function NzTimePickerPanelComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    var _r1017 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "div", 13);
    ɵɵtemplate(1, NzTimePickerPanelComponent_div_6_div_1_Template, 2, 1, "div", 14);
    ɵɵelementStart(2, "ul", 15);
    ɵɵelementStart(3, "li", 16);
    ɵɵelementStart(4, "a", 9);
    ɵɵlistener("click", function NzTimePickerPanelComponent_div_6_Template_a_click_4_listener() { ɵɵrestoreView(_r1017); var ctx_r1016 = ɵɵnextContext(); return ctx_r1016.onClickNow(); });
    ɵɵtext(5);
    ɵɵpipe(6, "nzI18n");
    ɵɵelementEnd();
    ɵɵelementEnd();
    ɵɵelementEnd();
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r981 = ɵɵnextContext();
    ɵɵadvance(1);
    ɵɵproperty("ngIf", ctx_r981.nzAddOn);
    ɵɵadvance(4);
    ɵɵtextInterpolate1(" ", ɵɵpipeBind1(6, 2, "Calendar.now"), " ");
} }
function makeRange(length, step, start) {
    if (step === void 0) { step = 1; }
    if (start === void 0) { start = 0; }
    return new Array(Math.ceil(length / step)).fill(0).map(function (_, i) { return (i + start) * step; });
}
var NzTimePickerPanelComponent = /** @class */ (function () {
    function NzTimePickerPanelComponent(cdr, dateHelper) {
        this.cdr = cdr;
        this.dateHelper = dateHelper;
        this._nzHourStep = 1;
        this._nzMinuteStep = 1;
        this._nzSecondStep = 1;
        this.unsubscribe$ = new Subject();
        this._format = 'HH:mm:ss';
        this._allowEmpty = true;
        this.prefixCls = 'ant-picker-time-panel';
        this.time = new TimeHolder();
        this.hourEnabled = true;
        this.minuteEnabled = true;
        this.secondEnabled = true;
        this.enabledColumns = 3;
        this.hostClassMap = {};
        this.nzInDatePicker = false; // If inside a date-picker, more diff works need to be done
        this.nzHideDisabledOptions = false;
        this.nzUse12Hours = false;
        this.nzDefaultOpenValue = new Date();
        this.opened = false;
        this.closePanel = new EventEmitter();
    }
    Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzAllowEmpty", {
        get: function () {
            return this._allowEmpty;
        },
        set: function (value) {
            if (isNotNil(value)) {
                this._allowEmpty = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzDisabledHours", {
        get: function () {
            return this._disabledHours;
        },
        set: function (value) {
            this._disabledHours = value;
            if (!!this._disabledHours) {
                this.buildHours();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzDisabledMinutes", {
        get: function () {
            return this._disabledMinutes;
        },
        set: function (value) {
            if (isNotNil(value)) {
                this._disabledMinutes = value;
                this.buildMinutes();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzDisabledSeconds", {
        get: function () {
            return this._disabledSeconds;
        },
        set: function (value) {
            if (isNotNil(value)) {
                this._disabledSeconds = value;
                this.buildSeconds();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzTimePickerPanelComponent.prototype, "format", {
        get: function () {
            return this._format;
        },
        set: function (value) {
            if (isNotNil(value)) {
                this._format = value;
                this.enabledColumns = 0;
                var charSet = new Set(value);
                this.hourEnabled = charSet.has('H') || charSet.has('h');
                this.minuteEnabled = charSet.has('m');
                this.secondEnabled = charSet.has('s');
                if (this.hourEnabled) {
                    this.enabledColumns++;
                }
                if (this.minuteEnabled) {
                    this.enabledColumns++;
                }
                if (this.secondEnabled) {
                    this.enabledColumns++;
                }
                if (this.nzUse12Hours) {
                    this.build12Hours();
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzHourStep", {
        get: function () {
            return this._nzHourStep;
        },
        set: function (value) {
            if (isNotNil(value)) {
                this._nzHourStep = value;
                this.buildHours();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzMinuteStep", {
        get: function () {
            return this._nzMinuteStep;
        },
        set: function (value) {
            if (isNotNil(value)) {
                this._nzMinuteStep = value;
                this.buildMinutes();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzSecondStep", {
        get: function () {
            return this._nzSecondStep;
        },
        set: function (value) {
            if (isNotNil(value)) {
                this._nzSecondStep = value;
                this.buildSeconds();
            }
        },
        enumerable: true,
        configurable: true
    });
    NzTimePickerPanelComponent.prototype.selectInputRange = function () {
        var _this = this;
        setTimeout(function () {
            if (_this.nzTimeValueAccessorDirective) {
                _this.nzTimeValueAccessorDirective.setRange();
            }
        });
    };
    NzTimePickerPanelComponent.prototype.buildHours = function () {
        var _this = this;
        var hourRanges = 24;
        var disabledHours = this.nzDisabledHours && this.nzDisabledHours();
        var startIndex = 0;
        if (this.nzUse12Hours) {
            hourRanges = 12;
            if (disabledHours) {
                if (this.time.selected12Hours === 'PM') {
                    /**
                     * Filter and transform hours which greater or equal to 12
                     * [0, 1, 2, ..., 12, 13, 14, 15, ..., 23] => [12, 1, 2, 3, ..., 11]
                     */
                    disabledHours = disabledHours.filter(function (i) { return i >= 12; }).map(function (i) { return (i > 12 ? i - 12 : i); });
                }
                else {
                    /**
                     * Filter and transform hours which less than 12
                     * [0, 1, 2,..., 12, 13, 14, 15, ...23] => [12, 1, 2, 3, ..., 11]
                     */
                    disabledHours = disabledHours.filter(function (i) { return i < 12 || i === 24; }).map(function (i) { return (i === 24 || i === 0 ? 12 : i); });
                }
            }
            startIndex = 1;
        }
        this.hourRange = makeRange(hourRanges, this.nzHourStep, startIndex).map(function (r) {
            return {
                index: r,
                disabled: _this.nzDisabledHours && disabledHours.indexOf(r) !== -1
            };
        });
        if (this.nzUse12Hours && this.hourRange[this.hourRange.length - 1].index === 12) {
            var temp = __spread(this.hourRange);
            temp.unshift(temp[temp.length - 1]);
            temp.splice(temp.length - 1, 1);
            this.hourRange = temp;
        }
    };
    NzTimePickerPanelComponent.prototype.buildMinutes = function () {
        var _this = this;
        this.minuteRange = makeRange(60, this.nzMinuteStep).map(function (r) {
            return {
                index: r,
                disabled: _this.nzDisabledMinutes && _this.nzDisabledMinutes(_this.time.hours).indexOf(r) !== -1
            };
        });
    };
    NzTimePickerPanelComponent.prototype.buildSeconds = function () {
        var _this = this;
        this.secondRange = makeRange(60, this.nzSecondStep).map(function (r) {
            return {
                index: r,
                disabled: _this.nzDisabledSeconds && _this.nzDisabledSeconds(_this.time.hours, _this.time.minutes).indexOf(r) !== -1
            };
        });
    };
    NzTimePickerPanelComponent.prototype.build12Hours = function () {
        var isUpperForamt = this._format.includes('A');
        this.use12HoursRange = [
            {
                index: 0,
                value: isUpperForamt ? 'AM' : 'am'
            },
            {
                index: 1,
                value: isUpperForamt ? 'PM' : 'pm'
            }
        ];
    };
    NzTimePickerPanelComponent.prototype.buildTimes = function () {
        this.buildHours();
        this.buildMinutes();
        this.buildSeconds();
        this.build12Hours();
    };
    NzTimePickerPanelComponent.prototype.selectHour = function (hour) {
        this.time.setHours(hour.index, hour.disabled);
        this.scrollToSelected(this.hourListElement.nativeElement, hour.index, 120, 'hour');
        if (!!this._disabledMinutes) {
            this.buildMinutes();
        }
        if (this._disabledSeconds || this._disabledMinutes) {
            this.buildSeconds();
        }
    };
    NzTimePickerPanelComponent.prototype.selectMinute = function (minute) {
        this.time.setMinutes(minute.index, minute.disabled);
        this.scrollToSelected(this.minuteListElement.nativeElement, minute.index, 120, 'minute');
        if (!!this._disabledSeconds) {
            this.buildSeconds();
        }
    };
    NzTimePickerPanelComponent.prototype.selectSecond = function (second) {
        this.time.setSeconds(second.index, second.disabled);
        this.scrollToSelected(this.secondListElement.nativeElement, second.index, 120, 'second');
    };
    NzTimePickerPanelComponent.prototype.select12Hours = function (value) {
        this.time.selected12Hours = value.value;
        if (!!this._disabledHours) {
            this.buildHours();
        }
        if (!!this._disabledMinutes) {
            this.buildMinutes();
        }
        if (!!this._disabledSeconds) {
            this.buildSeconds();
        }
        this.scrollToSelected(this.use12HoursListElement.nativeElement, value.index, 120, '12-hour');
    };
    NzTimePickerPanelComponent.prototype.scrollToSelected = function (instance, index, duration, unit) {
        if (duration === void 0) { duration = 0; }
        var transIndex = this.translateIndex(index, unit);
        var currentOption = (instance.children[transIndex] || instance.children[0]);
        this.scrollTo(instance, currentOption.offsetTop, duration);
    };
    NzTimePickerPanelComponent.prototype.translateIndex = function (index, unit) {
        if (unit === 'hour') {
            var disabledHours = this.nzDisabledHours && this.nzDisabledHours();
            return this.calcIndex(disabledHours, this.hourRange.map(function (item) { return item.index; }).indexOf(index));
        }
        else if (unit === 'minute') {
            var disabledMinutes = this.nzDisabledMinutes && this.nzDisabledMinutes(this.time.hours);
            return this.calcIndex(disabledMinutes, this.minuteRange.map(function (item) { return item.index; }).indexOf(index));
        }
        else if (unit === 'second') {
            // second
            var disabledSeconds = this.nzDisabledSeconds && this.nzDisabledSeconds(this.time.hours, this.time.minutes);
            return this.calcIndex(disabledSeconds, this.secondRange.map(function (item) { return item.index; }).indexOf(index));
        }
        else {
            // 12-hour
            return this.calcIndex([], this.use12HoursRange.map(function (item) { return item.index; }).indexOf(index));
        }
    };
    NzTimePickerPanelComponent.prototype.scrollTo = function (element, to, duration) {
        var _this = this;
        if (duration <= 0) {
            element.scrollTop = to;
            return;
        }
        var difference = to - element.scrollTop;
        var perTick = (difference / duration) * 10;
        reqAnimFrame(function () {
            element.scrollTop = element.scrollTop + perTick;
            if (element.scrollTop === to) {
                return;
            }
            _this.scrollTo(element, to, duration - 10);
        });
    };
    NzTimePickerPanelComponent.prototype.calcIndex = function (array, index) {
        if (array && array.length && this.nzHideDisabledOptions) {
            return (index -
                array.reduce(function (pre, value) {
                    return pre + (value < index ? 1 : 0);
                }, 0));
        }
        else {
            return index;
        }
    };
    NzTimePickerPanelComponent.prototype.changed = function () {
        if (this.onChange) {
            this.onChange(this.time.value);
        }
    };
    NzTimePickerPanelComponent.prototype.touched = function () {
        if (this.onTouch) {
            this.onTouch();
        }
    };
    NzTimePickerPanelComponent.prototype.setClassMap = function () {
        var _a;
        this.hostClassMap = (_a = {},
            _a["" + this.prefixCls] = true,
            _a[this.prefixCls + "-column-" + this.enabledColumns] = !this.nzInDatePicker,
            _a[this.prefixCls + "-narrow"] = this.enabledColumns < 3,
            _a[this.prefixCls + "-placement-bottomLeft"] = !this.nzInDatePicker,
            _a);
    };
    NzTimePickerPanelComponent.prototype.timeDisabled = function (value) {
        var hour = value.getHours();
        var minute = value.getMinutes();
        var second = value.getSeconds();
        return ((this.nzDisabledHours && this.nzDisabledHours().indexOf(hour)) > -1 ||
            (this.nzDisabledMinutes && this.nzDisabledMinutes(hour).indexOf(minute)) > -1 ||
            (this.nzDisabledSeconds && this.nzDisabledSeconds(hour, minute).indexOf(second)) > -1);
    };
    NzTimePickerPanelComponent.prototype.onClickNow = function () {
        var now = new Date();
        if (this.timeDisabled(now)) {
            return;
        }
        this.time.value = now;
        this.changed();
        this.closePanel.emit();
    };
    NzTimePickerPanelComponent.prototype.isSelectedHour = function (hour) {
        return hour.index === this.time.viewHours || (!isNotNil(this.time.viewHours) && hour.index === this.time.defaultViewHours);
    };
    NzTimePickerPanelComponent.prototype.isSelectedMinute = function (minute) {
        return minute.index === this.time.minutes || (!isNotNil(this.time.minutes) && minute.index === this.time.defaultMinutes);
    };
    NzTimePickerPanelComponent.prototype.isSelectedSecond = function (second) {
        return second.index === this.time.seconds || (!isNotNil(this.time.seconds) && second.index === this.time.defaultSeconds);
    };
    NzTimePickerPanelComponent.prototype.isSelected12Hours = function (value) {
        return (value.value.toUpperCase() === this.time.selected12Hours ||
            (!isNotNil(this.time.selected12Hours) && value.value.toUpperCase() === this.time.default12Hours));
    };
    NzTimePickerPanelComponent.prototype.initPosition = function () {
        var _this = this;
        setTimeout(function () {
            if (_this.hourEnabled && _this.hourListElement) {
                if (isNotNil(_this.time.viewHours)) {
                    _this.scrollToSelected(_this.hourListElement.nativeElement, _this.time.viewHours, 0, 'hour');
                }
                else {
                    _this.scrollToSelected(_this.hourListElement.nativeElement, _this.time.defaultViewHours, 0, 'hour');
                }
            }
            if (_this.minuteEnabled && _this.minuteListElement) {
                if (isNotNil(_this.time.minutes)) {
                    _this.scrollToSelected(_this.minuteListElement.nativeElement, _this.time.minutes, 0, 'minute');
                }
                else {
                    _this.scrollToSelected(_this.minuteListElement.nativeElement, _this.time.defaultMinutes, 0, 'minute');
                }
            }
            if (_this.secondEnabled && _this.secondListElement) {
                if (isNotNil(_this.time.seconds)) {
                    _this.scrollToSelected(_this.secondListElement.nativeElement, _this.time.seconds, 0, 'second');
                }
                else {
                    _this.scrollToSelected(_this.secondListElement.nativeElement, _this.time.defaultSeconds, 0, 'second');
                }
            }
            if (_this.nzUse12Hours && _this.use12HoursListElement) {
                var selectedHours = isNotNil(_this.time.selected12Hours) ? _this.time.selected12Hours : _this.time.default12Hours;
                var index = selectedHours === 'AM' ? 0 : 1;
                _this.scrollToSelected(_this.use12HoursListElement.nativeElement, index, 0, '12-hour');
            }
        });
    };
    NzTimePickerPanelComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.time.changes.pipe(takeUntil(this.unsubscribe$)).subscribe(function () {
            _this.changed();
            _this.touched();
        });
        this.buildTimes();
        this.setClassMap();
    };
    NzTimePickerPanelComponent.prototype.ngOnDestroy = function () {
        this.unsubscribe$.next();
        this.unsubscribe$.complete();
    };
    NzTimePickerPanelComponent.prototype.ngOnChanges = function (changes) {
        var nzUse12Hours = changes.nzUse12Hours, opened = changes.opened, nzDefaultOpenValue = changes.nzDefaultOpenValue;
        if (nzUse12Hours && !nzUse12Hours.previousValue && nzUse12Hours.currentValue) {
            this.build12Hours();
            this.enabledColumns++;
        }
        if (opened && opened.currentValue) {
            this.initPosition();
            this.selectInputRange();
        }
        if (nzDefaultOpenValue) {
            var value = nzDefaultOpenValue.currentValue;
            if (isNotNil(value)) {
                this.time.setDefaultOpenValue(this.nzDefaultOpenValue);
            }
        }
    };
    NzTimePickerPanelComponent.prototype.writeValue = function (value) {
        this.time.setValue(value, this.nzUse12Hours);
        this.buildTimes();
        // Mark this component to be checked manually with internal properties changing (see: https://github.com/angular/angular/issues/10816)
        this.cdr.markForCheck();
    };
    NzTimePickerPanelComponent.prototype.registerOnChange = function (fn) {
        this.onChange = fn;
    };
    NzTimePickerPanelComponent.prototype.registerOnTouched = function (fn) {
        this.onTouch = fn;
    };
    /** @nocollapse */ NzTimePickerPanelComponent.ɵfac = function NzTimePickerPanelComponent_Factory(t) { return new (t || NzTimePickerPanelComponent)(ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(DateHelperService)); };
    /** @nocollapse */ NzTimePickerPanelComponent.ɵcmp = ɵɵdefineComponent({ type: NzTimePickerPanelComponent, selectors: [["nz-time-picker-panel"]], viewQuery: function NzTimePickerPanelComponent_Query(rf, ctx) { if (rf & 1) {
            ɵɵviewQuery(NzTimeValueAccessorDirective, true);
            ɵɵviewQuery(_c0, true);
            ɵɵviewQuery(_c1, true);
            ɵɵviewQuery(_c2, true);
            ɵɵviewQuery(_c3, true);
        } if (rf & 2) {
            var _t;
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.nzTimeValueAccessorDirective = _t.first);
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.hourListElement = _t.first);
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.minuteListElement = _t.first);
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.secondListElement = _t.first);
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.use12HoursListElement = _t.first);
        } }, hostVars: 2, hostBindings: function NzTimePickerPanelComponent_HostBindings(rf, ctx) { if (rf & 2) {
            ɵɵclassMap(ctx.hostClassMap);
        } }, inputs: { nzInDatePicker: "nzInDatePicker", nzAddOn: "nzAddOn", nzHideDisabledOptions: "nzHideDisabledOptions", nzClearText: "nzClearText", nzPlaceHolder: "nzPlaceHolder", nzUse12Hours: "nzUse12Hours", nzDefaultOpenValue: "nzDefaultOpenValue", opened: "opened", nzAllowEmpty: "nzAllowEmpty", nzDisabledHours: "nzDisabledHours", nzDisabledMinutes: "nzDisabledMinutes", nzDisabledSeconds: "nzDisabledSeconds", format: "format", nzHourStep: "nzHourStep", nzMinuteStep: "nzMinuteStep", nzSecondStep: "nzSecondStep" }, outputs: { closePanel: "closePanel" }, exportAs: ["nzTimePickerPanel"], features: [ɵɵProvidersFeature([NzUpdateHostClassService, { provide: NG_VALUE_ACCESSOR, useExisting: NzTimePickerPanelComponent, multi: true }]), ɵɵNgOnChangesFeature], decls: 7, vars: 6, consts: [["class", "ant-picker-header", 4, "ngIf"], [1, "ant-picker-content"], [3, "class", 4, "ngIf"], ["class", "ant-picker-footer", 4, "ngIf"], [1, "ant-picker-header"], [1, "ant-picker-header-view"], ["hourListElement", ""], [4, "ngFor", "ngForOf"], [3, "class", "click", 4, "ngIf"], [3, "click"], ["minuteListElement", ""], ["secondListElement", ""], ["use12HoursListElement", ""], [1, "ant-picker-footer"], ["class", "ant-picker-footer-extra", 4, "ngIf"], [1, "ant-picker-ranges"], [1, "ant-picker-now"], [1, "ant-picker-footer-extra"], [3, "ngTemplateOutlet"]], template: function NzTimePickerPanelComponent_Template(rf, ctx) { if (rf & 1) {
            ɵɵtemplate(0, NzTimePickerPanelComponent_div_0_Template, 3, 1, "div", 0);
            ɵɵelementStart(1, "div", 1);
            ɵɵtemplate(2, NzTimePickerPanelComponent_ul_2_Template, 3, 4, "ul", 2);
            ɵɵtemplate(3, NzTimePickerPanelComponent_ul_3_Template, 3, 4, "ul", 2);
            ɵɵtemplate(4, NzTimePickerPanelComponent_ul_4_Template, 3, 4, "ul", 2);
            ɵɵtemplate(5, NzTimePickerPanelComponent_ul_5_Template, 3, 4, "ul", 2);
            ɵɵelementEnd();
            ɵɵtemplate(6, NzTimePickerPanelComponent_div_6_Template, 7, 4, "div", 3);
        } if (rf & 2) {
            ɵɵproperty("ngIf", ctx.nzInDatePicker);
            ɵɵadvance(2);
            ɵɵproperty("ngIf", ctx.hourEnabled);
            ɵɵadvance(1);
            ɵɵproperty("ngIf", ctx.minuteEnabled);
            ɵɵadvance(1);
            ɵɵproperty("ngIf", ctx.secondEnabled);
            ɵɵadvance(1);
            ɵɵproperty("ngIf", ctx.nzUse12Hours);
            ɵɵadvance(1);
            ɵɵproperty("ngIf", !ctx.nzInDatePicker);
        } }, directives: [NgIf, NgForOf, NgTemplateOutlet], pipes: [DecimalPipe, NzI18nPipe], encapsulation: 2, changeDetection: 0 });
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzTimePickerPanelComponent.prototype, "nzUse12Hours", void 0);
    return NzTimePickerPanelComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzTimePickerPanelComponent, [{
        type: Component,
        args: [{
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                selector: 'nz-time-picker-panel',
                exportAs: 'nzTimePickerPanel',
                template: "\n    <div *ngIf=\"nzInDatePicker\" class=\"ant-picker-header\">\n      <div class=\"ant-picker-header-view\">{{ dateHelper.format(time?.value, format) || '&nbsp;' }}</div>\n    </div>\n    <div class=\"ant-picker-content\">\n      <ul *ngIf=\"hourEnabled\" #hourListElement class=\"{{ prefixCls }}-column\">\n        <ng-container *ngFor=\"let hour of hourRange\">\n          <li\n            *ngIf=\"!(nzHideDisabledOptions && hour.disabled)\"\n            (click)=\"selectHour(hour)\"\n            class=\"\n                {{ prefixCls }}-cell\n                {{ isSelectedHour(hour) ? prefixCls + '-cell-selected' : '' }}\n                {{ hour.disabled ? prefixCls + '-cell-disabled' : '' }}\n              \"\n          >\n            <div class=\"{{ prefixCls }}-cell-inner\">{{ hour.index | number: '2.0-0' }}</div>\n          </li>\n        </ng-container>\n      </ul>\n      <ul *ngIf=\"minuteEnabled\" #minuteListElement class=\"{{ prefixCls }}-column\">\n        <ng-container *ngFor=\"let minute of minuteRange\">\n          <li\n            *ngIf=\"!(nzHideDisabledOptions && minute.disabled)\"\n            (click)=\"selectMinute(minute)\"\n            class=\"\n                {{ prefixCls }}-cell\n                {{ isSelectedMinute(minute) ? prefixCls + '-cell-selected' : '' }}\n                {{ minute.disabled ? prefixCls + '-cell-disabled' : '' }}\n              \"\n          >\n            <div class=\"{{ prefixCls }}-cell-inner\">{{ minute.index | number: '2.0-0' }}</div>\n          </li>\n        </ng-container>\n      </ul>\n      <ul *ngIf=\"secondEnabled\" #secondListElement class=\"{{ prefixCls }}-column\">\n        <ng-container *ngFor=\"let second of secondRange\">\n          <li\n            *ngIf=\"!(nzHideDisabledOptions && second.disabled)\"\n            (click)=\"selectSecond(second)\"\n            class=\"\n                {{ prefixCls }}-cell\n                {{ isSelectedSecond(second) ? prefixCls + '-cell-selected' : '' }}\n                {{ second.disabled ? prefixCls + '-cell-disabled' : '' }}\n              \"\n          >\n            <div class=\"{{ prefixCls }}-cell-inner\">{{ second.index | number: '2.0-0' }}</div>\n          </li>\n        </ng-container>\n      </ul>\n      <ul *ngIf=\"nzUse12Hours\" #use12HoursListElement class=\"{{ prefixCls }}-column\">\n        <ng-container *ngFor=\"let range of use12HoursRange\">\n          <li\n            *ngIf=\"!nzHideDisabledOptions\"\n            (click)=\"select12Hours(range)\"\n            class=\"\n                {{ prefixCls }}-cell\n                {{ isSelected12Hours(range) ? prefixCls + '-cell-selected' : '' }}\n              \"\n          >\n            <div class=\"{{ prefixCls }}-cell-inner\">{{ range.value }}</div>\n          </li>\n        </ng-container>\n      </ul>\n    </div>\n    <div *ngIf=\"!nzInDatePicker\" class=\"ant-picker-footer\">\n      <div *ngIf=\"nzAddOn\" class=\"ant-picker-footer-extra\">\n        <ng-template [ngTemplateOutlet]=\"nzAddOn\"></ng-template>\n      </div>\n      <ul class=\"ant-picker-ranges\">\n        <li class=\"ant-picker-now\">\n          <a (click)=\"onClickNow()\">\n            {{ 'Calendar.now' | nzI18n }}\n          </a>\n        </li>\n      </ul>\n    </div>\n  ",
                host: { '[class]': 'hostClassMap' },
                providers: [NzUpdateHostClassService, { provide: NG_VALUE_ACCESSOR, useExisting: NzTimePickerPanelComponent, multi: true }]
            }]
    }], function () { return [{ type: ChangeDetectorRef }, { type: DateHelperService }]; }, { nzTimeValueAccessorDirective: [{
            type: ViewChild,
            args: [NzTimeValueAccessorDirective, { static: false }]
        }], hourListElement: [{
            type: ViewChild,
            args: ['hourListElement', { static: false }]
        }], minuteListElement: [{
            type: ViewChild,
            args: ['minuteListElement', { static: false }]
        }], secondListElement: [{
            type: ViewChild,
            args: ['secondListElement', { static: false }]
        }], use12HoursListElement: [{
            type: ViewChild,
            args: ['use12HoursListElement', { static: false }]
        }], nzInDatePicker: [{
            type: Input
        }], nzAddOn: [{
            type: Input
        }], nzHideDisabledOptions: [{
            type: Input
        }], nzClearText: [{
            type: Input
        }], nzPlaceHolder: [{
            type: Input
        }], nzUse12Hours: [{
            type: Input
        }], nzDefaultOpenValue: [{
            type: Input
        }], opened: [{
            type: Input
        }], closePanel: [{
            type: Output
        }], nzAllowEmpty: [{
            type: Input
        }], nzDisabledHours: [{
            type: Input
        }], nzDisabledMinutes: [{
            type: Input
        }], nzDisabledSeconds: [{
            type: Input
        }], format: [{
            type: Input
        }], nzHourStep: [{
            type: Input
        }], nzMinuteStep: [{
            type: Input
        }], nzSecondStep: [{
            type: Input
        }] }); })();

var _c0$1 = ["inputElement"];
function NzTimePickerComponent_span_6_Template(rf, ctx) { if (rf & 1) {
    var _r972 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "span", 7);
    ɵɵlistener("click", function NzTimePickerComponent_span_6_Template_span_click_0_listener() { ɵɵrestoreView(_r972); var ctx_r971 = ɵɵnextContext(); return ctx_r971.onClickClearBtn(); });
    ɵɵelement(1, "i", 8);
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r969 = ɵɵnextContext();
    ɵɵadvance(1);
    ɵɵattribute("aria-label", ctx_r969.nzClearText)("title", ctx_r969.nzClearText);
} }
function NzTimePickerComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    var _r974 = ɵɵgetCurrentView();
    ɵɵelementStart(0, "div", 9);
    ɵɵelementStart(1, "div", 10);
    ɵɵelementStart(2, "div", 11);
    ɵɵelementStart(3, "nz-time-picker-panel", 12);
    ɵɵlistener("ngModelChange", function NzTimePickerComponent_ng_template_7_Template_nz_time_picker_panel_ngModelChange_3_listener($event) { ɵɵrestoreView(_r974); var ctx_r973 = ɵɵnextContext(); return ctx_r973.value = $event; })("closePanel", function NzTimePickerComponent_ng_template_7_Template_nz_time_picker_panel_closePanel_3_listener() { ɵɵrestoreView(_r974); var ctx_r975 = ɵɵnextContext(); return ctx_r975.close(); });
    ɵɵpipe(4, "nzI18n");
    ɵɵelementEnd();
    ɵɵelementEnd();
    ɵɵelementEnd();
    ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r970 = ɵɵnextContext();
    ɵɵproperty("@slideMotion", "bottom");
    ɵɵadvance(3);
    ɵɵproperty("ngClass", ctx_r970.nzPopupClassName)("format", ctx_r970.nzFormat)("nzHourStep", ctx_r970.nzHourStep)("nzMinuteStep", ctx_r970.nzMinuteStep)("nzSecondStep", ctx_r970.nzSecondStep)("nzDisabledHours", ctx_r970.nzDisabledHours)("nzDisabledMinutes", ctx_r970.nzDisabledMinutes)("nzDisabledSeconds", ctx_r970.nzDisabledSeconds)("nzPlaceHolder", ctx_r970.nzPlaceHolder || ɵɵpipeBind1(4, 18, "TimePicker.placeholder"))("nzHideDisabledOptions", ctx_r970.nzHideDisabledOptions)("nzUse12Hours", ctx_r970.nzUse12Hours)("nzDefaultOpenValue", ctx_r970.nzDefaultOpenValue)("nzAddOn", ctx_r970.nzAddOn)("opened", ctx_r970.nzOpen)("nzClearText", ctx_r970.nzClearText)("nzAllowEmpty", ctx_r970.nzAllowEmpty)("ngModel", ctx_r970.value);
} }
var NZ_CONFIG_COMPONENT_NAME = 'timePicker';
var NzTimePickerComponent = /** @class */ (function () {
    function NzTimePickerComponent(nzConfigService, element, renderer, cdr) {
        this.nzConfigService = nzConfigService;
        this.element = element;
        this.renderer = renderer;
        this.cdr = cdr;
        this.isInit = false;
        this.focused = false;
        this.value = null;
        this.hostClassMap = {};
        this.overlayPositions = [
            {
                originX: 'start',
                originY: 'bottom',
                overlayX: 'start',
                overlayY: 'top',
                offsetX: 0,
                offsetY: 3
            }
        ];
        this.nzSize = null;
        this.nzPlaceHolder = '';
        this.nzDefaultOpenValue = new Date();
        this.nzOpen = false;
        this.nzOpenChange = new EventEmitter();
        this.nzHideDisabledOptions = false;
        this.nzDisabled = false;
        this.nzAutoFocus = false;
    }
    NzTimePickerComponent.prototype.setValue = function (value) {
        this.value = value;
        if (this._onChange) {
            this._onChange(this.value);
        }
        if (this._onTouched) {
            this._onTouched();
        }
    };
    NzTimePickerComponent.prototype.open = function () {
        if (this.nzDisabled) {
            return;
        }
        this.focus();
        this.setClassMap();
        this.nzOpen = true;
        this.nzOpenChange.emit(this.nzOpen);
    };
    NzTimePickerComponent.prototype.close = function () {
        this.nzOpen = false;
        this.cdr.markForCheck();
        this.nzOpenChange.emit(this.nzOpen);
    };
    NzTimePickerComponent.prototype.updateAutoFocus = function () {
        if (this.isInit && !this.nzDisabled) {
            if (this.nzAutoFocus) {
                this.renderer.setAttribute(this.inputRef.nativeElement, 'autofocus', 'autofocus');
            }
            else {
                this.renderer.removeAttribute(this.inputRef.nativeElement, 'autofocus');
            }
        }
    };
    NzTimePickerComponent.prototype.onClickClearBtn = function () {
        this.setValue(null);
    };
    NzTimePickerComponent.prototype.onFocus = function (value) {
        this.focused = value;
        this.setClassMap();
    };
    NzTimePickerComponent.prototype.setClassMap = function () {
        var _a;
        this.hostClassMap = (_a = {},
            _a["ant-picker"] = true,
            _a["ant-picker-" + this.nzSize] = isNotNil(this.nzSize),
            _a["ant-picker-disabled"] = this.nzDisabled,
            _a["ant-picker-focused"] = this.focused,
            _a);
    };
    NzTimePickerComponent.prototype.focus = function () {
        if (this.inputRef.nativeElement) {
            this.inputRef.nativeElement.focus();
        }
    };
    NzTimePickerComponent.prototype.blur = function () {
        if (this.inputRef.nativeElement) {
            this.inputRef.nativeElement.blur();
        }
    };
    NzTimePickerComponent.prototype.ngOnInit = function () {
        this.inputSize = Math.max(8, this.nzFormat.length) + 2;
        this.setClassMap();
        this.origin = new CdkOverlayOrigin(this.element);
    };
    NzTimePickerComponent.prototype.ngOnChanges = function (changes) {
        var nzUse12Hours = changes.nzUse12Hours, nzFormat = changes.nzFormat, nzDisabled = changes.nzDisabled, nzAutoFocus = changes.nzAutoFocus;
        if (nzUse12Hours && !nzUse12Hours.previousValue && nzUse12Hours.currentValue && !nzFormat) {
            this.nzFormat = 'h:mm:ss a';
        }
        if (nzDisabled) {
            var value = nzDisabled.currentValue;
            var input = this.inputRef.nativeElement;
            if (value) {
                this.renderer.setAttribute(input, 'disabled', '');
            }
            else {
                this.renderer.removeAttribute(input, 'disabled');
            }
        }
        if (nzAutoFocus) {
            this.updateAutoFocus();
        }
    };
    NzTimePickerComponent.prototype.ngAfterViewInit = function () {
        this.isInit = true;
        this.updateAutoFocus();
    };
    NzTimePickerComponent.prototype.writeValue = function (time) {
        this.value = time;
        this.cdr.markForCheck();
    };
    NzTimePickerComponent.prototype.registerOnChange = function (fn) {
        this._onChange = fn;
    };
    NzTimePickerComponent.prototype.registerOnTouched = function (fn) {
        this._onTouched = fn;
    };
    NzTimePickerComponent.prototype.setDisabledState = function (isDisabled) {
        this.nzDisabled = isDisabled;
        this.cdr.markForCheck();
    };
    /** @nocollapse */ NzTimePickerComponent.ɵfac = function NzTimePickerComponent_Factory(t) { return new (t || NzTimePickerComponent)(ɵɵdirectiveInject(NzConfigService), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(ChangeDetectorRef)); };
    /** @nocollapse */ NzTimePickerComponent.ɵcmp = ɵɵdefineComponent({ type: NzTimePickerComponent, selectors: [["nz-time-picker"]], viewQuery: function NzTimePickerComponent_Query(rf, ctx) { if (rf & 1) {
            ɵɵstaticViewQuery(_c0$1, true);
        } if (rf & 2) {
            var _t;
            ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.inputRef = _t.first);
        } }, hostVars: 2, hostBindings: function NzTimePickerComponent_HostBindings(rf, ctx) { if (rf & 2) {
            ɵɵclassMap(ctx.hostClassMap);
        } }, inputs: { nzSize: "nzSize", nzHourStep: "nzHourStep", nzMinuteStep: "nzMinuteStep", nzSecondStep: "nzSecondStep", nzClearText: "nzClearText", nzPopupClassName: "nzPopupClassName", nzPlaceHolder: "nzPlaceHolder", nzAddOn: "nzAddOn", nzDefaultOpenValue: "nzDefaultOpenValue", nzDisabledHours: "nzDisabledHours", nzDisabledMinutes: "nzDisabledMinutes", nzDisabledSeconds: "nzDisabledSeconds", nzFormat: "nzFormat", nzOpen: "nzOpen", nzUse12Hours: "nzUse12Hours", nzHideDisabledOptions: "nzHideDisabledOptions", nzAllowEmpty: "nzAllowEmpty", nzDisabled: "nzDisabled", nzAutoFocus: "nzAutoFocus" }, outputs: { nzOpenChange: "nzOpenChange" }, exportAs: ["nzTimePicker"], features: [ɵɵProvidersFeature([NzUpdateHostClassService, { provide: NG_VALUE_ACCESSOR, useExisting: NzTimePickerComponent, multi: true }]), ɵɵNgOnChangesFeature], decls: 8, vars: 12, consts: [[1, "ant-picker-input"], ["type", "text", 3, "size", "nzTime", "placeholder", "ngModel", "disabled", "ngModelChange", "click", "focus", "blur"], ["inputElement", ""], [1, "ant-picker-suffix"], ["nz-icon", "", "nzType", "clock-circle"], ["class", "ant-picker-clear", 3, "click", 4, "ngIf"], ["cdkConnectedOverlay", "", "nzConnectedOverlay", "", "cdkConnectedOverlayHasBackdrop", "", 3, "cdkConnectedOverlayPositions", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayOffsetY", "detach", "backdropClick"], [1, "ant-picker-clear", 3, "click"], ["nz-icon", "", "nzType", "close-circle", "nzTheme", "fill"], [1, "ant-picker-dropdown"], [1, "ant-picker-panel-container"], ["tabindex", "-1", 1, "ant-picker-panel"], [3, "ngClass", "format", "nzHourStep", "nzMinuteStep", "nzSecondStep", "nzDisabledHours", "nzDisabledMinutes", "nzDisabledSeconds", "nzPlaceHolder", "nzHideDisabledOptions", "nzUse12Hours", "nzDefaultOpenValue", "nzAddOn", "opened", "nzClearText", "nzAllowEmpty", "ngModel", "ngModelChange", "closePanel"]], template: function NzTimePickerComponent_Template(rf, ctx) { if (rf & 1) {
            ɵɵelementStart(0, "div", 0);
            ɵɵelementStart(1, "input", 1, 2);
            ɵɵlistener("ngModelChange", function NzTimePickerComponent_Template_input_ngModelChange_1_listener($event) { return ctx.value = $event; })("click", function NzTimePickerComponent_Template_input_click_1_listener() { return ctx.open(); })("focus", function NzTimePickerComponent_Template_input_focus_1_listener() { return ctx.onFocus(true); })("blur", function NzTimePickerComponent_Template_input_blur_1_listener() { return ctx.onFocus(false); });
            ɵɵpipe(3, "nzI18n");
            ɵɵelementEnd();
            ɵɵelementStart(4, "span", 3);
            ɵɵelement(5, "i", 4);
            ɵɵelementEnd();
            ɵɵtemplate(6, NzTimePickerComponent_span_6_Template, 2, 2, "span", 5);
            ɵɵelementEnd();
            ɵɵtemplate(7, NzTimePickerComponent_ng_template_7_Template, 5, 20, "ng-template", 6);
            ɵɵlistener("detach", function NzTimePickerComponent_Template_ng_template_detach_7_listener() { return ctx.close(); })("backdropClick", function NzTimePickerComponent_Template_ng_template_backdropClick_7_listener() { return ctx.close(); });
        } if (rf & 2) {
            ɵɵadvance(1);
            ɵɵproperty("size", ctx.inputSize)("nzTime", ctx.nzFormat)("placeholder", ctx.nzPlaceHolder || ɵɵpipeBind1(3, 10, "TimePicker.placeholder"))("ngModel", ctx.value)("disabled", ctx.nzDisabled);
            ɵɵadvance(5);
            ɵɵproperty("ngIf", ctx.nzAllowEmpty && ctx.value);
            ɵɵadvance(1);
            ɵɵproperty("cdkConnectedOverlayPositions", ctx.overlayPositions)("cdkConnectedOverlayOrigin", ctx.origin)("cdkConnectedOverlayOpen", ctx.nzOpen)("cdkConnectedOverlayOffsetY", 0 - 2);
        } }, directives: [NzTimeValueAccessorDirective, DefaultValueAccessor, NgControlStatus, NgModel, NzIconDirective, NgIf, CdkConnectedOverlay, NzConnectedOverlayDirective, NzTimePickerPanelComponent, NgClass], pipes: [NzI18nPipe], encapsulation: 2, data: { animation: [slideMotion] }, changeDetection: 0 });
    __decorate([
        WithConfig(NZ_CONFIG_COMPONENT_NAME, 1),
        __metadata("design:type", Number)
    ], NzTimePickerComponent.prototype, "nzHourStep", void 0);
    __decorate([
        WithConfig(NZ_CONFIG_COMPONENT_NAME, 1),
        __metadata("design:type", Number)
    ], NzTimePickerComponent.prototype, "nzMinuteStep", void 0);
    __decorate([
        WithConfig(NZ_CONFIG_COMPONENT_NAME, 1),
        __metadata("design:type", Number)
    ], NzTimePickerComponent.prototype, "nzSecondStep", void 0);
    __decorate([
        WithConfig(NZ_CONFIG_COMPONENT_NAME, 'clear'),
        __metadata("design:type", String)
    ], NzTimePickerComponent.prototype, "nzClearText", void 0);
    __decorate([
        WithConfig(NZ_CONFIG_COMPONENT_NAME),
        __metadata("design:type", String)
    ], NzTimePickerComponent.prototype, "nzPopupClassName", void 0);
    __decorate([
        WithConfig(NZ_CONFIG_COMPONENT_NAME, 'HH:mm:ss'),
        __metadata("design:type", String)
    ], NzTimePickerComponent.prototype, "nzFormat", void 0);
    __decorate([
        WithConfig(NZ_CONFIG_COMPONENT_NAME, false), InputBoolean(),
        __metadata("design:type", Boolean)
    ], NzTimePickerComponent.prototype, "nzUse12Hours", void 0);
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzTimePickerComponent.prototype, "nzHideDisabledOptions", void 0);
    __decorate([
        WithConfig(NZ_CONFIG_COMPONENT_NAME, true), InputBoolean(),
        __metadata("design:type", Boolean)
    ], NzTimePickerComponent.prototype, "nzAllowEmpty", void 0);
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzTimePickerComponent.prototype, "nzDisabled", void 0);
    __decorate([
        InputBoolean(),
        __metadata("design:type", Object)
    ], NzTimePickerComponent.prototype, "nzAutoFocus", void 0);
    return NzTimePickerComponent;
}());
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzTimePickerComponent, [{
        type: Component,
        args: [{
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                selector: 'nz-time-picker',
                exportAs: 'nzTimePicker',
                template: "\n    <div class=\"ant-picker-input\">\n      <input\n        #inputElement\n        type=\"text\"\n        [size]=\"inputSize\"\n        [nzTime]=\"nzFormat\"\n        [placeholder]=\"nzPlaceHolder || ('TimePicker.placeholder' | nzI18n)\"\n        [(ngModel)]=\"value\"\n        [disabled]=\"nzDisabled\"\n        (click)=\"open()\"\n        (focus)=\"onFocus(true)\"\n        (blur)=\"onFocus(false)\"\n      />\n      <span class=\"ant-picker-suffix\">\n        <i nz-icon nzType=\"clock-circle\"></i>\n      </span>\n      <span *ngIf=\"nzAllowEmpty && value\" class=\"ant-picker-clear\" (click)=\"onClickClearBtn()\">\n        <i nz-icon nzType=\"close-circle\" nzTheme=\"fill\" [attr.aria-label]=\"nzClearText\" [attr.title]=\"nzClearText\"></i>\n      </span>\n    </div>\n\n    <ng-template\n      cdkConnectedOverlay\n      nzConnectedOverlay\n      cdkConnectedOverlayHasBackdrop\n      [cdkConnectedOverlayPositions]=\"overlayPositions\"\n      [cdkConnectedOverlayOrigin]=\"origin\"\n      [cdkConnectedOverlayOpen]=\"nzOpen\"\n      [cdkConnectedOverlayOffsetY]=\"-2\"\n      (detach)=\"close()\"\n      (backdropClick)=\"close()\"\n    >\n      <div [@slideMotion]=\"'bottom'\" class=\"ant-picker-dropdown\">\n        <div class=\"ant-picker-panel-container\">\n          <div tabindex=\"-1\" class=\"ant-picker-panel\">\n            <nz-time-picker-panel\n              [ngClass]=\"nzPopupClassName\"\n              [format]=\"nzFormat\"\n              [nzHourStep]=\"nzHourStep\"\n              [nzMinuteStep]=\"nzMinuteStep\"\n              [nzSecondStep]=\"nzSecondStep\"\n              [nzDisabledHours]=\"nzDisabledHours\"\n              [nzDisabledMinutes]=\"nzDisabledMinutes\"\n              [nzDisabledSeconds]=\"nzDisabledSeconds\"\n              [nzPlaceHolder]=\"nzPlaceHolder || ('TimePicker.placeholder' | nzI18n)\"\n              [nzHideDisabledOptions]=\"nzHideDisabledOptions\"\n              [nzUse12Hours]=\"nzUse12Hours\"\n              [nzDefaultOpenValue]=\"nzDefaultOpenValue\"\n              [nzAddOn]=\"nzAddOn\"\n              [opened]=\"nzOpen\"\n              [nzClearText]=\"nzClearText\"\n              [nzAllowEmpty]=\"nzAllowEmpty\"\n              [(ngModel)]=\"value\"\n              (closePanel)=\"close()\"\n            >\n            </nz-time-picker-panel>\n          </div>\n        </div>\n      </div>\n    </ng-template>\n  ",
                host: { '[class]': 'hostClassMap' },
                animations: [slideMotion],
                providers: [NzUpdateHostClassService, { provide: NG_VALUE_ACCESSOR, useExisting: NzTimePickerComponent, multi: true }]
            }]
    }], function () { return [{ type: NzConfigService }, { type: ElementRef }, { type: Renderer2 }, { type: ChangeDetectorRef }]; }, { inputRef: [{
            type: ViewChild,
            args: ['inputElement', { static: true }]
        }], nzSize: [{
            type: Input
        }], nzHourStep: [{
            type: Input
        }], nzMinuteStep: [{
            type: Input
        }], nzSecondStep: [{
            type: Input
        }], nzClearText: [{
            type: Input
        }], nzPopupClassName: [{
            type: Input
        }], nzPlaceHolder: [{
            type: Input
        }], nzAddOn: [{
            type: Input
        }], nzDefaultOpenValue: [{
            type: Input
        }], nzDisabledHours: [{
            type: Input
        }], nzDisabledMinutes: [{
            type: Input
        }], nzDisabledSeconds: [{
            type: Input
        }], nzFormat: [{
            type: Input
        }], nzOpen: [{
            type: Input
        }], nzUse12Hours: [{
            type: Input
        }], nzOpenChange: [{
            type: Output
        }], nzHideDisabledOptions: [{
            type: Input
        }], nzAllowEmpty: [{
            type: Input
        }], nzDisabled: [{
            type: Input
        }], nzAutoFocus: [{
            type: Input
        }] }); })();

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
var NzTimePickerModule = /** @class */ (function () {
    function NzTimePickerModule() {
    }
    /** @nocollapse */ NzTimePickerModule.ɵmod = ɵɵdefineNgModule({ type: NzTimePickerModule });
    /** @nocollapse */ NzTimePickerModule.ɵinj = ɵɵdefineInjector({ factory: function NzTimePickerModule_Factory(t) { return new (t || NzTimePickerModule)(); }, imports: [[CommonModule, FormsModule, NzI18nModule, OverlayModule, NzIconModule, NzOverlayModule]] });
    return NzTimePickerModule;
}());
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(NzTimePickerModule, { declarations: [NzTimePickerComponent, NzTimePickerPanelComponent, NzTimeValueAccessorDirective], imports: [CommonModule, FormsModule, NzI18nModule, OverlayModule, NzIconModule, NzOverlayModule], exports: [NzTimePickerPanelComponent, NzTimePickerComponent] }); })();
/*@__PURE__*/ (function () { ɵsetClassMetadata(NzTimePickerModule, [{
        type: NgModule,
        args: [{
                declarations: [NzTimePickerComponent, NzTimePickerPanelComponent, NzTimeValueAccessorDirective],
                exports: [NzTimePickerPanelComponent, NzTimePickerComponent],
                imports: [CommonModule, FormsModule, NzI18nModule, OverlayModule, NzIconModule, NzOverlayModule]
            }]
    }], null, null); })();

/**
 * @license
 * Copyright Alibaba.com All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */

/**
 * Generated bundle index. Do not edit.
 */

export { NzTimePickerComponent, NzTimePickerModule, NzTimePickerPanelComponent, NzTimeValueAccessorDirective };
//# sourceMappingURL=ng-zorro-antd-time-picker.js.map
