PageSourceSearch

https://preview-8478-ng-zorro-antd.surge.sh/chunk-4TY5IPN2.js

js preview-8478-ng-zorro-antd.surge.sh collected 2026-10-03 14:58:56 UTC 4,756 bytes, 1 lines download raw bytes

1import{a as H,b as J}from"./chunk-PWPKGBNX.js";import{$b as A,Ab as F,Bb as R,Bf as K,C as g,Cb as w,Db as E,Ia as c,Ja as r,Je as Z,Kb as L,Ke as P,Lb as V,Oa as N,Rc as W,Ta as m,Ua as T,Uc as $,Va as l,Wb as j,Xa as x,Y as d,aa as _,ca as b,gb as v,ha as D,hb as u,ia as I,ib as y,jb as f,kb as z,l as k,le as C,lf as Q,mf as G,pc as U,qf as q,r as h,rb as p,rf as B,xa as S,yb as M,zb as O}from"./chunk-BPHN4FUK.js";var oe=["switchElement"];function se(e,i){e&1&&y(0,"span",8)}function re(e,i){if(e&1&&(f(0),w(1),z()),e&2){let s=p(2);c(),E(s.nzCheckedChildren)}}function ae(e,i){if(e&1&&(f(0),m(1,re,2,1,"ng-container",9),z()),e&2){let s=p();c(),l("nzStringTemplateOutlet",s.nzCheckedChildren)}}function ce(e,i){if(e&1&&(f(0),w(1),z()),e&2){let s=p(2);c(),E(s.nzUnCheckedChildren)}}function le(e,i){if(e&1&&m(0,ce,2,1,"ng-container",9),e&2){let s=p();l("nzStringTemplateOutlet",s.nzUnCheckedChildren)}}var he="switch",de=(()=>{let i=class i{updateValue(t){this.isChecked!==t&&(this.isChecked=t,this.onChange(this.isChecked))}focus(){this.focusMonitor.focusVia(this.switchElement.nativeElement,"keyboard")}blur(){this.switchElement.nativeElement.blur()}constructor(t,n,o,a,X,Y){this.nzConfigService=t,this.host=n,this.ngZone=o,this.cdr=a,this.focusMonitor=X,this.directionality=Y,this._nzModuleName=he,this.isChecked=!1,this.onChange=()=>{},this.onTouched=()=>{},this.nzLoading=!1,this.nzDisabled=!1,this.nzControl=!1,this.nzCheckedChildren=null,this.nzUnCheckedChildren=null,this.nzSize="default",this.nzId=null,this.dir="ltr",this.destroy$=new k,this.isNzDisableFirstChange=!0}ngOnInit(){this.directionality.change.pipe(d(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>{g(this.host.nativeElement,"click").pipe(d(this.destroy$)).subscribe(t=>{t.preventDefault(),!(this.nzControl||this.nzDisabled||this.nzLoading)&&this.ngZone.run(()=>{this.updateValue(!this.isChecked),this.cdr.markForCheck()})}),g(this.switchElement.nativeElement,"keydown").pipe(d(this.destroy$)).subscribe(t=>{if(this.nzControl||this.nzDisabled||this.nzLoading)return;let{keyCode:n}=t;n!==37&&n!==39&&n!==32&&n!==13||(t.preventDefault(),this.ngZone.run(()=>{n===37?this.updateValue(!1):n===39?this.updateValue(!0):(n===32||n===13)&&this.updateValue(!this.isChecked),this.cdr.markForCheck()}))})})}ngAfterViewInit(){this.focusMonitor.monitor(this.switchElement.nativeElement,!0).pipe(d(this.destroy$)).subscribe(t=>{t||Promise.resolve().then(()=>this.onTouched())})}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.switchElement.nativeElement),this.destroy$.next(),this.destroy$.complete()}writeValue(t){this.isChecked=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}};i.\u0275fac=function(n){return new(n||i)(r(Z),r(S),r(N),r(A),r(K),r(W,8))},i.\u0275cmp=D({type:i,selectors:[["nz-switch"]],viewQuery:function(n,o){if(n&1&&M(oe,7),n&2){let a;O(a=F())&&(o.switchElement=a.first)}},inputs:{nzLoading:"nzLoading",nzDisabled:"nzDisabled",nzControl:"nzControl",nzCheckedChildren:"nzCheckedChildren",nzUnCheckedChildren:"nzUnCheckedChildren",nzSize:"nzSize",nzId:"nzId"},exportAs:["nzSwitch"],standalone:!0,features:[L([{provide:$,useExisting:_(()=>i),multi:!0}]),V],decls:9,vars:16,consts:[["switchElement",""],["uncheckTemplate",""],["nz-wave","","type","button",1,"ant-switch",3,"disabled","nzWaveExtraNode"],[1,"ant-switch-handle"],["nz-icon","","nzType","loading","class","ant-switch-loading-icon",4,"ngIf"],[1,"ant-switch-inner"],[4,"ngIf","ngIfElse"],[1,"ant-click-animating-node"],["nz-icon","","nzType","loading",1,"ant-switch-loading-icon"],[4,"nzStringTemplateOutlet"]],template:function(n,o){if(n&1&&(v(0,"button",2,0)(2,"span",3),m(3,se,1,0,"span",4),u(),v(4,"span",5),m(5,ae,2,1,"ng-container",6)(6,le,1,1,"ng-template",null,1,j),u(),y(8,"div",7),u()),n&2){let a=R(7);x("ant-switch-checked",o.isChecked)("ant-switch-loading",o.nzLoading)("ant-switch-disabled",o.nzDisabled)("ant-switch-small",o.nzSize==="small")("ant-switch-rtl",o.dir==="rtl"),l("disabled",o.nzDisabled)("nzWaveExtraNode",!0),T("id",o.nzId),c(3),l("ngIf",o.nzLoading),c(2),l("ngIf",o.isChecked)("ngIfElse",a)}},dependencies:[J,H,B,q,U,G,Q],encapsulation:2,changeDetection:0});let e=i;return h([C()],e.prototype,"nzLoading",void 0),h([C()],e.prototype,"nzDisabled",void 0),h([C()],e.prototype,"nzControl",void 0),h([P()],e.prototype,"nzSize",void 0),e})(),Ve=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=I({type:i}),i.\u0275inj=b({imports:[de]});let e=i;return e})();export{de as a,Ve as b};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.