{"version":3,"file":"../region-toggle.js","names":["handleRegionClickAway","e","regionToggle","document","querySelector","regionList","contains","target","closeRegionSelector","regionSelector","setAttribute","classList","remove","removeEventListener","handleRegionEscapeClick","openRegionSelector","add","addEventListener","key"],"sources":["modules/cookie.js"],"sourcesContent":["/*! \r\n * js-cookie v3.0.1 | MIT\r\n * https://github.com/js-cookie/js-cookie/releases\r\n */\r\n;\r\n(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n typeof define === 'function' && define.amd ? define(factory) :\r\n (global = global || self, (function () {\r\n var current = global.Cookies;\r\n var exports = global.Cookies = factory();\r\n exports.noConflict = function () { global.Cookies = current; return exports; };\r\n }()));\r\n}(this, (function () {\r\n 'use strict';\r\n\r\n /* eslint-disable no-var */\r\n function assign(target) {\r\n for (var i = 1; i < arguments.length; i++) {\r\n var source = arguments[i];\r\n for (var key in source) {\r\n target[key] = source[key];\r\n }\r\n }\r\n return target\r\n }\r\n /* eslint-enable no-var */\r\n\r\n /* eslint-disable no-var */\r\n var defaultConverter = {\r\n read: function (value) {\r\n if (value[0] === '\"') {\r\n value = value.slice(1, -1);\r\n }\r\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\r\n },\r\n write: function (value) {\r\n return encodeURIComponent(value).replace(\r\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\r\n decodeURIComponent\r\n )\r\n }\r\n };\r\n /* eslint-enable no-var */\r\n\r\n /* eslint-disable no-var */\r\n\r\n function init(converter, defaultAttributes) {\r\n function set(key, value, attributes) {\r\n if (typeof document === 'undefined') {\r\n return\r\n }\r\n\r\n attributes = assign({}, defaultAttributes, attributes);\r\n\r\n if (typeof attributes.expires === 'number') {\r\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\r\n }\r\n if (attributes.expires) {\r\n attributes.expires = attributes.expires.toUTCString();\r\n }\r\n\r\n key = encodeURIComponent(key)\r\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\r\n .replace(/[()]/g, escape);\r\n\r\n var stringifiedAttributes = '';\r\n for (var attributeName in attributes) {\r\n if (!attributes[attributeName]) {\r\n continue\r\n }\r\n\r\n stringifiedAttributes += '; ' + attributeName;\r\n\r\n if (attributes[attributeName] === true) {\r\n continue\r\n }\r\n\r\n // Considers RFC 6265 section 5.2:\r\n // ...\r\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\r\n // character:\r\n // Consume the characters of the unparsed-attributes up to,\r\n // not including, the first %x3B (\";\") character.\r\n // ...\r\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\r\n }\r\n\r\n return (document.cookie =\r\n key + '=' + converter.write(value, key) + stringifiedAttributes)\r\n }\r\n\r\n function get(key) {\r\n if (typeof document === 'undefined' || (arguments.length && !key)) {\r\n return\r\n }\r\n\r\n // To prevent the for loop in the first place assign an empty array\r\n // in case there are no cookies at all.\r\n var cookies = document.cookie ? document.cookie.split('; ') : [];\r\n var jar = {};\r\n for (var i = 0; i < cookies.length; i++) {\r\n var parts = cookies[i].split('=');\r\n var value = parts.slice(1).join('=');\r\n\r\n try {\r\n var foundKey = decodeURIComponent(parts[0]);\r\n jar[foundKey] = converter.read(value, foundKey);\r\n\r\n if (key === foundKey) {\r\n break\r\n }\r\n } catch (e) { }\r\n }\r\n\r\n return key ? jar[key] : jar\r\n }\r\n\r\n return Object.create(\r\n {\r\n set: set,\r\n get: get,\r\n remove: function (key, attributes) {\r\n set(\r\n key,\r\n '',\r\n assign({}, attributes, {\r\n expires: -1\r\n })\r\n );\r\n },\r\n withAttributes: function (attributes) {\r\n return init(this.converter, assign({}, this.attributes, attributes))\r\n },\r\n withConverter: function (converter) {\r\n return init(assign({}, this.converter, converter), this.attributes)\r\n }\r\n },\r\n {\r\n attributes: { value: Object.freeze(defaultAttributes) },\r\n converter: { value: Object.freeze(converter) }\r\n }\r\n )\r\n }\r\n\r\n var api = init(defaultConverter, { path: '/' });\r\n /* eslint-enable no-var */\r\n\r\n return api;\r\n\r\n})));\r\n"],"mappings":"AAeA,SAAAA,sBAAAC,GAEA,IAAAC,EAAAC,SAAAC,cAAA,mBACAC,EAAAF,SAAAC,cAAA,iBAEAF,EAAAI,SAAAL,EAAAM,SAAAF,EAAAC,SAAAL,EAAAM,SAGAC,oBAFAN,EAAAD,EAAAM,OAIA,CAEA,SAAAC,oBAAAN,GACA,IAAAO,EAAAN,SAAAC,cAAA,6BAEAF,EAAAQ,aAAA,yBACAD,EAAAE,UAAAC,OAAA,0BACAT,SAAAU,oBAAA,QAAAb,uBACAG,SAAAU,oBAAA,UAAAC,wBACA,CAEA,SAAAC,mBAAAb,GACA,IAAAO,EAAAN,SAAAC,cAAA,6BAEAF,EAAAQ,aAAA,wBACAD,EAAAE,UAAAK,IAAA,0BACAb,SAAAc,iBAAA,QAAAjB,uBACAG,SAAAc,iBAAA,UAAAH,wBACA,CACA,SAAAA,wBAAAb,GACA,WAAAA,EAAAiB,KAEAV,oBADAP,EAAAM,OAGA,CAjDAJ,SAAAc,iBAAA,+BACA,IAAAR,EAAAN,SAAAC,cAAA,6BAEAK,GAAAQ,iBAAA,kBAAAhB,GACA,GAAAA,EAAAM,OAAAI,UAAAL,SAAA,mBACA,IAAAJ,EAAAD,EAAAM,OAEAE,EAAAE,UAAAL,SAAA,0BACAE,oBAAAN,GAEAa,mBAAAb,EAEA,CACA,GACA"}