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AOC,YAAYC,2BAA2BiC,WAAY","sources":["webpack://advanced-web/./UI/js/core/modules/refreshedhelpmechooseblock.js"],"sourcesContent":["(function () {\r\n window.oneadvanced = window.oneadvanced || {};\r\n window.oneadvanced.refreshedhelpmechooseblock = window.oneadvanced.refreshedhelpmechooseblock || {};\r\n window.oneadvanced.refreshedhelpmechooseblock.init = function () {\r\n //console.log(\"initializing refreshedhelpmechooseblock js.......\");\r\n\r\n //Below code is to add class named threesection if the helpmechooseblock contains 3 items\r\n var chooseLayout = function () {\r\n var main_content = document.querySelectorAll('.refreshedhelpmechooseblock .main-content');\r\n var helpmechooseblock = document.getElementsByClassName('refreshedhelpmechooseblock');\r\n\r\n for (var e = 0; e < main_content.length; e++) {\r\n if (main_content[e].children.length == 3) {\r\n helpmechooseblock[e].children[0].classList.add('threesection');\r\n helpmechooseblock[e].children[0].classList.remove('twosection');\r\n } else {\r\n helpmechooseblock[e].children[0].classList.remove('threesection');\r\n helpmechooseblock[e].children[0].classList.add('twosection');\r\n }\r\n }\r\n }\r\n\r\n //Below code is used to set minHeight for the cards \r\n var handleCardContentHeight = function (layout) {\r\n var cardHeight = [];\r\n var getCardContent = document.querySelectorAll('.' + layout + ' .card-section');\r\n\r\n for (var child = 0; child < getCardContent.length; child++) {\r\n getCardContent[child].style.minHeight = null;\r\n }\r\n\r\n if ((layout == 'twosection' && window.innerWidth < 640) || (layout == 'threesection' && window.innerWidth < 1025)) {\r\n return;\r\n }\r\n\r\n for (var child = 0; child < getCardContent.length; child++) {\r\n cardHeight.push(getCardContent[child].offsetHeight);\r\n }\r\n\r\n for (var child = 0; child < getCardContent.length; child++) {\r\n getCardContent[child].style.minHeight = `${Math.max(...cardHeight)}px`;\r\n }\r\n }\r\n\r\n const promise = new Promise((resolve, reject) => {\r\n chooseLayout();\r\n });\r\n\r\n promise.then(\r\n handleCardContentHeight('twosection'),\r\n handleCardContentHeight('threesection')\r\n );\r\n\r\n window.addEventListener(\"resize\", function () {\r\n handleCardContentHeight('twosection');\r\n handleCardContentHeight('threesection');\r\n });\r\n };\r\n\r\n window.oneadvanced.refreshedhelpmechooseblock.hasLoaded = true;\r\n})();"],"names":["window","oneadvanced","refreshedhelpmechooseblock","init","handleCardContentHeight","layout","cardHeight","getCardContent","document","querySelectorAll","child","length","style","minHeight","innerWidth","push","offsetHeight","concat","Math","max","apply","Promise","resolve","reject","main_content","helpmechooseblock","getElementsByClassName","e","children","classList","add","remove","chooseLayout","then","addEventListener","hasLoaded"],"sourceRoot":""}