{"version":3,"file":"subscriptions.js","mappings":"MAAA,IAAWA,KAiCRC,QA/BG,qBAAqBC,OAAM,SAAUC,GAE/BH,EAAE,6BAA6BI,OAAS,EAExCJ,EAAE,2BAA2BK,KAAK,WAAW,GAK7CL,EAAE,2BAA2BK,KAAK,WAAW,EAErD,IAGAL,EAAE,2BAA2BE,OAAM,SAAUC,GACzC,GAAKG,KAAKC,QAaNP,EAAE,qBAAqBK,KAAK,WAAW,OAbxB,CAIf,GADgBL,EAAEM,MAAME,KAAK,cAEzB,OAIJL,EAAEM,gBACN,CAKJ,G","sources":["webpack://less/./Scripts/select-news-categories.js"],"sourcesContent":["(function ($) {\n // User clicks a news categories (select or deselect)\n $('.js-news-category').click(function (e) {\n // ?: Are there any selected news categories?\n if ($('.js-news-category:checked').length > 0) {\n // -> Yes, unselect the option for all news categories\n $('.js-all-news-categories').prop('checked', false);\n }\n else {\n // -> No, user is deselecting the last previous selected category.\n // Auto select all news categories.\n $('.js-all-news-categories').prop('checked', true);\n }\n });\n\n // User clicks the option for all categories\n $('.js-all-news-categories').click(function (e) {\n if (!this.checked) {\n // Get data-allow-none from the checkbox, if it is set to true, then allow user to uncheck all news categories.\n // Otherwise, don't allow the user to uncheck all news categories.\n let allowNone = $(this).data('allow-none');\n if (allowNone)\n return;\n \n // Don't allow user to uncheck all news categories. The option for all news categories is\n // unchecked when selecting a category.\n e.preventDefault();\n }\n else {\n // User is selecting all news. Unselect all previous selected categories.\n $('.js-news-category').prop('checked', false);\n }\n });\n})(jQuery);"],"names":["$","jQuery","click","e","length","prop","this","checked","data","preventDefault"],"sourceRoot":""}