{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es.regexp.to-string.js","webpack:///./node_modules/core-js/modules/es.function.name.js","webpack:///./node_modules/core-js/modules/es.array.slice.js","webpack:///./node_modules/core-js/modules/es.array.find-index.js","webpack:///./src/js/components/dropdown.js","webpack:///./node_modules/uuid/dist/esm-browser/rng.js","webpack:///./node_modules/uuid/dist/esm-browser/regex.js","webpack:///./node_modules/uuid/dist/esm-browser/stringify.js","webpack:///./node_modules/uuid/dist/esm-browser/validate.js","webpack:///./node_modules/uuid/dist/esm-browser/v4.js","webpack:///./src/js/modules/location-campus-program-listing.js"],"names":["anObject","fails","flags","DESCRIPTORS","nativeToString","NOT_GENERIC","call","source","INCORRECT_NAME","name","RegExp","prototype","R","this","concat","undefined","unsafe","defineProperty","f","FunctionPrototype","Function","FunctionPrototypeToString","toString","nameRE","configurable","get","match","error","isObject","isArray","toAbsoluteIndex","toLength","toIndexedObject","createProperty","SPECIES","nativeSlice","slice","max","Math","SPECIES_SUPPORT","target","proto","forced","start","end","Constructor","result","n","O","length","k","fin","constructor","Array","internalFindIndex","SKIPS_HOLES","findIndex","callbackfn","arguments","Dropdown","choices","Choices","el","itemSelectText","searchEnabled","shouldSort","value","setChoiceByValue","Component","getRandomValues","rnds8","Uint8Array","rng","crypto","bind","msCrypto","Error","uuid","test","byteToHex","push","substr","arr","offset","toLowerCase","TypeError","options","buf","rnds","random","i","LocationCampusProgramListing","dom","tabs","querySelectorAll","tabPanels","dropdown","querySelector","dropdownOptions","tabsLength","setupTabs","setupDropdown","forEach","tab","index","addEventListener","e","handleTabChange","handleTabKeyEvents","handleDropdownChange","id","uuidv4","innerText","setAttribute","tabPanel","detail","optionIndex","option","updateDropdown","currentTab","removeAttribute","optionValue","keyMap","ArrowDown","ArrowUp","Tab","key","preventDefault","nextTab","lastTab","focus"],"mappings":"2FACA,IAAIA,EAAW,EAAQ,GACnBC,EAAQ,EAAQ,GAChBC,EAAQ,EAAQ,IAChBC,EAAc,EAAQ,GAEt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AqB,yDAC1CzG,KAAK+E,IAAIC,KAAKS,SAAQ,SAAAC,GACpBA,EAAIU,aAAa,iBAAiB,GAClCV,EAAIU,aAAa,YAAa,MAEhC,IAAMM,EAAa1G,KAAK+E,IAAIC,KAAKW,GASjC,GARAe,EAAWN,aAAa,iBAAiB,GACzCM,EAAWN,aAAa,WAAY,GACpCpG,KAAK+E,IAAIG,UAAUO,SAAQ,SAAAY,GACzBA,EAASD,aAAa,SAAU,aAE9BpG,KAAK+E,IAAIG,WAAalF,KAAK+E,IAAIG,UAAUS,IAC3C3F,KAAK+E,IAAIG,UAAUS,GAAOgB,gBAAgB,UAExCF,EAAgB,CAClB,IAAMG,EAAc5G,KAAK+E,IAAIM,gBAAgBM,GAAOtC,MACpDrD,KAAKmF,SAAS7B,iBAAiBsD,M,gCAInC,SAAmBf,EAAGF,GACpB,IAAMkB,EAAS,CACbC,UAAW,EACXC,SAAU,EACVC,IAAK,OAEP,GAAKH,EAAOhB,EAAEoB,KAAd,CACApB,EAAEqB,iBAEF,IAAMC,EAAUxB,EAAQkB,EAAOhB,EAAEoB,KAE3BG,EAAUpH,KAAKsF,WAAa,EAC9B6B,GAAW,GAAKA,EAAUnH,KAAKsF,YACjCtF,KAAK8F,gBAAgBqB,GACrBnH,KAAK+E,IAAIC,KAAKmC,GAASE,SACdF,EAAUC,GACnBpH,KAAK8F,gBANU,GAOf9F,KAAK+E,IAAIC,KAPM,GAOSqC,SACfF,EARM,IASfnH,KAAK8F,gBAAgBsB,GACrBpH,KAAK+E,IAAIC,KAAKoC,GAASC,SAGrBxB,EAAEoB,MAAQJ,EAAOG,KACfhH,KAAK+E,IAAIG,WAAalF,KAAK+E,IAAIG,UAAUS,IAC3C3F,KAAK+E,IAAIG,UAAUS,GAAO0B,c,8BAhGS9D,aAsG5BuB","file":"15.cec1d1818d4f9d381f88.js","sourcesContent":["'use strict';\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TO_STRING = 'toString';\nvar nativeToString = /./[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n require('../internals/redefine')(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? flags.call(R) : undefined);\n }, { unsafe: true });\n}\n","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.github.io/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar SPECIES = require('../internals/well-known-symbol')('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\nvar SPECIES_SUPPORT = require('../internals/array-method-has-species-support')('slice');\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\nrequire('../internals/export')({ target: 'Array', proto: true, forced: !SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","'use strict';\nvar internalFindIndex = require('../internals/array-methods')(6);\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.findindex\nrequire('../internals/export')({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return internalFindIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\nrequire('../internals/add-to-unscopables')(FIND_INDEX);\n","import { Component } from '@verndale/core';\nimport Choices from 'choices.js';\n\nclass Dropdown extends Component {\n setupDefaults() {\n this.choices = new Choices(this.el, {\n itemSelectText: '',\n searchEnabled: false,\n shouldSort: false\n });\n }\n\n setChoiceByValue(value) {\n this.choices.setChoiceByValue(value);\n }\n}\n\nexport default Dropdown;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import { Component } from '@verndale/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport Dropdown from '../components/dropdown';\n\nclass LocationCampusProgramListing extends Component {\n setupDefaults() {\n this.dom = {\n tabs: [...this.el.querySelectorAll('.campus-program-listing__tab')],\n tabPanels: [...this.el.querySelectorAll('.campus-program-listing__tab-panel')],\n dropdown: this.el.querySelector('.dropdown'),\n dropdownOptions: [...this.el.querySelectorAll('.dropdown option')]\n };\n this.tabsLength = this.dom.tabs.length;\n this.setupTabs();\n this.setupDropdown();\n }\n\n addListeners() {\n this.dom.tabs.forEach((tab, index) => {\n tab.addEventListener('click', e => this.handleTabChange(index));\n tab.addEventListener('keydown', e => this.handleTabKeyEvents(e, index));\n })\n this.dom.dropdown.addEventListener('change', e => this.handleDropdownChange(e));\n }\n\n setupTabs() {\n this.dom.tabs.forEach((tab, index) => {\n const id = uuidv4(tab.innerText);\n tab.setAttribute('id', id);\n tab.setAttribute('aria-controls', `${id}-tab`);\n tab.setAttribute('aria-selected', index === 0);\n tab.setAttribute('tabindex', index === 0 ? 0 : -1);\n if (this.dom.tabPanels && this.dom.tabPanels[index]) {\n const tabPanel = this.dom.tabPanels[index];\n tabPanel.setAttribute('id', `${id}-tab`);\n tabPanel.setAttribute('aria-labelledby', id);\n if (index !== 0) {\n tabPanel.setAttribute('hidden', 'hidden')\n }\n }\n })\n }\n\n setupDropdown() {\n this.dropdown = new Dropdown(this.dom.dropdown);\n }\n\n handleDropdownChange(e) {\n const { value } = e.detail;\n const optionIndex = this.dom.dropdownOptions.findIndex(option => (\n option.value.toLowerCase() === value.toLowerCase()\n ))\n this.handleTabChange(optionIndex, false)\n }\n\n handleTabChange(index, updateDropdown=true) {\n this.dom.tabs.forEach(tab => {\n tab.setAttribute('aria-selected', false)\n tab.setAttribute('tabindex', -1);\n })\n const currentTab = this.dom.tabs[index];\n currentTab.setAttribute('aria-selected', true);\n currentTab.setAttribute('tabindex', 0);\n this.dom.tabPanels.forEach(tabPanel => {\n tabPanel.setAttribute('hidden', 'hidden')\n })\n if (this.dom.tabPanels && this.dom.tabPanels[index]) {\n this.dom.tabPanels[index].removeAttribute('hidden');\n }\n if (updateDropdown) {\n const optionValue = this.dom.dropdownOptions[index].value;\n this.dropdown.setChoiceByValue(optionValue);\n }\n }\n\n handleTabKeyEvents(e, index) {\n const keyMap = {\n ArrowDown: 1,\n ArrowUp: -1,\n Tab: 'Tab'\n };\n if (!keyMap[e.key]) return;\n e.preventDefault();\n // Vertical Navigation\n const nextTab = index + keyMap[e.key];\n const firstTab = 0;\n const lastTab = this.tabsLength - 1;\n if (nextTab >= 0 && nextTab < this.tabsLength) {\n this.handleTabChange(nextTab);\n this.dom.tabs[nextTab].focus();\n } else if (nextTab > lastTab) {\n this.handleTabChange(firstTab);\n this.dom.tabs[firstTab].focus();\n } else if (nextTab < firstTab) {\n this.handleTabChange(lastTab);\n this.dom.tabs[lastTab].focus();\n }\n // Navigate to Tabpanel\n if (e.key === keyMap.Tab) {\n if (this.dom.tabPanels && this.dom.tabPanels[index]) {\n this.dom.tabPanels[index].focus();\n }\n }\n }\n}\n\nexport default LocationCampusProgramListing;\n"],"sourceRoot":""}