-
Notifications
You must be signed in to change notification settings - Fork 11
/
chunk-DGVZRYL7.js
1 lines (1 loc) · 2.89 KB
/
chunk-DGVZRYL7.js
1
import{$ as p,J as M,aa as d,ba as m,n as g}from"./chunk-BYER7FCH.js";import{ha as h,nb as l,sa as y,ua as a}from"./chunk-U274QCT3.js";var F=(()=>{let t=class t{transform(e,r){if(!Array.isArray(e))return e;if(e.length!==0)switch(r){case"sum":return m(e);case"avg":return m(e)/e.length;case"max":return Math.max(...e);case"min":return Math.min(...e);default:throw Error("Invalid Pipe Arguments: Aggregate pipe doesn't support this type")}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=a({name:"nzAggregate",type:t,pure:!0,standalone:!0});let n=t;return n})(),i=class i{transform(t,s=0,e="B",r){if(!(p(t)&&p(s)&&s%1===0&&s>=0))return t;let o=t,u=e;for(;u!=="B";)o*=1024,u=i.formats[u].prev;if(r){let c=i.formats[r],f=d(i.calculateResult(c,o),s);return i.formatResult(f,r)}for(let c in i.formats)if(i.formats.hasOwnProperty(c)){let f=i.formats[c];if(o<f.max){let w=d(i.calculateResult(f,o),s);return i.formatResult(w,c)}}}static formatResult(t,s){return`${t} ${s}`}static calculateResult(t,s){let e=t.prev?i.formats[t.prev]:void 0;return e?s/e.max:s}};i.formats={B:{max:1024},kB:{max:Math.pow(1024,2),prev:"B"},KB:{max:Math.pow(1024,2),prev:"B"},MB:{max:Math.pow(1024,3),prev:"kB"},GB:{max:Math.pow(1024,4),prev:"MB"},TB:{max:Number.MAX_SAFE_INTEGER,prev:"GB"}},i.\u0275fac=function(s){return new(s||i)},i.\u0275pipe=a({name:"nzBytes",type:i,pure:!0,standalone:!0});var v=i,b=(()=>{let t=class t{transform(e,r="px"){return typeof e=="number"?`${e}${r}`:e}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=a({name:"nzToCssUnit",type:t,pure:!0,standalone:!0});let n=t;return n})(),R=(()=>{let t=class t{transform(e,r,o=""){if(typeof e!="string")return e;let u=typeof r>"u"?e.length:r;return e.length<=u?e:e.substring(0,u)+o}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=a({name:"nzEllipsis",type:t,pure:!0,standalone:!0});let n=t;return n})(),S=(()=>{let t=class t{transform(e,r=""){return M(e)?r:e}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=a({name:"nzSafeNull",type:t,pure:!0,standalone:!0});let n=t;return n})(),A=(()=>{let t=class t{constructor(e){this.sanitizer=e}transform(e,r="html"){switch(r){case"html":return this.sanitizer.bypassSecurityTrustHtml(e);case"style":return this.sanitizer.bypassSecurityTrustStyle(e);case"url":return this.sanitizer.bypassSecurityTrustUrl(e);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(e);default:throw new Error("Invalid safe type specified")}}};t.\u0275fac=function(r){return new(r||t)(l(g,16))},t.\u0275pipe=a({name:"nzSanitizer",type:t,pure:!0,standalone:!0});let n=t;return n})(),T=(()=>{let t=class t{transform(e){return e.trim()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=a({name:"nzTrim",type:t,pure:!0,standalone:!0});let n=t;return n})();var E=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=y({type:t}),t.\u0275inj=h({});let n=t;return n})();export{F as a,v as b,b as c,R as d,S as e,A as f,T as g,E as h};