{"id":5,"date":"2026-02-17T17:37:05","date_gmt":"2026-02-17T22:37:05","guid":{"rendered":"https:\/\/sites.bu.edu\/popsciseminar\/popsci-seminar-series\/"},"modified":"2026-04-15T08:27:21","modified_gmt":"2026-04-15T12:27:21","slug":"popsci-seminar-series","status":"publish","type":"page","link":"https:\/\/sites.bu.edu\/popsciseminar\/","title":{"rendered":"Population Science Seminar Series"},"content":{"rendered":"<p><!-- Full-Width Banner --><\/p>\n<p><!-- Section Navigation --><\/p>\n<p><!-- Hero --><\/p>\n<div class=\"ps-hero\">\n<p class=\"ps-hero-tagline\">The BU Population Science Seminar Series (BU PopSci) is an interdisciplinary forum connecting established and emerging scholars in demography, population health, epidemiology, economics, and related fields.<\/p>\n<div class=\"ps-hero-actions\"><a href=\"#schedule\" class=\"ps-btn-primary\">Upcoming Seminars<\/a><br \/>\n<a href=\"#subscribe\" class=\"ps-btn-secondary\">Join the Mailing List<\/a><\/div>\n<\/div>\n<p><!-- About --><\/p>\n<div id=\"about\" class=\"ps-section\">\n<p class=\"ps-section-title\">About the Series<\/p>\n<h3 class=\"ps-section-heading\">A Forum for Innovative Population Research<\/h3>\n<div class=\"ps-about-text\">\n<p>The Boston University Population Science Seminar Series (BU PopSci) brings together established and emerging scholars working across demography, population health, epidemiology, economics, and related fields. Each academic year, the series hosts 8\u201310 seminars that pair senior researchers with early-career faculty and postdoctoral scholars, creating a space where new ideas and methodological approaches can be shared and debated across disciplinary boundaries.<\/p>\n<p>Speakers are drawn from universities and research institutions across the country and internationally, with a deliberate emphasis on representing diverse career stages, methodological traditions, and substantive interests. The series also serves as a meeting point for the BU research community, connecting faculty and students from across the university who share an interest in population science.<\/p>\n<p>BU PopSci is a joint initiative of the <strong>Center for Innovation in Social Science (CISS), College of Arts &#038; Sciences (CAS)<\/strong>, <strong>Sargent College of Health &amp; Rehabilitation Sciences<\/strong>, the <strong>School of Law<\/strong>, and the <strong>School of Public Health<\/strong>. Members of the BU community and the broader academic public are welcome to attend. To receive regular announcements and invitations, please join our mailing list.<\/p>\n<\/div>\n<div class=\"ps-facts\">\n<div class=\"ps-fact\">\n<div class=\"ps-fact-num\">8\u201310<\/div>\n<div class=\"ps-fact-label\">Seminars Per Year<\/div>\n<\/div>\n<div class=\"ps-fact\">\n<div class=\"ps-fact-num\">4<\/div>\n<div class=\"ps-fact-label\">Sponsoring Units<\/div>\n<\/div>\n<div class=\"ps-fact\">\n<div class=\"ps-fact-num\">10<\/div>\n<div class=\"ps-fact-label\">Faculty Affiliates<\/div>\n<\/div>\n<div class=\"ps-fact\">\n<div class=\"ps-fact-num\">Hybrid<\/div>\n<div class=\"ps-fact-label\">Access<\/div>\n<\/div>\n<\/div>\n<\/div>\n<hr class=\"ps-rule\" \/>\n<p><!-- Schedule --><\/p>\n<div id=\"schedule\" class=\"ps-section\">\n<p class=\"ps-section-title\">Academic Year 2026\u201327<\/p>\n<h3 class=\"ps-section-heading\">Seminar Schedule<\/h3>\n<div class=\"ps-schedule-meta\">\n<div class=\"ps-schedule-meta-item\">\n<div class=\"ps-schedule-meta-label\">Day &amp; Time<\/div>\n<div class=\"ps-schedule-meta-value\">Mondays, 12:00\u20131:15 pm<\/div>\n<\/div>\n<div class=\"ps-schedule-meta-item\">\n<div class=\"ps-schedule-meta-label\">Format<\/div>\n<div class=\"ps-schedule-meta-value\">In-person with hybrid access. Light refreshments provided.<\/div>\n<\/p><\/div>\n<div class=\"ps-schedule-meta-item\">\n<div class=\"ps-schedule-meta-label\">Venue<\/div>\n<div class=\"ps-schedule-meta-value\">Center for Innovation in Social Science (CISS) Conference Room, 704 Commonwealth Avenue, 5th Floor, Boston<\/div>\n<\/p><\/div>\n<\/div>\n<table class=\"ps-table\">\n<thead>\n<tr>\n<th>Date<\/th>\n<th>Speaker<\/th>\n<th>Topic \/ Notes<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Sept. 14, 2026<\/td>\n<td><a href=\"https:\/\/ysph.yale.edu\/profile\/emma-zang\/\" rel=\"noopener\" target=\"_blank\">Emma Zang<\/a>, Associate Professor Tenure of Sociology and Biostatistics, Yale School of Public Health<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Oct. 19, 2026<\/td>\n<td><a href=\"https:\/\/www.bu.edu\/sph\/profile\/marcia-pescador-jimenez\/\">Marcia Pescador Jimenez<\/a>, Associate Professor of Epidemiology, BUSPH<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Nov. 16, 2026<\/td>\n<td><a href=\"https:\/\/www.bu.edu\/econ\/profile\/james-feigenbaum\/\">James Feigenbaum<\/a>, Assistant Professor of Economics, Boston University College of Arts &amp; Sciences<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Dec. 7, 2026<\/td>\n<td><a href=\"https:\/\/vivo.brown.edu\/display\/anaizer\">Anna Aizer<\/a>, Professor of Economics, Brown University<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Jan. 25, 2027<\/td>\n<td><a href=\"https:\/\/pstc.brown.edu\/people\/meghan-zacher\">Meghan Zacher<\/a>, Assistant Professor of Population Studies, Brown University<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Feb. 22, 2027<\/td>\n<td><a href=\"https:\/\/www.annastansbury.com\">Anna Stansbury<\/a>, Assistant Professor of Work and Organization Studies, MIT Sloan<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Mar. 15, 2027<\/td>\n<td>BU Lightning Round<\/td>\n<td>PAA Practice Talks \u2014 Population Association of America<\/td>\n<\/tr>\n<tr>\n<td>Apr. 12, 2027<\/td>\n<td><a href=\"https:\/\/www.umass.edu\/social-sciences\/about\/directory\/mark-pachucki\">Mark Pachuki<\/a>, Professor of Sociology, University of Massaschusetts Amherst<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>May 2027<\/td>\n<td class=\"ps-tbd\">To be announced<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<hr class=\"ps-rule\" \/>\n<p><!-- Faculty Organizers --><\/p>\n<div id=\"organizers\" class=\"ps-section\">\n<p class=\"ps-section-title\">Series Leadership<\/p>\n<h3 class=\"ps-section-heading\">Faculty Organizers<\/h3>\n<div class=\"ps-people-grid ps-people-grid--co-directors\">\n<div class=\"ps-person\">\n<div class=\"ps-person-role-badge\">Co-Director<\/div>\n<p class=\"ps-person-name\"><a href=\"https:\/\/www.bu.edu\/ciss\/profile\/deborah-carr\/\">Deborah Carr<\/a><\/p>\n<p class=\"ps-person-affiliation\">A&amp;S Distinguished Professor of Sociology, College of Arts &amp; Sciences; Director, Center for Innovation in Social Science (CISS)<\/p>\n<\/div>\n<div class=\"ps-person\">\n<div class=\"ps-person-role-badge\">Co-Director<\/div>\n<p class=\"ps-person-name\"><a href=\"https:\/\/www.bu.edu\/sph\/profile\/andrew-stokes\/\">Andrew C. Stokes<\/a><\/p>\n<p class=\"ps-person-affiliation\">Associate Professor of Global Health &amp; Sociology, School of Public Health<\/p>\n<\/div>\n<\/div>\n<div class=\"ps-people-grid\">\n<div class=\"ps-person\">\n<p class=\"ps-person-name\"><a href=\"https:\/\/www.bu.edu\/sociology\/profile\/neha-gondal\/\">Neha Gondal<\/a><\/p>\n<p class=\"ps-person-affiliation\">Associate Professor of Sociology, College of Arts &amp; Sciences; Faculty of Computing &amp; Data Sciences<\/p>\n<\/div>\n<div class=\"ps-person\">\n<p class=\"ps-person-name\"><a href=\"https:\/\/www.bu.edu\/law\/profile\/benjamin-david-pyle\/\">Benjamin David Pyle<\/a><\/p>\n<p class=\"ps-person-affiliation\">Associate Professor of Law, School of Law<\/p>\n<\/div>\n<div class=\"ps-person\">\n<p class=\"ps-person-name\"><a href=\"https:\/\/www.bu.edu\/econ\/profile\/linh-to\/\">Linh T\u00f4<\/a><\/p>\n<p class=\"ps-person-affiliation\">Assistant Professor of Economics, College of Arts &amp; Sciences<\/p>\n<\/div>\n<\/div>\n<p class=\"ps-section-title\" style=\"margin-top: 36px;\">Administration<\/p>\n<div class=\"ps-staff-grid\">\n<div class=\"ps-staff-item\">\n<p class=\"ps-staff-name\"><a href=\"https:\/\/www.bu.edu\/sph\/profile\/alana-garrigues\/\">Alana Garrigues<\/a><\/p>\n<p class=\"ps-staff-role\">Research Specialist, School of Public Health<\/p>\n<\/div>\n<div class=\"ps-staff-item\">\n<p class=\"ps-staff-name\"><a href=\"https:\/\/www.bu.edu\/ciss\/profile\/shannon-landis\/\">Shannon Landis<\/a><\/p>\n<p class=\"ps-staff-role\">Center Administrator, Center for Innovation in Social Science<\/p>\n<\/div>\n<\/div>\n<\/div>\n<hr class=\"ps-rule\" \/>\n<p><!-- Faculty Affiliates --><\/p>\n<div id=\"affiliates\" class=\"ps-section\">\n<p class=\"ps-section-title\">Scholarly Community<\/p>\n<h3 class=\"ps-section-heading\">Faculty Affiliates<\/h3>\n<p style=\"font-family: Georgia,serif; font-size: 16px; color: #555; font-style: italic; margin: 0 0 24px 0;\">Faculty from across the schools and colleges of Boston University whose research advances the population sciences.<\/p>\n<div class=\"ps-affiliates-grid\">\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bumc.bu.edu\/camed\/profile\/stacy-andersen\/\">Stacy Andersen<\/a><\/p>\n<p class=\"ps-affiliate-role\">Co-Director, New England Centenarian Study; Assistant Professor of Medicine, Chobanian &amp; Avedisian School of Medicine<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bumc.bu.edu\/medicine\/profile\/emelia-benjamin\/\">Emelia Benjamin<\/a><\/p>\n<p class=\"ps-affiliate-role\">Professor of Medicine and Epidemiology, Chobanian &amp; Avedisian School of Medicine, School of Public Health<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/polisci\/profile\/jacob-brown\/\">Jacob Brown<\/a><\/p>\n<p class=\"ps-affiliate-role\">Assistant Professor of Political Science, College of Arts &amp; Sciences<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/sargent\/profile\/jack-dennerlein-phd\/\">Jack Dennerlein<\/a><\/p>\n<p class=\"ps-affiliate-role\">Dean, Sargent College of Health &amp; Rehabilitation Sciences<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/sph\/profile\/maria-glymour\/\">Maria Glymour<\/a><\/p>\n<p class=\"ps-affiliate-role\">Chair and Professor of Epidemiology, School of Public Health<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/wheelock\/profile\/joshua-goodman\/\">Joshua Goodman<\/a><\/p>\n<p class=\"ps-affiliate-role\">Associate Professor of Education, Wheelock College of Education &amp; Human Development<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/ssw\/profile\/bronwyn-keefe\/\">Bronwyn Keefe<\/a><\/p>\n<p class=\"ps-affiliate-role\">Assistant Dean &amp; Associate Professor; Director, Center for Aging and Disability Education and Research (CADER), School of Social Work<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/sociology\/profile\/loretta-lees\/\">Loretta Lees<\/a><\/p>\n<p class=\"ps-affiliate-role\">A&amp;S Distinguished Professor of Sociology; Director, Center for Innovation in Social Science; BU Initiative on Cities<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/ssw\/profile\/daniel-p-miller\/\">Daniel Miller<\/a><\/p>\n<p class=\"ps-affiliate-role\">Professor of Human Behavior, Social Work and Policy in the School of Social Work<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/sites.bu.edu\/paschalidis\/people\/yannis-paschalidis\/\">Yannis Paschalidis<\/a><\/p>\n<p class=\"ps-affiliate-role\">A&amp;S Distinguished Professor in the College of Engineering; Director, Rafik B. Hariri Institute for Computing and Computational Science &#038; Engineering<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/sph\/profile\/marcia-pescador-jimenez\/\">Marcia I. Pescador Jimenez<\/a><\/p>\n<p class=\"ps-affiliate-role\">Associate Professor of Epidemiology, School of Public Health<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/law\/profile\/christopher-robertson\/\">Christopher Robertson<\/a><\/p>\n<p class=\"ps-affiliate-role\">Professor of Law, School of Law; Professor of Health Law, Policy &amp; Management, School of Public Health<\/p>\n<\/div>\n<div class=\"ps-affiliate\">\n<p class=\"ps-affiliate-name\"><a href=\"https:\/\/www.bu.edu\/sph\/profile\/jennifer-weuve\/\">Jennifer Weuve<\/a><\/p>\n<p class=\"ps-affiliate-role\">Professor of Epidemiology, School of Public Health<\/p>\n<\/div>\n<\/div>\n<div class=\"ps-callout\">\n<p>Faculty members engaged in population science research are invited to <a href=\"https:\/\/sites.bu.edu\/popsciseminar\/bu-popsci-affiliate-application\/\">apply to become a Faculty Affiliate<\/a> of the BU Population Science Seminar Series.<\/p>\n<\/div>\n<\/div>\n<hr class=\"ps-rule\" \/>\n<p><!-- Sponsors --><\/p>\n<div id=\"sponsors\" class=\"ps-section\">\n<p class=\"ps-section-title\">Institutional Support<\/p>\n<h3 class=\"ps-section-heading\">Sponsors &amp; Funders<\/h3>\n<p style=\"font-family: Georgia,serif; font-size: 16px; color: #444; margin: 0 0 8px 0;\">The series is generously supported by the following Boston University schools and centers:<\/p>\n<div class=\"ps-sponsors-grid\"><span class=\"ps-sponsor\">Center for Innovation in Social Science (CISS)<\/span><br \/>\n<span class=\"ps-sponsor\">Sargent College of Health &amp; Rehabilitation Sciences<\/span><br \/>\n<span class=\"ps-sponsor\">School of Law<\/span><br \/>\n<span class=\"ps-sponsor\">School of Public Health<\/span><\/div>\n<\/div>\n<hr class=\"ps-rule\" \/>\n<p><!-- Subscribe --><\/p>\n<div id=\"subscribe\" class=\"ps-subscribe\">\n<h3>Join the BU PopSci Mailing List<\/h3>\n<p class=\"ps-subscribe-sub\">Subscribe to receive seminar announcements, speaker information, and updates from the series throughout the academic year.<\/p>\n<div id=\"mc_embed_shell\">\n      <link href=\"\/\/cdn-images.mailchimp.com\/embedcode\/classic-061523.css\" rel=\"stylesheet\" type=\"text\/css\">\n<style type=\"text\/css\">\n        #mc_embed_signup{background:#fff; false;clear:left; font:14px Helvetica,Arial,sans-serif; width: 600px;}\n        \/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.\n           We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. *\/\n<\/style>\n<div id=\"mc_embed_signup\">\n<form action=\"https:\/\/sites-staging.us20.list-manage.com\/subscribe\/post?u=a19463ba4c609728dddadc462&amp;id=f87fa35ba3&amp;f_id=004b3be0f0\" method=\"post\" id=\"mc-embedded-subscribe-form\" name=\"mc-embedded-subscribe-form\" class=\"validate\" target=\"_blank\">\n<div id=\"mc_embed_signup_scroll\">\n<h2>Subscribe for BU PopSci Announcements and Reminders<\/h2>\n<div class=\"indicates-required\"><span class=\"asterisk\">*<\/span> indicates required<\/div>\n<div class=\"mc-field-group\"><label for=\"mce-EMAIL\">Email Address <span class=\"asterisk\">*<\/span><\/label><input type=\"email\" name=\"EMAIL\" class=\"required email\" id=\"mce-EMAIL\" required=\"\" value=\"\"><\/div>\n<div class=\"mc-field-group\"><label for=\"mce-FNAME\">First Name <\/label><input type=\"text\" name=\"FNAME\" class=\" text\" id=\"mce-FNAME\" value=\"\"><\/div>\n<div class=\"mc-field-group\"><label for=\"mce-LNAME\">Last Name <\/label><input type=\"text\" name=\"LNAME\" class=\" text\" id=\"mce-LNAME\" value=\"\"><\/div>\n<div hidden=\"\"><input type=\"hidden\" name=\"tags\" value=\"3070940\"><\/div>\n<div id=\"mce-responses\" class=\"clear\">\n<div class=\"response\" id=\"mce-error-response\" style=\"display: none;\"><\/div>\n<div class=\"response\" id=\"mce-success-response\" style=\"display: none;\"><\/div>\n<\/p><\/div>\n<div aria-hidden=\"true\" style=\"position: absolute; left: -5000px;\"><input type=\"text\" name=\"b_a19463ba4c609728dddadc462_f87fa35ba3\" tabindex=\"-1\" value=\"\"><\/div>\n<div class=\"clear\"><input type=\"submit\" name=\"subscribe\" id=\"mc-embedded-subscribe\" class=\"button\" value=\"Subscribe\"><\/div>\n<\/p><\/div>\n<\/form>\n<\/div>\n<p><script type=\"text\/javascript\" src=\"\/\/s3.amazonaws.com\/downloads.mailchimp.com\/js\/mc-validate.js\"><\/script><script type=\"text\/javascript\">(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';fnames[4]='PHONE';ftypes[4]='phone';fnames[6]='COMPANY';ftypes[6]='text';}(jQuery));var $mcj = jQuery.noConflict(true);\r\n    \/\/ SMS Phone Multi-Country Functionality\r\n    if(!window.MC) {\r\n      window.MC = {};\r\n    }\r\n    window.MC.smsPhoneData = {\r\n      defaultCountryCode: 'US',\r\n      programs: [],\r\n      smsProgramDataCountryNames: []\r\n    };\r\n\r\n    function getCountryUnicodeFlag(countryCode) {\r\n       return countryCode.toUpperCase().replace(\/.\/g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397))\r\n    };\r\n\r\n    \/\/ HTML sanitization function to prevent XSS\r\n    function sanitizeHtml(str) {\r\n      if (typeof str !== 'string') return '';\r\n      return str\r\n        .replace(\/&\/g, '&amp;')\r\n        .replace(\/<\/g, '&lt;')\r\n        .replace(\/>\/g, '&gt;')\r\n        .replace(\/\"\/g, '&quot;')\r\n        .replace(\/'\/g, '&#x27;')\r\n        .replace(\/\\\/\/g, '&#x2F;');\r\n    }\r\n\r\n    \/\/ URL sanitization function to prevent javascript: and data: URLs\r\n    function sanitizeUrl(url) {\r\n      if (typeof url !== 'string') return '';\r\n      const trimmedUrl = url.trim().toLowerCase();\r\n      if (trimmedUrl.startsWith('javascript:') || trimmedUrl.startsWith('data:') || trimmedUrl.startsWith('vbscript:')) {\r\n        return '#';\r\n      }\r\n      return url;\r\n    }\r\n\r\n    const getBrowserLanguage = () => {\r\n      if (!window?.navigator?.language?.split('-')[1]) {\r\n        return window?.navigator?.language?.toUpperCase();\r\n      }\r\n      return window?.navigator?.language?.split('-')[1];\r\n    };\r\n\r\n    \r\n    function getDefaultCountryProgram(defaultCountryCode, smsProgramData) {\r\n      if (!smsProgramData || smsProgramData.length === 0) {\r\n        return null;\r\n      }\r\n\r\n      const browserLanguage = getBrowserLanguage();\r\n\r\n      if (browserLanguage) {\r\n        const foundProgram = smsProgramData.find(\r\n          (program) => program?.countryCode === browserLanguage,\r\n        );\r\n        if (foundProgram) {\r\n          return foundProgram;\r\n        }\r\n      }\r\n\r\n      if (defaultCountryCode) {\r\n        const foundProgram = smsProgramData.find(\r\n          (program) => program?.countryCode === defaultCountryCode,\r\n        );\r\n        if (foundProgram) {\r\n          return foundProgram;\r\n        }\r\n      }\r\n\r\n      return smsProgramData[0];\r\n    }\r\n\r\n    function updateSmsLegalText(countryCode, fieldName) {\r\n      if (!countryCode || !fieldName) {\r\n        return;\r\n      }\r\n      \r\n      const programs = window?.MC?.smsPhoneData?.programs;\r\n      if (!programs || !Array.isArray(programs)) {\r\n        return;\r\n      }\r\n      \r\n      const program = programs.find(program => program?.countryCode === countryCode);\r\n      if (!program || !program.requiredTemplate) {\r\n        return;\r\n      }\r\n    \r\n      \r\n      const legalTextElement = document.querySelector('#legal-text-' + fieldName);\r\n      if (!legalTextElement) {\r\n        return;\r\n      }\r\n      \r\n      \/\/ Remove HTML tags and clean up the text\r\n      const divRegex = new RegExp('<\/?[div][^>]*>', 'gi');\r\n      const fullAnchorRegex = new RegExp('<a.*?<\/a>', 'g');\r\n      const anchorRegex = new RegExp('<a href=\"(.*?)\" target=\"(.*?)\">(.*?)<\/a>');\r\n      \r\n      const template = program.requiredTemplate.replace(divRegex, '');\r\n      \r\n      \r\n\r\n      legalTextElement.textContent = '';\r\n      const parts = template.split(\/(<a href=\".*?\" target=\".*?\">.*?<\\\/a>)\/g);\r\n      parts.forEach(function(part) {\r\n        if (!part) {\r\n          return;\r\n        }\r\n        const anchorMatch = part.match(\/<a href=\"(.*?)\" target=\"(.*?)\">(.*?)<\\\/a>\/);\r\n        if (anchorMatch) {\r\n          const linkElement = document.createElement('a');\r\n          linkElement.href = sanitizeUrl(anchorMatch[1]);\r\n          linkElement.target = sanitizeHtml(anchorMatch[2]);\r\n          linkElement.textContent = sanitizeHtml(anchorMatch[3]);\r\n          legalTextElement.appendChild(linkElement);\r\n        } else {\r\n          legalTextElement.appendChild(document.createTextNode(part));\r\n        }\r\n      });\r\n          \r\n    }\r\n\r\n    function generateDropdownOptions(smsProgramData) {\r\n      if (!smsProgramData || smsProgramData.length === 0) {\r\n        return '';\r\n      }\r\n\r\n      var programs = false\r\n        ? smsProgramData.filter(function(p, i, arr) {\r\n            return arr.findIndex(function(q) { return q.countryCode === p.countryCode; }) === i;\r\n          })\r\n        : smsProgramData;\r\n      \r\n      return programs.map(program => {\r\n        const flag = getCountryUnicodeFlag(program.countryCode);\r\n        const countryName = getCountryName(program.countryCode);\r\n        const callingCode = program.countryCallingCode || '';\r\n        \/\/ Sanitize all values to prevent XSS\r\n        const sanitizedCountryCode = sanitizeHtml(program.countryCode || '');\r\n        const sanitizedCountryName = sanitizeHtml(countryName || '');\r\n        const sanitizedCallingCode = sanitizeHtml(callingCode || '');\r\n        return '<option value=\"' + sanitizedCountryCode + '\">' + sanitizedCountryName + ' ' + sanitizedCallingCode + '<\/option>';\r\n      }).join('');\r\n    }\r\n\r\n    function getCountryName(countryCode) {\r\n      if (window.MC?.smsPhoneData?.smsProgramDataCountryNames && Array.isArray(window.MC.smsPhoneData.smsProgramDataCountryNames)) {\r\n        for (let i = 0; i < window.MC.smsPhoneData.smsProgramDataCountryNames.length; i++) {\r\n          if (window.MC.smsPhoneData.smsProgramDataCountryNames[i].code === countryCode) {\r\n            return window.MC.smsPhoneData.smsProgramDataCountryNames[i].name;\r\n          }\r\n        }\r\n      }\r\n      return countryCode;\r\n    }\r\n\r\n    function getDefaultPlaceholder(countryCode) {\r\n      if (!countryCode || typeof countryCode !== 'string') {\r\n        return '+1 000 000 0000'; \/\/ Default US placeholder\r\n      }\r\n      \r\n            var mockPlaceholders = [\r\n        {\r\n          countryCode: 'US',\r\n          placeholder: '+1 000 000 0000',\r\n          helpText: 'Include the US country code +1 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'GB',\r\n          placeholder: '+44 0000 000000',\r\n          helpText: 'Include the GB country code +44 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'CA',\r\n          placeholder: '+1 000 000 0000',\r\n          helpText: 'Include the CA country code +1 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'AU',\r\n          placeholder: '+61 000 000 000',\r\n          helpText: 'Include the AU country code +61 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'DE',\r\n          placeholder: '+49 000 0000000',\r\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die DE-L\u00e4ndervorwahl +49 ein',\r\n        },\r\n        {\r\n          countryCode: 'FR',\r\n          placeholder: '+33 0 00 00 00 00',\r\n          helpText: 'Incluez le code pays FR +33 avant le num\u00e9ro de t\u00e9l\u00e9phone',\r\n        },\r\n        {\r\n          countryCode: 'ES',\r\n          placeholder: '+34 000 000 000',\r\n          helpText: 'Incluya el c\u00f3digo de pa\u00eds ES +34 antes del n\u00famero de tel\u00e9fono',\r\n        },\r\n        {\r\n          countryCode: 'NL',\r\n          placeholder: '+31 0 00000000',\r\n          helpText: 'Voeg de NL-landcode +31 toe v\u00f3\u00f3r het telefoonnummer',\r\n        },\r\n        {\r\n          countryCode: 'BE',\r\n          placeholder: '+32 000 00 00 00',\r\n          helpText: 'Incluez le code pays BE +32 avant le num\u00e9ro de t\u00e9l\u00e9phone',\r\n        },\r\n        {\r\n          countryCode: 'CH',\r\n          placeholder: '+41 00 000 00 00',\r\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die CH-L\u00e4ndervorwahl +41 ein',\r\n        },\r\n        {\r\n          countryCode: 'AT',\r\n          placeholder: '+43 000 000 0000',\r\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die AT-L\u00e4ndervorwahl +43 ein',\r\n        },\r\n        {\r\n          countryCode: 'IE',\r\n          placeholder: '+353 00 000 0000',\r\n          helpText: 'Include the IE country code +353 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'IT',\r\n          placeholder: '+39 000 000 0000',\r\n          helpText: 'Includere il prefisso internazionale IT +39 prima del numero di telefono',\r\n        },\r\n        {\r\n          countryCode: 'NO',\r\n          placeholder: '+47 000 00 000',\r\n          helpText: 'Inkluder NO landskode +47 f\u00f8r telefonnummeret',\r\n        },\r\n        {\r\n          countryCode: 'SE',\r\n          placeholder: '+46 00 000 00 00',\r\n          helpText: 'Inkludera SE landskod +46 f\u00f6re telefonnumret',\r\n        },\r\n        {\r\n          countryCode: 'DK',\r\n          placeholder: '+45 00 00 00 00',\r\n          helpText: 'Inkluder DK landekode +45 f\u00f8r telefonnummeret',\r\n        },\r\n        {\r\n          countryCode: 'FI',\r\n          placeholder: '+358 00 000 0000',\r\n          helpText: 'Sis\u00e4llyt\u00e4 FI-maakoodi +358 ennen puhelinnumeroa',\r\n        },\r\n        {\r\n          countryCode: 'EE',\r\n          placeholder: '+372 0000 0000',\r\n          helpText: 'Lisage EE riigikood +372 telefoninumbri ette',\r\n        },\r\n        {\r\n          countryCode: 'PL',\r\n          placeholder: '+48 000 000 000',\r\n          helpText: 'Podaj numer kierunkowy PL +48 przed numerem telefonu',\r\n        },\r\n        {\r\n          countryCode: 'SK',\r\n          placeholder: '+421 000 000 000',\r\n          helpText: 'Pred telef\u00f3nne \u010d\u00edslo uve\u010fte k\u00f3d krajiny SK +421',\r\n        },\r\n        {\r\n          countryCode: 'LV',\r\n          placeholder: '+371 0000 0000',\r\n          helpText: 'Iek\u013caujiet LV valsts kodu +371 pirms t\u0101lru\u0146a numura',\r\n        },\r\n        {\r\n          countryCode: 'LT',\r\n          placeholder: '+370 0000 0000',\r\n          helpText: '\u012etraukite LT \u0161alies kod\u0105 +370 prie\u0161 telefono numer\u012f',\r\n        },\r\n        {\r\n          countryCode: 'GR',\r\n          placeholder: '+30 000 000 0000',\r\n          helpText: '\u03a3\u03c5\u03bc\u03c0\u03b5\u03c1\u03b9\u03bb\u03ac\u03b2\u03b5\u03c4\u03b5 \u03c4\u03bf\u03bd \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc \u03c7\u03ce\u03c1\u03b1\u03c2 GR +30 \u03c0\u03c1\u03b9\u03bd \u03b1\u03c0\u03cc \u03c4\u03bf\u03bd \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc \u03c4\u03b7\u03bb\u03b5\u03c6\u03ce\u03bd\u03bf\u03c5',\r\n        },\r\n        {\r\n          countryCode: 'PT',\r\n          placeholder: '+351 000 000 000',\r\n          helpText: 'Inclua o c\u00f3digo de pa\u00eds PT +351 antes do n\u00famero de telefone',\r\n        },\r\n        {\r\n          countryCode: 'HR',\r\n          placeholder: '+385 00 000 0000',\r\n          helpText: 'Uklju\u010dite HR pozivni broj dr\u017eave +385 prije telefonskog broja',\r\n        },\r\n        {\r\n          countryCode: 'SI',\r\n          placeholder: '+386 00 000 000',\r\n          helpText: 'Vklju\u010dite SI kodo dr\u017eave +386 pred telefonsko \u0161tevilko',\r\n        },\r\n        {\r\n          countryCode: 'IS',\r\n          placeholder: '+354 000 0000',\r\n          helpText: 'L\u00e1ttu IS landsn\u00famer +354 fylgja \u00e1 undan s\u00edman\u00famerinu',\r\n        },\r\n        {\r\n          countryCode: 'LU',\r\n          placeholder: '+352 000 000 000',\r\n          helpText: 'Incluez le code pays LU +352 avant le num\u00e9ro de t\u00e9l\u00e9phone',\r\n        },\r\n        {\r\n          countryCode: 'MC',\r\n          placeholder: '+377 00 00 00 00',\r\n          helpText: 'Incluez le code pays MC +377 avant le num\u00e9ro de t\u00e9l\u00e9phone',\r\n        },\r\n        {\r\n          countryCode: 'AD',\r\n          placeholder: '+376 000 000',\r\n          helpText: 'Incloeu el codi de pa\u00eds AD +376 abans del n\u00famero de tel\u00e8fon',\r\n        },\r\n        {\r\n          countryCode: 'JE',\r\n          placeholder: '+44 0000 000000',\r\n          helpText: 'Include the JE country code +44 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'IM',\r\n          placeholder: '+44 0000 000000',\r\n          helpText: 'Include the IM country code +44 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'GG',\r\n          placeholder: '+44 0000 000000',\r\n          helpText: 'Include the GG country code +44 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'AL',\r\n          placeholder: '+355 00 000 0000',\r\n          helpText: 'P\u00ebrfshini kodin e vendit AL +355 para numrit t\u00eb telefonit',\r\n        },\r\n        {\r\n          countryCode: 'SM',\r\n          placeholder: '+378 0000 000000',\r\n          helpText: 'Includere il prefisso internazionale SM +378 prima del numero di telefono',\r\n        },\r\n        {\r\n          countryCode: 'FO',\r\n          placeholder: '+298 000000',\r\n          helpText: 'Inkluder FO landekode +298 f\u00f8r telefonnummeret',\r\n        },\r\n        {\r\n          countryCode: 'MT',\r\n          placeholder: '+356 0000 0000',\r\n          helpText: 'Include the MT country code +356 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'LI',\r\n          placeholder: '+423 000 0000',\r\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die LI-L\u00e4ndervorwahl +423 ein',\r\n        },\r\n        {\r\n          countryCode: 'GI',\r\n          placeholder: '+350 000 00000',\r\n          helpText: 'Include the GI country code +350 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'MD',\r\n          placeholder: '+373 00 000 000',\r\n          helpText: 'Include\u021bi codul de \u021bar\u0103 MD +373 \u00eenaintea num\u0103rului de telefon',\r\n        },\r\n        {\r\n          countryCode: 'HU',\r\n          placeholder: '+36 00 000 0000',\r\n          helpText: 'A telefonsz\u00e1m el\u0151tt adja meg a HU orsz\u00e1gk\u00f3dot +36',\r\n        },\r\n        {\r\n          countryCode: 'NZ',\r\n          placeholder: '+64 00 000 0000',\r\n          helpText: 'Include the NZ country code +64 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'ME',\r\n          placeholder: '+382 00 000 000',\r\n          helpText: 'Uklju\u010dite ME pozivni broj dr\u017eave +382 prije telefonskog broja',\r\n        },\r\n      ];\r\n\r\n      const selectedPlaceholder = mockPlaceholders.find(function(item) {\r\n        return item &#038;&#038; item.countryCode === countryCode;\r\n      });\r\n      \r\n      return selectedPlaceholder ? selectedPlaceholder.placeholder : mockPlaceholders[0].placeholder;\r\n    }\r\n\r\n    function updatePlaceholder(countryCode, fieldName) {\r\n      if (!countryCode || !fieldName) {\r\n        return;\r\n      }\r\n      \r\n      const phoneInput = document.querySelector('#mce-' + fieldName);\r\n      if (!phoneInput) {\r\n        return;\r\n      }\r\n      \r\n      const placeholder = getDefaultPlaceholder(countryCode);\r\n      if (placeholder) {\r\n        phoneInput.placeholder = placeholder;\r\n      }\r\n    }\r\n\r\n    function updateCountryCodeInstruction(countryCode, fieldName) {\r\n      updatePlaceholder(countryCode, fieldName);\r\n      \r\n    }\r\n\r\n    function getDefaultHelpText(countryCode) {\r\n      var mockPlaceholders = [\r\n        {\r\n          countryCode: 'US',\r\n          placeholder: '+1 000 000 0000',\r\n          helpText: 'Include the US country code +1 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'GB',\r\n          placeholder: '+44 0000 000000',\r\n          helpText: 'Include the GB country code +44 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'CA',\r\n          placeholder: '+1 000 000 0000',\r\n          helpText: 'Include the CA country code +1 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'AU',\r\n          placeholder: '+61 000 000 000',\r\n          helpText: 'Include the AU country code +61 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'DE',\r\n          placeholder: '+49 000 0000000',\r\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die DE-L\u00e4ndervorwahl +49 ein',\r\n        },\r\n        {\r\n          countryCode: 'FR',\r\n          placeholder: '+33 0 00 00 00 00',\r\n          helpText: 'Incluez le code pays FR +33 avant le num\u00e9ro de t\u00e9l\u00e9phone',\r\n        },\r\n        {\r\n          countryCode: 'ES',\r\n          placeholder: '+34 000 000 000',\r\n          helpText: 'Incluya el c\u00f3digo de pa\u00eds ES +34 antes del n\u00famero de tel\u00e9fono',\r\n        },\r\n        {\r\n          countryCode: 'NL',\r\n          placeholder: '+31 0 00000000',\r\n          helpText: 'Voeg de NL-landcode +31 toe v\u00f3\u00f3r het telefoonnummer',\r\n        },\r\n        {\r\n          countryCode: 'BE',\r\n          placeholder: '+32 000 00 00 00',\r\n          helpText: 'Incluez le code pays BE +32 avant le num\u00e9ro de t\u00e9l\u00e9phone',\r\n        },\r\n        {\r\n          countryCode: 'CH',\r\n          placeholder: '+41 00 000 00 00',\r\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die CH-L\u00e4ndervorwahl +41 ein',\r\n        },\r\n        {\r\n          countryCode: 'AT',\r\n          placeholder: '+43 000 000 0000',\r\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die AT-L\u00e4ndervorwahl +43 ein',\r\n        },\r\n        {\r\n          countryCode: 'IE',\r\n          placeholder: '+353 00 000 0000',\r\n          helpText: 'Include the IE country code +353 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'IT',\r\n          placeholder: '+39 000 000 0000',\r\n          helpText: 'Includere il prefisso internazionale IT +39 prima del numero di telefono',\r\n        },\r\n        {\r\n          countryCode: 'NO',\r\n          placeholder: '+47 000 00 000',\r\n          helpText: 'Inkluder NO landskode +47 f\u00f8r telefonnummeret',\r\n        },\r\n        {\r\n          countryCode: 'SE',\r\n          placeholder: '+46 00 000 00 00',\r\n          helpText: 'Inkludera SE landskod +46 f\u00f6re telefonnumret',\r\n        },\r\n        {\r\n          countryCode: 'DK',\r\n          placeholder: '+45 00 00 00 00',\r\n          helpText: 'Inkluder DK landekode +45 f\u00f8r telefonnummeret',\r\n        },\r\n        {\r\n          countryCode: 'FI',\r\n          placeholder: '+358 00 000 0000',\r\n          helpText: 'Sis\u00e4llyt\u00e4 FI-maakoodi +358 ennen puhelinnumeroa',\r\n        },\r\n        {\r\n          countryCode: 'EE',\r\n          placeholder: '+372 0000 0000',\r\n          helpText: 'Lisage EE riigikood +372 telefoninumbri ette',\r\n        },\r\n        {\r\n          countryCode: 'PL',\r\n          placeholder: '+48 000 000 000',\r\n          helpText: 'Podaj numer kierunkowy PL +48 przed numerem telefonu',\r\n        },\r\n        {\r\n          countryCode: 'SK',\r\n          placeholder: '+421 000 000 000',\r\n          helpText: 'Pred telef\u00f3nne \u010d\u00edslo uve\u010fte k\u00f3d krajiny SK +421',\r\n        },\r\n        {\r\n          countryCode: 'LV',\r\n          placeholder: '+371 0000 0000',\r\n          helpText: 'Iek\u013caujiet LV valsts kodu +371 pirms t\u0101lru\u0146a numura',\r\n        },\r\n        {\r\n          countryCode: 'LT',\r\n          placeholder: '+370 0000 0000',\r\n          helpText: '\u012etraukite LT \u0161alies kod\u0105 +370 prie\u0161 telefono numer\u012f',\r\n        },\r\n        {\r\n          countryCode: 'GR',\r\n          placeholder: '+30 000 000 0000',\r\n          helpText: '\u03a3\u03c5\u03bc\u03c0\u03b5\u03c1\u03b9\u03bb\u03ac\u03b2\u03b5\u03c4\u03b5 \u03c4\u03bf\u03bd \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc \u03c7\u03ce\u03c1\u03b1\u03c2 GR +30 \u03c0\u03c1\u03b9\u03bd \u03b1\u03c0\u03cc \u03c4\u03bf\u03bd \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc \u03c4\u03b7\u03bb\u03b5\u03c6\u03ce\u03bd\u03bf\u03c5',\r\n        },\r\n        {\r\n          countryCode: 'PT',\r\n          placeholder: '+351 000 000 000',\r\n          helpText: 'Inclua o c\u00f3digo de pa\u00eds PT +351 antes do n\u00famero de telefone',\r\n        },\r\n        {\r\n          countryCode: 'HR',\r\n          placeholder: '+385 00 000 0000',\r\n          helpText: 'Uklju\u010dite HR pozivni broj dr\u017eave +385 prije telefonskog broja',\r\n        },\r\n        {\r\n          countryCode: 'SI',\r\n          placeholder: '+386 00 000 000',\r\n          helpText: 'Vklju\u010dite SI kodo dr\u017eave +386 pred telefonsko \u0161tevilko',\r\n        },\r\n        {\r\n          countryCode: 'IS',\r\n          placeholder: '+354 000 0000',\r\n          helpText: 'L\u00e1ttu IS landsn\u00famer +354 fylgja \u00e1 undan s\u00edman\u00famerinu',\r\n        },\r\n        {\r\n          countryCode: 'LU',\r\n          placeholder: '+352 000 000 000',\r\n          helpText: 'Incluez le code pays LU +352 avant le num\u00e9ro de t\u00e9l\u00e9phone',\r\n        },\r\n        {\r\n          countryCode: 'MC',\r\n          placeholder: '+377 00 00 00 00',\r\n          helpText: 'Incluez le code pays MC +377 avant le num\u00e9ro de t\u00e9l\u00e9phone',\r\n        },\r\n        {\r\n          countryCode: 'AD',\r\n          placeholder: '+376 000 000',\r\n          helpText: 'Incloeu el codi de pa\u00eds AD +376 abans del n\u00famero de tel\u00e8fon',\r\n        },\r\n        {\r\n          countryCode: 'JE',\r\n          placeholder: '+44 0000 000000',\r\n          helpText: 'Include the JE country code +44 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'IM',\r\n          placeholder: '+44 0000 000000',\r\n          helpText: 'Include the IM country code +44 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'GG',\r\n          placeholder: '+44 0000 000000',\r\n          helpText: 'Include the GG country code +44 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'AL',\r\n          placeholder: '+355 00 000 0000',\r\n          helpText: 'P\u00ebrfshini kodin e vendit AL +355 para numrit t\u00eb telefonit',\r\n        },\r\n        {\r\n          countryCode: 'SM',\r\n          placeholder: '+378 0000 000000',\r\n          helpText: 'Includere il prefisso internazionale SM +378 prima del numero di telefono',\r\n        },\r\n        {\r\n          countryCode: 'FO',\r\n          placeholder: '+298 000000',\r\n          helpText: 'Inkluder FO landekode +298 f\u00f8r telefonnummeret',\r\n        },\r\n        {\r\n          countryCode: 'MT',\r\n          placeholder: '+356 0000 0000',\r\n          helpText: 'Include the MT country code +356 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'LI',\r\n          placeholder: '+423 000 0000',\r\n          helpText: 'F\u00fcgen Sie vor der Telefonnummer die LI-L\u00e4ndervorwahl +423 ein',\r\n        },\r\n        {\r\n          countryCode: 'GI',\r\n          placeholder: '+350 000 00000',\r\n          helpText: 'Include the GI country code +350 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'MD',\r\n          placeholder: '+373 00 000 000',\r\n          helpText: 'Include\u021bi codul de \u021bar\u0103 MD +373 \u00eenaintea num\u0103rului de telefon',\r\n        },\r\n        {\r\n          countryCode: 'HU',\r\n          placeholder: '+36 00 000 0000',\r\n          helpText: 'A telefonsz\u00e1m el\u0151tt adja meg a HU orsz\u00e1gk\u00f3dot +36',\r\n        },\r\n        {\r\n          countryCode: 'NZ',\r\n          placeholder: '+64 00 000 0000',\r\n          helpText: 'Include the NZ country code +64 before the phone number',\r\n        },\r\n        {\r\n          countryCode: 'ME',\r\n          placeholder: '+382 00 000 000',\r\n          helpText: 'Uklju\u010dite ME pozivni broj dr\u017eave +382 prije telefonskog broja',\r\n        },\r\n      ];\r\n      \r\n      if (!countryCode || typeof countryCode !== 'string') {\r\n        return mockPlaceholders[0].helpText;\r\n      }\r\n      \r\n      const selectedHelpText = mockPlaceholders.find(function(item) {\r\n          return item &#038;&#038; item.countryCode === countryCode;\r\n        });\r\n        \r\n        return selectedHelpText ? selectedHelpText.helpText : mockPlaceholders[0].helpText;\r\n    }\r\n\r\n    function setDefaultHelpText(countryCode) {\r\n      const helpTextSpan = document.querySelector('#help-text');\r\n      if (!helpTextSpan) {\r\n        return;\r\n      }\r\n\r\n        \r\n    }\r\n\r\n    function updateHelpTextCountryCode(countryCode, fieldName) {\r\n      if (!countryCode || !fieldName) {\r\n        return;\r\n      }\r\n      \r\n      setDefaultHelpText(countryCode);\r\n    }\r\n\r\n    function initializeSmsPhoneDropdown(fieldName) {\r\n      if (!fieldName || typeof fieldName !== 'string') {\r\n        return;\r\n      }\r\n      \r\n      const dropdown = document.querySelector('#country-select-' + fieldName);\r\n      const displayFlag = document.querySelector('#flag-display-' + fieldName);\r\n      \r\n      if (!dropdown || !displayFlag) {\r\n        return;\r\n      }\r\n\r\n      const smsPhoneData = window.MC?.smsPhoneData;\r\n      if (smsPhoneData &#038;&#038; smsPhoneData.programs &#038;&#038; Array.isArray(smsPhoneData.programs)) {\r\n        dropdown.innerHTML = generateDropdownOptions(smsPhoneData.programs);\r\n      }\r\n\r\n      const defaultProgram = getDefaultCountryProgram(smsPhoneData?.defaultCountryCode, smsPhoneData?.programs);\r\n      if (defaultProgram &#038;&#038; defaultProgram.countryCode) {\r\n        dropdown.value = defaultProgram.countryCode;\r\n        \r\n        const flagSpan = displayFlag?.querySelector('#flag-emoji-' + fieldName);\r\n        if (flagSpan) {\r\n          flagSpan.textContent = getCountryUnicodeFlag(defaultProgram.countryCode);\r\n          flagSpan.setAttribute('aria-label', sanitizeHtml(defaultProgram.countryCode) + ' flag');\r\n        }\r\n        \r\n        updateSmsLegalText(defaultProgram.countryCode, fieldName);\r\n        updatePlaceholder(defaultProgram.countryCode, fieldName);\r\n        updateCountryCodeInstruction(defaultProgram.countryCode, fieldName);\r\n      }\r\n\r\n     \r\n      var smsNotRequiredRemoveCountryCodeEnabled = true;\r\n      var smsField = Object.values({\"EMAIL\":{\"name\":\"EMAIL\",\"label\":\"Email Address\",\"helper_text\":\"\",\"type\":\"email\",\"required\":true,\"audience_field_name\":\"Email Address\",\"merge_id\":0,\"help_text_enabled\":false,\"enabled\":true,\"order\":0,\"field_type\":\"merge\"},\"FNAME\":{\"name\":\"FNAME\",\"label\":\"First Name\",\"helper_text\":\"\",\"type\":\"text\",\"required\":false,\"audience_field_name\":\"First Name\",\"merge_id\":1,\"help_text_enabled\":false,\"enabled\":true,\"order\":1,\"field_type\":\"merge\"},\"LNAME\":{\"name\":\"LNAME\",\"label\":\"Last Name\",\"helper_text\":\"\",\"type\":\"text\",\"required\":false,\"audience_field_name\":\"Last Name\",\"merge_id\":2,\"help_text_enabled\":false,\"enabled\":true,\"order\":2,\"field_type\":\"merge\"},\"PHONE\":{\"name\":\"PHONE\",\"label\":\"Phone Number\",\"helper_text\":\"\",\"type\":\"phone\",\"required\":false,\"audience_field_name\":\"Phone Number\",\"phoneformat\":\"\",\"enabled\":false,\"order\":null,\"field_type\":\"merge\",\"merge_id\":4},\"COMPANY\":{\"name\":\"COMPANY\",\"label\":\"Company\",\"helper_text\":\"\",\"type\":\"text\",\"required\":false,\"audience_field_name\":\"Company\",\"enabled\":false,\"order\":null,\"field_type\":\"merge\",\"merge_id\":6}}).find(function(f) { return f.name === fieldName &#038;&#038; f.type === 'smsphone'; });\r\n      var isRequired = smsField ? smsField.required : false;\r\n      var shouldAppendCountryCode = smsNotRequiredRemoveCountryCodeEnabled ? isRequired : true;\r\n      \r\n      var phoneInput = document.querySelector('#mce-' + fieldName);\r\n      if (phoneInput &#038;&#038; defaultProgram.countryCallingCode &#038;&#038; shouldAppendCountryCode) {\r\n        phoneInput.value = defaultProgram.countryCallingCode;\r\n      }\r\n      \r\n\r\n\r\n      displayFlag?.addEventListener('click', function(e) {\r\n        dropdown.focus();\r\n      });\r\n\r\n\r\n      dropdown?.addEventListener('change', function() {\r\n        const selectedCountry = this.value;\r\n        \r\n        if (!selectedCountry || typeof selectedCountry !== 'string') {\r\n          return;\r\n        }\r\n        \r\n        const flagSpan = displayFlag?.querySelector('#flag-emoji-' + fieldName);\r\n        if (flagSpan) {\r\n          flagSpan.textContent = getCountryUnicodeFlag(selectedCountry);\r\n          flagSpan.setAttribute('aria-label', sanitizeHtml(selectedCountry) + ' flag');\r\n        }\r\n\r\n         \r\n        const selectedProgram = window.MC?.smsPhoneData?.programs.find(function(program) {\r\n          return program &#038;&#038; program.countryCode === selectedCountry;\r\n        });\r\n\r\n        var smsNotRequiredRemoveCountryCodeEnabled = true;\r\n        var smsField = Object.values({\"EMAIL\":{\"name\":\"EMAIL\",\"label\":\"Email Address\",\"helper_text\":\"\",\"type\":\"email\",\"required\":true,\"audience_field_name\":\"Email Address\",\"merge_id\":0,\"help_text_enabled\":false,\"enabled\":true,\"order\":0,\"field_type\":\"merge\"},\"FNAME\":{\"name\":\"FNAME\",\"label\":\"First Name\",\"helper_text\":\"\",\"type\":\"text\",\"required\":false,\"audience_field_name\":\"First Name\",\"merge_id\":1,\"help_text_enabled\":false,\"enabled\":true,\"order\":1,\"field_type\":\"merge\"},\"LNAME\":{\"name\":\"LNAME\",\"label\":\"Last Name\",\"helper_text\":\"\",\"type\":\"text\",\"required\":false,\"audience_field_name\":\"Last Name\",\"merge_id\":2,\"help_text_enabled\":false,\"enabled\":true,\"order\":2,\"field_type\":\"merge\"},\"PHONE\":{\"name\":\"PHONE\",\"label\":\"Phone Number\",\"helper_text\":\"\",\"type\":\"phone\",\"required\":false,\"audience_field_name\":\"Phone Number\",\"phoneformat\":\"\",\"enabled\":false,\"order\":null,\"field_type\":\"merge\",\"merge_id\":4},\"COMPANY\":{\"name\":\"COMPANY\",\"label\":\"Company\",\"helper_text\":\"\",\"type\":\"text\",\"required\":false,\"audience_field_name\":\"Company\",\"enabled\":false,\"order\":null,\"field_type\":\"merge\",\"merge_id\":6}}).find(function(f) { return f.name === fieldName &#038;&#038; f.type === 'smsphone'; });\r\n        var isRequired = smsField ? smsField.required : false;\r\n        var shouldAppendCountryCode = smsNotRequiredRemoveCountryCodeEnabled ? isRequired : true;\r\n        \r\n        var phoneInput = document.querySelector('#mce-' + fieldName);\r\n        if (phoneInput &#038;&#038; selectedProgram.countryCallingCode &#038;&#038; shouldAppendCountryCode) {\r\n          phoneInput.value = selectedProgram.countryCallingCode;\r\n        }\r\n        \r\n        \r\n        updateSmsLegalText(selectedCountry, fieldName);\r\n        updatePlaceholder(selectedCountry, fieldName);\r\n        updateCountryCodeInstruction(selectedCountry, fieldName);\r\n      });\r\n    }\r\n\r\n    document.addEventListener('DOMContentLoaded', function() {\r\n      const smsPhoneFields = document.querySelectorAll('[id^=\"country-select-\"]');\r\n      \r\n      smsPhoneFields.forEach(function(dropdown) {\r\n        const fieldName = dropdown?.id.replace('country-select-', '');\r\n        initializeSmsPhoneDropdown(fieldName);\r\n      });\r\n    });\r\n    <\/script><\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The BU Population Science Seminar Series (BU PopSci) is an interdisciplinary forum connecting established and emerging scholars in demography, population health, epidemiology, economics, and related fields. Upcoming Seminars Join the Mailing List About the Series A Forum for Innovative Population Research The Boston University Population Science Seminar Series (BU PopSci) brings together established and emerging [&hellip;]<\/p>\n","protected":false},"author":25693,"featured_media":23,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/no-sidebars.php","meta":[],"_links":{"self":[{"href":"https:\/\/sites.bu.edu\/popsciseminar\/wp-json\/wp\/v2\/pages\/5"}],"collection":[{"href":"https:\/\/sites.bu.edu\/popsciseminar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.bu.edu\/popsciseminar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/popsciseminar\/wp-json\/wp\/v2\/users\/25693"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/popsciseminar\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":50,"href":"https:\/\/sites.bu.edu\/popsciseminar\/wp-json\/wp\/v2\/pages\/5\/revisions"}],"predecessor-version":[{"id":191,"href":"https:\/\/sites.bu.edu\/popsciseminar\/wp-json\/wp\/v2\/pages\/5\/revisions\/191"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/popsciseminar\/wp-json\/wp\/v2\/media\/23"}],"wp:attachment":[{"href":"https:\/\/sites.bu.edu\/popsciseminar\/wp-json\/wp\/v2\/media?parent=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}