{"version":3,"file":"../js/aria-dialog.js","names":["aria","Utils","IgnoreUtilFocusChanges","dialogOpenClass","focusFirstDescendant","element","i","childNodes","length","child","attemptFocus","focusLastDescendant","isFocusable","focus","e","document","activeElement","OpenDialogList","Array","getCurrentDialog","closeCurrentDialog","currentDialog","close","handleEscape","event","key","which","keyCode","KeyCode","ESC","stopPropagation","addEventListener","Dialog","dialogId","focusAfterClosed","focusFirst","dialogNode","getElementById","Error","validRoles","isDialog","getAttribute","trim","split","some","token","role","backdropClass","parentNode","classList","contains","backdropNode","createElement","className","insertBefore","appendChild","add","body","preDiv","preNode","tabIndex","postDiv","postNode","nextSibling","removeListeners","addListeners","push","lastFocus","prototype","clearDialog","map","call","querySelectorAll","input","value","pop","remove","trapFocus","removeEventListener","target","window","openDialog","dialog","closeDialog","closeButton","topDialog"],"sources":["aria-dialog.js"],"sourcesContent":["/** Eslintignore\n/*\n* @file\n*\n* SEE https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html\n*\n* This content is licensed according to the W3C Software License at\n* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n*/\n\nvar aria = aria || {};\n\naria.Utils = aria.Utils || {};\n\n(function () {\n 'use strict';\n\n aria.Utils.IgnoreUtilFocusChanges = false;\n\n aria.Utils.dialogOpenClass = 'has-dialog';\n\n /**\n * @desc Set focus on descendant nodes until the first focusable element is\n * found.\n * @param element\n * DOM node for which to find the first focusable descendant.\n * @returns\n * true if a focusable element is found and focus is set.\n */\n aria.Utils.focusFirstDescendant = function (element) {\n for (var i = 0; i < element.childNodes.length; i++) {\n var child = element.childNodes[i];\n if (aria.Utils.attemptFocus(child) ||\n aria.Utils.focusFirstDescendant(child)) {\n return true;\n }\n }\n return false;\n }; // end focusFirstDescendant\n\n /**\n * @desc Find the last descendant node that is focusable.\n * @param element\n * DOM node for which to find the last focusable descendant.\n * @returns\n * true if a focusable element is found and focus is set.\n */\n aria.Utils.focusLastDescendant = function (element) {\n for (var i = element.childNodes.length - 1; i >= 0; i--) {\n var child = element.childNodes[i];\n if (aria.Utils.attemptFocus(child) ||\n aria.Utils.focusLastDescendant(child)) {\n return true;\n }\n }\n return false;\n }; // end focusLastDescendant\n\n /**\n * @desc Set Attempt to set focus on the current node.\n * @param element\n * The node to attempt to focus on.\n * @returns\n * true if element is focused.\n */\n aria.Utils.attemptFocus = function (element) {\n if (!aria.Utils.isFocusable(element)) {\n return false;\n }\n\n aria.Utils.IgnoreUtilFocusChanges = true;\n try {\n element.focus();\n }\n catch (e) {\n }\n aria.Utils.IgnoreUtilFocusChanges = false;\n return (document.activeElement === element);\n }; // end attemptFocus\n\n /* Modals can open modals. Keep track of them with this array. */\n aria.OpenDialogList = aria.OpenDialogList || new Array(0);\n\n /**\n * @returns the last opened dialog (the current dialog)\n */\n aria.getCurrentDialog = function () {\n if (aria.OpenDialogList && aria.OpenDialogList.length) {\n return aria.OpenDialogList[aria.OpenDialogList.length - 1];\n }\n };\n\n aria.closeCurrentDialog = function () {\n var currentDialog = aria.getCurrentDialog();\n if (currentDialog) {\n currentDialog.close();\n return true;\n }\n\n return false;\n };\n\n aria.handleEscape = function (event) {\n var key = event.which || event.keyCode;\n\n if (key === aria.KeyCode.ESC && aria.closeCurrentDialog()) {\n event.stopPropagation();\n }\n };\n\n document.addEventListener('keyup', aria.handleEscape);\n\n /**\n * @constructor\n * @desc Dialog object providing modal focus management.\n *\n * Assumptions: The element serving as the dialog container is present in the\n * DOM and hidden. The dialog container has role='dialog'.\n *\n * @param dialogId\n * The ID of the element serving as the dialog container.\n * @param focusAfterClosed\n * Either the DOM node or the ID of the DOM node to focus when the\n * dialog closes.\n * @param focusFirst\n * Optional parameter containing either the DOM node or the ID of the\n * DOM node to focus when the dialog opens. If not specified, the\n * first focusable element in the dialog will receive focus.\n */\n aria.Dialog = function (dialogId, focusAfterClosed, focusFirst) {\n this.dialogNode = document.getElementById(dialogId);\n if (this.dialogNode === null) {\n throw new Error('No element found with id=\"' + dialogId + '\".');\n }\n\n var validRoles = ['dialog', 'alertdialog'];\n var isDialog = (this.dialogNode.getAttribute('role') || '')\n .trim()\n .split(/\\s+/g)\n .some(function (token) {\n return validRoles.some(function (role) {\n return token === role;\n });\n });\n if (!isDialog) {\n throw new Error(\n 'Dialog() requires a DOM element with ARIA role of dialog or alertdialog.');\n }\n\n // Wrap in an individual backdrop element if one doesn't exist\n // Native elements use the ::backdrop pseudo-element, which\n // works similarly.\n var backdropClass = 'dialog-backdrop';\n if (this.dialogNode.parentNode.classList.contains(backdropClass)) {\n this.backdropNode = this.dialogNode.parentNode;\n }\n else {\n this.backdropNode = document.createElement('div');\n this.backdropNode.className = backdropClass;\n this.dialogNode.parentNode.insertBefore(this.backdropNode, this.dialogNode);\n this.backdropNode.appendChild(this.dialogNode);\n }\n this.backdropNode.classList.add('active');\n\n // Disable scroll on the body element\n document.body.classList.add(aria.Utils.dialogOpenClass);\n\n if (typeof focusAfterClosed === 'string') {\n this.focusAfterClosed = document.getElementById(focusAfterClosed);\n }\n else if (typeof focusAfterClosed === 'object') {\n this.focusAfterClosed = focusAfterClosed;\n }\n else {\n throw new Error(\n 'the focusAfterClosed parameter is required for the aria.Dialog constructor.');\n }\n\n if (typeof focusFirst === 'string') {\n this.focusFirst = document.getElementById(focusFirst);\n }\n else if (typeof focusFirst === 'object') {\n this.focusFirst = focusFirst;\n }\n else {\n this.focusFirst = null;\n }\n\n // Bracket the dialog node with two invisible, focusable nodes.\n // While this dialog is open, we use these to make sure that focus never\n // leaves the document even if dialogNode is the first or last node.\n var preDiv = document.createElement('div');\n this.preNode = this.dialogNode.parentNode.insertBefore(preDiv,\n this.dialogNode);\n this.preNode.tabIndex = 0;\n var postDiv = document.createElement('div');\n this.postNode = this.dialogNode.parentNode.insertBefore(postDiv,\n this.dialogNode.nextSibling);\n this.postNode.tabIndex = 0;\n\n // If this modal is opening on top of one that is already open,\n // get rid of the document focus listener of the open dialog.\n if (aria.OpenDialogList.length > 0) {\n aria.getCurrentDialog().removeListeners();\n }\n\n this.addListeners();\n aria.OpenDialogList.push(this);\n // this.clearDialog();\n this.dialogNode.className = 'default_dialog'; // make visible\n\n if (this.focusFirst) {\n this.focusFirst.focus();\n }\n else {\n aria.Utils.focusFirstDescendant(this.dialogNode);\n }\n\n this.lastFocus = document.activeElement;\n }; // end Dialog constructor\n\n aria.Dialog.prototype.clearDialog = function () {\n Array.prototype.map.call(\n this.dialogNode.querySelectorAll('input'),\n function (input) {\n input.value = '';\n }\n );\n };\n\n /**\n * @desc\n * Hides the current top dialog,\n * removes listeners of the top dialog,\n * restore listeners of a parent dialog if one was open under the one that just closed,\n * and sets focus on the element specified for focusAfterClosed.\n */\n aria.Dialog.prototype.close = function () {\n aria.OpenDialogList.pop();\n this.removeListeners();\n aria.Utils.remove(this.preNode);\n aria.Utils.remove(this.postNode);\n this.dialogNode.className = 'hidden';\n this.backdropNode.classList.remove('active');\n this.focusAfterClosed.focus();\n\n // If a dialog was open underneath this one, restore its listeners.\n if (aria.OpenDialogList.length > 0) {\n aria.getCurrentDialog().addListeners();\n }\n else {\n document.body.classList.remove(aria.Utils.dialogOpenClass);\n }\n }; // end close\n\n\n\n aria.Dialog.prototype.addListeners = function () {\n document.addEventListener('focus', this.trapFocus, true);\n }; // end addListeners\n\n aria.Dialog.prototype.removeListeners = function () {\n document.removeEventListener('focus', this.trapFocus, true);\n }; // end removeListeners\n\n aria.Dialog.prototype.trapFocus = function (event) {\n if (aria.Utils.IgnoreUtilFocusChanges) {\n return;\n }\n var currentDialog = aria.getCurrentDialog();\n if (currentDialog.dialogNode.contains(event.target)) {\n currentDialog.lastFocus = event.target;\n }\n else {\n aria.Utils.focusFirstDescendant(currentDialog.dialogNode);\n if (currentDialog.lastFocus == document.activeElement) {\n aria.Utils.focusLastDescendant(currentDialog.dialogNode);\n }\n currentDialog.lastFocus = document.activeElement;\n }\n }; // end trapFocus\n\n window.openDialog = function (dialogId, focusAfterClosed, focusFirst) {\n var dialog = new aria.Dialog(dialogId, focusAfterClosed, focusFirst);\n };\n\n window.closeDialog = function (closeButton) {\n var topDialog = aria.getCurrentDialog();\n if (topDialog.dialogNode.contains(closeButton)) {\n topDialog.close();\n }\n }; // end closeDialog\n\n\n\n}());\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIA,IAAI,GAAGA,IAAI,IAAI,CAAC,CAAC;AAErBA,IAAI,CAACC,KAAK,GAAGD,IAAI,CAACC,KAAK,IAAI,CAAC,CAAC;AAE5B,aAAY;EACX,YAAY;;EAEZD,IAAI,CAACC,KAAK,CAACC,sBAAsB,GAAG,KAAK;EAEzCF,IAAI,CAACC,KAAK,CAACE,eAAe,GAAG,YAAY;;EAEzC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEH,IAAI,CAACC,KAAK,CAACG,oBAAoB,GAAG,UAAUC,OAAO,EAAE;IACnD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,OAAO,CAACE,UAAU,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;MAClD,IAAIG,KAAK,GAAGJ,OAAO,CAACE,UAAU,CAACD,CAAC,CAAC;MACjC,IAAIN,IAAI,CAACC,KAAK,CAACS,YAAY,CAACD,KAAK,CAAC,IAChCT,IAAI,CAACC,KAAK,CAACG,oBAAoB,CAACK,KAAK,CAAC,EAAE;QACxC,OAAO,IAAI;MACb;IACF;IACA,OAAO,KAAK;EACd,CAAC,CAAC,CAAC;;EAEH;AACF;AACA;AACA;AACA;AACA;AACA;EACET,IAAI,CAACC,KAAK,CAACU,mBAAmB,GAAG,UAAUN,OAAO,EAAE;IAClD,KAAK,IAAIC,CAAC,GAAGD,OAAO,CAACE,UAAU,CAACC,MAAM,GAAG,CAAC,EAAEF,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;MACvD,IAAIG,KAAK,GAAGJ,OAAO,CAACE,UAAU,CAACD,CAAC,CAAC;MACjC,IAAIN,IAAI,CAACC,KAAK,CAACS,YAAY,CAACD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