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AEhB,YAAc/I,EAChBvB,EAAQuK,UAAUrN,OAAOiN,EAAQE,QAASF,EAAQxK,OAElDK,EAAQuK,UAAUrN,OAAOiN,EAAQC,SAInCpK,EAAQuK,UAAUC,IAAIL,EAAQ5I,GAAQ,GAE1C,CajKIkJ,CAAqBzJ,KAAKhB,QAAS2B,GAE/B,YAAcJ,IAChByI,IAAAA,IAAYC,GAAY,EAAM,CAAE1O,QAAS,KACzCyF,KAAK0J,OAAOvD,OAEhB,CAKApM,IAAAA,GACE,MAAM,KAAE8F,GAASG,KAAKf,SACtBe,KAAK0J,OAAS,IAAIlE,EAAmBxF,KAAKhB,SAG1CgB,KAAK0J,OAAOxD,OAEZrG,EAAKhC,iBAAiB,qBAAsBmC,KAAK+I,gBACnD,GDlDAjN,KAAM,eACNsC,cAAe,CACbyB,KAAM","sources":["webpack://sciencenews/./node_modules/js-cookie/src/js.cookie.js","webpack://sciencenews/webpack/bootstrap","webpack://sciencenews/webpack/runtime/compat get default export","webpack://sciencenews/webpack/runtime/define property getters","webpack://sciencenews/webpack/runtime/hasOwnProperty shorthand","webpack://sciencenews/./node_modules/js-component-framework/es/domContentLoaded.js","webpack://sciencenews/./node_modules/js-component-framework/es/componentProvider.js","webpack://sciencenews/./node_modules/js-component-framework/es/componentLoader.js","webpack://sciencenews/./client/src/js/utils/FormAssemblySubmit.js","webpack://sciencenews/./client/src/components/form-assembly/index.js","webpack://sciencenews/./client/src/components/form-assembly/form-assembly.js","webpack://sciencenews/./node_modules/aria-components/src/AriaComponent.js","webpack://sciencenews/./node_modules/aria-components/src/lib/keyCodes.js","webpack://sciencenews/./node_modules/aria-components/src/lib/rovingTabIndex.js","webpack://sciencenews/./client/src/js/utils/ProgrammaticDialog.js","webpack://sciencenews/./node_modules/aria-components/src/lib/interactiveChildren.js","webpack://sciencenews/./node_modules/aria-components/src/lib/getFirstAndLastItems.js","webpack://sciencenews/./client/src/js/utils/toArray.js","webpack://sciencenews/./node_modules/aria-components/src/lib/uniqueId.js","webpack://sciencenews/./client/src/components/restricted-content/restrictedContentCookieName.js","webpack://sciencenews/./client/src/components/restricted-content/modal-signup/index.js","webpack://sciencenews/./client/src/components/restricted-content/modal-signup/modal-signup.js"],"sourcesContent":["/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t// character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/* eslint consistent-return: [\"error\", { \"treatUndefinedAsUnspecified\": true }] */\n\n/**\n * Executes the given callback when DOMContentLoaded is ready.\n *\n * @param {function} callback Callback to execute once DOMContentLoaded completes.\n */\nfunction domContentLoaded(callback) {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n return void callback(); // eslint-disable-line no-void\n }\n\n document.addEventListener('DOMContentLoaded', callback, {\n once: true\n });\n}\nexport default domContentLoaded;","import componentLoader from './componentLoader';\n\n/**\n * Compile component elements and DOM attachments.\n *\n * @param {Object} config The component config.\n * @returns {Function|undefined} A function to initialize the component.\n */\nexport default function componentProvider(config) {\n const {\n component: Component,\n load,\n // default value omitted so `componentLoader` can use its default.\n name,\n querySelector = {},\n querySelectorAll = {},\n options = {}\n } = config;\n if (typeof Component !== 'function') {\n return undefined;\n }\n\n /**\n * Collect component arguments based on the config.\n *\n * @returns {array} Array of arguments.\n */\n const getComponentArgs = () => {\n // Set component selector, preferring the `name` property.\n const selector = undefined === name ? config === null || config === void 0 ? void 0 : config.root : `[data-component='${name}']`;\n let componentEls;\n\n // Test for a valid selector.\n try {\n componentEls = document.querySelectorAll(selector);\n } catch (e) {\n console.error(e); // eslint-disable-line no-console\n return [];\n }\n\n // No component elements found.\n if (componentEls.length < 1) {\n console.log(`No elements found for ${selector}`); // eslint-disable-line no-console\n return [];\n }\n return Array.from(componentEls).map(element => {\n const children = {};\n\n // Select single child nodes.\n Object.keys(querySelector).forEach(elementKey => {\n children[elementKey] = element.querySelector(querySelector[elementKey]);\n });\n\n // Select groups of child nodes.\n Object.keys(querySelectorAll).forEach(elementKey => {\n const nodeList = element.querySelectorAll(querySelectorAll[elementKey]);\n children[elementKey] = Array.from(nodeList);\n });\n return {\n element,\n children,\n options\n };\n });\n };\n\n /**\n * The provider function.\n *\n * Finds DOM nodes upon which the component should be initialized, collects\n * references to child nodes thereof, and passes these as arguments to each\n * instance of the component.\n */\n const init = () => {\n const componentArgs = getComponentArgs();\n componentArgs.forEach(args => new Component(args));\n };\n\n // Return the provider function for later execution.\n if (load === false) {\n return init;\n }\n\n /*\n * Call the provider function so it is executed as soon as the document is\n * parsed and loaded.\n *\n * This is a convenience option and is functionally identical to setting\n * `config.load` to false and calling the provider function later in the script.\n */\n if (load === true) {\n return void init(); // eslint-disable-line no-void\n }\n\n // Use the handler defined in the `load` config property.\n return void componentLoader(init, load); // eslint-disable-line no-void\n}","import domContentLoaded from './domContentLoaded';\n\n/**\n * Execute the given function according to the `load` parameter.\n *\n * @param {function} init The function to execute.\n * @param {boolean|array|function} load The loading instructions.\n */\nexport default function componentLoader(init) {\n let load = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : domContentLoaded;\n if (init) {\n if (typeof load === 'function') {\n load(init);\n } else if (Array.isArray(load)) {\n const [element, event] = load;\n\n // e.g., load: [window, 'load']\n element === null || element === void 0 ? void 0 : element.addEventListener(event, init);\n }\n }\n}","/**\n * Component for submitting Form Assembly forms.\n */\nclass FormAssemblySubmit {\n /**\n * Start the component.\n */\n constructor(form) {\n if (null == form || ! (form instanceof HTMLFormElement)) {\n throw new Error('Invalid form element.');\n }\n\n /**\n * The form to act upon.\n *\n * @type {HTMLFormElement}\n */\n this.form = form;\n\n // Bind class methods.\n this.validateEmailInput = this.validateEmailInput.bind(this);\n this.formSubmit = this.formSubmit.bind(this);\n this.checkEmailInput = this.checkEmailInput.bind(this);\n this.updateState = this.updateState.bind(this);\n this.updateReadyState = this.updateReadyState.bind(this);\n\n this.init();\n }\n\n /**\n * Dispatch the `sn.formstatechange` event.\n *\n * @param {String} status The form status.\n */\n updateState(status) {\n const event = new CustomEvent(\n 'sn.formstatechange',\n {\n bubbles: true,\n composed: true,\n detail: {\n status,\n },\n },\n );\n\n this.form.dispatchEvent(event);\n }\n\n /**\n * Update the form ready state and dispatch the `sn.formready` event.\n */\n updateReadyState() {\n Object.defineProperty(\n this.form,\n 'faReadyState',\n { value: 'ready', configurable: true },\n );\n\n const event = new CustomEvent(\n 'sn.formready',\n {\n bubbles: true,\n composed: true,\n detail: {},\n },\n );\n\n this.form.dispatchEvent(event);\n }\n\n /**\n * Initialize the Form Assembly helper.\n */\n init() {\n this.emailInput = this.form.querySelector('[name=\"email\"]');\n this.nonceInput = this.form.querySelector('[name=\"nonce\"]');\n this.submit = this.form.querySelector('[type=\"submit\"]');\n this.honeyPot = this.form.querySelector('[name=\"client_key\"]');\n this.formId = this.form.querySelector('[name=\"form_id\"]');\n this.control = this.form.querySelector('[name=\"control\"]');\n\n if (null != this.emailInput) {\n this.form.addEventListener('submit', this.formSubmit);\n this.emailInput.addEventListener('input', this.checkEmailInput);\n\n // Signal that the form is ready.\n this.updateReadyState();\n }\n }\n\n /**\n * Remove the invalid state when the input value is updated.\n */\n checkEmailInput() {\n if (null !== this.emailInput.getAttribute('aria-invalid')) {\n this.emailInput.removeAttribute('aria-invalid');\n }\n }\n\n /**\n * Ensure the email value is valid according to the input's `pattern` attribute.\n *\n * @returns {Boolean}\n */\n validateEmailInput() {\n const { value, pattern } = this.emailInput;\n\n const patternRegExp = new RegExp(pattern);\n const fieldValue = value.trim();\n\n return (0 < value.trim().length && patternRegExp.test(fieldValue));\n }\n\n /**\n * Form submission.\n *\n * @param {Event} event The event object.\n */\n formSubmit(event) { // eslint-disable-line consistent-return\n event.preventDefault();\n\n if (! this.validateEmailInput()) {\n this.emailInput.setAttribute('aria-invalid', 'true');\n return false;\n }\n\n const { pathname, search } = window.location;\n\n // Get hidden input values.\n const honeyPotValue = (this.honeyPot?.value) ? this.honeyPot.value : '';\n const nonceValue = this.nonceInput.value;\n const formId = this.formId.value;\n const control = this.control.value;\n\n // Email is the only forward-facing input.\n const emailValue = encodeURIComponent(this.emailInput.value);\n\n // Disable and clear error state.\n this.emailInput.removeAttribute('aria-invalid');\n this.updateState('loading');\n\n // Build request string.\n const parts = [\n `client_key=${honeyPotValue}`,\n `control=${control}`,\n `email=${emailValue}`,\n `form_id=${formId}`,\n `page=${pathname}`,\n ];\n const string = `${parts.join('&')}${search}`;\n\n const request = new XMLHttpRequest();\n\n // Make AJAX request.\n request.open('POST', this.form.action, true);\n request.setRequestHeader(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=UTF-8',\n );\n request.setRequestHeader('X-WP-Nonce', nonceValue);\n request.send(encodeURI(string));\n\n // On completion.\n request.onreadystatechange = () => {\n if (request.readyState === XMLHttpRequest.DONE) {\n const { status } = request;\n\n if (0 === status || (200 <= status && 400 > status)) {\n this.updateState('success');\n } else {\n this.updateState('error');\n }\n }\n };\n }\n}\n\n/**\n * Update classes to reflect the form state.\n *\n * @param {HTMLElement} element The element upon which state classes should be applied\n * @param {Object} details The event details.\n */\nfunction setFormAssemblyState(element, { status }) {\n const classes = {\n loading: 'login-form--loading',\n success: 'login-form--success',\n error: 'login-form--error',\n };\n\n requestAnimationFrame(() => {\n // Clear state classes.\n if ('loading' === status) {\n element.classList.remove(classes.success, classes.error);\n } else {\n element.classList.remove(classes.loading);\n }\n\n // Add the status class.\n element.classList.add(classes[status]);\n });\n}\n\nexport {\n FormAssemblySubmit,\n setFormAssemblyState,\n};\n","import { componentProvider } from 'js-component-framework';\nimport FormAssembly from './form-assembly';\nimport './form-assembly.scss';\n\nconst formAssemblyConfig = {\n name: 'form-assembly',\n component: FormAssembly,\n};\n\ncomponentProvider(formAssemblyConfig);\n","import { FormAssemblySubmit } from 'js/utils/FormAssemblySubmit';\n\n/**\n * Component for Form Assembly component.\n */\nexport default class FormAssembly {\n /**\n * Start the component.\n */\n constructor({ element, children, options }) {\n this.element = element;\n this.children = children;\n this.options = options;\n\n // Bind class methods.\n this.init = this.init.bind(this);\n\n this.init();\n }\n\n /**\n * Initialize a FormAssemblySubmit instance.\n */\n init() {\n this.formAssemblySubmit = new FormAssemblySubmit(this.element);\n }\n}\n","/**\n * Class for facilitating accessible components.\n */\nexport default class AriaComponent {\n /**\n * Create an AriaComponent.\n * @constructor\n */\n constructor() {\n /**\n * Component state.\n *\n * @type {object}\n */\n this.state = {};\n\n /**\n * Save search characters\n *\n * @type {string}\n */\n this.searchString = '';\n\n /**\n * Saved reference elements.\n *\n * @type {Array}\n */\n this.referenceElements = [];\n\n // Bind class methods.\n this.setState = this.setState.bind(this);\n this.getState = this.getState.bind(this);\n this.setSelfReference = this.setSelfReference.bind(this);\n this.warnDeprecated = this.warnDeprecated.bind(this);\n }\n\n /**\n * Set component state.\n *\n * @param {object} newState The new state to merge with existing state.\n */\n setState(newState) {\n Object.assign(this.state, newState);\n\n if ('function' === typeof this.stateWasUpdated) {\n this.stateWasUpdated();\n }\n }\n\n /**\n * Set a reference to the class instance on the element upon which the class\n * is instantiated.\n *\n * @param {array} elements An array of elements upon which to add a reference to `this`.\n */\n setSelfReference(elements) {\n const referenceElements = [...elements].map((element) => {\n Object.defineProperty(\n element,\n this.componentName.toLowerCase(),\n { value: this, configurable: true }\n );\n\n return element;\n });\n\n this.referenceElements = [...this.referenceElements, ...referenceElements];\n }\n\n /**\n * Delete self references from component elements.\n */\n deleteSelfReferences() {\n this.referenceElements.forEach((element) => {\n delete element[this.componentName.toLowerCase()];\n });\n }\n\n /**\n * Return the current component state.\n *\n * @return {object}\n */\n getState() {\n return this.state;\n }\n\n /**\n * Warn about deprecated config properties.\n *\n * @param {string} name The name of the class instance.\n * @param {string} unsupported The deprecated config value.\n * @param {string} supported The newly supported config value, if any.\n */\n warnDeprecated(unsupported, supported = false) {\n const use = supported ? `Use ${supported} instead.` : '';\n // eslint-disable-next-line no-console, max-len\n console.warn(\n `${this.componentName}:`,\n `${unsupported} is deprecated.`,\n `${use}`\n );\n }\n}\n","/**\n * Event keyCode values mapped to a key name.\n */\nconst keyCodes = Object.freeze({\n TAB: 9,\n RETURN: 13,\n ESC: 27,\n SPACE: 32,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n});\n\nexport default keyCodes;\n","/**\n * Create an array from a value.\n *\n * @param {Mixed} maybeAnArray An HTMLElement, NodeList, or Array of elements.\n */\nfunction toArray(maybeAnArray) {\n if (Array.isArray(maybeAnArray)) {\n return maybeAnArray;\n }\n\n let shouldBeAnArray = [];\n\n if (maybeAnArray instanceof HTMLElement) {\n // Convert element(s) to an Array.\n shouldBeAnArray = new Array(maybeAnArray);\n } else if (\n maybeAnArray instanceof NodeList\n || maybeAnArray instanceof HTMLCollection\n ) {\n // Array.from(maybeAnArray);\n shouldBeAnArray = Array.prototype.slice.call(maybeAnArray, 0);\n }\n\n return shouldBeAnArray;\n}\n\n/**\n * Remove the tabIndex attribute from all elements.\n *\n * @param {Mixed} items An HTMLElement, NodeList, or array of elements.\n */\nfunction tabIndexAllow(items) {\n const allowedElements = Array.isArray(items) ? items : toArray(items);\n\n allowedElements.forEach((item) => {\n item.removeAttribute('tabindex');\n });\n}\n\n/**\n * Add a negative tabIndex attribute to all elements.\n *\n * @param {Mixed} items An HTMLElement, NodeList, or Array of elements.\n */\nfunction tabIndexDeny(items) {\n const deniedElements = Array.isArray(items) ? items : toArray(items);\n\n deniedElements.forEach((item) => {\n item.setAttribute('tabindex', '-1');\n });\n}\n\n/**\n * Manage items' tabindex.\n *\n * @param {NodeList|Array} items The items whose tabindex may need updating.\n * @param {HTMLElement|NodeList|Array} allow The item to which we'll allow tabbing.\n */\nfunction rovingTabIndex(items, allow) {\n const allowedElements = Array.isArray(allow) ? allow : toArray(allow);\n const allItems = Array.isArray(items) ? items : toArray(items);\n\n tabIndexAllow(allowedElements);\n\n if (0 < allItems.length) {\n const deniedElements = allItems.filter((item) => (\n ! allowedElements.includes(item)\n ));\n tabIndexDeny(deniedElements);\n }\n}\n\nexport {\n rovingTabIndex,\n tabIndexAllow,\n tabIndexDeny,\n toArray,\n};\n","import { AriaComponent } from 'aria-components';\nimport {\n interactiveChildren,\n keyCodes,\n getFirstAndLastItems,\n tabIndexDeny,\n tabIndexAllow,\n setUniqueId,\n} from 'aria-components/utils';\nimport toArray from 'js/utils/toArray';\n\n/**\n * Class to set up a programmatic Dialog element to be displayed without user interaction.\n */\nexport default class ProgrammaticDialog extends AriaComponent {\n /**\n * Create a Dialog.\n * @constructor\n *\n * @param {object} config The config object.\n */\n constructor(target, config) {\n super(config);\n\n // A target element is required.\n if (null == target) {\n throw new Error('Configuration error: A target element is required.');\n }\n\n /**\n * The dialog element.\n *\n * @type {HTMLElement}\n */\n this.target = target;\n\n /**\n * The component name.\n *\n * @type {string}\n */\n this.componentName = 'ProgrammaticDialog';\n\n /**\n * Options shape.\n *\n * @type {object}\n */\n const options = {\n /**\n * The element(s) to be hidden when the Dialog is visible. The elements\n * wrapping all site content with the sole exception of the dialog element.\n *\n * @type {HTMLElement|NodeList|Array}\n */\n content: [],\n\n /**\n * Callback to run after the component initializes.\n *\n * @callback initCallback\n */\n onInit: () => {},\n\n /**\n * Callback to run after component state is updated.\n *\n * @callback stateChangeCallback\n */\n onStateChange: () => {},\n\n /**\n * Callback to run after the component is destroyed.\n *\n * @callback destroyCallback\n */\n onDestroy: () => {},\n };\n\n // Merge config options with defaults and save all as instance properties.\n Object.assign(this, options, config);\n\n // Bind class methods\n this.init = this.init.bind(this);\n this.handleTargetKeydown = this.handleTargetKeydown.bind(this);\n this.hideOnOutsideClick = this.hideOnOutsideClick.bind(this);\n this.handleKeydownEsc = this.handleKeydownEsc.bind(this);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this);\n this.destroy = this.destroy.bind(this);\n this.stateWasUpdated = this.stateWasUpdated.bind(this);\n this.setInteractiveChildren = this.setInteractiveChildren.bind(this);\n this.setDialogController = this.setDialogController.bind(this);\n this.controllerClick = this.controllerClick.bind(this);\n\n /*\n * Initialize the component.\n */\n this.init();\n }\n\n /**\n * Set the Dialog controller.\n *\n * By default, the Dialog will not have a controller; use this method on an\n * instance to add a controller.\n */\n setDialogController(controller) {\n this.controller = controller;\n super.setSelfReference([this.controller]);\n\n /**\n * Check if the controller is a button, but only if it doesn't already have\n * a role attribute, since we'll be adding the role and allowing focus.\n *\n * @type {bool}\n */\n this.controllerIsNotAButton = (\n 'BUTTON' !== this.controller.nodeName\n && null === this.controller.getAttribute('role')\n );\n\n /*\n * Use the button role on non-button elements.\n */\n if (this.controllerIsNotAButton) {\n // https://www.w3.org/TR/wai-aria-1.1/#button\n this.controller.setAttribute('role', 'button');\n this.controller.setAttribute('tabindex', '0');\n }\n\n this.controller.setAttribute('aria-expanded', 'false');\n\n this.controller.addEventListener('click', this.controllerClick);\n this.controller.addEventListener('keydown', this.controllerKeydown);\n }\n\n /**\n * Collect the Dialog's interactive child elements.\n */\n setInteractiveChildren() {\n this.interactiveChildElements = interactiveChildren(this.target);\n\n const [\n firstInteractiveChild,\n lastInteractiveChild,\n ] = getFirstAndLastItems(this.interactiveChildElements);\n\n // Save as instance properties.\n this.firstInteractiveChild = firstInteractiveChild;\n this.lastInteractiveChild = lastInteractiveChild;\n }\n\n /**\n * Set the component's DOM attributes and event listeners.\n */\n init() {\n // Get the content items if none are provided.\n if (0 === this.content.length || null == this.content) {\n this.content = Array.from(document.body.children)\n .filter((child) => ! child.contains(this.target));\n } else {\n this.content = toArray(this.content);\n }\n\n // If no content is found.\n if (0 === this.content.length) {\n // eslint-disable-next-line max-len\n throw new Error('Configuration error: The Dialog target should not be within the main site content.');\n }\n\n /*\n * A reference to the class instance added to the target element to enable\n * external interactions with this instance.\n */\n super.setSelfReference([this.target]);\n\n /*\n * Collect the Dialog's interactive child elements. This is an initial pass\n * to ensure values exists, but the interactive children will be collected\n * each time the dialog opens, in case the dialog's contents change.\n */\n this.setInteractiveChildren();\n\n // Focusable content should initially have tabindex='-1'.\n tabIndexDeny(this.interactiveChildElements);\n\n // Add target attribute.\n setUniqueId(this.target);\n\n /*\n * Set the taget as hidden by default. Using the `aria-hidden` attribute,\n * rather than the `hidden` attribute, means authors must hide the target\n * element via CSS.\n */\n this.target.setAttribute('aria-hidden', 'true');\n this.target.setAttribute('hidden', '');\n\n // Set additional attributes.\n this.target.setAttribute('role', 'dialog');\n this.target.setAttribute('aria-modal', 'true');\n\n // Add event listeners.\n this.target.addEventListener('keydown', this.handleTargetKeydown);\n\n /**\n * Set initial state.\n *\n * @type {object}\n */\n this.state = { expanded: false };\n\n /* Run {initCallback} */\n this.onInit.call(this);\n }\n\n /**\n * Update element attributes and event listeners when the Popup's state changes.\n * @todo Set target attributes and update roving tabindex.\n *\n * @param {Object} state The component state.\n */\n stateWasUpdated() {\n const { expanded } = this.state;\n const contentLength = this.content.length;\n\n this.setInteractiveChildren();\n\n if (expanded) {\n // Allow focus on the target element.\n this.target.setAttribute('tabindex', '0');\n\n // Hide the outside content.\n for (let i = 0; i < contentLength; i += 1) {\n this.content[i].setAttribute('aria-hidden', 'true');\n }\n\n // Update target element.\n this.target.setAttribute('aria-hidden', 'false');\n this.target.removeAttribute('hidden');\n\n if (null != this.controller) {\n this.controller.setAttribute('aria-expanded', 'true');\n }\n\n tabIndexAllow(this.interactiveChildElements);\n\n this.target.focus();\n } else {\n // Disallow focus on the target element.\n this.target.setAttribute('tabindex', '-1');\n\n // Un-hide the outside content.\n for (let i = 0; i < contentLength; i += 1) {\n this.content[i].removeAttribute('aria-hidden');\n }\n\n // Update target element.\n this.target.setAttribute('aria-hidden', 'true');\n this.target.setAttribute('hidden', '');\n\n // Focusable content should have tabindex='-1' or be removed from the DOM.\n tabIndexDeny(this.interactiveChildElements);\n\n if (null != this.controller) {\n this.controller.setAttribute('aria-expanded', 'false');\n this.controller.focus();\n }\n }\n\n /* Run {stateChangeCallback} */\n this.onStateChange.call(this, this.state);\n }\n\n /**\n * Close the dialog on when users click outside of the Dialog element.\n *\n * By default, the Dialog will not close on outside click. This is by design,\n * but can be enabled manually by including an event listener with this method\n * as the callback.\n * document.body.addEventListener('click', dialog.hideOnOutsideClick)\n *\n * @param {Event} event The Event object.\n */\n hideOnOutsideClick(event) {\n const { expanded } = this.state;\n const { target: clicked } = event;\n\n if (\n expanded && ! this.target.contains(clicked)\n && (null != this.controller && ! this.controller.contains(clicked))\n ) {\n this.hide();\n }\n }\n\n /**\n * Close the dialog on ESC key press.\n *\n * By default, the Dialog will not close with the ESC key. This is by design,\n * but can be enabled manually by including an event listener with this method\n * as the callback.\n * document.body.addEventListener('keydown', dialog.handleKeydownEsc)\n *\n * @param {Event} event The Event object.\n */\n handleKeydownEsc(event) {\n const { ESC } = keyCodes;\n const { keyCode } = event;\n\n if (ESC === keyCode) {\n this.hide();\n }\n }\n\n /**\n * Trap key tabs within the dialog.\n *\n * @param {Event} event The Event object.\n */\n handleTargetKeydown(event) {\n const { TAB } = keyCodes;\n const { keyCode, shiftKey } = event;\n const { expanded } = this.state;\n\n if (expanded && keyCode === TAB) {\n const { activeElement } = document;\n\n if (shiftKey && this.firstInteractiveChild === activeElement) {\n event.preventDefault();\n /*\n * Move back from the first interactive child element to the last\n * interactive child element\n */\n this.lastInteractiveChild.focus();\n } else if (! shiftKey && this.lastInteractiveChild === activeElement) {\n event.preventDefault();\n /*\n * Move forward from the last interactive child element to the first\n * interactive child element.\n */\n this.firstInteractiveChild.focus();\n }\n }\n }\n\n /**\n * Handle controller keydown events to patch in button behaviors for\n * non-button elements.\n *\n * @param {Event} event The event object.\n */\n controllerKeydown(event) {\n const {\n SPACE,\n RETURN,\n } = keyCodes;\n const { keyCode } = event;\n\n if ([SPACE, RETURN].includes(keyCode)) {\n event.preventDefault();\n\n /*\n * Treat the Spacebar and Return keys as clicks in case the controller is\n * not a