ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
100 lines • 69.4 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/animations"),require("@angular/cdk/coercion"),require("@angular/platform-browser/animations"),require("@angular/cdk/overlay"),require("date-fns"),require("date-fns/add_months"),require("date-fns/add_years"),require("date-fns/set_day"),require("date-fns/set_month"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/platform")):"function"==typeof define&&define.amd?define("ng-zorro-antd/core",["exports","@angular/common","@angular/core","@angular/animations","@angular/cdk/coercion","@angular/platform-browser/animations","@angular/cdk/overlay","date-fns","date-fns/add_months","date-fns/add_years","date-fns/set_day","date-fns/set_month","rxjs","rxjs/operators","@angular/cdk/platform"],t):t(((e=e||self)["ng-zorro-antd"]=e["ng-zorro-antd"]||{},e["ng-zorro-antd"].core={}),e.ng.common,e.ng.core,e.ng.animations,e.ng.cdk.coercion,e.ng.platformBrowser.animations,e.ng.cdk.overlay,e.dateFns,e.addMonths,e.addYears,e.setDay,e.setMonth,e.rxjs,e.rxjs.operators,e.ng.cdk.platform)}(this,function(e,t,n,r,i,o,a,s,c,d,l,u,p,f,h){"use strict";c=c&&c.hasOwnProperty("default")?c.default:c,d=d&&d.hasOwnProperty("default")?d.default:d,l=l&&l.hasOwnProperty("default")?l.default:l,u=u&&u.hasOwnProperty("default")?u.default:u;var y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function v(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function N(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}var C=function(){function e(e,t){this.elementRef=e,this.renderer=t,this.classList=[]}return Object.defineProperty(e.prototype,"nzClassListAdd",{set:function(e){var t=this;this.classList.forEach(function(e){t.renderer.removeClass(t.elementRef.nativeElement,e)}),e.forEach(function(e){t.renderer.addClass(t.elementRef.nativeElement,e)}),this.classList=e},enumerable:!0,configurable:!0}),e.decorators=[{type:n.Directive,args:[{selector:"[nzClassListAdd]",exportAs:"nzClassListAdd"}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2}]},e.propDecorators={nzClassListAdd:[{type:n.Input}]},e}();var E=function(){function e(e,t){this.viewContainer=e,this.defaultTemplate=t,this.inputTemplate=null,this.inputViewRef=null,this.defaultViewRef=null,this.nzStringTemplateOutletContext=null}return Object.defineProperty(e.prototype,"nzStringTemplateOutlet",{set:function(e){e instanceof n.TemplateRef?(this.isTemplate=!0,this.inputTemplate=e):this.isTemplate=!1},enumerable:!0,configurable:!0}),e.prototype.recreateView=function(){this.isTemplate?this.inputViewRef||this.inputTemplate&&(this.inputViewRef=this.viewContainer.createEmbeddedView(this.inputTemplate,this.nzStringTemplateOutletContext)):this.defaultViewRef||this.defaultTemplate&&(this.defaultViewRef=this.viewContainer.createEmbeddedView(this.defaultTemplate,this.nzStringTemplateOutletContext))},e.prototype.getType=function(e){return e instanceof n.TemplateRef?"template":"string"},e.prototype.shouldRecreateView=function(e){var t=e.nzStringTemplateOutletContext,n=e.nzStringTemplateOutlet,r=!1;if(n)if(n.firstChange)r=!0;else{var i=this.getType(n.previousValue),o=this.getType(n.currentValue);r=!("string"===i&&"string"===o)}return t&&this.hasContextShapeChanged(t)||r},e.prototype.hasContextShapeChanged=function(e){var t,n,r=Object.keys(e.previousValue||{}),i=Object.keys(e.currentValue||{});if(r.length===i.length){try{for(var o=m(i),a=o.next();!a.done;a=o.next()){var s=a.value;if(-1===r.indexOf(s))return!0}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!1}return!0},e.prototype.updateExistingContext=function(e){var t,n;try{for(var r=m(Object.keys(e)),i=r.next();!i.done;i=r.next()){var o=i.value;this.inputViewRef.context[o]=this.nzStringTemplateOutletContext[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.ngOnChanges=function(e){this.shouldRecreateView(e)?(this.viewContainer&&(this.viewContainer.clear(),this.defaultViewRef=null,this.inputViewRef=null),this.recreateView()):this.inputViewRef&&this.nzStringTemplateOutletContext&&this.updateExistingContext(this.nzStringTemplateOutletContext)},e.decorators=[{type:n.Directive,args:[{selector:"[nzStringTemplateOutlet]",exportAs:"nzStringTemplateOutlet"}]}],e.ctorParameters=function(){return[{type:n.ViewContainerRef},{type:n.TemplateRef}]},e.propDecorators={nzStringTemplateOutletContext:[{type:n.Input}],nzStringTemplateOutlet:[{type:n.Input}]},e}();var w=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule],exports:[E,C],declarations:[E,C]}]}],e}(),S=function(){function e(){}return e.SLOW="0.3s",e.BASE="0.2s",e.FAST="0.1s",e}();
/**
* @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 k=function(){function e(){}return e.EASE_BASE_OUT="cubic-bezier(0.7, 0.3, 0.1, 1)",e.EASE_BASE_IN="cubic-bezier(0.9, 0, 0.3, 0.7)",e.EASE_OUT="cubic-bezier(0.215, 0.61, 0.355, 1)",e.EASE_IN="cubic-bezier(0.55, 0.055, 0.675, 0.19)",e.EASE_IN_OUT="cubic-bezier(0.645, 0.045, 0.355, 1)",e.EASE_OUT_BACK="cubic-bezier(0.12, 0.4, 0.29, 1.46)",e.EASE_IN_BACK="cubic-bezier(0.71, -0.46, 0.88, 0.6)",e.EASE_IN_OUT_BACK="cubic-bezier(0.71, -0.46, 0.29, 1.46)",e.EASE_OUT_CIRC="cubic-bezier(0.08, 0.82, 0.17, 1)",e.EASE_IN_CIRC="cubic-bezier(0.6, 0.04, 0.98, 0.34)",e.EASE_IN_OUT_CIRC="cubic-bezier(0.78, 0.14, 0.15, 0.86)",e.EASE_OUT_QUINT="cubic-bezier(0.23, 1, 0.32, 1)",e.EASE_IN_QUINT="cubic-bezier(0.755, 0.05, 0.855, 0.06)",e.EASE_IN_OUT_QUINT="cubic-bezier(0.86, 0, 0.07, 1)",e}();var O=r.trigger("collapseMotion",[r.state("expanded",r.style({height:"*"})),r.state("collapsed",r.style({height:0,overflow:"hidden"})),r.state("hidden",r.style({height:0,overflow:"hidden",borderTopWidth:"0"})),r.transition("expanded => collapsed",r.animate("150ms "+k.EASE_IN_OUT)),r.transition("expanded => hidden",r.animate("150ms "+k.EASE_IN_OUT)),r.transition("collapsed => expanded",r.animate("150ms "+k.EASE_IN_OUT)),r.transition("hidden => expanded",r.animate("150ms "+k.EASE_IN_OUT))]),T=r.trigger("treeCollapseMotion",[r.transition(":leave",[r.style({overflow:"hidden"}),r.animate("150ms "+k.EASE_IN_OUT,r.style({height:0}))]),r.transition(":enter",[r.style({overflow:"hidden",height:0}),r.animate("150ms "+k.EASE_IN_OUT,r.style({overflow:"hidden",height:"*"}))])]),x=r.trigger("fadeMotion",[r.transition(":enter",[r.style({opacity:0}),r.animate(""+S.BASE,r.style({opacity:1}))]),r.transition(":leave",[r.style({opacity:1}),r.animate(""+S.BASE,r.style({opacity:0}))])]),_=r.trigger("helpMotion",[r.transition(":enter",[r.style({opacity:0,transform:"translateY(-5px)"}),r.animate(S.SLOW+" "+k.EASE_IN_OUT,r.style({opacity:1,transform:"translateY(0)"}))]),r.transition(":leave",[r.style({opacity:1,transform:"translateY(0)"}),r.animate(S.SLOW+" "+k.EASE_IN_OUT,r.style({opacity:0,transform:"translateY(-5px)"}))])]),A=r.trigger("moveUpMotion",[r.transition("* => enter",[r.style({transformOrigin:"0 0",transform:"translateY(-100%)",opacity:0}),r.animate(""+S.BASE,r.style({transformOrigin:"0 0",transform:"translateY(0%)",opacity:1}))]),r.transition("* => leave",[r.style({transformOrigin:"0 0",transform:"translateY(0%)",opacity:1}),r.animate(""+S.BASE,r.style({transformOrigin:"0 0",transform:"translateY(-100%)",opacity:0}))])]),L=r.trigger("notificationMotion",[r.state("enterRight",r.style({opacity:1,transform:"translateX(0)"})),r.transition("* => enterRight",[r.style({opacity:0,transform:"translateX(5%)"}),r.animate("100ms linear")]),r.state("enterLeft",r.style({opacity:1,transform:"translateX(0)"})),r.transition("* => enterLeft",[r.style({opacity:0,transform:"translateX(-5%)"}),r.animate("100ms linear")]),r.state("leave",r.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 0%"})),r.transition("* => leave",[r.style({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"}),r.animate("100ms linear")])]),P=S.BASE+" "+k.EASE_OUT_QUINT,I=S.BASE+" "+k.EASE_IN_QUINT,D=r.trigger("slideMotion",[r.state("bottom",r.style({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"})),r.state("top",r.style({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 100%"})),r.transition("void => bottom",[r.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 0%"}),r.animate(P)]),r.transition("bottom => void",[r.animate(I,r.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 0%"}))]),r.transition("void => top",[r.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 100%"}),r.animate(P)]),r.transition("top => void",[r.animate(I,r.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 100%"}))])]),R=r.trigger("slideAlertMotion",[r.transition(":leave",[r.style({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"}),r.animate(S.SLOW+" "+k.EASE_IN_OUT_CIRC,r.style({opacity:0,transform:"scaleY(0)",transformOrigin:"0% 0%"}))])]),z=r.trigger("zoomMotion",[r.transition(":enter",[r.style({opacity:0,transform:"scale(0.2)"}),r.animate(S.BASE+" "+k.EASE_OUT_CIRC,r.style({opacity:1,transform:"scale(1)"}))]),r.transition(":leave",[r.style({opacity:1,transform:"scale(1)"}),r.animate(S.BASE+" "+k.EASE_IN_OUT_CIRC,r.style({opacity:0,transform:"scale(0.2)"}))])]),M=r.trigger("zoomBigMotion",[r.transition("void => active",[r.style({opacity:0,transform:"scale(0.8)"}),r.animate(S.BASE+" "+k.EASE_OUT_CIRC,r.style({opacity:1,transform:"scale(1)"}))]),r.transition("active => void",[r.style({opacity:1,transform:"scale(1)"}),r.animate(S.BASE+" "+k.EASE_IN_OUT_CIRC,r.style({opacity:0,transform:"scale(0.8)"}))])]),j=r.trigger("zoomBadgeMotion",[r.transition(":enter",[r.style({opacity:0,transform:"scale(0) translate(50%, -50%)"}),r.animate(S.SLOW+" "+k.EASE_OUT_BACK,r.style({opacity:1,transform:"scale(1) translate(50%, -50%)"}))]),r.transition(":leave",[r.style({opacity:1,transform:"scale(1) translate(50%, -50%)"}),r.animate(S.SLOW+" "+k.EASE_IN_BACK,r.style({opacity:0,transform:"scale(0) translate(50%, -50%)"}))])]),Y={isTestMode:!1},U={},B="[NG-ZORRO]:";function H(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];(Y.isTestMode||n.isDevMode()&&function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.reduce(function(e,t){return e+t.toString()},"");return!U[n]&&(U[n]=!0,!0)}.apply(void 0,N(t)))&&e.apply(void 0,N(t))}var V=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return H.apply(void 0,N([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.warn.apply(console,N([B],e))}],e))},F=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(Y.isTestMode)return function(){};var n=(new Error).stack;return H.apply(void 0,N([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.warn.apply(console,N([B,"deprecated:"],e,[n]))}],e))};function X(e){return i.coerceBooleanProperty(e)}function W(e,t){return void 0===t&&(t=0),i._isNumberValue(e)?Number(e):t}function $(e){return i.coerceCssPixelValue(e)}function q(e,t){return function(n,r,i){var o="$$__"+r;return Object.prototype.hasOwnProperty.call(n,o)&&V('The prop "'+o+'" is already exist, it will be overrided by '+e+" decorator."),Object.defineProperty(n,o,{configurable:!0,writable:!0}),{get:function(){return i&&i.get?i.get.bind(this)():this[o]},set:function(e){i&&i.set&&i.set.bind(this)(t(e)),this[o]=t(e)}}}}function K(){return q("InputBoolean",X)}var G=function(){function e(e,t,n){this.element=e,this.renderer=t,this.animationType=n,this.nzNoAnimation=!1}return e.prototype.ngOnChanges=function(){this.updateClass()},e.prototype.ngAfterViewInit=function(){this.updateClass()},e.prototype.updateClass=function(){var e=i.coerceElement(this.element);e&&(this.nzNoAnimation||"NoopAnimations"===this.animationType?this.renderer.addClass(e,"nz-animate-disabled"):this.renderer.removeClass(e,"nz-animate-disabled"))},e.decorators=[{type:n.Directive,args:[{selector:"[nzNoAnimation]",exportAs:"nzNoAnimation"}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2},{type:String,decorators:[{type:n.Optional},{type:n.Inject,args:[o.ANIMATION_MODULE_TYPE]}]}]},e.propDecorators={nzNoAnimation:[{type:n.Input}]},function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);o>3&&a&&Object.defineProperty(t,n,a)}([K(),v("design:type",Boolean)],e.prototype,"nzNoAnimation",void 0),e}();var Z=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{declarations:[G],exports:[G],imports:[t.CommonModule]}]}],e}(),Q=function(){function e(e){this.cdkConnectedOverlay=e,this.cdkConnectedOverlay.backdropClass="nz-overlay-transparent-backdrop"}return e.decorators=[{type:n.Directive,args:[{selector:"[cdkConnectedOverlay][nzConnectedOverlay]",exportAs:"nzConnectedOverlay"}]}],e.ctorParameters=function(){return[{type:a.CdkConnectedOverlay}]},e}();var J=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{declarations:[Q],exports:[Q]}]}],e}(),ee={top:new a.ConnectionPositionPair({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"}),topCenter:new a.ConnectionPositionPair({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"}),topLeft:new a.ConnectionPositionPair({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),topRight:new a.ConnectionPositionPair({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"}),right:new a.ConnectionPositionPair({originX:"end",originY:"center"},{overlayX:"start",overlayY:"center"}),rightTop:new a.ConnectionPositionPair({originX:"end",originY:"top"},{overlayX:"start",overlayY:"top"}),rightBottom:new a.ConnectionPositionPair({originX:"end",originY:"bottom"},{overlayX:"start",overlayY:"bottom"}),bottom:new a.ConnectionPositionPair({originX:"center",originY:"bottom"},{overlayX:"center",overlayY:"top"}),bottomCenter:new a.ConnectionPositionPair({originX:"center",originY:"bottom"},{overlayX:"center",overlayY:"top"}),bottomLeft:new a.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),bottomRight:new a.ConnectionPositionPair({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"}),left:new a.ConnectionPositionPair({originX:"start",originY:"center"},{overlayX:"end",overlayY:"center"}),leftTop:new a.ConnectionPositionPair({originX:"start",originY:"top"},{overlayX:"end",overlayY:"top"}),leftBottom:new a.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"bottom"})},te=[ee.top,ee.right,ee.bottom,ee.left],ne=[ee.bottomLeft,ee.bottomRight,ee.topRight,ee.topLeft],re=[ee.rightTop,ee.leftTop],ie=[new a.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"bottom"}),new a.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"bottom"})],oe=[ee.bottomLeft,new a.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"top"})];var ae=function(){function e(e){if(e)if(e instanceof Date)this.nativeDate=e;else{if("string"!=typeof e&&"number"!=typeof e)throw new Error('The input date type is not supported ("Date" is now recommended)');V('The string type is not recommended for date-picker, use "Date" type'),this.nativeDate=new Date(e)}else this.nativeDate=new Date}return e.prototype.calendarStart=function(t){return new e(s.startOfWeek(s.startOfMonth(this.nativeDate),t))},e.prototype.getYear=function(){return this.nativeDate.getFullYear()},e.prototype.getMonth=function(){return this.nativeDate.getMonth()},e.prototype.getDay=function(){return this.nativeDate.getDay()},e.prototype.getTime=function(){return this.nativeDate.getTime()},e.prototype.getDate=function(){return this.nativeDate.getDate()},e.prototype.getHours=function(){return this.nativeDate.getHours()},e.prototype.getMinutes=function(){return this.nativeDate.getMinutes()},e.prototype.getSeconds=function(){return this.nativeDate.getSeconds()},e.prototype.getMilliseconds=function(){return this.nativeDate.getMilliseconds()},e.prototype.clone=function(){return new e(new Date(this.nativeDate))},e.prototype.setHms=function(t,n,r){var i=new Date(this.nativeDate);return i.setHours(t,n,r),new e(i)},e.prototype.setYear=function(t){return new e(s.setYear(this.nativeDate,t))},e.prototype.addYears=function(t){return new e(d(this.nativeDate,t))},e.prototype.setMonth=function(t){return new e(u(this.nativeDate,t))},e.prototype.addMonths=function(t){return new e(c(this.nativeDate,t))},e.prototype.setDay=function(t,n){return new e(l(this.nativeDate,t,n))},e.prototype.setDate=function(t){var n=new Date(this.nativeDate);return n.setDate(t),new e(n)},e.prototype.addDays=function(e){return this.setDate(this.getDate()+e)},e.prototype.isSame=function(e,t){var n;switch(void 0===t&&(t="day"),t){case"year":n=s.isSameYear;break;case"month":n=s.isSameMonth;break;case"day":n=s.isSameDay;break;case"hour":n=s.isSameHour;break;case"minute":n=s.isSameMinute;break;case"second":n=s.isSameSecond;break;default:n=s.isSameDay}return n(this.nativeDate,this.toNativeDate(e))},e.prototype.isSameYear=function(e){return this.isSame(e,"year")},e.prototype.isSameMonth=function(e){return this.isSame(e,"month")},e.prototype.isSameDay=function(e){return this.isSame(e,"day")},e.prototype.isSameHour=function(e){return this.isSame(e,"hour")},e.prototype.isSameMinute=function(e){return this.isSame(e,"minute")},e.prototype.isSameSecond=function(e){return this.isSame(e,"second")},e.prototype.compare=function(e,t,n){if(void 0===t&&(t="day"),void 0===n&&(n=!0),null===e)return!1;var r;switch(t){case"year":r=s.differenceInCalendarYears;break;case"month":r=s.differenceInCalendarMonths;break;case"day":r=s.differenceInCalendarDays;break;case"hour":r=s.differenceInHours;break;case"minute":r=s.differenceInMinutes;break;case"second":r=s.differenceInSeconds;break;default:r=s.differenceInCalendarDays}return n?r(this.nativeDate,this.toNativeDate(e))<0:r(this.nativeDate,this.toNativeDate(e))>0},e.prototype.isBeforeYear=function(e){return this.compare(e,"year")},e.prototype.isBeforeMonth=function(e){return this.compare(e,"month")},e.prototype.isBeforeDay=function(e){return this.compare(e,"day")},e.prototype.isBeforeHour=function(e){return this.compare(e,"hour")},e.prototype.isBeforeMinute=function(e){return this.compare(e,"minute")},e.prototype.isBeforeSecond=function(e){return this.compare(e,"second")},e.prototype.isAfterYear=function(e){return this.compare(e,"year",!1)},e.prototype.isAfterMonth=function(e){return this.compare(e,"month",!1)},e.prototype.isAfterDay=function(e){return this.compare(e,"day",!1)},e.prototype.isAfterHour=function(e){return this.compare(e,"hour",!1)},e.prototype.isAfterMinute=function(e){return this.compare(e,"minute",!1)},e.prototype.isAfterSecond=function(e){return this.compare(e,"second",!1)},e.prototype.isToday=function(){return s.isToday(this.nativeDate)},e.prototype.isValid=function(){return s.isValid(this.nativeDate)},e.prototype.toNativeDate=function(t){return t instanceof e?t.nativeDate:t},e}();
/**
* @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 se=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],ce=["moz","ms","webkit"];
/**
* @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 de=function(){if("undefined"==typeof window)return function(){return 0};if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);var e,t=ce.filter(function(e){return e+"RequestAnimationFrame"in window})[0];return t?window[t+"RequestAnimationFrame"]:(e=0,function(t){var n=(new Date).getTime(),r=Math.max(0,16-(n-e)),i=setTimeout(function(){t(n+r)},r);return e=n+r,i})}();var le=function(){function e(e){this.doc=e}return e.prototype.setScrollTop=function(e,t){void 0===t&&(t=0),e===window?(this.doc.body.scrollTop=t,this.doc.documentElement.scrollTop=t):e.scrollTop=t},e.prototype.getOffset=function(e){var t={top:0,left:0};if(!e||!e.getClientRects().length)return t;var n=e.getBoundingClientRect();if(n.width||n.height){var r=e.ownerDocument.documentElement;t.top=n.top-r.clientTop,t.left=n.left-r.clientLeft}else t.top=n.top,t.left=n.left;return t},e.prototype.getScroll=function(e,t){void 0===t&&(t=!0);var n=e||window,r=t?"scrollTop":"scrollLeft",i=n===window,o=i?n[t?"pageYOffset":"pageXOffset"]:n[r];return i&&"number"!=typeof o&&(o=this.doc.documentElement[r]),o},e.prototype.scrollTo=function(e,t,n,r){var i=this;void 0===t&&(t=0);var o=e||window,a=this.getScroll(o),s=Date.now(),c=function(){var e=Date.now()-s;i.setScrollTop(o,(n||function(e,t,n,r){var i=n-t,o=e/(r/2);return o<1?i/2*o*o*o+t:i/2*((o-=2)*o*o+2)+t})(e,a,t,450)),e<450?de(c):r&&r()};de(c)},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e}();function ue(e,t){return t||new le(e)}var pe={provide:le,useFactory:ue,deps:[t.DOCUMENT,[new n.Optional,new n.SkipSelf,le]]},fe=function(){function e(e){this.classMap={},this.renderer=e.createRenderer(null,null)}return e.prototype.updateHostClass=function(e,t){this.removeClass(e,this.classMap,this.renderer),this.classMap=g({},t),this.addClass(e,this.classMap,this.renderer)},e.prototype.removeClass=function(e,t,n){for(var r in t)t.hasOwnProperty(r)&&n.removeClass(e,r)},e.prototype.addClass=function(e,t,n){for(var r in t)t.hasOwnProperty(r)&&t[r]&&n.addClass(e,r)},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:n.RendererFactory2}]},e}();var he=function(){function e(){}return e.decorators=[{type:n.NgModule}],e}(),ye=function(){function e(e){this.document=e}return e.prototype.copy=function(e){var t=this;return new Promise(function(n,r){var i=null;try{(i=t.document.createElement("textarea")).style.all="unset",i.style.position="fixed",i.style.top="0",i.style.clip="rect(0, 0, 0, 0)",i.style.whiteSpace="pre",i.style.webkitUserSelect="text",i.style.MozUserSelect="text",i.style.msUserSelect="text",i.style.userSelect="text",t.document.body.appendChild(i),i.value=e,i.select(),t.document.execCommand("copy")||r(e),n(e)}finally{i&&t.document.body.removeChild(i)}})},e.decorators=[{type:n.Injectable,args:[{providedIn:he}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(t.DOCUMENT))},token:e,providedIn:he}),e}();var ge=function(){function e(e,t){this.ngZone=e,this.rendererFactory2=t,this.resizeSource=new p.Subject,this.domEventListeners=new Map,this.renderer=this.rendererFactory2.createRenderer(null,null)}return e.prototype.registerResizeListener=function(){var e=this;this.domEventListeners.has("resize")||this.domEventListeners.set("resize",{handler:function(){e.resizeSource.next()},countOfListeners:0});var t=this.domEventListeners.get("resize");return this.tryToStartListener(t,"resize"),this.resizeSource.pipe(f.auditTime(16))},e.prototype.unregisterResizeListener=function(){if(this.domEventListeners.has("resize")){var e=this.domEventListeners.get("resize");this.tryToStopListener(e)}},e.prototype.tryToStartListener=function(e,t){var n=this;e.countOfListeners+=1,this.ngZone.runOutsideAngular(function(){1===e.countOfListeners&&(e.unsubscribe=n.renderer.listen("window",t,e.handler))})},e.prototype.tryToStopListener=function(e){e.countOfListeners-=1,0===e.countOfListeners&&(e.unsubscribe(),e.unsubscribe=void 0)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:n.NgZone},{type:n.RendererFactory2}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(n.NgZone),n.ɵɵinject(n.RendererFactory2))},token:e,providedIn:"root"}),e}();var ve=new Map,me=function(){function e(){this._singletonRegistry=new Map}return Object.defineProperty(e.prototype,"singletonRegistry",{get:function(){return Y.isTestMode?ve:this._singletonRegistry},enumerable:!0,configurable:!0}),e.prototype.registerSingletonWithKey=function(e,t){var n=this.singletonRegistry.has(e),r=n?this.singletonRegistry.get(e):this.withNewTarget(t);n||this.singletonRegistry.set(e,r)},e.prototype.getSingletonWithKey=function(e){return this.singletonRegistry.has(e)?this.singletonRegistry.get(e).target:null},e.prototype.withNewTarget=function(e){return{target:e}},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}();
/**
* @license
* Copyright Google LLC 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://angular.io/license
*/
function be(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0);var i=document.createEvent("MouseEvent");return i.initMouseEvent(e,!0,!1,window,0,t,n,t,n,!1,!1,!1,!1,r,null),Object.defineProperty(i,"buttons",{get:function(){return 1}}),i}function Ne(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0);var r=document.createEvent("UIEvent"),i={pageX:t,pageY:n,clientX:t,clientY:n};return r.initUIEvent(e,!0,!0,window,0),Object.defineProperties(r,{touches:{value:[i]},targetTouches:{value:[i]},changedTouches:{value:[i]}}),r}function Ce(e,t,n,r){var i=document.createEvent("KeyboardEvent"),o=i.preventDefault;return i.initKeyEvent?i.initKeyEvent(e,!0,!0,window,0,0,0,0,0,t):i.initKeyboardEvent(e,!0,!0,window,0,r,0,"",!1),Object.defineProperties(i,{keyCode:{get:function(){return t}},key:{get:function(){return r}},target:{get:function(){return n}}}),i.preventDefault=function(){return Object.defineProperty(i,"defaultPrevented",{get:function(){return!0}}),o.apply(this,arguments)},i}function Ee(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!0);var r=document.createEvent("Event");return r.initEvent(e,t,n),r}function we(e,t){return e.dispatchEvent(t),t}function Se(e,t,n){return we(e,Ee(t,n))}
/**
* @license
* Copyright Google LLC 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://angular.io/license
*/
var ke=function(){function e(){}return e.prototype.getViewportRect=function(){return{left:0,top:0,width:1014,height:686,bottom:686,right:1014}},e.prototype.getViewportSize=function(){return{width:1014,height:686}},e.prototype.getViewportScrollPosition=function(){return{top:0,left:0}},e}(),Oe=function(e){function t(){var t=e.call(this,{enableLongStackTrace:!1})||this;return t.onStable=new n.EventEmitter(!1),t}return function(e,t){function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.run=function(e){return e()},t.prototype.runOutsideAngular=function(e){return e()},t.prototype.simulateZoneExit=function(){this.onStable.emit(null)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[]},t}(n.NgZone);var Te=function(){function e(t,n,r){var i=this;if(void 0===n&&(n=null),void 0===r&&(r=null),this.level=0,t instanceof e)return t;this.service=r||null,this.origin=t,this.key=t.key,this.parentNode=n,this._title=t.title||"---",this._icon=t.icon||"",this._isLeaf=t.isLeaf||!1,this._children=[],this._isChecked=t.checked||!1,this._isSelectable=t.disabled||!1!==t.selectable,this._isDisabled=t.disabled||!1,this._isDisableCheckbox=t.disableCheckbox||!1,this._isExpanded=!t.isLeaf&&(t.expanded||!1),this._isHalfChecked=!1,this._isSelected=!t.disabled&&t.selected||!1,this._isLoading=!1,this.isMatched=!1,this.level=n?n.level+1:0,void 0!==t.children&&null!==t.children&&t.children.forEach(function(n){var r=i.treeService;!r||r.isCheckStrictly||!t.checked||t.disabled||n.disabled||n.disableCheckbox||(n.checked=t.checked),i._children.push(new e(n,i))})}return Object.defineProperty(e.prototype,"treeService",{get:function(){return this.service||this.parentNode&&this.parentNode.treeService},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._title},set:function(e){this._title=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){return this._icon},set:function(e){this._icon=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},set:function(e){this._children=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLeaf",{get:function(){return this._isLeaf},set:function(e){this._isLeaf=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isChecked",{get:function(){return this._isChecked},set:function(e){this._isChecked=e,this._isAllChecked=e,this.origin.checked=e,this.afterValueChange("isChecked")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAllChecked",{get:function(){return this._isAllChecked},set:function(e){F("'isAllChecked' is going to be removed in 9.0.0. Please use 'isChecked' instead."),this._isAllChecked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isHalfChecked",{get:function(){return this._isHalfChecked},set:function(e){this._isHalfChecked=e,this.afterValueChange("isHalfChecked")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelectable",{get:function(){return this._isSelectable},set:function(e){this._isSelectable=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this._isDisabled},set:function(e){this._isDisabled=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisableCheckbox",{get:function(){return this._isDisableCheckbox},set:function(e){this._isDisableCheckbox=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return this._isExpanded},set:function(e){this._isExpanded=e,this.origin.expanded=e,this.afterValueChange("isExpanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},set:function(e){this._isSelected=e,this.origin.selected=e,this.afterValueChange("isSelected")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return this._isLoading},set:function(e){this._isLoading=e,this.update()},enumerable:!0,configurable:!0}),e.prototype.setSyncChecked=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this.setChecked(e,t),this.treeService&&!this.treeService.isCheckStrictly&&this.treeService.conduct(this)},e.prototype.setChecked=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),F("'setChecked' is going to be removed in 9.0.0. Please use 'isChecked' instead."),this.origin.checked=e,this.isChecked=e,this.isAllChecked=e,this.isHalfChecked=t},e.prototype.setExpanded=function(e){F("'setExpanded' is going to be removed in 9.0.0. Please use 'isExpanded' instead."),this.isExpanded=e},e.prototype.setSelected=function(e){F("'setSelected' is going to be removed in 9.0.0. Please use 'isExpanded' isSelected."),this.isDisabled||(this.isSelected=e)},e.prototype.getParentNode=function(){return this.parentNode},e.prototype.getChildren=function(){return this.children},e.prototype.addChildren=function(t,n){var r=this;void 0===n&&(n=-1),this.isLeaf||(t.forEach(function(t){var i=function(e){e.getChildren().forEach(function(e){e.level=e.getParentNode().level+1,e.origin.level=e.level,i(e)})},o=t;o instanceof e?o.parentNode=r:o=new e(t,r),o.level=r.level+1,o.origin.level=o.level,i(o);try{-1===n?r.children.push(o):r.children.splice(n,0,o)}catch(e){}}),this.origin.children=this.getChildren().map(function(e){return e.origin}),this.isLoading=!1)},e.prototype.clearChildren=function(){this.afterValueChange("clearChildren"),this.children=[],this.origin.children=[]},e.prototype.remove=function(){var e=this,t=this.getParentNode();t&&(t.children=t.getChildren().filter(function(t){return t.key!==e.key}),t.origin.children=t.origin.children.filter(function(t){return t.key!==e.key}),this.afterValueChange("remove"))},e.prototype.afterValueChange=function(e){if(this.treeService)switch(e){case"isChecked":this.treeService.setCheckedNodeList(this);break;case"isHalfChecked":this.treeService.setHalfCheckedNodeList(this);break;case"isExpanded":this.treeService.setExpandedNodeList(this);break;case"isSelected":this.treeService.setNodeActive(this);break;case"clearChildren":this.treeService.afterRemove(this.getChildren());break;case"remove":this.treeService.afterRemove([this])}this.update()},e.prototype.update=function(){this.component&&(this.component.setClassMap(),this.component.markForCheck())},e}();function xe(e){return null!=e}function _e(e){return e?1===e.nodeType&&0!==e.outerHTML.toString().trim().length?e:3===e.nodeType&&0!==e.textContent.toString().trim().length?e: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
*/
function Ae(e){var t=Array.isArray(e)?e:[e],n=t.join("").replace(/(\$|\^)/g,"\\$1");return t.length>1&&(n="["+n+"]"),new RegExp("(\\s|^)("+n+")[^\\s]*","g")}
/**
* @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
*/
function Le(e,t,n){if(e.length>t)return e;var r=""+Pe(t,n)+e;return r.slice(r.length-t,r.length)}function Pe(e,t){return Array(e).fill(t).join("")}
/**
* @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
*/
/**
* @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 Ie=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],De="undefined"!=typeof window,Re=De&&null!=window.mozInnerScreenX,ze=function(e){return parseInt(e,10)};function Me(e,t){var n=getComputedStyle(e).getPropertyValue("font-size"),r=document.querySelector("#DEBUG")||document.createElement("div");document.body.appendChild(r),r.id="DEBUG",r.style.position="absolute",r.style.backgroundColor="red",r.style.height=n,r.style.width="1px",r.style.top=e.getBoundingClientRect().top-e.scrollTop+window.pageYOffset+t.top+"px",r.style.left=e.getBoundingClientRect().left-e.scrollLeft+window.pageXOffset+t.left+"px"}
/**
* @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 je,Ye,Ue,Be=1,He=3,Ve=8,Fe={padding:"0",margin:"0",display:"inline",lineHeight:"inherit"};function Xe(e){if(!e)return 0;var t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0}var We={position:"absolute",top:"-9999px",width:"50px",height:"50px"};
/**
* @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
*/
function $e(e){var t=e.isDisabled,n=e.isDisableCheckbox;return!(!t&&!n)}function qe(e,t){return t.length>0&&t.indexOf(e)>-1}var Ke=function(){function e(){this.DRAG_SIDE_RANGE=.25,this.DRAG_MIN_GAP=2,this.isCheckStrictly=!1,this.isMultiple=!1,this.rootNodes=[],this.selectedNodeList=[],this.expandedNodeList=[],this.checkedNodeList=[],this.halfCheckedNodeList=[],this.matchedNodeList=[],this.triggerEventChange$=new p.Subject}return e.prototype.eventTriggerChanged=function(){return this.triggerEventChange$.asObservable()},e.prototype.initTree=function(e){var t=this;this.rootNodes=e,this.expandedNodeList=[],this.selectedNodeList=[],this.halfCheckedNodeList=[],this.checkedNodeList=[],this.matchedNodeList=[],setTimeout(function(){t.refreshCheckState(t.isCheckStrictly)})},e.prototype.getSelectedNode=function(){return this.selectedNode},e.prototype.getSelectedNodeList=function(){return this.conductNodeState("select")},e.prototype.getCheckedNodeList=function(){return this.conductNodeState("check")},e.prototype.getHalfCheckedNodeList=function(){return this.conductNodeState("halfCheck")},e.prototype.getExpandedNodeList=function(){return this.conductNodeState("expand")},e.prototype.getMatchedNodeList=function(){return this.conductNodeState("match")},e.prototype.isArrayOfNzTreeNode=function(e){return e.every(function(e){return e instanceof Te})},e.prototype.calcSelectedKeys=function(e,t,n){void 0===n&&(n=!1);var r=function(t){return t.every(function(t){if(qe(t.key,e)){if(t.isSelected=!0,!n)return!1}else t.isSelected=!1;return!(t.children.length>0)||r(t.children)})};r(t)},e.prototype.calcExpandedKeys=function(e,t){this.expandedNodeList=[];var n=function(t){t.forEach(function(t){t.isExpanded=qe(t.key,e),t.children.length>0&&n(t.children)})};n(t)},e.prototype.calcCheckedKeys=function(e,t,n){void 0===n&&(n=!1),this.checkedNodeList=[],this.halfCheckedNodeList=[];var r=function(t){t.forEach(function(t){qe(t.key,e)?(t.isChecked=!0,t.isHalfChecked=!1):(t.isChecked=!1,t.isHalfChecked=!1),t.children.length>0&&r(t.children)})};r(t),this.refreshCheckState(n)},e.prototype.setSelectedNode=function(e){this.selectedNode=e},e.prototype.setNodeActive=function(e){!this.isMultiple&&e.isSelected&&(this.selectedNodeList.forEach(function(t){e.key!==t.key&&(t.isSelected=!1)}),this.selectedNodeList=[]),this.setSelectedNodeList(e,this.isMultiple)},e.prototype.setSelectedNodeList=function(e,t){void 0===t&&(t=!1);var n=this.selectedNodeList.findIndex(function(t){return e.key===t.key});t?e.isSelected&&-1===n&&this.selectedNodeList.push(e):e.isSelected&&-1===n&&(this.selectedNodeList=[e]),e.isSelected||(this.selectedNodeList=this.selectedNodeList.filter(function(t){return t.key!==e.key}))},e.prototype.setHalfCheckedNodeList=function(e){var t=this.halfCheckedNodeList.findIndex(function(t){return e.key===t.key});e.isHalfChecked&&-1===t?this.halfCheckedNodeList.push(e):!e.isHalfChecked&&t>-1&&(this.halfCheckedNodeList=this.halfCheckedNodeList.filter(function(t){return e.key!==t.key}))},e.prototype.setCheckedNodeList=function(e){var t=this.checkedNodeList.findIndex(function(t){return e.key===t.key});e.isChecked&&-1===t?this.checkedNodeList.push(e):!e.isChecked&&t>-1&&(this.checkedNodeList=this.checkedNodeList.filter(function(t){return e.key!==t.key}))},e.prototype.conductNodeState=function(e){var t=this;void 0===e&&(e="check");var n=[];switch(e){case"select":n=this.selectedNodeList;break;case"expand":n=this.expandedNodeList;break;case"match":n=this.matchedNodeList;break;case"check":n=this.checkedNodeList;var r=function(e){var n=e.getParentNode();return!!n&&(t.checkedNodeList.findIndex(function(e){return e.key===n.key})>-1||r(n))};this.isCheckStrictly||(n=this.checkedNodeList.filter(function(e){return!r(e)}));break;case"halfCheck":this.isCheckStrictly||(n=this.halfCheckedNodeList)}return n},e.prototype.setExpandedNodeList=function(e){if(!e.isLeaf){var t=this.expandedNodeList.findIndex(function(t){return e.key===t.key});e.isExpanded&&-1===t?this.expandedNodeList.push(e):!e.isExpanded&&t>-1&&(this.expandedNodeList=this.expandedNodeList.filter(function(t){return e.key!==t.key}))}},e.prototype.refreshCheckState=function(e){var t=this;void 0===e&&(e=!1),e||this.checkedNodeList.forEach(function(e){t.conduct(e)})},e.prototype.conduct=function(e){var t=e.isChecked;e&&(this.conductUp(e),this.conductDown(e,t))},e.prototype.conductUp=function(e){var t=e.getParentNode();t&&($e(t)||(t.children.every(function(e){return $e(e)||!e.isHalfChecked&&e.isChecked})?(t.isChecked=!0,t.isHalfChecked=!1):t.children.some(function(e){return e.isHalfChecked||e.isChecked})?(t.isChecked=!1,t.isHalfChecked=!0):(t.isChecked=!1,t.isHalfChecked=!1)),this.setCheckedNodeList(t),this.setHalfCheckedNodeList(t),this.conductUp(t))},e.prototype.conductDown=function(e,t){var n=this;$e(e)||(e.isChecked=t,e.isHalfChecked=!1,this.setCheckedNodeList(e),this.setHalfCheckedNodeList(e),e.children.forEach(function(e){n.conductDown(e,t)}))},e.prototype.searchExpand=function(e){var t=this;this.matchedNodeList=[];var n=[];if(xe(e)){var r=function(e){var t=e.getParentNode();t&&(n.push(t.key),r(t))},i=function(n){e&&n.title.includes(e)?(n.isMatched=!0,t.matchedNodeList.push(n),r(n)):n.isMatched=!1,n.canHide=!n.isMatched,n.children.forEach(function(e){i(e)})};this.rootNodes.forEach(function(e){i(e)}),this.calcExpandedKeys(n,this.rootNodes)}},e.prototype.afterRemove=function(e){var t=this,n=function(e){t.selectedNodeList=t.selectedNodeList.filter(function(t){return t.key!==e.key}),t.expandedNodeList=t.expandedNodeList.filter(function(t){return t.key!==e.key}),t.checkedNodeList=t.checkedNodeList.filter(function(t){return t.key!==e.key}),e.children&&e.children.forEach(function(e){n(e)})};e.forEach(function(e){n(e)}),this.refreshCheckState(this.isCheckStrictly)},e.prototype.refreshDragNode=function(e){var t=this;0===e.children.length?this.conductUp(e):e.children.forEach(function(e){t.refreshDragNode(e)})},e.prototype.resetNodeLevel=function(e){var t,n,r=e.getParentNode();e.level=r?r.level+1:0;try{for(var i=m(e.children),o=i.next();!o.done;o=i.next()){var a=o.value;this.resetNodeLevel(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.calcDropPosition=function(e){var t=e.clientY,n=e.srcElement?e.srcElement.getBoundingClientRect():e.target.getBoundingClientRect(),r=n.top,i=n.bottom,o=n.height,a=Math.max(o*this.DRAG_SIDE_RANGE,this.DRAG_MIN_GAP);return t<=r+a?-1:t>=i-a?1:0},e.prototype.dropAndApply=function(e,t){var n=this;if(void 0===t&&(t=-1),e&&!(t>1)){var r=e.treeService,i=e.getParentNode(),o=this.selectedNode.getParentNode();switch(o?o.children=o.children.filter(function(e){return e.key!==n.selectedNode.key}):this.rootNodes=this.rootNodes.filter(function(e){return e.key!==n.selectedNode.key}),t){case 0:e.addChildren([this.selectedNode]),this.resetNodeLevel(e);break;case-1:case 1:var a=1===t?1:0;if(i){i.addChildren([this.selectedNode],i.children.indexOf(e)+a);var s=this.selectedNode.getParentNode();s&&this.resetNodeLevel(s)}else{var c=this.rootNodes.indexOf(e)+a;this.rootNodes.splice(c,0,this.selectedNode),this.rootNodes[c].parentNode=null,this.rootNodes[c].level=0}}this.rootNodes.forEach(function(e){e.treeService||(e.service=r),n.refreshDragNode(e)})}},e.prototype.formatEvent=function(e,t,n){var r={eventName:e,node:t,event:n};switch(e){case"dragstart":case"dragenter":case"dragover":case"dragleave":case"drop":case"dragend":Object.assign(r,{dragNode:this.getSelectedNode()});break;case"click":case"dblclick":Object.assign(r,{selectedKeys:this.selectedNodeList}),Object.assign(r,{nodes:this.selectedNodeList}),Object.assign(r,{keys:this.selectedNodeList.map(function(e){return e.key})});break;case"check":var i=this.getCheckedNodeList();Object.assign(r,{checkedKeys:i}),Object.assign(r,{nodes:i}),Object.assign(r,{keys:i.map(function(e){return e.key})});break;case"search":Object.assign(r,{matchedKeys:this.getMatchedNodeList()}),Object.assign(r,{nodes:this.getMatchedNodeList()}),Object.assign(r,{keys:this.getMatchedNodeList().map(function(e){return e.key})});break;case"expand":Object.assign(r,{nodes:this.expandedNodeList}),Object.assign(r,{keys:this.expandedNodeList.map(function(e){return e.key})})}return r},e.prototype.ngOnDestroy=function(){this.triggerEventChange$.complete()},e.decorators=[{type:n.Injectable}],e}();var Ge=new n.InjectionToken("NzTreeHigherOrder"),Ze=function(){function e(e){this.nzTreeService=e}return e.prototype.coerceTreeNodes=function(e){var t=this;return this.nzTreeService.isArrayOfNzTreeNode(e)?e.map(function(e){return e.service=t.nzTreeService,e}):e.map(function(e){return new Te(e,null,t.nzTreeService)})},e.prototype.getTreeNodes=function(){return this.nzTreeService.rootNodes},e.prototype.getTreeNodeByKey=function(e){var t=[],n=function(e){t.push(e),e.getChildren().forEach(function(e){n(e)})};return this.getTreeNodes().forEach(function(e){n(e)}),t.find(function(t){return t.key===e})||null},e.prototype.getCheckedNodeList=function(){return this.nzTreeService.getCheckedNodeList()},e.prototype.getSelectedNodeList=function(){return this.nzTreeService.getSelectedNodeList()},e.prototype.getHalfCheckedNodeList=function(){return this.nzTreeService.getHalfCheckedNodeList()},e.prototype.getExpandedNodeList=function(){return this.nzTreeService.getExpandedNodeList()},e.prototype.getMatchedNodeList=function(){return this.nzTreeService.getMatchedNodeList()},e}();
/**
* @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
*/
/**
* @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 Qe=function(){function e(e,t,n){var r=this;this.triggerElement=e,this.ngZone=t,this.insertExtraNode=n,this.waveTransitionDuration=400,this.lastTime=0,this.platform=new h.Platform,this.onClick=function(e){!r.triggerElement||!r.triggerElement.getAttribute||r.triggerElement.getAttribute("disabled")||"INPUT"===e.target.tagName||r.triggerElement.className.indexOf("disabled")>=0||r.fadeOutWave()},this.clickHandler=this.onClick.bind(this),this.bindTriggerEvent()}return Object.defineProperty(e.prototype,"waveAttributeName",{get:function(){return this.insertExtraNode?"ant-click-animating":"ant-click-animating-without-extra-node"},enumerable:!0,configurable:!0}),e.prototype.bindTriggerEvent=function(){var e=this;this.platform.isBrowser&&this.ngZone.runOutsideAngular(function(){e.removeTriggerEvent(),e.triggerElement&&e.triggerElement.addEventListener("click",e.clickHandler,!0)})},e.prototype.removeTriggerEvent=function(){this.triggerElement&&this.triggerElement.removeEventListener("click",this.clickHandler,!0)},e.prototype.removeStyleAndExtraNode=function(){this.styleForPseudo&&document.body.contains(this.styleForPseudo)&&(document.body.removeChild(this.styleForPseudo),this.styleForPseudo=null),this.insertExtraNode&&this.triggerElement.contains(this.extraNode)&&this.triggerElement.removeChild(this.extraNode)},e.prototype.destroy=function(){this.removeTriggerEvent(),this.removeStyleAndExtraNode()},e.prototype.fadeOutWave=function(){var e=this,t=this.triggerElement,n=this.getWaveColor(t);t.setAttribute(this.waveAttributeName,"true"),Date.now()<this.lastTime+this.waveTransitionDuration||(this.isValidColor(n)&&(this.styleForPseudo||(this.styleForPseudo=document.createElement("style")),this.styleForPseudo.innerHTML="\n [ant-click-animating-without-extra-node='true']::after, .ant-click-animating-node {\n --antd-wave-shadow-color: "+n+";\n }",document.body.appendChild(this.styleForPseudo)),this.insertExtraNode&&(this.extraNode||(this.extraNode=document.createElement("div")),this.extraNode.className="ant-click-animating-node",t.appendChild(this.extraNode)),this.lastTime=Date.now(),this.runTimeoutOutsideZone(function(){t.removeAttribute(e.waveAttributeName),e.removeStyleAndExtraNode()},this.waveTransitionDuration))},e.prototype.isValidColor=function(e){return!!e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&this.isNotGrey(e)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(e)&&"transparent"!==e},e.prototype.isNotGrey=function(e){var t=e.match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)