{ "version": 3, "sources": ["../../Components/Common/Framework/Foundation.SharedScripts/Scripts/Loader.ts"], "sourcesContent": ["const initComponents = ({ context = document } = {}) => {\r\n const elements = [...context.querySelectorAll('[data-module]')];\r\n\r\n for (let i = 0; i < elements.length; i++) {\r\n const element = elements[i];\r\n const componentName = element.getAttribute('data-module');\r\n\r\n if (!componentName) {\r\n return;\r\n }\r\n\r\n import(componentName)\r\n .then((module) => {\r\n console.debug(`Loader: Dynamically importing ${componentName}`);\r\n new module.default(element);\r\n })\r\n .catch((err) => {\r\n console.debug(`Loader: Failed to dynamically import ${componentName}`, err);\r\n throw err;\r\n });\r\n }\r\n};\r\n\r\ninitComponents();"], "mappings": ";AAAA,IAAM,iBAAiB,CAAC,EAAE,UAAU,SAAS,IAAI,CAAC,MAAM;AACtD,QAAM,WAAW,CAAC,GAAG,QAAQ,iBAAiB,eAAe,CAAC;AAE9D,WAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,UAAM,UAAU,SAAS,CAAC;AAC1B,UAAM,gBAAgB,QAAQ,aAAa,aAAa;AAExD,QAAI,CAAC,eAAe;AAClB;AAAA,IACF;AAEA,WAAO,eACJ,KAAK,CAAC,WAAW;AAChB,cAAQ,MAAM,iCAAiC,aAAa,EAAE;AAC9D,UAAI,OAAO,QAAQ,OAAO;AAAA,IAC5B,CAAC,EACA,MAAM,CAAC,QAAQ;AACd,cAAQ,MAAM,wCAAwC,aAAa,IAAI,GAAG;AAC1E,YAAM;AAAA,IACR,CAAC;AAAA,EACL;AACF;AAEA,eAAe;", "names": [] }