{"version":3,"file":"webresto-components-pipes-weight.mjs","sources":["../../../projects/components/pipes/weight/weight.pipe.ts","../../../projects/components/pipes/weight/webresto-components-pipes-weight.ts"],"sourcesContent":["import { formatNumber } from '@angular/common';\nimport type { PipeTransform } from '@angular/core';\nimport { Pipe } from '@angular/core';\n\n@Pipe({\n  name: 'webrestoWeight',\n  standalone: true,\n  pure: true,\n})\nexport class WeightPipe implements PipeTransform {\n  transform(value?: number | string, showMeasure: boolean = true): string {\n    return !value || (!!value && isNaN(+value))\n      ? ''\n      : `${formatNumber(+value < 5 ? +value * 1000 : +value, 'ru', '1.0-0')}${\n          showMeasure ? ' гр.' : ''\n        }`;\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MASa,UAAU,CAAA;AACrB,IAAA,SAAS,CAAC,KAAuB,EAAE,WAAA,GAAuB,IAAI,EAAA;AAC5D,QAAA,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;AACzC,cAAE,EAAE;AACJ,cAAE,CAAG,EAAA,YAAY,CAAC,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,GACjE,WAAW,GAAG,MAAM,GAAG,EACzB,EAAE,CAAC;KACR;+GAPU,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,CAAA,EAAA;;4FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBALtB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,gBAAgB;AACtB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}