{"version":3,"file":"qualcomm-ui-angular-core-attributes.mjs","sources":["../../src/attributes/number-attributes.ts","../../src/attributes/pixel-attribute.ts","../../src/attributes/qualcomm-ui-angular-core-attributes.ts"],"sourcesContent":["// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\nimport {numberAttribute} from \"@angular/core\"\n\n/**\n * The `numberAttribute` transformer with a fallback to 0 if the input can't be\n * parsed as a number.\n */\nexport function numberAttributeOrZero(value: any) {\n  return numberAttribute(value, 0)\n}\n\n/**\n * The `numberAttribute` transformer with a fallback to undefined if the input can't\n * be parsed as a number.\n */\nexport function numberAttributeOrUndefined(value: any) {\n  const res = numberAttribute(value)\n  if (Number.isNaN(res)) {\n    return undefined\n  }\n  return res\n}\n","// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n// SPDX-License-Identifier: BSD-3-Clause-Clear\n\n/**\n * Coerces a string or number to a pixel value. Returns the value as-is if it\n * doesn't match a number-ish format.\n */\nexport function pixelAttribute(value: string | number): string {\n  return typeof value === \"number\" || /^\\d+$/.test(value) ? `${value}px` : value\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AACA;AAIA;;;AAGG;AACG,SAAU,qBAAqB,CAAC,KAAU,EAAA;AAC9C,IAAA,OAAO,eAAe,CAAC,KAAK,EAAE,CAAC,CAAC;AAClC;AAEA;;;AAGG;AACG,SAAU,0BAA0B,CAAC,KAAU,EAAA;AACnD,IAAA,MAAM,GAAG,GAAG,eAAe,CAAC,KAAK,CAAC;AAClC,IAAA,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AACrB,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,OAAO,GAAG;AACZ;;ACvBA;AACA;AAEA;;;AAGG;AACG,SAAU,cAAc,CAAC,KAAsB,EAAA;IACnD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAA,EAAG,KAAK,IAAI,GAAG,KAAK;AAChF;;ACTA;;AAEG;;;;"}