-
Notifications
You must be signed in to change notification settings - Fork 11
/
chunk-KED2H3LX.js
1 lines (1 loc) · 48.7 KB
/
chunk-KED2H3LX.js
1
import{a as ue,b as he,c as pe}from"./chunk-BUL6X4XY.js";import"./chunk-MGFBB5Y4.js";import{a as B,g as de,h as me,j as ce}from"./chunk-PNYJKZIQ.js";import"./chunk-UJZP7RYT.js";import{Ca as te,Fa as ht,Fc as re,Hc as se,Ic as le,Kb as pt,Kc as zt,Lc as ae,Mb as ft,ec as ne,ia as mt,ja as ct,oc as ie,sc as oe,ua as ut,va as I}from"./chunk-YWVGY2C2.js";import{A as ve,Aa as g,Ac as H,Ba as Q,Bc as A,Ca as U,Cc as F,Gc as ot,Hc as n,Hd as dt,Ib as E,Ic as k,Jb as Ye,Kb as Je,L as Ze,La as be,Ma as Xe,Mc as Y,Nc as J,Ob as Ke,Oc as K,Pb as q,Pc as rt,Q as Ve,Qa as De,Rc as st,Wb as u,Yb as V,_c as lt,ba as Z,dc as et,ed as at,f as L,fc as x,gc as y,hc as v,ic as e,id as ee,ja as Qe,jc as t,jd as we,kc as p,l as N,la as Ue,m as C,oa as ke,oc as _e,rb as d,rc as w,sb as D,tc as X,uc as tt,vc as nt,xb as Te,ya as qe,za as z,zc as it}from"./chunk-GBKJFEQZ.js";import"./chunk-EQDQRRRY.js";var kt=["slickList"],bt=["slickTrack"],Dt=["*"],Tt=r=>({$implicit:r});function _t(r,l){}function wt(r,l){if(r&1){let i=_e();e(0,"li",9),w("click",function(){let s=Q(i).$index,m=X(2);return U(m.goTo(s))}),q(1,_t,0,0,"ng-template",10),t()}if(r&2){let i=l.$index,o=X(2),s=ot(8);V("slick-active",i===o.activeIndex),d(),u("ngTemplateOutlet",o.nzDotRender||s)("ngTemplateOutletContext",st(4,Tt,i))}}function Nt(r,l){if(r&1&&(e(0,"ul",7),y(1,wt,2,6,"li",8,x),t()),r&2){let i=X();V("slick-dots-top",i.nzDotPosition==="top")("slick-dots-bottom",i.nzDotPosition==="bottom")("slick-dots-left",i.nzDotPosition==="left")("slick-dots-right",i.nzDotPosition==="right"),d(),v(i.carouselContents)}}function At(r,l){if(r&1&&(e(0,"button"),n(1),t()),r&2){let i=l.$implicit;d(),k(i+1)}}var b=(()=>{class r{set isActive(i){this._active=i,this.isActive?this.renderer.addClass(this.el,"slick-active"):this.renderer.removeClass(this.el,"slick-active")}get isActive(){return this._active}constructor(i,o){this.renderer=o,this._active=!1,this.el=i.nativeElement}static{this.\u0275fac=function(o){return new(o||r)(D(De),D(Te))}}static{this.\u0275dir=Je({type:r,selectors:[["","nz-carousel-content",""]],hostAttrs:[1,"slick-slide"],exportAs:["nzCarouselContent"]})}}return r})(),M=class{get maxIndex(){return this.length-1}get firstEl(){return this.contents[0].el}get lastEl(){return this.contents[this.maxIndex].el}constructor(l,i,o,s,m){this.cdr=i,this.renderer=o,this.platform=s,this.options=m,this.carouselComponent=l}withCarouselContents(l){let i=this.carouselComponent;if(this.slickListEl=i.slickListEl,this.slickTrackEl=i.slickTrackEl,this.contents=l?.toArray()||[],this.length=this.contents.length,this.platform.isBrowser){let o=i.el.getBoundingClientRect();this.unitWidth=o.width,this.unitHeight=o.height}else l?.forEach((o,s)=>{s===0?this.renderer.setStyle(o.el,"width","100%"):this.renderer.setStyle(o.el,"display","none")})}dragging(l){}dispose(){}getFromToInBoundary(l,i){let o=this.maxIndex+1;return{from:(l+o)%o,to:(i+o)%o}}},Ne=class extends M{withCarouselContents(l){super.withCarouselContents(l),this.contents&&(this.slickTrackEl.style.width=`${this.length*this.unitWidth}px`,this.contents.forEach((i,o)=>{this.renderer.setStyle(i.el,"opacity",this.carouselComponent.activeIndex===o?"1":"0"),this.renderer.setStyle(i.el,"position","relative"),this.renderer.setStyle(i.el,"width",`${this.unitWidth}px`),this.renderer.setStyle(i.el,"left",`${-this.unitWidth*o}px`),this.renderer.setStyle(i.el,"transition",["opacity 500ms ease 0s","visibility 500ms ease 0s"])}))}switch(l,i){let{to:o}=this.getFromToInBoundary(l,i),s=new L;return this.contents.forEach((m,f)=>{this.renderer.setStyle(m.el,"opacity",o===f?"1":"0")}),setTimeout(()=>{s.next(),s.complete()},this.carouselComponent.nzTransitionSpeed),s}dispose(){this.contents.forEach(l=>{this.renderer.setStyle(l.el,"transition",null),this.renderer.setStyle(l.el,"opacity",null),this.renderer.setStyle(l.el,"width",null),this.renderer.setStyle(l.el,"left",null)}),super.dispose()}},Ae=class extends M{get vertical(){return this.carouselComponent.vertical}constructor(l,i,o,s,m){super(l,i,o,s,m),this.isDragging=!1,this.isTransitioning=!1}dispose(){super.dispose(),this.renderer.setStyle(this.slickTrackEl,"transform",null)}withCarouselContents(l){super.withCarouselContents(l);let o=this.carouselComponent.activeIndex;this.platform.isBrowser&&this.contents.length&&(this.renderer.setStyle(this.slickListEl,"height",`${this.unitHeight}px`),this.vertical?(this.renderer.setStyle(this.slickTrackEl,"width",`${this.unitWidth}px`),this.renderer.setStyle(this.slickTrackEl,"height",`${this.length*this.unitHeight}px`),this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(0, ${-o*this.unitHeight}px, 0)`)):(this.renderer.setStyle(this.slickTrackEl,"height",`${this.unitHeight}px`),this.renderer.setStyle(this.slickTrackEl,"width",`${this.length*this.unitWidth}px`),this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(${-o*this.unitWidth}px, 0, 0)`)),this.contents.forEach(s=>{this.renderer.setStyle(s.el,"position","relative"),this.renderer.setStyle(s.el,"width",`${this.unitWidth}px`),this.renderer.setStyle(s.el,"height",`${this.unitHeight}px`)}))}switch(l,i){let{to:o}=this.getFromToInBoundary(l,i),s=new L;return this.renderer.setStyle(this.slickTrackEl,"transition",`transform ${this.carouselComponent.nzTransitionSpeed}ms ease`),this.vertical?this.verticalTransform(l,i):this.horizontalTransform(l,i),this.isTransitioning=!0,this.isDragging=!1,setTimeout(()=>{this.renderer.setStyle(this.slickTrackEl,"transition",null),this.contents.forEach(m=>{this.renderer.setStyle(m.el,this.vertical?"top":"left",null)}),this.vertical?this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(0, ${-o*this.unitHeight}px, 0)`):this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(${-o*this.unitWidth}px, 0, 0)`),this.isTransitioning=!1,s.next(),s.complete()},this.carouselComponent.nzTransitionSpeed),s.asObservable()}dragging(l){if(this.isTransitioning)return;let i=this.carouselComponent.activeIndex;this.carouselComponent.vertical?(!this.isDragging&&this.length>2&&(i===this.maxIndex?this.prepareVerticalContext(!0):i===0&&this.prepareVerticalContext(!1)),this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(0, ${-i*this.unitHeight+l.x}px, 0)`)):(!this.isDragging&&this.length>2&&(i===this.maxIndex?this.prepareHorizontalContext(!0):i===0&&this.prepareHorizontalContext(!1)),this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(${-i*this.unitWidth+l.x}px, 0, 0)`)),this.isDragging=!0}verticalTransform(l,i){let{from:o,to:s}=this.getFromToInBoundary(l,i);this.length>2&&i!==s?(this.prepareVerticalContext(s<o),this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(0, ${-i*this.unitHeight}px, 0)`)):this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(0, ${-s*this.unitHeight}px, 0`)}horizontalTransform(l,i){let{from:o,to:s}=this.getFromToInBoundary(l,i);this.length>2&&i!==s?(this.prepareHorizontalContext(s<o),this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(${-i*this.unitWidth}px, 0, 0)`)):this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(${-s*this.unitWidth}px, 0, 0`)}prepareVerticalContext(l){l?(this.renderer.setStyle(this.firstEl,"top",`${this.length*this.unitHeight}px`),this.renderer.setStyle(this.lastEl,"top",null)):(this.renderer.setStyle(this.firstEl,"top",null),this.renderer.setStyle(this.lastEl,"top",`${-this.unitHeight*this.length}px`))}prepareHorizontalContext(l){l?(this.renderer.setStyle(this.firstEl,"left",`${this.length*this.unitWidth}px`),this.renderer.setStyle(this.lastEl,"left",null)):(this.renderer.setStyle(this.firstEl,"left",null),this.renderer.setStyle(this.lastEl,"left",`${-this.unitWidth*this.length}px`))}},Ie=new Ue("nz-carousel-custom-strategies"),Ft="carousel",T=(()=>{let r=[],l,i=[],o=[],s,m=[],f=[],G,W=[],Be=[],Pe,He=[],Oe=[],Re,Le=[],Me=[],$e,Ge=[],We=[],je;return class Fe{static{let c=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;l=[I()],s=[I()],G=[I()],Pe=[I()],Re=[I()],$e=[I()],je=[I()],N(this,null,je,{kind:"setter",name:"nzDotPosition",static:!1,private:!1,access:{has:a=>"nzDotPosition"in a,set:(a,h)=>{a.nzDotPosition=h}},metadata:c},null,r),N(null,null,l,{kind:"field",name:"nzEffect",static:!1,private:!1,access:{has:a=>"nzEffect"in a,get:a=>a.nzEffect,set:(a,h)=>{a.nzEffect=h}},metadata:c},i,o),N(null,null,s,{kind:"field",name:"nzEnableSwipe",static:!1,private:!1,access:{has:a=>"nzEnableSwipe"in a,get:a=>a.nzEnableSwipe,set:(a,h)=>{a.nzEnableSwipe=h}},metadata:c},m,f),N(null,null,G,{kind:"field",name:"nzDots",static:!1,private:!1,access:{has:a=>"nzDots"in a,get:a=>a.nzDots,set:(a,h)=>{a.nzDots=h}},metadata:c},W,Be),N(null,null,Pe,{kind:"field",name:"nzAutoPlay",static:!1,private:!1,access:{has:a=>"nzAutoPlay"in a,get:a=>a.nzAutoPlay,set:(a,h)=>{a.nzAutoPlay=h}},metadata:c},He,Oe),N(null,null,Re,{kind:"field",name:"nzAutoPlaySpeed",static:!1,private:!1,access:{has:a=>"nzAutoPlaySpeed"in a,get:a=>a.nzAutoPlaySpeed,set:(a,h)=>{a.nzAutoPlaySpeed=h}},metadata:c},Le,Me),N(null,null,$e,{kind:"field",name:"nzLoop",static:!1,private:!1,access:{has:a=>"nzLoop"in a,get:a=>a.nzLoop,set:(a,h)=>{a.nzLoop=h}},metadata:c},Ge,We),c&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:c})}set nzDotPosition(c){this._dotPosition=c,c==="left"||c==="right"?this.vertical=!0:this.vertical=!1}get nzDotPosition(){return this._dotPosition}constructor(c,a,h,S,O,j,St,Ct,xt){this.nzConfigService=(C(this,r),a),this.ngZone=h,this.renderer=S,this.cdr=O,this.platform=j,this.resizeService=St,this.nzDragService=Ct,this.nzResizeObserver=xt,this._nzModuleName=Ft,this.nzEffect=C(this,i,"scrollx"),this.nzEnableSwipe=(C(this,o),C(this,m,!0)),this.nzDots=(C(this,f),C(this,W,!0)),this.nzAutoPlay=(C(this,Be),C(this,He,!1)),this.nzAutoPlaySpeed=(C(this,Oe),C(this,Le,3e3)),this.nzTransitionSpeed=(C(this,Me),500),this.nzLoop=C(this,Ge,!0),this.nzStrategyOptions=(C(this,We),void 0),this._dotPosition="bottom",this.nzBeforeChange=new be,this.nzAfterChange=new be,this.activeIndex=0,this.vertical=!1,this.dir="ltr",this.destroy$=new L,this.gestureRect=null,this.pointerDelta=null,this.isTransiting=!1,this.isDragging=!1,this.directionality=ke(ht),this.customStrategies=ke(Ie,{optional:!0}),this.pointerDown=yt=>{!this.isDragging&&!this.isTransiting&&this.nzEnableSwipe&&(this.clearScheduledTransition(),this.gestureRect=this.slickListEl.getBoundingClientRect(),this.nzDragService.requestDraggingSequence(yt).subscribe(R=>{this.pointerDelta=R,this.isDragging=!0,this.strategy?.dragging(this.pointerDelta)},()=>{},()=>{if(this.nzEnableSwipe&&this.isDragging){let R=this.pointerDelta?this.pointerDelta.x:0;Math.abs(R)>this.gestureRect.width/3&&(this.nzLoop||R<=0&&this.activeIndex+1<this.carouselContents.length||R>0&&this.activeIndex>0)?this.goTo(R>0?this.activeIndex-1:this.activeIndex+1):this.goTo(this.activeIndex),this.gestureRect=null,this.pointerDelta=null}this.isDragging=!1}))},this.nzDotPosition="bottom",this.el=c.nativeElement}ngOnInit(){this.slickListEl=this.slickList.nativeElement,this.slickTrackEl=this.slickTrack.nativeElement,this.dir=this.directionality.value,this.directionality.change.pipe(Z(this.destroy$)).subscribe(c=>{this.dir=c,this.markContentActive(this.activeIndex),this.cdr.detectChanges()}),mt(this.slickListEl,"keydown").pipe(Z(this.destroy$)).subscribe(c=>{let{keyCode:a}=c;a!==37&&a!==39||(c.preventDefault(),this.ngZone.run(()=>{a===37?this.pre():this.next(),this.cdr.markForCheck()}))}),this.nzResizeObserver.observe(this.el).pipe(Ze(100),Ve(),Z(this.destroy$)).subscribe(()=>{this.layout()})}ngAfterContentInit(){this.markContentActive(0)}ngAfterViewInit(){this.carouselContents.changes.subscribe(()=>{this.markContentActive(0),this.layout()}),this.resizeService.subscribe().pipe(Z(this.destroy$)).subscribe(()=>{this.layout()}),this.switchStrategy(),this.markContentActive(0),this.layout(),Promise.resolve().then(()=>{this.layout()})}ngOnChanges(c){let{nzEffect:a,nzDotPosition:h}=c;a&&!a.isFirstChange()&&(this.switchStrategy(),this.markContentActive(0),this.layout()),h&&!h.isFirstChange()&&(this.switchStrategy(),this.markContentActive(0),this.layout()),!this.nzAutoPlay||!this.nzAutoPlaySpeed?this.clearScheduledTransition():this.scheduleNextTransition()}ngOnDestroy(){this.clearScheduledTransition(),this.strategy&&this.strategy.dispose(),this.destroy$.next(),this.destroy$.complete()}next(){this.goTo(this.activeIndex+1)}pre(){this.goTo(this.activeIndex-1)}goTo(c){if(this.carouselContents&&this.carouselContents.length&&!this.isTransiting&&(this.nzLoop||c>=0&&c<this.carouselContents.length)){let a=this.carouselContents.length,h=this.activeIndex,S=(c+a)%a;this.isTransiting=!0,this.nzBeforeChange.emit({from:h,to:S}),this.strategy.switch(this.activeIndex,c).subscribe(()=>{this.scheduleNextTransition(),this.nzAfterChange.emit(S),this.isTransiting=!1}),this.markContentActive(S),this.cdr.markForCheck()}}switchStrategy(){this.strategy&&this.strategy.dispose();let c=this.customStrategies?this.customStrategies.find(a=>a.name===this.nzEffect):null;if(c){this.strategy=new c.strategy(this,this.cdr,this.renderer,this.platform);return}this.strategy=this.nzEffect==="scrollx"?new Ae(this,this.cdr,this.renderer,this.platform):new Ne(this,this.cdr,this.renderer,this.platform)}scheduleNextTransition(){this.clearScheduledTransition(),this.nzAutoPlay&&this.nzAutoPlaySpeed>0&&this.platform.isBrowser&&(this.transitionInProgress=setTimeout(()=>{this.goTo(this.activeIndex+1)},this.nzAutoPlaySpeed))}clearScheduledTransition(){this.transitionInProgress&&(clearTimeout(this.transitionInProgress),this.transitionInProgress=void 0)}markContentActive(c){this.activeIndex=c,this.carouselContents&&this.carouselContents.forEach((a,h)=>{a.isActive=c===h}),this.cdr.markForCheck()}layout(){this.strategy&&this.strategy.withCarouselContents(this.carouselContents)}static{this.\u0275fac=function(a){return new(a||Fe)(D(De),D(ut),D(Xe),D(Te),D(at),D(ct),D(pt),D(ft),D(zt))}}static{this.\u0275cmp=E({type:Fe,selectors:[["nz-carousel"]],contentQueries:function(a,h,S){if(a&1&&it(S,b,4),a&2){let O;A(O=F())&&(h.carouselContents=O)}},viewQuery:function(a,h){if(a&1&&(H(kt,7),H(bt,7)),a&2){let S;A(S=F())&&(h.slickList=S.first),A(S=F())&&(h.slickTrack=S.first)}},hostAttrs:[1,"ant-carousel"],hostVars:4,hostBindings:function(a,h){a&2&&V("ant-carousel-vertical",h.vertical)("ant-carousel-rtl",h.dir==="rtl")},inputs:{nzDotRender:"nzDotRender",nzEffect:"nzEffect",nzEnableSwipe:[2,"nzEnableSwipe","nzEnableSwipe",ee],nzDots:[2,"nzDots","nzDots",ee],nzAutoPlay:[2,"nzAutoPlay","nzAutoPlay",ee],nzAutoPlaySpeed:[2,"nzAutoPlaySpeed","nzAutoPlaySpeed",we],nzTransitionSpeed:[2,"nzTransitionSpeed","nzTransitionSpeed",we],nzLoop:"nzLoop",nzStrategyOptions:"nzStrategyOptions",nzDotPosition:"nzDotPosition"},outputs:{nzBeforeChange:"nzBeforeChange",nzAfterChange:"nzAfterChange"},exportAs:["nzCarousel"],features:[Ke,qe],ngContentSelectors:Dt,decls:9,vars:4,consts:[["slickList",""],["slickTrack",""],["renderDotTemplate",""],[1,"slick-initialized","slick-slider",3,"dir"],["tabindex","-1",1,"slick-list",3,"mousedown","touchstart"],[1,"slick-track"],[1,"slick-dots",3,"slick-dots-top","slick-dots-bottom","slick-dots-left","slick-dots-right"],[1,"slick-dots"],[3,"slick-active"],[3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(a,h){if(a&1){let S=_e();tt(),e(0,"div",3)(1,"div",4,0),w("mousedown",function(j){return Q(S),U(h.pointerDown(j))})("touchstart",function(j){return Q(S),U(h.pointerDown(j))}),e(3,"div",5,1),nt(5),t()(),q(6,Nt,3,8,"ul",6),t(),q(7,At,2,1,"ng-template",null,2,lt)}a&2&&(V("slick-vertical",h.nzDotPosition==="left"||h.nzDotPosition==="right"),u("dir","ltr"),d(6),et(h.nzDots?6:-1))},dependencies:[dt],encapsulation:2,changeDetection:0})}}})(),_=(()=>{class r{static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275mod=Ye({type:r})}static{this.\u0275inj=Qe({})}}return r})(),fe=class extends M{get vertical(){return this.carouselComponent.vertical}constructor(l,i,o,s,m){super(l,i,o,s,m),this.isTransitioning=!1}dispose(){this.renderer.setStyle(this.slickTrackEl,"transform",null),super.dispose()}withCarouselContents(l){super.withCarouselContents(l);let o=this.carouselComponent.activeIndex;this.platform.isBrowser&&this.contents.length&&(this.renderer.setStyle(this.slickListEl,"height",`${this.unitHeight}px`),this.platform.isBrowser&&this.contents.length&&(this.renderer.setStyle(this.slickListEl,"height",`${this.unitHeight}px`),this.vertical?(this.renderer.setStyle(this.slickTrackEl,"width",`${this.unitWidth}px`),this.renderer.setStyle(this.slickTrackEl,"height",`${this.length*this.unitHeight}px`),this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(0, ${-o*this.unitHeight}px, 0)`)):(this.renderer.setStyle(this.slickTrackEl,"height",`${this.unitHeight}px`),this.renderer.setStyle(this.slickTrackEl,"width",`${this.length*this.unitWidth}px`),this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(${-o*this.unitWidth}px, 0, 0)`)),this.contents.forEach(s=>{this.renderer.setStyle(s.el,"position","relative"),this.renderer.setStyle(s.el,"width",`${this.unitWidth}px`),this.renderer.setStyle(s.el,"height",`${this.unitHeight}px`)})))}switch(l,i){let o=(i+this.length)%this.length,s=this.carouselComponent.nzTransitionSpeed,m=new L;return this.renderer.setStyle(this.slickTrackEl,"transition",`transform ${s}ms ease`),this.vertical?this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(0, ${-o*this.unitHeight}px, 0)`):this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(${-o*this.unitWidth}px, 0, 0)`),this.isTransitioning=!0,setTimeout(()=>{this.isTransitioning=!1,m.next(),m.complete()},s),m.asObservable()}dragging(l){if(this.isTransitioning)return;let i=this.carouselComponent.activeIndex;this.vertical?this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(0, ${-i*this.unitHeight+l.x}px, 0)`):this.renderer.setStyle(this.slickTrackEl,"transform",`translate3d(${-i*this.unitWidth+l.x}px, 0, 0)`)}},ze=class extends M{withCarouselContents(l){if(super.withCarouselContents(l),this.contents){this.renderer.setStyle(this.slickListEl,"width",`${this.unitWidth}px`),this.renderer.setStyle(this.slickTrackEl,"width",`${this.length*this.unitWidth}px`),this.contents.forEach((o,s)=>{let m=this.carouselComponent.activeIndex===s;this.renderer.setStyle(o.el,"transform",m?"rotateY(0deg)":"rotateY(180deg)"),this.renderer.setStyle(o.el,"position","relative"),this.renderer.setStyle(o.el,"width",`${this.unitWidth}px`),this.renderer.setStyle(o.el,"left",`${-this.unitWidth*s}px`),this.renderer.setStyle(o.el,"transform-style","preserve-3d"),this.renderer.setStyle(o.el,"backface-visibility","hidden")});let{carouselComponent:i}=this;i.ngZone.runOutsideAngular(()=>{ve(i.nzTransitionSpeed).subscribe(()=>{this.contents.forEach(o=>this.renderer.setStyle(o.el,"transition",["transform 500ms ease 0s"]))})})}}switch(l,i){let{from:o,to:s}=this.getFromToInBoundary(l,i),m=new L,f=this.carouselComponent.nzTransitionSpeed;return ve(f).subscribe(()=>{m.next(),m.complete()}),l===i?m:(this.contents.forEach((G,W)=>{W===o?this.renderer.setStyle(G.el,"transform","rotateY(180deg)"):W===s&&this.renderer.setStyle(G.el,"transform","rotateY(0deg)")}),m.asObservable())}dispose(){this.contents.forEach(l=>{this.renderer.setStyle(l.el,"transition",null),this.renderer.setStyle(l.el,"transform",null),this.renderer.setStyle(l.el,"width",null),this.renderer.setStyle(l.el,"left",null),this.renderer.setStyle(l.el,"transform-style",null),this.renderer.setStyle(l.el,"backface-visibility",null)}),super.dispose()}};function It(r,l){if(r&1&&(e(0,"div",1)(1,"h3"),n(2),t()()),r&2){let i=l.$implicit;d(2),k(i)}}var ge=(()=>{class r{constructor(){this.array=[1,2,3,4]}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=E({type:r,selectors:[["nz-demo-carousel-autoplay"]],decls:3,vars:0,consts:[["nzAutoPlay",""],["nz-carousel-content",""]],template:function(o,s){o&1&&(e(0,"nz-carousel",0),y(1,It,3,1,"div",1,x),t()),o&2&&(d(),v(s.array))},dependencies:[_,T,b],styles:["[nz-carousel-content][_ngcontent-%COMP%]{text-align:center;height:160px;line-height:160px;background:#364d79;color:#fff;overflow:hidden}h3[_ngcontent-%COMP%]{color:#fff;margin-bottom:0;-webkit-user-select:none;user-select:none}"]})}}return r})();function Bt(r,l){if(r&1&&(e(0,"div",1)(1,"h3"),n(2),t()()),r&2){let i=l.$implicit;d(2),k(i)}}var Ee=(()=>{class r{constructor(){this.array=[1,2,3,4],this.effect="scrollx"}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=E({type:r,selectors:[["nz-demo-carousel-basic"]],decls:3,vars:1,consts:[[3,"nzEffect"],["nz-carousel-content",""]],template:function(o,s){o&1&&(e(0,"nz-carousel",0),y(1,Bt,3,1,"div",1,x),t()),o&2&&(u("nzEffect",s.effect),d(),v(s.array))},dependencies:[_,T,b],styles:["[nz-carousel-content][_ngcontent-%COMP%]{text-align:center;height:160px;line-height:160px;background:#364d79;color:#fff;overflow:hidden}h3[_ngcontent-%COMP%]{color:#fff;margin-bottom:0;-webkit-user-select:none;user-select:none}"]})}}return r})();function Ot(r,l){if(r&1&&(e(0,"div",5)(1,"h3"),n(2),t()()),r&2){let i=l.$implicit;d(2),k(i)}}var Se=(()=>{class r{constructor(){this.strategy="transform-no-loop",this.array=[1,2,3,4]}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=E({type:r,selectors:[["nz-demo-carousel-custom"]],features:[rt([{provide:Ie,useValue:[{name:"transform-no-loop",strategy:fe},{name:"flip",strategy:ze}]}])],decls:10,vars:2,consts:[[3,"ngModelChange","ngModel"],["nz-radio-button","","nzValue","transform-no-loop"],["nz-radio-button","","nzValue","flip"],["nz-radio-button","","nzValue","fade"],[3,"nzEffect"],["nz-carousel-content",""]],template:function(o,s){o&1&&(e(0,"nz-radio-group",0),K("ngModelChange",function(f){return J(s.strategy,f)||(s.strategy=f),f}),e(1,"label",1),n(2,"Transform No Loop"),t(),e(3,"label",2),n(4,"Flip"),t(),e(5,"label",3),n(6,"Fade (built-in)"),t()(),e(7,"nz-carousel",4),y(8,Ot,3,1,"div",5,x),t()),o&2&&(Y("ngModel",s.strategy),d(7),u("nzEffect",s.strategy),d(),v(s.array))},dependencies:[re,ie,oe,_,T,b,pe,he,ue],styles:["nz-radio-group[_ngcontent-%COMP%]{margin-bottom:8px}[nz-carousel-content][_ngcontent-%COMP%]{text-align:center;height:160px;line-height:160px;background:#364d79;color:#fff;overflow:hidden}h3[_ngcontent-%COMP%]{color:#fff;margin-bottom:0;-webkit-user-select:none;user-select:none}"]})}}return r})();function Rt(r,l){if(r&1&&(e(0,"div",1)(1,"h3"),n(2),t()()),r&2){let i=l.$implicit;d(2),k(i)}}var Ce=(()=>{class r{constructor(){this.array=[1,2,3,4]}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=E({type:r,selectors:[["nz-demo-carousel-fade"]],decls:3,vars:1,consts:[[3,"nzEffect"],["nz-carousel-content",""]],template:function(o,s){o&1&&(e(0,"nz-carousel",0),y(1,Rt,3,1,"div",1,x),t()),o&2&&(u("nzEffect","fade"),d(),v(s.array))},dependencies:[_,T,b],styles:["[nz-carousel-content][_ngcontent-%COMP%]{text-align:center;height:160px;line-height:160px;background:#364d79;color:#fff;overflow:hidden}h3[_ngcontent-%COMP%]{color:#fff;margin-bottom:0;-webkit-user-select:none;user-select:none}"]})}}return r})();function Lt(r,l){if(r&1&&(e(0,"div",1)(1,"h3"),n(2),t()()),r&2){let i=l.$implicit;d(2),k(i)}}var xe=(()=>{class r{constructor(){this.array=[1,2,3,4],this.effect="scrollx"}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=E({type:r,selectors:[["nz-demo-carousel-loop"]],decls:3,vars:2,consts:[["nzAutoPlay","",3,"nzEffect","nzLoop"],["nz-carousel-content",""]],template:function(o,s){o&1&&(e(0,"nz-carousel",0),y(1,Lt,3,1,"div",1,x),t()),o&2&&(u("nzEffect",s.effect)("nzLoop",!1),d(),v(s.array))},dependencies:[_,T,b],styles:["[nz-carousel-content][_ngcontent-%COMP%]{text-align:center;height:160px;line-height:160px;background:#364d79;color:#fff;overflow:hidden}h3[_ngcontent-%COMP%]{color:#fff;margin-bottom:0;-webkit-user-select:none;user-select:none}"]})}}return r})();function Mt(r,l){if(r&1&&(e(0,"div",6)(1,"h3"),n(2),t()()),r&2){let i=l.$implicit;d(2),k(i)}}var ye=(()=>{class r{constructor(){this.array=[1,2,3,4],this.dotPosition="bottom"}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=E({type:r,selectors:[["nz-demo-carousel-position"]],decls:12,vars:2,consts:[[3,"ngModelChange","ngModel"],["nz-radio-button","","nzValue","bottom"],["nz-radio-button","","nzValue","top"],["nz-radio-button","","nzValue","left"],["nz-radio-button","","nzValue","right"],[3,"nzDotPosition"],["nz-carousel-content",""]],template:function(o,s){o&1&&(e(0,"nz-radio-group",0),K("ngModelChange",function(f){return J(s.dotPosition,f)||(s.dotPosition=f),f}),e(1,"label",1),n(2,"Bottom"),t(),e(3,"label",2),n(4,"Top"),t(),e(5,"label",3),n(6,"Left"),t(),e(7,"label",4),n(8,"Right"),t()(),e(9,"nz-carousel",5),y(10,Mt,3,1,"div",6,x),t()),o&2&&(Y("ngModel",s.dotPosition),d(9),u("nzDotPosition",s.dotPosition),d(),v(s.array))},dependencies:[re,ie,oe,_,T,b,pe,he,ue],styles:["nz-radio-group[_ngcontent-%COMP%]{margin-bottom:8px}[nz-carousel-content][_ngcontent-%COMP%]{text-align:center;height:160px;line-height:160px;background:#364d79;color:#fff;overflow:hidden}h3[_ngcontent-%COMP%]{color:#fff;margin-bottom:0;-webkit-user-select:none;user-select:none}"]})}}return r})();var gt=(()=>{class r{constructor(){this.expanded=!1}goLink(i){window&&(window.location.hash=i)}expandAllCode(){this.expanded=!this.expanded,this.codeBoxes.forEach(i=>i.expandCode(this.expanded))}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=E({type:r,selectors:[["nz-demo-carousel"]],viewQuery:function(o,s){if(o&1&&H(B,5),o&2){let m;A(m=F())&&(s.codeBoxes=m)}},decls:334,vars:31,consts:[[1,"toc-affix",3,"nzOffsetTop"],["nzShowInkInFixed","",3,"nzClick","nzAffix"],["nzHref","#components-carousel-demo-basic","nzTitle","\u57FA\u672C"],["nzHref","#components-carousel-demo-position","nzTitle","\u4F4D\u7F6E"],["nzHref","#components-carousel-demo-fade","nzTitle","\u6E10\u663E"],["nzHref","#components-carousel-demo-autoplay","nzTitle","\u81EA\u52A8\u5207\u6362"],["nzHref","#components-carousel-demo-custom","nzTitle","\u81EA\u5B9A\u4E49\u5207\u6362\u6548\u679C"],["nzHref","#components-carousel-demo-loop","nzTitle","\u5FAA\u73AF"],["nzHref","#api","nzTitle","API"],[1,"markdown"],[1,"subtitle"],[1,"widget"],["aria-label","Edit this page on Github","href","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/doc/index.zh-CN.md","target","_blank","rel","noopener noreferrer",1,"edit-button"],["nzType","edit"],["id","\u4F55\u65F6\u4F7F\u7528"],["onclick","window.location.hash = '\u4F55\u65F6\u4F7F\u7528'",1,"anchor"],[1,"language-ts"],[1,"token","keyword"],[1,"token","punctuation"],[1,"token","string"],["nz-icon","","nzType","appstore","nz-tooltip","","nzTooltipTitle","\u5C55\u5F00\u5168\u90E8\u4EE3\u7801",1,"code-box-expand-trigger",3,"click"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzXl","nzSpan"],["nzTitle","\u57FA\u672C","nzSelector","nz-demo-carousel-basic","nzGenerateCommand","ng g ng-zorro-antd:carousel-basic <name>","nzComponentName","NzDemoCarouselBasicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["demo",""],["intro",""],["nzTitle","\u6E10\u663E","nzSelector","nz-demo-carousel-fade","nzGenerateCommand","ng g ng-zorro-antd:carousel-fade <name>","nzComponentName","NzDemoCarouselFadeComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u81EA\u5B9A\u4E49\u5207\u6362\u6548\u679C","nzSelector","nz-demo-carousel-custom","nzGenerateCommand","ng g ng-zorro-antd:carousel-custom <name>","nzComponentName","NzDemoCarouselCustomComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u4F4D\u7F6E","nzSelector","nz-demo-carousel-position","nzGenerateCommand","ng g ng-zorro-antd:carousel-position <name>","nzComponentName","NzDemoCarouselPositionComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u81EA\u52A8\u5207\u6362","nzSelector","nz-demo-carousel-autoplay","nzGenerateCommand","ng g ng-zorro-antd:carousel-autoplay <name>","nzComponentName","NzDemoCarouselAutoplayComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","\u5FAA\u73AF","nzSelector","nz-demo-carousel-loop","nzGenerateCommand","ng g ng-zorro-antd:carousel-loop <name>","nzComponentName","NzDemoCarouselLoopComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],[1,"markdown","api-container"],["id","api"],["onclick","window.location.hash = 'api'",1,"anchor"],["id","nz-carousel"],[1,"api-type-label","component"],["onclick","window.location.hash = 'nz-carousel'",1,"anchor"],["id","\u65B9\u6CD5"],["onclick","window.location.hash = '\u65B9\u6CD5'",1,"anchor"],["id","injectiontoken"],["onclick","window.location.hash = 'injectiontoken'",1,"anchor"],["id","\u81EA\u5B9A\u4E49\u5207\u6362\u6548\u679C"],["onclick","window.location.hash = '\u81EA\u5B9A\u4E49\u5207\u6362\u6548\u679C'",1,"anchor"]],template:function(o,s){o&1&&(e(0,"article")(1,"nz-affix",0)(2,"nz-anchor",1),w("nzClick",function(f){return s.goLink(f)}),p(3,"nz-link",2)(4,"nz-link",3)(5,"nz-link",4)(6,"nz-link",5)(7,"nz-link",6)(8,"nz-link",7)(9,"nz-link",8),t()(),e(10,"section",9)(11,"h1"),n(12,"Carousel"),e(13,"span",10),n(14,"\u8D70\u9A6C\u706F"),t(),p(15,"span",11),e(16,"a",12),p(17,"nz-icon",13),t()(),e(18,"section",9),g(),e(19,"p"),n(20,"\u65CB\u8F6C\u6728\u9A6C\uFF0C\u4E00\u7EC4\u8F6E\u64AD\u7684\u533A\u57DF\u3002"),t(),e(21,"h2",14)(22,"span"),n(23,"\u4F55\u65F6\u4F7F\u7528"),t(),e(24,"a",15),n(25,"#"),t()(),e(26,"ul")(27,"li"),n(28,"\u5F53\u6709\u4E00\u7EC4\u5E73\u7EA7\u7684\u5185\u5BB9\u3002"),t(),e(29,"li"),n(30,"\u5F53\u5185\u5BB9\u7A7A\u95F4\u4E0D\u8DB3\u65F6\uFF0C\u53EF\u4EE5\u7528\u8D70\u9A6C\u706F\u7684\u5F62\u5F0F\u8FDB\u884C\u6536\u7EB3\uFF0C\u8FDB\u884C\u8F6E\u64AD\u5C55\u73B0\u3002"),t(),e(31,"li"),n(32,"\u5E38\u7528\u4E8E\u4E00\u7EC4\u56FE\u7247\u6216\u5361\u7247\u8F6E\u64AD\u3002"),t()(),e(33,"pre",16)(34,"code")(35,"span",17),n(36,"import"),t(),n(37," "),e(38,"span",18),n(39,"{"),t(),n(40," NzCarouselModule "),e(41,"span",18),n(42,"}"),t(),n(43," "),e(44,"span",17),n(45,"from"),t(),n(46," "),e(47,"span",19),n(48,"'ng-zorro-antd/carousel'"),t(),e(49,"span",18),n(50,";"),t()()(),z(),t(),e(51,"h2")(52,"span"),n(53,"\u4EE3\u7801\u6F14\u793A"),t(),e(54,"span",20),w("click",function(){return s.expandAllCode()}),t()()(),e(55,"div",21)(56,"div",22)(57,"nz-code-box",23),p(58,"nz-demo-carousel-basic",24),e(59,"div",25),g(),e(60,"p"),n(61,"\u6700\u7B80\u5355\u7684\u7528\u6CD5\u3002"),t(),z(),t()(),e(62,"nz-code-box",26),p(63,"nz-demo-carousel-fade",24),e(64,"div",25),g(),e(65,"p"),n(66,"\u5207\u6362\u6548\u679C\u4E3A\u6E10\u663E\u3002"),t(),z(),t()(),e(67,"nz-code-box",27),p(68,"nz-demo-carousel-custom",24),e(69,"div",25),g(),e(70,"p"),n(71,"\u901A\u8FC7\u7EE7\u627F "),e(72,"code"),n(73,"NzCarouselBaseStrategy"),t(),n(74," \u81EA\u5B9A\u4E49\u8F6E\u64AD\u56FE\u5207\u6362\u52A8\u753B\u3002"),t(),z(),t()()(),e(75,"div",22)(76,"nz-code-box",28),p(77,"nz-demo-carousel-position",24),e(78,"div",25),g(),e(79,"p"),n(80,"\u4F4D\u7F6E\u6709 4 \u4E2A\u65B9\u5411\u3002"),t(),z(),t()(),e(81,"nz-code-box",29),p(82,"nz-demo-carousel-autoplay",24),e(83,"div",25),g(),e(84,"p"),n(85,"\u5B9A\u65F6\u5207\u6362\u4E0B\u4E00\u5F20\u3002"),t(),z(),t()(),e(86,"nz-code-box",30),p(87,"nz-demo-carousel-loop",24),e(88,"div",25),g(),e(89,"p"),n(90,"\u9632\u6B62\u8F6E\u64AD\u8FDB\u5165\u5FAA\u73AF"),t(),z(),t()()()(),e(91,"section",31),g(),e(92,"h2",32)(93,"span"),n(94,"API"),t(),e(95,"a",33),n(96,"#"),t()(),e(97,"h3",34)(98,"span"),n(99,"nz-carousel"),t(),e(100,"label",35),n(101,"component"),t(),e(102,"a",36),n(103,"#"),t()(),e(104,"table")(105,"thead")(106,"tr")(107,"th"),n(108,"\u53C2\u6570"),t(),e(109,"th"),n(110,"\u8BF4\u660E"),t(),e(111,"th"),n(112,"\u7C7B\u578B"),t(),e(113,"th"),n(114,"\u9ED8\u8BA4\u503C"),t(),e(115,"th"),n(116,"\u652F\u6301\u5168\u5C40\u914D\u7F6E"),t()()(),e(117,"tbody")(118,"tr")(119,"td")(120,"code"),n(121,"[nzAutoPlay]"),t()(),e(122,"td"),n(123,"\u662F\u5426\u81EA\u52A8\u5207\u6362"),t(),e(124,"td")(125,"code"),n(126,"boolean"),t()(),e(127,"td")(128,"code"),n(129,"false"),t()(),e(130,"td"),n(131,"\u2705"),t()(),e(132,"tr")(133,"td")(134,"code"),n(135,"[nzAutoPlaySpeed]"),t()(),e(136,"td"),n(137,"\u5207\u6362\u65F6\u95F4(\u6BEB\u79D2)\uFF0C\u5F53\u8BBE\u7F6E\u4E3A 0 \u65F6\u4E0D\u5207\u6362"),t(),e(138,"td")(139,"code"),n(140,"number"),t()(),e(141,"td")(142,"code"),n(143,"3000"),t()(),e(144,"td"),n(145,"\u2705"),t()(),e(146,"tr")(147,"td")(148,"code"),n(149,"[nzDotRender]"),t()(),e(150,"td"),n(151,"Dot \u6E32\u67D3\u6A21\u677F"),t(),e(152,"td")(153,"code"),n(154,"TemplateRef<{ $implicit: number }>"),t()(),e(155,"td"),n(156,"-"),t(),p(157,"td"),t(),e(158,"tr")(159,"td")(160,"code"),n(161,"[nzDotPosition]"),t()(),e(162,"td"),n(163,"\u9762\u677F\u6307\u793A\u70B9\u4F4D\u7F6E\uFF0C\u53EF\u9009 "),e(164,"code"),n(165,"top"),t(),e(166,"code"),n(167,"bottom"),t(),e(168,"code"),n(169,"left"),t(),e(170,"code"),n(171,"right"),t()(),e(172,"td")(173,"code"),n(174,"string"),t()(),e(175,"td")(176,"code"),n(177,"bottom"),t()(),e(178,"td"),n(179,"\u2705"),t()(),e(180,"tr")(181,"td")(182,"code"),n(183,"[nzDots]"),t()(),e(184,"td"),n(185,"\u662F\u5426\u663E\u793A\u9762\u677F\u6307\u793A\u70B9"),t(),e(186,"td")(187,"code"),n(188,"boolean"),t()(),e(189,"td")(190,"code"),n(191,"true"),t()(),e(192,"td"),n(193,"\u2705"),t()(),e(194,"tr")(195,"td")(196,"code"),n(197,"[nzEffect]"),t()(),e(198,"td"),n(199,"\u52A8\u753B\u6548\u679C\u51FD\u6570\uFF0C\u53EF\u53D6 "),e(200,"code"),n(201,"scrollx"),t(),n(202,", "),e(203,"code"),n(204,"fade"),t()(),e(205,"td")(206,"code"),n(207,"'scrollx'|'fade'"),t()(),e(208,"td")(209,"code"),n(210,"'scrollx'"),t()(),e(211,"td"),n(212,"\u2705"),t()(),e(213,"tr")(214,"td")(215,"code"),n(216,"[nzEnableSwipe]"),t()(),e(217,"td"),n(218,"\u662F\u5426\u652F\u6301\u624B\u52BF\u5212\u52A8\u5207\u6362"),t(),e(219,"td")(220,"code"),n(221,"boolean"),t()(),e(222,"td")(223,"code"),n(224,"true"),t()(),e(225,"td"),n(226,"\u2705"),t()(),e(227,"tr")(228,"td")(229,"code"),n(230,"[nzLoop]"),t()(),e(231,"td"),n(232,"\u662F\u5426\u652F\u6301\u5FAA\u73AF"),t(),e(233,"td")(234,"code"),n(235,"boolean"),t()(),e(236,"td")(237,"code"),n(238,"true"),t()(),e(239,"td"),n(240,"\u2705"),t()(),e(241,"tr")(242,"td")(243,"code"),n(244,"(nzAfterChange)"),t()(),e(245,"td"),n(246,"\u5207\u6362\u9762\u677F\u7684\u56DE\u8C03"),t(),e(247,"td")(248,"code"),n(249,"EventEmitter<number>"),t()(),e(250,"td"),n(251,"-"),t(),p(252,"td"),t(),e(253,"tr")(254,"td")(255,"code"),n(256,"(nzBeforeChange)"),t()(),e(257,"td"),n(258,"\u5207\u6362\u9762\u677F\u7684\u56DE\u8C03"),t(),e(259,"td")(260,"code"),n(261,"EventEmitter<{ from: number; to: number }>"),t()(),e(262,"td"),n(263,"-"),t(),p(264,"td"),t()()(),e(265,"h4",37)(266,"span"),n(267,"\u65B9\u6CD5"),t(),e(268,"a",38),n(269,"#"),t()(),e(270,"table")(271,"thead")(272,"tr")(273,"th"),n(274,"\u540D\u79F0"),t(),e(275,"th"),n(276,"\u63CF\u8FF0"),t()()(),e(277,"tbody")(278,"tr")(279,"td")(280,"code"),n(281,"goTo(slideNumber)"),t()(),e(282,"td"),n(283,"\u5207\u6362\u5230\u6307\u5B9A\u9762\u677F"),t()(),e(284,"tr")(285,"td")(286,"code"),n(287,"next()"),t()(),e(288,"td"),n(289,"\u5207\u6362\u5230\u4E0B\u4E00\u9762\u677F"),t()(),e(290,"tr")(291,"td")(292,"code"),n(293,"pre()"),t()(),e(294,"td"),n(295,"\u5207\u6362\u5230\u4E0A\u4E00\u9762\u677F"),t()()()(),e(296,"h3",39)(297,"span"),n(298,"InjectionToken"),t(),e(299,"a",40),n(300,"#"),t()(),e(301,"table")(302,"thead")(303,"tr")(304,"th"),n(305,"Token"),t(),e(306,"th"),n(307,"\u8BF4\u660E"),t(),e(308,"th"),n(309,"\u53C2\u6570"),t(),e(310,"th"),n(311,"\u9ED8\u8BA4\u503C"),t()()(),e(312,"tbody")(313,"tr")(314,"td")(315,"code"),n(316,"NZ_CAROUSEL_CUSTOM_STRATEGIES"),t()(),e(317,"td"),n(318,"\u63D0\u4F9B\u7528\u6237\u81EA\u5B9A\u4E49\u7684\u5207\u6362\u6548\u679C"),t(),e(319,"td")(320,"code"),n(321,"CarouselStrategyRegistryItem[]"),t()(),e(322,"td"),n(323,"-"),t()()()(),e(324,"h3",41)(325,"span"),n(326,"\u81EA\u5B9A\u4E49\u5207\u6362\u6548\u679C"),t(),e(327,"a",42),n(328,"#"),t()(),e(329,"p"),n(330,"\u4F60\u53EF\u4EE5\u63D0\u4F9B\u81EA\u5B9A\u4E49\u7684\u5207\u6362\u6548\u679C\uFF0C\u5207\u6362\u6548\u679C\u5E94\u5F53\u7EE7\u627F "),e(331,"code"),n(332,"NzCarouselBaseStrategy"),t(),n(333," \u7C7B\uFF08\u9ED8\u8BA4\u7684\u4E24\u79CD\u5207\u6362\u6548\u679C\u540C\u6837\u57FA\u4E8E\u8BE5\u7C7B\uFF09\u3002"),t(),z(),t()()),o&2&&(d(),u("nzOffsetTop",16),d(),u("nzAffix",!1),d(53),u("nzGutter",16),d(),u("nzXl",12)("nzSpan",24),d(),u("nzId","components-carousel-demo-basic")("nzLink","components-carousel-demo-basic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/basic.md"),d(5),u("nzId","components-carousel-demo-fade")("nzLink","components-carousel-demo-fade")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/fade.md"),d(5),u("nzId","components-carousel-demo-custom")("nzLink","components-carousel-demo-custom")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/custom.md"),d(8),u("nzXl",12)("nzSpan",24),d(),u("nzId","components-carousel-demo-position")("nzLink","components-carousel-demo-position")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/position.md"),d(5),u("nzId","components-carousel-demo-autoplay")("nzLink","components-carousel-demo-autoplay")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/autoplay.md"),d(5),u("nzId","components-carousel-demo-loop")("nzLink","components-carousel-demo-loop")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/loop.md"))},dependencies:[ce,B,de,me,ae,le,se,ne,te,ge,Ee,Se,Ce,xe,ye],encapsulation:2})}}return r})();var Et=(()=>{class r{constructor(){this.expanded=!1}goLink(i){window&&(window.location.hash=i)}expandAllCode(){this.expanded=!this.expanded,this.codeBoxes.forEach(i=>i.expandCode(this.expanded))}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=E({type:r,selectors:[["nz-demo-carousel"]],viewQuery:function(o,s){if(o&1&&H(B,5),o&2){let m;A(m=F())&&(s.codeBoxes=m)}},decls:328,vars:31,consts:[[1,"toc-affix",3,"nzOffsetTop"],["nzShowInkInFixed","",3,"nzClick","nzAffix"],["nzHref","#components-carousel-demo-basic","nzTitle","Basic"],["nzHref","#components-carousel-demo-position","nzTitle","Position"],["nzHref","#components-carousel-demo-fade","nzTitle","Fade in"],["nzHref","#components-carousel-demo-autoplay","nzTitle","Scroll automatically"],["nzHref","#components-carousel-demo-custom","nzTitle","Custom transition effect"],["nzHref","#components-carousel-demo-loop","nzTitle","Loop"],["nzHref","#api","nzTitle","API"],[1,"markdown"],[1,"subtitle"],[1,"widget"],["aria-label","Edit this page on Github","href","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/doc/index.en-US.md","target","_blank","rel","noopener noreferrer",1,"edit-button"],["nzType","edit"],["id","when-to-use"],["onclick","window.location.hash = 'when-to-use'",1,"anchor"],[1,"language-ts"],[1,"token","keyword"],[1,"token","punctuation"],[1,"token","string"],["nz-icon","","nzType","appstore","nz-tooltip","","nzTooltipTitle","Expand All Code",1,"code-box-expand-trigger",3,"click"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzXl","nzSpan"],["nzTitle","Basic","nzSelector","nz-demo-carousel-basic","nzGenerateCommand","ng g ng-zorro-antd:carousel-basic <name>","nzComponentName","NzDemoCarouselBasicComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["demo",""],["intro",""],["nzTitle","Fade in","nzSelector","nz-demo-carousel-fade","nzGenerateCommand","ng g ng-zorro-antd:carousel-fade <name>","nzComponentName","NzDemoCarouselFadeComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Custom transition effect","nzSelector","nz-demo-carousel-custom","nzGenerateCommand","ng g ng-zorro-antd:carousel-custom <name>","nzComponentName","NzDemoCarouselCustomComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Position","nzSelector","nz-demo-carousel-position","nzGenerateCommand","ng g ng-zorro-antd:carousel-position <name>","nzComponentName","NzDemoCarouselPositionComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Scroll automatically","nzSelector","nz-demo-carousel-autoplay","nzGenerateCommand","ng g ng-zorro-antd:carousel-autoplay <name>","nzComponentName","NzDemoCarouselAutoplayComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],["nzTitle","Loop","nzSelector","nz-demo-carousel-loop","nzGenerateCommand","ng g ng-zorro-antd:carousel-loop <name>","nzComponentName","NzDemoCarouselLoopComponent","nzIframeSource","null",3,"nzId","nzLink","nzIframeHeight","nzHref"],[1,"markdown","api-container"],["id","api"],["onclick","window.location.hash = 'api'",1,"anchor"],["id","nz-carousel"],[1,"api-type-label","component"],["onclick","window.location.hash = 'nz-carousel'",1,"anchor"],["id","methods"],["onclick","window.location.hash = 'methods'",1,"anchor"],["id","injectiontoken"],["onclick","window.location.hash = 'injectiontoken'",1,"anchor"],["id","customizing-transition-effects"],["onclick","window.location.hash = 'customizing-transition-effects'",1,"anchor"]],template:function(o,s){o&1&&(e(0,"article")(1,"nz-affix",0)(2,"nz-anchor",1),w("nzClick",function(f){return s.goLink(f)}),p(3,"nz-link",2)(4,"nz-link",3)(5,"nz-link",4)(6,"nz-link",5)(7,"nz-link",6)(8,"nz-link",7)(9,"nz-link",8),t()(),e(10,"section",9)(11,"h1"),n(12,"Carousel"),p(13,"span",10)(14,"span",11),e(15,"a",12),p(16,"nz-icon",13),t()(),e(17,"section",9),g(),e(18,"p"),n(19,"A carousel component. Scales with its container."),t(),e(20,"h2",14)(21,"span"),n(22,"When To Use"),t(),e(23,"a",15),n(24,"#"),t()(),e(25,"ul")(26,"li"),n(27,"When there is a group of content on the same level."),t(),e(28,"li"),n(29,"When there is insufficient content space, it can be used to save space in the form of a revolving door."),t(),e(30,"li"),n(31,"Commonly used for a group of pictures/cards."),t()(),e(32,"pre",16)(33,"code")(34,"span",17),n(35,"import"),t(),n(36," "),e(37,"span",18),n(38,"{"),t(),n(39," NzCarouselModule "),e(40,"span",18),n(41,"}"),t(),n(42," "),e(43,"span",17),n(44,"from"),t(),n(45," "),e(46,"span",19),n(47,"'ng-zorro-antd/carousel'"),t(),e(48,"span",18),n(49,";"),t()()(),z(),t(),e(50,"h2")(51,"span"),n(52,"Examples"),t(),e(53,"span",20),w("click",function(){return s.expandAllCode()}),t()()(),e(54,"div",21)(55,"div",22)(56,"nz-code-box",23),p(57,"nz-demo-carousel-basic",24),e(58,"div",25),g(),e(59,"p"),n(60,"Basic usage."),t(),z(),t()(),e(61,"nz-code-box",26),p(62,"nz-demo-carousel-fade",24),e(63,"div",25),g(),e(64,"p"),n(65,"Slides use fade for transition."),t(),z(),t()(),e(66,"nz-code-box",27),p(67,"nz-demo-carousel-custom",24),e(68,"div",25),g(),e(69,"p"),n(70,"Customize carousel transition effect by providing a class that extends "),e(71,"code"),n(72,"NzCarouselBaseStrategy"),t(),n(73,"."),t(),z(),t()()(),e(74,"div",22)(75,"nz-code-box",28),p(76,"nz-demo-carousel-position",24),e(77,"div",25),g(),e(78,"p"),n(79,"There are four positions available."),t(),z(),t()(),e(80,"nz-code-box",29),p(81,"nz-demo-carousel-autoplay",24),e(82,"div",25),g(),e(83,"p"),n(84,"Timing of scrolling to the next card/picture."),t(),z(),t()(),e(85,"nz-code-box",30),p(86,"nz-demo-carousel-loop",24),e(87,"div",25),g(),e(88,"p"),n(89,"Prevent the carousel to go in a loop"),t(),z(),t()()()(),e(90,"section",31),g(),e(91,"h2",32)(92,"span"),n(93,"API"),t(),e(94,"a",33),n(95,"#"),t()(),e(96,"h3",34)(97,"span"),n(98,"nz-carousel"),t(),e(99,"label",35),n(100,"component"),t(),e(101,"a",36),n(102,"#"),t()(),e(103,"table")(104,"thead")(105,"tr")(106,"th"),n(107,"Property"),t(),e(108,"th"),n(109,"Description"),t(),e(110,"th"),n(111,"Type"),t(),e(112,"th"),n(113,"Default"),t(),e(114,"th"),n(115,"Global Config"),t()()(),e(116,"tbody")(117,"tr")(118,"td")(119,"code"),n(120,"[nzAutoPlay]"),t()(),e(121,"td"),n(122,"Whether to scroll automatically"),t(),e(123,"td")(124,"code"),n(125,"boolean"),t()(),e(126,"td")(127,"code"),n(128,"false"),t()(),e(129,"td"),n(130,"\u2705"),t()(),e(131,"tr")(132,"td")(133,"code"),n(134,"[nzAutoPlaySpeed]"),t()(),e(135,"td"),n(136,"Duration (milliseconds), does not scroll when set to 0"),t(),e(137,"td")(138,"code"),n(139,"number"),t()(),e(140,"td")(141,"code"),n(142,"3000"),t()(),e(143,"td"),n(144,"\u2705"),t()(),e(145,"tr")(146,"td")(147,"code"),n(148,"[nzDotRender]"),t()(),e(149,"td"),n(150,"Dot render template"),t(),e(151,"td")(152,"code"),n(153,"TemplateRef<{ $implicit: number }>"),t()(),e(154,"td"),n(155,"-"),t(),p(156,"td"),t(),e(157,"tr")(158,"td")(159,"code"),n(160,"[nzDotPosition]"),t()(),e(161,"td"),n(162,"The position of the dots, which can be one of "),e(163,"code"),n(164,"top"),t(),e(165,"code"),n(166,"bottom"),t(),e(167,"code"),n(168,"left"),t(),e(169,"code"),n(170,"right"),t()(),e(171,"td")(172,"code"),n(173,"string"),t()(),e(174,"td")(175,"code"),n(176,"bottom"),t()(),e(177,"td"),n(178,"\u2705"),t()(),e(179,"tr")(180,"td")(181,"code"),n(182,"[nzDots]"),t()(),e(183,"td"),n(184,"Whether to show the dots at the bottom of the gallery"),t(),e(185,"td")(186,"code"),n(187,"boolean"),t()(),e(188,"td")(189,"code"),n(190,"true"),t()(),e(191,"td"),n(192,"\u2705"),t()(),e(193,"tr")(194,"td")(195,"code"),n(196,"[nzEffect]"),t()(),e(197,"td"),n(198,"Transition effect"),t(),e(199,"td")(200,"code"),n(201,"'scrollx'|'fade'"),t()(),e(202,"td")(203,"code"),n(204,"'scrollx'"),t()(),e(205,"td"),n(206,"\u2705"),t()(),e(207,"tr")(208,"td")(209,"code"),n(210,"[nzEnableSwipe]"),t()(),e(211,"td"),n(212,"Whether to support swipe gesture"),t(),e(213,"td")(214,"code"),n(215,"boolean"),t()(),e(216,"td")(217,"code"),n(218,"true"),t()(),e(219,"td"),n(220,"\u2705"),t()(),e(221,"tr")(222,"td")(223,"code"),n(224,"[nzLoop]"),t()(),e(225,"td"),n(226,"Whether to enable the carousel to go in a loop"),t(),e(227,"td")(228,"code"),n(229,"boolean"),t()(),e(230,"td")(231,"code"),n(232,"true"),t()(),e(233,"td"),n(234,"\u2705"),t()(),e(235,"tr")(236,"td")(237,"code"),n(238,"(nzAfterChange)"),t()(),e(239,"td"),n(240,"Callback function called after the current index changes"),t(),e(241,"td")(242,"code"),n(243,"EventEmitter<number>"),t()(),e(244,"td"),n(245,"-"),t(),p(246,"td"),t(),e(247,"tr")(248,"td")(249,"code"),n(250,"(nzBeforeChange)"),t()(),e(251,"td"),n(252,"Callback function called before the current index changes"),t(),e(253,"td")(254,"code"),n(255,"EventEmitter{ from: number; to: number }>"),t()(),e(256,"td"),n(257,"-"),t(),p(258,"td"),t()()(),e(259,"h4",37)(260,"span"),n(261,"Methods"),t(),e(262,"a",38),n(263,"#"),t()(),e(264,"table")(265,"thead")(266,"tr")(267,"th"),n(268,"Name"),t(),e(269,"th"),n(270,"Description"),t()()(),e(271,"tbody")(272,"tr")(273,"td")(274,"code"),n(275,"goTo(slideNumber)"),t()(),e(276,"td"),n(277,"Change current slide to given slide number"),t()(),e(278,"tr")(279,"td")(280,"code"),n(281,"next()"),t()(),e(282,"td"),n(283,"Change current slide to next slide"),t()(),e(284,"tr")(285,"td")(286,"code"),n(287,"pre()"),t()(),e(288,"td"),n(289,"Change current slide to previous slide"),t()()()(),e(290,"h3",39)(291,"span"),n(292,"InjectionToken"),t(),e(293,"a",40),n(294,"#"),t()(),e(295,"table")(296,"thead")(297,"tr")(298,"th"),n(299,"Token"),t(),e(300,"th"),n(301,"Description"),t(),e(302,"th"),n(303,"Parameters"),t(),e(304,"th"),n(305,"Default Value"),t()()(),e(306,"tbody")(307,"tr")(308,"td")(309,"code"),n(310,"NZ_CAROUSEL_CUSTOM_STRATEGIES"),t()(),e(311,"td"),n(312,"Provide custom transitioning strategies"),t(),e(313,"td")(314,"code"),n(315,"CarouselStrategyRegistryItem[]"),t()(),e(316,"td"),n(317,"-"),t()()()(),e(318,"h3",41)(319,"span"),n(320,"Customizing transition effects"),t(),e(321,"a",42),n(322,"#"),t()(),e(323,"p"),n(324,"You can provide strategies that extends "),e(325,"code"),n(326,"NzCarouselBaseStrategy"),t(),n(327," to implement custom transition effects."),t(),z(),t()()),o&2&&(d(),u("nzOffsetTop",16),d(),u("nzAffix",!1),d(52),u("nzGutter",16),d(),u("nzXl",12)("nzSpan",24),d(),u("nzId","components-carousel-demo-basic")("nzLink","components-carousel-demo-basic")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/basic.md"),d(5),u("nzId","components-carousel-demo-fade")("nzLink","components-carousel-demo-fade")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/fade.md"),d(5),u("nzId","components-carousel-demo-custom")("nzLink","components-carousel-demo-custom")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/custom.md"),d(8),u("nzXl",12)("nzSpan",24),d(),u("nzId","components-carousel-demo-position")("nzLink","components-carousel-demo-position")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/position.md"),d(5),u("nzId","components-carousel-demo-autoplay")("nzLink","components-carousel-demo-autoplay")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/autoplay.md"),d(5),u("nzId","components-carousel-demo-loop")("nzLink","components-carousel-demo-loop")("nzIframeHeight",null)("nzHref","https://github.com/NG-ZORRO/ng-zorro-antd/edit/master/components/carousel/demo/loop.md"))},dependencies:[ce,B,de,me,ae,le,se,ne,te,ge,Ee,Se,Ce,xe,ye],encapsulation:2})}}return r})();var Qt=[{path:"en",component:Et},{path:"zh",component:gt}],Kn=Qt;export{Kn as default};