{"version":3,"sources":["node_modules/@sydle/sydle-ui/dist/collection/utils/utils.js"],"names":["inheritAttributes","el","attributes","attributeObject","boolAttr","forEach","attr","hasAttribute","indexOf","value","getAttribute"],"mappings":"AAWY,MAACA,EAAoB,CAACC,EAAIC,EAAa,MACjD,MAAMC,EAAkB,GACxB,MAAMC,EAAW,CACf,kBACA,sBACA,QACA,YACA,WACA,UACA,WACA,UACA,QACA,WACA,iBACA,SACA,QACA,YACA,OACA,WACA,QACA,WACA,aACA,OACA,cACA,WACA,WACA,WACA,WACA,aAEFF,EAAWG,SAAQC,IACjB,GAAIL,EAAGM,aAAaD,GAAO,CACzB,GAAIF,EAASI,QAAQF,MAAW,EAAG,CACjCH,EAAgBG,GAAQ,SAErB,CACH,MAAMG,EAAQR,EAAGS,aAAaJ,GAC9B,GAAIG,IAAU,KAAM,CAClBN,EAAgBG,GAAQL,EAAGS,aAAaJ,SAKhD,OAAOH","sourcesContent":["// TODO copied from ionic-framework core/src/utils/helpers.ts\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (el, attributes = []) => {\n const attributeObject = {};\n const boolAttr = [\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'itemscope',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected',\n 'truespeed',\n ];\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n if (boolAttr.indexOf(attr) !== -1) {\n attributeObject[attr] = true;\n }\n else {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n }\n }\n });\n return attributeObject;\n};\n"]}