{"version":3,"file":"global.js","mappings":"qBAAAA,EAAOC,QAAU,WAGhB,MAAMC,EAAyB,IAAIC,QAQ7BC,EAA6BC,IAGlC,GAA4B,gBAAxBC,SAASC,YAAwD,aAAxBD,SAASC,WAErD,OAAO,EAIR,KAAOF,GAAS,CAEf,GAAIA,EAAQG,YAEX,OAAO,EAGRH,EAAUA,EAAQI,UACnB,CAGA,OAAO,CAAK,EAWPC,EAAiB,CAACL,EAASM,GAAkB,KAGlD,GAAIP,EAA0BC,GAC7B,OAAO,EAIH,IAAKH,EAAuBU,IAAIP,IAAYM,EAAiB,CAEjE,MAAME,EAAwB,IAAIC,SAASC,IAE1C,MAAMC,EAAW,IAAIC,kBAAiB,KAEjCb,EAA0BC,KAE7BW,EAASE,aAETH,GAAQ,GACT,IAGDC,EAASG,QAAQd,EAAS,CACzBe,WAAW,GACV,IAGHlB,EAAuBmB,IAAIhB,EAASQ,EACrC,CAIA,OAAOX,EAAuBU,IAAIP,EAAQ,EAS3C,OAFAK,EAAeY,KAFfZ,EAAea,YAAcnB,EAItBM,CAEP,CArFgB,E,GCCbc,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa1B,QAGrB,IAAID,EAASwB,EAAyBE,GAAY,CAGjDzB,QAAS,CAAC,GAOX,OAHA4B,EAAoBH,GAAU1B,EAAQA,EAAOC,QAASwB,GAG/CzB,EAAOC,OACf,C,MCtBA,MAAMS,EAAiB,EAAQ,KAE/B,MAAMoB,iCAAiCC,eAEtC,WAAAC,GACCC,OACD,CAEA,uBAAMC,SACCxB,EAAeyB,MACrBA,KAAKC,YACN,CAEA,UAAAA,GAEKD,KAAKE,cAGTF,KAAKE,aAAc,EAEpB,EAIDC,eAAeC,OAAO,8BAA+BT,yBAA0B,CAACU,QAAS,O","sources":["webpack://customtheme/./node_modules/@alexspirgel/children-loaded/src/index.js","webpack://customtheme/webpack/bootstrap","webpack://customtheme/../../modules/custom/esd_components/esd_custom_components/components/social_media_grid/scripts/src/global.js"],"sourcesContent":["module.exports = (function () {\n\n\t// Initialize a weak map to hold promises.\n\tconst childrenLoadedPromises = new WeakMap();\n\n\t/**\n\t * Checks to see if children elements are loaded.\n\t * @param {object} element - Element to look for children within.\n\t * @return {boolean} Whether the children elements are loaded or not.\n\t */\n\n\tconst childrenLoadedSynchronous = (element) => {\n\n\t\t// Document ready states reference: https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState\n\t\tif (document.readyState === 'interactive' || document.readyState === 'complete') {\n\t\t\t// Children elements are assumed to be loaded.\n\t\t\treturn true;\n\t\t}\n\n\t\t// While the element exists.\n\t\twhile (element) {\n\t\t\t// If the next sibling element exists.\n\t\t\tif (element.nextSibling) {\n\t\t\t\t// The original passed element and its children have been loaded.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// Set the element to the parent element.\n\t\t\telement = element.parentNode;\n\t\t}\n\n\t\t// If code execution gets here, it's assumed children elements are not loaded.\n\t\treturn false;\n\n\t};\n\n\t/**\n\t * An asynchronous wrapper for the childrenLoadedSynchronous function.\n\t * @param {object} element - Element to look for children within.\n\t * @param {boolean} [forceNewPromise=false] - Option to invalidate existing promises.\n\t * @return {*} True if children are loaded, otherwise a promise.\n\t */\n\n\tconst childrenLoaded = (element, forceNewPromise = false) => {\n\n\t\t// If children are loaded immediately.\n\t\tif (childrenLoadedSynchronous(element)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If an existing promise for the passed element does not exist yet or if a new promise is being forced.\n\t\telse if (!childrenLoadedPromises.get(element) || forceNewPromise) {\n\t\t\t// Create a new promise.\n\t\t\tconst childrenLoadedPromise = new Promise((resolve) => {\n\t\t\t\t// Create a new mutation observer.\n\t\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\t\t// When children are loaded.\n\t\t\t\t\tif (childrenLoadedSynchronous(element)) {\n\t\t\t\t\t\t// Disconnect the mutation observer.\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\t// Resolve the promise.\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// Watch for child element updates.\n\t\t\t\tobserver.observe(element, {\n\t\t\t\t\tchildList: true\n\t\t\t\t});\n\t\t\t});\n\t\t\t// Set the promise weak map entry for the passed element.\n\t\t\tchildrenLoadedPromises.set(element, childrenLoadedPromise);\n\t\t}\n\n\t\t// Return the promise for the passed element.\n\t\t// Multiple asynchronous calls of childrenLoaded for the same element should return the same promise.\n\t\treturn childrenLoadedPromises.get(element);\n\n\t};\n\n\t// Attach the synchronous function to the export for optional use.\n\tchildrenLoaded.synchronous = childrenLoadedSynchronous;\n\t// Add shorthand alias for synchronous.\n\tchildrenLoaded.sync = childrenLoaded.synchronous;\n\t// Return the asynchronous function as the export.\n\treturn childrenLoaded;\n\n})();","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","const childrenLoaded = require('@alexspirgel/children-loaded');\n\nclass ComponentSocialMediaGrid extends HTMLDivElement {\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tasync connectedCallback() {\n\t\tawait childrenLoaded(this);\n\t\tthis.initialize();\n\t}\n\n\tinitialize() {\n\n\t\tif (this.initialized) {\n\t\t\treturn;\n\t\t}\n\t\tthis.initialized = true;\n\n\t}\n\n}\n\ncustomElements.define('component-social-media-grid', ComponentSocialMediaGrid, {extends: 'div'});"],"names":["module","exports","childrenLoadedPromises","WeakMap","childrenLoadedSynchronous","element","document","readyState","nextSibling","parentNode","childrenLoaded","forceNewPromise","get","childrenLoadedPromise","Promise","resolve","observer","MutationObserver","disconnect","observe","childList","set","sync","synchronous","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","ComponentSocialMediaGrid","HTMLDivElement","constructor","super","connectedCallback","this","initialize","initialized","customElements","define","extends"],"sourceRoot":""}