{"version":3,"names":["addClass","classNames","filter","className","join","inheritAttributes","el","attributes","inheritedAttributes","forEach","attr","hasAttribute","value","getAttribute","isEmpty","undefined"],"sources":["src/utils/helpers/helpers.ts"],"sourcesContent":["export const addClass = (classNames: Array) => {\n return classNames.filter(className => className).join(' ');\n};\n\nexport function inheritAttributes(el: HTMLElement, attributes: string[] = []) {\n const inheritedAttributes: { [key: string]: any } = {};\n\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n inheritedAttributes[attr] = el.getAttribute(attr);\n }\n }\n });\n\n return inheritedAttributes;\n}\n\nexport function isEmpty(value: any): boolean {\n return value === null || value === undefined || value === '';\n}\n"],"mappings":"MAAaA,EAAYC,GAChBA,EAAWC,QAAOC,GAAaA,IAAWC,KAAK,K,SAGxCC,EAAkBC,EAAiBC,EAAuB,IACxE,MAAMC,EAA8C,GAEpDD,EAAWE,SAAQC,IACjB,GAAIJ,EAAGK,aAAaD,GAAO,CACzB,MAAME,EAAQN,EAAGO,aAAaH,GAC9B,GAAIE,IAAU,KAAM,CAClBJ,EAAoBE,GAAQJ,EAAGO,aAAaH,E,MAKlD,OAAOF,CACT,C,SAEgBM,EAAQF,GACtB,OAAOA,IAAU,MAAQA,IAAUG,WAAaH,IAAU,EAC5D,Q"}