g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","import hyphenate from 'fbjs/lib/hyphenateStyleName';\nimport React, { cloneElement, Component, createElement } from 'react';\nimport Stylis from 'stylis';\nimport _insertRulePlugin from 'stylis-rule-sheet';\nimport PropTypes from 'prop-types';\nimport hoistStatics from 'hoist-non-react-statics';\nimport { isValidElementType } from 'react-is';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n// \nvar isPlainObject = (function (x) {\n return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;\n});\n\n// \n\n\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n */\nvar ERRORS = process.env.NODE_ENV !== 'production' ? {\n \"1\": \"Cannot create styled-component for component: %s.\\n\\n\",\n \"2\": \"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\\n\\n* Are you trying to reuse it across renders?\\n* Are you accidentally calling collectStyles twice?\\n\\n\",\n \"3\": \"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\\n\\n\",\n \"4\": \"The `StyleSheetManager` expects a valid target or sheet prop!\\n\\n* Does this error occur on the client and is your target falsy?\\n* Does this error occur on the server and is the sheet falsy?\\n\\n\",\n \"5\": \"The clone method cannot be used on the client!\\n\\n* Are you running in a client-like environment on the server?\\n* Are you trying to run SSR on the client?\\n\\n\",\n \"6\": \"Trying to insert a new style tag, but the given Node is unmounted!\\n\\n* Are you using a custom target that isn't mounted?\\n* Does your document not have a valid head element?\\n* Have you accidentally removed a style tag manually?\\n\\n\",\n \"7\": \"ThemeProvider: Please return an object from your \\\"theme\\\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n\",\n \"8\": \"ThemeProvider: Please make your \\\"theme\\\" prop an object.\\n\\n\",\n \"9\": \"Missing document ``\\n\\n\",\n \"10\": \"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",\n \"11\": \"A plain React class (%s) has been interpolated into styles, probably as a component selector (https://www.styled-components.com/docs/advanced#referring-to-other-components). Only styled-component classes can be targeted in this fashion.\"\n} : {};\n\n/**\n * super basic version of sprintf\n */\nfunction format() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var a = args[0];\n var b = [];\n var c = void 0;\n\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n\n return a;\n}\n\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n */\n\nvar StyledComponentsError = function (_Error) {\n inherits(StyledComponentsError, _Error);\n\n function StyledComponentsError(code) {\n classCallCheck(this, StyledComponentsError);\n\n for (var _len2 = arguments.length, interpolations = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n interpolations[_key2 - 1] = arguments[_key2];\n }\n\n if (process.env.NODE_ENV === 'production') {\n var _this = possibleConstructorReturn(this, _Error.call(this, 'An error occurred. See https://github.com/styled-components/styled-components/blob/master/src/utils/errors.md#' + code + ' for more information. ' + (interpolations ? 'Additional arguments: ' + interpolations.join(', ') : '')));\n } else {\n var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations))));\n }\n return possibleConstructorReturn(_this);\n }\n\n return StyledComponentsError;\n}(Error);\n\n// \n\nvar objToCss = function objToCss(obj, prevKey) {\n var css = Object.keys(obj).filter(function (key) {\n var chunk = obj[key];\n return chunk !== undefined && chunk !== null && chunk !== false && chunk !== '';\n }).map(function (key) {\n if (isPlainObject(obj[key])) return objToCss(obj[key], key);\n return hyphenate(key) + ': ' + obj[key] + ';';\n }).join(' ');\n return prevKey ? prevKey + ' {\\n ' + css + '\\n}' : css;\n};\n\nvar flatten = function flatten(chunks, executionContext) {\n return chunks.reduce(function (ruleSet, chunk) {\n /* Remove falsey values */\n if (chunk === undefined || chunk === null || chunk === false || chunk === '') {\n return ruleSet;\n }\n\n /* Flatten ruleSet */\n if (Array.isArray(chunk)) {\n ruleSet.push.apply(ruleSet, flatten(chunk, executionContext));\n return ruleSet;\n }\n\n /* Handle other components */\n if (chunk.hasOwnProperty('styledComponentId')) {\n // $FlowFixMe not sure how to make this pass\n ruleSet.push('.' + chunk.styledComponentId);\n return ruleSet;\n }\n\n /* Either execute or defer the function */\n if (typeof chunk === 'function') {\n if (executionContext) {\n var nextChunk = chunk(executionContext);\n /* Throw if a React Element was given styles */\n if (React.isValidElement(nextChunk)) {\n var elementName = chunk.displayName || chunk.name;\n throw new StyledComponentsError(11, elementName);\n }\n ruleSet.push.apply(ruleSet, flatten([nextChunk], executionContext));\n } else ruleSet.push(chunk);\n\n return ruleSet;\n }\n\n /* Handle objects */\n ruleSet.push(\n // $FlowFixMe have to add %checks somehow to isPlainObject\n isPlainObject(chunk) ? objToCss(chunk) : chunk.toString());\n\n return ruleSet;\n }, []);\n};\n\n// \n\nvar COMMENT_REGEX = /^\\s*\\/\\/.*$/gm;\n\n// NOTE: This stylis instance is only used to split rules from SSR'd style tags\nvar stylisSplitter = new Stylis({\n global: false,\n cascade: true,\n keyframe: false,\n prefix: false,\n compress: false,\n semicolon: true\n});\n\nvar stylis = new Stylis({\n global: false,\n cascade: true,\n keyframe: false,\n prefix: true,\n compress: false,\n semicolon: false // NOTE: This means \"autocomplete missing semicolons\"\n});\n\n// Wrap `insertRulePlugin to build a list of rules,\n// and then make our own plugin to return the rules. This\n// makes it easier to hook into the existing SSR architecture\n\nvar parsingRules = [];\n// eslint-disable-next-line consistent-return\nvar returnRulesPlugin = function returnRulesPlugin(context) {\n if (context === -2) {\n var parsedRules = parsingRules;\n parsingRules = [];\n return parsedRules;\n }\n};\n\nvar parseRulesPlugin = _insertRulePlugin(function (rule) {\n parsingRules.push(rule);\n});\n\nstylis.use([parseRulesPlugin, returnRulesPlugin]);\nstylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);\n\nvar stringifyRules = function stringifyRules(rules, selector, prefix) {\n var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments\n\n var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;\n\n return stylis(prefix || !selector ? '' : selector, cssStr);\n};\n\nvar splitByRules = function splitByRules(css) {\n return stylisSplitter('', css);\n};\n\n// \n\nfunction isStyledComponent(target) /* : %checks */{\n return (\n // $FlowFixMe TODO: flow for styledComponentId\n typeof target === 'function' && typeof target.styledComponentId === 'string'\n );\n}\n\n// \n\n/* This function is DEPRECATED and will be removed on the next major version release.\n * It was needed to rehydrate all style blocks prepended to chunks before React\n * tries to rehydrate its HTML stream. Since the master StyleSheet will now detect\n * the use of streamed style tags and will perform the rehydration earlier when needed\n * this function will not be needed anymore */\nfunction consolidateStreamedStyles() {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('styled-components automatically does streaming SSR rehydration now.\\n' + 'Calling consolidateStreamedStyles manually is no longer necessary and a noop now.\\n' + '- Please remove the consolidateStreamedStyles call from your client.');\n }\n}\n\n// \n/* eslint-disable no-bitwise */\n\n/* This is the \"capacity\" of our alphabet i.e. 2x26 for all letters plus their capitalised\n * counterparts */\nvar charsLength = 52;\n\n/* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */\nvar getAlphabeticChar = function getAlphabeticChar(code) {\n return String.fromCharCode(code + (code > 25 ? 39 : 97));\n};\n\n/* input a number, usually a hash and convert it to base-52 */\nvar generateAlphabeticName = function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n /* get a char and divide by alphabet-length */\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = getAlphabeticChar(x % charsLength) + name;\n }\n\n return getAlphabeticChar(x % charsLength) + name;\n};\n\n// \n\nvar interleave = (function (strings, interpolations) {\n var result = [strings[0]];\n\n for (var i = 0, len = interpolations.length; i < len; i += 1) {\n result.push(interpolations[i], strings[i + 1]);\n }\n\n return result;\n});\n\n// \nvar EMPTY_ARRAY = Object.freeze([]);\nvar EMPTY_OBJECT = Object.freeze({});\n\n// \n\nvar css = (function (styles) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n if (typeof styles === 'function' || isPlainObject(styles)) {\n // $FlowFixMe\n return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));\n }\n\n // $FlowFixMe\n return flatten(interleave(styles, interpolations));\n});\n\n// \n\n\nvar SC_ATTR = typeof process !== 'undefined' && process.env.SC_ATTR || 'data-styled-components';\nvar SC_STREAM_ATTR = 'data-styled-streamed';\nvar CONTEXT_KEY = '__styled-components-stylesheet__';\n\nvar IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;\n\nvar DISABLE_SPEEDY = process.env.NODE_ENV !== 'production';\n\n// \nvar SC_COMPONENT_ID = /^[^\\S\\n]*?\\/\\* sc-component-id:\\s*(\\S+)\\s+\\*\\//gm;\n\nvar extractComps = (function (maybeCSS) {\n var css = '' + (maybeCSS || ''); // Definitely a string, and a clone\n var existingComponents = [];\n css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {\n existingComponents.push({ componentId: componentId, matchIndex: matchIndex });\n return match;\n });\n return existingComponents.map(function (_ref, i) {\n var componentId = _ref.componentId,\n matchIndex = _ref.matchIndex;\n\n var nextComp = existingComponents[i + 1];\n var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);\n return { componentId: componentId, cssFromDOM: cssFromDOM };\n });\n});\n\n// \n/* eslint-disable camelcase, no-undef */\n\nvar getNonce = (function () {\n return typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n});\n\n// \n// Helper to call a given function, only once\nvar once = (function (cb) {\n var called = false;\n\n return function () {\n if (!called) {\n called = true;\n cb();\n }\n };\n});\n\n// \n/* These are helpers for the StyleTags to keep track of the injected\n * rule names for each (component) ID that they're keeping track of.\n * They're crucial for detecting whether a name has already been\n * injected.\n * (This excludes rehydrated names) */\n\n/* adds a new ID:name pairing to a names dictionary */\nvar addNameForId = function addNameForId(names, id, name) {\n if (name) {\n // eslint-disable-next-line no-param-reassign\n var namesForId = names[id] || (names[id] = Object.create(null));\n namesForId[name] = true;\n }\n};\n\n/* resets an ID entirely by overwriting it in the dictionary */\nvar resetIdNames = function resetIdNames(names, id) {\n // eslint-disable-next-line no-param-reassign\n names[id] = Object.create(null);\n};\n\n/* factory for a names dictionary checking the existance of an ID:name pairing */\nvar hasNameForId = function hasNameForId(names) {\n return function (id, name) {\n return names[id] !== undefined && names[id][name];\n };\n};\n\n/* stringifies names for the html/element output */\nvar stringifyNames = function stringifyNames(names) {\n var str = '';\n // eslint-disable-next-line guard-for-in\n for (var id in names) {\n str += Object.keys(names[id]).join(' ') + ' ';\n }\n return str.trim();\n};\n\n/* clones the nested names dictionary */\nvar cloneNames = function cloneNames(names) {\n var clone = Object.create(null);\n // eslint-disable-next-line guard-for-in\n for (var id in names) {\n clone[id] = _extends({}, names[id]);\n }\n return clone;\n};\n\n// \n\n/* These are helpers that deal with the insertRule (aka speedy) API\n * They are used in the StyleTags and specifically the speedy tag\n */\n\n/* retrieve a sheet for a given style tag */\nvar sheetForTag = function sheetForTag(tag) {\n // $FlowFixMe\n if (tag.sheet) return tag.sheet;\n\n /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */\n var size = document.styleSheets.length;\n for (var i = 0; i < size; i += 1) {\n var sheet = document.styleSheets[i];\n // $FlowFixMe\n if (sheet.ownerNode === tag) return sheet;\n }\n\n /* we should always be able to find a tag */\n throw new StyledComponentsError(10);\n};\n\n/* insert a rule safely and return whether it was actually injected */\nvar safeInsertRule = function safeInsertRule(sheet, cssRule, index) {\n /* abort early if cssRule string is falsy */\n if (!cssRule) return false;\n\n var maxIndex = sheet.cssRules.length;\n\n try {\n /* use insertRule and cap passed index with maxIndex (no of cssRules) */\n sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);\n } catch (err) {\n /* any error indicates an invalid rule */\n return false;\n }\n\n return true;\n};\n\n/* deletes `size` rules starting from `removalIndex` */\nvar deleteRules = function deleteRules(sheet, removalIndex, size) {\n var lowerBound = removalIndex - size;\n for (var i = removalIndex; i > lowerBound; i -= 1) {\n sheet.deleteRule(i);\n }\n};\n\n// \n\n/* this marker separates component styles and is important for rehydration */\nvar makeTextMarker = function makeTextMarker(id) {\n return '\\n/* sc-component-id: ' + id + ' */\\n';\n};\n\n/* add up all numbers in array up until and including the index */\nvar addUpUntilIndex = function addUpUntilIndex(sizes, index) {\n var totalUpToIndex = 0;\n for (var i = 0; i <= index; i += 1) {\n totalUpToIndex += sizes[i];\n }\n\n return totalUpToIndex;\n};\n\n/* create a new style tag after lastEl */\nvar makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {\n var el = document.createElement('style');\n el.setAttribute(SC_ATTR, '');\n\n var nonce = getNonce();\n if (nonce) {\n el.setAttribute('nonce', nonce);\n }\n\n /* Work around insertRule quirk in EdgeHTML */\n el.appendChild(document.createTextNode(''));\n\n if (target && !tagEl) {\n /* Append to target when no previous element was passed */\n target.appendChild(el);\n } else {\n if (!tagEl || !target || !tagEl.parentNode) {\n throw new StyledComponentsError(6);\n }\n\n /* Insert new style tag after the previous one */\n tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);\n }\n\n return el;\n};\n\n/* takes a css factory function and outputs an html styled tag factory */\nvar wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {\n return function (additionalAttrs) {\n var nonce = getNonce();\n var attrs = [nonce && 'nonce=\"' + nonce + '\"', SC_ATTR + '=\"' + stringifyNames(names) + '\"', additionalAttrs];\n\n var htmlAttr = attrs.filter(Boolean).join(' ');\n return '';\n };\n};\n\n/* takes a css factory function and outputs an element factory */\nvar wrapAsElement = function wrapAsElement(css, names) {\n return function () {\n var _props;\n\n var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props);\n\n var nonce = getNonce();\n if (nonce) {\n // $FlowFixMe\n props.nonce = nonce;\n }\n\n // eslint-disable-next-line react/no-danger\n return React.createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));\n };\n};\n\nvar getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {\n return function () {\n return Object.keys(markers);\n };\n};\n\n/* speedy tags utilise insertRule */\nvar makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {\n var names = Object.create(null);\n var markers = Object.create(null);\n var sizes = [];\n\n var extractImport = getImportRuleTag !== undefined;\n /* indicates whther getImportRuleTag was called */\n var usedImportRuleTag = false;\n\n var insertMarker = function insertMarker(id) {\n var prev = markers[id];\n if (prev !== undefined) {\n return prev;\n }\n\n markers[id] = sizes.length;\n sizes.push(0);\n resetIdNames(names, id);\n\n return markers[id];\n };\n\n var insertRules = function insertRules(id, cssRules, name) {\n var marker = insertMarker(id);\n var sheet = sheetForTag(el);\n var insertIndex = addUpUntilIndex(sizes, marker);\n\n var injectedRules = 0;\n var importRules = [];\n var cssRulesSize = cssRules.length;\n\n for (var i = 0; i < cssRulesSize; i += 1) {\n var cssRule = cssRules[i];\n var mayHaveImport = extractImport; /* @import rules are reordered to appear first */\n if (mayHaveImport && cssRule.indexOf('@import') !== -1) {\n importRules.push(cssRule);\n } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {\n mayHaveImport = false;\n injectedRules += 1;\n }\n }\n\n if (extractImport && importRules.length > 0) {\n usedImportRuleTag = true;\n // $FlowFixMe\n getImportRuleTag().insertRules(id + '-import', importRules);\n }\n\n sizes[marker] += injectedRules; /* add up no of injected rules */\n addNameForId(names, id, name);\n };\n\n var removeRules = function removeRules(id) {\n var marker = markers[id];\n if (marker === undefined) return;\n\n var size = sizes[marker];\n var sheet = sheetForTag(el);\n var removalIndex = addUpUntilIndex(sizes, marker);\n deleteRules(sheet, removalIndex, size);\n sizes[marker] = 0;\n resetIdNames(names, id);\n\n if (extractImport && usedImportRuleTag) {\n // $FlowFixMe\n getImportRuleTag().removeRules(id + '-import');\n }\n };\n\n var css = function css() {\n var _sheetForTag = sheetForTag(el),\n cssRules = _sheetForTag.cssRules;\n\n var str = '';\n\n // eslint-disable-next-line guard-for-in\n for (var id in markers) {\n str += makeTextMarker(id);\n var marker = markers[id];\n var end = addUpUntilIndex(sizes, marker);\n var size = sizes[marker];\n for (var i = end - size; i < end; i += 1) {\n var rule = cssRules[i];\n if (rule !== undefined) {\n str += rule.cssText;\n }\n }\n }\n\n return str;\n };\n\n return {\n clone: function clone() {\n throw new StyledComponentsError(5);\n },\n\n css: css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker: insertMarker,\n insertRules: insertRules,\n removeRules: removeRules,\n sealed: false,\n styleTag: el,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names)\n };\n};\n\nvar makeTextNode = function makeTextNode(id) {\n return document.createTextNode(makeTextMarker(id));\n};\n\nvar makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {\n var names = Object.create(null);\n var markers = Object.create(null);\n\n var extractImport = getImportRuleTag !== undefined;\n\n /* indicates whther getImportRuleTag was called */\n var usedImportRuleTag = false;\n\n var insertMarker = function insertMarker(id) {\n var prev = markers[id];\n if (prev !== undefined) {\n return prev;\n }\n\n markers[id] = makeTextNode(id);\n el.appendChild(markers[id]);\n names[id] = Object.create(null);\n\n return markers[id];\n };\n\n var insertRules = function insertRules(id, cssRules, name) {\n var marker = insertMarker(id);\n var importRules = [];\n var cssRulesSize = cssRules.length;\n\n for (var i = 0; i < cssRulesSize; i += 1) {\n var rule = cssRules[i];\n var mayHaveImport = extractImport;\n if (mayHaveImport && rule.indexOf('@import') !== -1) {\n importRules.push(rule);\n } else {\n mayHaveImport = false;\n var separator = i === cssRulesSize - 1 ? '' : ' ';\n marker.appendData('' + rule + separator);\n }\n }\n\n addNameForId(names, id, name);\n\n if (extractImport && importRules.length > 0) {\n usedImportRuleTag = true;\n // $FlowFixMe\n getImportRuleTag().insertRules(id + '-import', importRules);\n }\n };\n\n var removeRules = function removeRules(id) {\n var marker = markers[id];\n if (marker === undefined) return;\n\n /* create new empty text node and replace the current one */\n var newMarker = makeTextNode(id);\n el.replaceChild(newMarker, marker);\n markers[id] = newMarker;\n resetIdNames(names, id);\n\n if (extractImport && usedImportRuleTag) {\n // $FlowFixMe\n getImportRuleTag().removeRules(id + '-import');\n }\n };\n\n var css = function css() {\n var str = '';\n // eslint-disable-next-line guard-for-in\n for (var id in markers) {\n str += markers[id].data;\n }\n return str;\n };\n\n return {\n clone: function clone() {\n throw new StyledComponentsError(5);\n },\n\n css: css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker: insertMarker,\n insertRules: insertRules,\n removeRules: removeRules,\n sealed: false,\n styleTag: el,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names)\n };\n};\n\nvar makeServerTagInternal = function makeServerTagInternal(namesArg, markersArg) {\n var names = namesArg === undefined ? Object.create(null) : namesArg;\n var markers = markersArg === undefined ? Object.create(null) : markersArg;\n\n var insertMarker = function insertMarker(id) {\n var prev = markers[id];\n if (prev !== undefined) {\n return prev;\n }\n\n return markers[id] = [''];\n };\n\n var insertRules = function insertRules(id, cssRules, name) {\n var marker = insertMarker(id);\n marker[0] += cssRules.join(' ');\n addNameForId(names, id, name);\n };\n\n var removeRules = function removeRules(id) {\n var marker = markers[id];\n if (marker === undefined) return;\n marker[0] = '';\n resetIdNames(names, id);\n };\n\n var css = function css() {\n var str = '';\n // eslint-disable-next-line guard-for-in\n for (var id in markers) {\n var cssForId = markers[id][0];\n if (cssForId) {\n str += makeTextMarker(id) + cssForId;\n }\n }\n return str;\n };\n\n var clone = function clone() {\n var namesClone = cloneNames(names);\n var markersClone = Object.create(null);\n\n // eslint-disable-next-line guard-for-in\n for (var id in markers) {\n markersClone[id] = [markers[id][0]];\n }\n\n return makeServerTagInternal(namesClone, markersClone);\n };\n\n var tag = {\n clone: clone,\n css: css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker: insertMarker,\n insertRules: insertRules,\n removeRules: removeRules,\n sealed: false,\n styleTag: null,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names)\n };\n\n return tag;\n};\n\nvar makeServerTag = function makeServerTag() {\n return makeServerTagInternal();\n};\n\nvar makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {\n if (IS_BROWSER && !forceServer) {\n var el = makeStyleTag(target, tagEl, insertBefore);\n\n if (DISABLE_SPEEDY) {\n return makeBrowserTag(el, getImportRuleTag);\n } else {\n return makeSpeedyTag(el, getImportRuleTag);\n }\n }\n\n return makeServerTag();\n};\n\n/* wraps a given tag so that rehydration is performed once when necessary */\nvar makeRehydrationTag = function makeRehydrationTag(tag, els, extracted, immediateRehydration) {\n /* rehydration function that adds all rules to the new tag */\n var rehydrate = once(function () {\n /* add all extracted components to the new tag */\n for (var i = 0, len = extracted.length; i < len; i += 1) {\n var _extracted$i = extracted[i],\n componentId = _extracted$i.componentId,\n cssFromDOM = _extracted$i.cssFromDOM;\n\n var cssRules = splitByRules(cssFromDOM);\n tag.insertRules(componentId, cssRules);\n }\n\n /* remove old HTMLStyleElements, since they have been rehydrated */\n for (var _i = 0, _len = els.length; _i < _len; _i += 1) {\n var el = els[_i];\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n }\n });\n\n if (immediateRehydration) rehydrate();\n\n return _extends({}, tag, {\n /* add rehydration hook to insertion methods */\n insertMarker: function insertMarker(id) {\n rehydrate();\n return tag.insertMarker(id);\n },\n insertRules: function insertRules(id, cssRules, name) {\n rehydrate();\n return tag.insertRules(id, cssRules, name);\n }\n });\n};\n\n// \n\nvar SPLIT_REGEX = /\\s+/;\n\n/* determine the maximum number of components before tags are sharded */\nvar MAX_SIZE = void 0;\nif (IS_BROWSER) {\n /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */\n MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;\n} else {\n /* for servers we do not need to shard at all */\n MAX_SIZE = -1;\n}\n\nvar sheetRunningId = 0;\nvar master = void 0;\n\nvar StyleSheet = function () {\n /* a map from ids to tags */\n /* deferred rules for a given id */\n /* this is used for not reinjecting rules via hasNameForId() */\n /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */\n /* a list of tags belonging to this StyleSheet */\n /* a tag for import rules */\n /* current capacity until a new tag must be created */\n /* children (aka clones) of this StyleSheet inheriting all and future injections */\n\n function StyleSheet() {\n var _this = this;\n\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;\n var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n classCallCheck(this, StyleSheet);\n\n this.getImportRuleTag = function () {\n var importRuleTag = _this.importRuleTag;\n\n if (importRuleTag !== undefined) {\n return importRuleTag;\n }\n\n var firstTag = _this.tags[0];\n var insertBefore = true;\n\n return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);\n };\n\n sheetRunningId += 1;\n this.id = sheetRunningId;\n this.forceServer = forceServer;\n this.target = forceServer ? null : target;\n this.tagMap = {};\n this.deferred = {};\n this.rehydratedNames = {};\n this.ignoreRehydratedNames = {};\n this.tags = [];\n this.capacity = 1;\n this.clones = [];\n }\n\n /* rehydrate all SSR'd style tags */\n\n\n StyleSheet.prototype.rehydrate = function rehydrate() {\n if (!IS_BROWSER || this.forceServer) {\n return this;\n }\n\n var els = [];\n var extracted = [];\n var isStreamed = false;\n\n /* retrieve all of our SSR style elements from the DOM */\n var nodes = document.querySelectorAll('style[' + SC_ATTR + ']');\n var nodesSize = nodes.length;\n\n /* abort rehydration if no previous style tags were found */\n if (nodesSize === 0) {\n return this;\n }\n\n for (var i = 0; i < nodesSize; i += 1) {\n // $FlowFixMe: We can trust that all elements in this query are style elements\n var el = nodes[i];\n\n /* check if style tag is a streamed tag */\n if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);\n\n /* retrieve all component names */\n var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);\n var elNamesSize = elNames.length;\n for (var j = 0; j < elNamesSize; j += 1) {\n var name = elNames[j];\n /* add rehydrated name to sheet to avoid readding styles */\n this.rehydratedNames[name] = true;\n }\n\n /* extract all components and their CSS */\n extracted.push.apply(extracted, extractComps(el.textContent));\n\n /* store original HTMLStyleElement */\n els.push(el);\n }\n\n /* abort rehydration if nothing was extracted */\n var extractedSize = extracted.length;\n if (extractedSize === 0) {\n return this;\n }\n\n /* create a tag to be used for rehydration */\n var tag = this.makeTag(null);\n var rehydrationTag = makeRehydrationTag(tag, els, extracted, isStreamed);\n\n /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */\n this.capacity = Math.max(1, MAX_SIZE - extractedSize);\n this.tags.push(rehydrationTag);\n\n /* retrieve all component ids */\n for (var _j = 0; _j < extractedSize; _j += 1) {\n this.tagMap[extracted[_j].componentId] = rehydrationTag;\n }\n\n return this;\n };\n\n /* retrieve a \"master\" instance of StyleSheet which is typically used when no other is available\n * The master StyleSheet is targeted by injectGlobal, keyframes, and components outside of any\n * StyleSheetManager's context */\n\n\n /* reset the internal \"master\" instance */\n StyleSheet.reset = function reset() {\n var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n master = new StyleSheet(undefined, forceServer).rehydrate();\n };\n\n /* adds \"children\" to the StyleSheet that inherit all of the parents' rules\n * while their own rules do not affect the parent */\n\n\n StyleSheet.prototype.clone = function clone() {\n var sheet = new StyleSheet(this.target, this.forceServer);\n\n /* add to clone array */\n this.clones.push(sheet);\n\n /* clone all tags */\n sheet.tags = this.tags.map(function (tag) {\n var ids = tag.getIds();\n var newTag = tag.clone();\n\n /* reconstruct tagMap */\n for (var i = 0; i < ids.length; i += 1) {\n sheet.tagMap[ids[i]] = newTag;\n }\n\n return newTag;\n });\n\n /* clone other maps */\n sheet.rehydratedNames = _extends({}, this.rehydratedNames);\n sheet.deferred = _extends({}, this.deferred);\n\n return sheet;\n };\n\n /* force StyleSheet to create a new tag on the next injection */\n\n\n StyleSheet.prototype.sealAllTags = function sealAllTags() {\n this.capacity = 1;\n\n this.tags.forEach(function (tag) {\n // eslint-disable-next-line no-param-reassign\n tag.sealed = true;\n });\n };\n\n StyleSheet.prototype.makeTag = function makeTag$$1(tag) {\n var lastEl = tag ? tag.styleTag : null;\n var insertBefore = false;\n\n return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);\n };\n\n /* get a tag for a given componentId, assign the componentId to one, or shard */\n StyleSheet.prototype.getTagForId = function getTagForId(id) {\n /* simply return a tag, when the componentId was already assigned one */\n var prev = this.tagMap[id];\n if (prev !== undefined && !prev.sealed) {\n return prev;\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */\n this.capacity -= 1;\n\n if (this.capacity === 0) {\n this.capacity = MAX_SIZE;\n tag = this.makeTag(tag);\n this.tags.push(tag);\n }\n\n return this.tagMap[id] = tag;\n };\n\n /* mainly for injectGlobal to check for its id */\n\n\n StyleSheet.prototype.hasId = function hasId(id) {\n return this.tagMap[id] !== undefined;\n };\n\n /* caching layer checking id+name to already have a corresponding tag and injected rules */\n\n\n StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {\n /* exception for rehydrated names which are checked separately */\n if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {\n return true;\n }\n\n var tag = this.tagMap[id];\n return tag !== undefined && tag.hasNameForId(id, name);\n };\n\n /* registers a componentId and registers it on its tag */\n\n\n StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {\n /* don't inject when the id is already registered */\n if (this.tagMap[id] !== undefined) return;\n\n var clones = this.clones;\n\n for (var i = 0; i < clones.length; i += 1) {\n clones[i].deferredInject(id, cssRules);\n }\n\n this.getTagForId(id).insertMarker(id);\n this.deferred[id] = cssRules;\n };\n\n /* injects rules for a given id with a name that will need to be cached */\n\n\n StyleSheet.prototype.inject = function inject(id, cssRules, name) {\n var clones = this.clones;\n\n\n for (var i = 0; i < clones.length; i += 1) {\n clones[i].inject(id, cssRules, name);\n }\n\n var tag = this.getTagForId(id);\n\n /* add deferred rules for component */\n if (this.deferred[id] !== undefined) {\n // Combine passed cssRules with previously deferred CSS rules\n // NOTE: We cannot mutate the deferred array itself as all clones\n // do the same (see clones[i].inject)\n var rules = this.deferred[id].concat(cssRules);\n tag.insertRules(id, rules, name);\n\n this.deferred[id] = undefined;\n } else {\n tag.insertRules(id, cssRules, name);\n }\n };\n\n /* removes all rules for a given id, which doesn't remove its marker but resets it */\n\n\n StyleSheet.prototype.remove = function remove(id) {\n var tag = this.tagMap[id];\n if (tag === undefined) return;\n\n var clones = this.clones;\n\n for (var i = 0; i < clones.length; i += 1) {\n clones[i].remove(id);\n }\n\n /* remove all rules from the tag */\n tag.removeRules(id);\n /* ignore possible rehydrated names */\n this.ignoreRehydratedNames[id] = true;\n /* delete possible deferred rules */\n this.deferred[id] = undefined;\n };\n\n StyleSheet.prototype.toHTML = function toHTML() {\n return this.tags.map(function (tag) {\n return tag.toHTML();\n }).join('');\n };\n\n StyleSheet.prototype.toReactElements = function toReactElements() {\n var id = this.id;\n\n\n return this.tags.map(function (tag, i) {\n var key = 'sc-' + id + '-' + i;\n return cloneElement(tag.toElement(), { key: key });\n });\n };\n\n createClass(StyleSheet, null, [{\n key: 'master',\n get: function get$$1() {\n return master || (master = new StyleSheet().rehydrate());\n }\n\n /* NOTE: This is just for backwards-compatibility with jest-styled-components */\n\n }, {\n key: 'instance',\n get: function get$$1() {\n return StyleSheet.master;\n }\n }]);\n return StyleSheet;\n}();\n\nvar _StyleSheetManager$ch;\n\nvar StyleSheetManager = function (_Component) {\n inherits(StyleSheetManager, _Component);\n\n function StyleSheetManager() {\n classCallCheck(this, StyleSheetManager);\n return possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n StyleSheetManager.prototype.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[CONTEXT_KEY] = this.sheetInstance, _ref;\n };\n\n StyleSheetManager.prototype.componentWillMount = function componentWillMount() {\n if (this.props.sheet) {\n this.sheetInstance = this.props.sheet;\n } else if (this.props.target) {\n this.sheetInstance = new StyleSheet(this.props.target);\n } else {\n throw new StyledComponentsError(4);\n }\n };\n\n StyleSheetManager.prototype.render = function render() {\n /* eslint-disable react/prop-types */\n // Flow v0.43.1 will report an error accessing the `children` property,\n // but v0.47.0 will not. It is necessary to use a type cast instead of\n // a \"fixme\" comment to satisfy both Flow versions.\n return React.Children.only(this.props.children);\n };\n\n return StyleSheetManager;\n}(Component);\n\nStyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]).isRequired, _StyleSheetManager$ch);\nprocess.env.NODE_ENV !== \"production\" ? StyleSheetManager.propTypes = {\n sheet: PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]),\n target: PropTypes.shape({\n appendChild: PropTypes.func.isRequired\n })\n} : void 0;\n\n// \n\nvar ServerStyleSheet = function () {\n function ServerStyleSheet() {\n classCallCheck(this, ServerStyleSheet);\n\n /* The master sheet might be reset, so keep a reference here */\n this.masterSheet = StyleSheet.master;\n this.instance = this.masterSheet.clone();\n this.closed = false;\n }\n\n ServerStyleSheet.prototype.complete = function complete() {\n if (!this.closed) {\n /* Remove closed StyleSheets from the master sheet */\n var index = this.masterSheet.clones.indexOf(this.instance);\n this.masterSheet.clones.splice(index, 1);\n this.closed = true;\n }\n };\n\n ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {\n if (this.closed) {\n throw new StyledComponentsError(2);\n }\n\n return React.createElement(\n StyleSheetManager,\n { sheet: this.instance },\n children\n );\n };\n\n ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {\n this.complete();\n return this.instance.toHTML();\n };\n\n ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {\n this.complete();\n return this.instance.toReactElements();\n };\n\n ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {\n var _this = this;\n\n {\n throw new StyledComponentsError(3);\n }\n\n /* the tag index keeps track of which tags have already been emitted */\n var instance = this.instance;\n\n var instanceTagIndex = 0;\n\n var streamAttr = SC_STREAM_ATTR + '=\"true\"';\n\n var transformer = new stream.Transform({\n transform: function appendStyleChunks(chunk, /* encoding */_, callback) {\n var tags = instance.tags;\n\n var html = '';\n\n /* retrieve html for each new style tag */\n for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {\n var tag = tags[instanceTagIndex];\n html += tag.toHTML(streamAttr);\n }\n\n /* force our StyleSheets to emit entirely new tags */\n instance.sealAllTags();\n\n /* prepend style html to chunk */\n this.push(html + chunk);\n callback();\n }\n });\n\n readableStream.on('end', function () {\n return _this.complete();\n });\n readableStream.on('error', function (err) {\n _this.complete();\n\n // forward the error to the transform stream\n transformer.emit('error', err);\n });\n\n return readableStream.pipe(transformer);\n };\n\n return ServerStyleSheet;\n}();\n\n// \n\nvar LIMIT = 200;\n\nvar createWarnTooManyClasses = (function (displayName) {\n var generatedClasses = {};\n var warningSeen = false;\n\n return function (className) {\n if (!warningSeen) {\n generatedClasses[className] = true;\n if (Object.keys(generatedClasses).length >= LIMIT) {\n // Unable to find latestRule in test environment.\n /* eslint-disable no-console, prefer-template */\n console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \\n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\\n' + 'Example:\\n' + ' const Component = styled.div.attrs({\\n' + ' style: ({ background }) => ({\\n' + ' background,\\n' + ' }),\\n' + ' })`width: 100%;`\\n\\n' + ' ');\n warningSeen = true;\n generatedClasses = {};\n }\n }\n };\n});\n\n// \n\nvar determineTheme = (function (props, fallbackTheme, defaultProps) {\n // Props should take precedence over ThemeProvider, which should take precedence over\n // defaultProps, but React automatically puts defaultProps on props.\n\n /* eslint-disable react/prop-types */\n var isDefaultTheme = defaultProps && props.theme === defaultProps.theme;\n var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme;\n /* eslint-enable */\n\n return theme;\n});\n\n// \nvar escapeRegex = /[[\\].#*$><+~=|^:(),\"'`-]+/g;\nvar dashesAtEnds = /(^-|-$)/g;\n\n/**\n * TODO: Explore using CSS.escape when it becomes more available\n * in evergreen browsers.\n */\nfunction escape(str) {\n return str\n // Replace all possible CSS selectors\n .replace(escapeRegex, '-')\n\n // Remove extraneous hyphens at the start and end\n .replace(dashesAtEnds, '');\n}\n\n// \n\nfunction getComponentName(target) {\n return target.displayName || target.name || 'Component';\n}\n\n// \n\nfunction isTag(target) /* : %checks */{\n return typeof target === 'string';\n}\n\n// \n\nfunction generateDisplayName(target) {\n return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';\n}\n\n// \n/* eslint-disable max-len */\n/**\n * Trying to avoid the unknown-prop errors on styled components by filtering by\n * React's attribute whitelist.\n *\n * To regenerate this regex:\n *\n * 1. `npm i -g regexgen` (https://github.com/devongovett/regexgen)\n * 2. Run `regexgen` with the list of space-separated words below as input\n * 3. Surround the emitted regex with this: `/^(GENERATED_REGEX)$/` -- this will ensure a full string match\n * and no false positives from partials\n * */\n/*\nchildren dangerouslySetInnerHTML key ref autoFocus defaultValue valueLink defaultChecked checkedLink innerHTML suppressContentEditableWarning onFocusIn onFocusOut className onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onInvalid onSubmit onReset onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onAnimationStart onAnimationEnd onAnimationIteration onTransitionEnd onCopyCapture onCutCapture onPasteCapture onCompositionEndCapture onCompositionStartCapture onCompositionUpdateCapture onKeyDownCapture onKeyPressCapture onKeyUpCapture onFocusCapture onBlurCapture onChangeCapture onInputCapture onSubmitCapture onResetCapture onClickCapture onContextMenuCapture onDoubleClickCapture onDragCapture onDragEndCapture onDragEnterCapture onDragExitCapture onDragLeaveCapture onDragOverCapture onDragStartCapture onDropCapture onMouseDownCapture onMouseEnterCapture onMouseLeaveCapture onMouseMoveCapture onMouseOutCapture onMouseOverCapture onMouseUpCapture onSelectCapture onTouchCancelCapture onTouchEndCapture onTouchMoveCapture onTouchStartCapture onScrollCapture onWheelCapture onAbortCapture onCanPlayCapture onCanPlayThroughCapture onDurationChangeCapture onEmptiedCapture onEncryptedCapture onEndedCapture onErrorCapture onLoadedDataCapture onLoadedMetadataCapture onLoadStartCapture onPauseCapture onPlayCapture onPlayingCapture onProgressCapture onRateChangeCapture onSeekedCapture onSeekingCapture onStalledCapture onSuspendCapture onTimeUpdateCapture onVolumeChangeCapture onWaitingCapture onLoadCapture onAnimationStartCapture onAnimationEndCapture onAnimationIterationCapture onTransitionEndCapture accept acceptCharset accessKey action allowFullScreen allowTransparency alt as async autoComplete autoPlay capture cellPadding cellSpacing charSet challenge checked cite classID className cols colSpan content contentEditable contextMenu controlsList controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name nonce noValidate open optimum pattern placeholder playsInline poster preload profile radioGroup readOnly referrerPolicy rel required reversed role rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap about datatype inlist prefix property resource typeof vocab autoCapitalize autoCorrect autoSave color itemProp itemScope itemType itemID itemRef results security unselectable accentHeight accumulate additive alignmentBaseline allowReorder alphabetic amplitude arabicForm ascent attributeName attributeType autoReverse azimuth baseFrequency baseProfile baselineShift bbox begin bias by calcMode capHeight clip clipPath clipRule clipPathUnits colorInterpolation colorInterpolationFilters colorProfile colorRendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground end exponent externalResourcesRequired fill fillOpacity fillRule filter filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fx fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust letterSpacing lightingColor limitingConeAngle local markerEnd markerMid markerStart markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical mode numOctaves offset opacity operator order orient orientation origin overflow overlinePosition overlineThickness paintOrder panose1 pathLength patternContentUnits patternTransform patternUnits pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY renderingIntent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shapeRendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage tableValues targetX targetY textAnchor textDecoration textRendering textLength to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan onPointerDown onPointerMove onPointerUp onPointerCancel onGotPointerCapture onLostPointerCapture onPointerEnter onPointerLeave onPointerOver onPointerOut class for autofocus allow allowUserMedia allowPaymentRequest\n*/\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_REGEX = /^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:Animation|Touch|Load|Drag)Start|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|Lo(?:stPointer|ad)|TimeUpdate|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|GotPointer|MouseDown|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|KeyPress|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|P(?:rogress|laying)|DragEnd|Key(?:Down|Up)|(?:MouseU|Dro)p|(?:Wait|Seek)ing|Scroll|Focus|Paste|Abort|Drag|Play|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|onPointerLeav|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|onPointerMov|(?:attribute|glyph)Nam|playsInlin|(?:writing|input|edge)Mod|(?:formE|e)ncTyp|(?:amplitu|mo)d|(?:xlinkTy|itemSco|keyTy|slo)p|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ord)s|o(?:lor(?:Interpolation)?|nt(?:rols|ent))|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|(?:ontrolsLis|apHeigh)t|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|o(?:ntextMenu|ls)|(?:rossOrigi|olSpa)n|l(?:ip(?:Path)?|ass)|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|auto[Ff]ocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|on(?:PointerDow|FocusI)|formActio|zoomAndPa|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveAspectRatio|ointsAt[X-Z]|anose1)|(?:(?:allowPaymentReque|(?:fontSize|length)Adju|manife)s|strokeMiterlimi|(?:(?:specularE|e)xpon|renderingInt|asc)en|(?:specularConsta|repeatCou|fontVaria)n|d(?:iffuseConsta|esce)n|baselineShif|vectorEffec|onPointerOu|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|markerStar|a(?:utoCorrec|bou)|onFocusOu|intercep|restar|forma|inlis|heigh|lis)t|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:gradientT|patternT|t)ransform|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|(?:markerM|onInval)i|preloa|metho|kin)d|k(?:ernel(?:UnitLength|Matrix)|[1-4])|strokeDasharray|(?:onPointerCanc|lab)el|(?:allowFullScre|hidd)en|a(?:l(?:lowUserMedia|phabetic|t)|rabicForm|sync)|systemLanguage|(?:(?:o(?:nPointer(?:Ent|Ov)|rd)|allowReord|placehold|frameBord|paintOrd|post)e|repeatDu|d(?:efe|u))r|(?:pointerEve|keyPoi)nts|preserveAlpha|(?:strokeLineca|onPointerU|itemPro|useMa|wra|loo)p|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|unicodeRange|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|(?:vI|i)deographic|mathematical|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|vAlphabetic|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|(?:xmlnsXl|valueL)ink|mediaGroup|spellCheck|(?:text|m(?:in|ax))Length|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|pathLength|(?:xlinkHr|glyphR)ef|innerHTML|xlinkShow|f(?:o(?:ntSize|rm?)|il(?:ter|l))|(?:tabInde|(?:sand|b)bo|viewBo)x|autoPlay|r(?:e(?:quired|sult|f))?|(?:(?:href|xml|src)La|kerni)ng|o(?:verflow|pen)|i(?:temRef|n2|s)|p(?:attern|oints)|unicode|d(?:efault|ata|ir)?|divisor|t(?:arget[XY]|o)|(?:stri|la)ng|(?:width|size)s|prefix|typeof|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|s(?:t(?:roke|art)|hape|cope|rc)|a(?:ccept|llow|s)|itemID|t(?:arget|ype)|m(?:edia|a(?:sk|x)|in)|value|width|x(?:mlns)?|size|href|k(?:ey)?|end|low|by|x[12]|y[12]|g[12]|i[dn]|f[xy]|[yz])$/;\n/* From DOMProperty */\nvar ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nvar isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(x|data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'));\n\nvar validAttr = (function (name) {\n return ATTRIBUTE_REGEX.test(name) || isCustomAttribute(name.toLowerCase());\n});\n\n// \n\nfunction hasInInheritanceChain(child, parent) {\n var target = child;\n\n while (target) {\n target = Object.getPrototypeOf(target);\n\n if (target && target === parent) {\n return true;\n }\n }\n\n return false;\n}\n\n// \n/**\n * Creates a broadcast that can be listened to, i.e. simple event emitter\n *\n * @see https://github.com/ReactTraining/react-broadcast\n */\n\nvar createBroadcast = function createBroadcast(initialState) {\n var listeners = {};\n var id = 0;\n var state = initialState;\n\n function publish(nextState) {\n state = nextState;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (var key in listeners) {\n var listener = listeners[key];\n if (listener === undefined) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n listener(state);\n }\n }\n\n function subscribe(listener) {\n var currentId = id;\n listeners[currentId] = listener;\n id += 1;\n listener(state);\n return currentId;\n }\n\n function unsubscribe(unsubID) {\n listeners[unsubID] = undefined;\n }\n\n return { publish: publish, subscribe: subscribe, unsubscribe: unsubscribe };\n};\n\nvar _contextShape, _ThemeProvider$contex;\n\n// NOTE: DO NOT CHANGE, changing this is a semver major change!\nvar CHANNEL = '__styled-components__';\nvar CHANNEL_NEXT = CHANNEL + 'next__';\n\nvar CONTEXT_CHANNEL_SHAPE = PropTypes.shape({\n getTheme: PropTypes.func,\n subscribe: PropTypes.func,\n unsubscribe: PropTypes.func\n});\n\nvar contextShape = (_contextShape = {}, _contextShape[CHANNEL] = PropTypes.func, _contextShape[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _contextShape);\n\nvar warnChannelDeprecated = void 0;\nif (process.env.NODE_ENV !== 'production') {\n warnChannelDeprecated = once(function () {\n // eslint-disable-next-line no-console\n console.warn('Warning: Usage of `context.' + CHANNEL + '` as a function is deprecated. It will be replaced with the object on `.context.' + CHANNEL_NEXT + '` in a future version.');\n });\n}\n\nvar isFunction = function isFunction(test) {\n return typeof test === 'function';\n};\n\n/**\n * Provide a theme to an entire react component tree via context and event listeners (have to do\n * both context and event emitter as pure components block context updates)\n */\n\nvar ThemeProvider = function (_Component) {\n inherits(ThemeProvider, _Component);\n\n function ThemeProvider() {\n classCallCheck(this, ThemeProvider);\n\n var _this = possibleConstructorReturn(this, _Component.call(this));\n\n _this.unsubscribeToOuterId = -1;\n\n _this.getTheme = _this.getTheme.bind(_this);\n return _this;\n }\n\n ThemeProvider.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme\n // with the outer theme\n var outerContext = this.context[CHANNEL_NEXT];\n if (outerContext !== undefined) {\n this.unsubscribeToOuterId = outerContext.subscribe(function (theme) {\n _this2.outerTheme = theme;\n\n if (_this2.broadcast !== undefined) {\n _this2.publish(_this2.props.theme);\n }\n });\n }\n\n this.broadcast = createBroadcast(this.getTheme());\n };\n\n ThemeProvider.prototype.getChildContext = function getChildContext() {\n var _this3 = this,\n _babelHelpers$extends;\n\n return _extends({}, this.context, (_babelHelpers$extends = {}, _babelHelpers$extends[CHANNEL_NEXT] = {\n getTheme: this.getTheme,\n subscribe: this.broadcast.subscribe,\n unsubscribe: this.broadcast.unsubscribe\n }, _babelHelpers$extends[CHANNEL] = function (subscriber) {\n if (process.env.NODE_ENV !== 'production') {\n warnChannelDeprecated();\n }\n\n // Patch the old `subscribe` provide via `CHANNEL` for older clients.\n var unsubscribeId = _this3.broadcast.subscribe(subscriber);\n return function () {\n return _this3.broadcast.unsubscribe(unsubscribeId);\n };\n }, _babelHelpers$extends));\n };\n\n ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) {\n this.publish(nextProps.theme);\n }\n };\n\n ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.unsubscribeToOuterId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId);\n }\n };\n\n // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation\n\n\n ThemeProvider.prototype.getTheme = function getTheme(passedTheme) {\n var theme = passedTheme || this.props.theme;\n\n if (isFunction(theme)) {\n var mergedTheme = theme(this.outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {\n throw new StyledComponentsError(7);\n }\n\n return mergedTheme;\n }\n\n if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {\n throw new StyledComponentsError(8);\n }\n\n return _extends({}, this.outerTheme, theme);\n };\n\n ThemeProvider.prototype.publish = function publish(theme) {\n this.broadcast.publish(this.getTheme(theme));\n };\n\n ThemeProvider.prototype.render = function render() {\n if (!this.props.children) {\n return null;\n }\n\n return React.Children.only(this.props.children);\n };\n\n return ThemeProvider;\n}(Component);\n\nThemeProvider.childContextTypes = contextShape;\nThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$contex);\n\nvar _babelHelpers$extends;\n\n// HACK for generating all static styles without needing to allocate\n// an empty execution context every single time...\nvar STATIC_EXECUTION_CONTEXT = {};\n\nvar modifiedContextShape = _extends({}, contextShape, (_babelHelpers$extends = {}, _babelHelpers$extends[CONTEXT_KEY] = PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]), _babelHelpers$extends));\n\nvar identifiers = {};\n\n/* We depend on components having unique IDs */\nvar generateId = function generateId(ComponentStyle, _displayName, parentComponentId) {\n var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);\n\n /**\n * This ensures uniqueness if two components happen to share\n * the same displayName.\n */\n var nr = (identifiers[displayName] || 0) + 1;\n identifiers[displayName] = nr;\n\n var componentId = displayName + '-' + ComponentStyle.generateName(displayName + nr);\n\n return parentComponentId !== undefined ? parentComponentId + '-' + componentId : componentId;\n};\n\nvar warnExtendDeprecated = function warnExtendDeprecated() {};\nif (process.env.NODE_ENV !== 'production') {\n warnExtendDeprecated = once(function () {\n // eslint-disable-next-line no-console\n console.warn('Warning: The \"extend\" API will be removed in the upcoming v4.0 release. Use styled(StyledComponent) instead. You can find more information here: https://github.com/styled-components/styled-components/issues/1546');\n });\n}\n\n// $FlowFixMe\n\nvar BaseStyledComponent = function (_Component) {\n inherits(BaseStyledComponent, _Component);\n\n function BaseStyledComponent() {\n var _temp, _this, _ret;\n\n classCallCheck(this, BaseStyledComponent);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.attrs = {}, _this.state = {\n theme: null,\n generatedClassName: ''\n }, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n BaseStyledComponent.prototype.unsubscribeFromContext = function unsubscribeFromContext() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);\n }\n };\n\n BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props) {\n var attrs = this.constructor.attrs;\n\n var context = _extends({}, props, { theme: theme });\n if (attrs === undefined) {\n return context;\n }\n\n this.attrs = Object.keys(attrs).reduce(function (acc, key) {\n var attr = attrs[key];\n\n // eslint-disable-next-line no-param-reassign\n acc[key] = typeof attr === 'function' && !hasInInheritanceChain(attr, Component) ? attr(context) : attr;\n return acc;\n }, {});\n\n return _extends({}, context, this.attrs);\n };\n\n BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {\n var _constructor = this.constructor,\n attrs = _constructor.attrs,\n componentStyle = _constructor.componentStyle,\n warnTooManyClasses = _constructor.warnTooManyClasses;\n\n var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.master;\n\n // statically styled-components don't need to build an execution context object,\n // and shouldn't be increasing the number of class names\n if (componentStyle.isStatic && attrs === undefined) {\n return componentStyle.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, styleSheet);\n } else {\n var executionContext = this.buildExecutionContext(theme, props);\n var className = componentStyle.generateAndInjectStyles(executionContext, styleSheet);\n\n if (process.env.NODE_ENV !== 'production' && warnTooManyClasses !== undefined) {\n warnTooManyClasses(className);\n }\n\n return className;\n }\n };\n\n BaseStyledComponent.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var componentStyle = this.constructor.componentStyle;\n\n var styledContext = this.context[CHANNEL_NEXT];\n\n // If this is a statically-styled component, we don't need to the theme\n // to generate or build styles.\n if (componentStyle.isStatic) {\n var generatedClassName = this.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, this.props);\n this.setState({ generatedClassName: generatedClassName });\n // If there is a theme in the context, subscribe to the event emitter. This\n // is necessary due to pure components blocking context updates, this circumvents\n // that by updating when an event is emitted\n } else if (styledContext !== undefined) {\n var subscribe = styledContext.subscribe;\n\n this.unsubscribeId = subscribe(function (nextTheme) {\n // This will be called once immediately\n var theme = determineTheme(_this2.props, nextTheme, _this2.constructor.defaultProps);\n\n var generatedClassName = _this2.generateAndInjectStyles(theme, _this2.props);\n\n _this2.setState({ theme: theme, generatedClassName: generatedClassName });\n });\n } else {\n // eslint-disable-next-line react/prop-types\n var theme = this.props.theme || EMPTY_OBJECT;\n var _generatedClassName = this.generateAndInjectStyles(theme, this.props);\n this.setState({ theme: theme, generatedClassName: _generatedClassName });\n }\n };\n\n BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _this3 = this;\n\n // If this is a statically-styled component, we don't need to listen to\n // props changes to update styles\n var componentStyle = this.constructor.componentStyle;\n\n if (componentStyle.isStatic) {\n return;\n }\n\n this.setState(function (prevState) {\n var theme = determineTheme(nextProps, prevState.theme, _this3.constructor.defaultProps);\n var generatedClassName = _this3.generateAndInjectStyles(theme, nextProps);\n\n return { theme: theme, generatedClassName: generatedClassName };\n });\n };\n\n BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unsubscribeFromContext();\n };\n\n BaseStyledComponent.prototype.render = function render() {\n // eslint-disable-next-line react/prop-types\n var innerRef = this.props.innerRef;\n var generatedClassName = this.state.generatedClassName;\n var _constructor2 = this.constructor,\n styledComponentId = _constructor2.styledComponentId,\n target = _constructor2.target;\n\n\n var isTargetTag = isTag(target);\n\n var className = [\n // eslint-disable-next-line react/prop-types\n this.props.className, styledComponentId, this.attrs.className, generatedClassName].filter(Boolean).join(' ');\n\n var baseProps = _extends({}, this.attrs, {\n className: className\n });\n\n if (isStyledComponent(target)) {\n baseProps.innerRef = innerRef;\n } else {\n baseProps.ref = innerRef;\n }\n\n var propsForElement = baseProps;\n var key = void 0;\n\n for (key in this.props) {\n // Don't pass through non HTML tags through to HTML elements\n // always omit innerRef\n if (key !== 'innerRef' && key !== 'className' && (!isTargetTag || validAttr(key))) {\n propsForElement[key] = key === 'style' && key in this.attrs ? _extends({}, this.attrs[key], this.props[key]) : this.props[key];\n }\n }\n\n return createElement(target, propsForElement);\n };\n\n return BaseStyledComponent;\n}(Component);\n\nvar _StyledComponent = (function (ComponentStyle, constructWithOptions) {\n var createStyledComponent = function createStyledComponent(target, options, rules) {\n var _options$isClass = options.isClass,\n isClass = _options$isClass === undefined ? !isTag(target) : _options$isClass,\n _options$displayName = options.displayName,\n displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,\n _options$componentId = options.componentId,\n componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,\n _options$ParentCompon = options.ParentComponent,\n ParentComponent = _options$ParentCompon === undefined ? BaseStyledComponent : _options$ParentCompon,\n extendingRules = options.rules,\n attrs = options.attrs;\n\n\n var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;\n\n var componentStyle = new ComponentStyle(extendingRules === undefined ? rules : extendingRules.concat(rules), attrs, styledComponentId);\n\n var StyledComponent = function (_ParentComponent) {\n inherits(StyledComponent, _ParentComponent);\n\n function StyledComponent() {\n classCallCheck(this, StyledComponent);\n return possibleConstructorReturn(this, _ParentComponent.apply(this, arguments));\n }\n\n StyledComponent.withComponent = function withComponent(tag) {\n var previousComponentId = options.componentId,\n optionsToCopy = objectWithoutProperties(options, ['componentId']);\n\n\n var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));\n\n var newOptions = _extends({}, optionsToCopy, {\n componentId: newComponentId,\n ParentComponent: StyledComponent\n });\n\n return createStyledComponent(tag, newOptions, rules);\n };\n\n createClass(StyledComponent, null, [{\n key: 'extend',\n get: function get$$1() {\n var rulesFromOptions = options.rules,\n parentComponentId = options.componentId,\n optionsToCopy = objectWithoutProperties(options, ['rules', 'componentId']);\n\n\n var newRules = rulesFromOptions === undefined ? rules : rulesFromOptions.concat(rules);\n\n var newOptions = _extends({}, optionsToCopy, {\n rules: newRules,\n parentComponentId: parentComponentId,\n ParentComponent: StyledComponent\n });\n\n warnExtendDeprecated();\n\n return constructWithOptions(createStyledComponent, target, newOptions);\n }\n }]);\n return StyledComponent;\n }(ParentComponent);\n\n StyledComponent.attrs = attrs;\n StyledComponent.componentStyle = componentStyle;\n StyledComponent.contextTypes = modifiedContextShape;\n StyledComponent.displayName = displayName;\n StyledComponent.styledComponentId = styledComponentId;\n StyledComponent.target = target;\n\n\n if (process.env.NODE_ENV !== 'production') {\n StyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);\n }\n\n if (isClass) {\n hoistStatics(StyledComponent, target, {\n // all SC-specific things should not be hoisted\n attrs: true,\n componentStyle: true,\n displayName: true,\n extend: true,\n styledComponentId: true,\n target: true,\n warnTooManyClasses: true,\n withComponent: true\n });\n }\n\n return StyledComponent;\n };\n\n return createStyledComponent;\n});\n\n// Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js\nfunction murmurhash(str) {\n var l = str.length | 0,\n h = l | 0,\n i = 0,\n k;\n\n while (l >= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n k ^= k >>> 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n }\n\n h ^= h >>> 13;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h ^= h >>> 15;\n\n return h >>> 0;\n}\n\n// \n\nvar areStylesCacheable = IS_BROWSER;\n\nvar isStaticRules = function isStaticRules(rules, attrs) {\n for (var i = 0, len = rules.length; i < len; i += 1) {\n var rule = rules[i];\n\n // recursive case\n if (Array.isArray(rule) && !isStaticRules(rule)) {\n return false;\n } else if (typeof rule === 'function' && !isStyledComponent(rule)) {\n // functions are allowed to be static if they're just being\n // used to get the classname of a nested styled component\n return false;\n }\n }\n\n if (attrs !== undefined) {\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (var key in attrs) {\n if (typeof attrs[key] === 'function') {\n return false;\n }\n }\n }\n\n return true;\n};\n\nvar isHMREnabled = typeof module !== 'undefined' && module.hot && process.env.NODE_ENV !== 'production';\n\n/*\n ComponentStyle is all the CSS-specific stuff, not\n the React-specific stuff.\n */\nvar _ComponentStyle = (function (nameGenerator, flatten, stringifyRules) {\n /* combines hashStr (murmurhash) and nameGenerator for convenience */\n var generateRuleHash = function generateRuleHash(str) {\n return nameGenerator(murmurhash(str));\n };\n\n var ComponentStyle = function () {\n function ComponentStyle(rules, attrs, componentId) {\n classCallCheck(this, ComponentStyle);\n\n this.rules = rules;\n this.isStatic = !isHMREnabled && isStaticRules(rules, attrs);\n this.componentId = componentId;\n\n if (!StyleSheet.master.hasId(componentId)) {\n var placeholder = process.env.NODE_ENV !== 'production' ? ['.' + componentId + ' {}'] : [];\n\n StyleSheet.master.deferredInject(componentId, placeholder);\n }\n }\n\n /*\n * Flattens a rule set into valid CSS\n * Hashes it, wraps the whole chunk in a .hash1234 {}\n * Returns the hash to be injected on render()\n * */\n\n\n ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {\n var isStatic = this.isStatic,\n componentId = this.componentId,\n lastClassName = this.lastClassName;\n\n if (areStylesCacheable && isStatic && lastClassName !== undefined && styleSheet.hasNameForId(componentId, lastClassName)) {\n return lastClassName;\n }\n\n var flatCSS = flatten(this.rules, executionContext);\n var name = generateRuleHash(this.componentId + flatCSS.join(''));\n\n if (!styleSheet.hasNameForId(componentId, name)) {\n styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name), name);\n }\n\n this.lastClassName = name;\n return name;\n };\n\n ComponentStyle.generateName = function generateName(str) {\n return generateRuleHash(str);\n };\n\n return ComponentStyle;\n }();\n\n return ComponentStyle;\n});\n\n// \n// Thanks to ReactDOMFactories for this handy list!\n\nvar domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr',\n\n// SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\n// \n\nvar _styled = (function (styledComponent, constructWithOptions) {\n var styled = function styled(tag) {\n return constructWithOptions(styledComponent, tag);\n };\n\n // Shorthands for all valid HTML Elements\n domElements.forEach(function (domElement) {\n styled[domElement] = styled(domElement);\n });\n\n return styled;\n});\n\n// \n\nvar replaceWhitespace = function replaceWhitespace(str) {\n return str.replace(/\\s|\\\\n/g, '');\n};\n\nvar _keyframes = (function (nameGenerator, stringifyRules, css) {\n return function () {\n var styleSheet = StyleSheet.master;\n var rules = css.apply(undefined, arguments);\n var name = nameGenerator(murmurhash(replaceWhitespace(JSON.stringify(rules))));\n var id = 'sc-keyframes-' + name;\n\n if (!styleSheet.hasNameForId(id, name)) {\n styleSheet.inject(id, stringifyRules(rules, name, '@keyframes'), name);\n }\n\n return name;\n };\n});\n\n// \n\nvar _injectGlobal = (function (stringifyRules, css) {\n var injectGlobal = function injectGlobal() {\n var styleSheet = StyleSheet.master;\n var rules = css.apply(undefined, arguments);\n var hash = murmurhash(JSON.stringify(rules));\n var id = 'sc-global-' + hash;\n\n if (!styleSheet.hasId(id)) {\n styleSheet.inject(id, stringifyRules(rules));\n }\n };\n\n return injectGlobal;\n});\n\n// \n\nvar _constructWithOptions = (function (css) {\n var constructWithOptions = function constructWithOptions(componentConstructor, tag) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;\n\n if (!isValidElementType(tag)) {\n throw new StyledComponentsError(1, String(tag));\n }\n\n /* This is callable directly as a template function */\n // $FlowFixMe: Not typed to avoid destructuring arguments\n var templateFunction = function templateFunction() {\n return componentConstructor(tag, options, css.apply(undefined, arguments));\n };\n\n /* If config methods are called, wrap up a new template function and merge options */\n templateFunction.withConfig = function (config) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, config));\n };\n templateFunction.attrs = function (attrs) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, {\n attrs: _extends({}, options.attrs || EMPTY_OBJECT, attrs)\n }));\n };\n\n return templateFunction;\n };\n\n return constructWithOptions;\n});\n\n// \n\nvar withTheme = (function (Component$$1) {\n var isStatelessFunctionalComponent = typeof Component$$1 === 'function' &&\n // $FlowFixMe TODO: flow for prototype\n !(Component$$1.prototype && 'isReactComponent' in Component$$1.prototype);\n\n // NOTE: We can't pass a ref to a stateless functional component\n var shouldSetInnerRef = isStyledComponent(Component$$1) || isStatelessFunctionalComponent;\n\n var WithTheme = function (_React$Component) {\n inherits(WithTheme, _React$Component);\n\n function WithTheme() {\n var _temp, _this, _ret;\n\n classCallCheck(this, WithTheme);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = EMPTY_OBJECT, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping\n\n\n WithTheme.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var defaultProps = this.constructor.defaultProps;\n\n var styledContext = this.context[CHANNEL_NEXT];\n var themeProp = determineTheme(this.props, undefined, defaultProps);\n if (styledContext === undefined && themeProp === undefined && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps');\n } else if (styledContext === undefined && themeProp !== undefined) {\n this.setState({ theme: themeProp });\n } else {\n var subscribe = styledContext.subscribe;\n\n this.unsubscribeId = subscribe(function (nextTheme) {\n var theme = determineTheme(_this2.props, nextTheme, defaultProps);\n _this2.setState({ theme: theme });\n });\n }\n };\n\n WithTheme.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var defaultProps = this.constructor.defaultProps;\n\n this.setState(function (oldState) {\n var theme = determineTheme(nextProps, oldState.theme, defaultProps);\n\n return { theme: theme };\n });\n };\n\n WithTheme.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);\n }\n };\n\n WithTheme.prototype.render = function render() {\n var props = _extends({\n theme: this.state.theme\n }, this.props);\n\n if (!shouldSetInnerRef) {\n props.ref = props.innerRef;\n delete props.innerRef;\n }\n\n return React.createElement(Component$$1, props);\n };\n\n return WithTheme;\n }(React.Component);\n\n WithTheme.contextTypes = contextShape;\n WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';\n WithTheme.styledComponentId = 'withTheme';\n\n\n return hoistStatics(WithTheme, Component$$1);\n});\n\n// \n\n/* eslint-disable */\nvar __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {\n StyleSheet: StyleSheet\n};\n\n// \n\n/* Warning if you've imported this file on React Native */\nif (process.env.NODE_ENV !== 'production' && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n // eslint-disable-next-line no-console\n console.warn(\"It looks like you've imported 'styled-components' on React Native.\\n\" + \"Perhaps you're looking to import 'styled-components/native'?\\n\" + 'Read more about this at https://www.styled-components.com/docs/basics#react-native');\n}\n\n/* Warning if there are several instances of styled-components */\nif (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {\n window['__styled-components-init__'] = window['__styled-components-init__'] || 0;\n\n if (window['__styled-components-init__'] === 1) {\n // eslint-disable-next-line no-console\n console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. \" + 'This may cause dynamic styles not rendering properly, errors happening during rehydration process ' + 'and makes your application bigger without a good reason.\\n\\n' + 'See https://s-c.sh/2BAXzed for more info.');\n }\n\n window['__styled-components-init__'] += 1;\n}\n\n/* Instantiate singletons */\nvar ComponentStyle = _ComponentStyle(generateAlphabeticName, flatten, stringifyRules);\nvar constructWithOptions = _constructWithOptions(css);\nvar StyledComponent = _StyledComponent(ComponentStyle, constructWithOptions);\n\n/* Instantiate exported singletons */\nvar keyframes = _keyframes(generateAlphabeticName, stringifyRules, css);\nvar injectGlobal = _injectGlobal(stringifyRules, css);\nvar styled = _styled(StyledComponent, constructWithOptions);\n\nexport default styled;\nexport { css, keyframes, injectGlobal, isStyledComponent, consolidateStreamedStyles, ThemeProvider, withTheme, ServerStyleSheet, StyleSheetManager, __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS };\n//# sourceMappingURL=styled-components.browser.esm.js.map\n","'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","(function (factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? (module['exports'] = factory()) :\n\t\ttypeof define === 'function' && define['amd'] ? define(factory()) :\n\t\t\t(window['stylisRuleSheet'] = factory())\n}(function () {\n\n\t'use strict'\n\n\treturn function (insertRule) {\n\t\tvar delimiter = '/*|*/'\n\t\tvar needle = delimiter+'}'\n\n\t\tfunction toSheet (block) {\n\t\t\tif (block)\n\t\t\t\ttry {\n\t\t\t\t\tinsertRule(block + '}')\n\t\t\t\t} catch (e) {}\n\t\t}\n\n\t\treturn function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {\n\t\t\tswitch (context) {\n\t\t\t\t// property\n\t\t\t\tcase 1:\n\t\t\t\t\t// @import\n\t\t\t\t\tif (depth === 0 && content.charCodeAt(0) === 64)\n\t\t\t\t\t\treturn insertRule(content+';'), ''\n\t\t\t\t\tbreak\n\t\t\t\t// selector\n\t\t\t\tcase 2:\n\t\t\t\t\tif (ns === 0)\n\t\t\t\t\t\treturn content + delimiter\n\t\t\t\t\tbreak\n\t\t\t\t// at-rule\n\t\t\t\tcase 3:\n\t\t\t\t\tswitch (ns) {\n\t\t\t\t\t\t// @font-face, @page\n\t\t\t\t\t\tcase 102:\n\t\t\t\t\t\tcase 112:\n\t\t\t\t\t\t\treturn insertRule(selectors[0]+content), ''\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn content + (at === 0 ? delimiter : '')\n\t\t\t\t\t}\n\t\t\t\tcase -2:\n\t\t\t\t\tcontent.split(needle).forEach(toSheet)\n\t\t\t}\n\t\t}\n\t}\n}))\n","/*\n * __ ___\n * _____/ /___ __/ (_)____\n * / ___/ __/ / / / / / ___/\n * (__ ) /_/ /_/ / / (__ )\n * /____/\\__/\\__, /_/_/____/\n * /____/\n *\n * light - weight css preprocessor @licence MIT\n */\n(function (factory) {/* eslint-disable */\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? (module['exports'] = factory(null)) :\n\t\ttypeof define === 'function' && define['amd'] ? define(factory(null)) :\n\t\t\t(window['stylis'] = factory(null))\n}(/** @param {*=} options */function factory (options) {/* eslint-disable */\n\n\t'use strict'\n\n\t/**\n\t * Notes\n\t *\n\t * The [''] pattern is used to support closure compiler\n\t * the jsdoc signatures are also used to the same effect\n\t *\n\t * ----\n\t *\n\t * int + int + int === n4 [faster]\n\t *\n\t * vs\n\t *\n\t * int === n1 && int === n2 && int === n3\n\t *\n\t * ----\n\t *\n\t * switch (int) { case ints...} [faster]\n\t *\n\t * vs\n\t *\n\t * if (int == 1 && int === 2 ...)\n\t *\n\t * ----\n\t *\n\t * The (first*n1 + second*n2 + third*n3) format used in the property parser\n\t * is a simple way to hash the sequence of characters\n\t * taking into account the index they occur in\n\t * since any number of 3 character sequences could produce duplicates.\n\t *\n\t * On the other hand sequences that are directly tied to the index of the character\n\t * resolve a far more accurate measure, it's also faster\n\t * to evaluate one condition in a switch statement\n\t * than three in an if statement regardless of the added math.\n\t *\n\t * This allows the vendor prefixer to be both small and fast.\n\t */\n\n\tvar nullptn = /^\\0+/g /* matches leading null characters */\n\tvar formatptn = /[\\0\\r\\f]/g /* matches new line, null and formfeed characters */\n\tvar colonptn = /: */g /* splits animation rules */\n\tvar cursorptn = /zoo|gra/ /* assert cursor varient */\n\tvar transformptn = /([,: ])(transform)/g /* vendor prefix transform, older webkit */\n\tvar animationptn = /,+\\s*(?![^(]*[)])/g /* splits multiple shorthand notation animations */\n\tvar propertiesptn = / +\\s*(?![^(]*[)])/g /* animation properties */\n\tvar elementptn = / *[\\0] */g /* selector elements */\n\tvar selectorptn = /,\\r+?/g /* splits selectors */\n\tvar andptn = /([\\t\\r\\n ])*\\f?&/g /* match & */\n\tvar escapeptn = /:global\\(((?:[^\\(\\)\\[\\]]*|\\[.*\\]|\\([^\\(\\)]*\\))*)\\)/g /* matches :global(.*) */\n\tvar invalidptn = /\\W+/g /* removes invalid characters from keyframes */\n\tvar keyframeptn = /@(k\\w+)\\s*(\\S*)\\s*/ /* matches @keyframes $1 */\n\tvar plcholdrptn = /::(place)/g /* match ::placeholder varient */\n\tvar readonlyptn = /:(read-only)/g /* match :read-only varient */\n\tvar beforeptn = /\\s+(?=[{\\];=:>])/g /* matches \\s before ] ; = : */\n\tvar afterptn = /([[}=:>])\\s+/g /* matches \\s after characters [ } = : */\n\tvar tailptn = /(\\{[^{]+?);(?=\\})/g /* matches tail semi-colons ;} */\n\tvar whiteptn = /\\s{2,}/g /* matches repeating whitespace */\n\tvar pseudoptn = /([^\\(])(:+) */g /* pseudo element */\n\tvar writingptn = /[svh]\\w+-[tblr]{2}/ /* match writing mode property values */\n\tvar gradientptn = /([\\w-]+t\\()/g /* match *gradient property */\n\tvar supportsptn = /\\(\\s*(.*)\\s*\\)/g /* match supports (groups) */\n\tvar propertyptn = /([\\s\\S]*?);/g /* match properties leading semicolon */\n\tvar selfptn = /-self|flex-/g /* match flex- and -self in align-self: flex-*; */\n\tvar pseudofmt = /[^]*?(:[rp][el]a[\\w-]+)[^]*/ /* extrats :readonly or :placholder from selector */\n\tvar trimptn = /[ \\t]+$/ /* match tail whitspace */\n\tvar dimensionptn = /stretch|:\\s*\\w+\\-(?:conte|avail)/ /* match max/min/fit-content, fill-available */\n\tvar imgsrcptn = /([^-])(image-set\\()/\n\n\t/* vendors */\n\tvar webkit = '-webkit-'\n\tvar moz = '-moz-'\n\tvar ms = '-ms-'\n\n\t/* character codes */\n\tvar SEMICOLON = 59 /* ; */\n\tvar CLOSEBRACES = 125 /* } */\n\tvar OPENBRACES = 123 /* { */\n\tvar OPENPARENTHESES = 40 /* ( */\n\tvar CLOSEPARENTHESES = 41 /* ) */\n\tvar OPENBRACKET = 91 /* [ */\n\tvar CLOSEBRACKET = 93 /* ] */\n\tvar NEWLINE = 10 /* \\n */\n\tvar CARRIAGE = 13 /* \\r */\n\tvar TAB = 9 /* \\t */\n\tvar AT = 64 /* @ */\n\tvar SPACE = 32 /* */\n\tvar AND = 38 /* & */\n\tvar DASH = 45 /* - */\n\tvar UNDERSCORE = 95 /* _ */\n\tvar STAR = 42 /* * */\n\tvar COMMA = 44 /* , */\n\tvar COLON = 58 /* : */\n\tvar SINGLEQUOTE = 39 /* ' */\n\tvar DOUBLEQUOTE = 34 /* \" */\n\tvar FOWARDSLASH = 47 /* / */\n\tvar GREATERTHAN = 62 /* > */\n\tvar PLUS = 43 /* + */\n\tvar TILDE = 126 /* ~ */\n\tvar NULL = 0 /* \\0 */\n\tvar FORMFEED = 12 /* \\f */\n\tvar VERTICALTAB = 11 /* \\v */\n\n\t/* special identifiers */\n\tvar KEYFRAME = 107 /* k */\n\tvar MEDIA = 109 /* m */\n\tvar SUPPORTS = 115 /* s */\n\tvar PLACEHOLDER = 112 /* p */\n\tvar READONLY = 111 /* o */\n\tvar IMPORT = 105 /* i */\n\tvar CHARSET = 99 /* c */\n\tvar DOCUMENT = 100 /* d */\n\tvar PAGE = 112 /* p */\n\n\tvar column = 1 /* current column */\n\tvar line = 1 /* current line numebr */\n\tvar pattern = 0 /* :pattern */\n\n\tvar cascade = 1 /* #id h1 h2 vs h1#id h2#id */\n\tvar prefix = 1 /* vendor prefix */\n\tvar escape = 1 /* escape :global() pattern */\n\tvar compress = 0 /* compress output */\n\tvar semicolon = 0 /* no/semicolon option */\n\tvar preserve = 0 /* preserve empty selectors */\n\n\t/* empty reference */\n\tvar array = []\n\n\t/* plugins */\n\tvar plugins = []\n\tvar plugged = 0\n\tvar should = null\n\n\t/* plugin context */\n\tvar POSTS = -2\n\tvar PREPS = -1\n\tvar UNKWN = 0\n\tvar PROPS = 1\n\tvar BLCKS = 2\n\tvar ATRUL = 3\n\n\t/* plugin newline context */\n\tvar unkwn = 0\n\n\t/* keyframe animation */\n\tvar keyed = 1\n\tvar key = ''\n\n\t/* selector namespace */\n\tvar nscopealt = ''\n\tvar nscope = ''\n\n\t/**\n\t * Compile\n\t *\n\t * @param {Array} parent\n\t * @param {Array} current\n\t * @param {string} body\n\t * @param {number} id\n\t * @param {number} depth\n\t * @return {string}\n\t */\n\tfunction compile (parent, current, body, id, depth) {\n\t\tvar bracket = 0 /* brackets [] */\n\t\tvar comment = 0 /* comments /* // or /* */\n\t\tvar parentheses = 0 /* functions () */\n\t\tvar quote = 0 /* quotes '', \"\" */\n\n\t\tvar first = 0 /* first character code */\n\t\tvar second = 0 /* second character code */\n\t\tvar code = 0 /* current character code */\n\t\tvar tail = 0 /* previous character code */\n\t\tvar trail = 0 /* character before previous code */\n\t\tvar peak = 0 /* previous non-whitespace code */\n\n\t\tvar counter = 0 /* count sequence termination */\n\t\tvar context = 0 /* track current context */\n\t\tvar atrule = 0 /* track @at-rule context */\n\t\tvar pseudo = 0 /* track pseudo token index */\n\t\tvar caret = 0 /* current character index */\n\t\tvar format = 0 /* control character formating context */\n\t\tvar insert = 0 /* auto semicolon insertion */\n\t\tvar invert = 0 /* inverted selector pattern */\n\t\tvar length = 0 /* generic length address */\n\t\tvar eof = body.length /* end of file(length) */\n\t\tvar eol = eof - 1 /* end of file(characters) */\n\n\t\tvar char = '' /* current character */\n\t\tvar chars = '' /* current buffer of characters */\n\t\tvar child = '' /* next buffer of characters */\n\t\tvar out = '' /* compiled body */\n\t\tvar children = '' /* compiled children */\n\t\tvar flat = '' /* compiled leafs */\n\t\tvar selector /* generic selector address */\n\t\tvar result /* generic address */\n\n\t\t// ...build body\n\t\twhile (caret < eof) {\n\t\t\tcode = body.charCodeAt(caret)\n\n\t\t\t// eof varient\n\t\t\tif (caret === eol) {\n\t\t\t\t// last character + noop context, add synthetic padding for noop context to terminate\n\t\t\t\tif (comment + quote + parentheses + bracket !== 0) {\n\t\t\t\t\tif (comment !== 0) {\n\t\t\t\t\t\tcode = comment === FOWARDSLASH ? NEWLINE : FOWARDSLASH\n\t\t\t\t\t}\n\n\t\t\t\t\tquote = parentheses = bracket = 0\n\t\t\t\t\teof++\n\t\t\t\t\teol++\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (comment + quote + parentheses + bracket === 0) {\n\t\t\t\t// eof varient\n\t\t\t\tif (caret === eol) {\n\t\t\t\t\tif (format > 0) {\n\t\t\t\t\t\tchars = chars.replace(formatptn, '')\n\t\t\t\t\t}\n\n\t\t\t\t\tif (chars.trim().length > 0) {\n\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\t\tcase NEWLINE: {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchars += body.charAt(caret)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcode = SEMICOLON\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// auto semicolon insertion\n\t\t\t\tif (insert === 1) {\n\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t// false flags\n\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\tcase DOUBLEQUOTE:\n\t\t\t\t\t\tcase SINGLEQUOTE:\n\t\t\t\t\t\tcase OPENPARENTHESES:\n\t\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// valid\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\t\tlength = caret\n\t\t\t\t\t\t\tfirst = code\n\t\t\t\t\t\t\tcaret--\n\t\t\t\t\t\t\tcode = SEMICOLON\n\n\t\t\t\t\t\t\twhile (length < eof) {\n\t\t\t\t\t\t\t\tswitch (body.charCodeAt(length++)) {\n\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\t\t\t\tcase SEMICOLON: {\n\t\t\t\t\t\t\t\t\t\t++caret\n\t\t\t\t\t\t\t\t\t\tcode = first\n\t\t\t\t\t\t\t\t\t\tlength = eof\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcase COLON: {\n\t\t\t\t\t\t\t\t\t\tif (format > 0) {\n\t\t\t\t\t\t\t\t\t\t\t++caret\n\t\t\t\t\t\t\t\t\t\t\tcode = first\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\t\t\t\t\tlength = eof\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// token varient\n\t\t\t\tswitch (code) {\n\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\tchars = chars.trim()\n\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\t\t\t\t\t\tcounter = 1\n\t\t\t\t\t\tlength = ++caret\n\n\t\t\t\t\t\twhile (caret < eof) {\n\t\t\t\t\t\t\tswitch (code = body.charCodeAt(caret)) {\n\t\t\t\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\t\t\t\tcounter++\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\t\t\t\t\tcounter--\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase FOWARDSLASH: {\n\t\t\t\t\t\t\t\t\tswitch (second = body.charCodeAt(caret + 1)) {\n\t\t\t\t\t\t\t\t\t\t// /*, //\n\t\t\t\t\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\t\t\t\t\tcase FOWARDSLASH: {\n\t\t\t\t\t\t\t\t\t\t\tcaret = delimited(second, caret, eol, body)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// given \"[\" === 91 & \"]\" === 93 hence forth 91 + 1 + 1 === 93\n\t\t\t\t\t\t\t\tcase OPENBRACKET: {\n\t\t\t\t\t\t\t\t\tcode++\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// given \"(\" === 40 & \")\" === 41 hence forth 40 + 1 === 41\n\t\t\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\t\t\tcode++\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// quote tail delimiter is identical to the head delimiter hence noop,\n\t\t\t\t\t\t\t\t// fallthrough clauses have been shifted to the correct tail delimiter\n\t\t\t\t\t\t\t\tcase DOUBLEQUOTE:\n\t\t\t\t\t\t\t\tcase SINGLEQUOTE: {\n\t\t\t\t\t\t\t\t\twhile (caret++ < eol) {\n\t\t\t\t\t\t\t\t\t\tif (body.charCodeAt(caret) === code) {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (counter === 0) {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcaret++\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tchild = body.substring(length, caret)\n\n\t\t\t\t\t\tif (first === NULL) {\n\t\t\t\t\t\t\tfirst = (chars = chars.replace(nullptn, '').trim()).charCodeAt(0)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (first) {\n\t\t\t\t\t\t\t// @at-rule\n\t\t\t\t\t\t\tcase AT: {\n\t\t\t\t\t\t\t\tif (format > 0) {\n\t\t\t\t\t\t\t\t\tchars = chars.replace(formatptn, '')\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsecond = chars.charCodeAt(1)\n\n\t\t\t\t\t\t\t\tswitch (second) {\n\t\t\t\t\t\t\t\t\tcase DOCUMENT:\n\t\t\t\t\t\t\t\t\tcase MEDIA:\n\t\t\t\t\t\t\t\t\tcase SUPPORTS:\n\t\t\t\t\t\t\t\t\tcase DASH: {\n\t\t\t\t\t\t\t\t\t\tselector = current\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\tselector = array\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tchild = compile(current, selector, child, second, depth+1)\n\t\t\t\t\t\t\t\tlength = child.length\n\n\t\t\t\t\t\t\t\t// preserve empty @at-rule\n\t\t\t\t\t\t\t\tif (preserve > 0 && length === 0) {\n\t\t\t\t\t\t\t\t\tlength = chars.length\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// execute plugins, @at-rule context\n\t\t\t\t\t\t\t\tif (plugged > 0) {\n\t\t\t\t\t\t\t\t\tselector = select(array, chars, invert)\n\t\t\t\t\t\t\t\t\tresult = proxy(ATRUL, child, selector, current, line, column, length, second, depth, id)\n\t\t\t\t\t\t\t\t\tchars = selector.join('')\n\n\t\t\t\t\t\t\t\t\tif (result !== void 0) {\n\t\t\t\t\t\t\t\t\t\tif ((length = (child = result.trim()).length) === 0) {\n\t\t\t\t\t\t\t\t\t\t\tsecond = 0\n\t\t\t\t\t\t\t\t\t\t\tchild = ''\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (length > 0) {\n\t\t\t\t\t\t\t\t\tswitch (second) {\n\t\t\t\t\t\t\t\t\t\tcase SUPPORTS: {\n\t\t\t\t\t\t\t\t\t\t\tchars = chars.replace(supportsptn, supports)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcase DOCUMENT:\n\t\t\t\t\t\t\t\t\t\tcase MEDIA:\n\t\t\t\t\t\t\t\t\t\tcase DASH: {\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + '{' + child + '}'\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcase KEYFRAME: {\n\t\t\t\t\t\t\t\t\t\t\tchars = chars.replace(keyframeptn, '$1 $2' + (keyed > 0 ? key : ''))\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + '{' + child + '}'\n\n\t\t\t\t\t\t\t\t\t\t\tif (prefix === 1 || (prefix === 2 && vendor('@'+child, 3))) {\n\t\t\t\t\t\t\t\t\t\t\t\tchild = '@' + webkit + child + '@' + child\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tchild = '@' + child\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + child\n\n\t\t\t\t\t\t\t\t\t\t\tif (id === PAGE) {\n\t\t\t\t\t\t\t\t\t\t\t\tchild = (out += child, '')\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tchild = ''\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// selector\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchild = compile(current, select(current, chars, invert), child, id, depth+1)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tchildren += child\n\n\t\t\t\t\t\t// reset\n\t\t\t\t\t\tcontext = 0\n\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\tpseudo = 0\n\t\t\t\t\t\tformat = 0\n\t\t\t\t\t\tinvert = 0\n\t\t\t\t\t\tatrule = 0\n\t\t\t\t\t\tchars = ''\n\t\t\t\t\t\tchild = ''\n\t\t\t\t\t\tcode = body.charCodeAt(++caret)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\tcase SEMICOLON: {\n\t\t\t\t\t\tchars = (format > 0 ? chars.replace(formatptn, '') : chars).trim()\n\n\t\t\t\t\t\tif ((length = chars.length) > 1) {\n\t\t\t\t\t\t\t// monkey-patch missing colon\n\t\t\t\t\t\t\tif (pseudo === 0) {\n\t\t\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\n\t\t\t\t\t\t\t\t// first character is a letter or dash, buffer has a space character\n\t\t\t\t\t\t\t\tif ((first === DASH || first > 96 && first < 123)) {\n\t\t\t\t\t\t\t\t\tlength = (chars = chars.replace(' ', ':')).length\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// execute plugins, property context\n\t\t\t\t\t\t\tif (plugged > 0) {\n\t\t\t\t\t\t\t\tif ((result = proxy(PROPS, chars, current, parent, line, column, out.length, id, depth, id)) !== void 0) {\n\t\t\t\t\t\t\t\t\tif ((length = (chars = result.trim()).length) === 0) {\n\t\t\t\t\t\t\t\t\t\tchars = '\\0\\0'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\t\t\t\t\t\t\tsecond = chars.charCodeAt(1)\n\n\t\t\t\t\t\t\tswitch (first) {\n\t\t\t\t\t\t\t\tcase NULL: {\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase AT: {\n\t\t\t\t\t\t\t\t\tif (second === IMPORT || second === CHARSET) {\n\t\t\t\t\t\t\t\t\t\tflat += chars + body.charAt(caret)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\tif (chars.charCodeAt(length-1) === COLON) {\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tout += property(chars, first, second, chars.charCodeAt(2))\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// reset\n\t\t\t\t\t\tcontext = 0\n\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\tpseudo = 0\n\t\t\t\t\t\tformat = 0\n\t\t\t\t\t\tinvert = 0\n\t\t\t\t\t\tchars = ''\n\t\t\t\t\t\tcode = body.charCodeAt(++caret)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// parse characters\n\t\t\tswitch (code) {\n\t\t\t\tcase CARRIAGE:\n\t\t\t\tcase NEWLINE: {\n\t\t\t\t\t// auto insert semicolon\n\t\t\t\t\tif (comment + quote + parentheses + bracket + semicolon === 0) {\n\t\t\t\t\t\t// valid non-whitespace characters that\n\t\t\t\t\t\t// may precede a newline\n\t\t\t\t\t\tswitch (peak) {\n\t\t\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\t\t\tcase SINGLEQUOTE:\n\t\t\t\t\t\t\tcase DOUBLEQUOTE:\n\t\t\t\t\t\t\tcase AT:\n\t\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\t\tcase FOWARDSLASH:\n\t\t\t\t\t\t\tcase DASH:\n\t\t\t\t\t\t\tcase COLON:\n\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t// current buffer has a colon\n\t\t\t\t\t\t\t\tif (pseudo > 0) {\n\t\t\t\t\t\t\t\t\tinsert = 1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// terminate line comment\n\t\t\t\t\tif (comment === FOWARDSLASH) {\n\t\t\t\t\t\tcomment = 0\n\t\t\t\t\t} else if (cascade + context === 0 && id !== KEYFRAME && chars.length > 0) {\n\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\tchars += '\\0'\n\t\t\t\t\t}\n\n\t\t\t\t\t// execute plugins, newline context\n\t\t\t\t\tif (plugged * unkwn > 0) {\n\t\t\t\t\t\tproxy(UNKWN, chars, current, parent, line, column, out.length, id, depth, id)\n\t\t\t\t\t}\n\n\t\t\t\t\t// next line, reset column position\n\t\t\t\t\tcolumn = 1\n\t\t\t\t\tline++\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcase SEMICOLON:\n\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\tif (comment + quote + parentheses + bracket === 0) {\n\t\t\t\t\t\tcolumn++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\t// increment column position\n\t\t\t\t\tcolumn++\n\n\t\t\t\t\t// current character\n\t\t\t\t\tchar = body.charAt(caret)\n\n\t\t\t\t\t// remove comments, escape functions, strings, attributes and prepare selectors\n\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\tif (quote + bracket + comment === 0) {\n\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\t\tcase COLON:\n\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\t\t\t\tchar = ''\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\tif (code !== SPACE) {\n\t\t\t\t\t\t\t\t\t\t\tchar = ' '\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// escape breaking control characters\n\t\t\t\t\t\tcase NULL: {\n\t\t\t\t\t\t\tchar = '\\\\0'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase FORMFEED: {\n\t\t\t\t\t\t\tchar = '\\\\f'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase VERTICALTAB: {\n\t\t\t\t\t\t\tchar = '\\\\v'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// &\n\t\t\t\t\t\tcase AND: {\n\t\t\t\t\t\t\t// inverted selector pattern i.e html &\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0 && cascade > 0) {\n\t\t\t\t\t\t\t\tinvert = 1\n\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\tchar = '\\f' + char\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ::paceholder, l\n\t\t\t\t\t\t// :read-ony, l\n\t\t\t\t\t\tcase 108: {\n\t\t\t\t\t\t\tif (quote + comment + bracket + pattern === 0 && pseudo > 0) {\n\t\t\t\t\t\t\t\tswitch (caret - pseudo) {\n\t\t\t\t\t\t\t\t\t// ::placeholder\n\t\t\t\t\t\t\t\t\tcase 2: {\n\t\t\t\t\t\t\t\t\t\tif (tail === PLACEHOLDER && body.charCodeAt(caret-3) === COLON) {\n\t\t\t\t\t\t\t\t\t\t\tpattern = tail\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// :read-only\n\t\t\t\t\t\t\t\t\tcase 8: {\n\t\t\t\t\t\t\t\t\t\tif (trail === READONLY) {\n\t\t\t\t\t\t\t\t\t\t\tpattern = trail\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase COLON: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tpseudo = caret\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// selectors\n\t\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\t\tif (comment + parentheses + quote + bracket === 0) {\n\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\tchar += '\\r'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// quotes\n\t\t\t\t\t\tcase DOUBLEQUOTE:\n\t\t\t\t\t\tcase SINGLEQUOTE: {\n\t\t\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t\t\tquote = quote === code ? 0 : (quote === 0 ? code : quote)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// attributes\n\t\t\t\t\t\tcase OPENBRACKET: {\n\t\t\t\t\t\t\tif (quote + comment + parentheses === 0) {\n\t\t\t\t\t\t\t\tbracket++\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase CLOSEBRACKET: {\n\t\t\t\t\t\t\tif (quote + comment + parentheses === 0) {\n\t\t\t\t\t\t\t\tbracket--\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// functions\n\t\t\t\t\t\tcase CLOSEPARENTHESES: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tparentheses--\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\tswitch (tail*2 + trail*3) {\n\t\t\t\t\t\t\t\t\t\t// :matches\n\t\t\t\t\t\t\t\t\t\tcase 533: {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// :global, :not, :nth-child etc...\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tcounter = 0\n\t\t\t\t\t\t\t\t\t\t\tcontext = 1\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tparentheses++\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase AT: {\n\t\t\t\t\t\t\tif (comment + parentheses + quote + bracket + pseudo + atrule === 0) {\n\t\t\t\t\t\t\t\tatrule = 1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// block/line comments\n\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\tcase FOWARDSLASH: {\n\t\t\t\t\t\t\tif (quote + bracket + parentheses > 0) {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch (comment) {\n\t\t\t\t\t\t\t\t// initialize line/block comment context\n\t\t\t\t\t\t\t\tcase 0: {\n\t\t\t\t\t\t\t\t\tswitch (code*2 + body.charCodeAt(caret+1)*3) {\n\t\t\t\t\t\t\t\t\t\t// //\n\t\t\t\t\t\t\t\t\t\tcase 235: {\n\t\t\t\t\t\t\t\t\t\t\tcomment = FOWARDSLASH\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// /*\n\t\t\t\t\t\t\t\t\t\tcase 220: {\n\t\t\t\t\t\t\t\t\t\t\tlength = caret\n\t\t\t\t\t\t\t\t\t\t\tcomment = STAR\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// end block comment context\n\t\t\t\t\t\t\t\tcase STAR: {\n\t\t\t\t\t\t\t\t\tif (code === FOWARDSLASH && tail === STAR && length + 2 !== caret) {\n\t\t\t\t\t\t\t\t\t\t// /* ... */, !\n\t\t\t\t\t\t\t\t\t\tif (body.charCodeAt(length+2) === 33) {\n\t\t\t\t\t\t\t\t\t\t\tout += body.substring(length, caret+1)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tchar = ''\n\t\t\t\t\t\t\t\t\t\tcomment = 0\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// ignore comment blocks\n\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t// aggressive isolation mode, divide each individual selector\n\t\t\t\t\t\t// including selectors in :not function but excluding selectors in :global function\n\t\t\t\t\t\tif (cascade + quote + bracket + atrule === 0 && id !== KEYFRAME && code !== SEMICOLON) {\n\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\t\t// outside of an isolated context i.e nth-child(<...>)\n\t\t\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\t\t\tcase CARRIAGE: {\n\t\t\t\t\t\t\t\t\t\t\t\tchar = char + '\\0'\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\t\tchar = '\\0' + char + (code === COMMA ? '' : '\\0')\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// within an isolated context, sleep untill it's terminated\n\t\t\t\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\t\t\t\t\t\t// :globa(\n\t\t\t\t\t\t\t\t\t\t\t\tif (pseudo + 7 === caret && tail === 108) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpseudo = 0\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tcontext = ++counter\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcase CLOSEPARENTHESES: {\n\t\t\t\t\t\t\t\t\t\t\t\tif ((context = --counter) === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t\t\t\t\tchar += '\\0'\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\t\tcase NULL:\n\t\t\t\t\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\t\t\tcase FORMFEED:\n\t\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\t\tcase CARRIAGE: {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\t// ignore in isolated contexts\n\t\t\t\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t\t\t\tchar += '\\0'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// concat buffer of characters\n\t\t\t\t\t\tchars += char\n\n\t\t\t\t\t\t// previous non-whitespace character code\n\t\t\t\t\t\tif (code !== SPACE && code !== TAB) {\n\t\t\t\t\t\t\tpeak = code\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// tail character codes\n\t\t\ttrail = tail\n\t\t\ttail = code\n\n\t\t\t// visit every character\n\t\t\tcaret++\n\t\t}\n\n\t\tlength = out.length\n\n\t\t// preserve empty selector\n \t\tif (preserve > 0) {\n \t\t\tif (length === 0 && children.length === 0 && (current[0].length === 0) === false) {\n \t\t\t\tif (id !== MEDIA || (current.length === 1 && (cascade > 0 ? nscopealt : nscope) === current[0])) {\n\t\t\t\t\tlength = current.join(',').length + 2\n \t\t\t\t}\n \t\t\t}\n\t\t}\n\n\t\tif (length > 0) {\n\t\t\t// cascade isolation mode?\n\t\t\tselector = cascade === 0 && id !== KEYFRAME ? isolate(current) : current\n\n\t\t\t// execute plugins, block context\n\t\t\tif (plugged > 0) {\n\t\t\t\tresult = proxy(BLCKS, out, selector, parent, line, column, length, id, depth, id)\n\n\t\t\t\tif (result !== void 0 && (out = result).length === 0) {\n\t\t\t\t\treturn flat + out + children\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tout = selector.join(',') + '{' + out + '}'\n\n\t\t\tif (prefix*pattern !== 0) {\n\t\t\t\tif (prefix === 2 && !vendor(out, 2))\n\t\t\t\t\tpattern = 0\n\n\t\t\t\tswitch (pattern) {\n\t\t\t\t\t// ::read-only\n\t\t\t\t\tcase READONLY: {\n\t\t\t\t\t\tout = out.replace(readonlyptn, ':'+moz+'$1')+out\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// ::placeholder\n\t\t\t\t\tcase PLACEHOLDER: {\n\t\t\t\t\t\tout = (\n\t\t\t\t\t\t\tout.replace(plcholdrptn, '::' + webkit + 'input-$1') +\n\t\t\t\t\t\t\tout.replace(plcholdrptn, '::' + moz + '$1') +\n\t\t\t\t\t\t\tout.replace(plcholdrptn, ':' + ms + 'input-$1') + out\n\t\t\t\t\t\t)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tpattern = 0\n\t\t\t}\n\t\t}\n\n\t\treturn flat + out + children\n\t}\n\n\t/**\n\t * Select\n\t *\n\t * @param {Array} parent\n\t * @param {string} current\n\t * @param {number} invert\n\t * @return {Array}\n\t */\n\tfunction select (parent, current, invert) {\n\t\tvar selectors = current.trim().split(selectorptn)\n\t\tvar out = selectors\n\n\t\tvar length = selectors.length\n\t\tvar l = parent.length\n\n\t\tswitch (l) {\n\t\t\t// 0-1 parent selectors\n\t\t\tcase 0:\n\t\t\tcase 1: {\n\t\t\t\tfor (var i = 0, selector = l === 0 ? '' : parent[0] + ' '; i < length; ++i) {\n\t\t\t\t\tout[i] = scope(selector, out[i], invert, l).trim()\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// >2 parent selectors, nested\n\t\t\tdefault: {\n\t\t\t\tfor (var i = 0, j = 0, out = []; i < length; ++i) {\n\t\t\t\t\tfor (var k = 0; k < l; ++k) {\n\t\t\t\t\t\tout[j++] = scope(parent[k] + ' ', selectors[i], invert, l).trim()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn out\n\t}\n\n\t/**\n\t * Scope\n\t *\n\t * @param {string} parent\n\t * @param {string} current\n\t * @param {number} invert\n\t * @param {number} level\n\t * @return {string}\n\t */\n\tfunction scope (parent, current, invert, level) {\n\t\tvar selector = current\n\t\tvar code = selector.charCodeAt(0)\n\n\t\t// trim leading whitespace\n\t\tif (code < 33) {\n\t\t\tcode = (selector = selector.trim()).charCodeAt(0)\n\t\t}\n\n\t\tswitch (code) {\n\t\t\t// &\n\t\t\tcase AND: {\n\t\t\t\tswitch (cascade + level) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1: {\n\t\t\t\t\t\tif (parent.trim().length === 0) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn selector.replace(andptn, '$1'+parent.trim())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// :\n\t\t\tcase COLON: {\n\t\t\t\tswitch (selector.charCodeAt(1)) {\n\t\t\t\t\t// g in :global\n\t\t\t\t\tcase 103: {\n\t\t\t\t\t\tif (escape > 0 && cascade > 0) {\n\t\t\t\t\t\t\treturn selector.replace(escapeptn, '$1').replace(andptn, '$1'+nscope)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\t// :hover\n\t\t\t\t\t\treturn parent.trim() + selector.replace(andptn, '$1'+parent.trim())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\t// html &\n\t\t\t\tif (invert*cascade > 0 && selector.indexOf('\\f') > 0) {\n\t\t\t\t\treturn selector.replace(andptn, (parent.charCodeAt(0) === COLON ? '' : '$1')+parent.trim())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn parent + selector\n\t}\n\n\t/**\n\t * Property\n\t *\n\t * @param {string} input\n\t * @param {number} first\n\t * @param {number} second\n\t * @param {number} third\n\t * @return {string}\n\t */\n\tfunction property (input, first, second, third) {\n\t\tvar index = 0\n\t\tvar out = input + ';'\n\t\tvar hash = (first*2) + (second*3) + (third*4)\n\t\tvar cache\n\n\t\t// animation: a, n, i characters\n\t\tif (hash === 944) {\n\t\t\treturn animation(out)\n\t\t} else if (prefix === 0 || (prefix === 2 && !vendor(out, 1))) {\n\t\t\treturn out\n\t\t}\n\n\t\t// vendor prefix\n\t\tswitch (hash) {\n\t\t\t// text-decoration/text-size-adjust/text-shadow/text-align/text-transform: t, e, x\n\t\t\tcase 1015: {\n\t\t\t\t// text-shadow/text-align/text-transform, a\n\t\t\t\treturn out.charCodeAt(10) === 97 ? webkit + out + out : out\n\t\t\t}\n\t\t\t// filter/fill f, i, l\n\t\t\tcase 951: {\n\t\t\t\t// filter, t\n\t\t\t\treturn out.charCodeAt(3) === 116 ? webkit + out + out : out\n\t\t\t}\n\t\t\t// color/column, c, o, l\n\t\t\tcase 963: {\n\t\t\t\t// column, n\n\t\t\t\treturn out.charCodeAt(5) === 110 ? webkit + out + out : out\n\t\t\t}\n\t\t\t// box-decoration-break, b, o, x\n\t\t\tcase 1009: {\n\t\t\t\tif (out.charCodeAt(4) !== 100) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\t// mask, m, a, s\n\t\t\t// clip-path, c, l, i\n\t\t\tcase 969:\n\t\t\tcase 942: {\n\t\t\t\treturn webkit + out + out\n\t\t\t}\n\t\t\t// appearance: a, p, p\n\t\t\tcase 978: {\n\t\t\t\treturn webkit + out + moz + out + out\n\t\t\t}\n\t\t\t// hyphens: h, y, p\n\t\t\t// user-select: u, s, e\n\t\t\tcase 1019:\n\t\t\tcase 983: {\n\t\t\t\treturn webkit + out + moz + out + ms + out + out\n\t\t\t}\n\t\t\t// background/backface-visibility, b, a, c\n\t\t\tcase 883: {\n\t\t\t\t// backface-visibility, -\n\t\t\t\tif (out.charCodeAt(8) === DASH) {\n\t\t\t\t\treturn webkit + out + out\n\t\t\t\t}\n\n\t\t\t\t// image-set(...)\n\t\t\t\tif (out.indexOf('image-set(', 11) > 0) {\n\t\t\t\t\treturn out.replace(imgsrcptn, '$1'+webkit+'$2') + out\n\t\t\t\t}\n\n\t\t\t\treturn out\n\t\t\t}\n\t\t\t// flex: f, l, e\n\t\t\tcase 932: {\n\t\t\t\tif (out.charCodeAt(4) === DASH) {\n\t\t\t\t\tswitch (out.charCodeAt(5)) {\n\t\t\t\t\t\t// flex-grow, g\n\t\t\t\t\t\tcase 103: {\n\t\t\t\t\t\t\treturn webkit + 'box-' + out.replace('-grow', '') + webkit + out + ms + out.replace('grow', 'positive') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// flex-shrink, s\n\t\t\t\t\t\tcase 115: {\n\t\t\t\t\t\t\treturn webkit + out + ms + out.replace('shrink', 'negative') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// flex-basis, b\n\t\t\t\t\t\tcase 98: {\n\t\t\t\t\t\t\treturn webkit + out + ms + out.replace('basis', 'preferred-size') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn webkit + out + ms + out + out\n\t\t\t}\n\t\t\t// order: o, r, d\n\t\t\tcase 964: {\n\t\t\t\treturn webkit + out + ms + 'flex' + '-' + out + out\n\t\t\t}\n\t\t\t// justify-items/justify-content, j, u, s\n\t\t\tcase 1023: {\n\t\t\t\t// justify-content, c\n\t\t\t\tif (out.charCodeAt(8) !== 99) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\n\t\t\t\tcache = out.substring(out.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify')\n\t\t\t\treturn webkit + 'box-pack' + cache + webkit + out + ms + 'flex-pack' + cache + out\n\t\t\t}\n\t\t\t// cursor, c, u, r\n\t\t\tcase 1005: {\n\t\t\t\treturn cursorptn.test(out) ? out.replace(colonptn, ':' + webkit) + out.replace(colonptn, ':' + moz) + out : out\n\t\t\t}\n\t\t\t// writing-mode, w, r, i\n\t\t\tcase 1000: {\n\t\t\t\tcache = out.substring(13).trim()\n\t\t\t\tindex = cache.indexOf('-') + 1\n\n\t\t\t\tswitch (cache.charCodeAt(0)+cache.charCodeAt(index)) {\n\t\t\t\t\t// vertical-lr\n\t\t\t\t\tcase 226: {\n\t\t\t\t\t\tcache = out.replace(writingptn, 'tb')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// vertical-rl\n\t\t\t\t\tcase 232: {\n\t\t\t\t\t\tcache = out.replace(writingptn, 'tb-rl')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// horizontal-tb\n\t\t\t\t\tcase 220: {\n\t\t\t\t\t\tcache = out.replace(writingptn, 'lr')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn out\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn webkit + out + ms + cache + out\n\t\t\t}\n\t\t\t// position: sticky\n\t\t\tcase 1017: {\n\t\t\t\tif (out.indexOf('sticky', 9) === -1) {\n\t\t\t\t\treturn out\n\t\t\t\t}\n\t\t\t}\n\t\t\t// display(flex/inline-flex/inline-box): d, i, s\n\t\t\tcase 975: {\n\t\t\t\tindex = (out = input).length - 10\n\t\t\t\tcache = (out.charCodeAt(index) === 33 ? out.substring(0, index) : out).substring(input.indexOf(':', 7) + 1).trim()\n\n\t\t\t\tswitch (hash = cache.charCodeAt(0) + (cache.charCodeAt(7)|0)) {\n\t\t\t\t\t// inline-\n\t\t\t\t\tcase 203: {\n\t\t\t\t\t\t// inline-box\n\t\t\t\t\t\tif (cache.charCodeAt(8) < 111) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// inline-box/sticky\n\t\t\t\t\tcase 115: {\n\t\t\t\t\t\tout = out.replace(cache, webkit+cache)+';'+out\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// inline-flex\n\t\t\t\t\t// flex\n\t\t\t\t\tcase 207:\n\t\t\t\t\tcase 102: {\n\t\t\t\t\t\tout = (\n\t\t\t\t\t\t\tout.replace(cache, webkit+(hash > 102 ? 'inline-' : '')+'box')+';'+\n\t\t\t\t\t\t\tout.replace(cache, webkit+cache)+';'+\n\t\t\t\t\t\t\tout.replace(cache, ms+cache+'box')+';'+\n\t\t\t\t\t\t\tout\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn out + ';'\n\t\t\t}\n\t\t\t// align-items, align-center, align-self: a, l, i, -\n\t\t\tcase 938: {\n\t\t\t\tif (out.charCodeAt(5) === DASH) {\n\t\t\t\t\tswitch (out.charCodeAt(6)) {\n\t\t\t\t\t\t// align-items, i\n\t\t\t\t\t\tcase 105: {\n\t\t\t\t\t\t\tcache = out.replace('-items', '')\n\t\t\t\t\t\t\treturn webkit + out + webkit + 'box-' + cache + ms + 'flex-' + cache + out\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// align-self, s\n\t\t\t\t\t\tcase 115: {\n\t\t\t\t\t\t\treturn webkit + out + ms + 'flex-item-' + out.replace(selfptn, '') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// align-content\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\treturn webkit + out + ms + 'flex-line-pack' + out.replace('align-content', '').replace(selfptn, '') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// min/max\n\t\t\tcase 973:\n\t\t\tcase 989: {\n\t\t\t\t// min-/max- height/width/block-size/inline-size\n\t\t\t\tif (out.charCodeAt(3) !== DASH || out.charCodeAt(4) === 122) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\t// height/width: min-content / width: max-content\n\t\t\tcase 931:\n\t\t\tcase 953: {\n\t\t\t\tif (dimensionptn.test(input) === true) {\n\t\t\t\t\t// stretch\n\t\t\t\t\tif ((cache = input.substring(input.indexOf(':') + 1)).charCodeAt(0) === 115)\n\t\t\t\t\t\treturn property(input.replace('stretch', 'fill-available'), first, second, third).replace(':fill-available', ':stretch')\n\t\t\t\t\telse\n\t\t\t\t\t\treturn out.replace(cache, webkit + cache) + out.replace(cache, moz + cache.replace('fill-', '')) + out\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// transform, transition: t, r, a\n\t\t\tcase 962: {\n\t\t\t\tout = webkit + out + (out.charCodeAt(5) === 102 ? ms + out : '') + out\n\n\t\t\t\t// transitions\n\t\t\t\tif (second + third === 211 && out.charCodeAt(13) === 105 && out.indexOf('transform', 10) > 0) {\n\t\t\t\t\treturn out.substring(0, out.indexOf(';', 27) + 1).replace(transformptn, '$1' + webkit + '$2') + out\n\t\t\t\t}\n\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\treturn out\n\t}\n\n\t/**\n\t * Vendor\n\t *\n\t * @param {string} content\n\t * @param {number} context\n\t * @return {boolean}\n\t */\n\tfunction vendor (content, context) {\n\t\tvar index = content.indexOf(context === 1 ? ':' : '{')\n\t\tvar key = content.substring(0, context !== 3 ? index : 10)\n\t\tvar value = content.substring(index + 1, content.length - 1)\n\n\t\treturn should(context !== 2 ? key : key.replace(pseudofmt, '$1'), value, context)\n\t}\n\n\t/**\n\t * Supports\n\t *\n\t * @param {string} match\n\t * @param {string} group\n\t * @return {string}\n\t */\n\tfunction supports (match, group) {\n\t\tvar out = property(group, group.charCodeAt(0), group.charCodeAt(1), group.charCodeAt(2))\n\n\t\treturn out !== group+';' ? out.replace(propertyptn, ' or ($1)').substring(4) : '('+group+')'\n\t}\n\n\t/**\n\t * Animation\n\t *\n\t * @param {string} input\n\t * @return {string}\n\t */\n\tfunction animation (input) {\n\t\tvar length = input.length\n\t\tvar index = input.indexOf(':', 9) + 1\n\t\tvar declare = input.substring(0, index).trim()\n\t\tvar out = input.substring(index, length-1).trim()\n\n\t\tswitch (input.charCodeAt(9)*keyed) {\n\t\t\tcase 0: {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// animation-*, -\n\t\t\tcase DASH: {\n\t\t\t\t// animation-name, n\n\t\t\t\tif (input.charCodeAt(10) !== 110) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\t// animation/animation-name\n\t\t\tdefault: {\n\t\t\t\t// split in case of multiple animations\n\t\t\t\tvar list = out.split((out = '', animationptn))\n\n\t\t\t\tfor (var i = 0, index = 0, length = list.length; i < length; index = 0, ++i) {\n\t\t\t\t\tvar value = list[i]\n\t\t\t\t\tvar items = value.split(propertiesptn)\n\n\t\t\t\t\twhile (value = items[index]) {\n\t\t\t\t\t\tvar peak = value.charCodeAt(0)\n\n\t\t\t\t\t\tif (keyed === 1 && (\n\t\t\t\t\t\t\t// letters\n\t\t\t\t\t\t\t(peak > AT && peak < 90) || (peak > 96 && peak < 123) || peak === UNDERSCORE ||\n\t\t\t\t\t\t\t// dash but not in sequence i.e --\n\t\t\t\t\t\t\t(peak === DASH && value.charCodeAt(1) !== DASH)\n\t\t\t\t\t\t)) {\n\t\t\t\t\t\t\t// not a number/function\n\t\t\t\t\t\t\tswitch (isNaN(parseFloat(value)) + (value.indexOf('(') !== -1)) {\n\t\t\t\t\t\t\t\tcase 1: {\n\t\t\t\t\t\t\t\t\tswitch (value) {\n\t\t\t\t\t\t\t\t\t\t// not a valid reserved keyword\n\t\t\t\t\t\t\t\t\t\tcase 'infinite': case 'alternate': case 'backwards': case 'running':\n\t\t\t\t\t\t\t\t\t\tcase 'normal': case 'forwards': case 'both': case 'none': case 'linear':\n\t\t\t\t\t\t\t\t\t\tcase 'ease': case 'ease-in': case 'ease-out': case 'ease-in-out':\n\t\t\t\t\t\t\t\t\t\tcase 'paused': case 'reverse': case 'alternate-reverse': case 'inherit':\n\t\t\t\t\t\t\t\t\t\tcase 'initial': case 'unset': case 'step-start': case 'step-end': {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tvalue += key\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titems[index++] = value\n\t\t\t\t\t}\n\n\t\t\t\t\tout += (i === 0 ? '' : ',') + items.join(' ')\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tout = declare + out + ';'\n\n\t\tif (prefix === 1 || (prefix === 2 && vendor(out, 1)))\n\t\t\treturn webkit + out + out\n\n\t\treturn out\n\t}\n\n\t/**\n\t * Isolate\n\t *\n\t * @param {Array} current\n\t */\n\tfunction isolate (current) {\n\t\tfor (var i = 0, length = current.length, selector = Array(length), padding, element; i < length; ++i) {\n\t\t\t// split individual elements in a selector i.e h1 h2 === [h1, h2]\n\t\t\tvar elements = current[i].split(elementptn)\n\t\t\tvar out = ''\n\n\t\t\tfor (var j = 0, size = 0, tail = 0, code = 0, l = elements.length; j < l; ++j) {\n\t\t\t\t// empty element\n\t\t\t\tif ((size = (element = elements[j]).length) === 0 && l > 1) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\ttail = out.charCodeAt(out.length-1)\n\t\t\t\tcode = element.charCodeAt(0)\n\t\t\t\tpadding = ''\n\n\t\t\t\tif (j !== 0) {\n\t\t\t\t\t// determine if we need padding\n\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tpadding = ' '\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tswitch (code) {\n\t\t\t\t\tcase AND: {\n\t\t\t\t\t\telement = padding + nscopealt\n\t\t\t\t\t}\n\t\t\t\t\tcase TILDE:\n\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\tcase PLUS:\n\t\t\t\t\tcase SPACE:\n\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase OPENBRACKET: {\n\t\t\t\t\t\telement = padding + element + nscopealt\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase COLON: {\n\t\t\t\t\t\tswitch (element.charCodeAt(1)*2 + element.charCodeAt(2)*3) {\n\t\t\t\t\t\t\t// :global\n\t\t\t\t\t\t\tcase 530: {\n\t\t\t\t\t\t\t\tif (escape > 0) {\n\t\t\t\t\t\t\t\t\telement = padding + element.substring(8, size - 1)\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// :hover, :nth-child(), ...\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tif (j < 1 || elements[j-1].length < 1) {\n\t\t\t\t\t\t\t\t\telement = padding + nscopealt + element\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\tpadding = ''\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tif (size > 1 && element.indexOf(':') > 0) {\n\t\t\t\t\t\t\telement = padding + element.replace(pseudoptn, '$1' + nscopealt + '$2')\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telement = padding + element + nscopealt\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tout += element\n\t\t\t}\n\n\t\t\tselector[i] = out.replace(formatptn, '').trim()\n\t\t}\n\n\t\treturn selector\n\t}\n\n\t/**\n\t * Proxy\n\t *\n\t * @param {number} context\n\t * @param {string} content\n\t * @param {Array} selectors\n\t * @param {Array} parents\n\t * @param {number} line\n\t * @param {number} column\n\t * @param {number} length\n\t * @param {number} id\n\t * @param {number} depth\n\t * @param {number} at\n\t * @return {(string|void|*)}\n\t */\n\tfunction proxy (context, content, selectors, parents, line, column, length, id, depth, at) {\n\t\tfor (var i = 0, out = content, next; i < plugged; ++i) {\n\t\t\tswitch (next = plugins[i].call(stylis, context, out, selectors, parents, line, column, length, id, depth, at)) {\n\t\t\t\tcase void 0:\n\t\t\t\tcase false:\n\t\t\t\tcase true:\n\t\t\t\tcase null: {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tout = next\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (out !== content) {\n\t\t return out\n\t\t}\n\t}\n\n\t/**\n\t * @param {number} code\n\t * @param {number} index\n\t * @param {number} length\n\t * @param {string} body\n\t * @return {number}\n\t */\n\tfunction delimited (code, index, length, body) {\n\t\tfor (var i = index + 1; i < length; ++i) {\n\t\t\tswitch (body.charCodeAt(i)) {\n\t\t\t\t// /*\n\t\t\t\tcase FOWARDSLASH: {\n\t\t\t\t\tif (code === STAR) {\n\t\t\t\t\t\tif (body.charCodeAt(i - 1) === STAR && index + 2 !== i) {\n\t\t\t\t\t\t\treturn i + 1\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// //\n\t\t\t\tcase NEWLINE: {\n\t\t\t\t\tif (code === FOWARDSLASH) {\n\t\t\t\t\t\treturn i + 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn i\n\t}\n\n\t/**\n\t * @param {number} type\n\t * @param {number} index\n\t * @param {number} length\n\t * @param {number} find\n\t * @param {string} body\n\t * @return {number}\n\t */\n\tfunction match (type, index, length, body) {\n\t\tfor (var i = index + 1; i < length; ++i) {\n\t\t\tswitch (body.charCodeAt(i)) {\n\t\t\t\tcase type: {\n\t\t\t\t\treturn i\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn i\n\t}\n\n\t/**\n\t * Minify\n\t *\n\t * @param {(string|*)} output\n\t * @return {string}\n\t */\n\tfunction minify (output) {\n\t\treturn output\n\t\t\t.replace(formatptn, '')\n\t\t\t.replace(beforeptn, '')\n\t\t\t.replace(afterptn, '$1')\n\t\t\t.replace(tailptn, '$1')\n\t\t\t.replace(whiteptn, ' ')\n\t}\n\n\t/**\n\t * Use\n\t *\n\t * @param {(Array|function(...?)|number|void)?} plugin\n\t */\n\tfunction use (plugin) {\n\t\tswitch (plugin) {\n\t\t\tcase void 0:\n\t\t\tcase null: {\n\t\t\t\tplugged = plugins.length = 0\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tif (typeof plugin === 'function') {\n\t\t\t\t\tplugins[plugged++] = plugin\n\t\t\t\t}\telse if (typeof plugin === 'object') {\n\t\t\t\t\tfor (var i = 0, length = plugin.length; i < length; ++i) {\n\t\t\t\t\t\tuse(plugin[i])\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tunkwn = !!plugin|0\n\t\t\t\t}\n\t\t\t}\n \t\t}\n\n \t\treturn use\n\t}\n\n\t/**\n\t * Set\n\t *\n\t * @param {*} options\n\t */\n\tfunction set (options) {\n\t\tfor (var name in options) {\n\t\t\tvar value = options[name]\n\t\t\tswitch (name) {\n\t\t\t\tcase 'keyframe': keyed = value|0; break\n\t\t\t\tcase 'global': escape = value|0; break\n\t\t\t\tcase 'cascade': cascade = value|0; break\n\t\t\t\tcase 'compress': compress = value|0; break\n\t\t\t\tcase 'semicolon': semicolon = value|0; break\n\t\t\t\tcase 'preserve': preserve = value|0; break\n\t\t\t\tcase 'prefix':\n\t\t\t\t\tshould = null\n\n\t\t\t\t\tif (!value) {\n\t\t\t\t\t\tprefix = 0\n\t\t\t\t\t} else if (typeof value !== 'function') {\n\t\t\t\t\t\tprefix = 1\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprefix = 2\n\t\t\t\t\t\tshould = value\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn set\n\t}\n\n\t/**\n\t * Stylis\n\t *\n\t * @param {string} selector\n\t * @param {string} input\n\t * @return {*}\n\t */\n\tfunction stylis (selector, input) {\n\t\tif (this !== void 0 && this.constructor === stylis) {\n\t\t\treturn factory(selector)\n\t\t}\n\n\t\t// setup\n\t\tvar ns = selector\n\t\tvar code = ns.charCodeAt(0)\n\n\t\t// trim leading whitespace\n\t\tif (code < 33) {\n\t\t\tcode = (ns = ns.trim()).charCodeAt(0)\n\t\t}\n\n\t\t// keyframe/animation namespace\n\t\tif (keyed > 0) {\n\t\t\tkey = ns.replace(invalidptn, code === OPENBRACKET ? '' : '-')\n\t\t}\n\n\t\t// reset, used to assert if a plugin is moneky-patching the return value\n\t\tcode = 1\n\n\t\t// cascade/isolate\n\t\tif (cascade === 1) {\n\t\t\tnscope = ns\n\t\t} else {\n\t\t\tnscopealt = ns\n\t\t}\n\n\t\tvar selectors = [nscope]\n\t\tvar result\n\n\t\t// execute plugins, pre-process context\n\t\tif (plugged > 0) {\n\t\t\tresult = proxy(PREPS, input, selectors, selectors, line, column, 0, 0, 0, 0)\n\n\t\t\tif (result !== void 0 && typeof result === 'string') {\n\t\t\t\tinput = result\n\t\t\t}\n\t\t}\n\n\t\t// build\n\t\tvar output = compile(array, selectors, input, 0, 0)\n\n\t\t// execute plugins, post-process context\n\t\tif (plugged > 0) {\n\t\t\tresult = proxy(POSTS, output, selectors, selectors, line, column, output.length, 0, 0, 0)\n\n\t\t\t// bypass minification\n\t\t\tif (result !== void 0 && typeof(output = result) !== 'string') {\n\t\t\t\tcode = 0\n\t\t\t}\n\t\t}\n\n\t\t// reset\n\t\tkey = ''\n\t\tnscope = ''\n\t\tnscopealt = ''\n\t\tpattern = 0\n\t\tline = 1\n\t\tcolumn = 1\n\n\t\treturn compress*code === 0 ? output : minify(output)\n\t}\n\n\tstylis['use'] = use\n\tstylis['set'] = set\n\n\tif (options !== void 0) {\n\t\tset(options)\n\t}\n\n\treturn stylis\n}));\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\n\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj[\"default\"] = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nmodule.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// 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\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"chunks/\" + chunkId + \".\" + chunkId + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = (module) => {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: () => {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 6246;","__webpack_require__.p = \"https://wac-cdn.atlassian.com/static/master/1318/assets/build/js/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t6246: 0,\n\t7606: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmagnolia_resources\"] = self[\"webpackChunkmagnolia_resources\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","var _global = (typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}); _global.SENTRY_RELEASE={id:\"master-1318\"};","const __WEBPACK_NAMESPACE_OBJECT__ = jQuery;","import Environment from './environment';\n\nconst debug = Environment.isDev();\n\nexport const log = function (msg, title = '') {\n if (debug) {\n console.log(msg, title);\n }\n};\n\nexport const todo = function (msg) {\n if (debug) {\n console.log(`%c todo: ${msg}`, 'background: #2684FF; color: #fff; padding-right: 10px;');\n }\n};\n\nexport const warn = function (msg) {\n if (debug) {\n console.warn(msg);\n }\n};\n\nexport const error = function (msg, title = '') {\n if (debug) {\n console.error(msg, title);\n } else {\n // @todo: track error somewhere\n }\n};\n\n","export const getOptimizelyEndUserId = function () {\n if (typeof window.optimizely !== 'undefined' && typeof window.optimizely.get === 'function') {\n return window.optimizely.get('visitor_id').randomId;\n }\n return '';\n};\n\nexport const getOptimizelyCohorts = function () {\n if (typeof window.optimizely !== 'undefined' && typeof window.optimizely.get === 'function') {\n const variations = optimizely.get('state').getVariationMap();\n let buckets = {};\n\n for (let key in variations) {\n buckets[key] = variations[key].id;\n }\n\n buckets = JSON.stringify(buckets);\n return buckets;\n }\n return '';\n};\n\nexport const getOptimizelySegments = function () {\n if (typeof window.optimizely !== 'undefined' && typeof window.optimizely.get === 'function') {\n const custom = optimizely.get('visitor').custom;\n let segments = {};\n\n for (var key in custom) {\n // Sometimes it's encoded and has extra quotes\n var val = decodeURIComponent(custom[key].value);\n val = val.replace(/^\"(.*)\"$/, '$1');\n segments[custom[key].id] = val;\n }\n\n segments = JSON.stringify(segments);\n return segments;\n }\n return '';\n};\n\n// Get experiments+cohort that the user is enrolled in formatted for consumption by MEP Provisioning Provider\n// Returns (possibly empty) array of objects with experimentId and cohortId properties\nexport const getAllOptimizelyCohortsAsObjects = function () {\n if (typeof window.optimizely !== 'undefined' && typeof window.optimizely.get === 'function') {\n const variations = optimizely.get('state').getVariationMap();\n\n return Object.keys(variations).map( key => ({ experimentId: key, cohortId: variations[key].id}));\n }\n return [];\n};\n\n// Extend getAllOptimizelyCohortsAsObjects function to return null if array is empty\nexport const getMappedOptimizelyCohorts = function () {\n const cohorts = getAllOptimizelyCohortsAsObjects();\n return cohorts.length ? cohorts : null;\n};\n","import * as Logger from './logger';\nimport axios from 'axios';\nimport * as OptimizelyHelpers from './optimizelyHelpers';\n\n\nlet capturedEventsPromise: Array = [];\nlet onAnalyticsLoad = () => {\n Promise.all(capturedEventsPromise.map(fn => fn()));\n};\n\nexport const trackEvent = function (event: string, data: Record) {\n // First try to use the atl-global wrapper\n if (typeof ace !== \"undefined\") {\n ace.analytics.Tracking.trackEvent(event, data);\n } else {\n capturedEventsPromise.push(\n () => new Promise((resolve) => {\n trackEvent(event, data);\n resolve(null);\n })\n );\n\n window.segmentPageReady = onAnalyticsLoad;\n\n Logger.log({\n event,\n data,\n }, 'Analytics wrapper track event');\n }\n};\n\nexport const trackOptimizely = function (name: string) {\n if (typeof window.optimizely !== 'undefined') {\n window.optimizely.push({\n type: 'event',\n eventName: name\n });\n }\n};\n/**\n* Iterates through event keys, ensures that values are lowercase,\n* and replaces whitespace with `-` character\n**/\nexport const sanitizeEventProperties = function (propertiesObj) {\n let result = {};\n Object.keys(propertiesObj).map(key => {\n // do a quick check just in case values are null\n result[key] = propertiesObj[key] && propertiesObj[key].replace(/\\s+/g, '-').toLowerCase();\n });\n return result;\n}\n\nexport const trackGas = function (postBody) {\n const analyticsApiUrl = 'https://mgas.prod.public.atl-paas.net/v1/event';\n const options = {\n headers: {\n 'content-type': 'application/json'\n },\n withCredentials: true\n };\n\n postBody['properties']['optimizelyCohorts'] = OptimizelyHelpers.getOptimizelyCohorts();\n postBody['properties']['optimizelySegments'] = OptimizelyHelpers.getOptimizelySegments();\n postBody['properties']['optimizelyEndUserId'] = OptimizelyHelpers.getOptimizelyEndUserId();\n return axios.post(analyticsApiUrl, postBody, options)\n .then(() => Promise.resolve());\n};\n","export default {\n categories: {\n none: 'no-category',\n optimizelyTracking: 'optimizely-tracking',\n googleAnalyticsTracking: 'google-analytics-tracking',\n gasv2Tracking: 'gas-v2-tracking',\n },\n actions: {\n none: 'no-action',\n inferredNameMatch: 'inferred-name-match',\n inferredNameMismatch: 'inferred-name-mismatch',\n noNameProvided: 'no-name-provided',\n trackingFailure: 'tracking-failure',\n },\n labels: {\n none: 'no-label',\n },\n reasons: {\n trackingNotLoaded: 'tracking-not-loaded',\n },\n urls: {\n gasv2Url: 'https://mgas.prod.public.atl-paas.net/v1/event',\n },\n};\n","import axios from 'axios';\nimport * as Logger from '../../logger';\nimport { getOptimizelyCohorts, getOptimizelyEndUserId, getOptimizelySegments } from '../../optimizelyHelpers';\nimport Constants from '../constants';\n\nclass GASv2 {\n constructor() {\n this.hasShownWarning = false;\n }\n\n track(postBody) {\n if (!this.hasShownWarning) {\n this.hasShownWarning = true;\n Logger.warn('GASv2 is deprecated! Please migrate to GASv3 when possible.');\n }\n\n let options = {\n headers: {\n 'content-type': 'application/json'\n },\n withCredentials: true\n };\n\n postBody['properties']['optimizelyCohorts'] = getOptimizelyCohorts();\n postBody['properties']['optimizelySegments'] = getOptimizelySegments();\n postBody['properties']['optimizelyEndUserId'] = getOptimizelyEndUserId();\n\n return axios.post(Constants.urls.gasv2Url, postBody, options)\n .then(d => {\n return d;\n })\n .catch(e => {\n return Promise.reject(e);\n });\n }\n}\n\nexport { GASv2 };\n\nexport default new GASv2();\n","class GASv3 {\n track() {\n return Promise.reject('Not yet implemented.');\n }\n}\n\nexport { GASv3 };\n\nexport default new GASv3();\n","class GoogleAnalytics {\n track(data) {\n const { action, attributes, category, label, isNonInteraction } = data;\n const { value } = (attributes || {});\n\n if (typeof ga !== 'undefined') {\n ga('send', 'event', category, action, label, value, {\n nonInteraction: isNonInteraction\n });\n }\n }\n}\n\nexport { GoogleAnalytics };\n\nexport default new GoogleAnalytics();\n","class Optimizely {\n inferName(data) {\n const normalize = (str) => str.toLowerCase().replace(/\\s/g, '-');\n\n return `${normalize(data.category)}.${normalize(data.action)}.${normalize(data.label)}`;\n }\n\n track(data) {\n const name = data.optimizelyValue;\n const inferredName = this.inferName(data);\n\n if (typeof window.optimizely !== 'undefined') {\n window.optimizely.push({\n type: 'event',\n eventName: name || inferredName\n });\n }\n }\n}\n\nexport { Optimizely };\n\nexport default new Optimizely();\n","import { getOptimizelyCohorts, getOptimizelyEndUserId, getOptimizelySegments } from '../../optimizelyHelpers';\n\nclass Segment {\n track(data) {\n if (!imkt || !imkt.utils) {\n return;\n }\n\n const { action, attributes, category, label } = data;\n const { value, ...additionalAttributes } = (attributes || {});\n\n var eventProperties = {\n category,\n label,\n value,\n eventAction: action,\n urlParams: imkt.utils.url.getUrlParams() || {},\n optimizelyCohorts: getOptimizelyCohorts(),\n optimizelySegments: getOptimizelySegments(),\n optimizelyEndUserId: getOptimizelyEndUserId(),\n ...additionalAttributes\n };\n imkt.utils.tracking.trackEvent(action, eventProperties);\n }\n}\n\nexport { Segment };\n\nexport default new Segment();\n","import GASv2 from './gasv2';\nimport GASv3 from './gasv3';\nimport GoogleAnalytics from './googleAnalytics';\nimport Optimizely from './optimizely';\nimport Segment from './segment';\n\n// platforms to send to when Tracking.trackAll() is called.\nexport const trackAllPlatforms = [Optimizely, GoogleAnalytics, Segment];\n\n// all supported platforms.\nexport {\n GASv2,\n GASv3,\n GoogleAnalytics,\n Optimizely,\n Segment,\n};\n","import { trackAllPlatforms } from './platforms';\n\nclass Tracking {\n /**\n * Process the value attribute to remove newlines, if the value attribute exists.\n *\n * @param {any} attributes\n */\n processAttributes(attributes) {\n if (!attributes) return {};\n\n let { value, ...additionalAttributes } = attributes;\n if (value) {\n value = value.replace(/\\r?\\n|\\r/g, \"\");\n }\n return { value, ...additionalAttributes };\n }\n\n /**\n * Send a tracking event to any tracking platforms defined in the `trackAllPlatforms` array.\n *\n * @param {string} category The event category, e.g. \"cart-cloud\" or \"bxp.formCloudSignup\".\n * @param {string} action The action name, e.g. \"page-unload\" or \"time-to-form-ready\".\n * @param {string} label An event label, e.g. \"form-event\" or \"signup-social-login\". Not used by all platforms.\n * @param {any} attributes Additional attributes passed to the tracking platform.\n * @param {string} optimizelyValue A plain string to pass to Optimizely as the event name. Deprecated.\n * @param {boolean} isNonInteraction Whether or not the event is a non-interaction event (Google Analytics). See also, https://support.google.com/analytics/answer/1033068#NonInteractionEvents\n */\n trackAll(category, action, label, attributes = {}, optimizelyValue, isNonInteraction) {\n const attrs = this.processAttributes(attributes);\n\n trackAllPlatforms.forEach(platform => {\n platform.track({\n category,\n action,\n label,\n attributes: attrs,\n optimizelyValue,\n isNonInteraction,\n });\n })\n }\n}\n\nexport { Tracking };\n\nexport default new Tracking();\n","import { trackEvent, sanitizeEventProperties } from \"../common/analytics\";\nimport Tracking from \"../common/tracking\";\nimport * as Platforms from \"../common/tracking/platforms\";\n\nexport default class ImktTracking {\n // expose utils for Apollo to call from external experiment code.\n apollo = {\n Tracking,\n Platforms,\n };\n\n // Track events for analytics\n static trackEvent(eventName: string, eventProperties: {}) {\n trackEvent(eventName, eventProperties);\n }\n\n static sanitizeEventProperties(eventProperty) {\n return sanitizeEventProperties(eventProperty);\n }\n\n /* use the below function for tracking content that was not rendered server-side and has thus escaped the purview of the tracking wrapper */\n static trackLateRenderedEvent(eventName: string, eventTarget) {\n if (\n eventTarget.tagName == \"A\" ||\n (eventTarget.tagName == \"BUTTON\" && eventTarget.dataset.uuid)\n ) {\n let attributes = [\n \"uuid\",\n \"event\",\n \"eventComponent\",\n \"eventContainer\",\n \"parentLabel\",\n \"eventColumn\",\n \"schemaVersion\",\n ];\n let eventData = {\n label: eventTarget.dataset.label\n ? eventTarget.dataset.label\n : eventTarget.innerText,\n };\n attributes.forEach((attribute) => {\n eventData[attribute] = eventTarget.dataset[attribute];\n });\n this.trackEvent(eventName, eventData);\n }\n }\n\n static getOptimizelyXData() {\n if (!window.optimizely) {\n return false;\n }\n let campaigns;\n try {\n const state = window.optimizely.get(\"state\");\n const campaignList = state.getCampaignStates({ \"isActive\": true });\n campaigns = Object.keys(campaignList).reduce((acc, key) => {\n const campaign = campaignList[key];\n return {\n ...acc,\n [key]: {\n activeExperiments: [{\n [campaign.experiment.id]: campaign.variation.id,\n }],\n holdbackExperiments: campaign.isInCampaignHoldback ? [campaign.experiment.id] : [],\n }\n };\n }, {});\n } catch (_e) {\n return false;\n }\n\n return campaigns;\n }\n}\n","import tracking from \"./utils/tracking\";\n\nconst imkt: { [property: string]: any } = window.imkt = window.imkt || {\n core: {\n /*\n * this parses the DOM and finds any type=\"text/x-component\" scripts and initializes a component for each\n */\n init: async function (domRoot) {\n var self = this;\n\n this.featureDetect();\n\n const LocalizedPricing = (await import(\"./utils/localized-pricing\")).default;\n\n const localizedPricing = new LocalizedPricing();\n\n $(\"script[type='text/x-component']\", domRoot).each(function (i, elem) {\n var componentInfo = JSON.parse(elem.innerHTML.trim()),\n componentRoot = elem.parentNode;\n\n const {\n productKey,\n productKeyArray,\n period,\n offeringSku,\n countryISOCodeReq,\n } = componentInfo.params;\n\n if (productKey) {\n componentInfo.params.pricing = localizedPricing.getPricingPromise(\n productKey,\n period\n );\n }\n\n if (offeringSku) {\n componentInfo.params.pricing = localizedPricing.getPricingPromise(\n null,\n period,\n null,\n null,\n offeringSku\n );\n }\n\n if (productKeyArray) {\n componentInfo.params.pricingObject = productKeyArray.map((product) => {\n return localizedPricing.getPricingPromise(\n product.key,\n product.period,\n product.identifiers,\n product.customCurrency\n );\n });\n }\n\n if (countryISOCodeReq) {\n componentInfo.params.countryISOCodePromise =\n localizedPricing.getLocale();\n }\n\n try {\n self.componentInit.call(self, componentRoot, componentInfo);\n } catch (e) {\n console.log(e);\n }\n });\n\n localizedPricing.resolvePricingPromises();\n\n // Init component scripts with Smartling Translation\n $(\"script[type='text/x-component-translate']\", domRoot).each(function (\n i,\n elem\n ) {\n var innerHTML = elem.innerHTML\n .trim()\n .replace(\"/* */\", \"\")\n .replace(\"/* */\", \"\");\n var componentInfo = JSON.parse(innerHTML),\n componentRoot = elem.parentNode;\n self.componentInit.call(self, componentRoot, componentInfo);\n });\n\n $(document).trigger(\"appInitialized\");\n this.appInitialized = true;\n },\n onInitialized: function (cb) {\n if (this.appInitialized) {\n cb();\n } else {\n $(document).on(\"appInitialized\", cb);\n }\n },\n featureDetect: function () {\n var bodyClasses = [];\n if (!this.supports.svg()) {\n bodyClasses.push(\"no-svg\");\n }\n if (!this.supports.backgroundSize()) {\n bodyClasses.push(\"no-backgroundsize\");\n }\n if (!this.supports.flexBox()) {\n bodyClasses.push(\"no-flexbox\");\n }\n $(\"body\").addClass(bodyClasses.join(\" \"));\n },\n extend: function (supertype, subtype, overrides = {}) {\n var ctor = function () { },\n name;\n ctor.prototype = supertype.prototype;\n subtype.prototype = new ctor();\n for (name in overrides) {\n subtype.prototype[name] = overrides[name];\n }\n subtype.prototype.constructor = supertype;\n },\n /*\n * this takes a namespaced string like \"imkt.ui.tabs\" and returns the actual JS object (if found)\n */\n resolve: function (str, createIfNotExists) {\n var basis = window;\n if (!str) {\n return null;\n } else if (typeof str === \"function\") {\n return str;\n } else {\n var last = basis,\n names = str.split(\".\"),\n name,\n i,\n j;\n for (i = 0, j = names.length; i < j; i++) {\n name = names[i];\n basis = basis[name];\n if (!basis) {\n if (createIfNotExists) {\n basis = last[name] = {};\n } else {\n return null;\n }\n }\n last = basis;\n }\n }\n return basis;\n },\n /*\n * tries to resolve the component name and if so, initializes it\n */\n componentInit: function (componentRoot, componentInfo) {\n var componentType = this.resolve(componentInfo.type);\n if (componentType) {\n return new componentType(\n componentRoot,\n Object.assign({}, componentInfo.params, $(componentRoot).data())\n );\n } else {\n // could not find component\n }\n },\n supports: {\n flexBox: function () {\n return (\n \"flexWrap\" in document.documentElement.style ||\n \"webkitFlexWrap\" in document.documentElement.style\n );\n },\n history: function () {\n return window.history && window.history.pushState;\n },\n svg: function () {\n return document.implementation.hasFeature(\n \"http://www.w3.org/TR/SVG11/feature#Image\",\n \"1.1\"\n );\n },\n backgroundSize: function () {\n return \"backgroundSize\" in document.documentElement.style;\n },\n touch: function () {\n return \"ontouchstart\" in window;\n },\n placeholder: function () {\n var i = document.createElement(\"input\");\n return \"placeholder\" in i;\n },\n localStorage: function () {\n // Bugfix WTF-15606, try/catch for localStorage empty object (private browsers)\n try {\n window.localStorage.setItem(\"hasStorage\", \"1\");\n return (\n window.localStorage &&\n window.localStorage.setItem &&\n window.localStorage.removeItem\n );\n } catch (error) {\n return false;\n }\n },\n transitions: function () {\n var b = document.body || document.documentElement,\n s = b.style,\n p = \"transition\";\n\n if (typeof s[p] == \"string\") {\n return true;\n }\n\n // Tests for vendor specific prop\n var v = [\"Moz\", \"webkit\", \"Webkit\", \"Khtml\", \"O\", \"ms\"];\n p = p.charAt(0).toUpperCase() + p.substr(1);\n\n for (var i = 0; i < v.length; i++) {\n if (typeof s[v[i] + p] == \"string\") {\n return true;\n }\n }\n\n return false;\n },\n },\n is: {\n mobile: function () {\n return imkt.core.supports.touch() && screen.width && screen.width < 768;\n },\n },\n },\n ui: {},\n utils: {\n tracking,\n },\n wpl: {},\n common: {},\n wac: {},\n landing: {},\n experts: {},\n legal: {},\n components: {},\n software: {},\n bxp: {},\n customers: {},\n pages: {},\n teamPatterns: {},\n};\n\nexport default imkt;","import * as $ from \"jquery\";\nimport onThrottled from \"../../../utils/event\";\nimport imkt from '../../../imkt';\n\nimkt.wpl.globalNavigation = function (domRoot, params) {\n (this.$domRoot = domRoot), (this.params = { ...params });\n\n this.$header = $(\".header--wac\");\n this.$globalNav = $(\".global-nav--wac\");\n this.$globalNavLogo = $(\".global-nav--wac__logo\");\n this.$globalNavTitle = $(\".global-nav--wac__title\");\n this.$dropdown = $(\".container--nav-dropdown\");\n this.$search = $(\".global-nav--wac__search\");\n this.$searchInput = $(\".global-nav--wac__search-input\");\n this.$dropdownContent = $(\".container--nav-dropdown__content\");\n this.mobileBreakpoint = 775; // tied to css\n this.dropdownSpeed = 500; // tied to css\n this.dropdownSpeedFast = 250; // tied to css\n this.canClickDropdown = true;\n this.isCurrentlyMobile = false;\n\n (this.classNames = {\n mobileMenuOpenClass: \"mobile-menu--open\",\n searchOpenClass: \"search--open\",\n overlayOpenClass: \"overlay--open\",\n searchIconClass: \".global-nav--wac__search-icon\",\n overlayClass: \".overlay--global-nav\",\n headerlessNavbarClass:\n \".headerless-nav .imkt-navbar__link-list-link--dropdown-trigger\",\n globalNavBackArrowClass: \".global-nav--wac__back-arrow\",\n menuToggleClass: \".global-nav--wac__menu-toggle\",\n searchCloseIconClass: \".global-nav--wac__search-close\",\n dropdownLinksClass: \".global-nav--wac__link.has-dropdown a\",\n dropdownCloseClass: \".container--nav-dropdown__close\",\n dropdownClass: \".container--nav-dropdown\",\n dropdownOpenClass: \"dropdown--open\",\n slideInClass: \"slide-in--active\",\n logoInactiveClass: \"inactive\",\n //WAC header tracking WCF-820\n navLinkDropDownClass: \".global-nav--wac__link.has-dropdown\",\n navDropdownLinksClass: \".container--nav-dropdown__link\",\n navDropDownColumnSecondaryClass:\n \".container--nav-dropdown__column--secondary li\",\n navDropDownLinkAllClass: \".container--nav-dropdown__link--all\",\n navLogoClass: \".global-nav--wac__logo\",\n }),\n this.init();\n};\n\nimkt.wpl.globalNavigation.prototype = {\n init: function () {\n this.setLayoutState();\n\n this.addOverlay();\n this.bindEvents();\n },\n\n bindEvents: function () {\n var self = this;\n onThrottled($(window), \"resize\", function () {\n if (self.hasChangedLayout()) {\n self.closeMobileMenu();\n self.closeDropdown();\n self.showLogo();\n if (self.$search.hasClass(\"active\")) {\n self.openSearch();\n }\n }\n if (self.isMobileLayout() && self.isMobileMenuOpen()) {\n self.setHeaderHeight();\n }\n self.setLayoutState();\n });\n\n $(document).on(\"click\", self.classNames.menuToggleClass, function (e) {\n e.preventDefault();\n self.isMobileMenuOpen() ? self.closeMobileMenu() : self.openMobileMenu();\n self.hideOverlay();\n self.closeDropdown();\n self.isMobileDropdownOpen() ? self.hideLogo() : self.showLogo();\n });\n\n $(document).on(\"click\", self.classNames.dropdownLinksClass, function (e) {\n e.preventDefault();\n if (!self.canClickDropdown) {\n return;\n }\n self.canClickDropdown = false;\n var dropdownId = $(this).data(\"dropdown-id\");\n var $dropdownContent = $(\"#\" + dropdownId);\n var isDropdownHidden = !$dropdownContent.hasClass(\"active\");\n\n self.closeSearch();\n\n $(self.classNames.dropdownLinksClass).removeClass(\"selected\");\n $(\"[id^=dropdown-]\").removeClass(\"active\");\n $(\"body\").addClass(self.classNames.overlayOpenClass);\n\n if (isDropdownHidden) {\n self.openDropdown(this);\n } else {\n self.closeDropdown();\n }\n\n if (self.isMobileLayout()) {\n self.hideLogo();\n self.addTitle($(this));\n self.dropdownSlideIn();\n }\n });\n\n $(document).on(\"click\", self.classNames.searchIconClass, function (e) {\n e.preventDefault();\n self.closeMobileMenu();\n self.closeDropdown();\n self.openSearch();\n });\n\n $(document).on(\"click\", self.classNames.searchCloseIconClass, function (e) {\n e.preventDefault();\n self.closeSearch();\n });\n\n $(document).on(\n \"click touchstart\",\n self.classNames.overlayClass,\n function () {\n self.closeDropdown();\n self.closeSearch();\n }\n );\n\n $(document).on(\n \"click touchstart\",\n self.classNames.headerlessNavbarClass,\n function () {\n self.closeDropdown();\n self.closeSearch();\n }\n );\n\n $(document).on(\"click\", self.classNames.dropdownCloseClass, function (e) {\n e.preventDefault();\n self.closeDropdown();\n self.closeSearch();\n self.closeMobileMenu();\n });\n\n $(document).on(\n \"click\",\n self.classNames.globalNavBackArrowClass,\n function (e) {\n e.preventDefault();\n self.closeDropdown();\n self.showLogo();\n }\n );\n\n $(document).on(\"click\", self.classNames.navLogoClass, function () {\n self.sendTracking(\"wac_header_logo_clicked\", \"Atlassian Logo\");\n });\n },\n\n sendTracking: function (eventName, linkName) {\n var properties = {\n originUrl: window.location.href,\n linkText: linkName,\n };\n imkt.utils.tracking.trackEvent(eventName, properties);\n },\n\n hasChangedLayout: function () {\n return this.isCurrentlyMobile !== this.isMobileLayout();\n },\n\n isMobileLayout: function () {\n return $(window).width() <= this.mobileBreakpoint;\n },\n\n isMobileMenuOpen: function () {\n return this.$globalNav.hasClass(\"active\");\n },\n\n setLayoutState: function () {\n this.isCurrentlyMobile = this.isMobileLayout();\n },\n\n addOverlay: function () {\n $(\"body\").prepend('');\n this.overlay = $(this.classNames.overlayClass);\n },\n\n openMobileMenu: function () {\n this.closeSearch();\n $(\"html, body\").addClass(this.classNames.mobileMenuOpenClass);\n this.$globalNav.addClass(\"active\");\n this.$header.addClass(\"active\");\n this.setHeaderHeight();\n },\n\n closeMobileMenu: function () {\n $(\"html, body\").removeClass(this.classNames.mobileMenuOpenClass);\n this.$globalNav.removeClass(\"active\");\n this.$header.removeClass(\"active\");\n this.resetHeaderHeight();\n this.deselectLinks();\n },\n\n openSearch: function () {\n this.$search.addClass(\"active\");\n $(\"html, body\").addClass(this.classNames.searchOpenClass);\n this.showOverlay();\n this.$searchInput.focus();\n },\n\n closeSearch: function () {\n this.$search.removeClass(\"active\");\n $(\"html, body\").removeClass(this.classNames.searchOpenClass);\n this.hideOverlay();\n },\n\n showOverlay: function () {\n this.overlay.addClass(\"active\");\n },\n\n hideOverlay: function () {\n this.overlay.removeClass(\"active\");\n },\n\n openDropdown: function (dropdownLink) {\n $(dropdownLink).addClass(\"selected\");\n var dropdownId = $(dropdownLink).data(\"dropdown-id\");\n var $dropdown = $(\"#\" + dropdownId);\n $dropdown.addClass(\"active\");\n setTimeout(\n function () {\n $(\"html, body\").addClass(this.classNames.dropdownOpenClass);\n this.canClickDropdown = true;\n }.bind(this),\n this.dropdownSpeed\n );\n this.showOverlay();\n },\n\n closeDropdown: function () {\n $(this.classNames.dropdownClass).removeClass(\"active\");\n setTimeout(\n function () {\n $(\"html, body\").removeClass(this.classNames.overlayOpenClass);\n this.canClickDropdown = true;\n }.bind(this),\n this.dropdownSpeedFast\n );\n $(\"html, body\").removeClass(this.classNames.dropdownOpenClass);\n this.hideOverlay();\n this.deselectLinks();\n this.dropdownRemoveSlideIn();\n },\n\n hideLogo: function () {\n this.$globalNavLogo.addClass(this.classNames.logoInactiveClass);\n },\n\n showLogo: function () {\n this.$globalNavLogo.removeClass(this.classNames.logoInactiveClass);\n },\n\n addTitle: function ($dropdownText) {\n var self = this;\n self.$globalNavTitle.text($dropdownText.text());\n },\n\n isMobileDropdownOpen: function () {\n return this.$dropdown.hasClass(\"active\");\n },\n\n dropdownSlideIn: function () {\n if (this.isMobileLayout()) {\n this.$globalNav.addClass(this.classNames.slideInClass);\n }\n },\n\n dropdownRemoveSlideIn: function () {\n if (this.isMobileLayout()) {\n this.$globalNav.removeClass(this.classNames.slideInClass);\n }\n },\n\n setHeaderHeight: function () {\n this.$header.css({ height: $(window).height() + \"px\" });\n },\n\n resetHeaderHeight: function () {\n this.$header.css({ height: \"\" });\n },\n\n deselectLinks: function () {\n $(this.classNames.dropdownLinksClass).removeClass(\"selected\");\n },\n};\n","export default function onThrottled(element: JQuery, eventName: string, callback: Function, threshold?: number) {\n let timeout: NodeJS.Timeout;\n element.on(eventName, function (e) {\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n callback(e);\n }, threshold || 100);\n });\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nvar RelativeTimeFormat;\n// -- Utilities ----------------------------------------------------------------\nfunction getCacheId(inputs) {\n return JSON.stringify(inputs.map(function (input) {\n return input && typeof input === 'object' ? orderedProps(input) : input;\n }));\n}\nfunction orderedProps(obj) {\n return Object.keys(obj)\n .sort()\n .map(function (k) {\n var _a;\n return (_a = {}, _a[k] = obj[k], _a);\n });\n}\nvar memoizeFormatConstructor = function (FormatConstructor, cache) {\n if (cache === void 0) { cache = {}; }\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var cacheId = getCacheId(args);\n var format = cacheId && cache[cacheId];\n if (!format) {\n format = new ((_a = FormatConstructor).bind.apply(_a, [void 0].concat(args)))();\n if (cacheId) {\n cache[cacheId] = format;\n }\n }\n return format;\n };\n};\nexport default memoizeFormatConstructor;\n//# sourceMappingURL=index.js.map","/*\n * Copyright 2019, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nimport allLocaleData from '../locale-data/index.js';\nimport IntlMessageFormat from 'intl-messageformat';\nimport IntlRelativeFormat from 'intl-relativeformat';\nimport PropTypes from 'prop-types';\nimport React, { Children, Component, createElement, isValidElement } from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport invariant from 'invariant';\nimport memoizeIntlConstructor from 'intl-format-cache';\n\n// GENERATED FILE\nvar defaultLocaleData = { \"locale\": \"en\", \"pluralRuleFunction\": function pluralRuleFunction(n, ord) {\n var s = String(n).split(\".\"),\n v0 = !s[1],\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2);if (ord) return n10 == 1 && n100 != 11 ? \"one\" : n10 == 2 && n100 != 12 ? \"two\" : n10 == 3 && n100 != 13 ? \"few\" : \"other\";return n == 1 && v0 ? \"one\" : \"other\";\n }, \"fields\": { \"year\": { \"displayName\": \"year\", \"relative\": { \"0\": \"this year\", \"1\": \"next year\", \"-1\": \"last year\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} year\", \"other\": \"in {0} years\" }, \"past\": { \"one\": \"{0} year ago\", \"other\": \"{0} years ago\" } } }, \"year-short\": { \"displayName\": \"yr.\", \"relative\": { \"0\": \"this yr.\", \"1\": \"next yr.\", \"-1\": \"last yr.\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} yr.\", \"other\": \"in {0} yr.\" }, \"past\": { \"one\": \"{0} yr. ago\", \"other\": \"{0} yr. ago\" } } }, \"month\": { \"displayName\": \"month\", \"relative\": { \"0\": \"this month\", \"1\": \"next month\", \"-1\": \"last month\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} month\", \"other\": \"in {0} months\" }, \"past\": { \"one\": \"{0} month ago\", \"other\": \"{0} months ago\" } } }, \"month-short\": { \"displayName\": \"mo.\", \"relative\": { \"0\": \"this mo.\", \"1\": \"next mo.\", \"-1\": \"last mo.\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} mo.\", \"other\": \"in {0} mo.\" }, \"past\": { \"one\": \"{0} mo. ago\", \"other\": \"{0} mo. ago\" } } }, \"day\": { \"displayName\": \"day\", \"relative\": { \"0\": \"today\", \"1\": \"tomorrow\", \"-1\": \"yesterday\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} day\", \"other\": \"in {0} days\" }, \"past\": { \"one\": \"{0} day ago\", \"other\": \"{0} days ago\" } } }, \"day-short\": { \"displayName\": \"day\", \"relative\": { \"0\": \"today\", \"1\": \"tomorrow\", \"-1\": \"yesterday\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} day\", \"other\": \"in {0} days\" }, \"past\": { \"one\": \"{0} day ago\", \"other\": \"{0} days ago\" } } }, \"hour\": { \"displayName\": \"hour\", \"relative\": { \"0\": \"this hour\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} hour\", \"other\": \"in {0} hours\" }, \"past\": { \"one\": \"{0} hour ago\", \"other\": \"{0} hours ago\" } } }, \"hour-short\": { \"displayName\": \"hr.\", \"relative\": { \"0\": \"this hour\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} hr.\", \"other\": \"in {0} hr.\" }, \"past\": { \"one\": \"{0} hr. ago\", \"other\": \"{0} hr. ago\" } } }, \"minute\": { \"displayName\": \"minute\", \"relative\": { \"0\": \"this minute\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} minute\", \"other\": \"in {0} minutes\" }, \"past\": { \"one\": \"{0} minute ago\", \"other\": \"{0} minutes ago\" } } }, \"minute-short\": { \"displayName\": \"min.\", \"relative\": { \"0\": \"this minute\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} min.\", \"other\": \"in {0} min.\" }, \"past\": { \"one\": \"{0} min. ago\", \"other\": \"{0} min. ago\" } } }, \"second\": { \"displayName\": \"second\", \"relative\": { \"0\": \"now\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} second\", \"other\": \"in {0} seconds\" }, \"past\": { \"one\": \"{0} second ago\", \"other\": \"{0} seconds ago\" } } }, \"second-short\": { \"displayName\": \"sec.\", \"relative\": { \"0\": \"now\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} sec.\", \"other\": \"in {0} sec.\" }, \"past\": { \"one\": \"{0} sec. ago\", \"other\": \"{0} sec. ago\" } } } } };\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nfunction addLocaleData() {\n var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var locales = Array.isArray(data) ? data : [data];\n\n locales.forEach(function (localeData) {\n if (localeData && localeData.locale) {\n IntlMessageFormat.__addLocaleData(localeData);\n IntlRelativeFormat.__addLocaleData(localeData);\n }\n });\n}\n\nfunction hasLocaleData(locale) {\n var localeParts = (locale || '').split('-');\n\n while (localeParts.length > 0) {\n if (hasIMFAndIRFLocaleData(localeParts.join('-'))) {\n return true;\n }\n\n localeParts.pop();\n }\n\n return false;\n}\n\nfunction hasIMFAndIRFLocaleData(locale) {\n var normalizedLocale = locale && locale.toLowerCase();\n\n return !!(IntlMessageFormat.__localeData__[normalizedLocale] && IntlRelativeFormat.__localeData__[normalizedLocale]);\n}\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\n\n\n\n\nvar asyncGenerator = function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg);\n var value = result.value;\n\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(function (arg) {\n resume(\"next\", arg);\n }, function (arg) {\n resume(\"throw\", arg);\n });\n } else {\n settle(result.done ? \"return\" : \"normal\", result.value);\n }\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({\n value: value,\n done: true\n });\n break;\n\n case \"throw\":\n front.reject(value);\n break;\n\n default:\n front.resolve({\n value: value,\n done: false\n });\n break;\n }\n\n front = front.next;\n\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n if (typeof gen.return !== \"function\") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n\n AsyncGenerator.prototype.next = function (arg) {\n return this._invoke(\"next\", arg);\n };\n\n AsyncGenerator.prototype.throw = function (arg) {\n return this._invoke(\"throw\", arg);\n };\n\n AsyncGenerator.prototype.return = function (arg) {\n return this._invoke(\"return\", arg);\n };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n}();\n\n\n\n\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n\n\n\n\n\n\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar bool = PropTypes.bool;\nvar number = PropTypes.number;\nvar string = PropTypes.string;\nvar func = PropTypes.func;\nvar object = PropTypes.object;\nvar oneOf = PropTypes.oneOf;\nvar shape = PropTypes.shape;\nvar any = PropTypes.any;\nvar oneOfType = PropTypes.oneOfType;\n\nvar localeMatcher = oneOf(['best fit', 'lookup']);\nvar narrowShortLong = oneOf(['narrow', 'short', 'long']);\nvar numeric2digit = oneOf(['numeric', '2-digit']);\nvar funcReq = func.isRequired;\n\nvar intlConfigPropTypes = {\n locale: string,\n timeZone: string,\n formats: object,\n messages: object,\n textComponent: any,\n\n defaultLocale: string,\n defaultFormats: object,\n\n onError: func\n};\n\nvar intlFormatPropTypes = {\n formatDate: funcReq,\n formatTime: funcReq,\n formatRelative: funcReq,\n formatNumber: funcReq,\n formatPlural: funcReq,\n formatMessage: funcReq,\n formatHTMLMessage: funcReq\n};\n\nvar intlShape = shape(_extends({}, intlConfigPropTypes, intlFormatPropTypes, {\n formatters: object,\n now: funcReq\n}));\n\nvar messageDescriptorPropTypes = {\n id: string.isRequired,\n description: oneOfType([string, object]),\n defaultMessage: string\n};\n\nvar dateTimeFormatPropTypes = {\n localeMatcher: localeMatcher,\n formatMatcher: oneOf(['basic', 'best fit']),\n\n timeZone: string,\n hour12: bool,\n\n weekday: narrowShortLong,\n era: narrowShortLong,\n year: numeric2digit,\n month: oneOf(['numeric', '2-digit', 'narrow', 'short', 'long']),\n day: numeric2digit,\n hour: numeric2digit,\n minute: numeric2digit,\n second: numeric2digit,\n timeZoneName: oneOf(['short', 'long'])\n};\n\nvar numberFormatPropTypes = {\n localeMatcher: localeMatcher,\n\n style: oneOf(['decimal', 'currency', 'percent']),\n currency: string,\n currencyDisplay: oneOf(['symbol', 'code', 'name']),\n useGrouping: bool,\n\n minimumIntegerDigits: number,\n minimumFractionDigits: number,\n maximumFractionDigits: number,\n minimumSignificantDigits: number,\n maximumSignificantDigits: number\n};\n\nvar relativeFormatPropTypes = {\n style: oneOf(['best fit', 'numeric']),\n units: oneOf(['second', 'minute', 'hour', 'day', 'month', 'year', 'second-short', 'minute-short', 'hour-short', 'day-short', 'month-short', 'year-short'])\n};\n\nvar pluralFormatPropTypes = {\n style: oneOf(['cardinal', 'ordinal'])\n};\n\n/*\nHTML escaping and shallow-equals implementations are the same as React's\n(on purpose.) Therefore, it has the following Copyright and Licensing:\n\nCopyright 2013-2014, Facebook, Inc.\nAll rights reserved.\n\nThis source code is licensed under the BSD-style license found in the LICENSE\nfile in the root directory of React's source tree.\n*/\n\nvar intlConfigPropNames = Object.keys(intlConfigPropTypes);\n\nvar ESCAPED_CHARS = {\n '&': '&',\n '>': '>',\n '<': '<',\n '\"': '"',\n \"'\": '''\n};\n\nvar UNSAFE_CHARS_REGEX = /[&><\"']/g;\n\nfunction escape(str) {\n return ('' + str).replace(UNSAFE_CHARS_REGEX, function (match) {\n return ESCAPED_CHARS[match];\n });\n}\n\nfunction filterProps(props, whitelist) {\n var defaults$$1 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n return whitelist.reduce(function (filtered, name) {\n if (props.hasOwnProperty(name)) {\n filtered[name] = props[name];\n } else if (defaults$$1.hasOwnProperty(name)) {\n filtered[name] = defaults$$1[name];\n }\n\n return filtered;\n }, {});\n}\n\nfunction invariantIntlContext() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n intl = _ref.intl;\n\n invariant(intl, '[React Intl] Could not find required `intl` object. ' + ' needs to exist in the component ancestry.');\n}\n\nfunction shallowEquals(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n if ((typeof objA === 'undefined' ? 'undefined' : _typeof(objA)) !== 'object' || objA === null || (typeof objB === 'undefined' ? 'undefined' : _typeof(objB)) !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n for (var i = 0; i < keysA.length; i++) {\n if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction shouldIntlComponentUpdate(_ref2, nextProps, nextState) {\n var props = _ref2.props,\n state = _ref2.state,\n _ref2$context = _ref2.context,\n context = _ref2$context === undefined ? {} : _ref2$context;\n var nextContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var _context$intl = context.intl,\n intl = _context$intl === undefined ? {} : _context$intl;\n var _nextContext$intl = nextContext.intl,\n nextIntl = _nextContext$intl === undefined ? {} : _nextContext$intl;\n\n\n return !shallowEquals(nextProps, props) || !shallowEquals(nextState, state) || !(nextIntl === intl || shallowEquals(filterProps(nextIntl, intlConfigPropNames), filterProps(intl, intlConfigPropNames)));\n}\n\nfunction createError(message, exception) {\n var eMsg = exception ? '\\n' + exception : '';\n return '[React Intl] ' + message + eMsg;\n}\n\nfunction defaultErrorHandler(error) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(error);\n }\n}\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\n// Inspired by react-redux's `connect()` HOC factory function implementation:\n// https://github.com/rackt/react-redux\n\nfunction getDisplayName(Component$$1) {\n return Component$$1.displayName || Component$$1.name || 'Component';\n}\n\nfunction injectIntl(WrappedComponent) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$intlPropName = options.intlPropName,\n intlPropName = _options$intlPropName === undefined ? 'intl' : _options$intlPropName,\n _options$withRef = options.withRef,\n withRef = _options$withRef === undefined ? false : _options$withRef;\n\n var InjectIntl = function (_Component) {\n inherits(InjectIntl, _Component);\n\n function InjectIntl(props, context) {\n classCallCheck(this, InjectIntl);\n\n var _this = possibleConstructorReturn(this, (InjectIntl.__proto__ || Object.getPrototypeOf(InjectIntl)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(InjectIntl, [{\n key: 'getWrappedInstance',\n value: function getWrappedInstance() {\n invariant(withRef, '[React Intl] To access the wrapped instance, ' + 'the `{withRef: true}` option must be set when calling: ' + '`injectIntl()`');\n\n return this._wrappedInstance;\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n return React.createElement(WrappedComponent, _extends({}, this.props, defineProperty({}, intlPropName, this.context.intl), {\n ref: withRef ? /* istanbul ignore next */function (ref) {\n return _this2._wrappedInstance = ref;\n } : null\n }));\n }\n }]);\n return InjectIntl;\n }(Component);\n\n InjectIntl.displayName = 'InjectIntl(' + getDisplayName(WrappedComponent) + ')';\n InjectIntl.contextTypes = {\n intl: intlShape\n };\n InjectIntl.WrappedComponent = WrappedComponent;\n\n\n return hoistNonReactStatics(InjectIntl, WrappedComponent);\n}\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nfunction defineMessages(messageDescriptors) {\n // This simply returns what's passed-in because it's meant to be a hook for\n // babel-plugin-react-intl.\n return messageDescriptors;\n}\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\n// This is a \"hack\" until a proper `intl-pluralformat` package is created.\n\nfunction resolveLocale(locales) {\n // IntlMessageFormat#_resolveLocale() does not depend on `this`.\n return IntlMessageFormat.prototype._resolveLocale(locales);\n}\n\nfunction findPluralFunction(locale) {\n // IntlMessageFormat#_findPluralFunction() does not depend on `this`.\n return IntlMessageFormat.prototype._findPluralRuleFunction(locale);\n}\n\nvar IntlPluralFormat = function IntlPluralFormat(locales) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n classCallCheck(this, IntlPluralFormat);\n\n var useOrdinal = options.style === 'ordinal';\n var pluralFn = findPluralFunction(resolveLocale(locales));\n\n this.format = function (value) {\n return pluralFn(value, useOrdinal);\n };\n};\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar DATE_TIME_FORMAT_OPTIONS = Object.keys(dateTimeFormatPropTypes);\nvar NUMBER_FORMAT_OPTIONS = Object.keys(numberFormatPropTypes);\nvar RELATIVE_FORMAT_OPTIONS = Object.keys(relativeFormatPropTypes);\nvar PLURAL_FORMAT_OPTIONS = Object.keys(pluralFormatPropTypes);\n\nvar RELATIVE_FORMAT_THRESHOLDS = {\n second: 60, // seconds to minute\n minute: 60, // minutes to hour\n hour: 24, // hours to day\n day: 30, // days to month\n month: 12 };\n\nfunction updateRelativeFormatThresholds(newThresholds) {\n var thresholds = IntlRelativeFormat.thresholds;\n thresholds.second = newThresholds.second;\n thresholds.minute = newThresholds.minute;\n thresholds.hour = newThresholds.hour;\n thresholds.day = newThresholds.day;\n thresholds.month = newThresholds.month;\n thresholds['second-short'] = newThresholds['second-short'];\n thresholds['minute-short'] = newThresholds['minute-short'];\n thresholds['hour-short'] = newThresholds['hour-short'];\n thresholds['day-short'] = newThresholds['day-short'];\n thresholds['month-short'] = newThresholds['month-short'];\n}\n\nfunction getNamedFormat(formats, type, name, onError) {\n var format = formats && formats[type] && formats[type][name];\n if (format) {\n return format;\n }\n\n onError(createError('No ' + type + ' format named: ' + name));\n}\n\nfunction formatDate(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats,\n timeZone = config.timeZone;\n var format = options.format;\n\n\n var onError = config.onError || defaultErrorHandler;\n var date = new Date(value);\n var defaults$$1 = _extends({}, timeZone && { timeZone: timeZone }, format && getNamedFormat(formats, 'date', format, onError));\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults$$1);\n\n try {\n return state.getDateTimeFormat(locale, filteredOptions).format(date);\n } catch (e) {\n onError(createError('Error formatting date.', e));\n }\n\n return String(date);\n}\n\nfunction formatTime(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats,\n timeZone = config.timeZone;\n var format = options.format;\n\n\n var onError = config.onError || defaultErrorHandler;\n var date = new Date(value);\n var defaults$$1 = _extends({}, timeZone && { timeZone: timeZone }, format && getNamedFormat(formats, 'time', format, onError));\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults$$1);\n\n if (!filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second) {\n // Add default formatting options if hour, minute, or second isn't defined.\n filteredOptions = _extends({}, filteredOptions, { hour: 'numeric', minute: 'numeric' });\n }\n\n try {\n return state.getDateTimeFormat(locale, filteredOptions).format(date);\n } catch (e) {\n onError(createError('Error formatting time.', e));\n }\n\n return String(date);\n}\n\nfunction formatRelative(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats;\n var format = options.format;\n\n\n var onError = config.onError || defaultErrorHandler;\n var date = new Date(value);\n var now = new Date(options.now);\n var defaults$$1 = format && getNamedFormat(formats, 'relative', format, onError);\n var filteredOptions = filterProps(options, RELATIVE_FORMAT_OPTIONS, defaults$$1);\n\n // Capture the current threshold values, then temporarily override them with\n // specific values just for this render.\n var oldThresholds = _extends({}, IntlRelativeFormat.thresholds);\n updateRelativeFormatThresholds(RELATIVE_FORMAT_THRESHOLDS);\n\n try {\n return state.getRelativeFormat(locale, filteredOptions).format(date, {\n now: isFinite(now) ? now : state.now()\n });\n } catch (e) {\n onError(createError('Error formatting relative time.', e));\n } finally {\n updateRelativeFormatThresholds(oldThresholds);\n }\n\n return String(date);\n}\n\nfunction formatNumber(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats;\n var format = options.format;\n\n\n var onError = config.onError || defaultErrorHandler;\n var defaults$$1 = format && getNamedFormat(formats, 'number', format, onError);\n var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults$$1);\n\n try {\n return state.getNumberFormat(locale, filteredOptions).format(value);\n } catch (e) {\n onError(createError('Error formatting number.', e));\n }\n\n return String(value);\n}\n\nfunction formatPlural(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale;\n\n\n var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);\n var onError = config.onError || defaultErrorHandler;\n\n try {\n return state.getPluralFormat(locale, filteredOptions).format(value);\n } catch (e) {\n onError(createError('Error formatting plural.', e));\n }\n\n return 'other';\n}\n\nfunction formatMessage(config, state) {\n var messageDescriptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats,\n messages = config.messages,\n defaultLocale = config.defaultLocale,\n defaultFormats = config.defaultFormats;\n var id = messageDescriptor.id,\n defaultMessage = messageDescriptor.defaultMessage;\n\n // Produce a better error if the user calls `intl.formatMessage(element)`\n\n if (process.env.NODE_ENV !== 'production') {\n invariant(!isValidElement(config), '[React Intl] Don\\'t pass React elements to ' + 'formatMessage(), pass `.props`.');\n }\n\n // `id` is a required field of a Message Descriptor.\n invariant(id, '[React Intl] An `id` must be provided to format a message.');\n\n var message = messages && messages[id];\n var hasValues = Object.keys(values).length > 0;\n\n // Avoid expensive message formatting for simple messages without values. In\n // development messages will always be formatted in case of missing values.\n if (!hasValues && process.env.NODE_ENV === 'production') {\n return message || defaultMessage || id;\n }\n\n var formattedMessage = void 0;\n var onError = config.onError || defaultErrorHandler;\n\n if (message) {\n try {\n var formatter = state.getMessageFormat(message, locale, formats);\n\n formattedMessage = formatter.format(values);\n } catch (e) {\n onError(createError('Error formatting message: \"' + id + '\" for locale: \"' + locale + '\"' + (defaultMessage ? ', using default message as fallback.' : ''), e));\n }\n } else {\n // This prevents warnings from littering the console in development\n // when no `messages` are passed into the for the\n // default locale, and a default message is in the source.\n if (!defaultMessage || locale && locale.toLowerCase() !== defaultLocale.toLowerCase()) {\n onError(createError('Missing message: \"' + id + '\" for locale: \"' + locale + '\"' + (defaultMessage ? ', using default message as fallback.' : '')));\n }\n }\n\n if (!formattedMessage && defaultMessage) {\n try {\n var _formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats);\n\n formattedMessage = _formatter.format(values);\n } catch (e) {\n onError(createError('Error formatting the default message for: \"' + id + '\"', e));\n }\n }\n\n if (!formattedMessage) {\n onError(createError('Cannot format message: \"' + id + '\", ' + ('using message ' + (message || defaultMessage ? 'source' : 'id') + ' as fallback.')));\n }\n\n return formattedMessage || message || defaultMessage || id;\n}\n\nfunction formatHTMLMessage(config, state, messageDescriptor) {\n var rawValues = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Process all the values before they are used when formatting the ICU\n // Message string. Since the formatted message might be injected via\n // `innerHTML`, all String-based values need to be HTML-escaped.\n var escapedValues = Object.keys(rawValues).reduce(function (escaped, name) {\n var value = rawValues[name];\n escaped[name] = typeof value === 'string' ? escape(value) : value;\n return escaped;\n }, {});\n\n return formatMessage(config, state, messageDescriptor, escapedValues);\n}\n\n\n\nvar format = Object.freeze({\n\tformatDate: formatDate,\n\tformatTime: formatTime,\n\tformatRelative: formatRelative,\n\tformatNumber: formatNumber,\n\tformatPlural: formatPlural,\n\tformatMessage: formatMessage,\n\tformatHTMLMessage: formatHTMLMessage\n});\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar intlConfigPropNames$1 = Object.keys(intlConfigPropTypes);\nvar intlFormatPropNames = Object.keys(intlFormatPropTypes);\n\n// These are not a static property on the `IntlProvider` class so the intl\n// config values can be inherited from an ancestor.\nvar defaultProps = {\n formats: {},\n messages: {},\n timeZone: null,\n textComponent: 'span',\n\n defaultLocale: 'en',\n defaultFormats: {},\n\n onError: defaultErrorHandler\n};\n\nvar IntlProvider = function (_Component) {\n inherits(IntlProvider, _Component);\n\n function IntlProvider(props) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n classCallCheck(this, IntlProvider);\n\n var _this = possibleConstructorReturn(this, (IntlProvider.__proto__ || Object.getPrototypeOf(IntlProvider)).call(this, props, context));\n\n invariant(typeof Intl !== 'undefined', '[React Intl] The `Intl` APIs must be available in the runtime, ' + 'and do not appear to be built-in. An `Intl` polyfill should be loaded.\\n' + 'See: http://formatjs.io/guides/runtime-environments/');\n\n var intlContext = context.intl;\n\n // Used to stabilize time when performing an initial rendering so that\n // all relative times use the same reference \"now\" time.\n\n var initialNow = void 0;\n if (isFinite(props.initialNow)) {\n initialNow = Number(props.initialNow);\n } else {\n // When an `initialNow` isn't provided via `props`, look to see an\n // exists in the ancestry and call its `now()`\n // function to propagate its value for \"now\".\n initialNow = intlContext ? intlContext.now() : Date.now();\n }\n\n // Creating `Intl*` formatters is expensive. If there's a parent\n // ``, then its formatters will be used. Otherwise, this\n // memoize the `Intl*` constructors and cache them for the lifecycle of\n // this IntlProvider instance.\n\n var _ref = intlContext || {},\n _ref$formatters = _ref.formatters,\n formatters = _ref$formatters === undefined ? {\n getDateTimeFormat: memoizeIntlConstructor(Intl.DateTimeFormat),\n getNumberFormat: memoizeIntlConstructor(Intl.NumberFormat),\n getMessageFormat: memoizeIntlConstructor(IntlMessageFormat),\n getRelativeFormat: memoizeIntlConstructor(IntlRelativeFormat),\n getPluralFormat: memoizeIntlConstructor(IntlPluralFormat)\n } : _ref$formatters;\n\n _this.state = _extends({}, formatters, {\n\n // Wrapper to provide stable \"now\" time for initial render.\n now: function now() {\n return _this._didDisplay ? Date.now() : initialNow;\n }\n });\n return _this;\n }\n\n createClass(IntlProvider, [{\n key: 'getConfig',\n value: function getConfig() {\n var intlContext = this.context.intl;\n\n // Build a whitelisted config object from `props`, defaults, and\n // `context.intl`, if an exists in the ancestry.\n\n var config = filterProps(this.props, intlConfigPropNames$1, intlContext);\n\n // Apply default props. This must be applied last after the props have\n // been resolved and inherited from any in the ancestry.\n // This matches how React resolves `defaultProps`.\n for (var propName in defaultProps) {\n if (config[propName] === undefined) {\n config[propName] = defaultProps[propName];\n }\n }\n\n if (!hasLocaleData(config.locale)) {\n var _config = config,\n locale = _config.locale,\n defaultLocale = _config.defaultLocale,\n defaultFormats = _config.defaultFormats,\n onError = _config.onError;\n\n\n onError(createError('Missing locale data for locale: \"' + locale + '\". ' + ('Using default locale: \"' + defaultLocale + '\" as fallback.')));\n\n // Since there's no registered locale data for `locale`, this will\n // fallback to the `defaultLocale` to make sure things can render.\n // The `messages` are overridden to the `defaultProps` empty object\n // to maintain referential equality across re-renders. It's assumed\n // each contains a `defaultMessage` prop.\n config = _extends({}, config, {\n locale: defaultLocale,\n formats: defaultFormats,\n messages: defaultProps.messages\n });\n }\n\n return config;\n }\n }, {\n key: 'getBoundFormatFns',\n value: function getBoundFormatFns(config, state) {\n return intlFormatPropNames.reduce(function (boundFormatFns, name) {\n boundFormatFns[name] = format[name].bind(null, config, state);\n return boundFormatFns;\n }, {});\n }\n }, {\n key: 'getChildContext',\n value: function getChildContext() {\n var config = this.getConfig();\n\n // Bind intl factories and current config to the format functions.\n var boundFormatFns = this.getBoundFormatFns(config, this.state);\n\n var _state = this.state,\n now = _state.now,\n formatters = objectWithoutProperties(_state, ['now']);\n\n\n return {\n intl: _extends({}, config, boundFormatFns, {\n formatters: formatters,\n now: now\n })\n };\n }\n }, {\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this._didDisplay = true;\n }\n }, {\n key: 'render',\n value: function render() {\n return Children.only(this.props.children);\n }\n }]);\n return IntlProvider;\n}(Component);\n\nIntlProvider.displayName = 'IntlProvider';\nIntlProvider.contextTypes = {\n intl: intlShape\n};\nIntlProvider.childContextTypes = {\n intl: intlShape.isRequired\n};\nprocess.env.NODE_ENV !== \"production\" ? IntlProvider.propTypes = _extends({}, intlConfigPropTypes, {\n children: PropTypes.element.isRequired,\n initialNow: PropTypes.any\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedDate = function (_Component) {\n inherits(FormattedDate, _Component);\n\n function FormattedDate(props, context) {\n classCallCheck(this, FormattedDate);\n\n var _this = possibleConstructorReturn(this, (FormattedDate.__proto__ || Object.getPrototypeOf(FormattedDate)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedDate, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatDate = _context$intl.formatDate,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n children = _props.children;\n\n\n var formattedDate = formatDate(value, this.props);\n\n if (typeof children === 'function') {\n return children(formattedDate);\n }\n\n return React.createElement(\n Text,\n null,\n formattedDate\n );\n }\n }]);\n return FormattedDate;\n}(Component);\n\nFormattedDate.displayName = 'FormattedDate';\nFormattedDate.contextTypes = {\n intl: intlShape\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedDate.propTypes = _extends({}, dateTimeFormatPropTypes, {\n value: PropTypes.any.isRequired,\n format: PropTypes.string,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedTime = function (_Component) {\n inherits(FormattedTime, _Component);\n\n function FormattedTime(props, context) {\n classCallCheck(this, FormattedTime);\n\n var _this = possibleConstructorReturn(this, (FormattedTime.__proto__ || Object.getPrototypeOf(FormattedTime)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedTime, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatTime = _context$intl.formatTime,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n children = _props.children;\n\n\n var formattedTime = formatTime(value, this.props);\n\n if (typeof children === 'function') {\n return children(formattedTime);\n }\n\n return React.createElement(\n Text,\n null,\n formattedTime\n );\n }\n }]);\n return FormattedTime;\n}(Component);\n\nFormattedTime.displayName = 'FormattedTime';\nFormattedTime.contextTypes = {\n intl: intlShape\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedTime.propTypes = _extends({}, dateTimeFormatPropTypes, {\n value: PropTypes.any.isRequired,\n format: PropTypes.string,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar SECOND = 1000;\nvar MINUTE = 1000 * 60;\nvar HOUR = 1000 * 60 * 60;\nvar DAY = 1000 * 60 * 60 * 24;\n\n// The maximum timer delay value is a 32-bit signed integer.\n// See: https://mdn.io/setTimeout\nvar MAX_TIMER_DELAY = 2147483647;\n\nfunction selectUnits(delta) {\n var absDelta = Math.abs(delta);\n\n if (absDelta < MINUTE) {\n return 'second';\n }\n\n if (absDelta < HOUR) {\n return 'minute';\n }\n\n if (absDelta < DAY) {\n return 'hour';\n }\n\n // The maximum scheduled delay will be measured in days since the maximum\n // timer delay is less than the number of milliseconds in 25 days.\n return 'day';\n}\n\nfunction getUnitDelay(units) {\n switch (units) {\n case 'second':\n return SECOND;\n case 'minute':\n return MINUTE;\n case 'hour':\n return HOUR;\n case 'day':\n return DAY;\n default:\n return MAX_TIMER_DELAY;\n }\n}\n\nfunction isSameDate(a, b) {\n if (a === b) {\n return true;\n }\n\n var aTime = new Date(a).getTime();\n var bTime = new Date(b).getTime();\n\n return isFinite(aTime) && isFinite(bTime) && aTime === bTime;\n}\n\nvar FormattedRelative = function (_Component) {\n inherits(FormattedRelative, _Component);\n\n function FormattedRelative(props, context) {\n classCallCheck(this, FormattedRelative);\n\n var _this = possibleConstructorReturn(this, (FormattedRelative.__proto__ || Object.getPrototypeOf(FormattedRelative)).call(this, props, context));\n\n invariantIntlContext(context);\n\n var now = isFinite(props.initialNow) ? Number(props.initialNow) : context.intl.now();\n\n // `now` is stored as state so that `render()` remains a function of\n // props + state, instead of accessing `Date.now()` inside `render()`.\n _this.state = { now: now };\n return _this;\n }\n\n createClass(FormattedRelative, [{\n key: 'scheduleNextUpdate',\n value: function scheduleNextUpdate(props, state) {\n var _this2 = this;\n\n // Cancel and pending update because we're scheduling a new update.\n clearTimeout(this._timer);\n\n var value = props.value,\n units = props.units,\n updateInterval = props.updateInterval;\n\n var time = new Date(value).getTime();\n\n // If the `updateInterval` is falsy, including `0` or we don't have a\n // valid date, then auto updates have been turned off, so we bail and\n // skip scheduling an update.\n if (!updateInterval || !isFinite(time)) {\n return;\n }\n\n var delta = time - state.now;\n var unitDelay = getUnitDelay(units || selectUnits(delta));\n var unitRemainder = Math.abs(delta % unitDelay);\n\n // We want the largest possible timer delay which will still display\n // accurate information while reducing unnecessary re-renders. The delay\n // should be until the next \"interesting\" moment, like a tick from\n // \"1 minute ago\" to \"2 minutes ago\" when the delta is 120,000ms.\n var delay = delta < 0 ? Math.max(updateInterval, unitDelay - unitRemainder) : Math.max(updateInterval, unitRemainder);\n\n this._timer = setTimeout(function () {\n _this2.setState({ now: _this2.context.intl.now() });\n }, delay);\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.scheduleNextUpdate(this.props, this.state);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(_ref) {\n var nextValue = _ref.value;\n\n // When the `props.value` date changes, `state.now` needs to be updated,\n // and the next update can be rescheduled.\n if (!isSameDate(nextValue, this.props.value)) {\n this.setState({ now: this.context.intl.now() });\n }\n }\n }, {\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'componentWillUpdate',\n value: function componentWillUpdate(nextProps, nextState) {\n this.scheduleNextUpdate(nextProps, nextState);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n clearTimeout(this._timer);\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatRelative = _context$intl.formatRelative,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n children = _props.children;\n\n\n var formattedRelative = formatRelative(value, _extends({}, this.props, this.state));\n\n if (typeof children === 'function') {\n return children(formattedRelative);\n }\n\n return React.createElement(\n Text,\n null,\n formattedRelative\n );\n }\n }]);\n return FormattedRelative;\n}(Component);\n\nFormattedRelative.displayName = 'FormattedRelative';\nFormattedRelative.contextTypes = {\n intl: intlShape\n};\nFormattedRelative.defaultProps = {\n updateInterval: 1000 * 10\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedRelative.propTypes = _extends({}, relativeFormatPropTypes, {\n value: PropTypes.any.isRequired,\n format: PropTypes.string,\n updateInterval: PropTypes.number,\n initialNow: PropTypes.any,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedNumber = function (_Component) {\n inherits(FormattedNumber, _Component);\n\n function FormattedNumber(props, context) {\n classCallCheck(this, FormattedNumber);\n\n var _this = possibleConstructorReturn(this, (FormattedNumber.__proto__ || Object.getPrototypeOf(FormattedNumber)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedNumber, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatNumber = _context$intl.formatNumber,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n children = _props.children;\n\n\n var formattedNumber = formatNumber(value, this.props);\n\n if (typeof children === 'function') {\n return children(formattedNumber);\n }\n\n return React.createElement(\n Text,\n null,\n formattedNumber\n );\n }\n }]);\n return FormattedNumber;\n}(Component);\n\nFormattedNumber.displayName = 'FormattedNumber';\nFormattedNumber.contextTypes = {\n intl: intlShape\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedNumber.propTypes = _extends({}, numberFormatPropTypes, {\n value: PropTypes.any.isRequired,\n format: PropTypes.string,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedPlural = function (_Component) {\n inherits(FormattedPlural, _Component);\n\n function FormattedPlural(props, context) {\n classCallCheck(this, FormattedPlural);\n\n var _this = possibleConstructorReturn(this, (FormattedPlural.__proto__ || Object.getPrototypeOf(FormattedPlural)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedPlural, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatPlural = _context$intl.formatPlural,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n other = _props.other,\n children = _props.children;\n\n\n var pluralCategory = formatPlural(value, this.props);\n var formattedPlural = this.props[pluralCategory] || other;\n\n if (typeof children === 'function') {\n return children(formattedPlural);\n }\n\n return React.createElement(\n Text,\n null,\n formattedPlural\n );\n }\n }]);\n return FormattedPlural;\n}(Component);\n\nFormattedPlural.displayName = 'FormattedPlural';\nFormattedPlural.contextTypes = {\n intl: intlShape\n};\nFormattedPlural.defaultProps = {\n style: 'cardinal'\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedPlural.propTypes = _extends({}, pluralFormatPropTypes, {\n value: PropTypes.any.isRequired,\n\n other: PropTypes.node.isRequired,\n zero: PropTypes.node,\n one: PropTypes.node,\n two: PropTypes.node,\n few: PropTypes.node,\n many: PropTypes.node,\n\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar defaultFormatMessage = function defaultFormatMessage(descriptor, values) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('[React Intl] Could not find required `intl` object. needs to exist in the component ancestry. Using default message as fallback.');\n }\n return formatMessage({}, { getMessageFormat: memoizeIntlConstructor(IntlMessageFormat) }, descriptor, values);\n};\n\nvar FormattedMessage = function (_Component) {\n inherits(FormattedMessage, _Component);\n\n function FormattedMessage(props, context) {\n classCallCheck(this, FormattedMessage);\n\n var _this = possibleConstructorReturn(this, (FormattedMessage.__proto__ || Object.getPrototypeOf(FormattedMessage)).call(this, props, context));\n\n if (!props.defaultMessage) {\n invariantIntlContext(context);\n }\n return _this;\n }\n\n createClass(FormattedMessage, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate(nextProps) {\n var values = this.props.values;\n var nextValues = nextProps.values;\n\n\n if (!shallowEquals(nextValues, values)) {\n return true;\n }\n\n // Since `values` has already been checked, we know they're not\n // different, so the current `values` are carried over so the shallow\n // equals comparison on the other props isn't affected by the `values`.\n var nextPropsToCheck = _extends({}, nextProps, {\n values: values\n });\n\n for (var _len = arguments.length, next = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n next[_key - 1] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this, nextPropsToCheck].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _ref = this.context.intl || {},\n _ref$formatMessage = _ref.formatMessage,\n formatMessage$$1 = _ref$formatMessage === undefined ? defaultFormatMessage : _ref$formatMessage,\n _ref$textComponent = _ref.textComponent,\n Text = _ref$textComponent === undefined ? 'span' : _ref$textComponent;\n\n var _props = this.props,\n id = _props.id,\n description = _props.description,\n defaultMessage = _props.defaultMessage,\n values = _props.values,\n _props$tagName = _props.tagName,\n Component$$1 = _props$tagName === undefined ? Text : _props$tagName,\n children = _props.children;\n\n\n var tokenDelimiter = void 0;\n var tokenizedValues = void 0;\n var elements = void 0;\n\n var hasValues = values && Object.keys(values).length > 0;\n if (hasValues) {\n // Creates a token with a random UID that should not be guessable or\n // conflict with other parts of the `message` string.\n var uid = Math.floor(Math.random() * 0x10000000000).toString(16);\n\n var generateToken = function () {\n var counter = 0;\n return function () {\n return 'ELEMENT-' + uid + '-' + (counter += 1);\n };\n }();\n\n // Splitting with a delimiter to support IE8. When using a regex\n // with a capture group IE8 does not include the capture group in\n // the resulting array.\n tokenDelimiter = '@__' + uid + '__@';\n tokenizedValues = {};\n elements = {};\n\n // Iterates over the `props` to keep track of any React Element\n // values so they can be represented by the `token` as a placeholder\n // when the `message` is formatted. This allows the formatted\n // message to then be broken-up into parts with references to the\n // React Elements inserted back in.\n Object.keys(values).forEach(function (name) {\n var value = values[name];\n\n if (isValidElement(value)) {\n var token = generateToken();\n tokenizedValues[name] = tokenDelimiter + token + tokenDelimiter;\n elements[token] = value;\n } else {\n tokenizedValues[name] = value;\n }\n });\n }\n\n var descriptor = { id: id, description: description, defaultMessage: defaultMessage };\n var formattedMessage = formatMessage$$1(descriptor, tokenizedValues || values);\n\n var nodes = void 0;\n\n var hasElements = elements && Object.keys(elements).length > 0;\n if (hasElements) {\n // Split the message into parts so the React Element values captured\n // above can be inserted back into the rendered message. This\n // approach allows messages to render with React Elements while\n // keeping React's virtual diffing working properly.\n nodes = formattedMessage.split(tokenDelimiter).filter(function (part) {\n return !!part;\n }).map(function (part) {\n return elements[part] || part;\n });\n } else {\n nodes = [formattedMessage];\n }\n\n if (typeof children === 'function') {\n return children.apply(undefined, toConsumableArray(nodes));\n }\n\n // Needs to use `createElement()` instead of JSX, otherwise React will\n // warn about a missing `key` prop with rich-text message formatting.\n return createElement.apply(undefined, [Component$$1, null].concat(toConsumableArray(nodes)));\n }\n }]);\n return FormattedMessage;\n}(Component);\n\nFormattedMessage.displayName = 'FormattedMessage';\nFormattedMessage.contextTypes = {\n intl: intlShape\n};\nFormattedMessage.defaultProps = {\n values: {}\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedMessage.propTypes = _extends({}, messageDescriptorPropTypes, {\n values: PropTypes.object,\n tagName: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedHTMLMessage = function (_Component) {\n inherits(FormattedHTMLMessage, _Component);\n\n function FormattedHTMLMessage(props, context) {\n classCallCheck(this, FormattedHTMLMessage);\n\n var _this = possibleConstructorReturn(this, (FormattedHTMLMessage.__proto__ || Object.getPrototypeOf(FormattedHTMLMessage)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedHTMLMessage, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate(nextProps) {\n var values = this.props.values;\n var nextValues = nextProps.values;\n\n\n if (!shallowEquals(nextValues, values)) {\n return true;\n }\n\n // Since `values` has already been checked, we know they're not\n // different, so the current `values` are carried over so the shallow\n // equals comparison on the other props isn't affected by the `values`.\n var nextPropsToCheck = _extends({}, nextProps, {\n values: values\n });\n\n for (var _len = arguments.length, next = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n next[_key - 1] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this, nextPropsToCheck].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatHTMLMessage = _context$intl.formatHTMLMessage,\n Text = _context$intl.textComponent;\n var _props = this.props,\n id = _props.id,\n description = _props.description,\n defaultMessage = _props.defaultMessage,\n rawValues = _props.values,\n _props$tagName = _props.tagName,\n Component$$1 = _props$tagName === undefined ? Text : _props$tagName,\n children = _props.children;\n\n\n var descriptor = { id: id, description: description, defaultMessage: defaultMessage };\n var formattedHTMLMessage = formatHTMLMessage(descriptor, rawValues);\n\n if (typeof children === 'function') {\n return children(formattedHTMLMessage);\n }\n\n // Since the message presumably has HTML in it, we need to set\n // `innerHTML` in order for it to be rendered and not escaped by React.\n // To be safe, all string prop values were escaped when formatting the\n // message. It is assumed that the message is not UGC, and came from the\n // developer making it more like a template.\n //\n // Note: There's a perf impact of using this component since there's no\n // way for React to do its virtual DOM diffing.\n var html = { __html: formattedHTMLMessage };\n return React.createElement(Component$$1, { dangerouslySetInnerHTML: html });\n }\n }]);\n return FormattedHTMLMessage;\n}(Component);\n\nFormattedHTMLMessage.displayName = 'FormattedHTMLMessage';\nFormattedHTMLMessage.contextTypes = {\n intl: intlShape\n};\nFormattedHTMLMessage.defaultProps = {\n values: {}\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedHTMLMessage.propTypes = _extends({}, messageDescriptorPropTypes, {\n values: PropTypes.object,\n tagName: PropTypes.string,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\naddLocaleData(defaultLocaleData);\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\naddLocaleData(allLocaleData);\n\nexport { addLocaleData, intlShape, injectIntl, defineMessages, IntlProvider, FormattedDate, FormattedTime, FormattedRelative, FormattedNumber, FormattedPlural, FormattedMessage, FormattedHTMLMessage };\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n return tag;\n}\n\nvar StyleSheet =\n/*#__PURE__*/\nfunction () {\n function StyleSheet(options) {\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n var _tag = createStyleElement(this);\n\n var before;\n\n if (this.tags.length === 0) {\n before = this.before;\n } else {\n before = this.tags[this.tags.length - 1].nextSibling;\n }\n\n this.container.insertBefore(_tag, before);\n this.tags.push(_tag);\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is a really hot path\n // we check the second character first because having \"i\"\n // as the second character will happen less often than\n // having \"@\" as the first character\n var isImportRule = rule.charCodeAt(1) === 105 && rule.charCodeAt(0) === 64; // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n\n sheet.insertRule(rule, // we need to insert @import rules before anything else\n // otherwise there will be an error\n // technically this means that the @import rules will\n // _usually_(not always since there could be multiple style tags)\n // be the first ones in prod and generally later in dev\n // this shouldn't really matter in the real world though\n // @import is generally only used for font faces from google fonts and etc.\n // so while this could be technically correct then it would be slower and larger\n // for a tiny bit of correctness that won't matter in the real world\n isImportRule ? 0 : sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","function stylis_min (W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n\n default:\n f += e.charAt(l);\n }\n\n g = 59;\n }\n\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n\n case 125:\n k--;\n break;\n\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n\n break;\n\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n\n }\n }\n\n l = u;\n }\n\n }\n\n break;\n\n case 91:\n g++;\n\n case 40:\n g++;\n\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {\n }\n\n }\n\n if (0 === k) break;\n l++;\n }\n\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n\n default:\n r = O;\n }\n\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n\n default:\n z++;\n y = e.charAt(l);\n\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n\n default:\n 32 !== g && (y = ' ');\n }\n break;\n\n case 0:\n y = '\\\\0';\n break;\n\n case 12:\n y = '\\\\f';\n break;\n\n case 11:\n y = '\\\\v';\n break;\n\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n case 8:\n 111 === K && (E = K);\n }\n break;\n\n case 58:\n 0 === n + b + m && (u = l);\n break;\n\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n\n case 91:\n 0 === n + b + v && m++;\n break;\n\n case 93:\n 0 === n + b + v && m--;\n break;\n\n case 41:\n 0 === n + b + m && v--;\n break;\n\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n\n default:\n q = 1;\n }\n v++;\n }\n\n break;\n\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n\n case 220:\n t = l, b = 42;\n }\n\n break;\n\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n\n 0 === b && (f += y);\n }\n\n K = x;\n x = g;\n l++;\n }\n\n t = p.length;\n\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n\n E = 0;\n }\n }\n\n return G + p + F;\n }\n\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e).trim();\n }\n\n break;\n\n default:\n var v = b = 0;\n\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e).trim();\n }\n }\n\n }\n\n return c;\n }\n\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n\n return d + c;\n }\n\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n\n if (0 === w || 2 === w && !L(a, 1)) return a;\n\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n\n case 969:\n case 942:\n return '-webkit-' + a + a;\n\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n\n case 220:\n b = a.replace(G, 'lr');\n break;\n\n default:\n return a;\n }\n\n return '-webkit-' + a + '-ms-' + b + a;\n\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n\n return a + ';';\n\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n\n return a;\n }\n\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n\n default:\n x = w;\n }\n }\n\n if (x !== c) return x;\n }\n\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n\n default:\n if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n } else Y = !!d | 0;\n }\n\n return T;\n }\n\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\n\nexport default stylis_min;\n","import { StyleSheet } from '@emotion/sheet';\nimport Stylis from '@emotion/stylis';\nimport '@emotion/weak-memoize';\n\n// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet\n// inlined to avoid umd wrapper and peerDep warnings/installing stylis\n// since we use stylis after closure compiler\nvar delimiter = '/*|*/';\nvar needle = delimiter + '}';\n\nfunction toSheet(block) {\n if (block) {\n Sheet.current.insert(block + '}');\n }\n}\n\nvar Sheet = {\n current: null\n};\nvar ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {\n switch (context) {\n // property\n case 1:\n {\n switch (content.charCodeAt(0)) {\n case 64:\n {\n // @import\n Sheet.current.insert(content + ';');\n return '';\n }\n // charcode for l\n\n case 108:\n {\n // charcode for b\n // this ignores label\n if (content.charCodeAt(2) === 98) {\n return '';\n }\n }\n }\n\n break;\n }\n // selector\n\n case 2:\n {\n if (ns === 0) return content + delimiter;\n break;\n }\n // at-rule\n\n case 3:\n {\n switch (ns) {\n // @font-face, @page\n case 102:\n case 112:\n {\n Sheet.current.insert(selectors[0] + content);\n return '';\n }\n\n default:\n {\n return content + (at === 0 ? delimiter : '');\n }\n }\n }\n\n case -2:\n {\n content.split(needle).forEach(toSheet);\n }\n }\n};\n\nvar createCache = function createCache(options) {\n if (options === undefined) options = {};\n var key = options.key || 'css';\n var stylisOptions;\n\n if (options.prefix !== undefined) {\n stylisOptions = {\n prefix: options.prefix\n };\n }\n\n var stylis = new Stylis(stylisOptions);\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var inserted = {}; // $FlowFixMe\n\n var container;\n\n {\n container = options.container || document.head;\n var nodes = document.querySelectorAll(\"style[data-emotion-\" + key + \"]\");\n Array.prototype.forEach.call(nodes, function (node) {\n var attrib = node.getAttribute(\"data-emotion-\" + key); // $FlowFixMe\n\n attrib.split(' ').forEach(function (id) {\n inserted[id] = true;\n });\n\n if (node.parentNode !== container) {\n container.appendChild(node);\n }\n });\n }\n\n var _insert;\n\n {\n stylis.use(options.stylisPlugins)(ruleSheet);\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n var name = serialized.name;\n Sheet.current = sheet;\n\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n var map = serialized.map;\n Sheet.current = {\n insert: function insert(rule) {\n sheet.insert(rule + map);\n }\n };\n }\n\n stylis(selector, serialized.styles);\n\n if (shouldCache) {\n cache.inserted[name] = true;\n }\n };\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a\n var commentStart = /\\/\\*/g;\n var commentEnd = /\\*\\//g;\n stylis.use(function (context, content) {\n switch (context) {\n case -1:\n {\n while (commentStart.test(content)) {\n commentEnd.lastIndex = commentStart.lastIndex;\n\n if (commentEnd.test(content)) {\n commentStart.lastIndex = commentEnd.lastIndex;\n continue;\n }\n\n throw new Error('Your styles have an unterminated comment (\"/*\" without corresponding \"*/\").');\n }\n\n commentStart.lastIndex = 0;\n break;\n }\n }\n });\n stylis.use(function (context, content, selectors) {\n switch (context) {\n case -1:\n {\n var flag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n var unsafePseudoClasses = content.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses && cache.compat !== true) {\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n var ignoreRegExp = new RegExp(unsafePseudoClass + \".*\\\\/\\\\* \" + flag + \" \\\\*\\\\/\");\n var ignore = ignoreRegExp.test(content);\n\n if (unsafePseudoClass && !ignore) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n }\n });\n }\n\n break;\n }\n }\n });\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n return cache;\n};\n\nexport default createCache;\n","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className]);\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n var maybeStyles = cache.insert(\".\" + className, current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport default murmur2;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(attr|calc|counters?|url)\\(/;\n var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n console.error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n var processed = oldProcessStyleValue(key, value);\n\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n\n return processed;\n };\n}\n\nvar shouldWarnAboutInterpolatingClassNameFromCss = true;\n\nfunction handleInterpolation(mergedProps, registered, interpolation, couldBeSelectorInterpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result, couldBeSelectorInterpolation);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n break;\n }\n\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n\n if (process.env.NODE_ENV !== 'production' && couldBeSelectorInterpolation && shouldWarnAboutInterpolatingClassNameFromCss && cached !== undefined) {\n console.error('Interpolating a className from css`` is not recommended and will cause problems with composition.\\n' + 'Interpolating a className from css`` will be completely unsupported in a future major version of Emotion');\n shouldWarnAboutInterpolatingClassNameFromCss = false;\n }\n\n return cached !== undefined && !couldBeSelectorInterpolation ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i], false);\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value, false);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*;/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings, false);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i], styles.charCodeAt(styles.length - 1) === 46);\n\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import '@babel/runtime/helpers/inheritsLoose';\nimport { createContext, forwardRef, createElement, Fragment } from 'react';\nimport createCache from '@emotion/cache';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar EmotionCacheContext = /*#__PURE__*/createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? createCache() : null);\nvar ThemeContext = /*#__PURE__*/createContext({});\nvar CacheProvider = EmotionCacheContext.Provider;\n\nvar withEmotionCache = function withEmotionCache(func) {\n var render = function render(props, ref) {\n return /*#__PURE__*/createElement(EmotionCacheContext.Consumer, null, function (cache) {\n return func(props, cache, ref);\n });\n }; // $FlowFixMe\n\n\n return /*#__PURE__*/forwardRef(render);\n};\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions\n\n if (process.env.NODE_ENV !== 'production') {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\n\nvar Noop = function Noop() {\n return null;\n};\n\nvar render = function render(cache, props, theme, ref) {\n var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles);\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = insertStyles(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/createElement(type, newProps);\n var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n}; // eslint-disable-next-line no-undef\n\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n if (typeof props.css === 'function') {\n return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {\n return render(cache, props, theme, ref);\n });\n }\n\n return render(cache, props, null, ref);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, createEmotionProps as c, hasOwnProperty as h, withEmotionCache as w };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport default murmur2;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(attr|calc|counters?|url)\\(/;\n var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n console.error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n var processed = oldProcessStyleValue(key, value);\n\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n\n return processed;\n };\n}\n\nvar shouldWarnAboutInterpolatingClassNameFromCss = true;\n\nfunction handleInterpolation(mergedProps, registered, interpolation, couldBeSelectorInterpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result, couldBeSelectorInterpolation);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n break;\n }\n\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n\n if (process.env.NODE_ENV !== 'production' && couldBeSelectorInterpolation && shouldWarnAboutInterpolatingClassNameFromCss && cached !== undefined) {\n console.error('Interpolating a className from css`` is not recommended and will cause problems with composition.\\n' + 'Interpolating a className from css`` will be completely unsupported in a future major version of Emotion');\n shouldWarnAboutInterpolatingClassNameFromCss = false;\n }\n\n return cached !== undefined && !couldBeSelectorInterpolation ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i], false);\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value, false);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*;/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings, false);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i], styles.charCodeAt(styles.length - 1) === 46);\n\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import { serializeStyles } from '@emotion/serialize';\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nexport default css;\n","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport { createElement, Component, Fragment } from 'react';\nimport '@emotion/cache';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext } from './emotion-element-04d85134.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, w as withEmotionCache } from './emotion-element-04d85134.browser.esm.js';\nimport { insertStyles, getRegisteredStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { StyleSheet } from '@emotion/sheet';\nimport css from '@emotion/css';\nexport { default as css } from '@emotion/css';\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwnProperty.call(props, 'css')) {\n // $FlowFixMe\n return createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false;\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n\n if (typeof styles === 'function') {\n return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {\n var serialized = serializeStyles([styles(theme)]);\n return /*#__PURE__*/createElement(InnerGlobal, {\n serialized: serialized,\n cache: cache\n });\n });\n }\n\n var serialized = serializeStyles([styles]);\n return /*#__PURE__*/createElement(InnerGlobal, {\n serialized: serialized,\n cache: cache\n });\n});\n\n// maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\nvar InnerGlobal = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(InnerGlobal, _React$Component);\n\n function InnerGlobal(props, context, updater) {\n return _React$Component.call(this, props, context, updater) || this;\n }\n\n var _proto = InnerGlobal.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.sheet = new StyleSheet({\n key: this.props.cache.key + \"-global\",\n nonce: this.props.cache.sheet.nonce,\n container: this.props.cache.sheet.container\n }); // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion-\" + this.props.cache.key + \"=\\\"\" + this.props.serialized.name + \"\\\"]\");\n\n if (node !== null) {\n this.sheet.tags.push(node);\n }\n\n if (this.props.cache.sheet.tags.length) {\n this.sheet.before = this.props.cache.sheet.tags[0];\n }\n\n this.insertStyles();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (prevProps.serialized.name !== this.props.serialized.name) {\n this.insertStyles();\n }\n };\n\n _proto.insertStyles = function insertStyles$1() {\n if (this.props.serialized.next !== undefined) {\n // insert keyframes\n insertStyles(this.props.cache, this.props.serialized.next, true);\n }\n\n if (this.sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling;\n this.sheet.before = element;\n this.sheet.flush();\n }\n\n this.props.cache.insert(\"\", this.props.serialized, this.sheet, false);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.sheet.flush();\n };\n\n _proto.render = function render() {\n\n return null;\n };\n\n return InnerGlobal;\n}(Component);\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Noop = function Noop() {\n return null;\n};\n\nvar ClassNames = withEmotionCache(function (props, context) {\n return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {\n var hasRendered = false;\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, context.registered);\n\n {\n insertStyles(context, serialized, false);\n }\n\n return context.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(context.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: theme\n };\n var ele = props.children(content);\n hasRendered = true;\n var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n });\n});\n\nexport { ClassNames, Global, jsx as createElement, jsx, keyframes };\n","// ideally this would be fetched from ../constants but that causes a\n// circular dep loop. This will be refactored as part of a breaking\n// change in the future.\nconst DEFAULT_THEME_MODE = 'light';\nconst THEME_MODES = ['light', 'dark']; // Resolves the different types of theme objects in the current API\n\nexport default function getTheme(props) {\n if (props && props.theme) {\n // Theme is the global Atlaskit theme\n if ('__ATLASKIT_THEME__' in props.theme) {\n return props.theme.__ATLASKIT_THEME__;\n } // User has provided alternative modes\n else if ('mode' in props.theme && THEME_MODES.includes(props.theme.mode)) {\n return props.theme;\n }\n } // If format not supported (or no theme provided), return standard theme\n\n\n return {\n mode: DEFAULT_THEME_MODE\n };\n}","/* eslint-disable prefer-rest-params */\nimport getTheme from './getTheme';\n\n// Unpack custom variants, and get correct value for the current theme\nfunction themedVariants(variantProp, variants) {\n return props => {\n const theme = getTheme(props);\n\n if (props && props[variantProp] && variants) {\n const modes = variants[props[variantProp]];\n\n if (modes && modes[theme.mode]) {\n const value = modes[theme.mode];\n\n if (value) {\n return value;\n } // TS believes value can be undefined\n\n }\n }\n\n return '';\n };\n}\n\nexport default function themed(modesOrVariant, variantModes) {\n if (typeof modesOrVariant === 'string') {\n return themedVariants(modesOrVariant, variantModes);\n }\n\n const modes = modesOrVariant;\n return props => {\n // Get theme from the user's props\n const theme = getTheme(props); // User isn't required to provide both light and dark values\n\n if (theme.mode in modes) {\n const value = modes[theme.mode]; // TS believes value can be undefined\n\n if (value) {\n return value;\n }\n }\n\n return '';\n };\n}","import themed from './utils/themed'; // Reds\n\nexport const R50 = '#FFEBE6';\nexport const R75 = '#FFBDAD';\nexport const R100 = '#FF8F73';\nexport const R200 = '#FF7452';\nexport const R300 = '#FF5630';\nexport const R400 = '#DE350B';\nexport const R500 = '#BF2600'; // Yellows\n\nexport const Y50 = '#FFFAE6';\nexport const Y75 = '#FFF0B3';\nexport const Y100 = '#FFE380';\nexport const Y200 = '#FFC400';\nexport const Y300 = '#FFAB00';\nexport const Y400 = '#FF991F';\nexport const Y500 = '#FF8B00'; // Greens\n\nexport const G50 = '#E3FCEF';\nexport const G75 = '#ABF5D1';\nexport const G100 = '#79F2C0';\nexport const G200 = '#57D9A3';\nexport const G300 = '#36B37E';\nexport const G400 = '#00875A';\nexport const G500 = '#006644'; // Blues\n\nexport const B50 = '#DEEBFF';\nexport const B75 = '#B3D4FF';\nexport const B100 = '#4C9AFF';\nexport const B200 = '#2684FF';\nexport const B300 = '#0065FF';\nexport const B400 = '#0052CC';\nexport const B500 = '#0747A6'; // Purples\n\nexport const P50 = '#EAE6FF';\nexport const P75 = '#C0B6F2';\nexport const P100 = '#998DD9';\nexport const P200 = '#8777D9';\nexport const P300 = '#6554C0';\nexport const P400 = '#5243AA';\nexport const P500 = '#403294'; // Teals\n\nexport const T50 = '#E6FCFF';\nexport const T75 = '#B3F5FF';\nexport const T100 = '#79E2F2';\nexport const T200 = '#00C7E6';\nexport const T300 = '#00B8D9';\nexport const T400 = '#00A3BF';\nexport const T500 = '#008DA6'; // Neutrals\n\nexport const N0 = '#FFFFFF';\nexport const N10 = '#FAFBFC';\nexport const N20 = '#F4F5F7';\nexport const N30 = '#EBECF0';\nexport const N40 = '#DFE1E6';\nexport const N50 = '#C1C7D0';\nexport const N60 = '#B3BAC5';\nexport const N70 = '#A5ADBA';\nexport const N80 = '#97A0AF';\nexport const N90 = '#8993A4';\nexport const N100 = '#7A869A';\nexport const N200 = '#6B778C';\nexport const N300 = '#5E6C84';\nexport const N400 = '#505F79';\nexport const N500 = '#42526E';\nexport const N600 = '#344563';\nexport const N700 = '#253858';\nexport const N800 = '#172B4D'; // ATTENTION: update the tints if you update this\n\nexport const N900 = '#091E42'; // Each tint is made of N900 and an alpha channel\n\nexport const N10A = 'rgba(9, 30, 66, 0.02)';\nexport const N20A = 'rgba(9, 30, 66, 0.04)';\nexport const N30A = 'rgba(9, 30, 66, 0.08)';\nexport const N40A = 'rgba(9, 30, 66, 0.13)';\nexport const N50A = 'rgba(9, 30, 66, 0.25)';\nexport const N60A = 'rgba(9, 30, 66, 0.31)';\nexport const N70A = 'rgba(9, 30, 66, 0.36)';\nexport const N80A = 'rgba(9, 30, 66, 0.42)';\nexport const N90A = 'rgba(9, 30, 66, 0.48)';\nexport const N100A = 'rgba(9, 30, 66, 0.54)';\nexport const N200A = 'rgba(9, 30, 66, 0.60)';\nexport const N300A = 'rgba(9, 30, 66, 0.66)';\nexport const N400A = 'rgba(9, 30, 66, 0.71)';\nexport const N500A = 'rgba(9, 30, 66, 0.77)';\nexport const N600A = 'rgba(9, 30, 66, 0.82)';\nexport const N700A = 'rgba(9, 30, 66, 0.89)';\nexport const N800A = 'rgba(9, 30, 66, 0.95)'; // Dark Mode Neutrals\n\nexport const DN900 = '#E6EDFA';\nexport const DN800 = '#DCE5F5';\nexport const DN700 = '#CED9EB';\nexport const DN600 = '#B8C7E0';\nexport const DN500 = '#ABBBD6';\nexport const DN400 = '#9FB0CC';\nexport const DN300 = '#8C9CB8';\nexport const DN200 = '#7988A3';\nexport const DN100 = '#67758F';\nexport const DN90 = '#56637A';\nexport const DN80 = '#455166';\nexport const DN70 = '#3B475C';\nexport const DN60 = '#313D52';\nexport const DN50 = '#283447';\nexport const DN40 = '#202B3D';\nexport const DN30 = '#1B2638';\nexport const DN20 = '#121A29';\nexport const DN10 = '#0E1624'; // ATTENTION: update the tints if you update this\n\nexport const DN0 = '#0D1424'; // Each dark tint is made of DN0 and an alpha channel\n\nexport const DN800A = 'rgba(13, 20, 36, 0.06)';\nexport const DN700A = 'rgba(13, 20, 36, 0.14)';\nexport const DN600A = 'rgba(13, 20, 36, 0.18)';\nexport const DN500A = 'rgba(13, 20, 36, 0.29)';\nexport const DN400A = 'rgba(13, 20, 36, 0.36)';\nexport const DN300A = 'rgba(13, 20, 36, 0.40)';\nexport const DN200A = 'rgba(13, 20, 36, 0.47)';\nexport const DN100A = 'rgba(13, 20, 36, 0.53)';\nexport const DN90A = 'rgba(13, 20, 36, 0.63)';\nexport const DN80A = 'rgba(13, 20, 36, 0.73)';\nexport const DN70A = 'rgba(13, 20, 36, 0.78)';\nexport const DN60A = 'rgba(13, 20, 36, 0.81)';\nexport const DN50A = 'rgba(13, 20, 36, 0.85)';\nexport const DN40A = 'rgba(13, 20, 36, 0.89)';\nexport const DN30A = 'rgba(13, 20, 36, 0.92)';\nexport const DN20A = 'rgba(13, 20, 36, 0.95)';\nexport const DN10A = 'rgba(13, 20, 36, 0.97)'; // Themed colors\n\nexport const background = themed({\n light: N0,\n dark: DN30\n});\nexport const backgroundActive = themed({\n light: B50,\n dark: B75\n});\nexport const backgroundHover = themed({\n light: N30,\n dark: DN70\n});\nexport const backgroundOnLayer = themed({\n light: N0,\n dark: DN50\n});\nexport const text = themed({\n light: N900,\n dark: DN600\n});\nexport const textHover = themed({\n light: N800,\n dark: DN600\n});\nexport const textActive = themed({\n light: B400,\n dark: B400\n});\nexport const subtleText = themed({\n light: N200,\n dark: DN300\n});\nexport const placeholderText = themed({\n light: N100,\n dark: DN200\n});\nexport const heading = themed({\n light: N800,\n dark: DN600\n});\nexport const subtleHeading = themed({\n light: N200,\n dark: DN300\n});\nexport const codeBlock = themed({\n light: N20,\n dark: DN50\n});\nexport const link = themed({\n light: B400,\n dark: B100\n});\nexport const linkHover = themed({\n light: B300,\n dark: B200\n});\nexport const linkActive = themed({\n light: B500,\n dark: B100\n});\nexport const linkOutline = themed({\n light: B100,\n dark: B200\n});\nexport const primary = themed({\n light: B400,\n dark: B100\n});\nexport const blue = themed({\n light: B400,\n dark: B100\n});\nexport const teal = themed({\n light: T300,\n dark: T200\n});\nexport const purple = themed({\n light: P300,\n dark: P100\n});\nexport const red = themed({\n light: R300,\n dark: R300\n});\nexport const yellow = themed({\n light: Y300,\n dark: Y300\n});\nexport const green = themed({\n light: G300,\n dark: G300\n});\nexport const skeleton = () => N20A;","import { createTheme } from '../utils/createTheme';\n// Create default global light theme\nconst {\n Provider,\n Consumer,\n useTheme\n} = createTheme(() => ({\n mode: 'light'\n}));\nexport const useGlobalTheme = () => {\n return useTheme();\n};\nexport default {\n Provider,\n Consumer\n};","import React, { createContext, useContext, useCallback } from 'react';\n\n/**\n * createTheme is used to create a set of Providers and Consumers for theming components.\n * - Takes a default theme function; this theme function gets a set of props, and returns tokens\n * based on those props. An example of this default theme function is one that produces the standard\n * appearance of the component\n * - Returns three things - a Provider that allow for additional themes to be applied, a Consumer\n * that can get the current theme and fetch it, and a custom hook - useTheme which provides an alternate (although functionally the same) API\n * to the Consumer.\n **/\nexport function createTheme(defaultGetTokens) {\n const emptyThemeFn = (getTokens, props) => getTokens(props);\n /**\n * Internally, Theme uses React Context, with internal providers and consumers.\n * The React Context passes only a function that gets props, and turns them into tokens. This\n * function gets mixed as more Providers with their own themes are added. This mixed function\n * is ultimately picked up by Consumers, which implement a context consumer internally to fetch\n * the theme.\n **/\n\n\n const ThemeContext = /*#__PURE__*/createContext(defaultGetTokens);\n\n function useTheme(themeProps) {\n const theme = useContext(ThemeContext);\n const themeFn = theme || emptyThemeFn;\n const tokens = themeFn(themeProps);\n return tokens;\n } // The Theme Consumer takes a function as its child - this function takes tokens, and the\n // return value is generally a set of nodes with the tokens applied appropriately.\n\n\n function Consumer(props) {\n const {\n children,\n ...themeProps\n } = props; // @ts-ignore See issue for more info: https://github.com/Microsoft/TypeScript/issues/10727\n // Argument of type 'Pick ReactNode; }, Exclude>' is not assignable to parameter of type 'ThemeProps'.ts(2345)\n\n const tokens = useTheme(themeProps); // We add a fragment to ensure we don't break people upgrading.\n // Previously they may have been able to pass in undefined without things blowing up.\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, children(tokens));\n }\n /**\n * The Theme Provider takes regular nodes as its children, but also takes a *theme function*\n * - The theme function takes a set of props, as well as a function (getTokens) that can turn props into tokens.\n * - The getTokens function isn't called immediately - instead the props are passed\n * through a mix of parent theming functions\n * Children of this provider will receive this mixed theme\n */\n\n\n function Provider(props) {\n const themeFn = useContext(ThemeContext);\n const valueFn = props.value || emptyThemeFn;\n const mixedFn = useCallback(themeProps => valueFn(themeFn, themeProps), [themeFn, valueFn]);\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: mixedFn\n }, props.children);\n }\n\n return {\n Consumer,\n Provider,\n useTheme\n };\n}","/** @jsx jsx */\nimport React from 'react';\nimport { css, jsx, keyframes } from '@emotion/core';\nimport { DN500, DN900, N0, N500 } from '@atlaskit/theme/colors';\nimport GlobalTheme from '@atlaskit/theme/components';\nimport { presetSizes } from './constants';\nconst rotate = keyframes`\n to { transform: rotate(360deg); }\n`; // There are three parts to the load in animation:\n// 1. Fade in\n// 2. Accelerated spin\n// 3. Stretch the spinner line\n\nconst loadIn = keyframes`\n from {\n transform: rotate(50deg);\n opacity: 0;\n stroke-dashoffset: 60;\n }\n to {\n transform: rotate(230deg);\n opacity: 1;\n stroke-dashoffset: 50;\n }\n`;\n\nfunction getStrokeColor({\n mode,\n appearance\n}) {\n if (mode === 'light') {\n return appearance === 'inherit' ? N500 : N0;\n } // Dark mode: colours provided by Jake Miller\n\n\n return appearance === 'inherit' ? DN900 : DN500;\n}\n\nexport default /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function Spinner({\n testId,\n appearance = 'inherit',\n delay = 0,\n size: providedSize = 'medium'\n}, ref) {\n const size = typeof providedSize === 'number' ? providedSize : presetSizes[providedSize];\n return jsx(GlobalTheme.Consumer, null, tokens => {\n const strokeColor = getStrokeColor({\n mode: tokens.mode,\n appearance\n }); // The Spinner animation uses a combination of two\n // css animations on two separate elements.\n\n return jsx(\"span\", {\n /* This span exists to off-load animations from the circle element,\n which were causing performance issues (style recalculations) on Safari and older versions of Chrome.\n This can be removed and styles placed back on the circle element once Safari fixes this bug and off-loads rendering to the GPU from the CPU.\n */\n css: css`\n transform-origin: center;\n animation: ${rotate} 0.86s infinite;\n animation-delay: ${delay}ms;\n animation-timing-function: cubic-bezier(0.4, 0.15, 0.6, 0.85);\n height: ${size}px;\n width: ${size}px;\n display: inline-block;\n /* align better inline with text */\n vertical-align: middle;\n `\n }, jsx(\"svg\", {\n height: size,\n width: size,\n viewBox: \"0 0 16 16\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"data-testid\": testId,\n ref: ref,\n css: css`\n /* We are going to animate this in */\n opacity: 0;\n\n animation: ${loadIn} 1s ease-in-out;\n /* When the animation completes, stay at the last frame of the animation */\n animation-fill-mode: forwards;\n animation-delay: ${delay}ms;\n fill: none;\n stroke: ${strokeColor};\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-dasharray: 60;\n stroke-dashoffset: inherit;\n @media screen and (-ms-high-contrast: white-on-black) {\n filter: grayscale(100%);\n stroke: ${N0};\n }\n @media screen and (-ms-high-contrast: black-on-white) {\n filter: grayscale(100%);\n stroke: #000000;\n }\n `\n }, jsx(\"circle\", {\n cx: \"8\",\n cy: \"8\",\n r: \"7\"\n })));\n });\n}));","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import { createContext } from 'react';\nconst AnalyticsNextContext = createContext({\n getAtlaskitAnalyticsContext: () => [],\n getAtlaskitAnalyticsEventHandlers: () => [],\n});\nexport default AnalyticsNextContext;\n//# sourceMappingURL=context.js.map","import AnalyticsNextContext from './context';\nexport default AnalyticsNextContext;\n//# sourceMappingURL=index.js.map","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';\nconst ContextTypes = {\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n getAtlaskitAnalyticsContext: PropTypes.func\n};\n\nconst noop = () => []; // eslint-disable-next-line @repo/internal/react/no-class-components\n\n\nclass AnalyticsListener extends Component {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"getChildContext\", () => ({\n getAtlaskitAnalyticsEventHandlers: this.getAnalyticsEventHandlers,\n getAtlaskitAnalyticsContext: this.getAtlaskitAnalyticsContext\n }));\n\n _defineProperty(this, \"getAnalyticsEventHandlers\", () => {\n const {\n channel,\n onEvent\n } = this.props;\n const {\n getAtlaskitAnalyticsEventHandlers = noop\n } = this.context;\n\n const handler = (event, eventChannel) => {\n if (channel === '*' || channel === eventChannel) {\n onEvent(event, eventChannel);\n }\n };\n\n return [handler, ...getAtlaskitAnalyticsEventHandlers()];\n });\n\n _defineProperty(this, \"getAtlaskitAnalyticsContext\", () => {\n const {\n getAtlaskitAnalyticsContext = noop\n } = this.context;\n return getAtlaskitAnalyticsContext();\n });\n\n this.contextValue = {\n getAtlaskitAnalyticsContext: this.getAtlaskitAnalyticsContext,\n getAtlaskitAnalyticsEventHandlers: this.getAnalyticsEventHandlers\n };\n }\n\n render() {\n const {\n children\n } = this.props;\n return /*#__PURE__*/React.createElement(AnalyticsReactContext.Provider, {\n value: this.contextValue\n }, children);\n }\n\n}\n\n_defineProperty(AnalyticsListener, \"contextTypes\", ContextTypes);\n\n_defineProperty(AnalyticsListener, \"childContextTypes\", ContextTypes);\n\nexport default AnalyticsListener;","import LegacyAnalyticsListener from './LegacyAnalyticsListener';\nimport ModernAnalyticsListener from './ModernAnalyticsListener';\nlet ExportedAnalyticsListener;\n\nif (typeof process !== 'undefined' && process.env['ANALYTICS_NEXT_MODERN_CONTEXT']) {\n ExportedAnalyticsListener = ModernAnalyticsListener;\n} else {\n ExportedAnalyticsListener = LegacyAnalyticsListener;\n}\n\nexport default ExportedAnalyticsListener;","// Current version.\nexport var VERSION = '1.13.3';\n\n// Establish the root object, `window` (`self`) in the browser, `global`\n// on the server, or `this` in some virtual machines. We use `self`\n// instead of `window` for `WebWorker` support.\nexport var root = (typeof self == 'object' && self.self === self && self) ||\n (typeof global == 'object' && global.global === global && global) ||\n Function('return this')() ||\n {};\n\n// Save bytes in the minified (but not gzipped) version:\nexport var ArrayProto = Array.prototype, ObjProto = Object.prototype;\nexport var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n// Create quick reference variables for speed access to core prototypes.\nexport var push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n// Modern feature detection.\nexport var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',\n supportsDataView = typeof DataView !== 'undefined';\n\n// All **ECMAScript 5+** native function implementations that we hope to use\n// are declared here.\nexport var nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create,\n nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;\n\n// Create references to these builtin functions because we override them.\nexport var _isNaN = isNaN,\n _isFinite = isFinite;\n\n// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\nexport var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\nexport var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n// The largest integer that can be represented exactly.\nexport var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n","// Some functions take a variable number of arguments, or a few expected\n// arguments at the beginning and then a variable number of values to operate\n// on. This helper accumulates all remaining arguments past the function’s\n// argument length (or an explicit `startIndex`), into an array that becomes\n// the last argument. Similar to ES6’s \"rest parameter\".\nexport default function restArguments(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n}\n","// Is a given variable an object?\nexport default function isObject(obj) {\n var type = typeof obj;\n return type === 'function' || (type === 'object' && !!obj);\n}\n","// Is a given value equal to null?\nexport default function isNull(obj) {\n return obj === null;\n}\n","// Is a given variable undefined?\nexport default function isUndefined(obj) {\n return obj === void 0;\n}\n","import { toString } from './_setup.js';\n\n// Is a given value a boolean?\nexport default function isBoolean(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n}\n","// Is a given value a DOM element?\nexport default function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n}\n","import { toString } from './_setup.js';\n\n// Internal function for creating a `toString`-based type tester.\nexport default function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n}\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('String');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Number');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Date');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('RegExp');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Error');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Symbol');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('ArrayBuffer');\n","import tagTester from './_tagTester.js';\nimport { root } from './_setup.js';\n\nvar isFunction = tagTester('Function');\n\n// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old\n// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\nvar nodelist = root.document && root.document.childNodes;\nif (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n}\n\nexport default isFunction;\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n","import { supportsDataView } from './_setup.js';\nimport hasObjectTag from './_hasObjectTag.js';\n\n// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.\n// In IE 11, the most common among them, this problem also applies to\n// `Map`, `WeakMap` and `Set`.\nexport var hasStringTagBug = (\n supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))\n ),\n isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));\n","import tagTester from './_tagTester.js';\nimport isFunction from './isFunction.js';\nimport isArrayBuffer from './isArrayBuffer.js';\nimport { hasStringTagBug } from './_stringTagBug.js';\n\nvar isDataView = tagTester('DataView');\n\n// In IE 10 - Edge 13, we need a different heuristic\n// to determine whether an object is a `DataView`.\nfunction ie10IsDataView(obj) {\n return obj != null && isFunction(obj.getInt8) && isArrayBuffer(obj.buffer);\n}\n\nexport default (hasStringTagBug ? ie10IsDataView : isDataView);\n","import { nativeIsArray } from './_setup.js';\nimport tagTester from './_tagTester.js';\n\n// Is a given value an array?\n// Delegates to ECMA5's native `Array.isArray`.\nexport default nativeIsArray || tagTester('Array');\n","import { hasOwnProperty } from './_setup.js';\n\n// Internal function to check whether `key` is an own property name of `obj`.\nexport default function has(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n}\n","import tagTester from './_tagTester.js';\nimport has from './_has.js';\n\nvar isArguments = tagTester('Arguments');\n\n// Define a fallback version of the method in browsers (ahem, IE < 9), where\n// there isn't any inspectable \"Arguments\" type.\n(function() {\n if (!isArguments(arguments)) {\n isArguments = function(obj) {\n return has(obj, 'callee');\n };\n }\n}());\n\nexport default isArguments;\n","import { _isFinite } from './_setup.js';\nimport isSymbol from './isSymbol.js';\n\n// Is a given object a finite number?\nexport default function isFinite(obj) {\n return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));\n}\n","import { _isNaN } from './_setup.js';\nimport isNumber from './isNumber.js';\n\n// Is the given value `NaN`?\nexport default function isNaN(obj) {\n return isNumber(obj) && _isNaN(obj);\n}\n","// Predicate-generating function. Often useful outside of Underscore.\nexport default function constant(value) {\n return function() {\n return value;\n };\n}\n","import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n","// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `byteLength` property of an object.\nexport default shallowProperty('byteLength');\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getByteLength from './_getByteLength.js';\n\n// Internal helper to determine whether we should spend extensive checks against\n// `ArrayBuffer` et al.\nexport default createSizePropertyCheck(getByteLength);\n","import { supportsArrayBuffer, nativeIsView, toString } from './_setup.js';\nimport isDataView from './isDataView.js';\nimport constant from './constant.js';\nimport isBufferLike from './_isBufferLike.js';\n\n// Is a given value a typed array?\nvar typedArrayPattern = /\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;\nfunction isTypedArray(obj) {\n // `ArrayBuffer.isView` is the most future-proof, so use it when available.\n // Otherwise, fall back on the above regular expression.\n return nativeIsView ? (nativeIsView(obj) && !isDataView(obj)) :\n isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));\n}\n\nexport default supportsArrayBuffer ? isTypedArray : constant(false);\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `length` property of an object.\nexport default shallowProperty('length');\n","import { nonEnumerableProps, ObjProto } from './_setup.js';\nimport isFunction from './isFunction.js';\nimport has from './_has.js';\n\n// Internal helper to create a simple lookup structure.\n// `collectNonEnumProps` used to depend on `_.contains`, but this led to\n// circular imports. `emulatedSet` is a one-off solution that only works for\n// arrays of strings.\nfunction emulatedSet(keys) {\n var hash = {};\n for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;\n return {\n contains: function(key) { return hash[key] === true; },\n push: function(key) {\n hash[key] = true;\n return keys.push(key);\n }\n };\n}\n\n// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't\n// be iterated by `for key in ...` and thus missed. Extends `keys` in place if\n// needed.\nexport default function collectNonEnumProps(obj, keys) {\n keys = emulatedSet(keys);\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {\n keys.push(prop);\n }\n }\n}\n","import isObject from './isObject.js';\nimport { nativeKeys, hasEnumBug } from './_setup.js';\nimport has from './_has.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve the names of an object's own properties.\n// Delegates to **ECMAScript 5**'s native `Object.keys`.\nexport default function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import getLength from './_getLength.js';\nimport isArray from './isArray.js';\nimport isString from './isString.js';\nimport isArguments from './isArguments.js';\nimport keys from './keys.js';\n\n// Is a given array, string, or object empty?\n// An \"empty\" object has no enumerable own-properties.\nexport default function isEmpty(obj) {\n if (obj == null) return true;\n // Skip the more expensive `toString`-based type checks if `obj` has no\n // `.length`.\n var length = getLength(obj);\n if (typeof length == 'number' && (\n isArray(obj) || isString(obj) || isArguments(obj)\n )) return length === 0;\n return getLength(keys(obj)) === 0;\n}\n","import keys from './keys.js';\n\n// Returns whether an object has a given set of `key:value` pairs.\nexport default function isMatch(object, attrs) {\n var _keys = keys(attrs), length = _keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n}\n","import { VERSION } from './_setup.js';\n\n// If Underscore is called as a function, it returns a wrapped object that can\n// be used OO-style. This wrapper holds altered versions of all functions added\n// through `_.mixin`. Wrapped objects may be chained.\nexport default function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}\n\n_.VERSION = VERSION;\n\n// Extracts the result from a wrapped and chained object.\n_.prototype.value = function() {\n return this._wrapped;\n};\n\n// Provide unwrapping proxies for some methods used in engine operations\n// such as arithmetic and JSON stringification.\n_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n_.prototype.toString = function() {\n return String(this._wrapped);\n};\n","import getByteLength from './_getByteLength.js';\n\n// Internal function to wrap or shallow-copy an ArrayBuffer,\n// typed array or DataView to a new view, reusing the buffer.\nexport default function toBufferView(bufferSource) {\n return new Uint8Array(\n bufferSource.buffer || bufferSource,\n bufferSource.byteOffset || 0,\n getByteLength(bufferSource)\n );\n}\n","import _ from './underscore.js';\nimport { toString, SymbolProto } from './_setup.js';\nimport getByteLength from './_getByteLength.js';\nimport isTypedArray from './isTypedArray.js';\nimport isFunction from './isFunction.js';\nimport { hasStringTagBug } from './_stringTagBug.js';\nimport isDataView from './isDataView.js';\nimport keys from './keys.js';\nimport has from './_has.js';\nimport toBufferView from './_toBufferView.js';\n\n// We use this string twice, so give it a name for minification.\nvar tagDataView = '[object DataView]';\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction eq(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n}\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction deepEq(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n // Work around a bug in IE 10 - Edge 13.\n if (hasStringTagBug && className == '[object Object]' && isDataView(a)) {\n if (!isDataView(b)) return false;\n className = tagDataView;\n }\n switch (className) {\n // These types are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n case '[object ArrayBuffer]':\n case tagDataView:\n // Coerce to typed array so we can fall through.\n return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays && isTypedArray(a)) {\n var byteLength = getByteLength(a);\n if (byteLength !== getByteLength(b)) return false;\n if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;\n areArrays = true;\n }\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&\n isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var _keys = keys(a), key;\n length = _keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = _keys[length];\n if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n}\n\n// Perform a deep comparison to check if two objects are equal.\nexport default function isEqual(a, b) {\n return eq(a, b);\n}\n","import isObject from './isObject.js';\nimport { hasEnumBug } from './_setup.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve all the enumerable property names of an object.\nexport default function allKeys(obj) {\n if (!isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import getLength from './_getLength.js';\nimport isFunction from './isFunction.js';\nimport allKeys from './allKeys.js';\n\n// Since the regular `Object.prototype.toString` type tests don't work for\n// some types in IE 11, we use a fingerprinting heuristic instead, based\n// on the methods. It's not great, but it's the best we got.\n// The fingerprint method lists are defined below.\nexport function ie11fingerprint(methods) {\n var length = getLength(methods);\n return function(obj) {\n if (obj == null) return false;\n // `Map`, `WeakMap` and `Set` have no enumerable keys.\n var keys = allKeys(obj);\n if (getLength(keys)) return false;\n for (var i = 0; i < length; i++) {\n if (!isFunction(obj[methods[i]])) return false;\n }\n // If we are testing against `WeakMap`, we need to ensure that\n // `obj` doesn't have a `forEach` method in order to distinguish\n // it from a regular `Map`.\n return methods !== weakMapMethods || !isFunction(obj[forEachName]);\n };\n}\n\n// In the interest of compact minification, we write\n// each string in the fingerprints only once.\nvar forEachName = 'forEach',\n hasName = 'has',\n commonInit = ['clear', 'delete'],\n mapTail = ['get', hasName, 'set'];\n\n// `Map`, `WeakMap` and `Set` each have slightly different\n// combinations of the above sublists.\nexport var mapMethods = commonInit.concat(forEachName, mapTail),\n weakMapMethods = commonInit.concat(mapTail),\n setMethods = ['add'].concat(commonInit, forEachName, hasName);\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, mapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, weakMapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, setMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('WeakSet');\n","import keys from './keys.js';\n\n// Retrieve the values of an object's properties.\nexport default function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n}\n","import keys from './keys.js';\n\n// Convert an object into a list of `[key, value]` pairs.\n// The opposite of `_.object` with one argument.\nexport default function pairs(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [_keys[i], obj[_keys[i]]];\n }\n return pairs;\n}\n","import keys from './keys.js';\n\n// Invert the keys and values of an object. The values must be serializable.\nexport default function invert(obj) {\n var result = {};\n var _keys = keys(obj);\n for (var i = 0, length = _keys.length; i < length; i++) {\n result[obj[_keys[i]]] = _keys[i];\n }\n return result;\n}\n","import isFunction from './isFunction.js';\n\n// Return a sorted list of the function names available on the object.\nexport default function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}\n","// An internal function for creating assigner functions.\nexport default function createAssigner(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n}\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Extend a given object with all the properties in passed-in object(s).\nexport default createAssigner(allKeys);\n","import createAssigner from './_createAssigner.js';\nimport keys from './keys.js';\n\n// Assigns a given object with all the own properties in the passed-in\n// object(s).\n// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\nexport default createAssigner(keys);\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Fill in a given object with default properties.\nexport default createAssigner(allKeys, true);\n","import isObject from './isObject.js';\nimport { nativeCreate } from './_setup.js';\n\n// Create a naked function reference for surrogate-prototype-swapping.\nfunction ctor() {\n return function(){};\n}\n\n// An internal function for creating a new object that inherits from another.\nexport default function baseCreate(prototype) {\n if (!isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n var Ctor = ctor();\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n}\n","import baseCreate from './_baseCreate.js';\nimport extendOwn from './extendOwn.js';\n\n// Creates an object that inherits from the given prototype object.\n// If additional properties are provided then they will be added to the\n// created object.\nexport default function create(prototype, props) {\n var result = baseCreate(prototype);\n if (props) extendOwn(result, props);\n return result;\n}\n","import isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport extend from './extend.js';\n\n// Create a (shallow-cloned) duplicate of an object.\nexport default function clone(obj) {\n if (!isObject(obj)) return obj;\n return isArray(obj) ? obj.slice() : extend({}, obj);\n}\n","// Invokes `interceptor` with the `obj` and then returns `obj`.\n// The primary purpose of this method is to \"tap into\" a method chain, in\n// order to perform operations on intermediate results within the chain.\nexport default function tap(obj, interceptor) {\n interceptor(obj);\n return obj;\n}\n","import _ from './underscore.js';\nimport isArray from './isArray.js';\n\n// Normalize a (deep) property `path` to array.\n// Like `_.iteratee`, this function can be customized.\nexport default function toPath(path) {\n return isArray(path) ? path : [path];\n}\n_.toPath = toPath;\n","import _ from './underscore.js';\nimport './toPath.js';\n\n// Internal wrapper for `_.toPath` to enable minification.\n// Similar to `cb` for `_.iteratee`.\nexport default function toPath(path) {\n return _.toPath(path);\n}\n","// Internal function to obtain a nested property in `obj` along `path`.\nexport default function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n}\n","import toPath from './_toPath.js';\nimport deepGet from './_deepGet.js';\nimport isUndefined from './isUndefined.js';\n\n// Get the value of the (deep) property on `path` from `object`.\n// If any property in `path` does not exist or if the value is\n// `undefined`, return `defaultValue` instead.\n// The `path` is normalized through `_.toPath`.\nexport default function get(object, path, defaultValue) {\n var value = deepGet(object, toPath(path));\n return isUndefined(value) ? defaultValue : value;\n}\n","import _has from './_has.js';\nimport toPath from './_toPath.js';\n\n// Shortcut function for checking if an object has a given property directly on\n// itself (in other words, not on a prototype). Unlike the internal `has`\n// function, this public version can also traverse nested properties.\nexport default function has(obj, path) {\n path = toPath(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!_has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n}\n","// Keep the identity function around for default iteratees.\nexport default function identity(value) {\n return value;\n}\n","import extendOwn from './extendOwn.js';\nimport isMatch from './isMatch.js';\n\n// Returns a predicate for checking whether an object has a given set of\n// `key:value` pairs.\nexport default function matcher(attrs) {\n attrs = extendOwn({}, attrs);\n return function(obj) {\n return isMatch(obj, attrs);\n };\n}\n","import deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Creates a function that, when passed an object, will traverse that object’s\n// properties down the given `path`, specified as an array of keys or indices.\nexport default function property(path) {\n path = toPath(path);\n return function(obj) {\n return deepGet(obj, path);\n };\n}\n","// Internal function that returns an efficient (for current engines) version\n// of the passed-in callback, to be repeatedly applied in other Underscore\n// functions.\nexport default function optimizeCb(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n}\n","import identity from './identity.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport matcher from './matcher.js';\nimport property from './property.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// An internal function to generate callbacks that can be applied to each\n// element in a collection, returning the desired result — either `_.identity`,\n// an arbitrary callback, a property matcher, or a property accessor.\nexport default function baseIteratee(value, context, argCount) {\n if (value == null) return identity;\n if (isFunction(value)) return optimizeCb(value, context, argCount);\n if (isObject(value) && !isArray(value)) return matcher(value);\n return property(value);\n}\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\n\n// External wrapper for our callback generator. Users may customize\n// `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n// This abstraction hides the internal-only `argCount` argument.\nexport default function iteratee(value, context) {\n return baseIteratee(value, context, Infinity);\n}\n_.iteratee = iteratee;\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\nimport iteratee from './iteratee.js';\n\n// The function we call internally to generate a callback. It invokes\n// `_.iteratee` if overridden, otherwise `baseIteratee`.\nexport default function cb(value, context, argCount) {\n if (_.iteratee !== iteratee) return _.iteratee(value, context);\n return baseIteratee(value, context, argCount);\n}\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the results of applying the `iteratee` to each element of `obj`.\n// In contrast to `_.map` it returns an object.\nexport default function mapObject(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = keys(obj),\n length = _keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = _keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","// Predicate-generating function. Often useful outside of Underscore.\nexport default function noop(){}\n","import noop from './noop.js';\nimport get from './get.js';\n\n// Generates a function for a given object that returns a given property.\nexport default function propertyOf(obj) {\n if (obj == null) return noop;\n return function(path) {\n return get(obj, path);\n };\n}\n","import optimizeCb from './_optimizeCb.js';\n\n// Run a function **n** times.\nexport default function times(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n}\n","// Return a random integer between `min` and `max` (inclusive).\nexport default function random(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n}\n","// A (possibly faster) way to get the current timestamp as an integer.\nexport default Date.now || function() {\n return new Date().getTime();\n};\n","import keys from './keys.js';\n\n// Internal helper to generate functions for escaping and unescaping strings\n// to/from HTML interpolation.\nexport default function createEscaper(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n}\n","// Internal list of HTML entities for escaping.\nexport default {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n","import createEscaper from './_createEscaper.js';\nimport escapeMap from './_escapeMap.js';\n\n// Function for escaping strings to HTML interpolation.\nexport default createEscaper(escapeMap);\n","import createEscaper from './_createEscaper.js';\nimport unescapeMap from './_unescapeMap.js';\n\n// Function for unescaping strings from HTML interpolation.\nexport default createEscaper(unescapeMap);\n","import invert from './invert.js';\nimport escapeMap from './_escapeMap.js';\n\n// Internal list of HTML entities for unescaping.\nexport default invert(escapeMap);\n","import _ from './underscore.js';\n\n// By default, Underscore uses ERB-style template delimiters. Change the\n// following template settings to use alternative delimiters.\nexport default _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n};\n","import defaults from './defaults.js';\nimport _ from './underscore.js';\nimport './templateSettings.js';\n\n// When customizing `_.templateSettings`, if you don't want to define an\n// interpolation, evaluation or escaping regex, we need one that is\n// guaranteed not to match.\nvar noMatch = /(.)^/;\n\n// Certain characters need to be escaped so that they can be put into a\n// string literal.\nvar escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n};\n\nvar escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\nfunction escapeChar(match) {\n return '\\\\' + escapes[match];\n}\n\n// In order to prevent third-party code injection through\n// `_.templateSettings.variable`, we test it against the following regular\n// expression. It is intentionally a bit more liberal than just matching valid\n// identifiers, but still prevents possible loopholes through defaults or\n// destructuring assignment.\nvar bareIdentifier = /^\\s*(\\w|\\$)+\\s*$/;\n\n// JavaScript micro-templating, similar to John Resig's implementation.\n// Underscore templating handles arbitrary delimiters, preserves whitespace,\n// and correctly escapes quotes within interpolated code.\n// NB: `oldSettings` only exists for backwards compatibility.\nexport default function template(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n var argument = settings.variable;\n if (argument) {\n // Insure against third-party code injection. (CVE-2021-23358)\n if (!bareIdentifier.test(argument)) throw new Error(\n 'variable is not a bare identifier: ' + argument\n );\n } else {\n // If a variable is not specified, place data values in local scope.\n source = 'with(obj||{}){\\n' + source + '}\\n';\n argument = 'obj';\n }\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(argument, '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n}\n","import isFunction from './isFunction.js';\nimport toPath from './_toPath.js';\n\n// Traverses the children of `obj` along `path`. If a child is a function, it\n// is invoked with its parent as context. Returns the value of the final\n// child, or `fallback` if any child is undefined.\nexport default function result(obj, path, fallback) {\n path = toPath(path);\n var length = path.length;\n if (!length) {\n return isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n}\n","// Generate a unique integer id (unique within the entire client session).\n// Useful for temporary DOM ids.\nvar idCounter = 0;\nexport default function uniqueId(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n}\n","import _ from './underscore.js';\n\n// Start chaining a wrapped Underscore object.\nexport default function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}\n","import baseCreate from './_baseCreate.js';\nimport isObject from './isObject.js';\n\n// Internal function to execute `sourceFunc` bound to `context` with optional\n// `args`. Determines whether to execute a function as a constructor or as a\n// normal function.\nexport default function executeBound(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (isObject(result)) return result;\n return self;\n}\n","import restArguments from './restArguments.js';\nimport executeBound from './_executeBound.js';\nimport _ from './underscore.js';\n\n// Partially apply a function by creating a version that has had some of its\n// arguments pre-filled, without changing its dynamic `this` context. `_` acts\n// as a placeholder by default, allowing any combination of arguments to be\n// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\nvar partial = restArguments(function(func, boundArgs) {\n var placeholder = partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n});\n\npartial.placeholder = _;\nexport default partial;\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport executeBound from './_executeBound.js';\n\n// Create a function bound to a given object (assigning `this`, and arguments,\n// optionally).\nexport default restArguments(function(func, context, args) {\n if (!isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n});\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getLength from './_getLength.js';\n\n// Internal helper for collection methods to determine whether a collection\n// should be iterated as an array or as an object.\n// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\nexport default createSizePropertyCheck(getLength);\n","import getLength from './_getLength.js';\nimport isArrayLike from './_isArrayLike.js';\nimport isArray from './isArray.js';\nimport isArguments from './isArguments.js';\n\n// Internal implementation of a recursive `flatten` function.\nexport default function flatten(input, depth, strict, output) {\n output = output || [];\n if (!depth && depth !== 0) {\n depth = Infinity;\n } else if (depth <= 0) {\n return output.concat(input);\n }\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (isArray(value) || isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (depth > 1) {\n flatten(value, depth - 1, strict, output);\n idx = output.length;\n } else {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport bind from './bind.js';\n\n// Bind a number of an object's methods to that object. Remaining arguments\n// are the method names to be bound. Useful for ensuring that all callbacks\n// defined on an object belong to it.\nexport default restArguments(function(obj, keys) {\n keys = flatten(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = bind(obj[key], obj);\n }\n return obj;\n});\n","import has from './_has.js';\n\n// Memoize an expensive function by storing its results.\nexport default function memoize(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n}\n","import restArguments from './restArguments.js';\n\n// Delays a function for the given number of milliseconds, and then calls\n// it with the arguments supplied.\nexport default restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n});\n","import partial from './partial.js';\nimport delay from './delay.js';\nimport _ from './underscore.js';\n\n// Defers a function, scheduling it to run after the current call stack has\n// cleared.\nexport default partial(delay, _, 1);\n","import now from './now.js';\n\n// Returns a function, that, when invoked, will only be triggered at most once\n// during a given window of time. Normally, the throttled function will run\n// as much as it can, without ever going more than once per `wait` duration;\n// but if you'd like to disable the execution on the leading edge, pass\n// `{leading: false}`. To disable execution on the trailing edge, ditto.\nexport default function throttle(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var _now = now();\n if (!previous && options.leading === false) previous = _now;\n var remaining = wait - (_now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = _now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n}\n","import restArguments from './restArguments.js';\nimport now from './now.js';\n\n// When a sequence of calls of the returned function ends, the argument\n// function is triggered. The end of a sequence is defined by the `wait`\n// parameter. If `immediate` is passed, the argument function will be\n// triggered at the beginning of the sequence instead of at the end.\nexport default function debounce(func, wait, immediate) {\n var timeout, previous, args, result, context;\n\n var later = function() {\n var passed = now() - previous;\n if (wait > passed) {\n timeout = setTimeout(later, wait - passed);\n } else {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n // This check is needed because `func` can recursively invoke `debounced`.\n if (!timeout) args = context = null;\n }\n };\n\n var debounced = restArguments(function(_args) {\n context = this;\n args = _args;\n previous = now();\n if (!timeout) {\n timeout = setTimeout(later, wait);\n if (immediate) result = func.apply(context, args);\n }\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = args = context = null;\n };\n\n return debounced;\n}\n","import partial from './partial.js';\n\n// Returns the first function passed as an argument to the second,\n// allowing you to adjust arguments, run code before and after, and\n// conditionally execute the original function.\nexport default function wrap(func, wrapper) {\n return partial(wrapper, func);\n}\n","// Returns a negated version of the passed-in predicate.\nexport default function negate(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n}\n","// Returns a function that is the composition of a list of functions, each\n// consuming the return value of the function that follows.\nexport default function compose() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n","// Returns a function that will only be executed on and after the Nth call.\nexport default function after(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n}\n","// Returns a function that will only be executed up to (but not including) the\n// Nth call.\nexport default function before(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n}\n","import partial from './partial.js';\nimport before from './before.js';\n\n// Returns a function that will be executed at most one time, no matter how\n// often you call it. Useful for lazy initialization.\nexport default partial(before, 2);\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the first key on an object that passes a truth test.\nexport default function findKey(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = keys(obj), key;\n for (var i = 0, length = _keys.length; i < length; i++) {\n key = _keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n}\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Internal function to generate `_.findIndex` and `_.findLastIndex`.\nexport default function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n}\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the first index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(1);\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the last index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(-1);\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Use a comparator function to figure out the smallest index at which\n// an object should be inserted so as to maintain order. Uses binary search.\nexport default function sortedIndex(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n}\n","import getLength from './_getLength.js';\nimport { slice } from './_setup.js';\nimport isNaN from './isNaN.js';\n\n// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.\nexport default function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n}\n","import sortedIndex from './sortedIndex.js';\nimport findIndex from './findIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the first occurrence of an item in an array,\n// or -1 if the item is not included in the array.\n// If the array is large and already in sort order, pass `true`\n// for **isSorted** to use binary search.\nexport default createIndexFinder(1, findIndex, sortedIndex);\n","import findLastIndex from './findLastIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the last occurrence of an item in an array,\n// or -1 if the item is not included in the array.\nexport default createIndexFinder(-1, findLastIndex);\n","import isArrayLike from './_isArrayLike.js';\nimport findIndex from './findIndex.js';\nimport findKey from './findKey.js';\n\n// Return the first value which passes a truth test.\nexport default function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n}\n","import find from './find.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.find`: getting the first\n// object containing specific `key:value` pairs.\nexport default function findWhere(obj, attrs) {\n return find(obj, matcher(attrs));\n}\n","import optimizeCb from './_optimizeCb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// The cornerstone for collection functions, an `each`\n// implementation, aka `forEach`.\n// Handles raw objects in addition to array-likes. Treats all\n// sparse array-likes as if they were dense.\nexport default function each(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var _keys = keys(obj);\n for (i = 0, length = _keys.length; i < length; i++) {\n iteratee(obj[_keys[i]], _keys[i], obj);\n }\n }\n return obj;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the results of applying the iteratee to each element.\nexport default function map(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// Internal helper to create a reducing function, iterating left or right.\nexport default function createReduce(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[_keys ? _keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = _keys ? _keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n}\n","import createReduce from './_createReduce.js';\n\n// **Reduce** builds up a single result from a list of values, aka `inject`,\n// or `foldl`.\nexport default createReduce(1);\n","import createReduce from './_createReduce.js';\n\n// The right-associative version of reduce, also known as `foldr`.\nexport default createReduce(-1);\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// Return all the elements that pass a truth test.\nexport default function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n}\n","import filter from './filter.js';\nimport negate from './negate.js';\nimport cb from './_cb.js';\n\n// Return all the elements for which a truth test fails.\nexport default function reject(obj, predicate, context) {\n return filter(obj, negate(cb(predicate)), context);\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine whether all of the elements pass a truth test.\nexport default function every(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine if at least one element in the object passes a truth test.\nexport default function some(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport indexOf from './indexOf.js';\n\n// Determine if the array or object contains a given item (using `===`).\nexport default function contains(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return indexOf(obj, item, fromIndex) >= 0;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport map from './map.js';\nimport deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Invoke a method (with arguments) on every item in a collection.\nexport default restArguments(function(obj, path, args) {\n var contextPath, func;\n if (isFunction(path)) {\n func = path;\n } else {\n path = toPath(path);\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n});\n","import map from './map.js';\nimport property from './property.js';\n\n// Convenience version of a common use case of `_.map`: fetching a property.\nexport default function pluck(obj, key) {\n return map(obj, property(key));\n}\n","import filter from './filter.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.filter`: selecting only\n// objects containing specific `key:value` pairs.\nexport default function where(obj, attrs) {\n return filter(obj, matcher(attrs));\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the maximum element (or element-based computation).\nexport default function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the minimum element (or element-based computation).\nexport default function min(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || (computed === Infinity && result === Infinity)) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import isArray from './isArray.js';\nimport { slice } from './_setup.js';\nimport isString from './isString.js';\nimport isArrayLike from './_isArrayLike.js';\nimport map from './map.js';\nimport identity from './identity.js';\nimport values from './values.js';\n\n// Safely create a real, live array from anything iterable.\nvar reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\nexport default function toArray(obj) {\n if (!obj) return [];\n if (isArray(obj)) return slice.call(obj);\n if (isString(obj)) {\n // Keep surrogate pair characters together.\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return map(obj, identity);\n return values(obj);\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport getLength from './_getLength.js';\nimport random from './random.js';\nimport toArray from './toArray.js';\n\n// Sample **n** random values from a collection using the modern version of the\n// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n// If **n** is not specified, returns a single random element.\n// The internal `guard` argument allows it to work with `_.map`.\nexport default function sample(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n return obj[random(obj.length - 1)];\n }\n var sample = toArray(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n}\n","import sample from './sample.js';\n\n// Shuffle a collection.\nexport default function shuffle(obj) {\n return sample(obj, Infinity);\n}\n","import cb from './_cb.js';\nimport pluck from './pluck.js';\nimport map from './map.js';\n\n// Sort the object's values by a criterion produced by an iteratee.\nexport default function sortBy(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return pluck(map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n}\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// An internal function used for aggregate \"group by\" operations.\nexport default function group(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n}\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Groups the object's values by a criterion. Pass either a string attribute\n// to group by, or a function that returns the criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key].push(value); else result[key] = [value];\n});\n","import group from './_group.js';\n\n// Indexes the object's values by a criterion, similar to `_.groupBy`, but for\n// when you know that your index values will be unique.\nexport default group(function(result, value, key) {\n result[key] = value;\n});\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Counts instances of an object that group by a certain criterion. Pass\n// either a string attribute to count by, or a function that returns the\n// criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key]++; else result[key] = 1;\n});\n","import group from './_group.js';\n\n// Split a collection into two arrays: one whose elements all pass the given\n// truth test, and one whose elements all do not pass the truth test.\nexport default group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n}, true);\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the number of elements in a collection.\nexport default function size(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : keys(obj).length;\n}\n","// Internal `_.pick` helper function to determine whether `key` is an enumerable\n// property name of `obj`.\nexport default function keyInObj(value, key, obj) {\n return key in obj;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport optimizeCb from './_optimizeCb.js';\nimport allKeys from './allKeys.js';\nimport keyInObj from './_keyInObj.js';\nimport flatten from './_flatten.js';\n\n// Return a copy of the object only containing the allowed properties.\nexport default restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (isFunction(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n});\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport negate from './negate.js';\nimport map from './map.js';\nimport flatten from './_flatten.js';\nimport contains from './contains.js';\nimport pick from './pick.js';\n\n// Return a copy of the object without the disallowed properties.\nexport default restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (isFunction(iteratee)) {\n iteratee = negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = map(flatten(keys, false, false), String);\n iteratee = function(value, key) {\n return !contains(keys, key);\n };\n }\n return pick(obj, iteratee, context);\n});\n","import { slice } from './_setup.js';\n\n// Returns everything but the last entry of the array. Especially useful on\n// the arguments object. Passing **n** will return all the values in\n// the array, excluding the last N.\nexport default function initial(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n}\n","import initial from './initial.js';\n\n// Get the first element of an array. Passing **n** will return the first N\n// values in the array. The **guard** check allows it to work with `_.map`.\nexport default function first(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[0];\n return initial(array, array.length - n);\n}\n","import { slice } from './_setup.js';\n\n// Returns everything but the first entry of the `array`. Especially useful on\n// the `arguments` object. Passing an **n** will return the rest N values in the\n// `array`.\nexport default function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n}\n","import rest from './rest.js';\n\n// Get the last element of an array. Passing **n** will return the last N\n// values in the array.\nexport default function last(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return rest(array, Math.max(0, array.length - n));\n}\n","import filter from './filter.js';\n\n// Trim out all falsy values from an array.\nexport default function compact(array) {\n return filter(array, Boolean);\n}\n","import _flatten from './_flatten.js';\n\n// Flatten out an array, either recursively (by default), or up to `depth`.\n// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.\nexport default function flatten(array, depth) {\n return _flatten(array, depth, false);\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport filter from './filter.js';\nimport contains from './contains.js';\n\n// Take the difference between one array and a number of other arrays.\n// Only the elements present in just the first array will remain.\nexport default restArguments(function(array, rest) {\n rest = flatten(rest, true, true);\n return filter(array, function(value){\n return !contains(rest, value);\n });\n});\n","import restArguments from './restArguments.js';\nimport difference from './difference.js';\n\n// Return a version of the array that does not contain the specified value(s).\nexport default restArguments(function(array, otherArrays) {\n return difference(array, otherArrays);\n});\n","import isBoolean from './isBoolean.js';\nimport cb from './_cb.js';\nimport getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce a duplicate-free version of the array. If the array has already\n// been sorted, you have the option of using a faster algorithm.\n// The faster algorithm will not work with an iteratee if the iteratee\n// is not a one-to-one function, so providing an iteratee will disable\n// the faster algorithm.\nexport default function uniq(array, isSorted, iteratee, context) {\n if (!isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport uniq from './uniq.js';\nimport flatten from './_flatten.js';\n\n// Produce an array that contains the union: each distinct element from all of\n// the passed-in arrays.\nexport default restArguments(function(arrays) {\n return uniq(flatten(arrays, true, true));\n});\n","import getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce an array that contains every item shared between all the\n// passed-in arrays.\nexport default function intersection(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n}\n","import max from './max.js';\nimport getLength from './_getLength.js';\nimport pluck from './pluck.js';\n\n// Complement of zip. Unzip accepts an array of arrays and groups\n// each array's elements on shared indices.\nexport default function unzip(array) {\n var length = (array && max(array, getLength).length) || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = pluck(array, index);\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport unzip from './unzip.js';\n\n// Zip together multiple lists into a single array -- elements that share\n// an index go together.\nexport default restArguments(unzip);\n","import getLength from './_getLength.js';\n\n// Converts lists into objects. Pass either a single array of `[key, value]`\n// pairs, or two parallel arrays of the same length -- one of keys, and one of\n// the corresponding values. Passing by pairs is the reverse of `_.pairs`.\nexport default function object(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n}\n","// Generate an integer Array containing an arithmetic progression. A port of\n// the native Python `range()` function. See\n// [the Python documentation](https://docs.python.org/library/functions.html#range).\nexport default function range(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n}\n","import { slice } from './_setup.js';\n\n// Chunk a single array into multiple arrays, each containing `count` or fewer\n// items.\nexport default function chunk(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n}\n","import _ from './underscore.js';\n\n// Helper function to continue chaining intermediate results.\nexport default function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport functions from './functions.js';\nimport { push } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add your own custom functions to the Underscore object.\nexport default function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport { ArrayProto } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add all mutator `Array` functions to the wrapper.\neach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) {\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) {\n delete obj[0];\n }\n }\n return chainResult(this, obj);\n };\n});\n\n// Add all accessor `Array` functions to the wrapper.\neach(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) obj = method.apply(obj, arguments);\n return chainResult(this, obj);\n };\n});\n\nexport default _;\n","// Default Export\n// ==============\n// In this module, we mix our bundled exports into the `_` object and export\n// the result. This is analogous to setting `module.exports = _` in CommonJS.\n// Hence, this module is also the entry point of our UMD bundle and the package\n// entry point for CommonJS and AMD users. In other words, this is (the source\n// of) the module you are interfacing with when you do any of the following:\n//\n// ```js\n// // CommonJS\n// var _ = require('underscore');\n//\n// // AMD\n// define(['underscore'], function(_) {...});\n//\n// // UMD in the browser\n// // _ is available as a global variable\n// ```\nimport * as allExports from './index.js';\nimport { mixin } from './index.js';\n\n// Add all of the Underscore functions to the wrapper object.\nvar _ = mixin(allExports);\n// Legacy Node.js API.\n_._ = _;\n// Export the Underscore API.\nexport default _;\n","import _ from 'underscore';\nimport axios from 'axios';\nimport Environment from '../environment';\nimport stgConfig from \"../../../../config\";\nimport { hamletUser } from './hamlet-user';\n\nexport class HamletApi {\n\n constructor() {\n this.baseDomain = this.getBaseDomain();\n }\n\n getBaseDomain() {\n if (!Environment.isProduction()) {\n return `${window.location.hostname.indexOf('qa-wac') > -1 ? 'https://qa-wac.internal.atlassian.com' : stgConfig.stgWacInternalUrl}`;\n }\n\n return 'https://www.atlassian.com';\n }\n\n getHamletPath() {\n if (!Environment.isProduction()) {\n return `${this.baseDomain}/apis/stg/hamlet`;\n }\n\n return `${this.baseDomain}/hamlet`;\n }\n\n getCofsPath() {\n if (!Environment.isProduction()) {\n return `${this.baseDomain}/apis/stg/cofs`;\n }\n\n return `${this.baseDomain}/apis/prod/cofs`;\n }\n\n getCnasPath() {\n if (!Environment.isProduction()) {\n return `${this.baseDomain}/apis/stg/cnas`;\n }\n\n return `${this.baseDomain}/apis/prod/cnas`;\n }\n\n getBxpPath() {\n return `${this.baseDomain}/endpoint`;\n }\n\n hamletRequest(params, useCofsPath) {\n\n let basePath = useCofsPath ? this.getCofsPath() : this.getHamletPath();\n\n let request = {\n url: `${basePath}${params.url}`,\n method: params.method || 'GET',\n headers: params.headers || {},\n params: params.params\n };\n\n if (request.method === 'GET') {\n request.params = {cacheBuster: new Date().getTime(), ...params.params };\n }\n\n if (request.method === 'POST') {\n request.headers['Content-Type'] = 'application/json';\n request.data = params.data || '';\n }\n\n if (params.authenticated && hamletUser.getToken()) {\n request.headers['ATL-XSRF-Token'] = hamletUser.getToken();\n request.withCredentials = true;\n }\n\n return axios(request);\n }\n\n bxpRequest(params) {\n\n let request = {\n url: `${params.url.startsWith('http') ? '' : this.getBxpPath()}${params.url}`,\n method: params.method || 'GET',\n headers: params.headers || {},\n params: params.params\n };\n\n if (request.method === 'GET') {\n request.params = { cacheBuster: new Date().getTime(), ...params.params };\n }\n\n if (request.method === 'POST') {\n request.headers['Content-Type'] = 'application/json';\n request.data = params.data || '';\n }\n\n if (params.authenticated && hamletUser.getToken()) {\n request.withCredentials = true;\n }\n\n return axios(request);\n }\n\n get(data) {\n let options = { method: 'GET' };\n\n if (_.isString(data)) {\n options.url = data;\n } else if (_.isObject(data)) {\n Object.assign(options, data);\n }\n\n return this.hamletRequest(options);\n }\n\n post(data) {\n let options = { method: 'POST' };\n\n if (_.isString(data)) {\n options.url = data;\n } else {\n Object.assign(options, data);\n }\n\n return this.hamletRequest(options);\n }\n\n /**\n * Generic request wrapper\n */\n request(options) {\n return axios(options);\n }\n\n}\n\nexport let hamletApi = new HamletApi();\n","import Environment from '../environment';\nimport { hamletApi } from './hamlet-api';\n\nconst ProductKey = [];\nProductKey[\"CONFLUENCE\"] = \"confluence.ondemand\";\nProductKey[\"JIRA_CORE\"] = \"jira-core.ondemand\";\nProductKey[\"JIRA_BUSINESS\"] = \"jira-core.ondemand\";\nProductKey[\"JIRA_SOFTWARE\"] = \"jira-software.ondemand\";\nProductKey[\"JIRA_SERVICE_DESK\"] = \"jira-servicedesk.ondemand\";\nProductKey[\"BITBUCKET\"] = \"com.atlassian.bitbucket\";\nProductKey[\"OPSGENIE\"] = \"opsgenie\";\nProductKey[\"STATUSPAGE\"] = \"statuspage\";\nProductKey[\"TRELLO\"] = \"trello\";\n\nexport const transformAvailableProductsIntoAvailableSites = (availableProductsSites) => {\n return availableProductsSites.map(site => {\n return {\n adminAccess: site.adminAccess,\n products: site.availableProducts.map(availableProduct => ProductKey[availableProduct.productType]),\n cloudId: site.cloudId,\n displayName: site.displayName,\n avatarUrl: site.avatar,\n url: site.url,\n };\n });\n}\n\nexport class HamletUser {\n\n constructor() {\n\n this.token = null;\n this.initialized = false;\n\n this.user = {\n contactDetails: {\n firstName: '',\n lastName: '',\n email: ''\n },\n organisationDetails: {\n address1: '',\n address2: '',\n city: '',\n state: '',\n postcode: '',\n isoCountryCode: '',\n organisationName: '',\n organisationType: null,\n payOnAccount: false,\n taxId: ''\n },\n lassoDetails: {\n firstName: '',\n lastName: '',\n username: '',\n displayName: ''\n },\n myDetails: {\n aaid: null,\n avatar: null,\n email: '',\n name: '',\n firstName: '',\n lastName: ''\n },\n isLoggedIn: false\n };\n\n this.sites = [];\n this.performanceBoostExperiment = false;\n\n }\n\n initUser(performanceBoostExperiment, enableAisAvailableProducts) {\n\n if (this.initialized) {\n return Promise.resolve(this.user);\n }\n this.initialized = true;\n\n return Promise.all([\n this.retrieveXsrfToken(),\n this.getStargateProfile(performanceBoostExperiment, false, enableAisAvailableProducts)\n ])\n .then(() => {\n return Promise.resolve(this.user);\n })\n .catch(() => {\n return Promise.resolve(this.user);\n });\n }\n\n retrieveXsrfToken() {\n\n const options = {\n url: `${hamletApi.getHamletPath()}/1.0/auth/xsrf/plain`,\n method: 'GET',\n withCredentials: true\n };\n\n return hamletApi.request(options)\n .then((response) => {\n\n if (response.data && response.data !== '') {\n\n this.setToken(response.data);\n this.user.isLoggedIn = true;\n\n return Promise.resolve();\n }\n\n this.user.isLoggedIn = false;\n return Promise.reject();\n })\n .catch(() => {\n\n this.user.isLoggedIn = false;\n return Promise.reject();\n });\n }\n\n getStargateProfile(performanceBoostExperiment, debugAllSites, enableAisAvailableProducts = false) {\n\n if (performanceBoostExperiment) {\n this.performanceBoostExperiment = true;\n }\n\n return Promise.all([\n this.retrieveMe(),\n this.retrieveSitesData(debugAllSites, enableAisAvailableProducts)\n ])\n .then(([identityData, sitesData]) => {\n\n if (identityData && sitesData) {\n Object.assign(this.user.myDetails, identityData);\n this.setSites(sitesData);\n this.user.isLoggedIn = true;\n }\n\n return Promise.resolve();\n })\n .catch(() => {\n\n this.user.isLoggedIn = false;\n return Promise.resolve();\n });\n }\n\n retrieveCurrentUser(params) {\n params.url = '/1.0/public/contact/currentUser';\n\n return hamletApi.hamletRequest(params);\n }\n\n retrieveUserDetails(params) {\n params.url = '/1.0/public/auth/user/details'\n\n return hamletApi.hamletRequest(params);\n }\n\n retrieveMe() {\n const hostname = Environment.getAPIPrivateURL();\n const url = `${hostname}/me`;\n\n const options = {\n url: url,\n method: 'GET',\n withCredentials: true\n };\n\n return hamletApi.request(options)\n .then(result => {\n\n if (!result.data) {\n return Promise.reject();\n }\n\n // clean up any names that are emails here\n let name = result.data.name;\n if (name.indexOf('@') > -1) {\n name = name.split('@')[0];\n }\n\n const stargateData = {\n aaid: (result.data.account_id),\n avatar: (result.data.picture),\n email: (result.data.email),\n name: (name),\n firstName: (this.getFirstName(name)),\n lastName: (this.getLastName(name))\n };\n\n return Promise.resolve(stargateData);\n })\n .catch(() => {\n\n this.user.isLoggedIn = false;\n return Promise.reject();\n });\n }\n\n retrieveSitesData(debugAllSites, enableAisAvailableProducts) {\n return this.retrieveAvailableProductsData(debugAllSites, enableAisAvailableProducts).then(availableProductsSites => {\n const sitesData = transformAvailableProductsIntoAvailableSites(availableProductsSites);\n return sitesData;\n }).catch(() => {\n this.user.isLoggedIn = false;\n });\n }\n\n retrieveAvailableProductsData(debugAllSites, enableAisAvailableProducts) {\n let url = `${Environment.getAPIPrivateURL()}`;\n if (enableAisAvailableProducts) {\n url = url + `/ais/available-products`\n } else {\n url = url + `/available-products/api/available-products`\n }\n const options = {\n url: url,\n method: 'GET',\n withCredentials: true\n };\n\n return (hamletApi.request(options)).then(result => {\n\n if (!result.data) {\n return [];\n }\n const sitesResult = result.data.sites || [];\n const availableProductsSites = debugAllSites ? sitesResult : sitesResult.filter((site) => this.isValidSite(site));\n return Promise.resolve(availableProductsSites);\n }).catch(() => {\n this.user.isLoggedIn = false;\n return Promise.reject();\n });\n }\n\n checkExtendedTrialAvailability(migrationSourceUuid, productKey, cloudIds) {\n const options = {\n url: `${hamletApi.getHamletPath()}/1.0/public/account/${migrationSourceUuid}/extendedTrial/availability`,\n method: 'POST',\n data: {\n productKey,\n cloudIds,\n },\n withCredentials: true\n };\n\n return hamletApi.request(options)\n .then((response) => {\n if (response.data && response.data !== '') {\n this.setExtendedTrialAvailability(response.data);\n return Promise.resolve(response.data);\n }\n\n return Promise.resolve();\n })\n .catch(() => {\n return Promise.resolve();\n });\n }\n\n getExtendedTrialAvailability() {\n return this.extendedTrialAvailability;\n }\n\n setExtendedTrialAvailability(extendedTrialAvailability) {\n this.extendedTrialAvailability = extendedTrialAvailability;\n }\n\n setToken(token) {\n this.token = token;\n }\n\n getToken() {\n return this.token;\n }\n\n setUser(options) {\n Object.assign(this.user, options);\n }\n\n getUser() {\n return this.user;\n }\n\n setSites(sites) {\n this.sites = sites;\n }\n\n getSites() {\n return this.sites;\n }\n\n getSitesByProduct(availableProducts) {\n\n let groupSitesByProduct = {};\n\n this.sites.forEach((site) => {\n site.products.forEach((product) => {\n (groupSitesByProduct[product] = groupSitesByProduct[product] || []).push({\n cloudId: site.cloudId,\n displayName: site.displayName,\n url: site.url,\n avatarUrl: site.avatarUrl || '',\n isVertigo: site.isVertigo || false,\n })\n })\n });\n\n let result = [];\n for (var product in groupSitesByProduct) {\n\n if (product.length) {\n result.push({\n name: availableProducts[product].name,\n icon: availableProducts[product].login_logo_url || '',\n sites: groupSitesByProduct[product].map((site) => site.url)\n });\n }\n }\n return result;\n }\n\n getDisplayName() {\n return this.user.myDetails.name;\n }\n\n getFirstName(fullName = '') {\n return fullName.trim().split(' ')[0];\n }\n\n getLastName(fullName = '') {\n let lastName = '';\n let names = fullName.trim().split(' ');\n\n if (names.length > 1) {\n names.shift();\n lastName = names.join(' ');\n }\n\n return lastName;\n }\n\n getUserEmail() {\n return this.user.myDetails.email || '';\n }\n\n getUserAaid() {\n return this.user.myDetails.aaid || '';\n }\n\n getAvatar() {\n return this.user.myDetails.avatar;\n }\n\n isLoggedIn() {\n return this.user.isLoggedIn && this.user.myDetails.email.length > 0;\n }\n\n isExpert() {\n return this.organisationDetails.organisationType === 'EXPERT';\n }\n\n isReseller() {\n return this.organisationDetails.organisationType === 'RESELLER';\n }\n\n isPlatinumExpert() {\n return this.organisationDetails.organisationType === 'EXPERT' && this.organisationDetails.payOnAccount;\n }\n\n isValidSite(site) {\n\n const ignoreSiteNames = [\n 'servicedog',\n 'ecosystem',\n 'atlassiantraining',\n 'Atlassian Stride',\n 'volunteerhub',\n 'atlassiantraining',\n 'hello-staging',\n 'ecosystem',\n 'riskmanagement',\n 'hello-staging3',\n 'hello-staging6',\n 'hello-staging9',\n 'jdog',\n 'sre-ehlo',\n 'trello',\n 'Trello',\n 'bitbucket',\n 'Bitbucket'\n ];\n\n if (ignoreSiteNames.indexOf(site.displayName) > -1) {\n return false;\n }\n\n if (site.cloudId.startsWith('DUMMY')) {\n return false;\n }\n\n if (site.displayName.toUpperCase().match(\".*-SANDBOX-\\\\d{3}$\")) {\n return false\n }\n\n return true;\n }\n\n}\n\nexport let hamletUser = new HamletUser();\n","import { __extends, __read, __spread } from \"tslib\";\nimport AnalyticsEvent from './AnalyticsEvent';\nvar UIAnalyticsEvent = /** @class */ (function (_super) {\n __extends(UIAnalyticsEvent, _super);\n function UIAnalyticsEvent(props) {\n var _this = _super.call(this, props) || this;\n _this.clone = function () {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot clone an event after it's been fired.\");\n return null;\n }\n var context = __spread(_this.context);\n var handlers = __spread(_this.handlers);\n /**\n * A hacky \"deep clone\" of the object. This is limited in that it wont\n * support functions, regexs, Maps, Sets, etc, but none of those need to\n * be represented in our payload.\n */\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new UIAnalyticsEvent({ context: context, handlers: handlers, payload: payload });\n };\n _this.fire = function (channel) {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn('Cannot fire an event twice.');\n return;\n }\n _this.handlers.forEach(function (handler) { return handler(_this, channel); });\n _this.hasFired = true;\n };\n _this.context = props.context || [];\n _this.handlers = props.handlers || [];\n _this.hasFired = false;\n return _this;\n }\n UIAnalyticsEvent.prototype.update = function (updater) {\n if (this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot update an event after it's been fired.\");\n return this;\n }\n return _super.prototype.update.call(this, updater);\n };\n return UIAnalyticsEvent;\n}(AnalyticsEvent));\nexport default UIAnalyticsEvent;\n//# sourceMappingURL=UIAnalyticsEvent.js.map","import { __assign } from \"tslib\";\nvar AnalyticsEvent = /** @class */ (function () {\n function AnalyticsEvent(props) {\n var _this = this;\n this.clone = function () {\n // We stringify and parse here to get a hacky \"deep clone\" of the object.\n // This has some limitations in that it wont support functions, regexs, Maps, Sets, etc,\n // but none of those need to be represented in our payload, so we consider this fine\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new AnalyticsEvent({ payload: payload });\n };\n this.payload = props.payload;\n }\n AnalyticsEvent.prototype.update = function (updater) {\n if (typeof updater === 'function') {\n this.payload = updater(this.payload);\n }\n if (typeof updater === 'object') {\n this.payload = __assign(__assign({}, this.payload), updater);\n }\n return this;\n };\n return AnalyticsEvent;\n}());\nexport default AnalyticsEvent;\n//# sourceMappingURL=AnalyticsEvent.js.map","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport UIAnalyticsEvent from './UIAnalyticsEvent';\n/**\n * This component is used to grab the analytics functions off context.\n * It uses legacy context, but provides an API similar to 16.3 context.\n * This makes it easier to use with the forward ref API.\n */\nvar AnalyticsContextConsumer = /** @class */ (function (_super) {\n __extends(AnalyticsContextConsumer, _super);\n function AnalyticsContextConsumer(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Store references to the original and patched event props so we can\n * determine when to update the patched props\n */\n _this.originalEventProps = {};\n _this.patchedEventProps = {};\n // Update patched event props only if the original props have changed\n _this.updatePatchedEventProps = function (props) {\n var changedPropCallbacks = Object.keys(_this.props.createEventMap).filter(function (p) { return _this.originalEventProps[p] !== props[p]; });\n if (changedPropCallbacks.length > 0) {\n _this.patchedEventProps = __assign(__assign({}, _this.patchedEventProps), _this.mapCreateEventsToProps(changedPropCallbacks, props));\n changedPropCallbacks.forEach(function (p) {\n _this.originalEventProps[p] = props[p];\n });\n }\n return _this.patchedEventProps;\n };\n _this.mapCreateEventsToProps = function (changedPropNames, props) {\n return changedPropNames.reduce(function (modified, propCallbackName) {\n var _a;\n var eventCreator = _this.props.createEventMap[propCallbackName];\n var providedCallback = props[propCallbackName];\n if (!['object', 'function'].includes(typeof eventCreator)) {\n return modified;\n }\n var modifiedCallback = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var analyticsEvent = typeof eventCreator === 'function'\n ? eventCreator(_this.createAnalyticsEvent, props)\n : _this.createAnalyticsEvent(eventCreator);\n if (providedCallback) {\n providedCallback.apply(void 0, __spread(args, [analyticsEvent]));\n }\n };\n return __assign(__assign({}, modified), (_a = {}, _a[propCallbackName] = modifiedCallback, _a));\n }, {});\n };\n _this.createAnalyticsEvent = function (payload) {\n var _a = _this.context, getAtlaskitAnalyticsEventHandlers = _a.getAtlaskitAnalyticsEventHandlers, getAtlaskitAnalyticsContext = _a.getAtlaskitAnalyticsContext;\n return new UIAnalyticsEvent({\n context: (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [],\n handlers: (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [],\n payload: payload,\n });\n };\n Object.keys(_this.props.createEventMap).forEach(function (p) {\n _this.originalEventProps[p] = props.wrappedComponentProps[p];\n });\n _this.patchedEventProps = _this.mapCreateEventsToProps(Object.keys(_this.props.createEventMap), props.wrappedComponentProps);\n return _this;\n }\n AnalyticsContextConsumer.prototype.render = function () {\n var patchedEventProps = this.updatePatchedEventProps(this.props.wrappedComponentProps);\n return this.props.children({\n createAnalyticsEvent: this.createAnalyticsEvent,\n patchedEventProps: patchedEventProps,\n });\n };\n AnalyticsContextConsumer.contextTypes = {\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n getAtlaskitAnalyticsContext: PropTypes.func,\n };\n AnalyticsContextConsumer.defaultProps = {\n createEventMap: {},\n };\n return AnalyticsContextConsumer;\n}(React.Component));\nexport default AnalyticsContextConsumer;\n//# sourceMappingURL=AnalyticsContextConsumer.js.map","import { __assign } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContextConsumer from './AnalyticsContextConsumer';\nvar withAnalyticsEvents = function (createEventMap) { return function (WrappedComponent) {\n var WithAnalyticsEvents = React.forwardRef(function (props, ref) { return (React.createElement(AnalyticsContextConsumer, { createEventMap: createEventMap, wrappedComponentProps: props }, function (_a) {\n var createAnalyticsEvent = _a.createAnalyticsEvent, patchedEventProps = _a.patchedEventProps;\n return (React.createElement(WrappedComponent, __assign({}, props, patchedEventProps, { createAnalyticsEvent: createAnalyticsEvent, ref: ref })));\n })); });\n // @ts-ignore\n WithAnalyticsEvents.displayName = \"WithAnalyticsEvents(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsEvents;\n}; };\nexport default withAnalyticsEvents;\n//# sourceMappingURL=withAnalyticsEvents.js.map","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}","import defineProperty from \"./defineProperty.js\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? Object(arguments[i]) : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","/**\n * generates a UID factory\n * @internal\n * @example\n * const uid = generateUID();\n * uid(object) = 1;\n * uid(object) = 1;\n * uid(anotherObject) = 2;\n */\nexport var generateUID = function () {\n var counter = 1;\n var map = new WeakMap();\n /**\n * @borrows {uid}\n */\n var uid = function (item, index) {\n if (typeof item === 'number' ||\n typeof item === 'string') {\n return index ? \"idx-\" + index : \"val-\" + item;\n }\n if (!map.has(item)) {\n map.set(item, counter++);\n return uid(item);\n }\n return 'uid' + map.get(item);\n };\n return uid;\n};\n/**\n * @name uid\n * returns an UID associated with {item}\n * @param {Object} item - object to generate UID for\n * @param {Number} index, a fallback index\n * @example\n * uid(object) == 1;\n * uid(object) == 1;\n * uid(anotherObject) == 2;\n * uid(\"not object\", 42) == 42\n *\n * @see {@link useUID}\n */\nexport var uid = generateUID();\n","import { __extends, __read, __spread } from \"tslib\";\nimport React, { Children, Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { AnalyticsReactContext } from './AnalyticsReactContext';\nvar ContextTypes = {\n getAtlaskitAnalyticsContext: PropTypes.func,\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n};\nvar AnalyticsContext = /** @class */ (function (_super) {\n __extends(AnalyticsContext, _super);\n function AnalyticsContext(props) {\n var _this = _super.call(this, props) || this;\n _this.getChildContext = function () { return ({\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n }); };\n _this.getAnalyticsContext = function () {\n var data = _this.props.data;\n var getAtlaskitAnalyticsContext = _this.context.getAtlaskitAnalyticsContext;\n var ancestorData = (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [];\n return __spread(ancestorData, [data]);\n };\n _this.getAnalyticsEventHandlers = function () {\n var getAtlaskitAnalyticsEventHandlers = _this.context.getAtlaskitAnalyticsEventHandlers;\n var ancestorHandlers = (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [];\n return ancestorHandlers;\n };\n _this.state = {\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n getAtlaskitAnalyticsEventHandlers: _this.getAnalyticsEventHandlers,\n };\n return _this;\n }\n AnalyticsContext.prototype.render = function () {\n var children = this.props.children;\n return (React.createElement(AnalyticsReactContext.Provider, { value: this.state }, Children.only(children)));\n };\n AnalyticsContext.contextTypes = ContextTypes;\n AnalyticsContext.childContextTypes = ContextTypes;\n return AnalyticsContext;\n}(Component));\nexport default AnalyticsContext;\n//# sourceMappingURL=AnalyticsContext.js.map","import { __assign } from \"tslib\";\nvar AnalyticsEvent = /** @class */ (function () {\n function AnalyticsEvent(props) {\n var _this = this;\n this.clone = function () {\n // We stringify and parse here to get a hacky \"deep clone\" of the object.\n // This has some limitations in that it wont support functions, regexs, Maps, Sets, etc,\n // but none of those need to be represented in our payload, so we consider this fine\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new AnalyticsEvent({ payload: payload });\n };\n this.payload = props.payload;\n }\n AnalyticsEvent.prototype.update = function (updater) {\n if (typeof updater === 'function') {\n this.payload = updater(this.payload);\n }\n if (typeof updater === 'object') {\n this.payload = __assign(__assign({}, this.payload), updater);\n }\n return this;\n };\n return AnalyticsEvent;\n}());\nexport default AnalyticsEvent;\n//# sourceMappingURL=AnalyticsEvent.js.map","import { __extends, __read, __spread } from \"tslib\";\nimport AnalyticsEvent from './AnalyticsEvent';\nvar UIAnalyticsEvent = /** @class */ (function (_super) {\n __extends(UIAnalyticsEvent, _super);\n function UIAnalyticsEvent(props) {\n var _this = _super.call(this, props) || this;\n _this.clone = function () {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot clone an event after it's been fired.\");\n return null;\n }\n var context = __spread(_this.context);\n var handlers = __spread(_this.handlers);\n /**\n * A hacky \"deep clone\" of the object. This is limited in that it wont\n * support functions, regexs, Maps, Sets, etc, but none of those need to\n * be represented in our payload.\n */\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new UIAnalyticsEvent({ context: context, handlers: handlers, payload: payload });\n };\n _this.fire = function (channel) {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn('Cannot fire an event twice.');\n return;\n }\n _this.handlers.forEach(function (handler) { return handler(_this, channel); });\n _this.hasFired = true;\n };\n _this.context = props.context || [];\n _this.handlers = props.handlers || [];\n _this.hasFired = false;\n return _this;\n }\n UIAnalyticsEvent.prototype.update = function (updater) {\n if (this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot update an event after it's been fired.\");\n return this;\n }\n return _super.prototype.update.call(this, updater);\n };\n return UIAnalyticsEvent;\n}(AnalyticsEvent));\nexport default UIAnalyticsEvent;\n//# sourceMappingURL=UIAnalyticsEvent.js.map","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport UIAnalyticsEvent from './UIAnalyticsEvent';\n/**\n * This component is used to grab the analytics functions off context.\n * It uses legacy context, but provides an API similar to 16.3 context.\n * This makes it easier to use with the forward ref API.\n */\nvar AnalyticsContextConsumer = /** @class */ (function (_super) {\n __extends(AnalyticsContextConsumer, _super);\n function AnalyticsContextConsumer(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Store references to the original and patched event props so we can\n * determine when to update the patched props\n */\n _this.originalEventProps = {};\n _this.patchedEventProps = {};\n // Update patched event props only if the original props have changed\n _this.updatePatchedEventProps = function (props) {\n var changedPropCallbacks = Object.keys(_this.props.createEventMap).filter(function (p) { return _this.originalEventProps[p] !== props[p]; });\n if (changedPropCallbacks.length > 0) {\n _this.patchedEventProps = __assign(__assign({}, _this.patchedEventProps), _this.mapCreateEventsToProps(changedPropCallbacks, props));\n changedPropCallbacks.forEach(function (p) {\n _this.originalEventProps[p] = props[p];\n });\n }\n return _this.patchedEventProps;\n };\n _this.mapCreateEventsToProps = function (changedPropNames, props) {\n return changedPropNames.reduce(function (modified, propCallbackName) {\n var _a;\n var eventCreator = _this.props.createEventMap[propCallbackName];\n var providedCallback = props[propCallbackName];\n if (!['object', 'function'].includes(typeof eventCreator)) {\n return modified;\n }\n var modifiedCallback = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var analyticsEvent = typeof eventCreator === 'function'\n ? eventCreator(_this.createAnalyticsEvent, props)\n : _this.createAnalyticsEvent(eventCreator);\n if (providedCallback) {\n providedCallback.apply(void 0, __spread(args, [analyticsEvent]));\n }\n };\n return __assign(__assign({}, modified), (_a = {}, _a[propCallbackName] = modifiedCallback, _a));\n }, {});\n };\n _this.createAnalyticsEvent = function (payload) {\n var _a = _this.context, getAtlaskitAnalyticsEventHandlers = _a.getAtlaskitAnalyticsEventHandlers, getAtlaskitAnalyticsContext = _a.getAtlaskitAnalyticsContext;\n return new UIAnalyticsEvent({\n context: (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [],\n handlers: (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [],\n payload: payload,\n });\n };\n Object.keys(_this.props.createEventMap).forEach(function (p) {\n _this.originalEventProps[p] = props.wrappedComponentProps[p];\n });\n _this.patchedEventProps = _this.mapCreateEventsToProps(Object.keys(_this.props.createEventMap), props.wrappedComponentProps);\n return _this;\n }\n AnalyticsContextConsumer.prototype.render = function () {\n var patchedEventProps = this.updatePatchedEventProps(this.props.wrappedComponentProps);\n return this.props.children({\n createAnalyticsEvent: this.createAnalyticsEvent,\n patchedEventProps: patchedEventProps,\n });\n };\n AnalyticsContextConsumer.contextTypes = {\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n getAtlaskitAnalyticsContext: PropTypes.func,\n };\n AnalyticsContextConsumer.defaultProps = {\n createEventMap: {},\n };\n return AnalyticsContextConsumer;\n}(React.Component));\nexport default AnalyticsContextConsumer;\n//# sourceMappingURL=AnalyticsContextConsumer.js.map","var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n return memoized;\n}\n\nexport default memoizeOne;\n","import { __extends, __read, __spread } from \"tslib\";\nimport React, { Children, Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { AnalyticsReactContext } from './AnalyticsReactContext';\nvar ContextTypes = {\n getAtlaskitAnalyticsContext: PropTypes.func,\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n};\nvar AnalyticsContext = /** @class */ (function (_super) {\n __extends(AnalyticsContext, _super);\n function AnalyticsContext(props) {\n var _this = _super.call(this, props) || this;\n _this.getChildContext = function () { return ({\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n }); };\n _this.getAnalyticsContext = function () {\n var data = _this.props.data;\n var getAtlaskitAnalyticsContext = _this.context.getAtlaskitAnalyticsContext;\n var ancestorData = (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [];\n return __spread(ancestorData, [data]);\n };\n _this.getAnalyticsEventHandlers = function () {\n var getAtlaskitAnalyticsEventHandlers = _this.context.getAtlaskitAnalyticsEventHandlers;\n var ancestorHandlers = (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [];\n return ancestorHandlers;\n };\n _this.state = {\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n getAtlaskitAnalyticsEventHandlers: _this.getAnalyticsEventHandlers,\n };\n return _this;\n }\n AnalyticsContext.prototype.render = function () {\n var children = this.props.children;\n return (React.createElement(AnalyticsReactContext.Provider, { value: this.state }, Children.only(children)));\n };\n AnalyticsContext.contextTypes = ContextTypes;\n AnalyticsContext.childContextTypes = ContextTypes;\n return AnalyticsContext;\n}(Component));\nexport default AnalyticsContext;\n//# sourceMappingURL=AnalyticsContext.js.map","import { __assign } from \"tslib\";\nvar AnalyticsEvent = /** @class */ (function () {\n function AnalyticsEvent(props) {\n var _this = this;\n this.clone = function () {\n // We stringify and parse here to get a hacky \"deep clone\" of the object.\n // This has some limitations in that it wont support functions, regexs, Maps, Sets, etc,\n // but none of those need to be represented in our payload, so we consider this fine\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new AnalyticsEvent({ payload: payload });\n };\n this.payload = props.payload;\n }\n AnalyticsEvent.prototype.update = function (updater) {\n if (typeof updater === 'function') {\n this.payload = updater(this.payload);\n }\n if (typeof updater === 'object') {\n this.payload = __assign(__assign({}, this.payload), updater);\n }\n return this;\n };\n return AnalyticsEvent;\n}());\nexport default AnalyticsEvent;\n//# sourceMappingURL=AnalyticsEvent.js.map","import { __extends, __read, __spread } from \"tslib\";\nimport AnalyticsEvent from './AnalyticsEvent';\nvar UIAnalyticsEvent = /** @class */ (function (_super) {\n __extends(UIAnalyticsEvent, _super);\n function UIAnalyticsEvent(props) {\n var _this = _super.call(this, props) || this;\n _this.clone = function () {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot clone an event after it's been fired.\");\n return null;\n }\n var context = __spread(_this.context);\n var handlers = __spread(_this.handlers);\n /**\n * A hacky \"deep clone\" of the object. This is limited in that it wont\n * support functions, regexs, Maps, Sets, etc, but none of those need to\n * be represented in our payload.\n */\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new UIAnalyticsEvent({ context: context, handlers: handlers, payload: payload });\n };\n _this.fire = function (channel) {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn('Cannot fire an event twice.');\n return;\n }\n _this.handlers.forEach(function (handler) { return handler(_this, channel); });\n _this.hasFired = true;\n };\n _this.context = props.context || [];\n _this.handlers = props.handlers || [];\n _this.hasFired = false;\n return _this;\n }\n UIAnalyticsEvent.prototype.update = function (updater) {\n if (this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot update an event after it's been fired.\");\n return this;\n }\n return _super.prototype.update.call(this, updater);\n };\n return UIAnalyticsEvent;\n}(AnalyticsEvent));\nexport default UIAnalyticsEvent;\n//# sourceMappingURL=UIAnalyticsEvent.js.map","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport UIAnalyticsEvent from './UIAnalyticsEvent';\n/**\n * This component is used to grab the analytics functions off context.\n * It uses legacy context, but provides an API similar to 16.3 context.\n * This makes it easier to use with the forward ref API.\n */\nvar AnalyticsContextConsumer = /** @class */ (function (_super) {\n __extends(AnalyticsContextConsumer, _super);\n function AnalyticsContextConsumer(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Store references to the original and patched event props so we can\n * determine when to update the patched props\n */\n _this.originalEventProps = {};\n _this.patchedEventProps = {};\n // Update patched event props only if the original props have changed\n _this.updatePatchedEventProps = function (props) {\n var changedPropCallbacks = Object.keys(_this.props.createEventMap).filter(function (p) { return _this.originalEventProps[p] !== props[p]; });\n if (changedPropCallbacks.length > 0) {\n _this.patchedEventProps = __assign(__assign({}, _this.patchedEventProps), _this.mapCreateEventsToProps(changedPropCallbacks, props));\n changedPropCallbacks.forEach(function (p) {\n _this.originalEventProps[p] = props[p];\n });\n }\n return _this.patchedEventProps;\n };\n _this.mapCreateEventsToProps = function (changedPropNames, props) {\n return changedPropNames.reduce(function (modified, propCallbackName) {\n var _a;\n var eventCreator = _this.props.createEventMap[propCallbackName];\n var providedCallback = props[propCallbackName];\n if (!['object', 'function'].includes(typeof eventCreator)) {\n return modified;\n }\n var modifiedCallback = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var analyticsEvent = typeof eventCreator === 'function'\n ? eventCreator(_this.createAnalyticsEvent, props)\n : _this.createAnalyticsEvent(eventCreator);\n if (providedCallback) {\n providedCallback.apply(void 0, __spread(args, [analyticsEvent]));\n }\n };\n return __assign(__assign({}, modified), (_a = {}, _a[propCallbackName] = modifiedCallback, _a));\n }, {});\n };\n _this.createAnalyticsEvent = function (payload) {\n var _a = _this.context, getAtlaskitAnalyticsEventHandlers = _a.getAtlaskitAnalyticsEventHandlers, getAtlaskitAnalyticsContext = _a.getAtlaskitAnalyticsContext;\n return new UIAnalyticsEvent({\n context: (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [],\n handlers: (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [],\n payload: payload,\n });\n };\n Object.keys(_this.props.createEventMap).forEach(function (p) {\n _this.originalEventProps[p] = props.wrappedComponentProps[p];\n });\n _this.patchedEventProps = _this.mapCreateEventsToProps(Object.keys(_this.props.createEventMap), props.wrappedComponentProps);\n return _this;\n }\n AnalyticsContextConsumer.prototype.render = function () {\n var patchedEventProps = this.updatePatchedEventProps(this.props.wrappedComponentProps);\n return this.props.children({\n createAnalyticsEvent: this.createAnalyticsEvent,\n patchedEventProps: patchedEventProps,\n });\n };\n AnalyticsContextConsumer.contextTypes = {\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n getAtlaskitAnalyticsContext: PropTypes.func,\n };\n AnalyticsContextConsumer.defaultProps = {\n createEventMap: {},\n };\n return AnalyticsContextConsumer;\n}(React.Component));\nexport default AnalyticsContextConsumer;\n//# sourceMappingURL=AnalyticsContextConsumer.js.map","import React, { createContext, useContext, useCallback, } from 'react';\n/*\ncreateTheme is used to create a set of Providers and Consumers for theming components.\n- Takes a default theme function; this theme function gets a set of props, and returns tokens\n based on those props. An example of this default theme function is one that produces the standard\n appearance of the component\n- Returns two things - a Provider that allow for additional themes to be applied, and a Consumer\n that can get the current theme and fetch it.\n*/\nexport function createTheme(defaultGetTokens) {\n const emptyThemeFn = (getTokens, props) => getTokens(props);\n /* Internally, Theme uses React Context, with internal providers and consumers.\n The React Context passes only a function that gets props, and turns them into tokens. This\n function gets mixed as more Providers with their own themes are added. This mixed function\n is ultimately picked up by Consumers, which implement a context consumer internally to fetch\n the theme. */\n const ThemeContext = createContext(defaultGetTokens);\n // The Theme Consumer takes a function as its child - this function takes tokens, and the\n // return value is generally a set of nodes with the tokens applied appropriately.\n function Consumer(props) {\n const { children, ...themeProps } = props;\n const theme = useContext(ThemeContext);\n const themeFn = theme || emptyThemeFn;\n // @ts-ignore See issue for more info: https://github.com/Microsoft/TypeScript/issues/10727\n // Argument of type 'Pick ReactNode; }, Exclude>' is not assignable to parameter of type 'ThemeProps'.ts(2345)\n const tokens = themeFn(themeProps);\n // We add a fragment to ensure we don't break people upgrading.\n // Previously they may have been able to pass in undefined without things blowing up.\n return React.createElement(React.Fragment, null, children(tokens));\n }\n /* The Theme Provider takes regular nodes as its child, but also takes a *theme function*\n - The theme function takes a set of props, as well as a function (getTokens) that can\n turn props into tokens.\n - The getTokens function isn't called immediately - instead the props are passed\n through a mix of parent theming functions\n Children of this provider will receive this mixed theme\n */\n function Provider(props) {\n const themeFn = useContext(ThemeContext);\n const valueFn = props.value || emptyThemeFn;\n const mixedFn = useCallback((themeProps) => valueFn(themeFn, themeProps), [themeFn, valueFn]);\n return (React.createElement(ThemeContext.Provider, { value: mixedFn }, props.children));\n }\n return { Consumer, Provider };\n}\n//# sourceMappingURL=createTheme.js.map","import { createTheme } from '../utils/createTheme';\n// Create default global light theme\nexport default createTheme(() => ({\n mode: 'light',\n}));\n//# sourceMappingURL=Theme.js.map","// ideally this would be fetched from ../constants but that causes a\n// circular dep loop. This will be refactored as part of a breaking\n// change in the future.\nconst DEFAULT_THEME_MODE = 'light';\nconst THEME_MODES = ['light', 'dark'];\n// Resolves the different types of theme objects in the current API\nexport default function getTheme(props) {\n if (props && props.theme) {\n // Theme is the global Atlaskit theme\n if ('__ATLASKIT_THEME__' in props.theme) {\n return props.theme.__ATLASKIT_THEME__;\n }\n // User has provided alternative modes\n else if ('mode' in props.theme && THEME_MODES.includes(props.theme.mode)) {\n return props.theme;\n }\n }\n // If format not supported (or no theme provided), return standard theme\n return { mode: DEFAULT_THEME_MODE };\n}\n//# sourceMappingURL=getTheme.js.map","/* eslint-disable prefer-rest-params */\nimport getTheme from './getTheme';\n// Unpack custom variants, and get correct value for the current theme\nfunction themedVariants(variantProp, variants) {\n return (props) => {\n const theme = getTheme(props);\n if (props && props[variantProp] && variants) {\n const modes = variants[props[variantProp]];\n if (modes && modes[theme.mode]) {\n const value = modes[theme.mode];\n if (value)\n return value; // TS believes value can be undefined\n }\n }\n return '';\n };\n}\nexport default function themed(modesOrVariant, variantModes) {\n if (typeof modesOrVariant === 'string') {\n return themedVariants(modesOrVariant, variantModes);\n }\n const modes = modesOrVariant;\n return (props) => {\n // Get theme from the user's props\n const theme = getTheme(props);\n // User isn't required to provide both light and dark values\n if (theme.mode in modes) {\n const value = modes[theme.mode]; // TS believes value can be undefined\n if (value)\n return value;\n }\n return '';\n };\n}\n//# sourceMappingURL=themed.js.map","import themed from './utils/themed';\n// Reds\nexport const R50 = '#FFEBE6';\nexport const R75 = '#FFBDAD';\nexport const R100 = '#FF8F73';\nexport const R200 = '#FF7452';\nexport const R300 = '#FF5630';\nexport const R400 = '#DE350B';\nexport const R500 = '#BF2600';\n// Yellows\nexport const Y50 = '#FFFAE6';\nexport const Y75 = '#FFF0B3';\nexport const Y100 = '#FFE380';\nexport const Y200 = '#FFC400';\nexport const Y300 = '#FFAB00';\nexport const Y400 = '#FF991F';\nexport const Y500 = '#FF8B00';\n// Greens\nexport const G50 = '#E3FCEF';\nexport const G75 = '#ABF5D1';\nexport const G100 = '#79F2C0';\nexport const G200 = '#57D9A3';\nexport const G300 = '#36B37E';\nexport const G400 = '#00875A';\nexport const G500 = '#006644';\n// Blues\nexport const B50 = '#DEEBFF';\nexport const B75 = '#B3D4FF';\nexport const B100 = '#4C9AFF';\nexport const B200 = '#2684FF';\nexport const B300 = '#0065FF';\nexport const B400 = '#0052CC';\nexport const B500 = '#0747A6';\n// Purples\nexport const P50 = '#EAE6FF';\nexport const P75 = '#C0B6F2';\nexport const P100 = '#998DD9';\nexport const P200 = '#8777D9';\nexport const P300 = '#6554C0';\nexport const P400 = '#5243AA';\nexport const P500 = '#403294';\n// Teals\nexport const T50 = '#E6FCFF';\nexport const T75 = '#B3F5FF';\nexport const T100 = '#79E2F2';\nexport const T200 = '#00C7E6';\nexport const T300 = '#00B8D9';\nexport const T400 = '#00A3BF';\nexport const T500 = '#008DA6';\n// Neutrals\nexport const N0 = '#FFFFFF';\nexport const N10 = '#FAFBFC';\nexport const N20 = '#F4F5F7';\nexport const N30 = '#EBECF0';\nexport const N40 = '#DFE1E6';\nexport const N50 = '#C1C7D0';\nexport const N60 = '#B3BAC5';\nexport const N70 = '#A5ADBA';\nexport const N80 = '#97A0AF';\nexport const N90 = '#8993A4';\nexport const N100 = '#7A869A';\nexport const N200 = '#6B778C';\nexport const N300 = '#5E6C84';\nexport const N400 = '#505F79';\nexport const N500 = '#42526E';\nexport const N600 = '#344563';\nexport const N700 = '#253858';\nexport const N800 = '#172B4D';\n// ATTENTION: update the tints if you update this\nexport const N900 = '#091E42';\n// Each tint is made of N900 and an alpha channel\nexport const N10A = 'rgba(9, 30, 66, 0.02)';\nexport const N20A = 'rgba(9, 30, 66, 0.04)';\nexport const N30A = 'rgba(9, 30, 66, 0.08)';\nexport const N40A = 'rgba(9, 30, 66, 0.13)';\nexport const N50A = 'rgba(9, 30, 66, 0.25)';\nexport const N60A = 'rgba(9, 30, 66, 0.31)';\nexport const N70A = 'rgba(9, 30, 66, 0.36)';\nexport const N80A = 'rgba(9, 30, 66, 0.42)';\nexport const N90A = 'rgba(9, 30, 66, 0.48)';\nexport const N100A = 'rgba(9, 30, 66, 0.54)';\nexport const N200A = 'rgba(9, 30, 66, 0.60)';\nexport const N300A = 'rgba(9, 30, 66, 0.66)';\nexport const N400A = 'rgba(9, 30, 66, 0.71)';\nexport const N500A = 'rgba(9, 30, 66, 0.77)';\nexport const N600A = 'rgba(9, 30, 66, 0.82)';\nexport const N700A = 'rgba(9, 30, 66, 0.89)';\nexport const N800A = 'rgba(9, 30, 66, 0.95)';\n// Dark Mode Neutrals\nexport const DN900 = '#E6EDFA';\nexport const DN800 = '#DCE5F5';\nexport const DN700 = '#CED9EB';\nexport const DN600 = '#B8C7E0';\nexport const DN500 = '#ABBBD6';\nexport const DN400 = '#9FB0CC';\nexport const DN300 = '#8C9CB8';\nexport const DN200 = '#7988A3';\nexport const DN100 = '#67758F';\nexport const DN90 = '#56637A';\nexport const DN80 = '#455166';\nexport const DN70 = '#3B475C';\nexport const DN60 = '#313D52';\nexport const DN50 = '#283447';\nexport const DN40 = '#202B3D';\nexport const DN30 = '#1B2638';\nexport const DN20 = '#121A29';\nexport const DN10 = '#0E1624';\n// ATTENTION: update the tints if you update this\nexport const DN0 = '#0D1424';\n// Each dark tint is made of DN0 and an alpha channel\nexport const DN800A = 'rgba(13, 20, 36, 0.06)';\nexport const DN700A = 'rgba(13, 20, 36, 0.14)';\nexport const DN600A = 'rgba(13, 20, 36, 0.18)';\nexport const DN500A = 'rgba(13, 20, 36, 0.29)';\nexport const DN400A = 'rgba(13, 20, 36, 0.36)';\nexport const DN300A = 'rgba(13, 20, 36, 0.40)';\nexport const DN200A = 'rgba(13, 20, 36, 0.47)';\nexport const DN100A = 'rgba(13, 20, 36, 0.53)';\nexport const DN90A = 'rgba(13, 20, 36, 0.63)';\nexport const DN80A = 'rgba(13, 20, 36, 0.73)';\nexport const DN70A = 'rgba(13, 20, 36, 0.78)';\nexport const DN60A = 'rgba(13, 20, 36, 0.81)';\nexport const DN50A = 'rgba(13, 20, 36, 0.85)';\nexport const DN40A = 'rgba(13, 20, 36, 0.89)';\nexport const DN30A = 'rgba(13, 20, 36, 0.92)';\nexport const DN20A = 'rgba(13, 20, 36, 0.95)';\nexport const DN10A = 'rgba(13, 20, 36, 0.97)';\n// Themed colors\nexport const background = themed({ light: N0, dark: DN30 });\nexport const backgroundActive = themed({ light: B50, dark: B75 });\nexport const backgroundHover = themed({ light: N30, dark: DN70 });\nexport const backgroundOnLayer = themed({ light: N0, dark: DN50 });\nexport const text = themed({ light: N900, dark: DN600 });\nexport const textHover = themed({ light: N800, dark: DN600 });\nexport const textActive = themed({ light: B400, dark: B400 });\nexport const subtleText = themed({ light: N200, dark: DN300 });\nexport const placeholderText = themed({ light: N100, dark: DN200 });\nexport const heading = themed({ light: N800, dark: DN600 });\nexport const subtleHeading = themed({ light: N200, dark: DN300 });\nexport const codeBlock = themed({ light: N20, dark: DN50 });\nexport const link = themed({ light: B400, dark: B100 });\nexport const linkHover = themed({ light: B300, dark: B200 });\nexport const linkActive = themed({ light: B500, dark: B100 });\nexport const linkOutline = themed({ light: B100, dark: B200 });\nexport const primary = themed({ light: B400, dark: B100 });\nexport const blue = themed({ light: B400, dark: B100 });\nexport const teal = themed({ light: T300, dark: T200 });\nexport const purple = themed({ light: P300, dark: P100 });\nexport const red = themed({ light: R300, dark: R300 });\nexport const yellow = themed({ light: Y300, dark: Y300 });\nexport const green = themed({ light: G300, dark: G300 });\nexport const skeleton = () => N20A;\n//# sourceMappingURL=colors.js.map","import { css } from 'styled-components';\nimport { B100, N30A, skeleton as skeletonColor } from './colors';\nexport const FLATTENED = '__FLATTENED__';\nexport const CHANNEL = '__ATLASKIT_THEME__';\nexport const DEFAULT_THEME_MODE = 'light';\nexport const THEME_MODES = ['light', 'dark'];\n/*\n These theme values are expressed as functions so that if we decide to make\n them dependent on props in the future, it wouldn't require a significant\n refactor everywhere they are being used.\n*/\nexport const borderRadius = () => 3;\nexport const gridSize = () => 8;\nexport const fontSize = () => 14;\nexport const fontSizeSmall = () => 11;\nexport const fontFamily = () => `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif`;\nexport const codeFontFamily = () => `'SFMono-Medium', 'SF Mono', 'Segoe UI Mono', 'Roboto Mono', 'Ubuntu Mono', Menlo, Consolas, Courier, monospace`;\nexport const focusRing = (color = B100, outlineWidth = gridSize() / 4) => `\n &:focus {\n outline: none;\n box-shadow: 0px 0px 0px ${outlineWidth}px ${color};\n }\n`;\nexport const noFocusRing = () => `\n box-shadow: none;\n`;\nexport const layers = {\n card: () => 100,\n dialog: () => 300,\n navigation: () => 200,\n layer: () => 400,\n blanket: () => 500,\n modal: () => 510,\n flag: () => 600,\n spotlight: () => 700,\n tooltip: () => 800,\n};\nexport const visuallyHidden = () => ({\n border: '0 !important',\n clip: 'rect(1px, 1px, 1px, 1px) !important',\n height: '1px !important',\n overflow: 'hidden !important',\n padding: '0 !important',\n position: 'absolute !important',\n width: '1px !important',\n whiteSpace: 'nowrap !important',\n});\n/**\n * Deprecated Styled Components mixin.\n * Use visuallyHidden instead.\n * @deprecated\n */\nexport const assistive = () => css `\n border: 0 !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n height: 1px !important;\n overflow: hidden !important;\n padding: 0 !important;\n position: absolute !important;\n width: 1px !important;\n white-space: nowrap !important;\n`;\nexport const skeletonShimmer = () => ({\n css: {\n backgroundColor: skeletonColor(),\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n animationDirection: 'alternate',\n },\n keyframes: {\n from: {\n backgroundColor: skeletonColor(),\n },\n to: {\n backgroundColor: N30A,\n },\n },\n});\n//# sourceMappingURL=constants.js.map","import { borderRadius, fontSize, gridSize } from '@atlaskit/theme/constants';\nimport { applyPropertyStyle, baseTheme } from '../theme';\nconst compactButtonHeight = `${(gridSize() * 3) / fontSize()}em`;\nconst buttonHeight = `${(gridSize() * 4) / fontSize()}em`;\n/** Background */\nconst getBackground = (props) => applyPropertyStyle('background', props, baseTheme);\n/** Box Shadow */\nconst getBoxShadow = (props) => {\n const boxShadowColor = applyPropertyStyle('boxShadowColor', props, baseTheme);\n return `0 0 0 2px ${boxShadowColor}`;\n};\n/** Color */\nconst getColor = (props) => applyPropertyStyle('color', props, baseTheme);\n/** Cursor */\nconst getCursor = ({ state = 'default' }) => state === 'hover' || state === 'active' || state === 'selected'\n ? 'pointer'\n : state === 'disabled'\n ? 'not-allowed'\n : 'default';\n/** Height */\nconst getHeight = ({ spacing = 'default' }) => spacing === 'compact'\n ? compactButtonHeight\n : spacing === 'none'\n ? 'auto'\n : buttonHeight;\n/** Line Height */\nconst getLineHeight = ({ spacing = 'default' }) => spacing === 'compact'\n ? compactButtonHeight\n : spacing === 'none'\n ? 'inherit'\n : buttonHeight;\n/** Padding */\nconst getPadding = ({ spacing = 'default' }) => spacing === 'none' ? 0 : `0 ${gridSize()}px`;\n/** Text Decoration */\nconst getTextDecoration = ({ appearance = 'default', state = 'default', }) => state === 'hover' && (appearance === 'link' || appearance === 'subtle-link')\n ? 'underline'\n : 'inherit';\n/** Transition */\nconst getTransition = ({ state = 'default' }) => state === 'hover'\n ? 'background 0s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)'\n : 'background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)';\n/** Transition Duration */\nconst getTransitionDuration = ({ state = 'default' }) => state === 'active' ? '0s' : state === 'focus' ? '0s, 0.2s' : '0.1s, 0.15s';\n/** Vertical Align */\nconst getVerticalAlign = ({ spacing = 'default' }) => spacing === 'none' ? 'baseline' : 'middle';\n/** Width */\nconst getWidth = ({ shouldFitContainer }) => shouldFitContainer ? '100%' : 'auto';\n/** Base styles */\nconst staticStyles = {\n alignItems: 'baseline',\n borderWidth: 0,\n boxSizing: 'border-box',\n display: 'inline-flex',\n fontSize: 'inherit',\n fontStyle: 'normal',\n fontWeight: '500',\n maxWidth: '100%',\n outline: 'none !important',\n textAlign: 'center',\n textDecoration: 'none',\n whiteSpace: 'nowrap',\n};\n/**\n * BUTTON STYLES\n */\nexport const getButtonStyles = (props) => ({\n ...staticStyles,\n background: getBackground(props),\n borderRadius: `${borderRadius()}px`,\n boxShadow: getBoxShadow(props),\n color: `${getColor(props)} !important`,\n cursor: getCursor(props),\n height: getHeight(props),\n lineHeight: getLineHeight(props),\n padding: getPadding(props),\n transition: getTransition(props),\n transitionDuration: getTransitionDuration(props),\n verticalAlign: getVerticalAlign(props),\n width: getWidth(props),\n '&::-moz-focus-inner': {\n border: 0,\n margin: 0,\n padding: 0,\n },\n '&:hover': {\n textDecoration: getTextDecoration(props),\n },\n ...(props.isLoading && { pointerEvents: 'none' }),\n});\n/**\n * SPINNER STYLES\n */\nexport const getSpinnerStyles = () => ({\n display: 'flex',\n position: 'absolute',\n left: '50%',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n});\n//# sourceMappingURL=getStyles.js.map","export const mapAttributesToState = ({ isDisabled = false, isActive = false, isFocus = false, isHover = false, isSelected = false, }) => {\n if (isDisabled) {\n return 'disabled';\n }\n if (isSelected && isFocus) {\n return 'focusSelected';\n }\n if (isSelected) {\n return 'selected';\n }\n if (isActive) {\n return 'active';\n }\n if (isHover) {\n return 'hover';\n }\n if (isFocus) {\n return 'focus';\n }\n return 'default';\n};\nexport const filterProps = (\n// @ts-ignore - createAnalyticsEvent is injected from WithAnalyticsEvents HOC\n{ createAnalyticsEvent, ...props }, type) => {\n if (type === 'span') {\n const { target, href, ...rest } = props;\n return rest;\n }\n return props;\n};\nexport const getLoadingStyle = (isLoading) => ({\n transition: 'opacity 0.3s',\n opacity: isLoading ? 0 : 1,\n});\nexport const composeRefs = (...refs) => {\n return (x) => {\n refs\n .filter(r => !!r)\n .forEach(ref => {\n if (typeof ref === 'function') {\n ref(x);\n }\n else {\n ref.current = x;\n }\n });\n };\n};\n/**\n * Convert a hex colour code to RGBA.\n * @param {String} hex Hex colour code.\n * @param {Number} alpha Optional alpha value (defaults to 1).\n */\nexport function hex2rgba(hex, alpha = 1) {\n if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {\n let colorArr = hex.substring(1).split('');\n if (colorArr.length === 3) {\n colorArr = [\n colorArr[0],\n colorArr[0],\n colorArr[1],\n colorArr[1],\n colorArr[2],\n colorArr[2],\n ];\n }\n const color = `0x${colorArr.join('')}`;\n // FIXME: `>>` operand can validly take a string value\n const r = (color >> 16) & 255;\n const g = (color >> 8) & 255;\n const b = color & 255;\n return `rgba(${[r, g, b].join(',')}, ${alpha})`;\n }\n throw new Error('Bad Hex');\n}\n//# sourceMappingURL=utils.js.map","import * as colors from '@atlaskit/theme/colors';\nimport { createTheme } from '@atlaskit/theme/components';\nimport { getButtonStyles, getSpinnerStyles } from './components/getStyles';\nimport { hex2rgba } from './components/utils';\nexport const fallbacks = {\n background: { light: colors.N20A, dark: colors.DN70 },\n color: { light: colors.N400, dark: colors.DN400 },\n textDecoration: { light: 'none', dark: 'none' },\n};\nexport const baseTheme = {\n // Default appearance\n background: {\n default: {\n default: { light: colors.N20A, dark: colors.DN70 },\n hover: { light: colors.N30A, dark: colors.DN60 },\n active: { light: hex2rgba(colors.B75, 0.6), dark: colors.B75 },\n disabled: { light: colors.N20A, dark: colors.DN70 },\n selected: { light: colors.N700, dark: colors.DN0 },\n focusSelected: { light: colors.N700, dark: colors.DN0 },\n },\n primary: {\n default: { light: colors.B400, dark: colors.B100 },\n hover: { light: colors.B300, dark: colors.B75 },\n active: { light: colors.B500, dark: colors.B200 },\n disabled: { light: colors.N20A, dark: colors.DN70 },\n selected: { light: colors.N700, dark: colors.DN0 },\n focusSelected: { light: colors.N700, dark: colors.DN0 },\n },\n warning: {\n default: { light: colors.Y300, dark: colors.Y300 },\n hover: { light: colors.Y200, dark: colors.Y200 },\n active: { light: colors.Y400, dark: colors.Y400 },\n disabled: { light: colors.N20A, dark: colors.DN70 },\n selected: { light: colors.Y400, dark: colors.Y400 },\n focusSelected: { light: colors.Y400, dark: colors.Y400 },\n },\n danger: {\n default: { light: colors.R400, dark: colors.R400 },\n hover: { light: colors.R300, dark: colors.R300 },\n active: { light: colors.R500, dark: colors.R500 },\n disabled: { light: colors.N20A, dark: colors.DN70 },\n selected: { light: colors.R500, dark: colors.R500 },\n focusSelected: { light: colors.R500, dark: colors.R500 },\n },\n link: {\n default: { light: 'none', dark: 'none' },\n selected: { light: colors.N700, dark: colors.N20 },\n focusSelected: { light: colors.N700, dark: colors.N20 },\n },\n subtle: {\n default: { light: 'none', dark: 'none' },\n hover: { light: colors.N30A, dark: colors.DN60 },\n active: { light: hex2rgba(colors.B75, 0.6), dark: colors.B75 },\n disabled: { light: 'none', dark: 'none' },\n selected: { light: colors.N700, dark: colors.DN0 },\n focusSelected: { light: colors.N700, dark: colors.DN0 },\n },\n 'subtle-link': {\n default: { light: 'none', dark: 'none' },\n selected: { light: colors.N700, dark: colors.N20 },\n focusSelected: { light: colors.N700, dark: colors.N20 },\n },\n },\n boxShadowColor: {\n default: {\n focus: { light: colors.B100, dark: colors.B75 },\n focusSelected: {\n light: colors.B100,\n dark: colors.B75,\n },\n },\n primary: {\n focus: { light: colors.B100, dark: colors.B75 },\n focusSelected: {\n light: colors.B100,\n dark: colors.B75,\n },\n },\n warning: {\n focus: { light: colors.Y500, dark: colors.Y500 },\n focusSelected: { light: colors.Y500, dark: colors.Y500 },\n },\n danger: {\n focus: { light: colors.R100, dark: colors.R100 },\n focusSelected: { light: colors.R100, dark: colors.R100 },\n },\n link: {\n focus: { light: colors.B100, dark: colors.B75 },\n focusSelected: {\n light: colors.B100,\n dark: colors.B75,\n },\n },\n subtle: {\n focus: { light: colors.B100, dark: colors.B75 },\n focusSelected: {\n light: colors.B100,\n dark: colors.B75,\n },\n },\n 'subtle-link': {\n focus: { light: colors.B100, dark: colors.B75 },\n focusSelected: {\n light: colors.B100,\n dark: colors.B75,\n },\n },\n },\n color: {\n default: {\n default: { light: colors.N500, dark: colors.DN400 },\n active: { light: colors.B400, dark: colors.B400 },\n disabled: { light: colors.N70, dark: colors.DN30 },\n selected: { light: colors.N20, dark: colors.DN400 },\n focusSelected: { light: colors.N20, dark: colors.DN400 },\n },\n primary: {\n default: { light: colors.N0, dark: colors.DN30 },\n disabled: { light: colors.N70, dark: colors.DN30 },\n selected: { light: colors.N20, dark: colors.DN400 },\n focusSelected: { light: colors.N20, dark: colors.DN400 },\n },\n warning: {\n default: { light: colors.N800, dark: colors.N800 },\n disabled: { light: colors.N70, dark: colors.DN30 },\n selected: { light: colors.N800, dark: colors.N800 },\n focusSelected: { light: colors.N800, dark: colors.N800 },\n },\n danger: {\n default: { light: colors.N0, dark: colors.N0 },\n disabled: { light: colors.N70, dark: colors.DN30 },\n selected: { light: colors.N0, dark: colors.N0 },\n focusSelected: { light: colors.N0, dark: colors.N0 },\n },\n link: {\n default: { light: colors.B400, dark: colors.B100 },\n hover: { light: colors.B300, dark: colors.B75 },\n active: { light: colors.B500, dark: colors.B200 },\n disabled: { light: colors.N70, dark: colors.DN100 },\n selected: { light: colors.N20, dark: colors.N700 },\n focusSelected: { light: colors.N20, dark: colors.N700 },\n },\n subtle: {\n default: { light: colors.N500, dark: colors.DN400 },\n active: { light: colors.B400, dark: colors.B400 },\n disabled: { light: colors.N70, dark: colors.DN100 },\n selected: { light: colors.N20, dark: colors.DN400 },\n focusSelected: { light: colors.N20, dark: colors.DN400 },\n },\n 'subtle-link': {\n default: { light: colors.N200, dark: colors.DN400 },\n hover: { light: colors.N90, dark: colors.B50 },\n active: { light: colors.N400, dark: colors.DN300 },\n disabled: { light: colors.N70, dark: colors.DN100 },\n selected: { light: colors.N20, dark: colors.DN400 },\n focusSelected: { light: colors.N20, dark: colors.DN400 },\n },\n },\n};\nexport function applyPropertyStyle(property, { appearance = 'default', state = 'default', mode = 'light', }, theme) {\n const propertyStyles = theme[property];\n if (!propertyStyles) {\n return 'initial';\n }\n // Check for relevant fallbacks\n if (!propertyStyles[appearance]) {\n if (!propertyStyles['default']) {\n return fallbacks[property][mode] ? fallbacks[property][mode] : 'initial';\n }\n appearance = 'default';\n }\n // If there is no 'state' key (ie, 'hover') defined for a given appearance,\n // return the 'default' state of that appearance.\n if (!propertyStyles[appearance][state]) {\n state = 'default';\n }\n const appearanceStyles = propertyStyles[appearance];\n const stateStyles = appearanceStyles[state];\n if (!stateStyles) {\n return 'inherit';\n }\n return stateStyles[mode] || appearanceStyles.default[mode];\n}\nexport const Theme = createTheme(themeProps => ({\n buttonStyles: getButtonStyles(themeProps),\n spinnerStyles: getSpinnerStyles(),\n}));\n//# sourceMappingURL=theme.js.map","import { jsx } from '@emotion/core';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport { getLoadingStyle } from './utils';\nexport default ({ children, followsIcon, spacing, isLoading, ...rest }) => (jsx(\"span\", Object.assign({ css: {\n alignItems: followsIcon ? 'baseline' : 'center',\n alignSelf: followsIcon ? 'baseline' : 'center',\n flex: '1 1 auto',\n margin: spacing === 'none' ? 0 : `0 ${gridSize() / 2}px`,\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...getLoadingStyle(isLoading),\n } }, rest), children));\n//# sourceMappingURL=Content.js.map","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport { getLoadingStyle } from './utils';\nexport default ({ spacing, icon, isOnlyChild, isLoading, ...rest }) => (jsx(\"span\", Object.assign({ css: {\n alignSelf: 'center',\n display: 'flex',\n flexShrink: 0,\n lineHeight: 0,\n fontSize: 0,\n userSelect: 'none',\n margin: spacing === 'none'\n ? 0\n : isOnlyChild\n ? `0 -${gridSize() / 4}px`\n : `0 ${gridSize() / 2}px`,\n ...getLoadingStyle(isLoading),\n } }, rest), icon));\n//# sourceMappingURL=IconWrapper.js.map","import { jsx } from '@emotion/core';\nexport default ({ fit, children, ...rest }) => (jsx(\"span\", Object.assign({ css: {\n alignSelf: 'center',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n maxWidth: '100%',\n position: 'relative',\n ...(fit && { width: '100%' }),\n ...(fit && { justifyContent: 'center' }),\n } }, rest), children));\n//# sourceMappingURL=InnerWrapper.js.map","export const presetSizes = {\n xsmall: 8,\n small: 16,\n medium: 24,\n large: 48,\n xlarge: 96,\n};\n//# sourceMappingURL=constants.js.map","/** @jsx jsx */\nimport React from 'react';\nimport { css, jsx, keyframes } from '@emotion/core';\nimport { DN500, DN900, N0, N500 } from '@atlaskit/theme/colors';\nimport GlobalTheme from '@atlaskit/theme/components';\nimport { presetSizes } from './constants';\nconst rotate = keyframes `\n to { transform: rotate(360deg); }\n`;\n// There are three parts to the load in animation:\n// 1. Fade in\n// 2. Accelerated spin\n// 3. Stretch the spinner line\nconst loadIn = keyframes `\n from {\n transform: rotate(50deg);\n opacity: 0;\n stroke-dashoffset: 60;\n }\n to {\n transform: rotate(230deg);\n opacity: 1;\n stroke-dashoffset: 50;\n }\n`;\nfunction getStrokeColor({ mode, appearance, }) {\n if (mode === 'light') {\n return appearance === 'inherit' ? N500 : N0;\n }\n // Dark mode: colours provided by Jake Miller\n return appearance === 'inherit' ? DN900 : DN500;\n}\nexport default React.memo(React.forwardRef(function Spinner({ testId, appearance = 'inherit', delay = 0, size: providedSize = 'medium', }, ref) {\n const size = typeof providedSize === 'number'\n ? providedSize\n : presetSizes[providedSize];\n return (jsx(GlobalTheme.Consumer, null, (tokens) => {\n const strokeColor = getStrokeColor({\n mode: tokens.mode,\n appearance,\n });\n // The Spinner animation uses a combination of two\n // css animations on two separate elements.\n return (jsx(\"svg\", { focusable: \"false\", height: size, width: size, viewBox: \"0 0 16 16\", xmlns: \"http://www.w3.org/2000/svg\", \"data-testid\": testId, ref: ref, css: css `\n /* align better inline with text */\n vertical-align: middle;\n /* We are going to animate this in */\n opacity: 0;\n\n animation: ${loadIn} 1s ease-in-out;\n /* When the animation completes, stay at the last frame of the animation */\n animation-fill-mode: forwards;\n animation-delay: ${delay}ms;\n ` },\n jsx(\"circle\", { cx: \"8\", cy: \"8\", r: \"7\", css: css `\n fill: none;\n stroke: ${strokeColor};\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-dasharray: 60;\n stroke-dashoffset: inherit;\n transform-origin: center;\n animation: ${rotate} 0.86s infinite;\n animation-delay: ${delay}ms;\n animation-timing-function: cubic-bezier(0.4, 0.15, 0.6, 0.85);\n ` })));\n }));\n}));\n//# sourceMappingURL=spinner.js.map","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\nimport Spinner from '@atlaskit/spinner';\nconst appearances = ['primary', 'danger'];\nexport default class LoadingSpinner extends React.Component {\n constructor() {\n super(...arguments);\n this.invertSpinner = () => {\n const { appearance, isSelected, isDisabled } = this.props;\n if (isSelected) {\n return true;\n }\n if (isDisabled) {\n return false;\n }\n if (appearance !== undefined) {\n if (appearances.indexOf(appearance) !== -1) {\n return true;\n }\n }\n return false;\n };\n }\n render() {\n const { spacing, styles } = this.props;\n let spinnerSize = spacing !== 'default' ? 'small' : 'medium';\n return (jsx(\"div\", { css: styles },\n jsx(Spinner, { size: spinnerSize, appearance: this.invertSpinner() ? 'invert' : 'inherit' })));\n }\n}\n//# sourceMappingURL=LoadingSpinner.js.map","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\nimport memoize from 'memoize-one';\nimport { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents, } from '@atlaskit/analytics-next';\nimport GlobalTheme from '@atlaskit/theme/components';\nimport { Theme } from '../theme';\nimport { name as packageName, version as packageVersion, } from '../version.json';\nimport Content from './Content';\nimport IconWrapper from './IconWrapper';\nimport InnerWrapper from './InnerWrapper';\nimport LoadingSpinner from './LoadingSpinner';\nimport { composeRefs, filterProps, mapAttributesToState } from './utils';\nexport class Button extends React.Component {\n constructor() {\n super(...arguments);\n // ref can be a range of things because we render button, a, span or other React components\n this.button = React.createRef();\n // Makes sure we don't call ref every render.\n this.getComposedRefs = memoize(composeRefs);\n this.state = {\n isActive: false,\n isFocus: false,\n isHover: false,\n };\n this.isInteractive = () => !this.props.isDisabled && !this.props.isLoading;\n this.onMouseEnter = (e) => {\n this.setState({ isHover: true });\n if (this.props.onMouseEnter) {\n this.props.onMouseEnter(e);\n }\n };\n this.onMouseLeave = (e) => {\n this.setState({ isHover: false, isActive: false });\n if (this.props.onMouseLeave) {\n this.props.onMouseLeave(e);\n }\n };\n this.onMouseDown = (e) => {\n e.preventDefault();\n this.setState({ isActive: true });\n if (this.props.onMouseDown) {\n this.props.onMouseDown(e);\n }\n };\n this.onMouseUp = (e) => {\n this.setState({ isActive: false });\n if (this.props.onMouseUp) {\n this.props.onMouseUp(e);\n }\n };\n this.onFocus = event => {\n this.setState({ isFocus: true });\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n this.onBlur = event => {\n this.setState({ isFocus: false });\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n };\n this.getElement = () => {\n const { href, isDisabled } = this.props;\n if (href) {\n return isDisabled ? 'span' : 'a';\n }\n return 'button';\n };\n // Swallow click events when the button is disabled\n // to prevent inner child clicks bubbling up.\n this.onInnerClick = e => {\n if (!this.isInteractive()) {\n e.stopPropagation();\n }\n return true;\n };\n }\n componentDidMount() {\n if (this.props.autoFocus && this.button instanceof HTMLButtonElement) {\n this.button.focus();\n }\n }\n render() {\n const { appearance = 'default', children, className, component: CustomComponent, consumerRef, iconAfter, iconBefore, isDisabled = false, isLoading = false, isSelected = false, shouldFitContainer = false, spacing = 'default', theme = (current, props) => current(props), testId, ...rest } = this.props;\n const attributes = { ...this.state, isSelected, isDisabled };\n const StyledButton = CustomComponent || this.getElement();\n const iconIsOnlyChild = !!((iconBefore && !iconAfter && !children) ||\n (iconAfter && !iconBefore && !children));\n const specifiers = (styles) => {\n if (StyledButton === 'a') {\n return {\n 'a&': styles,\n };\n }\n else if (StyledButton === CustomComponent) {\n return {\n '&, a&, &:hover, &:active, &:focus': styles,\n };\n }\n return styles;\n };\n return (jsx(Theme.Provider, { value: theme },\n jsx(GlobalTheme.Consumer, null, ({ mode }) => (jsx(Theme.Consumer, Object.assign({ mode: mode, state: mapAttributesToState(attributes), iconIsOnlyChild: iconIsOnlyChild }, this.props), ({ buttonStyles, spinnerStyles }) => (jsx(StyledButton, Object.assign({}, filterProps(rest, StyledButton), { \"data-testid\": testId, ref: this.getComposedRefs(this.button, consumerRef), onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, onFocus: this.onFocus, onBlur: this.onBlur, disabled: isDisabled, className: className, css: specifiers(buttonStyles) }),\n jsx(InnerWrapper, { onClick: this.onInnerClick, fit: !!shouldFitContainer },\n isLoading && (jsx(LoadingSpinner, { spacing: spacing, appearance: appearance, isSelected: isSelected, isDisabled: isDisabled, styles: spinnerStyles })),\n iconBefore && (jsx(IconWrapper, { isLoading: isLoading, spacing: spacing, isOnlyChild: iconIsOnlyChild, icon: iconBefore })),\n children && (jsx(Content, { isLoading: isLoading, followsIcon: !!iconBefore, spacing: spacing }, children)),\n iconAfter && (jsx(IconWrapper, { isLoading: isLoading, spacing: spacing, isOnlyChild: iconIsOnlyChild, icon: iconAfter }))))))))));\n }\n}\nButton.defaultProps = {\n appearance: 'default',\n autoFocus: false,\n isDisabled: false,\n isLoading: false,\n isSelected: false,\n shouldFitContainer: false,\n spacing: 'default',\n type: 'button',\n};\nconst createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');\nconst ButtonWithRef = React.forwardRef((props, ref) => jsx(Button, Object.assign({}, props, { consumerRef: ref })));\nButtonWithRef.displayName = 'Button';\nexport default withAnalyticsContext({\n componentName: 'button',\n packageName,\n packageVersion,\n})(withAnalyticsEvents({\n onClick: createAndFireEventOnAtlaskit({\n action: 'clicked',\n actionSubject: 'button',\n attributes: {\n componentName: 'button',\n packageName,\n packageVersion,\n },\n }),\n})(ButtonWithRef));\n//# sourceMappingURL=Button.js.map","export default (function (channel) { return function (payload) { return function (createAnalyticsEvent) {\n var consumerEvent = createAnalyticsEvent(payload);\n var clonedEvent = consumerEvent.clone();\n if (clonedEvent) {\n clonedEvent.fire(channel);\n }\n return consumerEvent;\n}; }; });\n//# sourceMappingURL=createAndFireEvent.js.map","import { __assign, __rest } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContext from './AnalyticsContext';\nvar withAnalyticsContext = function (defaultData) { return function (WrappedComponent) {\n var WithAnalyticsContext = React.forwardRef(function (props, ref) {\n var _a = props.analyticsContext, analyticsContext = _a === void 0 ? {} : _a, rest = __rest(props, [\"analyticsContext\"]);\n var analyticsData = __assign(__assign({}, defaultData), analyticsContext);\n return (React.createElement(AnalyticsContext, { data: analyticsData },\n React.createElement(WrappedComponent, __assign({}, rest, { ref: ref }))));\n });\n // @ts-ignore\n WithAnalyticsContext.displayName = \"WithAnalyticsContext(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsContext;\n}; };\nexport default withAnalyticsContext;\n//# sourceMappingURL=withAnalyticsContext.js.map","import { __assign } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContextConsumer from './AnalyticsContextConsumer';\nvar withAnalyticsEvents = function (createEventMap) { return function (WrappedComponent) {\n var WithAnalyticsEvents = React.forwardRef(function (props, ref) { return (React.createElement(AnalyticsContextConsumer, { createEventMap: createEventMap, wrappedComponentProps: props }, function (_a) {\n var createAnalyticsEvent = _a.createAnalyticsEvent, patchedEventProps = _a.patchedEventProps;\n return (React.createElement(WrappedComponent, __assign({}, props, patchedEventProps, { createAnalyticsEvent: createAnalyticsEvent, ref: ref })));\n })); });\n // @ts-ignore\n WithAnalyticsEvents.displayName = \"WithAnalyticsEvents(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsEvents;\n}; };\nexport default withAnalyticsEvents;\n//# sourceMappingURL=withAnalyticsEvents.js.map","export default (function (channel) { return function (payload) { return function (createAnalyticsEvent) {\n var consumerEvent = createAnalyticsEvent(payload);\n var clonedEvent = consumerEvent.clone();\n if (clonedEvent) {\n clonedEvent.fire(channel);\n }\n return consumerEvent;\n}; }; });\n//# sourceMappingURL=createAndFireEvent.js.map","import { __extends, __read, __spread } from \"tslib\";\nimport React, { Children, Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { AnalyticsReactContext } from './AnalyticsReactContext';\nvar ContextTypes = {\n getAtlaskitAnalyticsContext: PropTypes.func,\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n};\nvar AnalyticsContext = /** @class */ (function (_super) {\n __extends(AnalyticsContext, _super);\n function AnalyticsContext(props) {\n var _this = _super.call(this, props) || this;\n _this.getChildContext = function () { return ({\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n }); };\n _this.getAnalyticsContext = function () {\n var data = _this.props.data;\n var getAtlaskitAnalyticsContext = _this.context.getAtlaskitAnalyticsContext;\n var ancestorData = (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [];\n return __spread(ancestorData, [data]);\n };\n _this.getAnalyticsEventHandlers = function () {\n var getAtlaskitAnalyticsEventHandlers = _this.context.getAtlaskitAnalyticsEventHandlers;\n var ancestorHandlers = (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [];\n return ancestorHandlers;\n };\n _this.state = {\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n getAtlaskitAnalyticsEventHandlers: _this.getAnalyticsEventHandlers,\n };\n return _this;\n }\n AnalyticsContext.prototype.render = function () {\n var children = this.props.children;\n return (React.createElement(AnalyticsReactContext.Provider, { value: this.state }, Children.only(children)));\n };\n AnalyticsContext.contextTypes = ContextTypes;\n AnalyticsContext.childContextTypes = ContextTypes;\n return AnalyticsContext;\n}(Component));\nexport default AnalyticsContext;\n//# sourceMappingURL=AnalyticsContext.js.map","import { __assign, __rest } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContext from './AnalyticsContext';\nvar withAnalyticsContext = function (defaultData) { return function (WrappedComponent) {\n var WithAnalyticsContext = React.forwardRef(function (props, ref) {\n var _a = props.analyticsContext, analyticsContext = _a === void 0 ? {} : _a, rest = __rest(props, [\"analyticsContext\"]);\n var analyticsData = __assign(__assign({}, defaultData), analyticsContext);\n return (React.createElement(AnalyticsContext, { data: analyticsData },\n React.createElement(WrappedComponent, __assign({}, rest, { ref: ref }))));\n });\n // @ts-ignore\n WithAnalyticsContext.displayName = \"WithAnalyticsContext(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsContext;\n}; };\nexport default withAnalyticsContext;\n//# sourceMappingURL=withAnalyticsContext.js.map","import { __assign } from \"tslib\";\nvar AnalyticsEvent = /** @class */ (function () {\n function AnalyticsEvent(props) {\n var _this = this;\n this.clone = function () {\n // We stringify and parse here to get a hacky \"deep clone\" of the object.\n // This has some limitations in that it wont support functions, regexs, Maps, Sets, etc,\n // but none of those need to be represented in our payload, so we consider this fine\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new AnalyticsEvent({ payload: payload });\n };\n this.payload = props.payload;\n }\n AnalyticsEvent.prototype.update = function (updater) {\n if (typeof updater === 'function') {\n this.payload = updater(this.payload);\n }\n if (typeof updater === 'object') {\n this.payload = __assign(__assign({}, this.payload), updater);\n }\n return this;\n };\n return AnalyticsEvent;\n}());\nexport default AnalyticsEvent;\n//# sourceMappingURL=AnalyticsEvent.js.map","import { __extends, __read, __spread } from \"tslib\";\nimport AnalyticsEvent from './AnalyticsEvent';\nvar UIAnalyticsEvent = /** @class */ (function (_super) {\n __extends(UIAnalyticsEvent, _super);\n function UIAnalyticsEvent(props) {\n var _this = _super.call(this, props) || this;\n _this.clone = function () {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot clone an event after it's been fired.\");\n return null;\n }\n var context = __spread(_this.context);\n var handlers = __spread(_this.handlers);\n /**\n * A hacky \"deep clone\" of the object. This is limited in that it wont\n * support functions, regexs, Maps, Sets, etc, but none of those need to\n * be represented in our payload.\n */\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new UIAnalyticsEvent({ context: context, handlers: handlers, payload: payload });\n };\n _this.fire = function (channel) {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn('Cannot fire an event twice.');\n return;\n }\n _this.handlers.forEach(function (handler) { return handler(_this, channel); });\n _this.hasFired = true;\n };\n _this.context = props.context || [];\n _this.handlers = props.handlers || [];\n _this.hasFired = false;\n return _this;\n }\n UIAnalyticsEvent.prototype.update = function (updater) {\n if (this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot update an event after it's been fired.\");\n return this;\n }\n return _super.prototype.update.call(this, updater);\n };\n return UIAnalyticsEvent;\n}(AnalyticsEvent));\nexport default UIAnalyticsEvent;\n//# sourceMappingURL=UIAnalyticsEvent.js.map","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport UIAnalyticsEvent from './UIAnalyticsEvent';\n/**\n * This component is used to grab the analytics functions off context.\n * It uses legacy context, but provides an API similar to 16.3 context.\n * This makes it easier to use with the forward ref API.\n */\nvar AnalyticsContextConsumer = /** @class */ (function (_super) {\n __extends(AnalyticsContextConsumer, _super);\n function AnalyticsContextConsumer(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Store references to the original and patched event props so we can\n * determine when to update the patched props\n */\n _this.originalEventProps = {};\n _this.patchedEventProps = {};\n // Update patched event props only if the original props have changed\n _this.updatePatchedEventProps = function (props) {\n var changedPropCallbacks = Object.keys(_this.props.createEventMap).filter(function (p) { return _this.originalEventProps[p] !== props[p]; });\n if (changedPropCallbacks.length > 0) {\n _this.patchedEventProps = __assign(__assign({}, _this.patchedEventProps), _this.mapCreateEventsToProps(changedPropCallbacks, props));\n changedPropCallbacks.forEach(function (p) {\n _this.originalEventProps[p] = props[p];\n });\n }\n return _this.patchedEventProps;\n };\n _this.mapCreateEventsToProps = function (changedPropNames, props) {\n return changedPropNames.reduce(function (modified, propCallbackName) {\n var _a;\n var eventCreator = _this.props.createEventMap[propCallbackName];\n var providedCallback = props[propCallbackName];\n if (!['object', 'function'].includes(typeof eventCreator)) {\n return modified;\n }\n var modifiedCallback = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var analyticsEvent = typeof eventCreator === 'function'\n ? eventCreator(_this.createAnalyticsEvent, props)\n : _this.createAnalyticsEvent(eventCreator);\n if (providedCallback) {\n providedCallback.apply(void 0, __spread(args, [analyticsEvent]));\n }\n };\n return __assign(__assign({}, modified), (_a = {}, _a[propCallbackName] = modifiedCallback, _a));\n }, {});\n };\n _this.createAnalyticsEvent = function (payload) {\n var _a = _this.context, getAtlaskitAnalyticsEventHandlers = _a.getAtlaskitAnalyticsEventHandlers, getAtlaskitAnalyticsContext = _a.getAtlaskitAnalyticsContext;\n return new UIAnalyticsEvent({\n context: (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [],\n handlers: (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [],\n payload: payload,\n });\n };\n Object.keys(_this.props.createEventMap).forEach(function (p) {\n _this.originalEventProps[p] = props.wrappedComponentProps[p];\n });\n _this.patchedEventProps = _this.mapCreateEventsToProps(Object.keys(_this.props.createEventMap), props.wrappedComponentProps);\n return _this;\n }\n AnalyticsContextConsumer.prototype.render = function () {\n var patchedEventProps = this.updatePatchedEventProps(this.props.wrappedComponentProps);\n return this.props.children({\n createAnalyticsEvent: this.createAnalyticsEvent,\n patchedEventProps: patchedEventProps,\n });\n };\n AnalyticsContextConsumer.contextTypes = {\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n getAtlaskitAnalyticsContext: PropTypes.func,\n };\n AnalyticsContextConsumer.defaultProps = {\n createEventMap: {},\n };\n return AnalyticsContextConsumer;\n}(React.Component));\nexport default AnalyticsContextConsumer;\n//# sourceMappingURL=AnalyticsContextConsumer.js.map","import { __assign } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContextConsumer from './AnalyticsContextConsumer';\nvar withAnalyticsEvents = function (createEventMap) { return function (WrappedComponent) {\n var WithAnalyticsEvents = React.forwardRef(function (props, ref) { return (React.createElement(AnalyticsContextConsumer, { createEventMap: createEventMap, wrappedComponentProps: props }, function (_a) {\n var createAnalyticsEvent = _a.createAnalyticsEvent, patchedEventProps = _a.patchedEventProps;\n return (React.createElement(WrappedComponent, __assign({}, props, patchedEventProps, { createAnalyticsEvent: createAnalyticsEvent, ref: ref })));\n })); });\n // @ts-ignore\n WithAnalyticsEvents.displayName = \"WithAnalyticsEvents(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsEvents;\n}; };\nexport default withAnalyticsEvents;\n//# sourceMappingURL=withAnalyticsEvents.js.map","import { __extends, __read, __spread } from \"tslib\";\nimport React, { Children, Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { AnalyticsReactContext } from './AnalyticsReactContext';\nvar ContextTypes = {\n getAtlaskitAnalyticsContext: PropTypes.func,\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n};\nvar AnalyticsContext = /** @class */ (function (_super) {\n __extends(AnalyticsContext, _super);\n function AnalyticsContext(props) {\n var _this = _super.call(this, props) || this;\n _this.getChildContext = function () { return ({\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n }); };\n _this.getAnalyticsContext = function () {\n var data = _this.props.data;\n var getAtlaskitAnalyticsContext = _this.context.getAtlaskitAnalyticsContext;\n var ancestorData = (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [];\n return __spread(ancestorData, [data]);\n };\n _this.getAnalyticsEventHandlers = function () {\n var getAtlaskitAnalyticsEventHandlers = _this.context.getAtlaskitAnalyticsEventHandlers;\n var ancestorHandlers = (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [];\n return ancestorHandlers;\n };\n _this.state = {\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n getAtlaskitAnalyticsEventHandlers: _this.getAnalyticsEventHandlers,\n };\n return _this;\n }\n AnalyticsContext.prototype.render = function () {\n var children = this.props.children;\n return (React.createElement(AnalyticsReactContext.Provider, { value: this.state }, Children.only(children)));\n };\n AnalyticsContext.contextTypes = ContextTypes;\n AnalyticsContext.childContextTypes = ContextTypes;\n return AnalyticsContext;\n}(Component));\nexport default AnalyticsContext;\n//# sourceMappingURL=AnalyticsContext.js.map","import { __assign } from \"tslib\";\nvar AnalyticsEvent = /** @class */ (function () {\n function AnalyticsEvent(props) {\n var _this = this;\n this.clone = function () {\n // We stringify and parse here to get a hacky \"deep clone\" of the object.\n // This has some limitations in that it wont support functions, regexs, Maps, Sets, etc,\n // but none of those need to be represented in our payload, so we consider this fine\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new AnalyticsEvent({ payload: payload });\n };\n this.payload = props.payload;\n }\n AnalyticsEvent.prototype.update = function (updater) {\n if (typeof updater === 'function') {\n this.payload = updater(this.payload);\n }\n if (typeof updater === 'object') {\n this.payload = __assign(__assign({}, this.payload), updater);\n }\n return this;\n };\n return AnalyticsEvent;\n}());\nexport default AnalyticsEvent;\n//# sourceMappingURL=AnalyticsEvent.js.map","import { __extends, __read, __spread } from \"tslib\";\nimport AnalyticsEvent from './AnalyticsEvent';\nvar UIAnalyticsEvent = /** @class */ (function (_super) {\n __extends(UIAnalyticsEvent, _super);\n function UIAnalyticsEvent(props) {\n var _this = _super.call(this, props) || this;\n _this.clone = function () {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot clone an event after it's been fired.\");\n return null;\n }\n var context = __spread(_this.context);\n var handlers = __spread(_this.handlers);\n /**\n * A hacky \"deep clone\" of the object. This is limited in that it wont\n * support functions, regexs, Maps, Sets, etc, but none of those need to\n * be represented in our payload.\n */\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new UIAnalyticsEvent({ context: context, handlers: handlers, payload: payload });\n };\n _this.fire = function (channel) {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn('Cannot fire an event twice.');\n return;\n }\n _this.handlers.forEach(function (handler) { return handler(_this, channel); });\n _this.hasFired = true;\n };\n _this.context = props.context || [];\n _this.handlers = props.handlers || [];\n _this.hasFired = false;\n return _this;\n }\n UIAnalyticsEvent.prototype.update = function (updater) {\n if (this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot update an event after it's been fired.\");\n return this;\n }\n return _super.prototype.update.call(this, updater);\n };\n return UIAnalyticsEvent;\n}(AnalyticsEvent));\nexport default UIAnalyticsEvent;\n//# sourceMappingURL=UIAnalyticsEvent.js.map","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport UIAnalyticsEvent from './UIAnalyticsEvent';\n/**\n * This component is used to grab the analytics functions off context.\n * It uses legacy context, but provides an API similar to 16.3 context.\n * This makes it easier to use with the forward ref API.\n */\nvar AnalyticsContextConsumer = /** @class */ (function (_super) {\n __extends(AnalyticsContextConsumer, _super);\n function AnalyticsContextConsumer(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Store references to the original and patched event props so we can\n * determine when to update the patched props\n */\n _this.originalEventProps = {};\n _this.patchedEventProps = {};\n // Update patched event props only if the original props have changed\n _this.updatePatchedEventProps = function (props) {\n var changedPropCallbacks = Object.keys(_this.props.createEventMap).filter(function (p) { return _this.originalEventProps[p] !== props[p]; });\n if (changedPropCallbacks.length > 0) {\n _this.patchedEventProps = __assign(__assign({}, _this.patchedEventProps), _this.mapCreateEventsToProps(changedPropCallbacks, props));\n changedPropCallbacks.forEach(function (p) {\n _this.originalEventProps[p] = props[p];\n });\n }\n return _this.patchedEventProps;\n };\n _this.mapCreateEventsToProps = function (changedPropNames, props) {\n return changedPropNames.reduce(function (modified, propCallbackName) {\n var _a;\n var eventCreator = _this.props.createEventMap[propCallbackName];\n var providedCallback = props[propCallbackName];\n if (!['object', 'function'].includes(typeof eventCreator)) {\n return modified;\n }\n var modifiedCallback = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var analyticsEvent = typeof eventCreator === 'function'\n ? eventCreator(_this.createAnalyticsEvent, props)\n : _this.createAnalyticsEvent(eventCreator);\n if (providedCallback) {\n providedCallback.apply(void 0, __spread(args, [analyticsEvent]));\n }\n };\n return __assign(__assign({}, modified), (_a = {}, _a[propCallbackName] = modifiedCallback, _a));\n }, {});\n };\n _this.createAnalyticsEvent = function (payload) {\n var _a = _this.context, getAtlaskitAnalyticsEventHandlers = _a.getAtlaskitAnalyticsEventHandlers, getAtlaskitAnalyticsContext = _a.getAtlaskitAnalyticsContext;\n return new UIAnalyticsEvent({\n context: (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [],\n handlers: (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [],\n payload: payload,\n });\n };\n Object.keys(_this.props.createEventMap).forEach(function (p) {\n _this.originalEventProps[p] = props.wrappedComponentProps[p];\n });\n _this.patchedEventProps = _this.mapCreateEventsToProps(Object.keys(_this.props.createEventMap), props.wrappedComponentProps);\n return _this;\n }\n AnalyticsContextConsumer.prototype.render = function () {\n var patchedEventProps = this.updatePatchedEventProps(this.props.wrappedComponentProps);\n return this.props.children({\n createAnalyticsEvent: this.createAnalyticsEvent,\n patchedEventProps: patchedEventProps,\n });\n };\n AnalyticsContextConsumer.contextTypes = {\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n getAtlaskitAnalyticsContext: PropTypes.func,\n };\n AnalyticsContextConsumer.defaultProps = {\n createEventMap: {},\n };\n return AnalyticsContextConsumer;\n}(React.Component));\nexport default AnalyticsContextConsumer;\n//# sourceMappingURL=AnalyticsContextConsumer.js.map","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.16.1\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n\nvar timeoutDuration = function () {\n var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}();\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var window = element.ownerDocument.defaultView;\n var css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nfunction getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n var noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n var offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n var width = sizes.width || element.clientWidth || result.width;\n var height = sizes.height || element.clientHeight || result.height;\n\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop);\n var marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n var parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n var el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n // NOTE: 1 DOM access here\n\n var boundaries = { top: 0, left: 0 };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n var isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n var variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var window = element.ownerDocument.defaultView;\n var styles = window.getComputedStyle(element);\n var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nfunction getRoundedOffsets(data, shouldRound) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var round = Math.round,\n floor = Math.floor;\n\n var noRound = function noRound(v) {\n return v;\n };\n\n var referenceWidth = round(reference.width);\n var popperWidth = round(popper.width);\n\n var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n var isVariation = data.placement.indexOf('-') !== -1;\n var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n var verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right)\n };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n\n var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n // flips variation if popper content overflows boundaries\n var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n\n var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var basePlacement = placement.split('-')[0];\n\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n var order = options.priority;\n var popper = data.offsets.popper;\n\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\nexport default Popper;\n//# sourceMappingURL=popper.js.map\n","import _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport * as React from 'react';\nimport createContext from 'create-react-context';\nexport var ManagerReferenceNodeContext = createContext();\nexport var ManagerReferenceNodeSetterContext = createContext();\n\nvar Manager =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Manager, _React$Component);\n\n function Manager() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"referenceNode\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"setReferenceNode\", function (newReferenceNode) {\n if (newReferenceNode && _this.referenceNode !== newReferenceNode) {\n _this.referenceNode = newReferenceNode;\n\n _this.forceUpdate();\n }\n });\n\n return _this;\n }\n\n var _proto = Manager.prototype;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.referenceNode = null;\n };\n\n _proto.render = function render() {\n return React.createElement(ManagerReferenceNodeContext.Provider, {\n value: this.referenceNode\n }, React.createElement(ManagerReferenceNodeSetterContext.Provider, {\n value: this.setReferenceNode\n }, this.props.children));\n };\n\n return Manager;\n}(React.Component);\n\nexport { Manager as default };","/**\n * Takes an argument and if it's an array, returns the first item in the array,\n * otherwise returns the argument. Used for Preact compatibility.\n */\nexport var unwrapArray = function unwrapArray(arg) {\n return Array.isArray(arg) ? arg[0] : arg;\n};\n/**\n * Takes a maybe-undefined function and arbitrary args and invokes the function\n * only if it is defined.\n */\n\nexport var safeInvoke = function safeInvoke(fn) {\n if (typeof fn === \"function\") {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return fn.apply(void 0, args);\n }\n};\n/**\n * Does a shallow equality check of two objects by comparing the reference\n * equality of each value.\n */\n\nexport var shallowEqual = function shallowEqual(objA, objB) {\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n\n if (bKeys.length !== aKeys.length) {\n return false;\n }\n\n for (var i = 0; i < bKeys.length; i++) {\n var key = aKeys[i];\n\n if (objA[key] !== objB[key]) {\n return false;\n }\n }\n\n return true;\n};\n/**\n * Sets a ref using either a ref callback or a ref object\n */\n\nexport var setRef = function setRef(ref, node) {\n // if its a function call it\n if (typeof ref === \"function\") {\n return safeInvoke(ref, node);\n } // otherwise we should treat it as a ref object\n else if (ref != null) {\n ref.current = node;\n }\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport * as React from 'react';\nimport PopperJS from 'popper.js';\nimport { ManagerReferenceNodeContext } from './Manager';\nimport { unwrapArray, setRef, shallowEqual } from './utils';\nvar initialStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n opacity: 0,\n pointerEvents: 'none'\n};\nvar initialArrowStyle = {};\nexport var InnerPopper =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(InnerPopper, _React$Component);\n\n function InnerPopper() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n data: undefined,\n placement: undefined\n });\n\n _defineProperty(_assertThisInitialized(_this), \"popperInstance\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"popperNode\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"arrowNode\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"setPopperNode\", function (popperNode) {\n if (!popperNode || _this.popperNode === popperNode) return;\n setRef(_this.props.innerRef, popperNode);\n _this.popperNode = popperNode;\n\n _this.updatePopperInstance();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setArrowNode\", function (arrowNode) {\n _this.arrowNode = arrowNode;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"updateStateModifier\", {\n enabled: true,\n order: 900,\n fn: function fn(data) {\n var placement = data.placement;\n\n _this.setState({\n data: data,\n placement: placement\n });\n\n return data;\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getOptions\", function () {\n return {\n placement: _this.props.placement,\n eventsEnabled: _this.props.eventsEnabled,\n positionFixed: _this.props.positionFixed,\n modifiers: _extends({}, _this.props.modifiers, {\n arrow: _extends({}, _this.props.modifiers && _this.props.modifiers.arrow, {\n enabled: !!_this.arrowNode,\n element: _this.arrowNode\n }),\n applyStyle: {\n enabled: false\n },\n updateStateModifier: _this.updateStateModifier\n })\n };\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getPopperStyle\", function () {\n return !_this.popperNode || !_this.state.data ? initialStyle : _extends({\n position: _this.state.data.offsets.popper.position\n }, _this.state.data.styles);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getPopperPlacement\", function () {\n return !_this.state.data ? undefined : _this.state.placement;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getArrowStyle\", function () {\n return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getOutOfBoundariesState\", function () {\n return _this.state.data ? _this.state.data.hide : undefined;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"destroyPopperInstance\", function () {\n if (!_this.popperInstance) return;\n\n _this.popperInstance.destroy();\n\n _this.popperInstance = null;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"updatePopperInstance\", function () {\n _this.destroyPopperInstance();\n\n var _assertThisInitialize = _assertThisInitialized(_this),\n popperNode = _assertThisInitialize.popperNode;\n\n var referenceElement = _this.props.referenceElement;\n if (!referenceElement || !popperNode) return;\n _this.popperInstance = new PopperJS(referenceElement, popperNode, _this.getOptions());\n });\n\n _defineProperty(_assertThisInitialized(_this), \"scheduleUpdate\", function () {\n if (_this.popperInstance) {\n _this.popperInstance.scheduleUpdate();\n }\n });\n\n return _this;\n }\n\n var _proto = InnerPopper.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // If the Popper.js options have changed, update the instance (destroy + create)\n if (this.props.placement !== prevProps.placement || this.props.referenceElement !== prevProps.referenceElement || this.props.positionFixed !== prevProps.positionFixed || this.props.modifiers !== prevProps.modifiers) {\n // develop only check that modifiers isn't being updated needlessly\n if (process.env.NODE_ENV === \"development\") {\n if (this.props.modifiers !== prevProps.modifiers && this.props.modifiers != null && prevProps.modifiers != null && shallowEqual(this.props.modifiers, prevProps.modifiers)) {\n console.warn(\"'modifiers' prop reference updated even though all values appear the same.\\nConsider memoizing the 'modifiers' object to avoid needless rendering.\");\n }\n }\n\n this.updatePopperInstance();\n } else if (this.props.eventsEnabled !== prevProps.eventsEnabled && this.popperInstance) {\n this.props.eventsEnabled ? this.popperInstance.enableEventListeners() : this.popperInstance.disableEventListeners();\n } // A placement difference in state means popper determined a new placement\n // apart from the props value. By the time the popper element is rendered with\n // the new position Popper has already measured it, if the place change triggers\n // a size change it will result in a misaligned popper. So we schedule an update to be sure.\n\n\n if (prevState.placement !== this.state.placement) {\n this.scheduleUpdate();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n setRef(this.props.innerRef, null);\n this.destroyPopperInstance();\n };\n\n _proto.render = function render() {\n return unwrapArray(this.props.children)({\n ref: this.setPopperNode,\n style: this.getPopperStyle(),\n placement: this.getPopperPlacement(),\n outOfBoundaries: this.getOutOfBoundariesState(),\n scheduleUpdate: this.scheduleUpdate,\n arrowProps: {\n ref: this.setArrowNode,\n style: this.getArrowStyle()\n }\n });\n };\n\n return InnerPopper;\n}(React.Component);\n\n_defineProperty(InnerPopper, \"defaultProps\", {\n placement: 'bottom',\n eventsEnabled: true,\n referenceElement: undefined,\n positionFixed: false\n});\n\nvar placements = PopperJS.placements;\nexport { placements };\nexport default function Popper(_ref) {\n var referenceElement = _ref.referenceElement,\n props = _objectWithoutPropertiesLoose(_ref, [\"referenceElement\"]);\n\n return React.createElement(ManagerReferenceNodeContext.Consumer, null, function (referenceNode) {\n return React.createElement(InnerPopper, _extends({\n referenceElement: referenceElement !== undefined ? referenceElement : referenceNode\n }, props));\n });\n}","import React from 'react';\nimport memoizeOne from 'memoize-one';\nimport { Popper as ReactPopper, } from 'react-popper';\nexport { Manager, Reference } from 'react-popper';\nconst FlipBehavior = {\n auto: [],\n top: ['top', 'bottom', 'top'],\n right: ['right', 'left', 'right'],\n bottom: ['bottom', 'top', 'bottom'],\n left: ['left', 'right', 'left'],\n};\nconst getFlipBehavior = (side) => FlipBehavior[side];\nexport class Popper extends React.Component {\n constructor() {\n super(...arguments);\n this.getModifiers = memoizeOne(placement => {\n const flipBehavior = getFlipBehavior(placement.split('-')[0]);\n const modifiers = {\n flip: {\n enabled: true,\n behavior: flipBehavior,\n boundariesElement: 'viewport',\n },\n hide: {\n enabled: true,\n },\n offset: {\n enabled: true,\n offset: this.props.offset,\n },\n preventOverflow: {\n enabled: true,\n escapeWithReference: false,\n boundariesElement: 'window',\n },\n };\n if (this.props.modifiers) {\n return { ...modifiers, ...this.props.modifiers };\n }\n return modifiers;\n });\n }\n render() {\n const { placement, children, referenceElement } = this.props;\n const modifiers = this.getModifiers(this.props.placement);\n return (React.createElement(ReactPopper, Object.assign({ positionFixed: true, modifiers: modifiers, placement: placement }, (referenceElement ? { referenceElement } : {})), children));\n }\n}\nPopper.defaultProps = {\n children: () => null,\n offset: '0, 8px',\n placement: 'bottom-start',\n};\n//# sourceMappingURL=Popper.js.map","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\n\nvar index = (function (condition, message) {\n if (condition) {\n return;\n }\n\n if (isProduction) {\n throw new Error(prefix);\n }\n\n throw new Error(prefix + ': ' + (message || ''));\n});\n\nexport default index;\n","import { css } from 'styled-components';\nimport { B100, N30A, skeleton as skeletonColor } from './colors';\nexport const FLATTENED = '__FLATTENED__';\nexport const CHANNEL = '__ATLASKIT_THEME__';\nexport const DEFAULT_THEME_MODE = 'light';\nexport const THEME_MODES = ['light', 'dark'];\n/*\n These theme values are expressed as functions so that if we decide to make\n them dependent on props in the future, it wouldn't require a significant\n refactor everywhere they are being used.\n*/\nexport const borderRadius = () => 3;\nexport const gridSize = () => 8;\nexport const fontSize = () => 14;\nexport const fontSizeSmall = () => 11;\nexport const fontFamily = () => `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif`;\nexport const codeFontFamily = () => `'SFMono-Medium', 'SF Mono', 'Segoe UI Mono', 'Roboto Mono', 'Ubuntu Mono', Menlo, Consolas, Courier, monospace`;\nexport const focusRing = (color = B100, outlineWidth = gridSize() / 4) => `\n &:focus {\n outline: none;\n box-shadow: 0px 0px 0px ${outlineWidth}px ${color};\n }\n`;\nexport const noFocusRing = () => `\n box-shadow: none;\n`;\nexport const layers = {\n card: () => 100,\n dialog: () => 300,\n navigation: () => 200,\n layer: () => 400,\n blanket: () => 500,\n modal: () => 510,\n flag: () => 600,\n spotlight: () => 700,\n tooltip: () => 800,\n};\nexport const visuallyHidden = () => ({\n border: '0 !important',\n clip: 'rect(1px, 1px, 1px, 1px) !important',\n height: '1px !important',\n overflow: 'hidden !important',\n padding: '0 !important',\n position: 'absolute !important',\n width: '1px !important',\n whiteSpace: 'nowrap !important',\n});\n/**\n * Deprecated Styled Components mixin.\n * Use visuallyHidden instead.\n * @deprecated\n */\nexport const assistive = () => css `\n border: 0 !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n height: 1px !important;\n overflow: hidden !important;\n padding: 0 !important;\n position: absolute !important;\n width: 1px !important;\n white-space: nowrap !important;\n`;\nexport const skeletonShimmer = () => ({\n css: {\n backgroundColor: skeletonColor(),\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n animationDirection: 'alternate',\n },\n keyframes: {\n from: {\n backgroundColor: skeletonColor(),\n },\n to: {\n backgroundColor: N30A,\n },\n },\n});\n//# sourceMappingURL=constants.js.map","import React from 'react';\nimport { canUseDOM } from 'exenv';\nimport ReactDOM from 'react-dom';\nimport invariant from 'tiny-invariant';\nimport { layers } from '@atlaskit/theme';\nimport { PORTAL_MOUNT_EVENT, PORTAL_UNMOUNT_EVENT } from '../constants';\nconst createContainer = (zIndex) => {\n const container = document.createElement('div');\n container.setAttribute('class', 'atlaskit-portal');\n container.setAttribute('style', `z-index: ${zIndex};`);\n return container;\n};\nconst getBody = () => {\n invariant(document && document.body, 'cannot find document.body');\n return document.body;\n};\n/**\n * Reverses the name: zIndex object so we can quickly access it using the zIndex value as the key.\n */\nconst zIndexToName = Object.keys(layers).reduce((acc, name) => {\n const layerName = name;\n const value = layers[layerName]();\n acc[value] = layerName;\n return acc;\n}, {});\nconst getLayerName = (zIndex) => {\n return Object.prototype.hasOwnProperty.call(zIndexToName, zIndex)\n ? zIndexToName[zIndex]\n : null;\n};\nconst getEvent = (eventName, zIndex) => {\n const detail = {\n layer: getLayerName(Number(zIndex)),\n zIndex,\n };\n // In ie11 the CustomEvent object exists, but it cannot be used as a constructor\n if (typeof CustomEvent === 'function') {\n return new CustomEvent(eventName, {\n detail,\n });\n }\n // CustomEvent constructor API not supported (ie11)\n // Using `new Event` or `new CustomEvent` does not work in ie11\n const event = document.createEvent('CustomEvent');\n const params = {\n bubbles: true,\n cancellable: true,\n detail,\n };\n event.initCustomEvent(eventName, params.bubbles, params.cancellable, params.detail);\n return event;\n};\nconst firePortalEvent = (eventName, zIndex) => {\n const event = getEvent(eventName, zIndex);\n window.dispatchEvent(event);\n};\nconst getPortalParent = () => {\n const parentElement = document.querySelector('body > .atlaskit-portal-container');\n if (!parentElement) {\n const parent = document.createElement('div');\n parent.setAttribute('class', 'atlaskit-portal-container');\n parent.setAttribute('style', `display: flex;`);\n getBody().appendChild(parent);\n return parent;\n }\n return parentElement;\n};\n// This is a generic component does two things:\n// 1. Portals it's children using React.createPortal\n// 2. Creates the DOM node container for the portal based on props\n// 3. Ensures DOM the container creates it's own stacking context\nclass Portal extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n container: canUseDOM ? createContainer(this.props.zIndex) : undefined,\n portalIsMounted: false,\n };\n }\n componentDidUpdate(prevProps, prevState) {\n const { container } = this.state;\n const { zIndex } = this.props;\n if (container && prevProps.zIndex !== zIndex) {\n const newContainer = createContainer(zIndex);\n getPortalParent().replaceChild(container, newContainer);\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ container: newContainer });\n }\n else if (!prevState.container && container) {\n // SSR path\n getPortalParent().appendChild(container);\n }\n }\n componentDidMount() {\n const { container } = this.state;\n const { zIndex } = this.props;\n if (container) {\n getPortalParent().appendChild(container);\n }\n else {\n // SSR path\n const newContainer = createContainer(zIndex);\n // eslint-disable-next-line react/no-did-mount-set-state\n this.setState({ container: newContainer });\n }\n // eslint-disable-next-line react/no-did-mount-set-state\n this.setState({\n portalIsMounted: true,\n });\n firePortalEvent(PORTAL_MOUNT_EVENT, Number(zIndex));\n }\n componentWillUnmount() {\n const { container } = this.state;\n const { zIndex } = this.props;\n if (container) {\n getPortalParent().removeChild(container);\n // clean up parent element if there are no more portals\n const portals = !!document.querySelector('body > .atlaskit-portal-container > .atlaskit-portal');\n if (!portals) {\n getBody().removeChild(getPortalParent());\n }\n }\n firePortalEvent(PORTAL_UNMOUNT_EVENT, Number(zIndex));\n }\n render() {\n const { container, portalIsMounted } = this.state;\n return container && portalIsMounted\n ? ReactDOM.createPortal(this.props.children, container)\n : null;\n }\n}\nPortal.defaultProps = {\n zIndex: 0,\n};\nexport default Portal;\n//# sourceMappingURL=Portal.js.map","export const PORTAL_MOUNT_EVENT = 'akPortalMount';\nexport const PORTAL_UNMOUNT_EVENT = 'akPortalUnmount';\n//# sourceMappingURL=constants.js.map","// ideally this would be fetched from ../constants but that causes a\n// circular dep loop. This will be refactored as part of a breaking\n// change in the future.\nconst DEFAULT_THEME_MODE = 'light';\nconst THEME_MODES = ['light', 'dark'];\n// Resolves the different types of theme objects in the current API\nexport default function getTheme(props) {\n if (props && props.theme) {\n // Theme is the global Atlaskit theme\n if ('__ATLASKIT_THEME__' in props.theme) {\n return props.theme.__ATLASKIT_THEME__;\n }\n // User has provided alternative modes\n else if ('mode' in props.theme && THEME_MODES.includes(props.theme.mode)) {\n return props.theme;\n }\n }\n // If format not supported (or no theme provided), return standard theme\n return { mode: DEFAULT_THEME_MODE };\n}\n//# sourceMappingURL=getTheme.js.map","/* eslint-disable prefer-rest-params */\nimport getTheme from './getTheme';\n// Unpack custom variants, and get correct value for the current theme\nfunction themedVariants(variantProp, variants) {\n return (props) => {\n const theme = getTheme(props);\n if (props && props[variantProp] && variants) {\n const modes = variants[props[variantProp]];\n if (modes && modes[theme.mode]) {\n const value = modes[theme.mode];\n if (value)\n return value; // TS believes value can be undefined\n }\n }\n return '';\n };\n}\nexport default function themed(modesOrVariant, variantModes) {\n if (typeof modesOrVariant === 'string') {\n return themedVariants(modesOrVariant, variantModes);\n }\n const modes = modesOrVariant;\n return (props) => {\n // Get theme from the user's props\n const theme = getTheme(props);\n // User isn't required to provide both light and dark values\n if (theme.mode in modes) {\n const value = modes[theme.mode]; // TS believes value can be undefined\n if (value)\n return value;\n }\n return '';\n };\n}\n//# sourceMappingURL=themed.js.map","import themed from './utils/themed';\n// Reds\nexport const R50 = '#FFEBE6';\nexport const R75 = '#FFBDAD';\nexport const R100 = '#FF8F73';\nexport const R200 = '#FF7452';\nexport const R300 = '#FF5630';\nexport const R400 = '#DE350B';\nexport const R500 = '#BF2600';\n// Yellows\nexport const Y50 = '#FFFAE6';\nexport const Y75 = '#FFF0B3';\nexport const Y100 = '#FFE380';\nexport const Y200 = '#FFC400';\nexport const Y300 = '#FFAB00';\nexport const Y400 = '#FF991F';\nexport const Y500 = '#FF8B00';\n// Greens\nexport const G50 = '#E3FCEF';\nexport const G75 = '#ABF5D1';\nexport const G100 = '#79F2C0';\nexport const G200 = '#57D9A3';\nexport const G300 = '#36B37E';\nexport const G400 = '#00875A';\nexport const G500 = '#006644';\n// Blues\nexport const B50 = '#DEEBFF';\nexport const B75 = '#B3D4FF';\nexport const B100 = '#4C9AFF';\nexport const B200 = '#2684FF';\nexport const B300 = '#0065FF';\nexport const B400 = '#0052CC';\nexport const B500 = '#0747A6';\n// Purples\nexport const P50 = '#EAE6FF';\nexport const P75 = '#C0B6F2';\nexport const P100 = '#998DD9';\nexport const P200 = '#8777D9';\nexport const P300 = '#6554C0';\nexport const P400 = '#5243AA';\nexport const P500 = '#403294';\n// Teals\nexport const T50 = '#E6FCFF';\nexport const T75 = '#B3F5FF';\nexport const T100 = '#79E2F2';\nexport const T200 = '#00C7E6';\nexport const T300 = '#00B8D9';\nexport const T400 = '#00A3BF';\nexport const T500 = '#008DA6';\n// Neutrals\nexport const N0 = '#FFFFFF';\nexport const N10 = '#FAFBFC';\nexport const N20 = '#F4F5F7';\nexport const N30 = '#EBECF0';\nexport const N40 = '#DFE1E6';\nexport const N50 = '#C1C7D0';\nexport const N60 = '#B3BAC5';\nexport const N70 = '#A5ADBA';\nexport const N80 = '#97A0AF';\nexport const N90 = '#8993A4';\nexport const N100 = '#7A869A';\nexport const N200 = '#6B778C';\nexport const N300 = '#5E6C84';\nexport const N400 = '#505F79';\nexport const N500 = '#42526E';\nexport const N600 = '#344563';\nexport const N700 = '#253858';\nexport const N800 = '#172B4D';\n// ATTENTION: update the tints if you update this\nexport const N900 = '#091E42';\n// Each tint is made of N900 and an alpha channel\nexport const N10A = 'rgba(9, 30, 66, 0.02)';\nexport const N20A = 'rgba(9, 30, 66, 0.04)';\nexport const N30A = 'rgba(9, 30, 66, 0.08)';\nexport const N40A = 'rgba(9, 30, 66, 0.13)';\nexport const N50A = 'rgba(9, 30, 66, 0.25)';\nexport const N60A = 'rgba(9, 30, 66, 0.31)';\nexport const N70A = 'rgba(9, 30, 66, 0.36)';\nexport const N80A = 'rgba(9, 30, 66, 0.42)';\nexport const N90A = 'rgba(9, 30, 66, 0.48)';\nexport const N100A = 'rgba(9, 30, 66, 0.54)';\nexport const N200A = 'rgba(9, 30, 66, 0.60)';\nexport const N300A = 'rgba(9, 30, 66, 0.66)';\nexport const N400A = 'rgba(9, 30, 66, 0.71)';\nexport const N500A = 'rgba(9, 30, 66, 0.77)';\nexport const N600A = 'rgba(9, 30, 66, 0.82)';\nexport const N700A = 'rgba(9, 30, 66, 0.89)';\nexport const N800A = 'rgba(9, 30, 66, 0.95)';\n// Dark Mode Neutrals\nexport const DN900 = '#E6EDFA';\nexport const DN800 = '#DCE5F5';\nexport const DN700 = '#CED9EB';\nexport const DN600 = '#B8C7E0';\nexport const DN500 = '#ABBBD6';\nexport const DN400 = '#9FB0CC';\nexport const DN300 = '#8C9CB8';\nexport const DN200 = '#7988A3';\nexport const DN100 = '#67758F';\nexport const DN90 = '#56637A';\nexport const DN80 = '#455166';\nexport const DN70 = '#3B475C';\nexport const DN60 = '#313D52';\nexport const DN50 = '#283447';\nexport const DN40 = '#202B3D';\nexport const DN30 = '#1B2638';\nexport const DN20 = '#121A29';\nexport const DN10 = '#0E1624';\n// ATTENTION: update the tints if you update this\nexport const DN0 = '#0D1424';\n// Each dark tint is made of DN0 and an alpha channel\nexport const DN800A = 'rgba(13, 20, 36, 0.06)';\nexport const DN700A = 'rgba(13, 20, 36, 0.14)';\nexport const DN600A = 'rgba(13, 20, 36, 0.18)';\nexport const DN500A = 'rgba(13, 20, 36, 0.29)';\nexport const DN400A = 'rgba(13, 20, 36, 0.36)';\nexport const DN300A = 'rgba(13, 20, 36, 0.40)';\nexport const DN200A = 'rgba(13, 20, 36, 0.47)';\nexport const DN100A = 'rgba(13, 20, 36, 0.53)';\nexport const DN90A = 'rgba(13, 20, 36, 0.63)';\nexport const DN80A = 'rgba(13, 20, 36, 0.73)';\nexport const DN70A = 'rgba(13, 20, 36, 0.78)';\nexport const DN60A = 'rgba(13, 20, 36, 0.81)';\nexport const DN50A = 'rgba(13, 20, 36, 0.85)';\nexport const DN40A = 'rgba(13, 20, 36, 0.89)';\nexport const DN30A = 'rgba(13, 20, 36, 0.92)';\nexport const DN20A = 'rgba(13, 20, 36, 0.95)';\nexport const DN10A = 'rgba(13, 20, 36, 0.97)';\n// Themed colors\nexport const background = themed({ light: N0, dark: DN30 });\nexport const backgroundActive = themed({ light: B50, dark: B75 });\nexport const backgroundHover = themed({ light: N30, dark: DN70 });\nexport const backgroundOnLayer = themed({ light: N0, dark: DN50 });\nexport const text = themed({ light: N900, dark: DN600 });\nexport const textHover = themed({ light: N800, dark: DN600 });\nexport const textActive = themed({ light: B400, dark: B400 });\nexport const subtleText = themed({ light: N200, dark: DN300 });\nexport const placeholderText = themed({ light: N100, dark: DN200 });\nexport const heading = themed({ light: N800, dark: DN600 });\nexport const subtleHeading = themed({ light: N200, dark: DN300 });\nexport const codeBlock = themed({ light: N20, dark: DN50 });\nexport const link = themed({ light: B400, dark: B100 });\nexport const linkHover = themed({ light: B300, dark: B200 });\nexport const linkActive = themed({ light: B500, dark: B100 });\nexport const linkOutline = themed({ light: B100, dark: B200 });\nexport const primary = themed({ light: B400, dark: B100 });\nexport const blue = themed({ light: B400, dark: B100 });\nexport const teal = themed({ light: T300, dark: T200 });\nexport const purple = themed({ light: P300, dark: P100 });\nexport const red = themed({ light: R300, dark: R300 });\nexport const yellow = themed({ light: Y300, dark: Y300 });\nexport const green = themed({ light: G300, dark: G300 });\nexport const skeleton = () => N20A;\n//# sourceMappingURL=colors.js.map","import styled from 'styled-components';\nimport { DN0, DN600, N0, N800 } from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { borderRadius, layers } from '@atlaskit/theme/constants';\nconst backgroundColor = themed({\n light: N800,\n dark: DN0,\n});\nconst textColor = themed({\n light: N0,\n dark: DN600,\n});\nexport const TooltipPrimitive = styled.div `\n z-index: ${layers.tooltip};\n pointer-events: none;\n position: fixed;\n`;\nexport const Tooltip = styled(TooltipPrimitive) `\n background-color: ${backgroundColor};\n border-radius: ${borderRadius}px;\n box-sizing: border-box;\n color: ${textColor};\n font-size: 12px;\n left: 0;\n line-height: 1.3;\n max-width: 240px;\n padding: 2px 6px;\n top: 0;\n /* Edge does not support overflow-wrap */\n word-wrap: break-word;\n overflow-wrap: break-word;\n\n ${({ truncate }) => truncate &&\n `\n max-width: 420px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `}\n`;\n// The inline-block here is needed to keep the tooltip appearing in the correct position\n// when nested inside a wider parent (see position: relative example).\nexport const Target = styled.div `\n display: inline-block;\n`;\n//# sourceMappingURL=styled.js.map","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n * \n * I'm a fade Transition!\n *
\n * )}\n * \n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * \n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","import React from 'react';\nimport { Transition } from 'react-transition-group';\nconst ENTER_DURATION = 120;\nconst EXIT_DURATION = 80;\nconst easing = 'cubic-bezier(0.23, 1, 0.32, 1)'; // easeOutQuint\nconst defaultStyle = (timeout) => ({\n transition: `transform ${timeout.enter}ms ${easing}, opacity ${timeout.enter}ms linear`,\n opacity: 0,\n});\nconst transitionStyle = (state) => {\n const transitions = {\n entering: {},\n entered: {\n opacity: 1,\n },\n exiting: {\n opacity: 0,\n },\n };\n return transitions[state];\n};\nconst getStyle = (timeout, state) => () => ({\n ...defaultStyle(timeout),\n ...transitionStyle(state),\n});\nconst Animation = ({ children, immediatelyHide, immediatelyShow, onExited, in: inProp, }) => {\n const timeout = {\n enter: immediatelyShow ? 0 : ENTER_DURATION,\n exit: immediatelyHide ? 0 : EXIT_DURATION,\n };\n return (React.createElement(Transition, { timeout: timeout, in: inProp, onExited: onExited, unmountOnExit: true, appear: true }, (state) => children(getStyle(timeout, state))));\n};\nexport default Animation;\n//# sourceMappingURL=Animation.js.map","import { name as packageName, version as packageVersion, } from '../../version.json';\nexport const hoveredPayload = {\n action: 'displayed',\n actionSubject: 'tooltip',\n attributes: {\n componentName: 'tooltip',\n packageName,\n packageVersion,\n },\n};\nexport const unhoveredPayload = {\n action: 'hidden',\n actionSubject: 'tooltip',\n attributes: {\n componentName: 'tooltip',\n packageName,\n packageVersion,\n },\n};\n//# sourceMappingURL=analytics-payloads.js.map","/* eslint-disable react/require-default-props */\nimport React from 'react';\nimport flushable from 'flushable';\nimport NodeResolver from 'react-node-resolver';\nimport { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents, } from '@atlaskit/analytics-next';\nimport { Popper } from '@atlaskit/popper';\nimport Portal from '@atlaskit/portal';\nimport { layers } from '@atlaskit/theme/constants';\nimport { Tooltip as StyledTooltip } from '../styled';\nimport { name as packageName, version as packageVersion, } from '../version.json';\nimport Animation from './Animation';\nimport { hoveredPayload, unhoveredPayload } from './utils/analytics-payloads';\nconst SCROLL_OPTIONS = { capture: true, passive: true };\nfunction getMousePosition(mouseCoordinates) {\n const safeMouse = mouseCoordinates || { top: 0, left: 0 };\n const getBoundingClientRect = () => {\n return {\n top: safeMouse.top,\n left: safeMouse.left,\n bottom: safeMouse.top,\n right: safeMouse.left,\n width: 0,\n height: 0,\n };\n };\n return {\n getBoundingClientRect,\n clientWidth: 0,\n clientHeight: 0,\n };\n}\nlet pendingHide;\nconst showTooltip = (fn, defaultDelay) => {\n const isHidePending = pendingHide && pendingHide.pending();\n if (isHidePending) {\n pendingHide.flush();\n }\n const pendingShow = flushable(() => fn(isHidePending), isHidePending ? 0 : defaultDelay);\n return pendingShow.cancel;\n};\nconst hideTooltip = (fn, defaultDelay) => {\n pendingHide = flushable(flushed => fn(flushed), defaultDelay);\n return pendingHide.cancel;\n};\nclass Tooltip extends React.Component {\n constructor() {\n super(...arguments);\n this.wrapperRef = null;\n this.targetRef = null;\n this.cancelPendingSetState = () => { };\n this.userInteraction = 'mouse';\n this.state = {\n immediatelyHide: false,\n immediatelyShow: false,\n isVisible: false,\n renderTooltip: false,\n };\n this.handleWindowScroll = () => {\n if (this.state.isVisible) {\n this.cancelPendingSetState();\n this.setState({ isVisible: false, immediatelyHide: true });\n }\n };\n this.handleMouseClick = () => {\n if (this.props.hideTooltipOnClick) {\n this.cancelPendingSetState();\n this.setState({ isVisible: false, immediatelyHide: true });\n }\n };\n this.handleMouseDown = () => {\n if (this.props.hideTooltipOnMouseDown) {\n this.cancelPendingSetState();\n this.setState({ isVisible: false, immediatelyHide: true });\n }\n };\n this.handleMouseOver = (e) => {\n if (e.target === this.wrapperRef) {\n return;\n }\n this.userInteraction = 'mouse';\n // In the case where a tooltip is newly rendered but immediately becomes hovered,\n // we need to set the coordinates in the mouseOver event.\n if (!this.fakeMouseElement) {\n this.fakeMouseElement = getMousePosition({\n left: e.clientX,\n top: e.clientY,\n });\n }\n this.handleShowTooltip();\n };\n this.handleFocus = () => {\n this.userInteraction = 'keyboard';\n // We need to fake the mouse dimensions even on focus because the code path currently assumes\n // fake mouse element needs to exist before showing the tooltip.\n if (!this.fakeMouseElement) {\n this.fakeMouseElement = getMousePosition({\n left: 0,\n top: 0,\n });\n }\n this.handleShowTooltip();\n };\n this.handleShowTooltip = () => {\n this.cancelPendingSetState();\n if (Boolean(this.props.content) && !this.state.isVisible) {\n this.cancelPendingSetState = showTooltip(immediatelyShow => {\n this.setState({\n isVisible: true,\n renderTooltip: true,\n immediatelyShow,\n });\n }, this.props.delay || 0);\n }\n };\n this.handleHideTooltip = (e) => {\n if (e.target === this.wrapperRef) {\n return;\n }\n this.cancelPendingSetState();\n if (this.state.isVisible) {\n this.cancelPendingSetState = hideTooltip(immediatelyHide => {\n this.setState({ isVisible: false, immediatelyHide });\n }, this.props.delay || 0);\n }\n };\n // Update mouse coordinates, used when position is 'mouse'.\n // We are not debouncing/throttling this function because we aren't causing any\n // re-renders or performaing any intensive calculations, we're just updating a value.\n // React also doesn't play nice debounced DOM event handlers because they pool their\n // SyntheticEvent objects. Need to use event.persist as a workaround - https://stackoverflow.com/a/24679479/893630\n this.handleMouseMove = (event) => {\n if (!this.state.renderTooltip) {\n this.fakeMouseElement = getMousePosition({\n left: event.clientX,\n top: event.clientY,\n });\n }\n };\n }\n componentWillUnmount() {\n this.cancelPendingSetState();\n this.removeScrollListener();\n }\n componentDidUpdate(_prevProps, prevState) {\n if (!prevState.isVisible && this.state.isVisible) {\n if (this.props.onShow)\n this.props.onShow();\n window.addEventListener('scroll', this.handleWindowScroll, SCROLL_OPTIONS);\n }\n else if (prevState.isVisible && !this.state.isVisible) {\n if (this.props.onHide)\n this.props.onHide();\n this.removeScrollListener();\n }\n }\n removeScrollListener() {\n window.removeEventListener('scroll', this.handleWindowScroll, SCROLL_OPTIONS);\n }\n shouldPositionTooltipNearMouse() {\n const { position } = this.props;\n return position === 'mouse' && this.userInteraction === 'mouse';\n }\n render() {\n const { children, position, mousePosition, content, truncate, component: TooltipContainer, tag: TargetContainer, testId, } = this.props;\n const { isVisible, renderTooltip, immediatelyShow, immediatelyHide, } = this.state;\n const tooltipPosition = position === 'mouse' ? mousePosition : position;\n return (\n /* eslint-disable jsx-a11y/mouse-events-have-key-events */\n React.createElement(React.Fragment, null,\n TargetContainer && (React.createElement(TargetContainer, { onClick: this.handleMouseClick, onMouseOver: this.handleMouseOver, onMouseOut: this.handleHideTooltip, onMouseMove: this.handleMouseMove, onMouseDown: this.handleMouseDown, onFocus: this.handleFocus, onBlur: this.handleHideTooltip, ref: (wrapperRef) => {\n this.wrapperRef = wrapperRef;\n } },\n React.createElement(NodeResolver, { innerRef: (ref) => {\n this.targetRef = ref;\n } }, React.Children.only(children)))),\n renderTooltip && this.targetRef && this.fakeMouseElement ? (React.createElement(Portal, { zIndex: layers.tooltip() },\n React.createElement(Popper, { placement: tooltipPosition, referenceElement: \n // https://github.com/FezVrasta/react-popper#usage-without-a-reference-htmlelement\n // We are using a popper technique to pass in a faked element when we use mouse.\n (this.shouldPositionTooltipNearMouse()\n ? this.fakeMouseElement\n : this.targetRef) }, ({ ref, style }) => TooltipContainer && (React.createElement(Animation, { immediatelyShow: immediatelyShow, immediatelyHide: immediatelyHide, onExited: () => this.setState({ renderTooltip: false }), in: isVisible }, getAnimationStyles => (React.createElement(TooltipContainer\n // innerRef can't be null so shortcircuit to undefined if it is.\n , { \n // innerRef can't be null so shortcircuit to undefined if it is.\n innerRef: ref || undefined, className: \"Tooltip\", style: {\n ...getAnimationStyles(),\n ...style,\n }, truncate: truncate || false, \"data-placement\": tooltipPosition, \"data-testid\": testId }, content))))))) : null)\n /* eslint-enable */\n );\n }\n}\nTooltip.defaultProps = {\n component: StyledTooltip,\n delay: 300,\n mousePosition: 'bottom',\n position: 'bottom',\n tag: 'div',\n};\nexport { Tooltip as TooltipWithoutAnalytics };\nconst createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');\nexport default withAnalyticsContext({\n componentName: 'tooltip',\n packageName,\n packageVersion,\n})(withAnalyticsEvents({\n onHide: unhoveredPayload,\n onShow: createAndFireEventOnAtlaskit({ ...hoveredPayload }),\n})(Tooltip));\n//# sourceMappingURL=Tooltip.js.map","export default (function (channel) { return function (payload) { return function (createAnalyticsEvent) {\n var consumerEvent = createAnalyticsEvent(payload);\n var clonedEvent = consumerEvent.clone();\n if (clonedEvent) {\n clonedEvent.fire(channel);\n }\n return consumerEvent;\n}; }; });\n//# sourceMappingURL=createAndFireEvent.js.map","import { __assign, __rest } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContext from './AnalyticsContext';\nvar withAnalyticsContext = function (defaultData) { return function (WrappedComponent) {\n var WithAnalyticsContext = React.forwardRef(function (props, ref) {\n var _a = props.analyticsContext, analyticsContext = _a === void 0 ? {} : _a, rest = __rest(props, [\"analyticsContext\"]);\n var analyticsData = __assign(__assign({}, defaultData), analyticsContext);\n return (React.createElement(AnalyticsContext, { data: analyticsData },\n React.createElement(WrappedComponent, __assign({}, rest, { ref: ref }))));\n });\n // @ts-ignore\n WithAnalyticsContext.displayName = \"WithAnalyticsContext(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsContext;\n}; };\nexport default withAnalyticsContext;\n//# sourceMappingURL=withAnalyticsContext.js.map","import { __assign } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContextConsumer from './AnalyticsContextConsumer';\nvar withAnalyticsEvents = function (createEventMap) { return function (WrappedComponent) {\n var WithAnalyticsEvents = React.forwardRef(function (props, ref) { return (React.createElement(AnalyticsContextConsumer, { createEventMap: createEventMap, wrappedComponentProps: props }, function (_a) {\n var createAnalyticsEvent = _a.createAnalyticsEvent, patchedEventProps = _a.patchedEventProps;\n return (React.createElement(WrappedComponent, __assign({}, props, patchedEventProps, { createAnalyticsEvent: createAnalyticsEvent, ref: ref })));\n })); });\n // @ts-ignore\n WithAnalyticsEvents.displayName = \"WithAnalyticsEvents(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsEvents;\n}; };\nexport default withAnalyticsEvents;\n//# sourceMappingURL=withAnalyticsEvents.js.map","import { css } from 'styled-components';\nimport { B100, N30A, skeleton as skeletonColor } from './colors';\nexport const FLATTENED = '__FLATTENED__';\nexport const CHANNEL = '__ATLASKIT_THEME__';\nexport const DEFAULT_THEME_MODE = 'light';\nexport const THEME_MODES = ['light', 'dark'];\n/*\n These theme values are expressed as functions so that if we decide to make\n them dependent on props in the future, it wouldn't require a significant\n refactor everywhere they are being used.\n*/\nexport const borderRadius = () => 3;\nexport const gridSize = () => 8;\nexport const fontSize = () => 14;\nexport const fontSizeSmall = () => 11;\nexport const fontFamily = () => `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif`;\nexport const codeFontFamily = () => `'SFMono-Medium', 'SF Mono', 'Segoe UI Mono', 'Roboto Mono', 'Ubuntu Mono', Menlo, Consolas, Courier, monospace`;\nexport const focusRing = (color = B100, outlineWidth = gridSize() / 4) => `\n &:focus {\n outline: none;\n box-shadow: 0px 0px 0px ${outlineWidth}px ${color};\n }\n`;\nexport const noFocusRing = () => `\n box-shadow: none;\n`;\nexport const layers = {\n card: () => 100,\n dialog: () => 300,\n navigation: () => 200,\n layer: () => 400,\n blanket: () => 500,\n modal: () => 510,\n flag: () => 600,\n spotlight: () => 700,\n tooltip: () => 800,\n};\nexport const visuallyHidden = () => ({\n border: '0 !important',\n clip: 'rect(1px, 1px, 1px, 1px) !important',\n height: '1px !important',\n overflow: 'hidden !important',\n padding: '0 !important',\n position: 'absolute !important',\n width: '1px !important',\n whiteSpace: 'nowrap !important',\n});\n/**\n * Deprecated Styled Components mixin.\n * Use visuallyHidden instead.\n * @deprecated\n */\nexport const assistive = () => css `\n border: 0 !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n height: 1px !important;\n overflow: hidden !important;\n padding: 0 !important;\n position: absolute !important;\n width: 1px !important;\n white-space: nowrap !important;\n`;\nexport const skeletonShimmer = () => ({\n css: {\n backgroundColor: skeletonColor(),\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n animationDirection: 'alternate',\n },\n keyframes: {\n from: {\n backgroundColor: skeletonColor(),\n },\n to: {\n backgroundColor: N30A,\n },\n },\n});\n//# sourceMappingURL=constants.js.map","// If a generic is used here, props can be inferred never and passed up (even with defaults)\nexport function add(fn, addend) {\n return (props) => fn(props) + addend;\n}\nexport function subtract(fn, subtrahend) {\n return (props) => fn(props) - subtrahend;\n}\nexport function multiply(fn, factor) {\n return (props) => fn(props) * factor;\n}\nexport function divide(fn, divisor) {\n return (props) => fn(props) / divisor;\n}\n//# sourceMappingURL=math.js.map","import styled, { css } from 'styled-components';\nimport * as colors from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { fontSize, gridSize } from '@atlaskit/theme/constants';\nimport { divide, multiply } from '@atlaskit/theme/math';\nvar activeBackgroundColor = themed({\n light: colors.B75,\n dark: colors.DN30\n});\nvar hoverBackgroundColor = themed({\n light: colors.N20,\n dark: colors.DN60\n});\nvar selectedBackgroundColor = themed({\n light: colors.N0,\n dark: colors.DN30\n});\nvar activePrimaryTextColor = themed({\n light: colors.N800,\n dark: colors.DN300\n});\nvar defaultPrimaryTextColor = themed({\n light: colors.N800,\n dark: colors.DN600\n});\nvar disabledPrimaryTextColor = themed({\n light: colors.N70,\n dark: colors.DN70\n});\nvar primaryPrimaryTextColor = themed({\n light: colors.B400,\n dark: colors.B400\n});\nvar selectedPrimaryTextColor = themed({\n light: colors.N800,\n dark: colors.N800\n});\nvar focusedStyles = css([\"\\n box-shadow: 0 0 0 2px \", \"\\n inset;\\n outline: none;\\n outline-offset: 0;\\n position: relative; /* prevents bgcolor of a hovered element from obfuscating focus ring of a focused sibling element */\\n\"], themed({\n light: colors.B100,\n dark: colors.B75\n}));\nvar activeStyles = css([\"\\n &,\\n &:hover {\\n background-color: \", \";\\n color: \", \";\\n }\\n\"], selectedBackgroundColor, selectedPrimaryTextColor);\nvar primaryStyles = css([\"\\n color: \", \";\\n\"], primaryPrimaryTextColor);\n\nvar sharedStyles = function sharedStyles(props) {\n return css([\"\\n align-items: center;\\n box-sizing: border-box;\\n color: \", \";\\n cursor: \", \";\\n display: \", \";\\n flex-wrap: nowrap;\\n font-size: \", \"px;\\n font-weight: normal;\\n padding: 0 \", \"px;\\n text-decoration: none;\\n\\n &:hover {\\n background-color: \", \";\\n color: \", \";\\n text-decoration: none;\\n\\n \", \";\\n }\\n &:active {\\n background-color: \", \";\\n color: \", \";\\n\\n \", \";\\n }\\n &:focus {\\n \", \";\\n }\\n\\n \", \" \", \" \", \";\\n\"], props.isDisabled ? disabledPrimaryTextColor : defaultPrimaryTextColor, props.isDisabled ? 'not-allowed' : 'pointer', props.isHidden ? 'none' : 'flex', fontSize, multiply(gridSize, 1.5), !props.isDisabled && hoverBackgroundColor, props.isDisabled ? disabledPrimaryTextColor : defaultPrimaryTextColor, props.isPrimary && primaryStyles, !props.isDisabled && activeBackgroundColor, !props.isDisabled && activePrimaryTextColor, props.isPrimary && primaryStyles, focusedStyles, props.isFocused && focusedStyles, props.isActive && activeStyles, props.isPrimary && primaryStyles);\n};\n\nexport var Anchor = styled.a.withConfig({\n displayName: \"Item__Anchor\",\n componentId: \"aiqnor-0\"\n})([\"\\n \", \";\\n\"], function (props) {\n return sharedStyles(props);\n});\nexport var Span = styled.span.withConfig({\n displayName: \"Item__Span\",\n componentId: \"aiqnor-1\"\n})([\"\\n \", \";\\n\"], function (props) {\n return sharedStyles(props);\n}); // Checkbox/Radio wrapper -- sits left of the children\n\nexport var InputWrapper = styled.span.withConfig({\n displayName: \"Item__InputWrapper\",\n componentId: \"aiqnor-2\"\n})([\"\\n display: flex;\\n margin: 0 2px;\\n\"]); // Elements injected before/after the children\n\nexport var Before = styled.span.withConfig({\n displayName: \"Item__Before\",\n componentId: \"aiqnor-3\"\n})([\"\\n display: flex;\\n\"]);\nexport var After = styled.span.withConfig({\n displayName: \"Item__After\",\n componentId: \"aiqnor-4\"\n})([\"\\n align-items: center;\\n display: flex;\\n\"]); // Alignment and layout for the children\n\nexport var ContentWrapper = styled.span.withConfig({\n displayName: \"Item__ContentWrapper\",\n componentId: \"aiqnor-5\"\n})([\"\\n display: flex;\\n flex-direction: column;\\n margin: 0 \", \"px;\\n padding: \", \"px 0;\\n overflow: hidden;\\n\\n &:first-child {\\n margin: 0;\\n }\\n\"], gridSize, gridSize);\nexport var Content = styled.span.withConfig({\n displayName: \"Item__Content\",\n componentId: \"aiqnor-6\"\n})([\"\\n flex: 1 1 auto;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n \", \";\\n\"], function (props) {\n return props.allowMultiline && css([\"\\n white-space: normal;\\n \"]);\n}); // Description is a block element below the children, like a subtitle\n\nexport var Description = styled.span.withConfig({\n displayName: \"Item__Description\",\n componentId: \"aiqnor-7\"\n})([\"\\n color: \", \";\\n flex: 1 1 auto;\\n font-size: 12px;\\n line-height: 16 / 12;\\n margin-top: \", \"px;\\n\"], colors.subtleText, divide(gridSize, 2)); // NOTE: Exposed as a named export for this package\n\nexport var SecondaryText = styled.span.withConfig({\n displayName: \"Item__SecondaryText\",\n componentId: \"aiqnor-8\"\n})([\"\\n color: \", \";\\n\"], colors.subtleText);","import * as colors from '@atlaskit/theme/colors';\nexport function getInputBackground(_ref) {\n var isChecked = _ref.isChecked,\n isDisabled = _ref.isDisabled,\n isHovered = _ref.isHovered,\n isPressed = _ref.isPressed;\n var background = colors.N40;\n if (isHovered) background = colors.N50;\n if (isPressed) background = colors.B200;\n if (isChecked) background = colors.B400;\n if (isDisabled) background = colors.N20;\n if (isChecked && isDisabled) background = colors.N600;\n return background;\n}\nexport function getInputFill(appearanceProps) {\n return appearanceProps.isChecked ? colors.N0 : 'transparent';\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\n/* eslint-disable react/prop-types */\nimport React, { PureComponent } from 'react';\nimport { Anchor, Span } from '../styled/Item';\nexport var supportsVoiceOver = function supportsVoiceOver() {\n return /Mac OS X/.test(navigator.userAgent);\n};\nexport var getAriaRoles = function getAriaRoles() {\n return {\n checkbox: supportsVoiceOver() ? 'checkbox' : 'menuitemcheckbox',\n link: 'menuitem',\n option: 'option',\n radio: supportsVoiceOver() ? 'radio' : 'menuitemradio'\n };\n};\nexport var baseTypes = {\n default: 'link',\n values: ['link', 'radio', 'checkbox', 'option']\n};\n\nvar Element =\n/*#__PURE__*/\nfunction (_PureComponent) {\n _inherits(Element, _PureComponent);\n\n function Element() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Element);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Element)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"handleMouseDown\", function (e) {\n e.preventDefault();\n\n _this.props.handleMouseDown();\n });\n\n return _this;\n }\n\n _createClass(Element, [{\n key: \"render\",\n value: function render() {\n var props = this.props;\n var isActive = props.isActive,\n isChecked = props.isChecked,\n isDisabled = props.isDisabled,\n isFocused = props.isFocused,\n isHidden = props.isHidden,\n isSelected = props.isSelected,\n isPrimary = props.isPrimary;\n var type = this.props.type || '';\n var appearanceProps = {\n isActive: isActive,\n isChecked: isChecked,\n isDisabled: isDisabled,\n isFocused: isFocused,\n isHidden: isHidden,\n isSelected: isSelected,\n isPrimary: isPrimary\n };\n var ariaProps = {\n 'aria-checked': !!isChecked,\n 'aria-disabled': !!isDisabled,\n 'aria-hidden': !!isHidden,\n 'aria-selected': !!isSelected\n };\n var ariaRoles = getAriaRoles();\n var commonProps = {\n 'data-role': 'droplistItem',\n onClick: props.handleClick,\n onKeyPress: props.handleKeyPress,\n onMouseDown: this.handleMouseDown,\n onMouseOut: props.handleMouseOut,\n onMouseOver: props.handleMouseOver,\n onMouseUp: props.handleMouseUp,\n role: ariaRoles[type],\n title: props.title,\n tabIndex: props.type === 'option' ? null : 0\n };\n var testingProps = process.env.NODE_ENV === 'test' ? {\n 'data-test-active': isActive,\n 'data-test-checked': isChecked,\n 'data-test-disabled': isDisabled,\n 'data-test-hidden': isHidden,\n 'data-test-selected': isSelected\n } : {};\n\n var consolidatedProps = _objectSpread({}, appearanceProps, ariaProps, commonProps, testingProps);\n\n if (props.href && !isDisabled) {\n return React.createElement(Anchor, _extends({\n href: props.href,\n target: props.target\n }, consolidatedProps), props.children);\n }\n\n return React.createElement(Span, consolidatedProps, props.children);\n }\n }]);\n\n return Element;\n}(PureComponent);\n\nexport { Element as default };","import _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\n/* eslint-disable react/prop-types */\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';\nimport Checkbox from '@atlaskit/icon/glyph/checkbox';\nimport Radio from '@atlaskit/icon/glyph/radio';\nimport Tooltip from '@atlaskit/tooltip';\nimport { After, Before, Content, ContentWrapper, Description, InputWrapper } from '../styled/Item';\nimport { getInputBackground, getInputFill } from '../utils';\nimport { name as packageName, version as packageVersion } from '../version.json';\nimport Element from './Element';\nvar inputTypes = {\n checkbox: Checkbox,\n radio: Radio\n};\n\nvar Item =\n/*#__PURE__*/\nfunction (_PureComponent) {\n _inherits(Item, _PureComponent);\n\n function Item() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Item);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Item)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n isHovered: false,\n isPressed: false\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidMount\", function () {\n return document.addEventListener('mouseup', _this.handleMouseUp);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentWillUnmount\", function () {\n return document.removeEventListener('mouseup', _this.handleMouseUp);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"guardedActivate\", function (event) {\n var _this$props = _this.props,\n isDisabled = _this$props.isDisabled,\n onActivate = _this$props.onActivate;\n if (!isDisabled && onActivate) onActivate({\n item: _assertThisInitialized(_this),\n event: event\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClick\", function (event) {\n return _this.guardedActivate(event);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleKeyPress\", function (event) {\n var keyIsValid = ['Enter', ' '].indexOf(event.key) > -1;\n if (keyIsValid) _this.guardedActivate(event);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleMouseDown\", function () {\n return _this.setState({\n isPressed: true\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleMouseUp\", function () {\n return _this.setState({\n isPressed: false\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleMouseOut\", function () {\n return _this.setState({\n isHovered: false\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleMouseOver\", function () {\n return _this.setState({\n isHovered: true\n });\n });\n\n return _this;\n }\n\n _createClass(Item, [{\n key: \"render\",\n value: function render() {\n var props = this.props;\n var _this$state = this.state,\n isHovered = _this$state.isHovered,\n isPressed = _this$state.isPressed;\n var type = props.type || '';\n var hasInput = ['checkbox', 'radio'].indexOf(type) > -1;\n var Input = inputTypes[type];\n var appearanceProps = {\n isActive: props.type === 'link' && props.isActive || props.type === 'option' && props.isSelected,\n isChecked: ['checkbox', 'radio'].indexOf(type) > -1 && props.isChecked,\n isDisabled: props.isDisabled,\n isFocused: props.isFocused,\n isHidden: props.isHidden,\n isHovered: isHovered,\n isPressed: isPressed,\n isSelected: type === 'option' && props.isSelected,\n isPrimary: props.appearance === 'primary'\n };\n var element = React.createElement(Element, _extends({}, appearanceProps, {\n handleClick: this.handleClick,\n handleKeyPress: this.handleKeyPress,\n handleMouseOut: this.handleMouseOut,\n handleMouseOver: this.handleMouseOver,\n handleMouseUp: this.handleMouseUp,\n handleMouseDown: this.handleMouseDown,\n href: props.href,\n target: props.target,\n title: props.title,\n type: props.type\n }), hasInput && React.createElement(InputWrapper, appearanceProps, React.createElement(Input, {\n label: \"\",\n primaryColor: getInputBackground(appearanceProps),\n secondaryColor: getInputFill(appearanceProps),\n size: \"medium\"\n })), !!props.elemBefore && React.createElement(Before, null, props.elemBefore), React.createElement(ContentWrapper, null, React.createElement(Content, {\n allowMultiline: this.context.shouldAllowMultilineItems\n }, props.children), !!props.description && React.createElement(Description, null, props.description)), !!props.elemAfter && React.createElement(After, null, props.elemAfter));\n return React.createElement(\"span\", {\n role: \"presentation\"\n }, props.tooltipDescription ? React.createElement(Tooltip, {\n content: props.tooltipDescription,\n position: props.tooltipPosition\n }, element) : element);\n }\n }]);\n\n return Item;\n}(PureComponent);\n\n_defineProperty(Item, \"defaultProps\", {\n appearance: 'default',\n children: null,\n description: '',\n elemAfter: null,\n elemBefore: null,\n href: null,\n isActive: false,\n isChecked: false,\n isDisabled: false,\n isFocused: false,\n isHidden: false,\n isSelected: false,\n itemContext: 'menu',\n onActivate: function onActivate() {},\n target: null,\n title: null,\n tooltipDescription: null,\n tooltipPosition: 'right',\n type: 'link'\n});\n\n_defineProperty(Item, \"contextTypes\", {\n shouldAllowMultilineItems: PropTypes.bool\n});\n\nexport { Item as DroplistItemWithoutAnalytics };\nvar createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');\nexport default withAnalyticsContext({\n componentName: 'droplistItem',\n packageName: packageName,\n packageVersion: packageVersion\n})(withAnalyticsEvents({\n onActivate: createAndFireEventOnAtlaskit({\n action: 'selected',\n actionSubject: 'droplistItem',\n attributes: {\n componentName: 'droplistItem',\n packageName: packageName,\n packageVersion: packageVersion\n }\n })\n})(Item));","import styled from 'styled-components';\nimport { DN300, N300 } from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport { multiply } from '@atlaskit/theme/math';\nexport default styled.div.withConfig({\n displayName: \"Group\",\n componentId: \"sc-1q26u8b-0\"\n})([\"\\n box-sizing: border-box;\\n display: block;\\n margin-top: \", \"px;\\n\\n &:first-child {\\n margin-top: 0;\\n }\\n\"], gridSize);\nexport var Heading = styled.div.withConfig({\n displayName: \"Group__Heading\",\n componentId: \"sc-1q26u8b-1\"\n})([\"\\n align-items: baseline;\\n color: \", \";\\n display: flex;\\n flex: 1 1 auto;\\n font-weight: normal;\\n font-size: 14px;\\n line-height: 1;\\n margin: 0;\\n padding: \", \"px \", \"px;\\n\"], themed({\n light: N300,\n dark: DN300\n}), gridSize, multiply(gridSize, 1.5));\nexport var HeadingAfter = styled.div.withConfig({\n displayName: \"Group__HeadingAfter\",\n componentId: \"sc-1q26u8b-2\"\n})([\"\\n flex: 0 0 auto;\\n\"]);\nexport var HeadingText = styled.div.withConfig({\n displayName: \"Group__HeadingText\",\n componentId: \"sc-1q26u8b-3\"\n})([\"\\n flex: 1 1 auto;\\n font-size: 12px;\\n text-transform: uppercase;\\n\"]);","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\n/* eslint-disable react/prop-types */\nimport React, { PureComponent } from 'react';\nimport Group, { Heading, HeadingAfter, HeadingText } from '../styled/Group';\n\nvar DroplistGroup =\n/*#__PURE__*/\nfunction (_PureComponent) {\n _inherits(DroplistGroup, _PureComponent);\n\n function DroplistGroup() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, DroplistGroup);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DroplistGroup)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n ariaLabel: _this.props.heading\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidMount\", function () {\n if (_this.props.heading || _this.props.elemAfter) {\n _this.setState({\n ariaLabel: _this.getAriaLabel()\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidUpdate\", function () {\n if (_this.props.heading || _this.props.elemAfter) {\n // eslint-disable-next-line react/no-did-update-set-state\n _this.setState({\n ariaLabel: _this.getAriaLabel()\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getAriaLabel\", function () {\n var _this$props = _this.props,\n elemAfter = _this$props.elemAfter,\n heading = _this$props.heading;\n var afterText = elemAfter && typeof elemAfter === 'string' ? elemAfter : _this.headingElement && _this.headingElement.textContent;\n return \"\".concat(heading || '', \" \").concat(afterText || '');\n });\n\n return _this;\n }\n\n _createClass(DroplistGroup, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n children = _this$props2.children,\n elemAfter = _this$props2.elemAfter,\n heading = _this$props2.heading;\n var ariaLabel = this.state.ariaLabel;\n return React.createElement(Group, {\n \"aria-label\": ariaLabel,\n role: \"group\"\n }, heading ? React.createElement(Heading, {\n \"aria-hidden\": \"true\",\n \"data-role\": \"droplistGroupHeading\"\n }, React.createElement(HeadingText, null, heading), elemAfter ? React.createElement(HeadingAfter, {\n innerRef: function innerRef(r) {\n _this2.headingElement = r;\n }\n }, elemAfter) : null) : null, children);\n }\n }]);\n\n return DroplistGroup;\n}(PureComponent);\n\nDroplistGroup.displayName = 'Group';\nexport default DroplistGroup;","import React from 'react';\nimport styled from 'styled-components';\nimport ScrollLock from 'react-scrolllock';\nvar Blanket = styled.div.withConfig({\n displayName: \"ScrollBlock__Blanket\",\n componentId: \"sc-1xiww8k-0\"\n})([\"\\n position: fixed;\\n top: 0;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n background: transparent;\\n\"]);\nexport default function ScrollBlock() {\n return React.createElement(Blanket, null, React.createElement(ScrollLock, null));\n}","var positionMap = {\n 'top left': {\n position: 'top-start',\n animation: 'top'\n },\n 'top center': {\n position: 'top',\n animation: 'top'\n },\n 'top right': {\n position: 'top-end',\n animation: 'top'\n },\n 'right top': {\n position: 'right-start',\n animation: 'right'\n },\n 'right middle': {\n position: 'right',\n animation: 'right'\n },\n 'right bottom': {\n position: 'right-end',\n animation: 'right'\n },\n 'bottom left': {\n position: 'bottom-start',\n animation: 'bottom'\n },\n 'bottom center': {\n position: 'bottom',\n animation: 'bottom'\n },\n 'bottom right': {\n position: 'bottom-end',\n animation: 'bottom'\n },\n 'left top': {\n position: 'left-start',\n animation: 'left'\n },\n 'left middle': {\n position: 'left',\n animation: 'left'\n },\n 'left bottom': {\n position: 'left-end',\n animation: 'left'\n }\n};\nexport var POSITION_ATTRIBUTE_ENUM = {\n values: ['top left', 'top center', 'top right', 'right top', 'right middle', 'right bottom', 'bottom left', 'bottom center', 'bottom right', 'left top', 'left middle', 'left bottom'],\n default: 'right middle'\n};\n\nfunction positionToPopper(position) {\n return position && positionMap[position] ? positionMap[position].position : null;\n}\n/* Convert the autoFlip property into the array format that Popper expects.\n * The first item must not include the edge-position variation, or Popper will not understand it.\n */\n\n\nexport function getFlipBehavior(props) {\n return props.position && Array.isArray(props.autoFlip) ? [props.position.split(' ')[0]].concat(props.autoFlip) : null;\n}\nexport function positionPropToPopperPosition(position) {\n return positionToPopper(position) || positionMap[POSITION_ATTRIBUTE_ENUM.default].position;\n}","import styled from 'styled-components';\nexport default styled.div.withConfig({\n displayName: \"styledContentContainer\",\n componentId: \"p0j3f7-0\"\n})([\"\\n [data-role='droplistContent'] {\\n \", \";\\n }\\n\"], function (_ref) {\n var maxHeight = _ref.maxHeight;\n return maxHeight ? \"max-height: \".concat(maxHeight, \"px\") : '';\n});","import _objectSpread from \"@babel/runtime/helpers/objectSpread\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\n/* eslint-disable react/prop-types */\nimport React, { Component } from 'react';\nimport styled from 'styled-components';\nimport rafSchedule from 'raf-schd';\nimport Popper from 'popper.js'; // eslint-disable-line import/extensions\n\nimport ScrollBlock from './internal/ScrollBlock';\nimport { getFlipBehavior, positionPropToPopperPosition } from './internal/helpers';\nimport ContentContainer from '../styledContentContainer'; // We create a dummy target when making the menu fixed so that we can force popper.js to use fixed positioning\n// without affecting child layout of the actual target since children of fixed position elements can't use percentage\n// heights/widths.\n\nvar FixedTarget = styled.div.withConfig({\n displayName: \"Layer__FixedTarget\",\n componentId: \"qunuuz-0\"\n})([\"\\n \", \";\\n\"], function (_ref) {\n var fixedOffset = _ref.fixedOffset,\n targetRef = _ref.targetRef;\n\n if (fixedOffset && targetRef) {\n var actualTarget = targetRef.firstChild;\n var rect = actualTarget.getBoundingClientRect();\n return \"\\n position: fixed;\\n top: \".concat(fixedOffset.top, \"px;\\n left: \").concat(fixedOffset.left, \"px;\\n height: \").concat(rect.height, \"px;\\n width: \").concat(rect.width, \"px;\\n z-index: -1;\\n \");\n }\n\n return 'display: none;';\n});\n\nif (process.env.NODE_ENV !== 'production' && !process.env.CI) {\n // eslint-disable-next-line no-console\n console.warn('@atlaskit/layer has been deprecated. It is an internal component and should not be used directly.');\n}\n\nvar Layer =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Layer, _Component);\n\n // working with extract-react-types\n function Layer(props) {\n var _this;\n\n _classCallCheck(this, Layer);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Layer).call(this, props));\n\n _defineProperty(_assertThisInitialized(_this), \"popper\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"targetRef\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"contentRef\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"fixedRef\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"extractStyles\", function (state) {\n if (state) {\n var popperHeight = state.offsets.popper.height;\n var left = Math.round(state.offsets.popper.left); // The offset position is sometimes an object and sometimes just a string...\n\n var cssPosition = _typeof(state.offsets.popper.position) === 'object' ? state.offsets.popper.position.position : state.offsets.popper.position;\n\n var top = _this.fixPositionTopUnderflow(state.offsets.popper.top, cssPosition);\n\n var originalHeight = _this.state.originalHeight || popperHeight;\n\n var maxHeight = _this.calculateMaxHeight(originalHeight, popperHeight, top, cssPosition);\n\n _this.setState({\n // position: fixed or absolute\n cssPosition: cssPosition,\n hasExtractedStyles: true,\n transform: \"translate3d(\".concat(left, \"px, \").concat(top, \"px, 0px)\"),\n // state.flipped is either true or undefined\n flipped: !!state.flipped,\n actualPosition: state.position,\n originalPosition: state.originalPosition,\n originalHeight: originalHeight,\n maxHeight: maxHeight\n });\n }\n });\n\n _this.state = {\n hasExtractedStyles: false,\n position: null,\n transform: null,\n flipped: false,\n actualPosition: null,\n // We set these default offsets to prevent a flash of popper content in the wrong position\n // which can cause incorrect height calculations. Popper will calculate these values\n offsets: {\n popper: {\n left: -9999,\n top: -9999\n }\n },\n originalPosition: null,\n // fix Safari parent width: https://product-fabric.atlassian.net/browse/ED-1784\n cssPosition: 'absolute',\n originalHeight: null,\n maxHeight: null,\n fixedOffset: null\n };\n _this.extractStyles = rafSchedule(_this.extractStyles.bind(_assertThisInitialized(_this)));\n return _this;\n }\n\n _createClass(Layer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.applyPopper(this.props);\n this.calculateFixedOffset(this.props);\n }\n }, {\n key: \"UNSAFE_componentWillReceiveProps\",\n value: function UNSAFE_componentWillReceiveProps(nextProps) {\n this.applyPopper(nextProps);\n this.calculateFixedOffset(nextProps);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n var _this$props = this.props,\n onFlippedChange = _this$props.onFlippedChange,\n onPositioned = _this$props.onPositioned;\n var _this$state = this.state,\n flipped = _this$state.flipped,\n actualPosition = _this$state.actualPosition,\n originalPosition = _this$state.originalPosition,\n hasExtractedStyles = _this$state.hasExtractedStyles;\n\n if (prevState.flipped !== flipped && onFlippedChange) {\n onFlippedChange({\n flipped: flipped,\n actualPosition: actualPosition,\n originalPosition: originalPosition\n });\n } // This flag is set the first time the position is calculated from Popper and applied to the content\n\n\n if (!prevState.hasExtractedStyles && hasExtractedStyles && onPositioned) {\n onPositioned();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.extractStyles.cancel();\n\n if (this.popper) {\n this.popper.destroy();\n }\n }\n /* Calculate the max height of the popper if it's height is greater than the viewport to prevent\n * the bottom of the popper not being viewable.\n * Only works if the popper uses viewport as the boundary and has a fixed position ancestor.\n */\n\n }, {\n key: \"calculateMaxHeight\",\n value: function calculateMaxHeight(originalHeight, currentHeight, positionTop, cssPosition) {\n var DocumentElementClientHeight = 0;\n\n if (document.documentElement) {\n DocumentElementClientHeight = document.documentElement.clientHeight;\n }\n\n if (cssPosition !== 'fixed' || this.props.boundariesElement !== 'viewport') {\n return null;\n }\n\n var viewportHeight = Math.max(DocumentElementClientHeight, window.innerHeight || 0);\n return viewportHeight < originalHeight && currentHeight + positionTop >= viewportHeight - 50 ? // allow some spacing either side of viewport height\n viewportHeight - 12 : null;\n }\n /* Popper may return either a fixed or absolute position which would be applied to the\n * content style. In order to overcome clipping issues for overflow containing blocks when\n * the position is absolute, we create a fixed position wrapper.\n */\n\n }, {\n key: \"calculateFixedOffset\",\n value: function calculateFixedOffset(props) {\n var isAlwaysFixed = props.isAlwaysFixed;\n\n if (isAlwaysFixed && this.targetRef) {\n var actualTarget = this.targetRef.firstChild;\n this.setState({\n fixedOffset: {\n top: actualTarget.getBoundingClientRect().top,\n left: actualTarget.getBoundingClientRect().left\n }\n });\n } else if (!isAlwaysFixed && this.state.fixedOffset !== null) {\n this.setState({\n fixedOffset: null\n });\n }\n }\n /* Clamp fixed position to the window for fixed position poppers that flow off the top of the\n * window.\n * A fixed position popper is a popper who has an ancestor with position: fixed.\n *\n * It is too difficult to fix this for non-fixed position poppers without re-implementing popper's\n * offset functionality or fixing the issue upstream.\n */\n // eslint-disable-next-line class-methods-use-this\n\n }, {\n key: \"fixPositionTopUnderflow\",\n value: function fixPositionTopUnderflow(popperTop, cssPosition) {\n return popperTop >= 0 || cssPosition !== 'fixed' ? Math.round(popperTop) : 0;\n }\n }, {\n key: \"applyPopper\",\n value: function applyPopper(props) {\n if (!this.fixedRef || !this.targetRef || !this.contentRef) {\n return;\n }\n\n if (this.popper) {\n this.popper.destroy();\n } // \"new Popper(...)\" operation is very expensive when called on virtual DOM.\n // This condition reduces the number of calls so we can run our tests faster\n // (time was reduced from 100s to 13s).\n\n\n if (!props.content) {\n return;\n } // we wrap our target in a div so that we can safely get a reference to it, but we pass the\n // actual target to popper\n\n\n var actualTarget = props.isAlwaysFixed ? this.fixedRef : this.targetRef.firstChild;\n var popperOpts = {\n placement: positionPropToPopperPosition(props.position),\n onCreate: this.extractStyles,\n onUpdate: this.extractStyles,\n modifiers: {\n applyStyle: {\n enabled: false\n },\n hide: {\n enabled: false\n },\n offset: {\n enabled: true,\n offset: this.props.offset\n },\n flip: {\n enabled: !!this.props.autoFlip,\n flipVariations: true,\n boundariesElement: this.props.boundariesElement,\n padding: 0 // leave 0 pixels between popper and the boundariesElement\n\n },\n preventOverflow: {\n enabled: !!this.props.autoFlip,\n escapeWithReference: !(this.props.boundariesElement === 'scrollParent')\n }\n },\n positionFixed: props.isAlwaysFixed\n };\n var flipBehavior = getFlipBehavior(props);\n\n if (flipBehavior) {\n popperOpts.modifiers.flip.behavior = flipBehavior;\n }\n\n this.popper = new Popper(actualTarget, this.contentRef, popperOpts);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n zIndex = _this$props2.zIndex,\n lockScroll = _this$props2.lockScroll;\n var _this$state2 = this.state,\n cssPosition = _this$state2.cssPosition,\n transform = _this$state2.transform,\n hasExtractedStyles = _this$state2.hasExtractedStyles,\n maxHeight = _this$state2.maxHeight,\n fixedOffset = _this$state2.fixedOffset;\n var opacity = hasExtractedStyles ? {} : {\n opacity: 0\n };\n return React.createElement(\"div\", null, React.createElement(\"div\", {\n ref: function ref(_ref2) {\n _this2.targetRef = _ref2;\n }\n }, this.props.children), React.createElement(FixedTarget, {\n targetRef: this.targetRef,\n fixedOffset: fixedOffset\n }, React.createElement(\"div\", {\n style: {\n height: '100%',\n width: '100%'\n },\n ref: function ref(_ref3) {\n _this2.fixedRef = _ref3;\n }\n })), lockScroll && React.createElement(ScrollBlock, null), React.createElement(ContentContainer, {\n maxHeight: maxHeight\n }, React.createElement(\"div\", {\n ref: function ref(_ref4) {\n _this2.contentRef = _ref4;\n },\n style: _objectSpread({\n top: 0,\n left: 0,\n position: cssPosition,\n transform: transform,\n zIndex: zIndex\n }, opacity)\n }, this.props.content)));\n }\n }]);\n\n return Layer;\n}(Component);\n\n_defineProperty(Layer, \"defaultProps\", {\n autoFlip: true,\n boundariesElement: 'viewport',\n children: null,\n content: null,\n offset: '0, 0',\n onFlippedChange: function onFlippedChange() {},\n position: 'right middle',\n zIndex: 400,\n lockScroll: false,\n isAlwaysFixed: false,\n onPositioned: function onPositioned() {}\n});\n\nexport { Layer as default };","\n\nexport default (function (fn) {\n var lastArgs = [];\n var frameId = null;\n\n var wrapperFn = function wrapperFn() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n lastArgs = args;\n\n if (frameId) {\n return frameId;\n }\n\n frameId = requestAnimationFrame(function () {\n frameId = null;\n fn.apply(undefined, lastArgs);\n });\n\n return frameId;\n };\n\n wrapperFn.cancel = function () {\n if (!frameId) {\n return;\n }\n\n cancelAnimationFrame(frameId);\n frameId = null;\n };\n\n var resultFn = wrapperFn;\n\n return resultFn;\n});","import { createTheme } from '../utils/createTheme';\n// Create default global light theme\nexport default createTheme(() => ({\n mode: 'light',\n}));\n//# sourceMappingURL=Theme.js.map","import React, { createContext, useContext, useCallback, } from 'react';\n/*\ncreateTheme is used to create a set of Providers and Consumers for theming components.\n- Takes a default theme function; this theme function gets a set of props, and returns tokens\n based on those props. An example of this default theme function is one that produces the standard\n appearance of the component\n- Returns two things - a Provider that allow for additional themes to be applied, and a Consumer\n that can get the current theme and fetch it.\n*/\nexport function createTheme(defaultGetTokens) {\n const emptyThemeFn = (getTokens, props) => getTokens(props);\n /* Internally, Theme uses React Context, with internal providers and consumers.\n The React Context passes only a function that gets props, and turns them into tokens. This\n function gets mixed as more Providers with their own themes are added. This mixed function\n is ultimately picked up by Consumers, which implement a context consumer internally to fetch\n the theme. */\n const ThemeContext = createContext(defaultGetTokens);\n // The Theme Consumer takes a function as its child - this function takes tokens, and the\n // return value is generally a set of nodes with the tokens applied appropriately.\n function Consumer(props) {\n const { children, ...themeProps } = props;\n const theme = useContext(ThemeContext);\n const themeFn = theme || emptyThemeFn;\n // @ts-ignore See issue for more info: https://github.com/Microsoft/TypeScript/issues/10727\n // Argument of type 'Pick ReactNode; }, Exclude>' is not assignable to parameter of type 'ThemeProps'.ts(2345)\n const tokens = themeFn(themeProps);\n // We add a fragment to ensure we don't break people upgrading.\n // Previously they may have been able to pass in undefined without things blowing up.\n return React.createElement(React.Fragment, null, children(tokens));\n }\n /* The Theme Provider takes regular nodes as its child, but also takes a *theme function*\n - The theme function takes a set of props, as well as a function (getTokens) that can\n turn props into tokens.\n - The getTokens function isn't called immediately - instead the props are passed\n through a mix of parent theming functions\n Children of this provider will receive this mixed theme\n */\n function Provider(props) {\n const themeFn = useContext(ThemeContext);\n const valueFn = props.value || emptyThemeFn;\n const mixedFn = useCallback((themeProps) => valueFn(themeFn, themeProps), [themeFn, valueFn]);\n return (React.createElement(ThemeContext.Provider, { value: mixedFn }, props.children));\n }\n return { Consumer, Provider };\n}\n//# sourceMappingURL=createTheme.js.map","export const presetSizes = {\n xsmall: 8,\n small: 16,\n medium: 24,\n large: 48,\n xlarge: 96,\n};\n//# sourceMappingURL=constants.js.map","/** @jsx jsx */\nimport React from 'react';\nimport { css, jsx, keyframes } from '@emotion/core';\nimport { DN500, DN900, N0, N500 } from '@atlaskit/theme/colors';\nimport GlobalTheme from '@atlaskit/theme/components';\nimport { presetSizes } from './constants';\nconst rotate = keyframes `\n to { transform: rotate(360deg); }\n`;\n// There are three parts to the load in animation:\n// 1. Fade in\n// 2. Accelerated spin\n// 3. Stretch the spinner line\nconst loadIn = keyframes `\n from {\n transform: rotate(50deg);\n opacity: 0;\n stroke-dashoffset: 60;\n }\n to {\n transform: rotate(230deg);\n opacity: 1;\n stroke-dashoffset: 50;\n }\n`;\nfunction getStrokeColor({ mode, appearance, }) {\n if (mode === 'light') {\n return appearance === 'inherit' ? N500 : N0;\n }\n // Dark mode: colours provided by Jake Miller\n return appearance === 'inherit' ? DN900 : DN500;\n}\nexport default React.memo(React.forwardRef(function Spinner({ testId, appearance = 'inherit', delay = 0, size: providedSize = 'medium', }, ref) {\n const size = typeof providedSize === 'number'\n ? providedSize\n : presetSizes[providedSize];\n return (jsx(GlobalTheme.Consumer, null, (tokens) => {\n const strokeColor = getStrokeColor({\n mode: tokens.mode,\n appearance,\n });\n // The Spinner animation uses a combination of two\n // css animations on two separate elements.\n return (jsx(\"svg\", { focusable: \"false\", height: size, width: size, viewBox: \"0 0 16 16\", xmlns: \"http://www.w3.org/2000/svg\", \"data-testid\": testId, ref: ref, css: css `\n /* align better inline with text */\n vertical-align: middle;\n /* We are going to animate this in */\n opacity: 0;\n\n animation: ${loadIn} 1s ease-in-out;\n /* When the animation completes, stay at the last frame of the animation */\n animation-fill-mode: forwards;\n animation-delay: ${delay}ms;\n ` },\n jsx(\"circle\", { cx: \"8\", cy: \"8\", r: \"7\", css: css `\n fill: none;\n stroke: ${strokeColor};\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-dasharray: 60;\n stroke-dashoffset: inherit;\n transform-origin: center;\n animation: ${rotate} 0.86s infinite;\n animation-delay: ${delay}ms;\n animation-timing-function: cubic-bezier(0.4, 0.15, 0.6, 0.85);\n ` })));\n }));\n}));\n//# sourceMappingURL=spinner.js.map","import styled, { css } from 'styled-components';\nimport { backgroundOnLayer, N50A, N60A } from '@atlaskit/theme/colors';\nimport { borderRadius, gridSize } from '@atlaskit/theme/constants';\nimport { divide, multiply } from '@atlaskit/theme/math';\n/* When dropdown contains more than 9 elements (droplist items, droplist groups),\n * it should have scroll and cut off half of the 10th item to indicate that there are more\n * items then are seen. This was previously calculated by mapping over children, but with\n * the current composed API it is simpler to just assume 9 items. */\n\nvar getMaxHeight = function getMaxHeight(_ref) {\n var isTall = _ref.isTall,\n maxHeight = _ref.maxHeight;\n if (maxHeight) return \"\".concat(maxHeight, \"px\");\n var heightWithoutPadding = 17;\n var verticalPadding = gridSize();\n var height = heightWithoutPadding + verticalPadding * 2;\n var defaultMaxHeight = 9.5 * height + verticalPadding / 2;\n return isTall ? '90vh' : \"\".concat(defaultMaxHeight, \"px\");\n};\n\nexport default styled.div.withConfig({\n displayName: \"Droplist\",\n componentId: \"sc-1z05y4v-0\"\n})([\"\\n display: inline-flex;\\n\\n \", \";\\n\"], function (props) {\n return props.fit && \"\\n display: block;\\n flex: 1 1 auto;\\n \";\n});\nvar backgroundColor = backgroundOnLayer;\nvar boxShadow = css([\"\\n box-shadow: 0 \", \"px \", \"px -\", \"px\\n \", \",\\n 0 0 1px \", \";\\n\"], divide(gridSize, 2), gridSize, divide(gridSize, 4), N50A, N60A);\nexport var Content = styled.div.withConfig({\n displayName: \"Droplist__Content\",\n componentId: \"sc-1z05y4v-1\"\n})([\"\\n background: \", \";\\n border-radius: \", \"px;\\n \", \";\\n box-sizing: border-box;\\n overflow: auto;\\n padding: \", \"px 0;\\n max-height: \", \";\\n\"], backgroundColor, borderRadius, boxShadow, divide(gridSize, 2), getMaxHeight);\nexport var SpinnerContainer = styled.div.withConfig({\n displayName: \"Droplist__SpinnerContainer\",\n componentId: \"sc-1z05y4v-2\"\n})([\"\\n display: flex;\\n justify-content: center;\\n min-width: \", \"px;\\n padding: \", \"px;\\n\"], multiply(gridSize, 20), multiply(gridSize, 2.5));\nexport var Trigger = styled.div.withConfig({\n displayName: \"Droplist__Trigger\",\n componentId: \"sc-1z05y4v-3\"\n})([\"\\n display: inline-flex;\\n transition-duration: 0.2s;\\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\\n\\n \", \";\\n\"], function (props) {\n return props.fit && \"\\n box-sizing: border-box;\\n display: block;\\n \";\n});","import { css } from 'styled-components';\nimport { B100, N30A, skeleton as skeletonColor } from './colors';\nexport const FLATTENED = '__FLATTENED__';\nexport const CHANNEL = '__ATLASKIT_THEME__';\nexport const DEFAULT_THEME_MODE = 'light';\nexport const THEME_MODES = ['light', 'dark'];\n/*\n These theme values are expressed as functions so that if we decide to make\n them dependent on props in the future, it wouldn't require a significant\n refactor everywhere they are being used.\n*/\nexport const borderRadius = () => 3;\nexport const gridSize = () => 8;\nexport const fontSize = () => 14;\nexport const fontSizeSmall = () => 11;\nexport const fontFamily = () => `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif`;\nexport const codeFontFamily = () => `'SFMono-Medium', 'SF Mono', 'Segoe UI Mono', 'Roboto Mono', 'Ubuntu Mono', Menlo, Consolas, Courier, monospace`;\nexport const focusRing = (color = B100, outlineWidth = gridSize() / 4) => `\n &:focus {\n outline: none;\n box-shadow: 0px 0px 0px ${outlineWidth}px ${color};\n }\n`;\nexport const noFocusRing = () => `\n box-shadow: none;\n`;\nexport const layers = {\n card: () => 100,\n dialog: () => 300,\n navigation: () => 200,\n layer: () => 400,\n blanket: () => 500,\n modal: () => 510,\n flag: () => 600,\n spotlight: () => 700,\n tooltip: () => 800,\n};\nexport const visuallyHidden = () => ({\n border: '0 !important',\n clip: 'rect(1px, 1px, 1px, 1px) !important',\n height: '1px !important',\n overflow: 'hidden !important',\n padding: '0 !important',\n position: 'absolute !important',\n width: '1px !important',\n whiteSpace: 'nowrap !important',\n});\n/**\n * Deprecated Styled Components mixin.\n * Use visuallyHidden instead.\n * @deprecated\n */\nexport const assistive = () => css `\n border: 0 !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n height: 1px !important;\n overflow: hidden !important;\n padding: 0 !important;\n position: absolute !important;\n width: 1px !important;\n white-space: nowrap !important;\n`;\nexport const skeletonShimmer = () => ({\n css: {\n backgroundColor: skeletonColor(),\n animationDuration: '1.5s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n animationDirection: 'alternate',\n },\n keyframes: {\n from: {\n backgroundColor: skeletonColor(),\n },\n to: {\n backgroundColor: N30A,\n },\n },\n});\n//# sourceMappingURL=constants.js.map","// ideally this would be fetched from ../constants but that causes a\n// circular dep loop. This will be refactored as part of a breaking\n// change in the future.\nconst DEFAULT_THEME_MODE = 'light';\nconst THEME_MODES = ['light', 'dark'];\n// Resolves the different types of theme objects in the current API\nexport default function getTheme(props) {\n if (props && props.theme) {\n // Theme is the global Atlaskit theme\n if ('__ATLASKIT_THEME__' in props.theme) {\n return props.theme.__ATLASKIT_THEME__;\n }\n // User has provided alternative modes\n else if ('mode' in props.theme && THEME_MODES.includes(props.theme.mode)) {\n return props.theme;\n }\n }\n // If format not supported (or no theme provided), return standard theme\n return { mode: DEFAULT_THEME_MODE };\n}\n//# sourceMappingURL=getTheme.js.map","/* eslint-disable prefer-rest-params */\nimport getTheme from './getTheme';\n// Unpack custom variants, and get correct value for the current theme\nfunction themedVariants(variantProp, variants) {\n return (props) => {\n const theme = getTheme(props);\n if (props && props[variantProp] && variants) {\n const modes = variants[props[variantProp]];\n if (modes && modes[theme.mode]) {\n const value = modes[theme.mode];\n if (value)\n return value; // TS believes value can be undefined\n }\n }\n return '';\n };\n}\nexport default function themed(modesOrVariant, variantModes) {\n if (typeof modesOrVariant === 'string') {\n return themedVariants(modesOrVariant, variantModes);\n }\n const modes = modesOrVariant;\n return (props) => {\n // Get theme from the user's props\n const theme = getTheme(props);\n // User isn't required to provide both light and dark values\n if (theme.mode in modes) {\n const value = modes[theme.mode]; // TS believes value can be undefined\n if (value)\n return value;\n }\n return '';\n };\n}\n//# sourceMappingURL=themed.js.map","import themed from './utils/themed';\n// Reds\nexport const R50 = '#FFEBE6';\nexport const R75 = '#FFBDAD';\nexport const R100 = '#FF8F73';\nexport const R200 = '#FF7452';\nexport const R300 = '#FF5630';\nexport const R400 = '#DE350B';\nexport const R500 = '#BF2600';\n// Yellows\nexport const Y50 = '#FFFAE6';\nexport const Y75 = '#FFF0B3';\nexport const Y100 = '#FFE380';\nexport const Y200 = '#FFC400';\nexport const Y300 = '#FFAB00';\nexport const Y400 = '#FF991F';\nexport const Y500 = '#FF8B00';\n// Greens\nexport const G50 = '#E3FCEF';\nexport const G75 = '#ABF5D1';\nexport const G100 = '#79F2C0';\nexport const G200 = '#57D9A3';\nexport const G300 = '#36B37E';\nexport const G400 = '#00875A';\nexport const G500 = '#006644';\n// Blues\nexport const B50 = '#DEEBFF';\nexport const B75 = '#B3D4FF';\nexport const B100 = '#4C9AFF';\nexport const B200 = '#2684FF';\nexport const B300 = '#0065FF';\nexport const B400 = '#0052CC';\nexport const B500 = '#0747A6';\n// Purples\nexport const P50 = '#EAE6FF';\nexport const P75 = '#C0B6F2';\nexport const P100 = '#998DD9';\nexport const P200 = '#8777D9';\nexport const P300 = '#6554C0';\nexport const P400 = '#5243AA';\nexport const P500 = '#403294';\n// Teals\nexport const T50 = '#E6FCFF';\nexport const T75 = '#B3F5FF';\nexport const T100 = '#79E2F2';\nexport const T200 = '#00C7E6';\nexport const T300 = '#00B8D9';\nexport const T400 = '#00A3BF';\nexport const T500 = '#008DA6';\n// Neutrals\nexport const N0 = '#FFFFFF';\nexport const N10 = '#FAFBFC';\nexport const N20 = '#F4F5F7';\nexport const N30 = '#EBECF0';\nexport const N40 = '#DFE1E6';\nexport const N50 = '#C1C7D0';\nexport const N60 = '#B3BAC5';\nexport const N70 = '#A5ADBA';\nexport const N80 = '#97A0AF';\nexport const N90 = '#8993A4';\nexport const N100 = '#7A869A';\nexport const N200 = '#6B778C';\nexport const N300 = '#5E6C84';\nexport const N400 = '#505F79';\nexport const N500 = '#42526E';\nexport const N600 = '#344563';\nexport const N700 = '#253858';\nexport const N800 = '#172B4D';\n// ATTENTION: update the tints if you update this\nexport const N900 = '#091E42';\n// Each tint is made of N900 and an alpha channel\nexport const N10A = 'rgba(9, 30, 66, 0.02)';\nexport const N20A = 'rgba(9, 30, 66, 0.04)';\nexport const N30A = 'rgba(9, 30, 66, 0.08)';\nexport const N40A = 'rgba(9, 30, 66, 0.13)';\nexport const N50A = 'rgba(9, 30, 66, 0.25)';\nexport const N60A = 'rgba(9, 30, 66, 0.31)';\nexport const N70A = 'rgba(9, 30, 66, 0.36)';\nexport const N80A = 'rgba(9, 30, 66, 0.42)';\nexport const N90A = 'rgba(9, 30, 66, 0.48)';\nexport const N100A = 'rgba(9, 30, 66, 0.54)';\nexport const N200A = 'rgba(9, 30, 66, 0.60)';\nexport const N300A = 'rgba(9, 30, 66, 0.66)';\nexport const N400A = 'rgba(9, 30, 66, 0.71)';\nexport const N500A = 'rgba(9, 30, 66, 0.77)';\nexport const N600A = 'rgba(9, 30, 66, 0.82)';\nexport const N700A = 'rgba(9, 30, 66, 0.89)';\nexport const N800A = 'rgba(9, 30, 66, 0.95)';\n// Dark Mode Neutrals\nexport const DN900 = '#E6EDFA';\nexport const DN800 = '#DCE5F5';\nexport const DN700 = '#CED9EB';\nexport const DN600 = '#B8C7E0';\nexport const DN500 = '#ABBBD6';\nexport const DN400 = '#9FB0CC';\nexport const DN300 = '#8C9CB8';\nexport const DN200 = '#7988A3';\nexport const DN100 = '#67758F';\nexport const DN90 = '#56637A';\nexport const DN80 = '#455166';\nexport const DN70 = '#3B475C';\nexport const DN60 = '#313D52';\nexport const DN50 = '#283447';\nexport const DN40 = '#202B3D';\nexport const DN30 = '#1B2638';\nexport const DN20 = '#121A29';\nexport const DN10 = '#0E1624';\n// ATTENTION: update the tints if you update this\nexport const DN0 = '#0D1424';\n// Each dark tint is made of DN0 and an alpha channel\nexport const DN800A = 'rgba(13, 20, 36, 0.06)';\nexport const DN700A = 'rgba(13, 20, 36, 0.14)';\nexport const DN600A = 'rgba(13, 20, 36, 0.18)';\nexport const DN500A = 'rgba(13, 20, 36, 0.29)';\nexport const DN400A = 'rgba(13, 20, 36, 0.36)';\nexport const DN300A = 'rgba(13, 20, 36, 0.40)';\nexport const DN200A = 'rgba(13, 20, 36, 0.47)';\nexport const DN100A = 'rgba(13, 20, 36, 0.53)';\nexport const DN90A = 'rgba(13, 20, 36, 0.63)';\nexport const DN80A = 'rgba(13, 20, 36, 0.73)';\nexport const DN70A = 'rgba(13, 20, 36, 0.78)';\nexport const DN60A = 'rgba(13, 20, 36, 0.81)';\nexport const DN50A = 'rgba(13, 20, 36, 0.85)';\nexport const DN40A = 'rgba(13, 20, 36, 0.89)';\nexport const DN30A = 'rgba(13, 20, 36, 0.92)';\nexport const DN20A = 'rgba(13, 20, 36, 0.95)';\nexport const DN10A = 'rgba(13, 20, 36, 0.97)';\n// Themed colors\nexport const background = themed({ light: N0, dark: DN30 });\nexport const backgroundActive = themed({ light: B50, dark: B75 });\nexport const backgroundHover = themed({ light: N30, dark: DN70 });\nexport const backgroundOnLayer = themed({ light: N0, dark: DN50 });\nexport const text = themed({ light: N900, dark: DN600 });\nexport const textHover = themed({ light: N800, dark: DN600 });\nexport const textActive = themed({ light: B400, dark: B400 });\nexport const subtleText = themed({ light: N200, dark: DN300 });\nexport const placeholderText = themed({ light: N100, dark: DN200 });\nexport const heading = themed({ light: N800, dark: DN600 });\nexport const subtleHeading = themed({ light: N200, dark: DN300 });\nexport const codeBlock = themed({ light: N20, dark: DN50 });\nexport const link = themed({ light: B400, dark: B100 });\nexport const linkHover = themed({ light: B300, dark: B200 });\nexport const linkActive = themed({ light: B500, dark: B100 });\nexport const linkOutline = themed({ light: B100, dark: B200 });\nexport const primary = themed({ light: B400, dark: B100 });\nexport const blue = themed({ light: B400, dark: B100 });\nexport const teal = themed({ light: T300, dark: T200 });\nexport const purple = themed({ light: P300, dark: P100 });\nexport const red = themed({ light: R300, dark: R300 });\nexport const yellow = themed({ light: Y300, dark: Y300 });\nexport const green = themed({ light: G300, dark: G300 });\nexport const skeleton = () => N20A;\n//# sourceMappingURL=colors.js.map","import { gridSize as akGridSize, borderRadius } from '@atlaskit/theme/constants';\nimport * as colors from '@atlaskit/theme/colors';\nexport var themeNamespace = '@atlaskit-shared-theme/item'; // Used for Group titles and Item descriptions\n\nexport var compactSmallFontSize = 10;\nexport var compactLineHeight = 1.2;\nexport var gridSize = akGridSize();\nexport var defaultTheme = {\n afterItemSpacing: {\n compact: akGridSize(),\n default: akGridSize()\n },\n beforeItemSpacing: {\n compact: akGridSize(),\n default: akGridSize()\n },\n borderRadius: borderRadius(),\n focus: {\n outline: colors.B100\n },\n height: {\n compact: 0,\n default: 0\n },\n width: {\n compact: 'auto',\n default: 'auto'\n },\n padding: {\n default: {\n bottom: akGridSize() / 2,\n left: akGridSize() / 2,\n right: akGridSize() / 2,\n top: akGridSize() / 2\n },\n compact: {\n bottom: akGridSize(),\n left: akGridSize(),\n right: akGridSize(),\n top: akGridSize()\n }\n },\n default: {\n background: colors.background,\n text: colors.text,\n secondaryText: colors.N200\n },\n selected: {\n background: colors.backgroundActive,\n text: colors.N500,\n secondaryText: colors.N200\n },\n active: {\n background: colors.backgroundActive,\n text: colors.textActive,\n secondaryText: colors.N200\n },\n hover: {\n background: colors.backgroundHover,\n text: colors.textHover,\n secondaryText: colors.N200\n },\n disabled: {\n background: colors.N0,\n text: colors.N200,\n secondaryText: colors.N200\n },\n // same as hover in this case\n dragging: {\n background: colors.N20,\n text: colors.N800,\n secondaryText: colors.N200\n }\n};\n\nvar isValidCssValue = function isValidCssValue(value) {\n return value !== undefined && value !== null && value !== '';\n}; // Returns the theme that contains the requested theme key(s), preferring the user-supplied\n// theme if it is provided.\n\n\nexport var themeWithKeys = function themeWithKeys(maybeTheme, key, parentKey) {\n if (parentKey) {\n return maybeTheme && maybeTheme[parentKey] && isValidCssValue(maybeTheme[parentKey][key]) ? maybeTheme : defaultTheme;\n }\n\n return maybeTheme && isValidCssValue(maybeTheme[key]) ? maybeTheme : defaultTheme;\n}; // Returns the theme value for the requested key(s), falling back to the default theme if the\n// user-supplied theme doesn't exist or doesn't contain the requested key(s)\n\nexport var getThemeStyle = function getThemeStyle(maybeTheme, key, parentKey) {\n var theme = themeWithKeys(maybeTheme, key, parentKey);\n return parentKey ? theme[parentKey][key] : theme[key];\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport { itemThemeNamespace } from '@atlaskit/item';\nimport * as colors from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport { multiply } from '@atlaskit/theme/math';\nvar dropdownPadding = {\n bottom: gridSize,\n left: multiply(gridSize, 1.5),\n right: multiply(gridSize, 1.5),\n top: gridSize\n};\nvar droplistItemTheme = {\n padding: {\n default: dropdownPadding,\n compact: dropdownPadding\n },\n borderRadius: function borderRadius() {\n return 0;\n },\n default: {\n background: themed({\n light: colors.N0,\n dark: colors.DN50\n }),\n text: themed({\n light: colors.N800,\n dark: colors.DN600\n }),\n secondaryText: themed({\n light: colors.N200,\n dark: colors.DN300\n })\n },\n hover: {\n background: themed({\n light: colors.N20,\n dark: colors.DN70\n }),\n text: themed({\n light: colors.N800,\n dark: colors.DN600\n }),\n secondaryText: themed({\n light: colors.N200,\n dark: colors.DN300\n })\n },\n active: {\n background: themed({\n light: colors.B75,\n dark: colors.B75\n }),\n text: themed({\n light: colors.N800,\n dark: colors.B400\n }),\n secondaryText: themed({\n light: colors.N200,\n dark: colors.DN300\n })\n },\n selected: {\n background: 'transparent',\n text: themed({\n light: colors.N800,\n dark: colors.DN600\n }),\n secondaryText: themed({\n light: colors.N200,\n dark: colors.DN300\n })\n },\n disabled: {\n background: 'transparent',\n text: themed({\n light: colors.N70,\n dark: colors.DN80\n }),\n secondaryText: themed({\n light: colors.N50,\n dark: colors.DN70\n })\n },\n focus: {\n outline: themed({\n light: colors.B100,\n dark: colors.B75\n })\n }\n};\nexport default _defineProperty({}, itemThemeNamespace, droplistItemTheme);","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\n/* eslint-disable react/prop-types */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider } from 'styled-components';\nimport { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';\nimport Layer from '@atlaskit/layer';\nimport Spinner from '@atlaskit/spinner';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport Wrapper, { Content, SpinnerContainer, Trigger } from '../styled/Droplist';\nimport itemTheme from '../theme/item-theme';\nimport { name as packageName, version as packageVersion } from '../version.json';\nvar halfFocusRing = 1;\nvar dropOffset = \"0, \".concat(gridSize(), \"px\");\n\nif (process.env.NODE_ENV !== 'production' && !process.env.CI) {\n // eslint-disable-next-line no-console\n console.warn('@atlaskit/droplist has been deprecated. It is an internal component and should not be used directly.');\n}\n\nvar Droplist =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Droplist, _Component);\n\n function Droplist() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Droplist);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Droplist)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidMount\", function () {\n _this.setContentWidth(); // We use a captured event here to avoid a radio or checkbox dropdown item firing its\n // click event first, which would cause a re-render of the element and prevent Droplist\n // from detecting the actual source of this original click event.\n\n\n document.addEventListener('click', _this.handleClickOutside, true);\n document.addEventListener('keydown', _this.handleEsc);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidUpdate\", function () {\n if (_this.props.isOpen) {\n _this.setContentWidth();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentWillUnmount\", function () {\n document.removeEventListener('click', _this.handleClickOutside, true);\n document.removeEventListener('keydown', _this.handleEsc);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setContentWidth\", function () {\n var _assertThisInitialize = _assertThisInitialized(_this),\n dropContentRef = _assertThisInitialize.dropContentRef,\n triggerRef = _assertThisInitialize.triggerRef;\n\n var shouldFitContainer = _this.props.shouldFitContainer; // We need to manually set the content width to match the trigger width\n // if props.shouldFitContainer is true\n\n if (shouldFitContainer && dropContentRef && triggerRef) {\n dropContentRef.style.width = \"\".concat(triggerRef.offsetWidth - halfFocusRing * 2, \"px\");\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleEsc\", function (event) {\n if ((event.key === 'Escape' || event.key === 'Esc') && _this.props.isOpen) {\n _this.close(event);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClickOutside\", function (event) {\n if (_this.props.isOpen) {\n if (event.target instanceof Node) {\n // Rather than check for the target within the entire Droplist, we specify the trigger/content.\n // This aids with future effort in scroll-locking Droplist when isMenuFixed is enabled; the scroll\n // blanket which stretches to the viewport should not stop 'close' from being triggered.\n var withinTrigger = _this.triggerRef && _this.triggerRef.contains(event.target);\n\n var withinContent = _this.dropContentRef && _this.dropContentRef.contains(event.target);\n\n if (!withinTrigger && !withinContent) {\n _this.close(event);\n }\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"close\", function (event) {\n if (_this.props.onOpenChange) {\n _this.props.onOpenChange({\n isOpen: false,\n event: event\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleContentRef\", function (ref) {\n _this.dropContentRef = ref; // If the dropdown has just been opened, we focus on the containing element so the\n // user can tab to the first dropdown item. We will only receive this ref if isOpen\n // is true or null, so no need to check for truthiness here.\n\n if (ref) {\n ref.focus();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleTriggerRef\", function (ref) {\n _this.triggerRef = ref;\n });\n\n return _this;\n }\n\n _createClass(Droplist, [{\n key: \"getChildContext\",\n value: function getChildContext() {\n return {\n shouldAllowMultilineItems: this.props.shouldAllowMultilineItems\n };\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n appearance = _this$props.appearance,\n boundariesElement = _this$props.boundariesElement,\n children = _this$props.children,\n isLoading = _this$props.isLoading,\n isOpen = _this$props.isOpen,\n maxHeight = _this$props.maxHeight,\n onClick = _this$props.onClick,\n onKeyDown = _this$props.onKeyDown,\n position = _this$props.position,\n isMenuFixed = _this$props.isMenuFixed,\n shouldFitContainer = _this$props.shouldFitContainer,\n shouldFlip = _this$props.shouldFlip,\n trigger = _this$props.trigger,\n onPositioned = _this$props.onPositioned,\n testId = _this$props.testId;\n var layerContent = isOpen ? React.createElement(Content, {\n \"data-role\": \"droplistContent\",\n \"data-testid\": testId && \"\".concat(testId, \"--content\"),\n isTall: appearance === 'tall',\n innerRef: this.handleContentRef,\n maxHeight: maxHeight\n }, isLoading ? React.createElement(SpinnerContainer, null, React.createElement(Spinner, {\n size: \"small\"\n })) : React.createElement(ThemeProvider, {\n theme: itemTheme\n }, React.createElement(\"div\", null, children))) : null;\n return React.createElement(Wrapper, {\n fit: shouldFitContainer,\n onClick: onClick,\n onKeyDown: onKeyDown\n }, React.createElement(Layer, {\n autoFlip: shouldFlip,\n boundariesElement: boundariesElement,\n content: layerContent,\n offset: dropOffset,\n position: position,\n isAlwaysFixed: isOpen && isMenuFixed,\n onPositioned: onPositioned\n }, React.createElement(Trigger, {\n fit: shouldFitContainer,\n innerRef: this.handleTriggerRef\n }, trigger)));\n }\n }]);\n\n return Droplist;\n}(Component);\n\n_defineProperty(Droplist, \"defaultProps\", {\n appearance: 'default',\n boundariesElement: 'viewport',\n children: null,\n isLoading: false,\n isOpen: false,\n onClick: function onClick() {},\n onKeyDown: function onKeyDown() {},\n onOpenChange: function onOpenChange() {},\n position: 'bottom left',\n isMenuFixed: false,\n shouldAllowMultilineItems: false,\n shouldFitContainer: false,\n shouldFlip: true,\n trigger: null,\n onPositioned: function onPositioned() {}\n});\n\n_defineProperty(Droplist, \"childContextTypes\", {\n shouldAllowMultilineItems: PropTypes.bool\n});\n\nexport { Droplist as DroplistWithoutAnalytics };\nvar createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');\nexport default withAnalyticsContext({\n componentName: 'droplist',\n packageName: packageName,\n packageVersion: packageVersion\n})(withAnalyticsEvents({\n onOpenChange: createAndFireEventOnAtlaskit({\n action: 'toggled',\n actionSubject: 'droplist',\n attributes: {\n componentName: 'droplist',\n packageName: packageName,\n packageVersion: packageVersion\n }\n })\n})(Droplist));","var prefix = function prefix(key) {\n return \"@atlaskit-private-do-not-use/dropdown-menu:\".concat(key);\n};\n\nexport var focusManagerContext = prefix('focus-manager');\nexport var selectionCacheContext = prefix('selection-cache');\nexport var selectionManagerContext = prefix('selection-manager');\nexport var clickManagerContext = prefix('click-manager');","export var KEY_UP = 'ArrowUp';\nexport var KEY_DOWN = 'ArrowDown';\nexport var KEY_SPACE = ' ';\nexport var KEY_ENTER = 'Enter';\nexport var KEY_TAB = 'Tab';\nexport var KEY_ESC = 'Escape';","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { focusManagerContext } from '../../util/contextNamespace';\nimport { KEY_DOWN, KEY_UP, KEY_TAB } from '../../util/keys';\n\nvar DropdownItemFocusManager =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(DropdownItemFocusManager, _Component);\n\n function DropdownItemFocusManager() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, DropdownItemFocusManager);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DropdownItemFocusManager)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"registeredItems\", []);\n\n _defineProperty(_assertThisInitialized(_this), \"focusedItemId\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"handleItemRegistered\", function (itemId, itemNode) {\n _this.registeredItems.push({\n itemId: itemId,\n itemNode: itemNode\n });\n\n if (_this.props.autoFocus && _this.registeredItems.length === 1) {\n _this.focusedItemId = itemId;\n itemNode.focus();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleItemDeregistered\", function (itemId) {\n _this.registeredItems = _this.registeredItems.filter(function (item) {\n return item.itemId !== itemId;\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleItemFocused\", function (itemId) {\n _this.focusedItemId = itemId;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleItemUpdated\", function (itemId, itemNode) {\n var matchingIndex = -1;\n\n for (var i = 0; i < _this.registeredItems.length; i++) {\n if (_this.registeredItems[i].itemId === itemId) {\n matchingIndex = i;\n break;\n }\n }\n\n if (matchingIndex === -1) {\n _this.handleItemRegistered(itemId, itemNode);\n\n return;\n }\n\n _this.registeredItems[matchingIndex].itemNode = itemNode;\n\n if (_this.focusedItemIndex() === matchingIndex) {\n itemNode.focus();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"focusedItemIndex\", function () {\n var _assertThisInitialize = _assertThisInitialized(_this),\n focusedItemId = _assertThisInitialize.focusedItemId,\n registeredItems = _assertThisInitialize.registeredItems;\n\n for (var i = 0; i < registeredItems.length; i++) {\n if (registeredItems[i].itemId === focusedItemId) {\n return i;\n }\n }\n\n return -1;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleKeyboard\", function (event) {\n var key = event.key,\n shiftKey = event.shiftKey;\n\n var focusedItemIndex = _this.focusedItemIndex();\n\n if (key === KEY_UP || key === KEY_DOWN) {\n // We prevent default here to avoid page scrolling when up/down\n // pressed while dropdown is focused.\n event.preventDefault();\n\n if (focusedItemIndex < 0) {\n return;\n }\n\n var nextItemIndex = key === KEY_UP ? Math.max(0, focusedItemIndex - 1) : Math.min(_this.registeredItems.length - 1, focusedItemIndex + 1);\n\n _this.registeredItems[nextItemIndex].itemNode.focus();\n }\n\n if (key === KEY_TAB) {\n if (!shiftKey && focusedItemIndex === _this.registeredItems.length - 1) {\n if (_this.props.close) _this.props.close({\n event: event,\n source: 'keydown'\n });\n }\n\n if (shiftKey && focusedItemIndex === 0) {\n if (_this.props.close) _this.props.close({\n event: event,\n source: 'keydown'\n });\n }\n }\n });\n\n return _this;\n }\n\n _createClass(DropdownItemFocusManager, [{\n key: \"getChildContext\",\n value: function getChildContext() {\n return _defineProperty({}, focusManagerContext, {\n itemFocused: this.handleItemFocused,\n registerItem: this.handleItemRegistered,\n deregisterItem: this.handleItemDeregistered,\n updateItem: this.handleItemUpdated\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n return React.createElement(\"div\", {\n onKeyDown: this.handleKeyboard\n }, this.props.children);\n }\n }]);\n\n return DropdownItemFocusManager;\n}(Component);\n\n_defineProperty(DropdownItemFocusManager, \"childContextTypes\", _defineProperty({}, focusManagerContext, PropTypes.object));\n\nexport { DropdownItemFocusManager as default };","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { clickManagerContext } from '../../util/contextNamespace';\n\nvar DropdownItemClickManager =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(DropdownItemClickManager, _Component);\n\n function DropdownItemClickManager() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, DropdownItemClickManager);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DropdownItemClickManager)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"handleItemClicked\", function (event) {\n _this.props.onItemClicked(event);\n });\n\n return _this;\n }\n\n _createClass(DropdownItemClickManager, [{\n key: \"getChildContext\",\n value: function getChildContext() {\n return _defineProperty({}, clickManagerContext, {\n itemClicked: this.handleItemClicked\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return DropdownItemClickManager;\n}(Component);\n\n_defineProperty(DropdownItemClickManager, \"childContextTypes\", _defineProperty({}, clickManagerContext, PropTypes.object));\n\nexport { DropdownItemClickManager as default };","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport find from 'array-find';\nimport { selectionCacheContext } from '../../util/contextNamespace';\n\nvar isItemInList = function isItemInList(itemList, itemId, groupId) {\n return Boolean(find(itemList, function (item) {\n return item.id === itemId && item.groupId === groupId;\n }));\n};\n\nvar DropdownItemSelectionCache =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(DropdownItemSelectionCache, _Component);\n\n function DropdownItemSelectionCache() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, DropdownItemSelectionCache);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DropdownItemSelectionCache)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n lastCacheUpdate: 0\n });\n\n _defineProperty(_assertThisInitialized(_this), \"selectedItems\", []);\n\n _defineProperty(_assertThisInitialized(_this), \"alreadyDefaultedItems\", []);\n\n _defineProperty(_assertThisInitialized(_this), \"handleItemSelectionsChanged\", function (groupId, newGroupSelections) {\n var newSelectedItems = [].concat(_toConsumableArray(_this.selectedItems.filter(function (item) {\n return item.groupId !== groupId;\n })), _toConsumableArray(newGroupSelections));\n _this.selectedItems = newSelectedItems; // We store selectedItems in an instance variable (this.selectedItems) instead of state,\n // because if multiple children update the cache at the same time it causes unexpected\n // behaviour due to the asynchronous behaviour of setState. So we need to trigger setState\n // with a different value to cause the children to be updated with their new selection values.\n\n _this.setState({\n lastCacheUpdate: Date.now()\n });\n });\n\n return _this;\n }\n\n _createClass(DropdownItemSelectionCache, [{\n key: \"getChildContext\",\n // eslint-disable-line react/sort-comp\n value: function getChildContext() {\n var _this2 = this;\n\n return _defineProperty({}, selectionCacheContext, {\n // This function returns true/false describing whether the supplied navigation item\n // (which must have a unique item and group ID) is currently selected - this is used\n // by radio and checkbox dropdown items to retreive their 'selected' state when they\n // re-mount, which happens when the dropdown is closed and then re-opened.\n isItemSelected: function isItemSelected(groupId, itemId) {\n return isItemInList(_this2.selectedItems, itemId, groupId);\n },\n itemsInGroup: function itemsInGroup(groupId) {\n return _this2.selectedItems.filter(function (item) {\n return item.groupId === groupId;\n });\n },\n itemSelectionsChanged: this.handleItemSelectionsChanged,\n hasItemAlreadyHadDefaultSelectedApplied: function hasItemAlreadyHadDefaultSelectedApplied(groupId, itemId) {\n return isItemInList(_this2.alreadyDefaultedItems, itemId, groupId);\n },\n markItemAsDefaultApplied: function markItemAsDefaultApplied(groupId, itemId) {\n _this2.alreadyDefaultedItems.push({\n id: itemId,\n groupId: groupId\n });\n }\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(\"div\", null, this.props.children);\n }\n }]);\n\n return DropdownItemSelectionCache;\n}(Component);\n\n_defineProperty(DropdownItemSelectionCache, \"childContextTypes\", _defineProperty({}, selectionCacheContext, PropTypes.shape({\n isItemSelected: PropTypes.func,\n itemsInGroup: PropTypes.func,\n itemSelectionsChanged: PropTypes.func\n})));\n\nexport { DropdownItemSelectionCache as default };","import styled from 'styled-components';\nexport default styled.div.withConfig({\n displayName: \"WidthConstrainer\",\n componentId: \"sc-15doeus-0\"\n})([\"\\n \", \";\\n\"], function (_ref) {\n var shouldFitContainer = _ref.shouldFitContainer;\n return shouldFitContainer ? '' : 'max-width: 300px;';\n});","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\n/* eslint-disable react/no-array-index-key */\nimport React, { Component, Fragment } from 'react';\nimport { findDOMNode } from 'react-dom';\nimport { uid } from 'react-uid';\nimport { withAnalyticsContext, withAnalyticsEvents, createAndFireEvent } from '@atlaskit/analytics-next';\nimport Button from '@atlaskit/button';\nimport Droplist, { Item, Group } from '@atlaskit/droplist';\nimport ExpandIcon from '@atlaskit/icon/glyph/chevron-down';\nimport { name as packageName, version as packageVersion } from '../version.json';\nimport DropdownItemFocusManager from './context/DropdownItemFocusManager';\nimport DropdownItemClickManager from './context/DropdownItemClickManager';\nimport DropdownItemSelectionCache from './context/DropdownItemSelectionCache';\nimport WidthConstrainer from '../styled/WidthConstrainer';\nimport { KEY_DOWN, KEY_SPACE, KEY_ENTER } from '../util/keys';\n\nvar DropdownMenuStateless =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(DropdownMenuStateless, _Component);\n\n function DropdownMenuStateless() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, DropdownMenuStateless);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DropdownMenuStateless)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"domItemsList\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"focusedItem\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"triggerContainer\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"sourceOfIsOpen\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"dropdownListPositioned\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n id: uid({\n id: _this.constructor.name\n }),\n autoFocusDropdownItems: false\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidMount\", function () {\n if (_this.isUsingDeprecatedAPI()) {\n if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'production' && !process.env.CI) {\n // eslint-disable-next-line no-console\n console.log('DropdownMenu.items is deprecated. Please switch to the declarative API.');\n }\n\n if (_this.domItemsList) {\n _this.focusFirstItem();\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidUpdate\", function (prevProp) {\n if (_this.isUsingDeprecatedAPI() && _this.props.isOpen && !prevProp.isOpen) {\n _this.focusFirstItem();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getNextFocusable\", function (indexItem, available) {\n if (!_this.domItemsList) {\n return null;\n }\n\n var currentItem = typeof indexItem !== 'number' ? -1 : indexItem;\n var latestAvailable = typeof available !== 'number' ? currentItem : available;\n\n if (currentItem < _this.domItemsList.length - 1) {\n currentItem++;\n\n if (_this.domItemsList[currentItem].getAttribute('aria-hidden') !== 'true') {\n return currentItem;\n }\n\n return _this.getNextFocusable(currentItem, latestAvailable);\n }\n\n return latestAvailable;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getPrevFocusable\", function (indexItem, available) {\n if (!_this.domItemsList) {\n return null;\n }\n\n var currentItem = typeof indexItem !== 'number' ? -1 : indexItem;\n var latestAvailable = typeof available !== 'number' ? currentItem : available;\n\n if (currentItem && currentItem > 0) {\n currentItem--;\n\n if (_this.domItemsList[currentItem].getAttribute('aria-hidden') !== 'true') {\n return currentItem;\n }\n\n return _this.getPrevFocusable(currentItem, latestAvailable);\n }\n\n return latestAvailable || currentItem;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"focusFirstItem\", function () {\n if (_this.sourceOfIsOpen === 'keydown') {\n _this.focusItem(_this.getNextFocusable());\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"focusNextItem\", function () {\n _this.focusItem(_this.getNextFocusable(_this.focusedItem));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"focusPreviousItem\", function () {\n _this.focusItem(_this.getPrevFocusable(_this.focusedItem));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"focusItem\", function (index) {\n if (!_this.domItemsList || !index) {\n return;\n }\n\n _this.focusedItem = index;\n\n _this.domItemsList[_this.focusedItem].focus();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"isTargetChildItem\", function (target) {\n if (!target) return false;\n var isDroplistItem = target.getAttribute('data-role') === 'droplistItem'; // eslint-disable-next-line react/no-find-dom-node\n\n var thisDom = findDOMNode(_assertThisInitialized(_this));\n return isDroplistItem && thisDom ? thisDom.contains(target) : false;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleKeyboardInteractionForClosed\", function (event) {\n if (_this.props.isOpen) {\n return;\n }\n\n switch (event.key) {\n case KEY_DOWN:\n case KEY_SPACE:\n case KEY_ENTER:\n event.preventDefault();\n\n _this.open({\n event: event,\n source: 'keydown'\n });\n\n break;\n\n default:\n break;\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleKeyboardInteractionsDeprecated\", function (event) {\n // KeyboardEvent.target is typed as an EventTarget but we need to access methods on it which\n // are specific to Element. Due limitations of the HTML spec flow doesn't know that an\n // EventTarget can have these methods, so we cast it to Element through Object. This is the\n // safest thing we can do in this situation.\n // https://flow.org/en/docs/types/casting/#toc-type-casting-through-any\n var target = event.target;\n\n if (_this.props.isOpen) {\n if (_this.isTargetChildItem(target)) {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n\n _this.focusPreviousItem();\n\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n\n _this.focusNextItem();\n\n break;\n\n case 'Tab':\n event.preventDefault();\n\n _this.close({\n event: event\n });\n\n break;\n\n default:\n break;\n }\n } else if (event.key === 'ArrowDown') {\n _this.sourceOfIsOpen = 'keydown';\n\n _this.focusFirstItem();\n } else if (event.key === 'Tab') {\n _this.close({\n event: event\n });\n }\n } else {\n switch (event.key) {\n case KEY_DOWN:\n case KEY_SPACE:\n case KEY_ENTER:\n event.preventDefault();\n\n _this.open({\n event: event,\n source: 'keydown'\n });\n\n break;\n\n default:\n break;\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"domMenuContainer\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"handleClickDeprecated\", function (event) {\n var menuContainer = _this.domMenuContainer; // Casting target to Element. See comment in `handleKeyboardInteractionsDeprecated`.\n\n var target = event.target;\n\n if (!menuContainer || menuContainer && !menuContainer.contains(target)) {\n _this.toggle({\n source: 'click',\n event: event\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"isUsingDeprecatedAPI\", function () {\n return Boolean(_this.props.items.length);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClick\", function (event) {\n // For any clicks we don't want autofocus\n _this.setState({\n autoFocusDropdownItems: false\n });\n\n if (_this.isUsingDeprecatedAPI()) {\n _this.handleClickDeprecated(event);\n\n return;\n }\n\n var _assertThisInitialize = _assertThisInitialized(_this),\n triggerContainer = _assertThisInitialize.triggerContainer; // Casting target to Element. See comment in `handleKeyboardInteractionsDeprecated`.\n\n\n var target = event.target;\n\n if (triggerContainer && triggerContainer.contains(target) && // $FlowFixMe - disabled is not in Element\n target.disabled !== true) {\n var isOpen = _this.props.isOpen;\n _this.sourceOfIsOpen = 'mouse';\n\n _this.props.onOpenChange({\n isOpen: !isOpen,\n event: event\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"triggerContent\", function () {\n var _this$props = _this.props,\n children = _this$props.children,\n trigger = _this$props.trigger,\n isOpen = _this$props.isOpen,\n triggerButtonProps = _this$props.triggerButtonProps,\n triggerType = _this$props.triggerType,\n testId = _this$props.testId;\n var insideTriggerContent = _this.isUsingDeprecatedAPI() ? children : trigger;\n\n if (triggerType !== 'button') {\n return insideTriggerContent;\n }\n\n var triggerProps = _objectSpread({}, triggerButtonProps);\n\n var defaultButtonProps = {\n 'aria-controls': _this.state.id,\n 'aria-expanded': isOpen,\n 'aria-haspopup': true,\n isSelected: isOpen\n };\n\n if (!triggerProps.iconAfter && !triggerProps.iconBefore) {\n triggerProps.iconAfter = React.createElement(ExpandIcon, {\n size: \"medium\",\n label: \"\"\n });\n }\n\n return React.createElement(Button, _extends({}, defaultButtonProps, triggerProps, {\n testId: testId && \"\".concat(testId, \"--trigger\")\n }), insideTriggerContent);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"open\", function (attrs) {\n _this.sourceOfIsOpen = attrs.source;\n\n _this.props.onOpenChange({\n isOpen: true,\n event: attrs.event\n }); // Dropdown opened via keyboard gets auto focussed\n\n\n _this.setState({\n autoFocusDropdownItems: _this.sourceOfIsOpen === 'keydown'\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"close\", function (attrs) {\n _this.sourceOfIsOpen = null;\n\n _this.props.onOpenChange({\n isOpen: false,\n event: attrs.event\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"toggle\", function (attrs) {\n if (attrs.source === 'keydown') return;\n\n if (_this.props.isOpen) {\n _this.close(attrs);\n } else {\n _this.open(attrs);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleItemClicked\", function (event) {\n _this.props.onOpenChange({\n isOpen: false,\n event: event\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"renderTrigger\", function () {\n var triggerContent = _this.triggerContent();\n\n return _this.isUsingDeprecatedAPI() ? triggerContent : React.createElement(\"div\", {\n ref: function ref(_ref) {\n _this.triggerContainer = _ref;\n }\n }, triggerContent);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"renderItems\", function (items) {\n return items.map(function (item, itemIndex) {\n return React.createElement(Item, _extends({}, item, {\n key: itemIndex,\n onActivate: function onActivate(_ref2) {\n var event = _ref2.event;\n\n _this.props.onItemActivated({\n item: item,\n event: event\n });\n }\n }), item.content);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"renderGroups\", function (groups) {\n return groups.map(function (group, groupIndex) {\n return React.createElement(Group, {\n heading: group.heading,\n elemAfter: group.elemAfter,\n key: groupIndex\n }, _this.renderItems(group.items));\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"renderDeprecated\", function () {\n var _this$props2 = _this.props,\n items = _this$props2.items,\n shouldFitContainer = _this$props2.shouldFitContainer;\n var id = _this.state.id;\n return React.createElement(\"div\", {\n id: id,\n ref: function ref(_ref3) {\n _this.domMenuContainer = _ref3;\n _this.domItemsList = _ref3 ? _ref3.querySelectorAll('[data-role=\"droplistItem\"]') : null;\n },\n role: \"menu\",\n style: shouldFitContainer ? null : {\n maxWidth: 300\n }\n }, _this.renderGroups(items));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDroplistPositioned\", function () {\n _this.dropdownListPositioned = true; // Trigger render so item focus manager can auto focus for keyboard trigger\n\n _this.setState({\n autoFocusDropdownItems: _this.sourceOfIsOpen === 'keydown'\n });\n\n if (_this.props.onPositioned) _this.props.onPositioned();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"renderDropdownItems\", function () {\n if (_this.sourceOfIsOpen === 'keydown' && _this.dropdownListPositioned) {\n return React.createElement(DropdownItemFocusManager, {\n autoFocus: _this.state.autoFocusDropdownItems,\n close: _this.close\n }, _this.props.children);\n }\n\n return React.createElement(Fragment, null, _this.props.children);\n });\n\n return _this;\n }\n\n _createClass(DropdownMenuStateless, [{\n key: \"render\",\n value: function render() {\n var _this$props3 = this.props,\n appearance = _this$props3.appearance,\n boundariesElement = _this$props3.boundariesElement,\n isLoading = _this$props3.isLoading,\n isOpen = _this$props3.isOpen,\n onOpenChange = _this$props3.onOpenChange,\n position = _this$props3.position,\n isMenuFixed = _this$props3.isMenuFixed,\n shouldAllowMultilineItems = _this$props3.shouldAllowMultilineItems,\n shouldFitContainer = _this$props3.shouldFitContainer,\n shouldFlip = _this$props3.shouldFlip,\n testId = _this$props3.testId;\n var id = this.state.id;\n var isDeprecated = this.isUsingDeprecatedAPI();\n var deprecatedProps = isDeprecated ? {\n onKeyDown: this.handleKeyboardInteractionsDeprecated,\n shouldAllowMultilineItems: shouldAllowMultilineItems\n } : {\n onKeyDown: this.handleKeyboardInteractionForClosed\n };\n return React.createElement(DropdownItemSelectionCache, null, React.createElement(Droplist, _extends({\n appearance: appearance,\n boundariesElement: boundariesElement,\n isLoading: isLoading,\n isOpen: isOpen,\n onClick: this.handleClick,\n onOpenChange: onOpenChange,\n position: position,\n isMenuFixed: isMenuFixed,\n shouldFitContainer: shouldFitContainer,\n shouldFlip: shouldFlip,\n trigger: this.renderTrigger(),\n onPositioned: this.onDroplistPositioned\n }, deprecatedProps, {\n analyticsContext: {\n componentName: 'dropdownMenu',\n packageName: packageName,\n packageVersion: packageVersion\n },\n testId: testId\n }), isDeprecated ? this.renderDeprecated() : React.createElement(WidthConstrainer, {\n id: id,\n role: \"menu\",\n shouldFitContainer: shouldFitContainer\n }, React.createElement(DropdownItemClickManager, {\n onItemClicked: this.handleItemClicked\n }, this.renderDropdownItems()))));\n }\n }]);\n\n return DropdownMenuStateless;\n}(Component);\n\n_defineProperty(DropdownMenuStateless, \"defaultProps\", {\n appearance: 'default',\n boundariesElement: 'viewport',\n isLoading: false,\n isOpen: false,\n items: [],\n onItemActivated: function onItemActivated() {},\n onOpenChange: function onOpenChange() {},\n position: 'bottom left',\n isMenuFixed: false,\n shouldAllowMultilineItems: false,\n shouldFitContainer: false,\n shouldFlip: true,\n triggerType: 'default',\n onPositioned: function onPositioned() {}\n});\n\nexport { DropdownMenuStateless as DropdownMenuStatelessWithoutAnalytics };\nvar createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');\nexport default withAnalyticsContext({\n componentName: 'dropdownMenu',\n packageName: packageName,\n packageVersion: packageVersion\n})(withAnalyticsEvents({\n onOpenChange: createAndFireEventOnAtlaskit({\n action: 'toggled',\n actionSubject: 'dropdownMenu',\n attributes: {\n componentName: 'dropdownMenu',\n packageName: packageName,\n packageVersion: packageVersion\n }\n })\n})(DropdownMenuStateless));","export default (function (channel) { return function (payload) { return function (createAnalyticsEvent) {\n var consumerEvent = createAnalyticsEvent(payload);\n var clonedEvent = consumerEvent.clone();\n if (clonedEvent) {\n clonedEvent.fire(channel);\n }\n return consumerEvent;\n}; }; });\n//# sourceMappingURL=createAndFireEvent.js.map","import { __assign, __rest } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContext from './AnalyticsContext';\nvar withAnalyticsContext = function (defaultData) { return function (WrappedComponent) {\n var WithAnalyticsContext = React.forwardRef(function (props, ref) {\n var _a = props.analyticsContext, analyticsContext = _a === void 0 ? {} : _a, rest = __rest(props, [\"analyticsContext\"]);\n var analyticsData = __assign(__assign({}, defaultData), analyticsContext);\n return (React.createElement(AnalyticsContext, { data: analyticsData },\n React.createElement(WrappedComponent, __assign({}, rest, { ref: ref }))));\n });\n // @ts-ignore\n WithAnalyticsContext.displayName = \"WithAnalyticsContext(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsContext;\n}; };\nexport default withAnalyticsContext;\n//# sourceMappingURL=withAnalyticsContext.js.map","import { __assign } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContextConsumer from './AnalyticsContextConsumer';\nvar withAnalyticsEvents = function (createEventMap) { return function (WrappedComponent) {\n var WithAnalyticsEvents = React.forwardRef(function (props, ref) { return (React.createElement(AnalyticsContextConsumer, { createEventMap: createEventMap, wrappedComponentProps: props }, function (_a) {\n var createAnalyticsEvent = _a.createAnalyticsEvent, patchedEventProps = _a.patchedEventProps;\n return (React.createElement(WrappedComponent, __assign({}, props, patchedEventProps, { createAnalyticsEvent: createAnalyticsEvent, ref: ref })));\n })); });\n // @ts-ignore\n WithAnalyticsEvents.displayName = \"WithAnalyticsEvents(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsEvents;\n}; };\nexport default withAnalyticsEvents;\n//# sourceMappingURL=withAnalyticsEvents.js.map","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport React, { Component } from 'react';\nimport StatelessMenu from './DropdownMenuStateless';\n\nvar DropdownMenu =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(DropdownMenu, _Component);\n\n function DropdownMenu() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, DropdownMenu);\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DropdownMenu)).call.apply(_getPrototypeOf2, [this].concat(_args)));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n isOpen: _this.props.defaultOpen,\n items: _toConsumableArray(_this.props.items)\n });\n\n _defineProperty(_assertThisInitialized(_this), \"findActivatedGroup\", function (item) {\n return _this.state.items.filter(function (group) {\n return group.items.indexOf(item) > -1;\n })[0];\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleItemActivation\", function (attrs) {\n var activatedItem = attrs.item;\n\n var activatedGroup = _this.findActivatedGroup(activatedItem);\n\n var items = _toConsumableArray(_this.state.items);\n\n switch (activatedItem.type) {\n case 'checkbox':\n activatedItem.isChecked = !activatedItem.isChecked;\n\n _this.props.onItemActivated({\n item: activatedItem\n });\n\n _this.setState({\n items: items\n });\n\n break;\n\n case 'radio':\n activatedGroup.items.forEach(function (i) {\n if (i === activatedItem) {\n i.isChecked = true; // eslint-disable-line no-param-reassign\n } else {\n i.isChecked = false; // eslint-disable-line no-param-reassign\n }\n });\n\n _this.props.onItemActivated({\n item: activatedItem\n });\n\n _this.setState({\n items: items\n });\n\n break;\n\n case 'link':\n default:\n _this.props.onItemActivated({\n item: activatedItem\n });\n\n _this.close();\n\n break;\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleOpenChange\", function (attrs) {\n var _this$props;\n\n if (_this.state.isOpen === attrs.isOpen) return;\n\n _this.setState({\n isOpen: attrs.isOpen\n });\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n (_this$props = _this.props).onOpenChange.apply(_this$props, [attrs].concat(args));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"close\", function () {\n var _this$props2;\n\n if (_this.state.isOpen === false) return;\n\n _this.setState({\n isOpen: false\n });\n\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n (_this$props2 = _this.props).onOpenChange.apply(_this$props2, [{\n isOpen: false\n }].concat(args));\n });\n\n return _this;\n }\n\n _createClass(DropdownMenu, [{\n key: \"UNSAFE_componentWillReceiveProps\",\n value: function UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.items !== this.state.items) {\n this.setState({\n items: _toConsumableArray(nextProps.items)\n });\n }\n\n if (nextProps.isOpen !== this.props.isOpen) {\n this.setState({\n isOpen: nextProps.isOpen\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var isOpen = this.state.isOpen;\n var _this$props3 = this.props,\n appearance = _this$props3.appearance,\n boundariesElement = _this$props3.boundariesElement,\n children = _this$props3.children,\n isLoading = _this$props3.isLoading,\n items = _this$props3.items,\n position = _this$props3.position,\n isMenuFixed = _this$props3.isMenuFixed,\n shouldAllowMultilineItems = _this$props3.shouldAllowMultilineItems,\n shouldFitContainer = _this$props3.shouldFitContainer,\n shouldFlip = _this$props3.shouldFlip,\n testId = _this$props3.testId,\n trigger = _this$props3.trigger,\n triggerButtonProps = _this$props3.triggerButtonProps,\n triggerType = _this$props3.triggerType,\n onPositioned = _this$props3.onPositioned;\n return React.createElement(StatelessMenu, {\n appearance: appearance,\n boundariesElement: boundariesElement,\n isOpen: isOpen,\n isLoading: isLoading,\n items: items,\n onItemActivated: this.handleItemActivation,\n onOpenChange: this.handleOpenChange,\n position: position,\n isMenuFixed: isMenuFixed,\n shouldAllowMultilineItems: shouldAllowMultilineItems,\n shouldFitContainer: shouldFitContainer,\n shouldFlip: shouldFlip,\n trigger: trigger,\n triggerButtonProps: triggerButtonProps,\n triggerType: triggerType,\n onPositioned: onPositioned,\n testId: testId\n }, children);\n }\n }]);\n\n return DropdownMenu;\n}(Component);\n\n_defineProperty(DropdownMenu, \"defaultProps\", {\n appearance: 'default',\n boundariesElement: 'viewport',\n defaultOpen: false,\n isLoading: false,\n isOpen: false,\n items: [],\n onItemActivated: function onItemActivated() {},\n onOpenChange: function onOpenChange() {},\n position: 'bottom left',\n isMenuFixed: false,\n shouldAllowMultilineItems: false,\n shouldFitContainer: false,\n shouldFlip: true,\n triggerType: 'default',\n onPositioned: function onPositioned() {}\n});\n\nexport { DropdownMenu as default };","import { defineMessages } from 'react-intl';\n\nexport const messages = defineMessages({\n getStarted: {\n id: 'UserProfileDropdown.getStarted',\n defaultMessage: 'Get started with any product'\n },\n cloudProducts: {\n id: 'UserProfileDropdown.cloudProducts',\n defaultMessage: 'My cloud products'\n },\n cloudProductsMobile: {\n id: 'UserProfileDropdown.cloudProductsMobile',\n defaultMessage: 'MY CLOUD PRODUCTS'\n },\n activeSites: {\n id: 'UserProfileDropdown.activeSites',\n defaultMessage: 'Active in {sites} sites:'\n },\n profile: {\n id: 'UserProfileDropdown.profile',\n defaultMessage: 'Profile'\n },\n licenses: {\n id: 'UserProfileDropdown.licenses',\n defaultMessage: 'Licenses'\n },\n logOut: {\n id: 'UserProfileDropdown.logOut',\n defaultMessage: 'Log Out'\n }\n});\n","import React from 'react';\n\nexport function BlankPointerImage() {\n return (\n
\n );\n}\n","import { colors, fontFamily } from '@atlaskit/theme';\nimport React, { MouseEventHandler } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport styled from 'styled-components';\n\nimport { messages } from '../messages';\nimport { BlankPointerImage } from './blank-pointer-image';\n\nexport type EmptyViewProps = {\n readonly getStartedUrl: string;\n readonly onGetStartedClick?: MouseEventHandler;\n};\n\nexport function EmptyView({\n getStartedUrl,\n onGetStartedClick\n}: EmptyViewProps) {\n return (\n \n \n {\n if (onGetStartedClick) {\n onGetStartedClick(event);\n }\n }}\n >\n \n \n \n );\n}\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 27px;\n`;\n\nconst Link = styled.a`\n margin: 15px 15px 0;\n\n color: ${colors.B400};\n text-decoration: none;\n cursor: pointer;\n font-family: ${fontFamily};\n font-size: 12px;\n line-height: 14px;\n text-align: center;\n`;\n","import { useState, useRef, useEffect } from 'react';\n\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n\n for (var i = 0; i < newInputs.length; i++) {\n if (newInputs[i] !== lastInputs[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction useMemoOne(getResult, inputs) {\n var initial = useState(function () {\n return {\n inputs: inputs,\n result: getResult()\n };\n })[0];\n var isFirstRun = useRef(true);\n var committed = useRef(initial);\n var useCache = isFirstRun.current || Boolean(inputs && committed.current.inputs && areInputsEqual(inputs, committed.current.inputs));\n var cache = useCache ? committed.current : {\n inputs: inputs,\n result: getResult()\n };\n useEffect(function () {\n isFirstRun.current = false;\n committed.current = cache;\n }, [cache]);\n return cache.result;\n}\nfunction useCallbackOne(callback, inputs) {\n return useMemoOne(function () {\n return callback;\n }, inputs);\n}\nvar useMemo = useMemoOne;\nvar useCallback = useCallbackOne;\n\nexport { useCallback, useCallbackOne, useMemo, useMemoOne };\n","import { useContext, useRef } from 'react';\nimport { useCallbackOne } from 'use-memo-one';\nimport { AnalyticsReactContext, } from './AnalyticsReactContext';\nimport UIAnalyticsEvent from './UIAnalyticsEvent';\nvar noop = function () { return []; };\nexport function useAnalyticsEvents() {\n var analyticsContext = useContext(AnalyticsReactContext);\n var contextRef = useRef(analyticsContext);\n contextRef.current.getAtlaskitAnalyticsEventHandlers =\n analyticsContext.getAtlaskitAnalyticsEventHandlers;\n contextRef.current.getAtlaskitAnalyticsContext =\n analyticsContext.getAtlaskitAnalyticsContext;\n var createAnalyticsEvent = useCallbackOne(function (payload) {\n var getAtlaskitAnalyticsContext = contextRef.current.getAtlaskitAnalyticsContext || noop;\n var getAtlaskitAnalyticsEventHandlers = contextRef.current.getAtlaskitAnalyticsEventHandlers || noop;\n return new UIAnalyticsEvent({\n context: getAtlaskitAnalyticsContext(),\n handlers: getAtlaskitAnalyticsEventHandlers(),\n payload: payload,\n });\n }, []);\n return {\n createAnalyticsEvent: createAnalyticsEvent,\n };\n}\n//# sourceMappingURL=useAnalyticsEvents.js.map","import { __read, __spread } from \"tslib\";\nimport { useCallback, useRef, useEffect } from 'react';\nimport { useAnalyticsEvents } from './useAnalyticsEvents';\nexport var useCallbackWithAnalytics = function (method, payload, channel) {\n var createAnalyticsEvent = useAnalyticsEvents().createAnalyticsEvent;\n // given input might be new function/object each render\n // we optimise and store in refs so we can memoize the callback\n // and at the same time avoid stale values\n var methodRef = useRef(method);\n var payloadRef = useRef(payload);\n useEffect(function () {\n methodRef.current = method;\n payloadRef.current = payload;\n }, [method, payload]);\n return useCallback(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var pload = typeof payloadRef.current === 'function'\n ? payloadRef.current.apply(payloadRef, __spread(args)) : payloadRef.current;\n createAnalyticsEvent(pload).fire(channel);\n methodRef.current.apply(methodRef, __spread(args));\n }, [createAnalyticsEvent, methodRef, payloadRef, channel]);\n};\n//# sourceMappingURL=useCallbackWithAnalytics.js.map","import camelCase from 'camelcase';\n\nexport const trackingData = {\n dropdownToggle: {\n eventType: 'track',\n eventContainer: 'globalNavProfile',\n eventComponent: 'DropdownMenu',\n event: 'clicked',\n magnoliaComponentId: null\n },\n siteLink: {\n eventType: 'track',\n eventContainer: 'globalNavProfile',\n eventComponent: 'SiteLink',\n event: 'clicked',\n magnoliaComponentId: null,\n productKey: null,\n atlOrigin: null\n }\n};\n\nexport const parseProductKey = (product: string) => {\n return camelCase(product);\n};\n\nexport const getParameterByName = (name: string, url: string) => {\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\n const regex = new RegExp('[?&]' + name + '(=([^]*)|&|#|$)');\n const results = regex.exec(url);\n\n if (!results) {\n return null;\n }\n if (!results[2]) {\n return '';\n }\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n};\n","import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';\nimport ChevronUpIcon from '@atlaskit/icon/glyph/chevron-up';\nimport React from 'react';\n\nexport type ChrevronProps = {\n readonly isOpen: boolean;\n};\n\nexport function Chevron({ isOpen }: ChrevronProps) {\n if (isOpen) {\n return ;\n } else {\n return ;\n }\n}\n","import {\n useCallbackWithAnalytics,\n withAnalyticsEvents,\n WithAnalyticsEventsProps\n} from '@atlaskit/analytics-next';\nimport { colors } from '@atlaskit/theme';\nimport React, { MouseEvent } from 'react';\nimport styled from 'styled-components';\nimport { getParameterByName, parseProductKey, trackingData } from '../tracking';\n\nexport type SiteLinkProps = {\n readonly site: string;\n readonly name: string;\n readonly domRootId?: string;\n} & WithAnalyticsEventsProps;\n\nfunction SiteLink({ site, name, domRootId }: SiteLinkProps) {\n const { hostname } = new URL(site);\n const index = hostname.indexOf('.');\n\n const subdomain = hostname.substring(0, index);\n const rest = hostname.substring(index);\n\n const trackAndFollowUrl = (label: string, domain: string) => {\n const analyticsData = Object.assign(\n { ...trackingData.siteLink },\n {\n magnoliaComponentId: domRootId,\n atlOrigin: getParameterByName('atlOrigin', domain),\n productKey: parseProductKey(label)\n }\n );\n\n return useCallbackWithAnalytics((event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n window.location.assign(domain);\n }, analyticsData);\n };\n\n return (\n \n {subdomain}\n {rest}\n \n );\n}\n\nexport const Link = styled.a`\n color: ${colors.N600};\n text-decoration: none;\n`;\n\nexport const SubDomain = styled.span`\n color: ${colors.B400};\n`;\n\nexport default withAnalyticsEvents()(SiteLink);\n","import { colors } from '@atlaskit/theme';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport styled from 'styled-components';\n\nimport { messages } from '../messages';\nimport { default as SiteLinkWithAnalytics } from './site-link';\n\nexport type SiteListProps = {\n readonly sites: string[];\n readonly product: string;\n readonly domRootId?: string;\n};\n\nexport function SiteList({ sites, product, domRootId }: SiteListProps) {\n return (\n \n \n \n \n \n {sites.map((site) => (\n \n \n \n ))}\n
\n \n );\n}\n\nexport const Message = styled.div`\n font-size: 10px;\n line-height: 16px;\n color: ${colors.N800};\n`;\n\nconst Container = styled.div`\n margin: 6px 0;\n`;\n\nconst List = styled.ul`\n margin: 0;\n padding: 0;\n list-style: none;\n`;\n\nconst ListItem = styled.li`\n font-size: 10px;\n line-height: 16px;\n color: ${colors.N600};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n","import {\n useCallbackWithAnalytics,\n withAnalyticsEvents,\n WithAnalyticsEventsProps\n} from '@atlaskit/analytics-next';\nimport { colors } from '@atlaskit/theme';\nimport React, { MouseEvent, useState } from 'react';\nimport styled from 'styled-components';\nimport { getParameterByName, parseProductKey, trackingData } from '../tracking';\n\nimport { Chevron } from './chevron';\nimport { SiteList } from './site-list';\n\nexport type ProductDropdownItemProps = {\n readonly name: string;\n readonly icon: JSX.Element;\n readonly sites: string[];\n readonly domRootId?: string;\n} & WithAnalyticsEventsProps;\n\nexport type ProductDropdownItemState = {\n readonly isOpen: boolean;\n};\n\nexport function ProductDropdownItem({\n name,\n icon,\n sites,\n domRootId\n}: ProductDropdownItemProps): JSX.Element {\n const [isOpen, setIsOpen] = useState(false);\n const toggleOpen = () => setIsOpen(!isOpen);\n const singleSite = sites[0];\n\n const trackAndFollowUrl = (label: string, domain: string) => {\n const analyticsData = Object.assign(\n { ...trackingData.siteLink },\n {\n magnoliaComponentId: domRootId,\n atlOrigin: getParameterByName('atlOrigin', domain),\n productKey: parseProductKey(label)\n }\n );\n\n return useCallbackWithAnalytics((event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n window.location.assign(domain);\n }, analyticsData);\n };\n\n if (sites.length > 1) {\n return (\n \n \n {isOpen ? (\n \n ) : null}\n \n );\n } else {\n return (\n \n \n \n \n \n );\n }\n}\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n\n padding: 4px 12px;\n\n &:hover {\n background-color: ${colors.N20};\n }\n`;\n\nconst ProductLink = styled.a`\n text-decoration: none;\n\n &:hover {\n text-decoration: none;\n }\n`;\n\nconst Header = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nconst ProductNameLabel = styled.span`\n margin-left: 8px;\n flex: 1;\n font-size: 12px;\n line-height: 14px;\n color: ${colors.N800};\n`;\n\nexport default withAnalyticsEvents()(ProductDropdownItem);\n","import { colors } from '@atlaskit/theme';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport styled from 'styled-components';\n\nimport { messages } from '../messages';\nimport { isNotEmpty } from '../utils/filters';\nimport {\n default as ProductDropdownItemWithAnalytics,\n ProductDropdownItemProps\n} from './product-dropdown-item';\n\nimport { UserProfileViewType } from '../user-profile-view';\n\nexport type ProductsViewProps = {\n readonly products: ProductDropdownItemProps[];\n readonly type?: UserProfileViewType;\n readonly domRootId?: string;\n};\n\nexport function ProductsView({ products, type, domRootId }: ProductsViewProps) {\n return (\n \n \n {type === 'wac-mobile' ? (\n \n \n \n
\n ) : (\n \n )}\n \n {products\n .filter(({ sites }) => isNotEmpty(sites))\n .map((product) => (\n \n ))}\n \n );\n}\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n margin: 12px 0;\n`;\n\nconst MessageLabel = styled.span`\n margin-left: 12px;\n margin-bottom: 11px;\n font-size: 12px;\n line-height: 14px;\n color: ${colors.N800};\n`;\n\nconst MessageLabelDivider = styled.hr`\n width: 64px;\n margin-left: 0px;\n`;\n","export function isNotEmpty(array: T[]): boolean {\n return array.length > 0;\n}\n","import { colors, fontFamily } from '@atlaskit/theme';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport styled from 'styled-components';\nimport { messages } from '../messages';\n\nexport type UserNavProps = {\n readonly onProfileClick: () => void;\n readonly onLicensesClick: () => void;\n readonly onLogOutClick?: () => void;\n};\n\nexport function UserNav({\n onProfileClick,\n onLicensesClick,\n onLogOutClick\n}: UserNavProps): JSX.Element {\n if (onLogOutClick) {\n return (\n \n \n \n \n \n );\n } else {\n return (\n \n \n \n \n );\n }\n}\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n`;\n\nconst Button = styled.button`\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n font: inherit;\n outline: inherit;\n\n color: ${colors.N600};\n text-decoration: none;\n font-family: ${fontFamily};\n font-size: 12px;\n line-height: 21px;\n cursor: pointer;\n`;\n","import Button from '@atlaskit/button';\nimport ChevronLeftLargeIcon from '@atlaskit/icon/glyph/chevron-left-large';\nimport CrossIcon from '@atlaskit/icon/glyph/cross';\nimport { colors, fontFamily } from '@atlaskit/theme';\nimport React from 'react';\nimport styled from 'styled-components';\n\nimport { EmptyView } from './components/empty-view';\nimport { ProductDropdownItemProps } from './components/product-dropdown-item';\nimport { ProductsView } from './components/products-view';\nimport { UserNav } from './components/user-nav';\n\nexport type UserProfileViewType = 'wac-desktop' | 'wac-mobile';\n\nexport type UserProfileViewProps = {\n readonly userName: string;\n readonly userEmail: string;\n readonly products: ProductDropdownItemProps[];\n\n readonly onProfileClick: () => void;\n readonly onLicensesClick: () => void;\n readonly onLogOutClick: () => void;\n\n readonly getStartedUrl: string;\n readonly onGetStartedClick?: () => void;\n readonly onMobileBackClick?: () => void;\n readonly onMobileCloseClick?: () => void;\n\n readonly avatarSrc?: string;\n readonly type?: UserProfileViewType;\n readonly domRootId?: string;\n};\n\nexport function UserProfileView({\n userName,\n userEmail,\n products,\n getStartedUrl,\n onGetStartedClick,\n onProfileClick,\n onLicensesClick,\n onLogOutClick,\n onMobileBackClick,\n onMobileCloseClick,\n domRootId,\n type = 'wac-desktop'\n}: UserProfileViewProps) {\n switch (type) {\n case 'wac-mobile':\n return (\n \n \n }\n onClick={() => onMobileBackClick && onMobileBackClick()}\n />\n \n {userName}\n {userEmail}\n \n }\n onClick={() => onMobileCloseClick && onMobileCloseClick()}\n />\n \n {products.length > 0 ? (\n \n ) : (\n \n )}\n \n \n \n \n );\n default:\n return (\n \n \n {userName}\n {userEmail}\n \n {products.length > 0 ? (\n \n ) : (\n \n )}\n \n \n );\n }\n}\n\nconst RootContainer = styled.div`\n width: 190px;\n margin: -4px 0;\n font-family: ${fontFamily};\n`;\n\nconst RootContainerMobile = styled.div`\n width: 100%;\n margin: -4px 0;\n font-family: ${fontFamily};\n`;\n\nconst UserDetailsContainer = styled.div`\n padding: 8px 14px;\n background-color: ${colors.N800};\n`;\n\nconst UserDetailsContainerMobile = styled.div`\n flex: 1;\n padding: 8px 14px;\n color: white;\n`;\n\nconst Footer = styled.div`\n margin: 12px;\n padding-top: 11px;\n border-top: 1px solid ${colors.N40};\n`;\n\nconst FooterMobile = styled.div`\n padding: 20px 15px;\n border-top: 1px solid ${colors.N40};\n background-color: ${colors.N20};\n`;\n\nconst UserNameLabel = styled.div`\n font-size: 15px;\n line-height: 18px;\n color: ${colors.N0};\n`;\n\nconst UserEmailLabel = styled.div`\n font-size: 10px;\n line-height: 12px;\n color: ${colors.N50};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nconst UserNameLabelMobile = styled.div`\n font-size: 15px;\n line-height: 18px;\n color: black;\n`;\n\nconst UserEmailLabelMobile = styled.div`\n font-size: 10px;\n line-height: 12px;\n color: black;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nconst TopRowContainer = styled.div`\n width: 100%;\n display: flex;\n border-bottom: 1px solid ${colors.N40};\n`;\n","export default (function (channel) { return function (payload) { return function (createAnalyticsEvent) {\n var consumerEvent = createAnalyticsEvent(payload);\n var clonedEvent = consumerEvent.clone();\n if (clonedEvent) {\n clonedEvent.fire(channel);\n }\n return consumerEvent;\n}; }; });\n//# sourceMappingURL=createAndFireEvent.js.map","import { __extends, __read, __spread } from \"tslib\";\nimport React, { Children, Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { AnalyticsReactContext } from './AnalyticsReactContext';\nvar ContextTypes = {\n getAtlaskitAnalyticsContext: PropTypes.func,\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n};\nvar AnalyticsContext = /** @class */ (function (_super) {\n __extends(AnalyticsContext, _super);\n function AnalyticsContext(props) {\n var _this = _super.call(this, props) || this;\n _this.getChildContext = function () { return ({\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n }); };\n _this.getAnalyticsContext = function () {\n var data = _this.props.data;\n var getAtlaskitAnalyticsContext = _this.context.getAtlaskitAnalyticsContext;\n var ancestorData = (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [];\n return __spread(ancestorData, [data]);\n };\n _this.getAnalyticsEventHandlers = function () {\n var getAtlaskitAnalyticsEventHandlers = _this.context.getAtlaskitAnalyticsEventHandlers;\n var ancestorHandlers = (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [];\n return ancestorHandlers;\n };\n _this.state = {\n getAtlaskitAnalyticsContext: _this.getAnalyticsContext,\n getAtlaskitAnalyticsEventHandlers: _this.getAnalyticsEventHandlers,\n };\n return _this;\n }\n AnalyticsContext.prototype.render = function () {\n var children = this.props.children;\n return (React.createElement(AnalyticsReactContext.Provider, { value: this.state }, Children.only(children)));\n };\n AnalyticsContext.contextTypes = ContextTypes;\n AnalyticsContext.childContextTypes = ContextTypes;\n return AnalyticsContext;\n}(Component));\nexport default AnalyticsContext;\n//# sourceMappingURL=AnalyticsContext.js.map","import { __assign } from \"tslib\";\nvar AnalyticsEvent = /** @class */ (function () {\n function AnalyticsEvent(props) {\n var _this = this;\n this.clone = function () {\n // We stringify and parse here to get a hacky \"deep clone\" of the object.\n // This has some limitations in that it wont support functions, regexs, Maps, Sets, etc,\n // but none of those need to be represented in our payload, so we consider this fine\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new AnalyticsEvent({ payload: payload });\n };\n this.payload = props.payload;\n }\n AnalyticsEvent.prototype.update = function (updater) {\n if (typeof updater === 'function') {\n this.payload = updater(this.payload);\n }\n if (typeof updater === 'object') {\n this.payload = __assign(__assign({}, this.payload), updater);\n }\n return this;\n };\n return AnalyticsEvent;\n}());\nexport default AnalyticsEvent;\n//# sourceMappingURL=AnalyticsEvent.js.map","import { __extends, __read, __spread } from \"tslib\";\nimport AnalyticsEvent from './AnalyticsEvent';\nvar UIAnalyticsEvent = /** @class */ (function (_super) {\n __extends(UIAnalyticsEvent, _super);\n function UIAnalyticsEvent(props) {\n var _this = _super.call(this, props) || this;\n _this.clone = function () {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot clone an event after it's been fired.\");\n return null;\n }\n var context = __spread(_this.context);\n var handlers = __spread(_this.handlers);\n /**\n * A hacky \"deep clone\" of the object. This is limited in that it wont\n * support functions, regexs, Maps, Sets, etc, but none of those need to\n * be represented in our payload.\n */\n var payload = JSON.parse(JSON.stringify(_this.payload));\n return new UIAnalyticsEvent({ context: context, handlers: handlers, payload: payload });\n };\n _this.fire = function (channel) {\n if (_this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn('Cannot fire an event twice.');\n return;\n }\n _this.handlers.forEach(function (handler) { return handler(_this, channel); });\n _this.hasFired = true;\n };\n _this.context = props.context || [];\n _this.handlers = props.handlers || [];\n _this.hasFired = false;\n return _this;\n }\n UIAnalyticsEvent.prototype.update = function (updater) {\n if (this.hasFired) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot update an event after it's been fired.\");\n return this;\n }\n return _super.prototype.update.call(this, updater);\n };\n return UIAnalyticsEvent;\n}(AnalyticsEvent));\nexport default UIAnalyticsEvent;\n//# sourceMappingURL=UIAnalyticsEvent.js.map","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport UIAnalyticsEvent from './UIAnalyticsEvent';\n/**\n * This component is used to grab the analytics functions off context.\n * It uses legacy context, but provides an API similar to 16.3 context.\n * This makes it easier to use with the forward ref API.\n */\nvar AnalyticsContextConsumer = /** @class */ (function (_super) {\n __extends(AnalyticsContextConsumer, _super);\n function AnalyticsContextConsumer(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Store references to the original and patched event props so we can\n * determine when to update the patched props\n */\n _this.originalEventProps = {};\n _this.patchedEventProps = {};\n // Update patched event props only if the original props have changed\n _this.updatePatchedEventProps = function (props) {\n var changedPropCallbacks = Object.keys(_this.props.createEventMap).filter(function (p) { return _this.originalEventProps[p] !== props[p]; });\n if (changedPropCallbacks.length > 0) {\n _this.patchedEventProps = __assign(__assign({}, _this.patchedEventProps), _this.mapCreateEventsToProps(changedPropCallbacks, props));\n changedPropCallbacks.forEach(function (p) {\n _this.originalEventProps[p] = props[p];\n });\n }\n return _this.patchedEventProps;\n };\n _this.mapCreateEventsToProps = function (changedPropNames, props) {\n return changedPropNames.reduce(function (modified, propCallbackName) {\n var _a;\n var eventCreator = _this.props.createEventMap[propCallbackName];\n var providedCallback = props[propCallbackName];\n if (!['object', 'function'].includes(typeof eventCreator)) {\n return modified;\n }\n var modifiedCallback = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var analyticsEvent = typeof eventCreator === 'function'\n ? eventCreator(_this.createAnalyticsEvent, props)\n : _this.createAnalyticsEvent(eventCreator);\n if (providedCallback) {\n providedCallback.apply(void 0, __spread(args, [analyticsEvent]));\n }\n };\n return __assign(__assign({}, modified), (_a = {}, _a[propCallbackName] = modifiedCallback, _a));\n }, {});\n };\n _this.createAnalyticsEvent = function (payload) {\n var _a = _this.context, getAtlaskitAnalyticsEventHandlers = _a.getAtlaskitAnalyticsEventHandlers, getAtlaskitAnalyticsContext = _a.getAtlaskitAnalyticsContext;\n return new UIAnalyticsEvent({\n context: (typeof getAtlaskitAnalyticsContext === 'function' &&\n getAtlaskitAnalyticsContext()) ||\n [],\n handlers: (typeof getAtlaskitAnalyticsEventHandlers === 'function' &&\n getAtlaskitAnalyticsEventHandlers()) ||\n [],\n payload: payload,\n });\n };\n Object.keys(_this.props.createEventMap).forEach(function (p) {\n _this.originalEventProps[p] = props.wrappedComponentProps[p];\n });\n _this.patchedEventProps = _this.mapCreateEventsToProps(Object.keys(_this.props.createEventMap), props.wrappedComponentProps);\n return _this;\n }\n AnalyticsContextConsumer.prototype.render = function () {\n var patchedEventProps = this.updatePatchedEventProps(this.props.wrappedComponentProps);\n return this.props.children({\n createAnalyticsEvent: this.createAnalyticsEvent,\n patchedEventProps: patchedEventProps,\n });\n };\n AnalyticsContextConsumer.contextTypes = {\n getAtlaskitAnalyticsEventHandlers: PropTypes.func,\n getAtlaskitAnalyticsContext: PropTypes.func,\n };\n AnalyticsContextConsumer.defaultProps = {\n createEventMap: {},\n };\n return AnalyticsContextConsumer;\n}(React.Component));\nexport default AnalyticsContextConsumer;\n//# sourceMappingURL=AnalyticsContextConsumer.js.map","// ideally this would be fetched from ../constants but that causes a\n// circular dep loop. This will be refactored as part of a breaking\n// change in the future.\nconst DEFAULT_THEME_MODE = 'light';\nconst THEME_MODES = ['light', 'dark'];\n// Resolves the different types of theme objects in the current API\nexport default function getTheme(props) {\n if (props && props.theme) {\n // Theme is the global Atlaskit theme\n if ('__ATLASKIT_THEME__' in props.theme) {\n return props.theme.__ATLASKIT_THEME__;\n }\n // User has provided alternative modes\n else if ('mode' in props.theme && THEME_MODES.includes(props.theme.mode)) {\n return props.theme;\n }\n }\n // If format not supported (or no theme provided), return standard theme\n return { mode: DEFAULT_THEME_MODE };\n}\n//# sourceMappingURL=getTheme.js.map","/* eslint-disable prefer-rest-params */\nimport getTheme from './getTheme';\n// Unpack custom variants, and get correct value for the current theme\nfunction themedVariants(variantProp, variants) {\n return (props) => {\n const theme = getTheme(props);\n if (props && props[variantProp] && variants) {\n const modes = variants[props[variantProp]];\n if (modes && modes[theme.mode]) {\n const value = modes[theme.mode];\n if (value)\n return value; // TS believes value can be undefined\n }\n }\n return '';\n };\n}\nexport default function themed(modesOrVariant, variantModes) {\n if (typeof modesOrVariant === 'string') {\n return themedVariants(modesOrVariant, variantModes);\n }\n const modes = modesOrVariant;\n return (props) => {\n // Get theme from the user's props\n const theme = getTheme(props);\n // User isn't required to provide both light and dark values\n if (theme.mode in modes) {\n const value = modes[theme.mode]; // TS believes value can be undefined\n if (value)\n return value;\n }\n return '';\n };\n}\n//# sourceMappingURL=themed.js.map","import themed from './utils/themed';\n// Reds\nexport const R50 = '#FFEBE6';\nexport const R75 = '#FFBDAD';\nexport const R100 = '#FF8F73';\nexport const R200 = '#FF7452';\nexport const R300 = '#FF5630';\nexport const R400 = '#DE350B';\nexport const R500 = '#BF2600';\n// Yellows\nexport const Y50 = '#FFFAE6';\nexport const Y75 = '#FFF0B3';\nexport const Y100 = '#FFE380';\nexport const Y200 = '#FFC400';\nexport const Y300 = '#FFAB00';\nexport const Y400 = '#FF991F';\nexport const Y500 = '#FF8B00';\n// Greens\nexport const G50 = '#E3FCEF';\nexport const G75 = '#ABF5D1';\nexport const G100 = '#79F2C0';\nexport const G200 = '#57D9A3';\nexport const G300 = '#36B37E';\nexport const G400 = '#00875A';\nexport const G500 = '#006644';\n// Blues\nexport const B50 = '#DEEBFF';\nexport const B75 = '#B3D4FF';\nexport const B100 = '#4C9AFF';\nexport const B200 = '#2684FF';\nexport const B300 = '#0065FF';\nexport const B400 = '#0052CC';\nexport const B500 = '#0747A6';\n// Purples\nexport const P50 = '#EAE6FF';\nexport const P75 = '#C0B6F2';\nexport const P100 = '#998DD9';\nexport const P200 = '#8777D9';\nexport const P300 = '#6554C0';\nexport const P400 = '#5243AA';\nexport const P500 = '#403294';\n// Teals\nexport const T50 = '#E6FCFF';\nexport const T75 = '#B3F5FF';\nexport const T100 = '#79E2F2';\nexport const T200 = '#00C7E6';\nexport const T300 = '#00B8D9';\nexport const T400 = '#00A3BF';\nexport const T500 = '#008DA6';\n// Neutrals\nexport const N0 = '#FFFFFF';\nexport const N10 = '#FAFBFC';\nexport const N20 = '#F4F5F7';\nexport const N30 = '#EBECF0';\nexport const N40 = '#DFE1E6';\nexport const N50 = '#C1C7D0';\nexport const N60 = '#B3BAC5';\nexport const N70 = '#A5ADBA';\nexport const N80 = '#97A0AF';\nexport const N90 = '#8993A4';\nexport const N100 = '#7A869A';\nexport const N200 = '#6B778C';\nexport const N300 = '#5E6C84';\nexport const N400 = '#505F79';\nexport const N500 = '#42526E';\nexport const N600 = '#344563';\nexport const N700 = '#253858';\nexport const N800 = '#172B4D';\n// ATTENTION: update the tints if you update this\nexport const N900 = '#091E42';\n// Each tint is made of N900 and an alpha channel\nexport const N10A = 'rgba(9, 30, 66, 0.02)';\nexport const N20A = 'rgba(9, 30, 66, 0.04)';\nexport const N30A = 'rgba(9, 30, 66, 0.08)';\nexport const N40A = 'rgba(9, 30, 66, 0.13)';\nexport const N50A = 'rgba(9, 30, 66, 0.25)';\nexport const N60A = 'rgba(9, 30, 66, 0.31)';\nexport const N70A = 'rgba(9, 30, 66, 0.36)';\nexport const N80A = 'rgba(9, 30, 66, 0.42)';\nexport const N90A = 'rgba(9, 30, 66, 0.48)';\nexport const N100A = 'rgba(9, 30, 66, 0.54)';\nexport const N200A = 'rgba(9, 30, 66, 0.60)';\nexport const N300A = 'rgba(9, 30, 66, 0.66)';\nexport const N400A = 'rgba(9, 30, 66, 0.71)';\nexport const N500A = 'rgba(9, 30, 66, 0.77)';\nexport const N600A = 'rgba(9, 30, 66, 0.82)';\nexport const N700A = 'rgba(9, 30, 66, 0.89)';\nexport const N800A = 'rgba(9, 30, 66, 0.95)';\n// Dark Mode Neutrals\nexport const DN900 = '#E6EDFA';\nexport const DN800 = '#DCE5F5';\nexport const DN700 = '#CED9EB';\nexport const DN600 = '#B8C7E0';\nexport const DN500 = '#ABBBD6';\nexport const DN400 = '#9FB0CC';\nexport const DN300 = '#8C9CB8';\nexport const DN200 = '#7988A3';\nexport const DN100 = '#67758F';\nexport const DN90 = '#56637A';\nexport const DN80 = '#455166';\nexport const DN70 = '#3B475C';\nexport const DN60 = '#313D52';\nexport const DN50 = '#283447';\nexport const DN40 = '#202B3D';\nexport const DN30 = '#1B2638';\nexport const DN20 = '#121A29';\nexport const DN10 = '#0E1624';\n// ATTENTION: update the tints if you update this\nexport const DN0 = '#0D1424';\n// Each dark tint is made of DN0 and an alpha channel\nexport const DN800A = 'rgba(13, 20, 36, 0.06)';\nexport const DN700A = 'rgba(13, 20, 36, 0.14)';\nexport const DN600A = 'rgba(13, 20, 36, 0.18)';\nexport const DN500A = 'rgba(13, 20, 36, 0.29)';\nexport const DN400A = 'rgba(13, 20, 36, 0.36)';\nexport const DN300A = 'rgba(13, 20, 36, 0.40)';\nexport const DN200A = 'rgba(13, 20, 36, 0.47)';\nexport const DN100A = 'rgba(13, 20, 36, 0.53)';\nexport const DN90A = 'rgba(13, 20, 36, 0.63)';\nexport const DN80A = 'rgba(13, 20, 36, 0.73)';\nexport const DN70A = 'rgba(13, 20, 36, 0.78)';\nexport const DN60A = 'rgba(13, 20, 36, 0.81)';\nexport const DN50A = 'rgba(13, 20, 36, 0.85)';\nexport const DN40A = 'rgba(13, 20, 36, 0.89)';\nexport const DN30A = 'rgba(13, 20, 36, 0.92)';\nexport const DN20A = 'rgba(13, 20, 36, 0.95)';\nexport const DN10A = 'rgba(13, 20, 36, 0.97)';\n// Themed colors\nexport const background = themed({ light: N0, dark: DN30 });\nexport const backgroundActive = themed({ light: B50, dark: B75 });\nexport const backgroundHover = themed({ light: N30, dark: DN70 });\nexport const backgroundOnLayer = themed({ light: N0, dark: DN50 });\nexport const text = themed({ light: N900, dark: DN600 });\nexport const textHover = themed({ light: N800, dark: DN600 });\nexport const textActive = themed({ light: B400, dark: B400 });\nexport const subtleText = themed({ light: N200, dark: DN300 });\nexport const placeholderText = themed({ light: N100, dark: DN200 });\nexport const heading = themed({ light: N800, dark: DN600 });\nexport const subtleHeading = themed({ light: N200, dark: DN300 });\nexport const codeBlock = themed({ light: N20, dark: DN50 });\nexport const link = themed({ light: B400, dark: B100 });\nexport const linkHover = themed({ light: B300, dark: B200 });\nexport const linkActive = themed({ light: B500, dark: B100 });\nexport const linkOutline = themed({ light: B100, dark: B200 });\nexport const primary = themed({ light: B400, dark: B100 });\nexport const blue = themed({ light: B400, dark: B100 });\nexport const teal = themed({ light: T300, dark: T200 });\nexport const purple = themed({ light: P300, dark: P100 });\nexport const red = themed({ light: R300, dark: R300 });\nexport const yellow = themed({ light: Y300, dark: Y300 });\nexport const green = themed({ light: G300, dark: G300 });\nexport const skeleton = () => N20A;\n//# sourceMappingURL=colors.js.map","import { gridSize } from '@atlaskit/theme/constants';\nexport var TRANSITION_DURATION = '200ms';\nvar gridSizeValue = gridSize();\nexport var AVATAR_SIZES = {\n xsmall: gridSizeValue * 2,\n small: gridSizeValue * 3,\n medium: gridSizeValue * 4,\n large: gridSizeValue * 5,\n xlarge: gridSizeValue * 12,\n xxlarge: gridSizeValue * 16,\n};\n// border radius only applies to \"square\" avatars\nexport var AVATAR_RADIUS = {\n xsmall: 2,\n small: 2,\n medium: 3,\n large: 3,\n xlarge: 6,\n xxlarge: 12,\n};\nexport var BORDER_WIDTH = {\n xsmall: 2,\n small: 2,\n medium: 2,\n large: 2,\n xlarge: 2,\n xxlarge: 2,\n};\n// NOTE: sizes xsmall & xxlarge DO NOT support\n// - groups\n// - presence\n// - status\nexport var EXCESS_INDICATOR_FONT_SIZE = {\n small: 10,\n medium: 11,\n large: 12,\n xlarge: 16,\n};\nexport var ICON_SIZES = {\n small: 12,\n medium: 14,\n large: 15,\n xlarge: 18,\n};\nexport var ICON_OFFSET = {\n small: 0,\n medium: 0,\n large: 1,\n xlarge: 7,\n};\nexport var SQUARE_ICON_OFFSET = {\n small: 0,\n medium: 0,\n large: 0,\n xlarge: 1,\n};\n//# sourceMappingURL=constants.js.map","import { __makeTemplateObject } from \"tslib\";\nimport { css } from 'styled-components';\nimport { B200, background, DN80A, N200A, N70A } from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { AVATAR_RADIUS, AVATAR_SIZES, BORDER_WIDTH, TRANSITION_DURATION, } from './constants';\nvar backgroundColorFocus = B200;\nvar overlayColorDefault = 'transparent';\nvar overlayColorHover = N70A;\nvar overlayColorSelected = N200A;\nvar overlayColorDisabled = themed({\n light: 'rgba(255, 255, 255, 0.7)',\n dark: DN80A,\n});\n// \"square\" avatars are explicit\nexport function getBorderRadius(props, config) {\n if (config === void 0) { config = { includeBorderWidth: false }; }\n var borderWidth = config.includeBorderWidth\n ? BORDER_WIDTH[props.size]\n : 0;\n return props.appearance === 'circle'\n ? '50%'\n : AVATAR_RADIUS[props.size] + borderWidth + \"px\";\n}\nexport var getSize = function (_a) {\n var size = _a.size;\n return AVATAR_SIZES[size];\n}; // for testing\nexport function getAvatarDimensions(_a, config) {\n var size = _a.size;\n if (config === void 0) { config = {\n includeBorderWidth: false,\n sizeOnly: false,\n }; }\n var borderWidth = config.includeBorderWidth\n ? BORDER_WIDTH[size] * 2\n : 0;\n var finalSize = AVATAR_SIZES[size] + borderWidth;\n return config.sizeOnly\n ? finalSize\n : \"\\n height: \" + finalSize + \"px;\\n width: \" + finalSize + \"px;\\n \";\n}\n// expose here for use with multiple element types\nexport function getInnerStyles(props) {\n if (props === void 0) { props = { appearance: 'circle', size: 'medium' }; }\n var boxSizing = 'content-box';\n var borderWidth = BORDER_WIDTH[props.size] + \"px\";\n var isInteractive = Boolean(props.isInteractive || props.href || props.onClick);\n // We make the distinction between isInteractive and isClickable as supplying a tooltip\n // makes the avatar interactive but not clickable\n var isClickable = Boolean(props.href || props.onClick);\n var backgroundColor = props.borderColor || background;\n // Inherit cursor styles so we don't cancel out pointer cursors in places like avatar group more dropdown\n var cursor = 'inherit';\n var outline = 'none';\n var overlayShade = overlayColorDefault;\n var overlayOpacity = 0;\n var pointerEvents = 'auto';\n var position = 'static';\n var transform = 'translateZ(0)';\n var transitionDuration = '0s';\n // Interaction: Hover\n if (isInteractive && (props.isActive || props.isHover)) {\n overlayShade = overlayColorHover;\n overlayOpacity = 1;\n }\n // Interaction: Active\n if (isClickable && props.isActive) {\n transform = 'scale(0.9)';\n }\n // Interaction: Focus\n if (isInteractive && props.isFocus && !props.isActive) {\n outline = 'none';\n backgroundColor = backgroundColorFocus;\n transitionDuration = TRANSITION_DURATION;\n }\n // Disabled\n if (props.isDisabled) {\n cursor = 'not-allowed';\n overlayShade = overlayColorDisabled;\n overlayOpacity = 1;\n pointerEvents = 'none';\n }\n // Clickable\n if (isClickable) {\n cursor = 'pointer';\n }\n // Loading\n if (props.isSelected) {\n overlayShade = overlayColorSelected;\n overlayOpacity = 1;\n }\n // Stack\n if (props.stackIndex) {\n position = 'relative';\n }\n return css(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n \", \";\\n align-items: stretch;\\n background-color: \", \";\\n border: 0;\\n border-radius: \", \";\\n padding: \", \";\\n box-sizing: \", \";\\n cursor: \", \";\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n outline: \", \";\\n overflow: hidden;\\n pointer-events: \", \";\\n position: \", \";\\n transform: \", \";\\n transition: background-color \", \" ease-out;\\n\\n a &,\\n button & {\\n cursor: pointer;\\n }\\n\\n &::after {\\n background-color: \", \";\\n border-radius: \", \";\\n bottom: \", \";\\n content: ' ';\\n left: \", \";\\n opacity: \", \";\\n pointer-events: none;\\n position: absolute;\\n right: \", \";\\n top: \", \";\\n transition: opacity \", \";\\n }\\n\\n &::-moz-focus-inner {\\n border: 0;\\n margin: 0;\\n padding: 0;\\n }\\n \"], [\"\\n \", \";\\n align-items: stretch;\\n background-color: \", \";\\n border: 0;\\n border-radius: \", \";\\n padding: \", \";\\n box-sizing: \", \";\\n cursor: \", \";\\n display: flex;\\n flex-direction: column;\\n justify-content: center;\\n outline: \", \";\\n overflow: hidden;\\n pointer-events: \", \";\\n position: \", \";\\n transform: \", \";\\n transition: background-color \", \" ease-out;\\n\\n a &,\\n button & {\\n cursor: pointer;\\n }\\n\\n &::after {\\n background-color: \", \";\\n border-radius: \", \";\\n bottom: \", \";\\n content: ' ';\\n left: \", \";\\n opacity: \", \";\\n pointer-events: none;\\n position: absolute;\\n right: \", \";\\n top: \", \";\\n transition: opacity \", \";\\n }\\n\\n &::-moz-focus-inner {\\n border: 0;\\n margin: 0;\\n padding: 0;\\n }\\n \"])), getAvatarDimensions, backgroundColor, function (p) { return getBorderRadius(p, { includeBorderWidth: true }); }, borderWidth, boxSizing, cursor, outline, pointerEvents, position, transform, transitionDuration, overlayShade, getBorderRadius, borderWidth, borderWidth, overlayOpacity, borderWidth, borderWidth, TRANSITION_DURATION);\n}\nvar templateObject_1;\n//# sourceMappingURL=utils.js.map","import React, { createContext, useContext, useCallback, } from 'react';\n/*\ncreateTheme is used to create a set of Providers and Consumers for theming components.\n- Takes a default theme function; this theme function gets a set of props, and returns tokens\n based on those props. An example of this default theme function is one that produces the standard\n appearance of the component\n- Returns two things - a Provider that allow for additional themes to be applied, and a Consumer\n that can get the current theme and fetch it.\n*/\nexport function createTheme(defaultGetTokens) {\n const emptyThemeFn = (getTokens, props) => getTokens(props);\n /* Internally, Theme uses React Context, with internal providers and consumers.\n The React Context passes only a function that gets props, and turns them into tokens. This\n function gets mixed as more Providers with their own themes are added. This mixed function\n is ultimately picked up by Consumers, which implement a context consumer internally to fetch\n the theme. */\n const ThemeContext = createContext(defaultGetTokens);\n // The Theme Consumer takes a function as its child - this function takes tokens, and the\n // return value is generally a set of nodes with the tokens applied appropriately.\n function Consumer(props) {\n const { children, ...themeProps } = props;\n const theme = useContext(ThemeContext);\n const themeFn = theme || emptyThemeFn;\n // @ts-ignore See issue for more info: https://github.com/Microsoft/TypeScript/issues/10727\n // Argument of type 'Pick ReactNode; }, Exclude>' is not assignable to parameter of type 'ThemeProps'.ts(2345)\n const tokens = themeFn(themeProps);\n // We add a fragment to ensure we don't break people upgrading.\n // Previously they may have been able to pass in undefined without things blowing up.\n return React.createElement(React.Fragment, null, children(tokens));\n }\n /* The Theme Provider takes regular nodes as its child, but also takes a *theme function*\n - The theme function takes a set of props, as well as a function (getTokens) that can\n turn props into tokens.\n - The getTokens function isn't called immediately - instead the props are passed\n through a mix of parent theming functions\n Children of this provider will receive this mixed theme\n */\n function Provider(props) {\n const themeFn = useContext(ThemeContext);\n const valueFn = props.value || emptyThemeFn;\n const mixedFn = useCallback((themeProps) => valueFn(themeFn, themeProps), [themeFn, valueFn]);\n return (React.createElement(ThemeContext.Provider, { value: mixedFn }, props.children));\n }\n return { Consumer, Provider };\n}\n//# sourceMappingURL=createTheme.js.map","import { createTheme } from '../utils/createTheme';\n// Create default global light theme\nexport default createTheme(() => ({\n mode: 'light',\n}));\n//# sourceMappingURL=Theme.js.map","import React from 'react';\nimport Theme from './components/Theme';\n// Pre-executes the (global) theme and passes it as a prop to the supplied component.\n// This is useful for ensuring that the current theme is accessible as props\n// in styled-components.\nexport function withTheme(InnerComponent) {\n return function ComponentWithTheme(props) {\n return (React.createElement(Theme.Consumer, null, (tokens) => (React.createElement(InnerComponent, Object.assign({}, props, { theme: tokens })))));\n };\n}\n//# sourceMappingURL=hoc.js.map","import { __assign, __extends, __rest } from \"tslib\";\nimport React, { Component } from 'react';\n/**\n * Styling a avatar is complicated and there are a number of properties which\n * inform its appearance. We want to be able to style any arbitrary component\n * like a Link, but we don't want to pass all of these appearance-related props\n * through to the component or underlying DOM node. This component acts as a\n * layer which catches the appearance-related properties so that they can be\n * used by styled-components, then passes the rest of the props on to the custom\n * component.\n */\nvar CustomComponentProxy = /** @class */ (function (_super) {\n __extends(CustomComponentProxy, _super);\n function CustomComponentProxy() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CustomComponentProxy.prototype.render = function () {\n var _a = this.props, appearance = _a.appearance, avatar = _a.avatar, borderColor = _a.borderColor, ProxiedComponent = _a.component, enableTooltip = _a.enableTooltip, groupAppearance = _a.groupAppearance, innerRef = _a.innerRef, isActive = _a.isActive, isDisabled = _a.isDisabled, isFocus = _a.isFocus, isHover = _a.isHover, isSelected = _a.isSelected, primaryText = _a.primaryText, secondaryText = _a.secondaryText, stackIndex = _a.stackIndex, rest = __rest(_a, [\"appearance\", \"avatar\", \"borderColor\", \"component\", \"enableTooltip\", \"groupAppearance\", \"innerRef\", \"isActive\", \"isDisabled\", \"isFocus\", \"isHover\", \"isSelected\", \"primaryText\", \"secondaryText\", \"stackIndex\"]);\n return ProxiedComponent ? React.createElement(ProxiedComponent, __assign({}, rest)) : null;\n };\n return CustomComponentProxy;\n}(Component));\nexport default CustomComponentProxy;\n//# sourceMappingURL=CustomComponentProxy.js.map","import { __makeTemplateObject } from \"tslib\";\nimport styled from 'styled-components';\nimport { withTheme } from '@atlaskit/theme/components';\nimport CustomComponentProxy from '../components/CustomComponentProxy';\n// This is necessary because we don't know what DOM element the custom component will render.\nexport default (function (styles) {\n var StyledCustomComponent = withTheme(styled(CustomComponentProxy)(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n &,\\n &:hover,\\n &:active,\\n &:focus {\\n \", \"\\n }\\n \"], [\"\\n &,\\n &:hover,\\n &:active,\\n &:focus {\\n \", \"\\n }\\n \"])), styles));\n var StyledButton = withTheme(styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject([\"\\n \", \";\\n \"], [\"\\n \", \";\\n \"])), styles));\n var StyledLink = withTheme(styled.a(templateObject_3 || (templateObject_3 = __makeTemplateObject([\"\\n a& {\\n \", \";\\n }\\n \"], [\"\\n a& {\\n \", \";\\n }\\n \"])), styles));\n var StyledSpan = withTheme(styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject([\"\\n \", \";\\n \"], [\"\\n \", \";\\n \"])), styles));\n return function getStyled(_a) {\n var component = _a.component, href = _a.href, onClick = _a.onClick;\n var Ret = StyledSpan;\n if (component) {\n Ret = StyledCustomComponent;\n }\n else if (href) {\n Ret = StyledLink;\n }\n else if (onClick) {\n Ret = StyledButton;\n }\n return Ret;\n };\n});\nvar templateObject_1, templateObject_2, templateObject_3, templateObject_4;\n//# sourceMappingURL=styledCache.js.map","import { getInnerStyles } from '../styled/utils';\nimport styledCache from './styledCache';\nexport default styledCache(getInnerStyles);\n//# sourceMappingURL=getStyledAvatar.js.map","import { __assign, __values } from \"tslib\";\nexport function omit(obj) {\n var e_1, _a;\n var keysToOmit = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n keysToOmit[_i - 1] = arguments[_i];\n }\n var newObj = __assign({}, obj);\n try {\n for (var keysToOmit_1 = __values(keysToOmit), keysToOmit_1_1 = keysToOmit_1.next(); !keysToOmit_1_1.done; keysToOmit_1_1 = keysToOmit_1.next()) {\n var key = keysToOmit_1_1.value;\n delete newObj[key];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (keysToOmit_1_1 && !keysToOmit_1_1.done && (_a = keysToOmit_1.return)) _a.call(keysToOmit_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return newObj;\n}\nexport function getDisplayName(prefix, Component) {\n var componentName = Component.displayName || Component.name;\n return componentName ? prefix + \"(\" + componentName + \")\" : prefix;\n}\n//# sourceMappingURL=utils.js.map","import { __assign } from \"tslib\";\nimport { DN50, N40 } from '@atlaskit/theme/colors';\nimport { createTheme } from '@atlaskit/theme/components';\nimport { gridSize } from '@atlaskit/theme/constants';\nvar gridSizeValue = gridSize();\nvar AVATAR_SIZES = {\n xsmall: gridSizeValue * 2,\n small: gridSizeValue * 3,\n medium: gridSizeValue * 4,\n large: gridSizeValue * 5,\n xlarge: gridSizeValue * 12,\n xxlarge: gridSizeValue * 16,\n};\n// border radius only applies to \"square\" avatars\nvar AVATAR_RADIUS = {\n xsmall: 2,\n small: 2,\n medium: 3,\n large: 3,\n xlarge: 6,\n xxlarge: 12,\n};\nvar BORDER_WIDTH = {\n xsmall: 2,\n small: 2,\n medium: 2,\n large: 2,\n xlarge: 2,\n xxlarge: 2,\n};\nvar ICON_SIZES = {\n xsmall: 0,\n small: 12,\n medium: 14,\n large: 15,\n xlarge: 18,\n xxlarge: 0,\n};\nvar ICON_OFFSET = {\n xsmall: 0,\n small: 0,\n medium: 0,\n large: 1,\n xlarge: 7,\n xxlarge: 0,\n};\nvar SQUARE_ICON_OFFSET = {\n xsmall: 0,\n small: 0,\n medium: 0,\n large: 0,\n xlarge: 1,\n xxlarge: 0,\n};\nfunction getBackgroundColor(props) {\n var backgroundColors = {\n light: N40,\n dark: DN50,\n };\n return props.mode && props.isLoading\n ? backgroundColors[props.mode]\n : 'transparent';\n}\nfunction getBorderRadius(props) {\n var borderWidth = props.includeBorderWidth ? BORDER_WIDTH[props.size] : 0;\n var borderRadius = props.appearance === 'circle'\n ? '50%'\n : AVATAR_RADIUS[props.size] + borderWidth + \"px\";\n return borderRadius;\n}\nfunction getDimensions(props) {\n var borderWidth = props.includeBorderWidth\n ? BORDER_WIDTH[props.size] * 2\n : 0;\n var size = AVATAR_SIZES[props.size] + borderWidth;\n var width = size + \"px\";\n var height = width;\n return { height: height, width: width };\n}\nvar getPresenceLayout = function (props) {\n var presencePosition = props.appearance === 'square'\n ? -(BORDER_WIDTH[props.size] * 2)\n : ICON_OFFSET[props.size];\n var presenceSize = ICON_SIZES[props.size];\n return {\n bottom: presencePosition + \"px\",\n height: presenceSize + \"px\",\n right: presencePosition + \"px\",\n width: presenceSize + \"px\",\n };\n};\nvar getStatusLayout = function (props) {\n var statusPosition = props.appearance === 'square'\n ? SQUARE_ICON_OFFSET[props.size]\n : ICON_OFFSET[props.size];\n var statusSize = ICON_SIZES[props.size];\n return {\n height: statusSize + \"px\",\n right: statusPosition + \"px\",\n top: statusPosition + \"px\",\n width: statusSize + \"px\",\n };\n};\nvar propsDefaults = {\n appearance: 'circle',\n includeBorderWidth: false,\n isLoading: false,\n mode: 'light',\n presence: 'offline',\n size: 'xsmall',\n};\nexport var Theme = createTheme(function (props) {\n var propsWithDefaults = __assign(__assign({}, propsDefaults), props);\n return {\n backgroundColor: getBackgroundColor(propsWithDefaults),\n borderRadius: getBorderRadius(propsWithDefaults),\n dimensions: getDimensions(propsWithDefaults),\n presence: getPresenceLayout(propsWithDefaults),\n status: getStatusLayout(propsWithDefaults),\n };\n});\n//# sourceMappingURL=index.js.map","import { __assign } from \"tslib\";\nimport React from 'react';\nimport { Theme } from '../theme';\nvar Avatar = function (props) { return (React.createElement(Theme.Consumer, __assign({}, props, { includeBorderWidth: true }), function (_a) {\n var dimensions = _a.dimensions;\n return (React.createElement(\"div\", { \"data-testid\": props.testId, style: __assign({ display: 'inline-block', position: 'relative', outline: 0, zIndex: props.stackIndex }, dimensions) }, props.children));\n})); };\nexport default Avatar;\nexport var PresenceWrapper = function (props) { return (React.createElement(Theme.Consumer, __assign({}, props, { includeBorderWidth: true }), function (_a) {\n var presence = _a.presence;\n return (React.createElement(\"span\", { style: __assign({ pointerEvents: 'none', position: 'absolute' }, presence) }, props.children));\n})); };\nexport var StatusWrapper = function (props) { return (React.createElement(Theme.Consumer, __assign({}, props, { includeBorderWidth: true }), function (_a) {\n var status = _a.status;\n return (React.createElement(\"span\", { style: __assign({ position: 'absolute' }, status) }, props.children));\n})); };\n//# sourceMappingURL=Avatar.js.map","import { __assign, __makeTemplateObject, __rest } from \"tslib\";\nimport React from 'react';\nimport styled from 'styled-components';\nimport { background, DN100, N50 } from '@atlaskit/theme/colors';\nimport { themed, withTheme } from '@atlaskit/theme/components';\nimport { Theme } from '../theme';\nexport var ShapeGroup = withTheme(styled.g(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n & circle,\\n & rect {\\n fill: \", \";\\n }\\n & g {\\n fill: \", \";\\n }\\n\"], [\"\\n & circle,\\n & rect {\\n fill: \", \";\\n }\\n & g {\\n fill: \", \";\\n }\\n\"])), themed({ light: N50, dark: DN100 }), background));\nexport var Slot = function (_a) {\n var isLoading = _a.isLoading, appearance = _a.appearance, size = _a.size, backgroundImage = _a.backgroundImage, label = _a.label, role = _a.role;\n return (React.createElement(Theme.Consumer, { appearance: appearance, isLoading: isLoading, size: size }, function (_a) {\n var backgroundColor = _a.backgroundColor, borderRadius = _a.borderRadius;\n return (React.createElement(\"span\", { style: {\n backgroundColor: backgroundColor,\n backgroundImage: backgroundImage\n ? \"url(\" + backgroundImage + \")\"\n : undefined,\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n borderRadius: borderRadius,\n display: 'flex',\n flex: '1 1 100%',\n height: '100%',\n width: '100%',\n }, role: role, \"aria-label\": label }));\n }));\n};\nexport var Svg = function (_a) {\n var appearance = _a.appearance, size = _a.size, children = _a.children, isLoading = _a.isLoading, otherProps = __rest(_a, [\"appearance\", \"size\", \"children\", \"isLoading\"]);\n return (React.createElement(Theme.Consumer, { appearance: appearance, isLoading: isLoading, size: size }, function (_a) {\n var backgroundColor = _a.backgroundColor, borderRadius = _a.borderRadius;\n return (React.createElement(\"svg\", __assign({ style: {\n backgroundColor: backgroundColor,\n borderRadius: borderRadius,\n height: '100%',\n width: '100%',\n } }, otherProps), children));\n }));\n};\nvar templateObject_1;\n//# sourceMappingURL=AvatarImage.js.map","import { __extends } from \"tslib\";\nimport React, { PureComponent } from 'react';\nimport GlobalTheme from '@atlaskit/theme/components';\nimport { ShapeGroup, Slot, Svg } from '../styled/AvatarImage';\nexport function DefaultImage(_a) {\n var appearance = _a.appearance, size = _a.size, title = _a.title, isLoading = _a.isLoading;\n var rectBounds = 128;\n return (React.createElement(GlobalTheme.Consumer, null, function (_a) {\n var mode = _a.mode;\n return (React.createElement(Svg, { appearance: appearance, isLoading: isLoading, size: size, viewBox: \"0 0 \" + rectBounds + \" \" + rectBounds, version: \"1.1\", xmlns: \"http://www.w3.org/2000/svg\", role: \"img\", \"aria-label\": title }, appearance === 'circle' ? (React.createElement(ShapeGroup, { mode: mode },\n React.createElement(\"circle\", { cx: \"64\", cy: \"64\", r: \"64\" }),\n React.createElement(\"g\", null,\n React.createElement(\"path\", { d: \"M103,102.1388 C93.094,111.92 79.3504,118 64.1638,118 C48.8056,118 34.9294,111.768 25,101.7892 L25,95.2 C25,86.8096 31.981,80 40.6,80 L87.4,80 C96.019,80 103,86.8096 103,95.2 L103,102.1388 Z\" }),\n React.createElement(\"path\", { d: \"M63.9961647,24 C51.2938136,24 41,34.2938136 41,46.9961647 C41,59.7061864 51.2938136,70 63.9961647,70 C76.6985159,70 87,59.7061864 87,46.9961647 C87,34.2938136 76.6985159,24 63.9961647,24\" })))) : (React.createElement(ShapeGroup, { mode: mode },\n React.createElement(\"rect\", { x: \"0\", y: \"0\", width: rectBounds, height: rectBounds }),\n React.createElement(\"g\", { transform: \"translate(19.000000, 32.000000)\" },\n React.createElement(\"path\", { d: \"M18.25,32.5 L54.5833333,32.5 L54.5833333,23.4166667 L18.25,23.4166667 L18.25,32.5 Z M9.16666667,18.8331166 C9.16666667,16.3479549 11.236581,14.3333333 13.7195662,14.3333333 L59.1137671,14.3333333 C61.6282641,14.3333333 63.6666667,16.3815123 63.6666667,18.8331166 L63.6666667,41.5833333 L9.16666667,41.5833333 L9.16666667,18.8331166 Z\" }),\n React.createElement(\"path\", { d: \"M18.25,9.81383682 C18.25,4.7850061 22.3296003,0.708333333 27.3238554,0.708333333 L36.4261446,0.708333333 C41.4374965,0.708333333 45.5,4.76812825 45.5,9.81383682 L45.5,23.4166667 L18.25,23.4166667 L18.25,9.81383682 Z M36.4166667,9.81383682 C36.4166667,9.79803315 36.4184748,9.79303784 36.4207515,9.79166667 L27.3238554,9.79166667 C27.3447224,9.79166667 27.3333333,9.80308059 27.3333333,9.81383682 L27.3333333,14.3333333 L36.4166667,14.3333333 L36.4166667,9.81383682 Z\" }),\n React.createElement(\"path\", { d: \"M11.4386532,55.2083333 L74.9953562,55.2083333 L79.5452242,41.5833333 L9.80449752,41.5833333 L11.4386532,55.2083333 Z M0.1048547,36.987541 C-0.192399775,34.5091405 1.5865717,32.5 4.09502839,32.5 L87.6264735,32.5 C90.1274401,32.5 91.5225656,34.393506 90.7231047,36.7875656 L82.9702846,60.004101 C82.1795402,62.3720582 79.5279445,64.2916667 76.9985338,64.2916667 L7.91963924,64.2916667 C5.41227673,64.2916667 3.14113571,62.3029555 2.84143097,59.8041257 L0.1048547,36.987541 Z\" }))))));\n }));\n}\nvar AvatarImage = /** @class */ (function (_super) {\n __extends(AvatarImage, _super);\n function AvatarImage() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n hasError: false,\n isLoading: false,\n };\n _this.handleLoadSuccess = function () {\n _this.setState({ hasError: false, isLoading: false });\n };\n _this.handleLoadError = function () {\n _this.setState({ hasError: true, isLoading: false });\n };\n return _this;\n }\n AvatarImage.prototype.componentDidMount = function () {\n if (this.props.src) {\n // check whether there was a problem loading the image\n // if handleLoadError is called we show the default avatar\n var img = new Image();\n img.onerror = this.handleLoadError;\n img.src = this.props.src || '';\n }\n };\n AvatarImage.prototype.componentDidUpdate = function (prevProps) {\n var _this = this;\n if (this.props.src && this.props.src !== prevProps.src) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ isLoading: true }, function () {\n var img = new Image();\n img.onload = _this.handleLoadSuccess;\n img.onerror = _this.handleLoadError;\n img.src = _this.props.src || '';\n });\n }\n };\n AvatarImage.prototype.render = function () {\n var _a = this.props, alt = _a.alt, src = _a.src, appearance = _a.appearance, size = _a.size;\n var _b = this.state, hasError = _b.hasError, isLoading = _b.isLoading;\n var showDefault = !isLoading && (!src || hasError);\n var imageUrl = src && !isLoading ? src : undefined;\n return showDefault ? (React.createElement(DefaultImage, { appearance: appearance, size: size, title: alt, isLoading: isLoading })) : (React.createElement(Slot, { appearance: appearance, isLoading: isLoading, size: size, role: \"img\", label: alt, backgroundImage: imageUrl }));\n };\n return AvatarImage;\n}(PureComponent));\nexport default AvatarImage;\n//# sourceMappingURL=AvatarImage.js.map","export var propsOmittedFromClickData = [\n 'onBlur',\n 'onClick',\n 'onFocus',\n 'onKeyDown',\n 'onKeyUp',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseUp',\n];\n//# sourceMappingURL=constants.js.map","import { __assign, __makeTemplateObject } from \"tslib\";\nimport React from 'react';\nimport styled from 'styled-components';\nimport * as colors from '@atlaskit/theme/colors';\nimport { themed, withTheme } from '@atlaskit/theme/components';\nvar Svg = function (props) { return (React.createElement(\"svg\", __assign({ height: \"100%\", version: \"1.1\", viewBox: \"0 0 8 8\", width: \"100%\", xmlns: \"http://www.w3.org/2000/svg\" }, props))); };\nvar BusyCircle = withTheme(styled.circle(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), themed({ light: colors.R300, dark: colors.R200 })));\nvar BusyPath = withTheme(styled.path(templateObject_2 || (templateObject_2 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), colors.background));\nvar FocusPath = withTheme(styled.path(templateObject_3 || (templateObject_3 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), colors.purple));\nvar OfflineOuter = withTheme(styled.path(templateObject_4 || (templateObject_4 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), themed({ light: colors.N200, dark: colors.DN100 })));\nvar OfflineInner = withTheme(styled.path(templateObject_5 || (templateObject_5 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), themed({ light: colors.N40, dark: colors.DN500 })));\nvar OnlineCircle = withTheme(styled.circle(templateObject_6 || (templateObject_6 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), themed({ light: colors.G300, dark: colors.G200 })));\nexport default function getPresenceSvg(presence) {\n switch (presence) {\n case 'busy':\n return (React.createElement(Svg, null,\n React.createElement(BusyCircle, { cx: \"4\", cy: \"4\", r: \"4\" }),\n React.createElement(BusyPath, { d: \"M3.3,1.9l2.8,2.8c0.2,0.2,0.2,0.5,0,0.7L5.4,6.1c-0.2,0.2-0.5,0.2-0.7,0L1.9,3.3c-0.2-0.2-0.2-0.5,0-0.7l0.7-0.7C2.8,1.7,3.1,1.7,3.3,1.9z\" })));\n case 'focus':\n return (React.createElement(Svg, null,\n React.createElement(FocusPath, { d: \"M4,8 C1.790861,8 0,6.209139 0,4 C0,1.790861 1.790861,0 4,0 C6.209139,0 8,1.790861 8,4 C8,6.209139 6.209139,8 4,8 Z M4,6.66666667 C5.47275933,6.66666667 6.66666667,5.47275933 6.66666667,4 C6.66666667,2.52724067 5.47275933,1.33333333 4,1.33333333 C2.52724067,1.33333333 1.33333333,2.52724067 1.33333333,4 C1.33333333,5.47275933 2.52724067,6.66666667 4,6.66666667 Z M4,5.33333333 C3.26362033,5.33333333 2.66666667,4.73637967 2.66666667,4 C2.66666667,3.26362033 3.26362033,2.66666667 4,2.66666667 C4.73637967,2.66666667 5.33333333,3.26362033 5.33333333,4 C5.33333333,4.73637967 4.73637967,5.33333333 4,5.33333333 Z\" })));\n case 'offline':\n return (React.createElement(Svg, null,\n React.createElement(OfflineOuter, { d: \"M4,8 C6.209139,8 8,6.209139 8,4 C8,1.790861 6.209139,0 4,0 C1.790861,0 0,1.790861 0,4 C0,6.209139 1.790861,8 4,8 Z M4,6 C5.1045695,6 6,5.1045695 6,4 C6,2.8954305 5.1045695,2 4,2 C2.8954305,2 2,2.8954305 2,4 C2,5.1045695 2.8954305,6 4,6 Z\" }),\n React.createElement(OfflineInner, { d: \"M4,6 C5.1045695,6 6,5.1045695 6,4 C6,2.8954305 5.1045695,2 4,2 C2.8954305,2 2,2.8954305 2,4 C2,5.1045695 2.8954305,6 4,6 Z\" })));\n case 'online':\n return (React.createElement(Svg, null,\n React.createElement(OnlineCircle, { cx: \"4\", cy: \"4\", r: \"4\" })));\n default:\n return null;\n }\n}\nvar templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;\n//# sourceMappingURL=getPresenceSVG.js.map","import { __makeTemplateObject } from \"tslib\";\nimport styled from 'styled-components';\nimport { background } from '@atlaskit/theme/colors';\nimport { withTheme } from '@atlaskit/theme/components';\nimport { BORDER_WIDTH } from './constants';\nexport var Outer = withTheme(styled.span(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n align-content: center;\\n align-items: center;\\n background-color: \", \";\\n border-radius: 50%;\\n box-sizing: border-box;\\n display: flex;\\n height: 100%;\\n overflow: hidden;\\n padding: \", \"px;\\n width: 100%;\\n\"], [\"\\n align-content: center;\\n align-items: center;\\n background-color: \", \";\\n border-radius: 50%;\\n box-sizing: border-box;\\n display: flex;\\n height: 100%;\\n overflow: hidden;\\n padding: \",\n \"px;\\n width: 100%;\\n\"])), function (props) { return props.bgColor || background; }, function (_a) {\n var size = _a.size;\n return (size && BORDER_WIDTH[size]) || BORDER_WIDTH.medium;\n}));\nexport var Inner = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject([\"\\n align-items: center;\\n border-radius: 50%;\\n display: flex;\\n height: 100%;\\n overflow: hidden;\\n width: 100%;\\n\"], [\"\\n align-items: center;\\n border-radius: 50%;\\n display: flex;\\n height: 100%;\\n overflow: hidden;\\n width: 100%;\\n\"])));\nvar templateObject_1, templateObject_2;\n//# sourceMappingURL=Icon.js.map","import { __extends } from \"tslib\";\nimport React, { Component } from 'react';\nimport getPresenceSVG from '../helpers/getPresenceSVG';\nimport { Inner, Outer } from '../styled/Icon';\nvar Presence = /** @class */ (function (_super) {\n __extends(Presence, _super);\n function Presence() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Presence.prototype.render = function () {\n var _a = this.props, borderColor = _a.borderColor, children = _a.children, presence = _a.presence, size = _a.size;\n return (React.createElement(Outer, { size: size, bgColor: borderColor },\n React.createElement(Inner, null, children || (presence && getPresenceSVG(presence)))));\n };\n return Presence;\n}(Component));\nexport default Presence;\n//# sourceMappingURL=Presence.js.map","import { __assign, __makeTemplateObject } from \"tslib\";\nimport React from 'react';\nimport styled from 'styled-components';\nimport * as colors from '@atlaskit/theme/colors';\nimport { themed, withTheme } from '@atlaskit/theme/components';\nvar Svg = function (props) { return (React.createElement(\"svg\", __assign({ height: \"100%\", version: \"1.1\", viewBox: \"0 0 8 8\", width: \"100%\", xmlns: \"http://www.w3.org/2000/svg\" }, props))); };\nvar ApprovedCircle = withTheme(styled.circle(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), themed({ light: colors.G400, dark: colors.G300 })));\nvar ApprovedPath = withTheme(styled.path(templateObject_2 || (templateObject_2 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), colors.background));\nvar DeclinedCircle = withTheme(styled.circle(templateObject_3 || (templateObject_3 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), themed({ light: colors.R400, dark: colors.R300 })));\nvar DeclinedPath = withTheme(styled.path(templateObject_4 || (templateObject_4 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), colors.background));\nvar LockedCircle = withTheme(styled.circle(templateObject_5 || (templateObject_5 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), themed({ light: colors.N40, dark: colors.DN800 })));\nvar LockedPath = withTheme(styled.path(templateObject_6 || (templateObject_6 = __makeTemplateObject([\"\\n fill: \", \";\\n\"], [\"\\n fill: \", \";\\n\"])), themed({ light: colors.N500, dark: colors.DN30 })));\nexport default function getStatusSvg(status) {\n switch (status) {\n case 'approved':\n return (React.createElement(Svg, null,\n React.createElement(ApprovedCircle, { cx: \"4\", cy: \"4\", r: \"4\" }),\n React.createElement(ApprovedPath, { d: \"M2.47140452,3.52859548 C2.21105499,3.26824595 1.78894501,3.26824595 1.52859548,3.52859548 C1.26824595,3.78894501 1.26824595,4.21105499 1.52859548,4.47140452 L2.86192881,5.80473785 C3.12227834,6.06508738 3.54438833,6.06508738 3.80473785,5.80473785 L6.47140452,3.13807119 C6.73175405,2.87772166 6.73175405,2.45561167 6.47140452,2.19526215 C6.21105499,1.93491262 5.78894501,1.93491262 5.52859548,2.19526215 L3.33333333,4.39052429 L2.47140452,3.52859548 Z\" })));\n case 'declined':\n return (React.createElement(Svg, null,\n React.createElement(DeclinedCircle, { cx: \"4\", cy: \"4\", r: \"4\" }),\n React.createElement(DeclinedPath, { d: \"M4.890661,4.0088336 L5.81806461,3.07802178 C6.06167933,2.83351177 6.06048933,2.43826992 5.81540668,2.19522442 C5.57032402,1.95217891 5.17415651,1.95336612 4.93054179,2.19787613 L4.00765946,3.12415007 L3.06906871,2.18377143 C2.82523777,1.93947602 2.42906937,1.93863765 2.18420182,2.18189887 C1.93933427,2.42516008 1.93849394,2.82040282 2.18232488,3.06469822 L3.12544091,4.00961077 L2.20275024,4.93569234 C1.95913552,5.18020236 1.96032551,5.5754442 2.20540817,5.81848971 C2.45049083,6.06153521 2.84665833,6.060348 3.09027306,5.81583799 L4.00844245,4.89429431 L4.9092123,5.79678001 C5.15304324,6.04107541 5.54921164,6.04191379 5.79407919,5.79865257 C6.03894674,5.55539135 6.03978708,5.16014862 5.79595614,4.91585321 L4.890661,4.0088336 Z\" })));\n case 'locked':\n return (React.createElement(Svg, null,\n React.createElement(LockedCircle, { cx: \"4\", cy: \"4\", r: \"4\" }),\n React.createElement(LockedPath, { d: \"M4.13074827,1.21766493 L4.10368158,1.21766493 C3.36340745,1.21766493 2.76388015,1.80793503 2.76388015,2.5367787 L2.76388015,3.21632216 L3.44054754,3.21632216 L3.44054754,2.54344089 C3.44054754,2.17901906 3.74031119,1.88388401 4.11044825,1.88388401 L4.1239816,1.88388401 C4.49411866,1.88388401 4.79388232,2.17901906 4.79388232,2.54344089 L4.79388232,3.21632216 L5.47054971,3.21632216 L5.47054971,2.5367787 C5.47054971,1.80793503 4.8710224,1.21766493 4.13074827,1.21766493 M2.76388015,3.21632216 L3.44054754,3.21632216 L3.44054754,3.88254123 L2.76388015,3.88254123 L2.76388015,3.21632216 Z M4.79388232,3.21632216 L5.47054971,3.21632216 L5.47054971,3.88254123 L4.79388232,3.88254123 L4.79388232,3.21632216 Z M4.79401765,3.88254123 L3.44068287,3.88254123 L2.76401548,3.88254123 C2.39049508,3.88254123 2.08734809,4.18100738 2.08734809,4.54876031 L2.08734809,5.54808892 C2.08734809,6.10000287 2.53735205,6.54741753 3.09094491,6.54741753 L5.14375561,6.54741753 C5.69802683,6.54741753 6.14735243,6.10385072 6.14735243,5.54808892 L6.14735243,4.54876031 C6.14735243,4.18100738 5.84420544,3.88254123 5.47068504,3.88254123 L4.79401765,3.88254123 Z\" })));\n default:\n return null;\n }\n}\nvar templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;\n//# sourceMappingURL=getStatusSVG.js.map","import { __extends } from \"tslib\";\nimport React, { Component } from 'react';\nimport getStatusSVG from '../helpers/getStatusSVG';\nimport { Inner, Outer } from '../styled/Icon';\nvar Status = /** @class */ (function (_super) {\n __extends(Status, _super);\n function Status() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Status.prototype.render = function () {\n var _a = this.props, borderColor = _a.borderColor, children = _a.children, status = _a.status, size = _a.size;\n return (React.createElement(Outer, { size: size, bgColor: borderColor },\n React.createElement(Inner, null, children || (status && getStatusSVG(status)))));\n };\n return Status;\n}(Component));\nexport default Status;\n//# sourceMappingURL=Status.js.map","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport React, { Component } from 'react';\nimport { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents, } from '@atlaskit/analytics-next';\nimport Tooltip from '@atlaskit/tooltip';\nimport { getProps, getStyledAvatar } from '../helpers';\nimport { mapProps, withPseudoState } from '../hoc';\nimport Outer, { PresenceWrapper, StatusWrapper } from '../styled/Avatar';\nimport { ICON_SIZES } from '../styled/constants';\nimport { Theme } from '../theme';\nimport { omit } from '../utils';\nimport { name as packageName, version as packageVersion, } from '../version.json';\nimport AvatarImage from './AvatarImage';\nimport { propsOmittedFromClickData } from './constants';\nimport Presence from './Presence';\nimport Status from './Status';\nvar validIconSizes = Object.keys(ICON_SIZES);\nvar warn = function (message) {\n if (process.env.NODE_ENV !== 'production' && !process.env.CI) {\n console.warn(message); // eslint-disable-line no-console\n }\n};\nvar Avatar = /** @class */ (function (_super) {\n __extends(Avatar, _super);\n function Avatar() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');\n _this.clickAnalyticsCaller = function () {\n var createAnalyticsEvent = _this.props.createAnalyticsEvent;\n return createAnalyticsEvent\n ? _this.createAndFireEventOnAtlaskit({\n action: 'clicked',\n actionSubject: 'avatar',\n attributes: {\n componentName: 'avatar',\n packageName: packageName,\n packageVersion: packageVersion,\n },\n })(createAnalyticsEvent)\n : undefined;\n };\n // expose blur/focus to consumers via ref\n _this.blur = function () {\n if (_this.ref)\n _this.ref.blur();\n };\n _this.focus = function () {\n if (_this.ref)\n _this.ref.focus();\n };\n // disallow click on disabled avatars\n // only return avatar data properties\n _this.guardedClick = function (event) {\n var _a = _this.props, isDisabled = _a.isDisabled, onClick = _a.onClick;\n if (isDisabled || typeof onClick !== 'function')\n return;\n var item = omit.apply(void 0, __spread([_this.props], propsOmittedFromClickData));\n var analyticsEvent = _this.clickAnalyticsCaller();\n onClick({ item: item, event: event }, analyticsEvent);\n };\n // enforce status / presence rules\n /* eslint-disable no-console */\n _this.renderIcon = function () {\n var _a = _this.props, appearance = _a.appearance, borderColor = _a.borderColor, presence = _a.presence, status = _a.status;\n var showPresence = Boolean(presence);\n var showStatus = Boolean(status);\n // no icon needed\n if (!showStatus && !showPresence) {\n return null;\n }\n if (showStatus && showPresence) {\n warn('Avatar supports `presence` OR `status` properties, not both.');\n return null;\n }\n // only support particular sizes\n if (validIconSizes.indexOf(_this.props.size) === -1) {\n warn(\"Avatar size \\\"\" + String(_this.props.size) + \"\\\" does NOT support \" + (showPresence ? 'presence' : 'status'));\n return null;\n }\n // we can cast here because we already know that it is a valid icon size\n var size = _this.props.size;\n var indicator = (function () {\n if (showPresence) {\n var customPresenceNode = typeof presence === 'object' ? presence : null;\n return (React.createElement(PresenceWrapper, { appearance: appearance, size: size },\n React.createElement(Presence, { borderColor: borderColor, presence: !customPresenceNode && presence, size: size }, customPresenceNode)));\n }\n // showStatus\n var customStatusNode = typeof status === 'object' ? status : null;\n return (React.createElement(StatusWrapper, { appearance: appearance, size: size },\n React.createElement(Status, { borderColor: borderColor, status: !customStatusNode && status, size: size }, customStatusNode)));\n })();\n return indicator;\n };\n _this.setRef = function (ref) {\n _this.ref = ref;\n };\n return _this;\n }\n Avatar.prototype.render = function () {\n var _a = this.props, appearance = _a.appearance, enableTooltip = _a.enableTooltip, name = _a.name, size = _a.size, src = _a.src, stackIndex = _a.stackIndex, onClick = _a.onClick, theme = _a.theme, testId = _a.testId;\n // distill props from context, props, and state\n var enhancedProps = getProps(this);\n // provide element interface based on props\n var Inner = getStyledAvatar(this.props);\n Inner.displayName = 'Inner';\n var AvatarNode = (React.createElement(Theme.Provider, { value: theme },\n React.createElement(Outer, { size: size, stackIndex: stackIndex, testId: testId },\n React.createElement(Inner, __assign({ innerRef: this.setRef }, enhancedProps, { onClick: onClick != null ? this.guardedClick : undefined }),\n React.createElement(AvatarImage, { alt: name, appearance: appearance, size: size, src: src })),\n this.renderIcon())));\n return enableTooltip && name ? (React.createElement(Tooltip, { content: name }, AvatarNode)) : (AvatarNode);\n };\n Avatar.defaultProps = {\n appearance: 'circle',\n enableTooltip: true,\n size: 'medium',\n };\n return Avatar;\n}(Component));\nexport var AvatarWithoutAnalytics = mapProps({\n appearance: function (props) { return props.appearance || Avatar.defaultProps.appearance; },\n isInteractive: function (props) {\n return Boolean((typeof props.enableTooltip !== 'undefined'\n ? props.enableTooltip\n : Avatar.defaultProps.enableTooltip) && props.name);\n },\n})(withPseudoState(Avatar));\nexport default withAnalyticsContext({\n componentName: 'avatar',\n packageName: packageName,\n packageVersion: packageVersion,\n})(withAnalyticsEvents()(AvatarWithoutAnalytics));\n//# sourceMappingURL=Avatar.js.map","import { __assign, __extends, __read, __spread } from \"tslib\";\nimport React, { Component } from 'react';\nimport { getDisplayName } from '../utils';\nexport default function withPseudoState(WrappedComponent) {\n var _a;\n return _a = /** @class */ (function (_super) {\n __extends(ComponentWithPseudoState, _super);\n function ComponentWithPseudoState() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.component = null;\n _this.actionKeys = [];\n _this.state = {\n isActive: Boolean(_this.props.isActive),\n isFocus: Boolean(_this.props.isActive),\n isHover: Boolean(_this.props.isActive),\n isInteractive: Boolean(_this.props.href || _this.props.isInteractive || _this.props.onClick),\n };\n _this.blur = function () {\n // @ts-ignore reaching into the instance\n if (_this.component && _this.component.blur)\n _this.component.blur();\n };\n _this.focus = function () {\n // @ts-ignore reaching into the instance\n if (_this.component && _this.component.focus)\n _this.component.focus();\n };\n _this.setComponent = function (component) {\n _this.component = component;\n };\n _this.onBlur = function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this.setState({ isActive: false, isFocus: false });\n if (_this.props.onBlur) {\n (_a = _this.props).onBlur.apply(_a, __spread(args));\n }\n };\n _this.onFocus = function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this.setState({ isFocus: true });\n if (_this.props.onFocus) {\n (_a = _this.props).onFocus.apply(_a, __spread(args));\n }\n };\n _this.onMouseLeave = function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this.setState({ isActive: false, isHover: false });\n if (_this.props.onMouseLeave) {\n (_a = _this.props).onMouseLeave.apply(_a, __spread(args));\n }\n };\n _this.onMouseEnter = function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this.setState({ isHover: true });\n if (_this.props.onMouseEnter) {\n (_a = _this.props).onMouseEnter.apply(_a, __spread(args));\n }\n };\n _this.onMouseUp = function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this.setState({ isActive: false });\n if (_this.props.onMouseUp) {\n (_a = _this.props).onMouseUp.apply(_a, __spread(args));\n }\n };\n _this.onMouseDown = function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this.setState({ isActive: true });\n if (_this.props.onMouseDown) {\n (_a = _this.props).onMouseDown.apply(_a, __spread(args));\n }\n };\n _this.onKeyDown = function (event) {\n var _a;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n if (_this.actionKeys.indexOf(event.key) > -1) {\n _this.setState({ isActive: true });\n }\n if (_this.props.onKeyDown) {\n (_a = _this.props).onKeyDown.apply(_a, __spread([event], rest));\n }\n };\n _this.onKeyUp = function (event) {\n var _a;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n if (_this.actionKeys.indexOf(event.key) > -1) {\n _this.setState({ isActive: false });\n }\n if (_this.props.onKeyUp) {\n (_a = _this.props).onKeyUp.apply(_a, __spread([event], rest));\n }\n };\n return _this;\n }\n ComponentWithPseudoState.prototype.UNSAFE_componentWillMount = function () {\n var _a = this.props, href = _a.href, isInteractive = _a.isInteractive, onClick = _a.onClick;\n if (href || isInteractive || onClick) {\n this.actionKeys = onClick || isInteractive ? ['Enter', ' '] : ['Enter'];\n }\n };\n ComponentWithPseudoState.prototype.render = function () {\n return (React.createElement(WrappedComponent, __assign({ ref: this.setComponent }, this.state, this.props, (this.state.isInteractive && {\n onBlur: this.onBlur,\n onFocus: this.onFocus,\n onMouseLeave: this.onMouseLeave,\n onMouseEnter: this.onMouseEnter,\n onMouseUp: this.onMouseUp,\n onMouseDown: this.onMouseDown,\n onKeyDown: this.onKeyDown,\n onKeyUp: this.onKeyUp,\n }))));\n };\n return ComponentWithPseudoState;\n }(Component)),\n _a.displayName = getDisplayName('withPseudoState', WrappedComponent),\n _a;\n}\n//# sourceMappingURL=withPseudoState.js.map","import { __assign, __extends } from \"tslib\";\nimport React, { Component } from 'react';\nimport { getDisplayName } from '../utils';\nexport default function mapProps(mapping) {\n return function (DecoratedComponent) { var _a; return _a = /** @class */ (function (_super) {\n __extends(MapProps, _super);\n function MapProps() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // expose blur/focus to consumers via ref\n _this.blur = function () {\n // @ts-ignore accessing component internals\n if (_this.component && _this.component.blur)\n _this.component.blur();\n };\n _this.focus = function () {\n // @ts-ignore accessing component internals\n if (_this.component && _this.component.focus)\n _this.component.focus();\n };\n _this.setComponent = function (component) {\n _this.component = component;\n };\n return _this;\n }\n MapProps.prototype.render = function () {\n var _this = this;\n var mapped = __assign(__assign({}, this.props), Object.keys(mapping).reduce(function (acc, key) {\n var _a;\n return (__assign(__assign({}, acc), (_a = {}, _a[key] = mapping[key](_this.props), _a)));\n }, {}));\n return React.createElement(DecoratedComponent, __assign({ ref: this.setComponent }, mapped));\n };\n return MapProps;\n }(Component)),\n _a.displayName = getDisplayName('mapProps', DecoratedComponent),\n _a.DecoratedComponent = DecoratedComponent,\n _a; };\n}\n//# sourceMappingURL=mapProps.js.map","import { __assign } from \"tslib\";\nvar getAppearanceProps = function (props) { return ({\n appearance: props.appearance,\n backgroundColor: props.backgroundColor,\n borderColor: props.borderColor,\n groupAppearance: props.groupAppearance,\n isActive: props.isActive,\n isDisabled: props.isDisabled,\n isFocus: props.isFocus,\n isHover: props.isHover,\n isInteractive: props.isInteractive,\n isSelected: props.isSelected,\n size: props.size,\n stackIndex: props.stackIndex,\n}); };\nvar getInteractionProps = function (props) { return ({\n onBlur: props.onBlur,\n onClick: props.onClick,\n onFocus: props.onFocus,\n onKeyDown: props.onKeyDown,\n onKeyUp: props.onKeyUp,\n onMouseDown: props.onMouseDown,\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n onMouseUp: props.onMouseUp,\n tabIndex: props.tabIndex,\n}); };\nvar getLinkElementProps = function (props) {\n var href = props.href, target = props.target;\n // handle security issue for consumer\n // https://mathiasbynens.github.io/rel-noopener\n var rel = target === '_blank' ? 'noopener noreferrer' : null;\n return { href: href, rel: rel, target: target };\n};\nvar getButtonElementProps = function (props) {\n var id = props.id, isDisabled = props.isDisabled;\n return { id: id, interface: 'button', disabled: isDisabled };\n};\nexport default function getProps(component) {\n var props = component.props;\n var defaultProps = __assign(__assign({}, getAppearanceProps(props)), getInteractionProps(props));\n if (props.component) {\n return __assign(__assign({}, defaultProps), props);\n }\n if (props.href) {\n if (props.isDisabled) {\n return defaultProps;\n }\n return __assign(__assign({}, defaultProps), getLinkElementProps(props));\n }\n if (props.onClick) {\n return __assign(__assign({}, defaultProps), getButtonElementProps(props));\n }\n return defaultProps;\n}\n//# sourceMappingURL=getProps.js.map","import { __assign, __rest } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContext from './AnalyticsContext';\nvar withAnalyticsContext = function (defaultData) { return function (WrappedComponent) {\n var WithAnalyticsContext = React.forwardRef(function (props, ref) {\n var _a = props.analyticsContext, analyticsContext = _a === void 0 ? {} : _a, rest = __rest(props, [\"analyticsContext\"]);\n var analyticsData = __assign(__assign({}, defaultData), analyticsContext);\n return (React.createElement(AnalyticsContext, { data: analyticsData },\n React.createElement(WrappedComponent, __assign({}, rest, { ref: ref }))));\n });\n // @ts-ignore\n WithAnalyticsContext.displayName = \"WithAnalyticsContext(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsContext;\n}; };\nexport default withAnalyticsContext;\n//# sourceMappingURL=withAnalyticsContext.js.map","import { __assign } from \"tslib\";\nimport React from 'react';\nimport AnalyticsContextConsumer from './AnalyticsContextConsumer';\nvar withAnalyticsEvents = function (createEventMap) { return function (WrappedComponent) {\n var WithAnalyticsEvents = React.forwardRef(function (props, ref) { return (React.createElement(AnalyticsContextConsumer, { createEventMap: createEventMap, wrappedComponentProps: props }, function (_a) {\n var createAnalyticsEvent = _a.createAnalyticsEvent, patchedEventProps = _a.patchedEventProps;\n return (React.createElement(WrappedComponent, __assign({}, props, patchedEventProps, { createAnalyticsEvent: createAnalyticsEvent, ref: ref })));\n })); });\n // @ts-ignore\n WithAnalyticsEvents.displayName = \"WithAnalyticsEvents(\" + (WrappedComponent.displayName ||\n WrappedComponent.name) + \")\";\n return WithAnalyticsEvents;\n}; };\nexport default withAnalyticsEvents;\n//# sourceMappingURL=withAnalyticsEvents.js.map","import Avatar from '@atlaskit/avatar';\nimport { colors, fontFamily } from '@atlaskit/theme';\nimport React, { Component } from 'react';\nimport styled from 'styled-components';\n\nimport { getInitials } from '../utils/initials';\n\nexport type TriggerProps = {\n readonly userName: string;\n readonly isBorderVisible: boolean;\n readonly avatarSrc?: string;\n};\n\nexport class Trigger extends Component {\n public static defaultProps = {\n isBorderVisible: false\n };\n\n public render() {\n const { userName, avatarSrc, isBorderVisible } = this.props;\n if (avatarSrc !== undefined) {\n return (\n \n );\n } else {\n return (\n (\n \n {getInitials(userName)}\n
\n )}\n name={userName}\n size=\"small\"\n isFocus={isBorderVisible}\n isInteractive\n />\n );\n }\n }\n}\n\nconst Initials = styled.span`\n display: flex;\n align-items: center;\n justify-content: center;\n\n font-family: ${fontFamily};\n font-size: 10px;\n line-height: 10px;\n color: ${colors.N500};\n\n width: 100%;\n height: 100%;\n background-color: ${colors.N40};\n border-radius: 50%;\n`;\n","export function getInitials(fullName: string): string {\n return fullName.split(/[^\\w]+/).reduce((result, part) => {\n if (result.length < 3 && part.length > 0) {\n return result + part[0].toUpperCase();\n } else {\n return result;\n }\n }, '');\n}\n","import {\n withAnalyticsEvents,\n WithAnalyticsEventsProps\n} from '@atlaskit/analytics-next';\nimport DropdownMenu from '@atlaskit/dropdown-menu';\nimport React, { Component } from 'react';\nimport { UserProfileView } from './user-profile-view';\n\nimport { ProductDropdownItemProps } from './components/product-dropdown-item';\nimport { Trigger } from './components/trigger';\nimport { messages } from './messages';\nimport { trackingData } from './tracking';\n\nexport { ProductDropdownItemProps };\n\nexport type UserProfileDropdownProps = {\n readonly userName: string;\n readonly userEmail: string;\n readonly products: ProductDropdownItemProps[];\n readonly defaultOpen: boolean;\n\n readonly onProfileClick: () => void;\n readonly onLicensesClick: () => void;\n readonly onLogOutClick: () => void;\n\n readonly getStartedUrl: string;\n readonly onGetStartedClick?: () => void;\n readonly onMobileBackClick?: () => void;\n readonly onMobileCloseClick?: () => void;\n\n readonly avatarSrc?: string;\n readonly domRootId?: string;\n} & WithAnalyticsEventsProps;\n\nexport type UserProfileDropdownState = {\n readonly isOpen: boolean;\n};\n\nexport type onOpenChangeProps = {\n readonly event?: { [key: string]: unknown };\n} & UserProfileDropdownState;\n\nexport class UserProfileDropdown extends Component<\n UserProfileDropdownProps,\n UserProfileDropdownState\n> {\n public static defaultProps = {\n defaultOpen: false\n };\n\n public static messages = messages;\n\n public constructor(props: UserProfileDropdownProps) {\n super(props);\n\n this.state = {\n isOpen: props.defaultOpen\n };\n }\n\n public render() {\n const {\n userName,\n userEmail,\n products,\n avatarSrc,\n getStartedUrl,\n onGetStartedClick,\n onProfileClick,\n onLicensesClick,\n onLogOutClick,\n onMobileBackClick,\n onMobileCloseClick,\n domRootId,\n createAnalyticsEvent,\n ...rest\n } = this.props;\n const { isOpen } = this.state;\n const trigger = (\n \n );\n\n const onOpenChange = ({ isOpen: open }: onOpenChangeProps) => {\n if (open === true && createAnalyticsEvent) {\n const analyticsData = Object.assign(trackingData.dropdownToggle, {\n magnoliaComponentId: domRootId\n });\n\n const analyticsEvent = createAnalyticsEvent(analyticsData);\n analyticsEvent.fire();\n }\n };\n\n return (\n \n \n \n );\n }\n}\n\nexport default withAnalyticsEvents()(UserProfileDropdown);\n","import Avatar from '@atlaskit/avatar';\nimport { colors, fontFamily } from '@atlaskit/theme';\nimport React, { Component } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport styled from 'styled-components';\n\nexport type MobileTriggerProps = {\n readonly userName: string;\n readonly avatarSrc?: string;\n readonly onClick?: () => void;\n readonly logOutUrl?: string;\n readonly logOutMessage?: FormattedMessage.MessageDescriptor;\n};\n\nexport class MobileTrigger extends Component {\n public render() {\n const {\n userName,\n avatarSrc,\n onClick,\n logOutUrl,\n logOutMessage\n } = this.props;\n if (avatarSrc !== undefined) {\n if (logOutUrl !== undefined && logOutMessage !== undefined) {\n return (\n {\n if (onClick) {\n onClick();\n window.location.assign(logOutUrl);\n }\n }}\n >\n \n \n {userName}\n \n \n \n
\n \n );\n }\n\n return (\n {\n if (onClick) {\n onClick();\n }\n }}\n >\n \n {userName}\n \n );\n } else {\n return (\n {\n if (onClick) {\n onClick();\n }\n }}\n >\n \n {userName}\n \n );\n }\n }\n}\n\nconst AvatarContainer = styled.div`\n display: flex;\n align-items: center;\n font-family: ${fontFamily};\n font-size: 12px;\n line-height: 12px;\n color: ${colors.N500};\n cursor: pointer;\n`;\n\nconst UserNameLabel = styled.div`\n padding-left: 10px;\n`;\nconst DevopsUserName = styled.div`\n padding-left: 10px;\n color: ${colors.N30};\n font-weight: 700;\n`;\nconst DevOpsLogOut = styled.a`\n padding-left: 10px;\n text-decoration: none;\n font-weight: 500;\n color: ${colors.N30};\n span {\n margin-top: 4px;\n display: inline-block;\n color: ${colors.N30};\n text-decoration: underline;\n }\n`;\n","var _typeof2=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e};function createCustomError(e){function n(e,n){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e,this.code=n}return n.prototype=new Error,n.prototype.name=e,n.prototype.constructor=n,n}var LDUnexpectedResponseError=createCustomError(\"LaunchDarklyUnexpectedResponseError\"),LDInvalidEnvironmentIdError=createCustomError(\"LaunchDarklyInvalidEnvironmentIdError\"),LDInvalidUserError=createCustomError(\"LaunchDarklyInvalidUserError\"),LDInvalidEventKeyError=createCustomError(\"LaunchDarklyInvalidEventKeyError\"),LDInvalidArgumentError=createCustomError(\"LaunchDarklyInvalidArgumentError\"),LDFlagFetchError=createCustomError(\"LaunchDarklyFlagFetchError\");function isHttpErrorRecoverable(e){return!(e>=400&&e<500)||400===e||408===e||429===e}for(var errors=Object.freeze({LDUnexpectedResponseError:LDUnexpectedResponseError,LDInvalidEnvironmentIdError:LDInvalidEnvironmentIdError,LDInvalidUserError:LDInvalidUserError,LDInvalidEventKeyError:LDInvalidEventKeyError,LDInvalidArgumentError:LDInvalidArgumentError,LDFlagFetchError:LDFlagFetchError,isHttpErrorRecoverable:isHttpErrorRecoverable}),fromByteArray_1=fromByteArray,lookup=[],revLookup=[],code=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",i=0,len=code.length;i>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[63&e]}function encodeChunk(e,n,t){for(var r,o=[],i=n;ia?a:i+16383));return 1===r?(n=e[t-1],o.push(lookup[n>>2]+lookup[n<<4&63]+\"==\")):2===r&&(n=(e[t-2]<<8)+e[t-1],o.push(lookup[n>>10]+lookup[n>>4&63]+lookup[n<<2&63]+\"=\")),o.join(\"\")}revLookup[\"-\".charCodeAt(0)]=62,revLookup[\"_\".charCodeAt(0)]=63;var _typeof=\"function\"==typeof Symbol&&\"symbol\"==_typeof2(Symbol.iterator)?function(e){return void 0===e?\"undefined\":_typeof2(e)}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":void 0===e?\"undefined\":_typeof2(e)},isArray=Array.isArray,keyList=Object.keys,hasProp=Object.prototype.hasOwnProperty,fastDeepEqual=function e(n,t){if(n===t)return!0;if(n&&t&&\"object\"==(void 0===n?\"undefined\":_typeof(n))&&\"object\"==(void 0===t?\"undefined\":_typeof(t))){var r,o,i,a=isArray(n),u=isArray(t);if(a&&u){if((o=n.length)!=t.length)return!1;for(r=o;0!=r--;)if(!e(n[r],t[r]))return!1;return!0}if(a!=u)return!1;var s=n instanceof Date,c=t instanceof Date;if(s!=c)return!1;if(s&&c)return n.getTime()==t.getTime();var l=n instanceof RegExp,d=t instanceof RegExp;if(l!=d)return!1;if(l&&d)return n.toString()==t.toString();var v=keyList(n);if((o=v.length)!==keyList(t).length)return!1;for(r=o;0!=r--;)if(!hasProp.call(t,v[r]))return!1;for(r=o;0!=r--;)if(!e(n[i=v[r]],t[i]))return!1;return!0}return n!=n&&t!=t},_extends=Object.assign||function(e){for(var n=1;n0;){for(i=[];o>0;){var a=t.shift();if(!a)break;(o-=base64URLEncode(JSON.stringify(a)).length)<0&&i.length>0?t.unshift(a):i.push(a)}o=e,r.push(i)}return r}function getLDUserAgentString(e){var n=e.version||\"2.10.2\";return e.userAgent+\"/\"+n}function getLDHeaders(e){return{\"X-LaunchDarkly-User-Agent\":getLDUserAgentString(e)}}function extend(){for(var e=arguments.length,n=Array(e),t=0;t=400&&isHttpErrorRecoverable(e.status)&&t?n(!1):function(e){var n={status:e.status},t=e.header(\"date\");if(t){var r=Date.parse(t);r&&(n.serverTime=r)}return n}(e)}).catch(function(){return t?n(!1):Promise.reject()})}(!0).catch(function(){}):(a(i+\"?d=\"+base64URLEncode(s)),Promise.resolve())}return a.sendEvents=function(t){if(!e.httpRequest)return Promise.resolve();var r,o=e.httpAllowsPost();r=o?[t]:chunkUserEventsForUrl(MAX_URL_LENGTH-n.length,t);for(var i=[],a=0;at&&(t=e.creationDate)}},e.getSummary=function(){var e={},o=!0;for(var i in r){var a=r[i],u=e[a.key];u||(u={default:a.default,counters:[]},e[a.key]=u);var s={value:a.value,count:a.count};void 0!==a.variation&&null!==a.variation&&(s.variation=a.variation),a.version?s.version=a.version:s.unknown=!0,u.counters.push(s),o=!1}return o?null:{startDate:n,endDate:t,features:e}},e.clearSummary=function(){n=0,t=0,r={}},e}function UserFilter(e){var n={},t=e.allAttributesPrivate,r=e.privateAttributeNames||[],o={key:!0,custom:!0,anonymous:!0},i={key:!0,secondary:!0,ip:!0,country:!0,email:!0,firstName:!0,lastName:!0,avatar:!0,name:!0,anonymous:!0,custom:!0};return n.filterUser=function(e){if(!e)return null;var n=e.privateAttributeNames||[],a=function(e,i){return Object.keys(e).reduce(function(a,u){var s=a;return i(u)&&(function(e){return!o[e]&&(t||-1!==n.indexOf(e)||-1!==r.indexOf(e))}(u)?s[1][u]=!0:s[0][u]=e[u]),s},[{},{}])},u=a(e,function(e){return i[e]}),s=u[0],c=u[1];if(e.custom){var l=a(e.custom,function(){return!0});s.custom=l[0],c=extend({},c,l[1])}var d=Object.keys(c);return d.length&&(d.sort(),s.privateAttrs=d),s},n}var clientInitialized=function(){return\"LaunchDarkly client initialized\"},docLink=\" Please see https://docs.launchdarkly.com/docs/js-sdk-reference#section-initializing-the-client for instructions on SDK initialization.\",clientNotReady=function(){return\"LaunchDarkly client is not ready\"},eventWithoutUser=function(){return\"Be sure to call `identify` in the LaunchDarkly client: http://docs.launchdarkly.com/docs/running-an-ab-test#include-the-client-side-snippet\"},invalidKey=function(){return\"Event key must be a string\"},localStorageUnavailable=function(){return\"localStorage is unavailable\"},localStorageUnavailableForUserId=function(){return\"localStorage is unavailable, so anonymous user ID cannot be cached\"},networkError=function(e){return\"network error\"+(e?\" (\"+e+\")\":\"\")},unknownCustomEventKey=function(e){return'Custom event \"'+e+'\" does not exist'},environmentNotFound=function(){return\"environment not found.\"+docLink},environmentNotSpecified=function(){return\"No environment specified.\"+docLink},errorFetchingFlags=function(e){return\"Error fetching flag settings: \"+(e.message||e)},userNotSpecified=function(){return\"No user specified.\"+docLink},invalidUser=function(){return\"Invalid user specified.\"+docLink},bootstrapOldFormat=function(){return\"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly.\"+docLink},bootstrapInvalid=function(){return\"LaunchDarkly bootstrap data is not available because the back end could not read the flags.\"},deprecated=function(e,n){return'[LaunchDarkly] \"'+e+'\" is deprecated, please use \"'+n+'\"'},httpErrorMessage=function(e,n,t){return\"Received error \"+e+(401===e?\" (invalid SDK key)\":\"\")+\" for \"+n+\" - \"+(isHttpErrorRecoverable(e)?t:\"giving up permanently\")},httpUnavailable=function(){return\"Cannot make HTTP requests in this environment.\"+docLink},identifyDisabled=function(){return\"identify() has no effect here; it must be called on the main client instance\"},debugPolling=function(e){return\"polling for feature flags at \"+e},debugStreamPing=function(){return\"received ping message from stream\"},debugStreamPut=function(){return\"received streaming update for all flags\"},debugStreamPatch=function(e){return'received streaming update for flag \"'+e+'\"'},debugStreamPatchIgnored=function(e){return'received streaming update for flag \"'+e+'\" but ignored due to version check'},debugStreamDelete=function(e){return'received streaming deletion for flag \"'+e+'\"'},debugStreamDeleteIgnored=function(e){return'received streaming deletion for flag \"'+e+'\" but ignored due to version check'},debugEnqueueingEvent=function(e){return'enqueueing \"'+e+'\" event'},debugPostingEvents=function(e){return\"sending \"+e+\" events\"},messages=Object.freeze({clientInitialized:clientInitialized,clientNotReady:clientNotReady,eventWithoutUser:eventWithoutUser,invalidKey:invalidKey,localStorageUnavailable:localStorageUnavailable,localStorageUnavailableForUserId:localStorageUnavailableForUserId,networkError:networkError,unknownCustomEventKey:unknownCustomEventKey,environmentNotFound:environmentNotFound,environmentNotSpecified:environmentNotSpecified,errorFetchingFlags:errorFetchingFlags,userNotSpecified:userNotSpecified,invalidUser:invalidUser,bootstrapOldFormat:bootstrapOldFormat,bootstrapInvalid:bootstrapInvalid,deprecated:deprecated,httpErrorMessage:httpErrorMessage,httpUnavailable:httpUnavailable,identifyDisabled:identifyDisabled,debugPolling:debugPolling,debugStreamPing:debugStreamPing,debugStreamPut:debugStreamPut,debugStreamPatch:debugStreamPatch,debugStreamPatchIgnored:debugStreamPatchIgnored,debugStreamDelete:debugStreamDelete,debugStreamDeleteIgnored:debugStreamDeleteIgnored,debugEnqueueingEvent:debugEnqueueingEvent,debugPostingEvents:debugPostingEvents});function EventProcessor(e,n,t,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a={},u=i||EventSender(e,n.eventsUrl,t),s=EventSummarizer(),c=UserFilter(n),l=n.inlineUsersInEvents,d=n.samplingInterval,v=n.flushInterval,f=[],g=0,p=!1,m=void 0;function h(){return 0===d||0===Math.floor(Math.random()*d)}return a.enqueue=function(e){if(!p){var n,t=!1,r=!1;if(s.summarizeEvent(e),\"feature\"===e.kind?h()&&(t=!!e.trackEvents,r=!!(n=e).debugEventsUntilDate&&n.debugEventsUntilDate>g&&n.debugEventsUntilDate>(new Date).getTime()):t=h(),t&&f.push(function(e){var n=extend({},e);return l||\"identify\"===e.kind?n.user=c.filterUser(e.user):(n.userKey=e.user.key,delete n.user),\"feature\"===e.kind&&(delete n.trackEvents,delete n.debugEventsUntilDate),n}(e)),r){var o=extend({},e,{kind:\"debug\"});delete o.trackEvents,delete o.debugEventsUntilDate,delete o.variation,f.push(o)}}},a.flush=function(){if(p)return Promise.resolve();var e=f,n=s.getSummary();return s.clearSummary(),n&&(n.kind=\"summary\",e.push(n)),0===e.length?Promise.resolve():(f=[],r.debug(debugPostingEvents(e.length)),u.sendEvents(e).then(function(e){e&&(e.serverTime&&(g=e.serverTime),isHttpErrorRecoverable(e.status)||(p=!0),e.status>=400&&onNextTick(function(){o.maybeReportError(new LDUnexpectedResponseError(httpErrorMessage(e.status,\"event posting\",\"some events were dropped\")))}))}))},a.start=function(){m=setTimeout(function e(){a.flush(),m=setTimeout(e,v)},v)},a.stop=function(){clearTimeout(m)},a}function EventEmitter(e){var n={},t={};return n.on=function(e,n,r){t[e]=t[e]||[],t[e]=t[e].concat({handler:n,context:r})},n.off=function(e,n,r){if(t[e])for(var o=0;o>>((3&n)<<3)&255;return r}}}),byteToHex=[],i$1=0;i$1<256;++i$1)byteToHex[i$1]=(i$1+256).toString(16).substr(1);function bytesToUuid(e,n){var t=n||0,r=byteToHex;return[r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],\"-\",r[e[t++]],r[e[t++]],\"-\",r[e[t++]],r[e[t++]],\"-\",r[e[t++]],r[e[t++]],\"-\",r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]]].join(\"\")}var _nodeId,_clockseq,bytesToUuid_1=bytesToUuid,_lastMSecs=0,_lastNSecs=0;function v1(e,n,t){var r=n&&t||0,o=n||[],i=(e=e||{}).node||_nodeId,a=void 0!==e.clockseq?e.clockseq:_clockseq;if(null==i||null==a){var u=rngBrowser();null==i&&(i=_nodeId=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=_clockseq=16383&(u[6]<<8|u[7]))}var s=void 0!==e.msecs?e.msecs:(new Date).getTime(),c=void 0!==e.nsecs?e.nsecs:_lastNSecs+1,l=s-_lastMSecs+(c-_lastNSecs)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||s>_lastMSecs)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");_lastMSecs=s,_lastNSecs=c,_clockseq=a;var d=(1e4*(268435455&(s+=122192928e5))+c)%4294967296;o[r++]=d>>>24&255,o[r++]=d>>>16&255,o[r++]=d>>>8&255,o[r++]=255&d;var v=s/4294967296*1e4&268435455;o[r++]=v>>>8&255,o[r++]=255&v,o[r++]=v>>>24&15|16,o[r++]=v>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var f=0;f<6;++f)o[r+f]=i[f];return n||bytesToUuid_1(o)}var v1_1=v1,ldUserIdKey=\"ld:$anonUserId\";function UserValidator(e,n){var t={validateUser:function(t){if(!t)return Promise.reject(new LDInvalidUserError(userNotSpecified()));var r=clone(t);return null!==r.key&&void 0!==r.key?(r.key=r.key.toString(),Promise.resolve(r)):r.anonymous?(e?e.get(ldUserIdKey).catch(function(){return null}):Promise.resolve(null)).then(function(t){if(t)return r.key=t,r;var o=v1_1();return r.key=o,function(t){return e?e.set(ldUserIdKey,t).catch(function(){n.warn(localStorageUnavailableForUserId())}):Promise.resolve()}(o).then(function(){return r})}):Promise.reject(new LDInvalidUserError(invalidUser()))}};return t}function validate(e,n,t,r){var o=extend({},{baseUrl:\"https://app.launchdarkly.com\",streamUrl:\"https://clientstream.launchdarkly.com\",eventsUrl:\"https://events.launchdarkly.com\",sendEvents:!0,sendLDHeaders:!0,inlineUsersInEvents:!1,allowFrequentDuplicateEvents:!1,sendEventsOnlyForVariation:!1,useReport:!1,evaluationReasons:!1,flushInterval:2e3,samplingInterval:0,streamReconnectDelay:1e3,allAttributesPrivate:!1,privateAttributeNames:[]},t),i={all_attributes_private:\"allAttributesPrivate\",private_attribute_names:\"privateAttributeNames\"};function a(e){onNextTick(function(){n&&n.maybeReportError(new LDInvalidArgumentError(e))})}var u=extend({},e||{});return function(e){var n=u;Object.keys(i).forEach(function(e){if(void 0!==n[e]){var t=i[e];r.warn(deprecated(e,t)),void 0===n[t]&&(n[t]=n[e]),delete n[e]}})}(),u=function(e,n){var t=extend({},u);return Object.keys(n).forEach(function(e){void 0!==t[e]&&null!==t[e]||(t[e]=n[e])}),t}(0,o),(isNaN(u.flushInterval)||u.flushInterval<2e3)&&(u.flushInterval=2e3,a(\"Invalid flush interval configured. Must be an integer >= 2000 (milliseconds).\")),(isNaN(u.samplingInterval)||u.samplingInterval<0)&&(u.samplingInterval=0,a(\"Invalid sampling interval configured. Sampling interval must be an integer >= 0.\")),u}function createConsoleLogger(e){var n=0;e&&(n=\"none\"===e?100:[\"debug\",\"info\",\"warn\",\"error\"].indexOf(e));var t={};function r(e,t,r){e>=n&&t(r)}return t.debug=function(e){return r(0,console.log,e)},t.info=function(e){return r(1,console.info,e)},t.warn=function(e){return r(2,console.warn,e)},t.error=function(e){return r(3,console.error,e)},t}var _typeof$1=\"function\"==typeof Symbol&&\"symbol\"==_typeof2(Symbol.iterator)?function(e){return void 0===e?\"undefined\":_typeof2(e)}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":void 0===e?\"undefined\":_typeof2(e)},readyEvent=\"ready\",successEvent=\"initialized\",failedEvent=\"failed\",changeEvent=\"change\",internalChangeEvent=\"internal-change\";function initialize(e,n,t,r,o){var i=t&&t.logger?t.logger:o&&o.logger||createConsoleLogger(\"warn\"),a=EventEmitter(i),u=validate(t,a,o,i),s=u.hash,c=u.sendEvents,l=e,d=Stream(r,u,l,s),v=u.eventProcessor||EventProcessor(r,u,l,i,a),f=Requestor(r,u,l,i),g={},p={},m=void 0,h=void 0,y=u.streaming,E=void 0,b=!1,k=!1,w=!0,S=u.stateProvider,U=Identity(null,function(e){S||e&&P({kind:\"identify\",key:e.key,user:e,creationDate:(new Date).getTime()})}),D=UserValidator(r.localStorage,i),L=void 0;function P(e){l&&(S&&S.enqueueEvent&&S.enqueueEvent(e)||(e.user?(w=!1,!c||k||r.isDoNotTrack()||(i.debug(debugEnqueueingEvent(e.kind)),v.enqueue(e))):w&&(i.warn(eventWithoutUser()),w=!1)))}function I(e,n,t){var r=U.getUser(),o=new Date,i=n?n.value:null;if(!u.allowFrequentDuplicateEvents){var a=JSON.stringify(i)+(r&&r.key?r.key:\"\")+e,s=g[a];if(s&&o-s<3e5)return;g[a]=o}var c={kind:\"feature\",key:e,user:r,value:i,variation:n?n.variationIndex:null,default:t,creationDate:o.getTime(),reason:n?n.reason:null},l=p[e];l&&(c.version=l.flagVersion?l.flagVersion:l.version,c.trackEvents=l.trackEvents,c.debugEventsUntilDate=l.debugEventsUntilDate),P(c)}function R(e,n,t){var r=void 0;if(p&&p.hasOwnProperty(e)&&p[e]&&!p[e].deleted){var o=p[e];r=T(o),null!==o.value&&void 0!==o.value||(r.value=n)}else r={value:n,variationIndex:null,reason:{kind:\"ERROR\",errorKind:\"FLAG_NOT_FOUND\"}};return t&&I(e,r,n),r}function T(e){return{value:e.value,variationIndex:void 0===e.variation?null:e.variation,reason:e.reason||null}}function F(){h=!0,U.getUser()&&d.connect(U.getUser(),{ping:function(){i.debug(debugStreamPing()),f.fetchFlagSettings(U.getUser(),s,function(e,n){e&&a.maybeReportError(new LDFlagFetchError(errorFetchingFlags(e))),N(n)})},put:function(e){var n=JSON.parse(e.data);i.debug(debugStreamPut()),N(n)},patch:function(e){var n=JSON.parse(e.data),t=p[n.key];if(!t||!t.version||!n.version||t.version0){var t={};n.forEach(function(n){var r=e[n].current,o=r?r.value:void 0,i=e[n].previous;a.emit(changeEvent+\":\"+n,o,i),t[n]=r?{current:o,previous:i}:{previous:i}}),a.emit(changeEvent,t),a.emit(internalChangeEvent,p),u.sendEventsOnlyForVariation||S||n.forEach(function(n){I(n,e[n].current)})}return m&&L?L.saveFlags(p).catch(function(){return null}):Promise.resolve()}function O(){var e=y||E&&void 0===y;e&&!h?F():!e&&h&&x()}function A(e){return e===changeEvent||e.substr(0,changeEvent.length+1)===changeEvent+\":\"}r.localStorage&&(L=new Store(r.localStorage,l,s,U,i));var _=new Promise(function(e){var n=a.on(readyEvent,function(){a.off(readyEvent,n),e()})}),j=new Promise(function(e,n){var t=a.on(successEvent,function(){a.off(successEvent,t),e()}),r=a.on(failedEvent,function(e){a.off(failedEvent,r),n(e)})});if(\"string\"==typeof u.bootstrap&&\"LOCALSTORAGE\"===u.bootstrap.toUpperCase()&&(L?m=!0:i.warn(localStorageUnavailable())),S){var q=S.getInitialState();q?V(q):S.on(\"init\",V),S.on(\"update\",function(e){e.user&&U.setUser(e.user),e.flags&&N(e.flags)})}else(e?D.validateUser(n).then(function(e){return U.setUser(e),\"object\"===_typeof$1(u.bootstrap)?(p=function(e){var n=Object.keys(e),t=e.$flagsState;!t&&n.length&&i.warn(bootstrapOldFormat()),!1===e.$valid&&i.warn(bootstrapInvalid());var r={};return n.forEach(function(n){if(\"$flagsState\"!==n&&\"$valid\"!==n){var o={value:e[n]};t&&t[n]?o=extend(o,t[n]):o.version=0,r[n]=o}}),r}(u.bootstrap),z()):m?L.loadFlags().catch(function(){return null}).then(function(e){return null==e?(p={},f.fetchFlagSettings(U.getUser(),s).then(function(e){return N(e||{})}).then(z).catch(function(e){H(new LDFlagFetchError(errorFetchingFlags(e)))})):(p=e,onNextTick(z),f.fetchFlagSettings(U.getUser(),s).then(function(e){return N(e)}).catch(function(e){return a.maybeReportError(e)}))}):f.fetchFlagSettings(U.getUser(),s).then(function(e){p=e||{},z()}).catch(function(e){p={},H(e)})}):Promise.reject(new LDInvalidEnvironmentIdError(environmentNotSpecified()))).catch(function(e){return a.maybeReportError(e)});function V(e){l=e.environment,U.setUser(e.user),p=e.flags,onNextTick(z)}function z(){i.info(clientInitialized()),b=!0,O(),a.emit(readyEvent),a.emit(successEvent)}function H(e){a.maybeReportError(e),a.emit(failedEvent,e),a.emit(readyEvent)}return{client:{waitForInitialization:function(){return j},waitUntilReady:function(){return _},identify:function(e,n,t){return k?wrapPromiseCallback(Promise.resolve({}),t):S?(i.warn(identifyDisabled()),wrapPromiseCallback(Promise.resolve(transformVersionedValuesToValues(p)),t)):wrapPromiseCallback((m&&L?L.clearFlags():Promise.resolve()).then(function(){return D.validateUser(e)}).then(function(e){return U.setUser(e)}).then(function(){return f.fetchFlagSettings(U.getUser(),n)}).then(function(e){var n=transformVersionedValuesToValues(e);return e?N(e).then(function(){return n}):n}).then(function(e){return h&&F(),e}).catch(function(e){return a.maybeReportError(e),Promise.reject(e)}),t)},getUser:function(){return U.getUser()},variation:function(e,n){return R(e,n,!0).value},variationDetail:function(e,n){return R(e,n,!0)},track:function(e,n){\"string\"==typeof e?(r.customEventFilter&&!r.customEventFilter(e)&&i.warn(unknownCustomEventKey(e)),P({kind:\"custom\",key:e,data:n,user:U.getUser(),url:r.getCurrentUrl(),creationDate:(new Date).getTime()})):a.maybeReportError(new LDInvalidEventKeyError(unknownCustomEventKey(e)))},on:function(e,n,t){A(e)?(E=!0,b&&O(),a.on(e,n,t)):a.on.apply(a,arguments)},off:function(e){if(a.off.apply(a,arguments),A(e)){var n=!1;a.getEvents().forEach(function(e){A(e)&&a.getEventListenerCount(e)>0&&(n=!0)}),n||(E=!1,h&&void 0===y&&x())}},setStreaming:function(e){var n=null===e?void 0:e;n!==y&&(y=n,O())},flush:function(e){return wrapPromiseCallback(c?v.flush():Promise.resolve(),e)},allFlags:function(){var e={};if(!p)return e;for(var n in p)p.hasOwnProperty(n)&&(e[n]=R(n,null,!u.sendEventsOnlyForVariation).value);return e},close:function(e){if(k)return wrapPromiseCallback(Promise.resolve(),e);var n=function(){k=!0,p={}};return wrapPromiseCallback(Promise.resolve().then(function(){if(x(),c)return v.stop(),v.flush()}).then(n).catch(n),e)}},options:u,emitter:a,ident:U,logger:i,requestor:f,start:function(){c&&v.start()},enqueueEvent:P,getFlagsInternal:function(){return p},internalChangeEventName:internalChangeEvent}}var version=\"2.10.2\";function isSyncXhrSupported(){var e=window.navigator&&window.navigator.userAgent;if(e){var n=e.match(/Chrom(e|ium)\\/([0-9]+)\\./);if(n)return parseInt(n[2],10)<73}return!0}var emptyResult={promise:Promise.resolve({status:200,header:function(){return null},body:null})};function newHttpRequest(e,n,t,r,o){if(o&&!isSyncXhrSupported())return emptyResult;var i=new window.XMLHttpRequest;for(var a in i.open(e,n,!o),t||{})t.hasOwnProperty(a)&&i.setRequestHeader(a,t[a]);if(o)return i.send(r),emptyResult;var u=void 0;return{promise:new Promise(function(e,n){i.addEventListener(\"load\",function(){u||e({status:i.status,header:function(e){return i.getResponseHeader(e)},body:i.responseText})}),i.addEventListener(\"error\",function(){u||n(new Error)}),i.send(r)}),cancel:function(){u=!0,i.abort()}}}function makeBrowserPlatform(){var e={pageIsClosing:!1};window.XMLHttpRequest&&(e.httpRequest=function(n,t,r,o){return newHttpRequest(n,t,r,o,e.pageIsClosing)});var n=void 0;e.httpAllowsPost=function(){return void 0===n&&(n=!!window.XMLHttpRequest&&\"withCredentials\"in new window.XMLHttpRequest),n},e.getCurrentUrl=function(){return window.location.href},e.isDoNotTrack=function(){var e=void 0;return 1===(e=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===e||\"1\"===e||\"yes\"===e};try{window.localStorage&&(e.localStorage={get:function(e){return new Promise(function(n){n(window.localStorage.getItem(e))})},set:function(e,n){return new Promise(function(t){window.localStorage.setItem(e,n),t()})},clear:function(e){return new Promise(function(n){window.localStorage.removeItem(e),n()})}})}catch(n){e.localStorage=null}if(window.EventSource){e.eventSourceFactory=function(e){var n={heartbeatTimeout:3e5,silentTimeout:3e5};return new window.EventSource(e,n)},e.eventSourceIsActive=function(e){return e.readyState===window.EventSource.OPEN||e.readyState===window.EventSource.CONNECTING}}return e.eventSourceAllowsReport=!1,e.userAgent=\"JSClient\",e}var matchOperatorsRe=/[|\\\\{}()[\\]^$+*?.]/g,escapeStringRegexp=function(e){if(\"string\"!=typeof e)throw new TypeError(\"Expected a string\");return e.replace(matchOperatorsRe,\"\\\\$&\")};function doesUrlMatch(e,n,t,r){var o=n.replace(t,\"\").replace(r,\"\"),i=void 0,a=void 0;switch(e.kind){case\"exact\":a=n,i=new RegExp(\"^\"+escapeStringRegexp(e.url)+\"/?$\");break;case\"canonical\":a=o,i=new RegExp(\"^\"+escapeStringRegexp(e.url)+\"/?$\");break;case\"substring\":a=o,i=new RegExp(\".*\"+escapeStringRegexp(e.substring)+\".*$\");break;case\"regex\":a=o,i=new RegExp(e.pattern);break;default:return!1}return i.test(a)}function findGoalsForClick(e,n){for(var t=[],r=0;r0;){for(var s=0;s0&&(r=function(e){for(var t=findGoalsForClick(e,o),r=0;r0&&(r=GoalTracker(t=e,a),function(e,n){var t=window.location.href,r=void 0;function o(){(r=window.location.href)!==t&&(t=r,n())}!function e(n,t){n(),setTimeout(function(){e(n,t)},t)}(o,e),window.history&&window.history.pushState?window.addEventListener(\"popstate\",o):window.addEventListener(\"hashchange\",o)}(locationWatcherInterval,i)),n()}).catch(function(t){e.emitter.maybeReportError(new errors.LDUnexpectedResponseError((t&&t.message,t.message))),n()}),o}var goalsEvent=\"goalsReady\",extraDefaults={fetchGoals:!0};function initialize$1(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=makeBrowserPlatform(),o=initialize(e,n,t,r,extraDefaults),i=o.client,a=o.options,u=o.emitter,s=new Promise(function(e){var n=u.on(goalsEvent,function(){u.off(goalsEvent,n),e()})});if(i.waitUntilGoalsReady=function(){return s},a.fetchGoals){var c=GoalManager(o,function(){return u.emit(goalsEvent)});r.customEventFilter=c.goalKeyExists}else u.emit(goalsEvent);return\"complete\"!==document.readyState?window.addEventListener(\"load\",o.start):o.start(),window.addEventListener(\"beforeunload\",function(){r.pageIsClosing=!0,i.close()}),i}var createConsoleLogger$1=createConsoleLogger,version$1=version;function deprecatedInitialize(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return console&&console.warn&&console.warn(messages.deprecated(\"default export\",\"named LDClient export\")),initialize$1(e,n,t)}var index={initialize:deprecatedInitialize,version:version};export default index;export{initialize$1 as initialize,createConsoleLogger$1 as createConsoleLogger,version$1 as version};\n//# sourceMappingURL=ldclient.es.js.map\n","import { initialize } from 'ldclient-js';\nimport Environment from './environment';\n\nconst launchDarklyClientSideIds = {};\nlaunchDarklyClientSideIds[Environment.author()] = '5b68d7945224d91ec756e99e';\nlaunchDarklyClientSideIds[Environment.dev()] = '5b67f29a5d5baf1ebf608fa8';\nlaunchDarklyClientSideIds[Environment.staging()] = '5b68d78749aaf91ec915c0e9';\nlaunchDarklyClientSideIds[Environment.production()] = '5b67f29a5d5baf1ebf608fa9';\n\nlet env = Environment.getEnvironment();\n\n// Normally \"author\" is considered a \"staging\" environment,\n// but for this, we want to make the distinction.\nif (Environment.isAuthor()) {\n env = Environment.author();\n}\n\nconst WAC_CLIENT_SIDE_ID = launchDarklyClientSideIds[env];\n\nclass WacLDClient {\n constructor(user = {\n key: 'anonymous-wac-user',\n anonymous: true\n }) {\n\n return initialize(WAC_CLIENT_SIDE_ID, user);\n }\n}\n\nexport default WacLDClient;\n","import React, { Component } from \"react\";\nimport { IntlProvider } from \"react-intl\";\n// @todo resolve issues for appswitcher styled removed\nimport Spinner from \"@atlaskit/spinner\"; // @todo resolve issues for appswitcher\nimport OriginTracing from '@atlassiansox/origin-tracing';\n// @todo resolve issues for appswitcher removed colors from atlaskit\nimport { AnalyticsListener } from \"@atlaskit/analytics-next\";\nimport { hamletUser } from \"../../../common/hamlet/hamlet-user\";\nimport BasePaths from \"../../../buyer-experience/common/base-paths\";\nimport { UserProfileDropdown } from \"@atlassiansox/bxpkit-user-profile-dropdown\"; // @todo resolve issues for appswitcher\nimport Environment from \"../../../common/environment\";\nimport AtlStorage from \"../../../customer-experience/modules/atl-storage\";\nimport WacLDClient from '../../../common/LaunchDarklyClient';\nimport imkt from '../../../imkt';\n\nconst OPEN_PROFILE_KEY = \"bxp.nav.profileOpen\";\nconst START_PAGE = \"/start\";\n\nclass GlobalNavProfile extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n isLoading: true,\n showJoinTeam: false,\n labels: props.labels\n };\n this.basePaths = new BasePaths();\n this.storage = new AtlStorage();\n this.performanceBoost = true;\n\n const ldClient = new WacLDClient();\n ldClient.waitForInitialization().then(() => {\n this.setState({ showJoinTeam: ldClient.variation('enable-join-team-nav-button', false) });\n });\n }\n\n sendAnalytics(analytic) {\n const eventName =\n analytic.payload && analytic.payload.name\n ? analytic.payload.name\n : \"user-profile-dropdown-track-event\";\n\n let eventPayload = analytic.payload;\n if (analytic.context[0]) {\n eventPayload = Object.assign(analytic.context[0], analytic.payload);\n }\n\n if (eventPayload.name !== undefined) {\n delete eventPayload.name;\n }\n\n try {\n imkt.utils.tracking.trackEvent(eventName, eventPayload);\n } catch (e) {\n console.log(eventName, \"AnalyticsListener did not find tracker\");\n }\n }\n\n componentDidMount() {\n\n this.getUser()\n .then(user => {\n this.setState({\n ...user,\n isLoading: false\n });\n\n if (user.isLoggedIn) {\n imkt.utils.tracking.trackEvent('bxp.globalnavprofile.user.loggedin');\n }\n\n })\n .catch(() => {\n imkt.utils.tracking.trackEvent('bxp.globalnavprofile.user.getusererror');\n });\n }\n\n renderJoinTeam() {\n if (this.state.showJoinTeam) {\n imkt.utils.tracking.trackEvent('join-team-shown');\n return (\n \n {this.props.labels.joinTeamText}\n \n );\n }\n return;\n }\n\n render() {\n\n const {\n displayName,\n avatar,\n email,\n productSites,\n isLoggedIn,\n isLoading,\n labels,\n } = this.state;\n\n if (isLoading) {\n return (\n \n {this.renderJoinTeam()}\n
\n
\n
\n );\n } else if (isLoggedIn) {\n return (\n \n {this.renderJoinTeam()}\n
\n
\n \n \n \n \n
\n );\n } else {\n return (\n \n );\n }\n }\n\n onGetStartedClick = () => {\n imkt.utils.tracking.trackEvent('bxp.globalnavprofile.click.profilemenu.getstarted');\n window.location.href =\n this.basePaths.wacBasePath() + this.props.labels.productsPageLink;\n };\n\n onProfileClick = () => {\n imkt.utils.tracking.trackEvent('bxp.globalnavprofile.click.profilemenu.clickidentity');\n window.location.href =\n this.basePaths.idBasePath() + this.props.labels.profileIdentityUrl;\n };\n\n onLicensesClick = () => {\n imkt.utils.tracking.trackEvent('bxp.globalnavprofile.click.profilemenu.clicklicenses');\n window.location.href = Environment.getMacUrl();\n };\n\n onLogOutClick = () => {\n imkt.utils.tracking.trackEvent('bxp.globalnavprofile.click.profilemenu.clicklogout');\n window.location.href = Environment.getLogoutUrl();\n };\n\n onLogInClick = () => {\n this.storage.session.set(OPEN_PROFILE_KEY, true);\n const origin = new OriginTracing({ product: 'wac-login' });\n const loginUrl = `${Environment.getIdentityBaseUrl()}/login?`;\n const startUrl = Environment.getStartUrl();\n\n imkt.utils.tracking.trackEvent('bxp.globalnavprofile.click.profilemenu.clicklogin', {\n ...origin.toAnalyticsAttributes({ hasGeneratedId: true })\n });\n window.location.href = `${origin.addToUrl(loginUrl)}&continue=${encodeURIComponent(startUrl)}`;\n };\n\n onJoinClick = () => {\n this.storage.session.set(OPEN_PROFILE_KEY, true);\n const baseUrl = Environment.getIdentityBaseUrl();\n const origin = new OriginTracing({ product: 'join-team' });\n const continueUrl = origin.addToUrl(baseUrl + START_PAGE);\n imkt.utils.tracking.trackEvent('join-team-clicked', {\n ...origin.toAnalyticsAttributes({ hasGeneratedId: true })\n });\n window.location.href = `${baseUrl}/login?continue=${encodeURIComponent(continueUrl)}`;\n }\n\n getUser() {\n return hamletUser.getStargateProfile(this.performanceBoost).then(() => {\n const email = hamletUser.getUserEmail() || \"\";\n\n return {\n displayName: hamletUser.getDisplayName(),\n avatar: hamletUser.getAvatar(),\n email,\n productSites: hamletUser.getSitesByProduct(\n this.props.availableProducts\n ),\n isLoggedIn: hamletUser.isLoggedIn(),\n };\n });\n }\n\n getAndResetOpenProfile() {\n const openProfile = this.storage.session.get(OPEN_PROFILE_KEY) || false;\n this.storage.session.remove(OPEN_PROFILE_KEY);\n return openProfile;\n }\n\n createProductImages(productSites) {\n return productSites.map(product => {\n const utmSource = 'utm_source=' + Environment.getWindowLocation().hostname;\n let path = '?';\n\n switch (product.name) {\n case 'Confluence':\n path = '/wiki?';\n break;\n case 'Jira Software':\n path = '/secure/BrowseProjects.jspa?selectedProjectType=software&';\n break;\n case 'Jira Service Desk':\n path = '/secure/BrowseProjects.jspa?selectedProjectType=service_desk&';\n break;\n }\n\n path += utmSource;\n\n for (let i = 0, iLen = product.sites.length; i < iLen; i++) {\n let origin = new OriginTracing({ product: 'choseProduct' });\n product.sites[i] += path;\n product.sites[i] = origin.addToUrl(product.sites[i]);\n }\n\n return {\n ...product,\n icon: React.createElement('img', { src: product.icon }, null)\n };\n });\n }\n}\n\nexport default GlobalNavProfile;\n\n"],"names":["inProgress","dataWebpackPrefix","Object","defineProperty","exports","value","templateObject_1","tslib_1","react_1","__importDefault","styled_components_1","uuid_1","colors_1","constants_1","getSize","_a","size","sizes","IconWrapper","default","span","__makeTemplateObject","p","primaryColor","secondaryColor","background","props","svgStr","id","Glyph","glyph","dangerouslySetGlyph","testId","label","glyphProps","dangerouslySetInnerHTML","__html","replace","children","createElement","role","__assign","undefined","small","medium","large","xlarge","sizeMap","_react","_interopRequireDefault","_Icon","obj","__esModule","_extends","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","ChevronDownIcon","displayName","_default","THEME_MODES","getTheme","theme","__ATLASKIT_THEME__","includes","mode","themed","modesOrVariant","variantModes","variantProp","variants","modes","R50","R75","R100","R200","R300","R400","R500","Y50","Y75","Y100","Y200","Y300","Y400","Y500","G50","G75","G100","G200","G300","G400","G500","B50","B75","B100","B200","B300","B400","B500","P50","P75","P100","P200","P300","P400","P500","T50","T75","T100","T200","T300","T400","T500","N0","N10","N20","N30","N40","N50","N60","N70","N80","N90","N100","N200","N300","N400","N500","N600","N700","N800","N900","N10A","N20A","N30A","N40A","N50A","N60A","N70A","N80A","N90A","N100A","N200A","N300A","N400A","N500A","N600A","N700A","N800A","DN900","DN800","DN700","DN600","DN500","DN400","DN300","DN200","DN100","DN90","DN80","DN70","DN60","DN50","DN40","DN30","DN20","DN10","DN0","DN800A","DN700A","DN600A","DN500A","DN400A","DN300A","DN200A","DN100A","DN90A","DN80A","DN70A","DN60A","DN50A","DN40A","DN30A","DN20A","DN10A","light","dark","backgroundActive","backgroundHover","backgroundOnLayer","textHover","textActive","subtleText","placeholderText","heading","subtleHeading","codeBlock","linkHover","linkActive","linkOutline","primary","blue","teal","purple","red","yellow","green","skeleton","CheckboxIcon","RadioIcon","text","link","_interopRequireWildcard","_defineProperty2","_classCallCheck2","_createClass2","_possibleConstructorReturn2","_getPrototypeOf2","_inherits2","_styledComponents","_uuid","_theme","_constants","concat","withConfig","componentId","colors","Icon","_Component","_this$props","insertDynamicGradientID","Component","keys","reduce","c","ChevronLeftLargeIcon","ChevronUpIcon","CrossIcon","FLATTENED","CHANNEL","DEFAULT_THEME_MODE","borderRadius","gridSize","fontSize","fontSizeSmall","fontFamily","codeFontFamily","focusRing","color","outlineWidth","noFocusRing","layers","card","dialog","navigation","layer","blanket","modal","flag","spotlight","tooltip","visuallyHidden","border","clip","height","overflow","padding","position","width","whiteSpace","assistive","css","skeletonShimmer","backgroundColor","animationDuration","animationIterationCount","animationTimingFunction","animationDirection","keyframes","from","to","colorPalette8","colorPalette16","colorPalette24","colorPalette","palette","Error","e100","e200","e300","e400","e500","baseHeading","lineHeight","headingSizes","h900","h800","h700","h600","h500","h400","h300","h200","h100","add","fn","addend","subtract","subtrahend","multiply","factor","divide","divisor","createTheme","defaultGetTokens","emptyThemeFn","getTokens","ThemeContext","createContext","Consumer","themeProps","tokens","useContext","Provider","themeFn","valueFn","mixedFn","useCallback","getStylesheetResetCSS","state","buildThemeState","LegacyReset","AtlaskitThemeProvider","constructor","super","getThemeMode","getChildContext","hasAtlaskitThemeProvider","UNSAFE_componentWillMount","context","stylesheet","document","type","innerHTML","head","appendChild","UNSAFE_componentWillReceiveProps","newProps","newThemeState","setState","componentWillUnmount","removeChild","render","Theme","ThemeProvider","defaultProps","childContextTypes","contextTypes","appearance","merged","forEach","orTextColor","preferred","textColor","Div","ResetTheme","linkColor","linkColorHover","linkColorActive","linkColorOutline","headingColor","subtleHeadingColor","subtleTextColor","Reset","withTheme","InnerComponent","AtlasKitThemeProvider","module","array","predicate","Array","find","TypeError","utils","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","createError","transitionalDefaults","Cancel","config","Promise","resolve","reject","onCanceled","requestData","data","requestHeaders","headers","responseType","done","cancelToken","unsubscribe","signal","removeEventListener","isFormData","request","XMLHttpRequest","auth","username","password","unescape","encodeURIComponent","Authorization","btoa","fullPath","baseURL","url","onloadend","responseHeaders","getAllResponseHeaders","response","responseText","status","statusText","err","open","method","toUpperCase","params","paramsSerializer","timeout","onreadystatechange","readyState","responseURL","indexOf","setTimeout","onabort","onerror","ontimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","isStandardBrowserEnv","xsrfValue","withCredentials","xsrfCookieName","read","xsrfHeaderName","val","toLowerCase","setRequestHeader","isUndefined","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","subscribe","aborted","send","bind","Axios","mergeConfig","axios","createInstance","defaultConfig","instance","extend","create","instanceConfig","CancelToken","isCancel","VERSION","all","promises","spread","isAxiosError","message","toString","__CANCEL__","executor","resolvePromise","promise","token","then","_listeners","l","onfulfilled","_resolve","reason","throwIfRequested","listener","push","index","splice","InterceptorManager","dispatchRequest","validator","validators","defaults","interceptors","configOrUrl","assertOptions","silentJSONParsing","boolean","forcedJSONParsing","requestInterceptorChain","synchronousRequestInterceptors","interceptor","runWhen","synchronous","unshift","fulfilled","rejected","responseInterceptorChain","chain","shift","newConfig","onFulfilled","onRejected","error","getUri","handlers","use","options","eject","h","isAbsoluteURL","combineURLs","requestedURL","enhanceError","code","transformData","throwIfCancellationRequested","transformRequest","merge","common","adapter","transformResponse","toJSON","name","description","number","fileName","lineNumber","columnNumber","stack","config1","config2","getMergedValue","isPlainObject","isArray","slice","mergeDeepProperties","prop","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","configValue","validateStatus","fns","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","isArrayBuffer","isBuffer","isStream","isFile","isBlob","isArrayBufferView","buffer","isURLSearchParams","isObject","rawValue","parser","encoder","isString","JSON","parse","trim","e","stringify","stringifySafely","strictJSONParsing","maxContentLength","maxBodyLength","thisArg","args","encode","serializedParams","parts","v","isDate","toISOString","join","hashmarkIndex","relativeURL","write","expires","path","domain","secure","cookie","isNumber","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","test","payload","originURL","msie","navigator","userAgent","urlParsingNode","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","window","location","requestURL","parsed","normalizedName","ignoreDuplicateOf","split","line","substr","callback","arr","thing","deprecatedWarnings","version","formatMessage","opt","desc","opts","console","warn","schema","allowUnknown","result","getPrototypeOf","isFunction","ArrayBuffer","isView","pipe","product","assignValue","a","b","str","stripBOM","content","charCodeAt","stgWacInternalUrl","ENV_STAGING","ENV_PRODUCTION","Environment","urlParts","getWindowLocation","getSubdomain","hostnameSubdomain","subdirectory","getSubdirectory","getInternationalSubdomain","getEnvironment","production","staging","dev","author","isStaging","isDev","skipEncoding","continueUrl","getIdentityBaseUrl","continueUrlParam","useQaWAC","stgConfig","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","Arr","_byteLength","curByte","len","revLookup","fromByteArray","uint8","extraBytes","maxChunkLength","len2","encodeChunk","lookup","Uint8Array","start","end","num","output","base64","ieee754","customInspectSymbol","Symbol","Buffer","SlowBuffer","alloc","INSPECT_MAX_BYTES","K_MAX_LENGTH","createBuffer","RangeError","buf","setPrototypeOf","arg","encodingOrOffset","allocUnsafe","string","encoding","isEncoding","actual","fromString","arrayView","isInstance","copy","fromArrayBuffer","byteOffset","fromArrayLike","fromArrayView","SharedArrayBuffer","valueOf","checked","numberIsNaN","fromObject","toPrimitive","assertSize","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","m","bidirectionalIndexOf","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","String","readUInt16BE","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parseInt","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","Math","min","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","decodeCodePointsArray","kMaxLength","TYPED_ARRAY_SUPPORT","proto","foo","typedArraySupport","enumerable","get","poolSize","fill","allocUnsafeSlow","_isBuffer","compare","x","y","list","pos","set","swap16","swap32","swap64","toLocaleString","equals","inspect","max","thisStart","thisEnd","thisCopy","targetCopy","isFinite","_arr","ret","out","hexSliceLookupTable","bytes","checkOffset","ext","checkInt","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","subarray","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","INVALID_BASE64_RE","Infinity","leadSurrogate","base64clean","src","dst","alphabet","table","i16","camelCase","input","pascalCase","map","filter","isLastCharLower","isLastCharUpper","isLastLastCharUpper","character","preserveCamelCase","_","p1","global","isCallable","tryToString","argument","isConstructor","wellKnownSymbol","definePropertyModule","UNSCOPABLES","ArrayPrototype","f","configurable","S","unicode","isPrototypeOf","it","Prototype","$forEach","STRICT_METHOD","arrayMethodIsStrict","callbackfn","toObject","callWithSafeIterationClosing","isArrayIteratorMethod","lengthOfArrayLike","createProperty","getIterator","getIteratorMethod","arrayLike","O","IS_CONSTRUCTOR","argumentsLength","mapfn","mapping","step","iterator","next","iteratorMethod","toIndexedObject","toAbsoluteIndex","createMethod","IS_INCLUDES","$this","el","fromIndex","uncurryThis","IndexedObject","arraySpeciesCreate","TYPE","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","IS_FILTER_REJECT","NO_HOLES","that","specificCreate","self","boundFunction","some","every","findIndex","filterReject","fails","V8_VERSION","SPECIES","METHOD_NAME","Boolean","k","fin","originalArray","C","arraySpeciesConstructor","anObject","iteratorClose","ENTRIES","ITERATOR","SAFE_CLOSING","called","iteratorWithReturn","exec","SKIP_CLOSING","ITERATION_SUPPORT","object","stringSlice","TO_STRING_TAG_SUPPORT","classofRaw","TO_STRING_TAG","CORRECT_ARGUMENTS","tag","tryGet","callee","hasOwn","ownKeys","getOwnPropertyDescriptorModule","exceptions","getOwnPropertyDescriptor","MATCH","regexp","error1","error2","F","IteratorPrototype","createPropertyDescriptor","setToStringTag","Iterators","returnThis","IteratorConstructor","NAME","ENUMERABLE_NEXT","DESCRIPTORS","bitmap","writable","toPropertyKey","propertyKey","$","IS_PURE","FunctionName","createIteratorConstructor","createNonEnumerableProperty","redefine","IteratorsCore","PROPER_FUNCTION_NAME","PROPER","CONFIGURABLE_FUNCTION_NAME","CONFIGURABLE","BUGGY_SAFARI_ITERATORS","KEYS","VALUES","Iterable","DEFAULT","IS_SET","FORCED","CurrentIteratorPrototype","methods","KEY","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","entries","values","forced","wrappedWellKnownSymbolModule","EXISTS","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","classList","documentCreateElement","DOMTokenListPrototype","Pebble","classof","process","getBuiltIn","Deno","versions","v8","setGlobal","copyConstructorProperties","isForced","targetProperty","sourceProperty","descriptor","TARGET","GLOBAL","STATIC","stat","noTargetGet","sham","regexpExec","RegExpPrototype","SHAM","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","re","flags","uncurriedNativeRegExpMethod","nativeMethod","arg2","forceStringMethod","uncurriedNativeMethod","$exec","NATIVE_BIND","FunctionPrototype","Function","Reflect","aCallable","arraySlice","factories","construct","argsLength","partArgs","getDescriptor","aFunction","namespace","getMethod","usingIterator","V","P","func","floor","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","matched","captures","namedCaptures","replacement","tailPos","symbols","ch","capture","check","globalThis","g","propertyIsEnumerable","dummy","Wrapper","NewTarget","NewTargetPrototype","store","functionToString","inspectSource","has","NATIVE_WEAK_MAP","shared","sharedKey","hiddenKeys","OBJECT_ALREADY_INITIALIZED","WeakMap","wmget","wmhas","wmset","metadata","facade","STATE","enforce","getterFor","noop","empty","constructorRegExp","INCORRECT_TO_STRING","isConstructorModern","isConstructorLegacy","feature","detection","normalize","POLYFILL","NATIVE","isRegExp","USE_SYMBOL_AS_UID","$Symbol","Result","stopped","ResultPrototype","iterable","unboundFunction","iterFn","AS_ENTRIES","IS_ITERATOR","INTERRUPTED","stop","condition","callFn","kind","innerResult","innerError","PrototypeOfArrayIteratorPrototype","arrayIterator","toLength","flush","last","notify","toggle","node","macrotask","IS_IOS","IS_IOS_PEBBLE","IS_WEBOS_WEBKIT","IS_NODE","MutationObserver","WebKitMutationObserver","queueMicrotaskDescriptor","queueMicrotask","parent","exit","enter","nextTick","createTextNode","observe","characterData","task","getOwnPropertySymbols","symbol","PromiseCapability","$$resolve","$$reject","objectKeys","getOwnPropertySymbolsModule","propertyIsEnumerableModule","$assign","A","B","chr","T","activeXDocument","definePropertiesModule","enumBugKeys","html","IE_PROTO","EmptyConstructor","scriptTag","LT","NullProtoObjectViaActiveX","close","temp","parentWindow","NullProtoObject","ActiveXObject","iframeDocument","iframe","style","display","contentWindow","Properties","V8_PROTOTYPE_DEFINE_BUG","defineProperties","IE8_DOM_DEFINE","$defineProperty","$getOwnPropertyDescriptor","Attributes","current","$getOwnPropertyNames","windowNames","getOwnPropertyNames","getWindowNames","internalObjectKeys","CORRECT_PROTOTYPE_GETTER","ObjectPrototype","names","$propertyIsEnumerable","NASHORN_BUG","aPossiblePrototype","setter","CORRECT_SETTER","__proto__","pref","getOwnPropertyNamesModule","newPromiseCapability","promiseCapability","Queue","tail","item","entry","InternalStateModule","getInternalState","enforceInternalState","TEMPLATE","unsafe","simple","R","re1","re2","regexpFlags","stickyHelpers","UNSUPPORTED_DOT_ALL","UNSUPPORTED_NCG","nativeReplace","nativeExec","patchedExec","UPDATES_LAST_INDEX_WRONG","lastIndex","UNSUPPORTED_Y","BROKEN_CARET","NPCG_INCLUDED","reCopy","group","raw","groups","sticky","charsAdded","strCopy","multiline","ignoreCase","dotAll","$RegExp","MISSED_STICKY","CONSTRUCTOR_NAME","Constructor","TAG","uid","SHARED","copyright","license","aConstructor","defaultConstructor","toIntegerOrInfinity","requireObjectCoercible","CONVERT_TO_STRING","first","second","codeAt","whitespaces","whitespace","ltrim","rtrim","defer","channel","validateArgumentsLength","setImmediate","clear","clearImmediate","Dispatch","MessageChannel","counter","queue","run","runner","event","post","postMessage","handler","port2","port1","onmessage","importScripts","integer","ceil","isSymbol","ordinaryToPrimitive","TO_PRIMITIVE","exoticToPrim","postfix","random","NATIVE_SYMBOL","passed","required","WellKnownSymbolsStore","symbolFor","createWellKnownSymbol","withoutSetter","arrayMethodHasSpeciesSupport","IS_CONCAT_SPREADABLE","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_INDEX_EXCEEDED","IS_CONCAT_SPREADABLE_SUPPORT","SPECIES_SUPPORT","isConcatSpreadable","spreadable","E","$filter","checkCorrectnessOfIteration","addToUnscopables","defineIterator","ARRAY_ITERATOR","setInternalState","iterated","Arguments","un$Join","ES3_STRINGS","separator","$map","un$Slice","HAS_SPECIES_SUPPORT","FUNCTION_NAME_EXISTS","nameRE","regExpExec","nativeGetOwnPropertyDescriptor","FAILS_ON_PRIMITIVES","getOwnPropertyDescriptors","nativeGetPrototypeOf","nativeKeys","Internal","OwnPromiseCapability","PromiseWrapper","nativeThen","NativePromise","redefineAll","setSpecies","anInstance","iterate","speciesConstructor","microtask","promiseResolve","hostReportErrors","newPromiseCapabilityModule","perform","IS_BROWSER","PROMISE","getInternalPromiseState","NativePromisePrototype","PromiseConstructor","PromisePrototype","newGenericPromiseCapability","DISPATCH_EVENT","createEvent","dispatchEvent","NATIVE_REJECTION_EVENT","PromiseRejectionEvent","UNHANDLED_REJECTION","SUBCLASSING","PROMISE_CONSTRUCTOR_SOURCE","GLOBAL_CORE_JS_PROMISE","FakePromise","INCORRECT_ITERATION","isThenable","callReaction","reaction","exited","ok","fail","rejection","onHandleUnhandled","isReject","notified","reactions","onUnhandled","initEvent","isUnhandled","emit","unwrap","internalReject","internalResolve","wrapper","wrap","r","capability","$promiseResolve","alreadyCalled","race","nativeConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","inheritIfRequired","regExpFlags","NativeRegExp","SyntaxError","getFlags","stringIndexOf","IS_NCG","CORRECT_NEW","RegExpWrapper","pattern","rawFlags","handled","thisIsRegExp","patternIsRegExp","flagsAreUndefined","rawPattern","named","brackets","ncg","groupid","groupname","handleNCG","handleDotAll","proxy","$toString","TO_STRING","n$ToString","NOT_GENERIC","INCORRECT_NAME","rf","STRING_ITERATOR","point","fixRegExpWellKnownSymbolLogic","advanceStringIndex","nativeMatch","maybeCallNative","matcher","rx","fullUnicode","matchStr","getSubstitution","REPLACE","REPLACE_KEEPS_$0","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","UNSAFE_SUBSTITUTE","searchValue","replaceValue","replacer","functionalReplace","results","accumulatedResult","nextSourcePosition","replacerArgs","callRegExpExec","MAX_UINT32","$push","SPLIT","nativeSplit","internalSplit","lim","lastLength","lastLastIndex","separatorCopy","splitter","unicodeMatching","q","z","originalExec","notARegExp","correctIsRegExpLogic","un$StartsWith","startsWith","CORRECT_IS_REGEXP_LOGIC","searchString","$trim","forcedStringTrimMethod","defineWellKnownSymbol","NativeSymbol","SymbolPrototype","EmptyStringDescriptionStore","SymbolWrapper","symbolToString","symbolValueOf","nativeObjectCreate","getOwnPropertyNamesExternal","HIDDEN","QObject","$stringify","nativeDefineProperty","nativeGetOwnPropertyNames","nativePropertyIsEnumerable","AllSymbols","ObjectPrototypeSymbols","StringToSymbolRegistry","SymbolToStringRegistry","USE_SETTER","findChild","setSymbolDescriptor","ObjectPrototypeDescriptor","$defineProperties","properties","$getOwnPropertySymbols","IS_OBJECT_PROTOTYPE","keyFor","sym","useSetter","useSimple","space","$replacer","hint","DOMIterables","handlePrototype","CollectionPrototype","COLLECTION_NAME","ArrayIteratorMethods","ArrayValues","_propTypes2","_gud2","_classCallCheck","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","MAX_SIGNED_31_BIT_INT","createEventEmitter","on","off","newValue","changedBits","defaultValue","calculateChangedBits","_Provider$childContex","_Consumer$contextType","contextProp","_temp","_this","_len","_key","emitter","_ref","componentWillReceiveProps","nextProps","oldValue","isRequired","_Component2","_temp2","_this2","_len2","_key2","getValue","onUpdate","observedBits","componentDidMount","_react2","_implementation2","canUseDOM","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","attachEvent","canUseViewport","screen","_uppercasePattern","hyphenate","msPattern","onComplete","delay","timeoutId","clearTimer","clearTimeout","pending","factory","reactIs","REACT_STATICS","contextType","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","KNOWN_STATICS","caller","arity","MEMO_STATICS","TYPE_STATICS","getStatics","component","isMemo","ForwardRef","Memo","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","s","NaN","rt","abs","isNaN","log","LN2","peg$SyntaxError","expected","captureStackTrace","child","ctor","peg$subclass","peg$result","peg$FAILED","peg$startRuleFunctions","peg$parsestart","peg$startRuleFunction","peg$c0","elements","peg$c1","outerLen","inner","innerLen","peg$c2","messageText","peg$c3","peg$c4","peg$c5","peg$c6","peg$c7","peg$c8","peg$c9","peg$c10","peg$c11","format","peg$c12","peg$c13","peg$c14","peg$c15","peg$c16","peg$c17","peg$c18","peg$c19","peg$c20","peg$c21","pluralStyle","ordinal","peg$c22","peg$c23","peg$c24","peg$c25","peg$c26","peg$c27","peg$c28","peg$c29","peg$c30","selector","peg$c31","peg$c32","peg$c33","peg$c34","peg$c35","peg$c36","peg$c37","peg$c38","peg$c39","peg$c40","peg$c41","peg$c42","peg$c43","peg$c44","peg$c45","peg$c46","peg$c47","digits","peg$c48","peg$c49","peg$c50","peg$c51","peg$c52","peg$c53","peg$c54","peg$c55","peg$c56","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c63","peg$c64","peg$c65","chars","peg$currPos","peg$savedPos","peg$posDetailsCache","column","seenCR","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","peg$computeLocation","peg$computePosDetails","details","startPos","endPos","startPosDetails","endPosDetails","peg$fail","peg$buildException","sort","cleanupExpected","expectedDescs","hex","stringEscape","buildMessage","peg$parsemessageFormatPattern","s0","s1","s2","peg$parsemessageFormatElement","peg$parsemessageTextElement","peg$parseargumentElement","peg$parsemessageText","s3","s4","s5","peg$parse_","peg$parsechars","peg$parsews","substring","peg$parseargument","peg$parsenumber","s6","s7","s8","peg$parseelementFormat","peg$parsesimpleFormat","peg$parsepluralFormat","peg$parseselectOrdinalFormat","peg$parseselectFormat","peg$parsepluralStyle","peg$parseoptionalFormatPattern","peg$parseselector","peg$parseoffset","peg$parsedigit","peg$parsehexDigit","peg$parsechar","IntlMessageFormat","Compiler","locales","formats","pluralFn","StringFormat","PluralFormat","useOrdinal","PluralOffsetString","numberFormat","SelectFormat","compile","ast","pluralStack","currentPlural","pluralNumberFormat","compileMessage","element","compileMessageText","compileArgument","Intl","NumberFormat","date","DateTimeFormat","time","compileOptions","option","optionsHash","pop","getOption","other","src$utils$$","src$es5$$","src$compiler$$","intl$messageformat$parser$$","MessageFormat","__parse","_mergeFormats","_resolveLocale","_findPluralRuleFunction","_locale","_compilePattern","messageFormat","_format","variableId","month","day","year","weekday","hour","minute","timeZoneName","objCreate","locale","__localeData__","resolvedOptions","localeData","pluralRuleFunction","parentLocale","part","hop","mergedType","mergedFormats","defaultLocale","localeParts","ord","v0","t0","n10","n100","realDefineProp","__defineGetter__","src$core$$","src$en$$","__addLocaleData","sources","IntlRelativeFormat","intl_messageformat_1","diff_1","es5_1","RelativeFormat","FIELDS","STYLES","_resolveStyle","_isValidUnits","_findFields","relativeFormat","datum","_options","_compileMessage","_locales","relativeTime","_fields","future","past","_getMessage","messages","_messages","_getRelativeUnits","diff","field","relative","fields","dateNow","diffReport","_selectUnits","diffInUnits","relativeUnits","when","arrIndexOf","suggestion","thresholds","round","startOfDay","dirtyDate","setHours","dirtyDateRight","startOfDayLeft","startOfDayRight","timestampLeft","timestampRight","millisecond","getTime","getTimezoneOffset","week","rawYears","core_1","en_1","argIndex","framesToPop","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","propFullName","secret","getShim","ReactPropTypes","bigint","bool","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","qs","sep","eq","maxKeys","kstr","vstr","idx","stringifyPrimitive","ks","decode","aa","ba","da","Set","ea","fa","ha","ia","ja","ka","la","ma","t","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","propertyName","sanitizeURL","removeEmptyString","qa","ra","sa","oa","pa","na","removeAttribute","setAttributeNS","xlinkHref","ta","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ua","for","va","wa","xa","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ka","La","Ma","Na","prepareStackTrace","Oa","Pa","$$typeof","_context","_payload","_init","Qa","Ra","Sa","nodeName","Ua","_valueTracker","setValue","stopTracking","Ta","Va","Wa","activeElement","body","Xa","defaultChecked","_wrapperState","initialChecked","Ya","initialValue","controlled","Za","$a","bb","cb","ownerDocument","db","eb","selected","defaultSelected","disabled","fb","gb","hb","ib","textContent","jb","kb","lb","mb","namespaceURI","firstChild","MSApp","execUnsafeLocalFunction","nb","lastChild","nodeType","nodeValue","ob","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","pb","qb","rb","setProperty","sb","menuitem","area","base","br","col","embed","hr","img","keygen","meta","param","track","wbr","tb","ub","is","vb","wb","srcElement","correspondingUseElement","parentNode","xb","yb","zb","Ab","Bb","stateNode","Cb","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","onError","Nb","Ob","Pb","Qb","Rb","Sb","Ub","alternate","return","Vb","memoizedState","dehydrated","Wb","Yb","sibling","Xb","Zb","$b","unstable_scheduleCallback","ac","unstable_cancelCallback","bc","unstable_shouldYield","cc","unstable_requestPaint","unstable_now","dc","unstable_getCurrentPriorityLevel","ec","unstable_ImmediatePriority","fc","unstable_UserBlockingPriority","gc","unstable_NormalPriority","hc","unstable_LowPriority","ic","unstable_IdlePriority","jc","kc","nc","clz32","oc","pc","qc","rc","sc","tc","pendingLanes","suspendedLanes","pingedLanes","entangledLanes","entanglements","uc","wc","xc","yc","zc","eventTimes","Bc","Cc","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Map","Oc","Pc","Qc","Rc","delete","pointerId","Sc","nativeEvent","blockedOn","domEventName","eventSystemFlags","targetContainers","Uc","Vc","priority","isDehydrated","containerInfo","Wc","Xc","Yc","Zc","$c","ad","bd","ReactCurrentBatchConfig","cd","dd","transition","ed","fd","gd","hd","Tc","stopPropagation","jd","kd","ld","md","nd","keyCode","charCode","od","pd","qd","_reactName","_targetInst","currentTarget","isDefaultPrevented","defaultPrevented","returnValue","isPropagationStopped","preventDefault","cancelBubble","persist","isPersistent","vd","wd","xd","rd","eventPhase","bubbles","cancelable","timeStamp","isTrusted","sd","td","view","detail","ud","zd","screenX","screenY","clientX","clientY","pageX","pageY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","yd","button","buttons","relatedTarget","fromElement","toElement","movementX","movementY","Ad","Cd","dataTransfer","Ed","Gd","animationName","elapsedTime","pseudoElement","Hd","clipboardData","Id","Kd","Ld","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Md","Nd","Alt","Control","Meta","Shift","Od","Pd","repeat","which","Qd","Sd","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","Ud","touches","targetTouches","changedTouches","Wd","Xd","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Yd","Zd","$d","ae","documentMode","be","ce","de","ee","fe","ge","he","ke","datetime","email","range","tel","le","me","ne","listeners","oe","pe","qe","se","te","ue","ve","we","xe","ye","oninput","ze","detachEvent","Ae","Be","Ce","De","Ee","Ge","He","Ie","Je","nextSibling","Ke","contains","compareDocumentPosition","Le","HTMLIFrameElement","Me","contentEditable","Ne","focusedElem","selectionRange","documentElement","selectionStart","selectionEnd","defaultView","getSelection","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","createRange","setStart","removeAllRanges","addRange","setEnd","left","scrollLeft","top","scrollTop","focus","Oe","Pe","Qe","Re","Se","Te","Ue","Ve","animationend","animationiteration","animationstart","transitionend","We","Xe","Ye","animation","Ze","$e","af","bf","cf","df","ef","ff","gf","kf","lf","mf","Tb","D","nf","of","pf","qf","passive","w","J","sf","tf","uf","vf","Z","ya","ab","ca","ie","char","je","wf","xf","yf","zf","Af","Bf","Cf","Df","Ef","Ff","Gf","If","catch","Hf","Jf","Kf","Lf","previousSibling","Mf","Nf","Of","Pf","Qf","Rf","Sf","Tf","G","Uf","H","Vf","Wf","Xf","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Yf","Zf","$f","ag","bg","__reactInternalMemoizedMergedChildContext","cg","dg","eg","fg","gg","ig","jg","kg","lg","mg","ng","og","pg","qg","_currentValue","rg","childLanes","sg","dependencies","firstContext","lanes","tg","ug","memoizedValue","vg","wg","xg","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","interleaved","effects","yg","zg","eventTime","lane","Ag","Bg","Cg","Dg","Eg","u","Fg","Gg","Hg","refs","Ig","Mg","isMounted","_reactInternals","enqueueSetState","Jg","Kg","Lg","enqueueReplaceState","enqueueForceUpdate","Ng","shouldComponentUpdate","isPureReactComponent","Og","updater","Pg","Qg","getSnapshotBeforeUpdate","componentWillMount","Rg","Sg","Tg","Ug","Vg","Wg","Xg","Yg","Zg","$g","ah","bh","dh","eh","I","fh","gh","hh","deletions","ih","pendingProps","treeContext","retryLane","jh","kh","lh","mh","memoizedProps","nh","oh","ph","ref","_owner","_stringRef","qh","rh","sh","th","uh","vh","implementation","wh","xh","yh","zh","Ah","Bh","Ch","Dh","Eh","Fh","tagName","Gh","Hh","Ih","K","Jh","revealOrder","Kh","Lh","_workInProgressVersionPrimary","Mh","ReactCurrentDispatcher","Nh","Oh","L","M","N","Ph","Qh","Rh","Sh","Th","Uh","Vh","Wh","Xh","Yh","Zh","$h","baseQueue","ai","bi","ci","lastRenderedReducer","action","hasEagerState","eagerState","lastRenderedState","dispatch","di","ei","fi","gi","getSnapshot","ii","ji","ki","lastEffect","stores","li","mi","ni","destroy","deps","oi","pi","qi","ri","si","ti","ui","vi","wi","xi","yi","zi","Ai","Bi","Ci","Di","Ei","Fi","Gi","readContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","identifierPrefix","Hi","Ii","Ti","Vi","Wi","Ji","Ki","Li","Mi","Ni","componentDidCatch","Oi","componentStack","Pi","pingCache","Qi","Ri","Si","Xi","tailMode","Q","subtreeFlags","Yi","pendingContext","Zi","wasMultiple","multiple","suppressHydrationWarning","onClick","onclick","createElementNS","autoFocus","$i","rendering","aj","renderingStartTime","isBackwards","bj","cj","dj","ReactCurrentOwner","ej","fj","gj","hj","ij","jj","kj","lj","baseLanes","cachePool","transitions","mj","nj","oj","UNSAFE_componentWillUpdate","componentWillUpdate","componentDidUpdate","pj","qj","rj","sj","tj","uj","vj","fallback","wj","xj","yj","zj","_reactRetry","Aj","Bj","Cj","Dj","Ej","Gj","Hj","Ij","WeakSet","Jj","U","Kj","Lj","Nj","Oj","Pj","Qj","Rj","Sj","Tj","insertBefore","_reactRootContainer","Uj","Vj","Wj","Xj","onCommitFiberUnmount","Yj","Zj","ak","bk","ck","dk","ek","fk","gk","hk","ik","__reactInternalSnapshotBeforeUpdate","Uk","jk","kk","lk","mk","W","X","Y","nk","pk","qk","rk","sk","tk","uk","vk","wk","xk","yk","zk","Ak","Bk","Ck","callbackNode","expirationTimes","expiredLanes","vc","callbackPriority","hg","Dk","Ek","Fk","Gk","Hk","Ik","Jk","Kk","Lk","Mk","Nk","finishedWork","finishedLanes","Ok","timeoutHandle","Pk","Qk","Rk","Sk","Tk","mutableReadLanes","Ac","Mj","onCommitFiberRoot","lc","onRecoverableError","Vk","onPostCommitFiberRoot","Wk","Xk","Zk","isReactComponent","pendingChildren","$k","mutableSourceEagerHydrationData","al","cache","pendingSuspenseBoundaries","bl","cl","dl","fl","gl","hl","Fj","Yk","jl","reportError","kl","_internalRoot","ll","ml","nl","ol","ql","pl","unmount","unstable_scheduleHydration","querySelectorAll","form","rl","usingClientEntryPoint","Events","sl","findFiberByHostInstance","bundleType","rendererPackageName","tl","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setErrorHandler","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","reconcilerVersion","__REACT_DEVTOOLS_GLOBAL_HOOK__","ul","isDisabled","supportsFiber","inject","createPortal","createRoot","unstable_strictMode","findDOMNode","flushSync","hydrate","hydrateRoot","hydratedSources","_getVersion","_source","unmountComponentAtNode","unstable_batchedUpdates","unstable_renderSubtreeIntoContainer","checkDCE","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","_createClass","protoProps","staticProps","_reactDom","NodeResolver","innerRef","_NodeResolver","_exenv","_TouchScrollable","_withLockSheet2","_withTouchListeners2","_utils","ScrollLock","_PureComponent","initialHeight","innerHeight","scrollTo","pageYOffset","TouchScrollable","PureComponent","SheetLock","compose","LockToggle","isActive","accountForScrollbars","getScrollableArea","scrollableArea","preventInertiaScroll","listenerOptions","allowTouchMove","_props","rest","_objectWithoutProperties","cloneElement","_ScrollLock","preventTouchMove","scrollHeight","clientHeight","totalScroll","currentScroll","offsetHeight","isTouchDevice","maxTouchPoints","camelToKebab","getPadding","getComputedStyle","paddingRight","innerWidth","clientWidth","getWindowHeight","multiplier","getDocumentHeight","makeStyleTag","injectStyles","styleSheet","cssText","insertStyleTag","getElementsByTagName","pipeFns","WrappedComponent","SheetProvider","addSheet","styles","getStyles","sheet","removeSheet","TouchProvider","forceUpdate","__self","__source","escape","_status","_result","Children","count","toArray","only","_currentValue2","_threadCount","_defaultValue","_globalName","createFactory","createRef","forwardRef","isValidElement","lazy","memo","startTransition","unstable_act","sortIndex","performance","startTime","expirationTime","priorityLevel","scheduling","isInputPending","unstable_Profiling","unstable_continueExecution","unstable_forceFrameRate","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_runWithPriority","unstable_wrapCallback","_typeof","classCallCheck","createClass","inherits","objectWithoutProperties","possibleConstructorReturn","StyledComponentsError","_Error","interpolations","objToCss","prevKey","chunk","flatten","chunks","executionContext","ruleSet","styledComponentId","nextChunk","elementName","COMMENT_REGEX","stylisSplitter","cascade","keyframe","prefix","compress","semicolon","stylis","parsingRules","returnRulesPlugin","parsedRules","parseRulesPlugin","rule","stringifyRules","rules","flatCSS","splitByRules","isStyledComponent","consolidateStreamedStyles","MAX_SIZE","getAlphabeticChar","generateAlphabeticName","interleave","strings","EMPTY_ARRAY","freeze","EMPTY_OBJECT","SC_ATTR","CONTEXT_KEY","SC_COMPONENT_ID","extractComps","maybeCSS","existingComponents","matchIndex","nextComp","cssFromDOM","getNonce","addNameForId","resetIdNames","hasNameForId","stringifyNames","sheetForTag","styleSheets","ownerNode","safeInsertRule","cssRule","maxIndex","cssRules","insertRule","makeTextMarker","addUpUntilIndex","totalUpToIndex","wrapAsHtmlTag","additionalAttrs","nonce","wrapAsElement","getIdsFromMarkersFactory","markers","makeServerTagInternal","namesArg","markersArg","insertMarker","prev","cssForId","clone","namesClone","cloneNames","markersClone","getIds","insertRules","removeRules","marker","sealed","styleTag","toHTML","makeTag","tagEl","forceServer","getImportRuleTag","extractImport","usedImportRuleTag","insertIndex","injectedRules","importRules","cssRulesSize","mayHaveImport","removalIndex","lowerBound","deleteRule","deleteRules","makeSpeedyTag","SPLIT_REGEX","_StyleSheetManager$ch","sheetRunningId","master","StyleSheet","importRuleTag","firstTag","tags","tagMap","deferred","rehydratedNames","ignoreRehydratedNames","capacity","clones","rehydrate","els","extracted","isStreamed","nodes","nodesSize","getAttribute","elNames","elNamesSize","extractedSize","rehydrationTag","immediateRehydration","_extracted$i","_i","makeRehydrationTag","_j","reset","ids","newTag","sealAllTags","lastEl","getTagForId","hasId","deferredInject","toReactElements","StyleSheetManager","sheetInstance","ServerStyleSheet","masterSheet","closed","complete","collectStyles","getStyleTags","getStyleElement","interleaveWithNodeStream","readableStream","determineTheme","fallbackTheme","isDefaultTheme","escapeRegex","dashesAtEnds","getComponentName","isTag","_contextShape","_ThemeProvider$contex","_babelHelpers$extends","ATTRIBUTE_REGEX","isCustomAttribute","CHANNEL_NEXT","CONTEXT_CHANNEL_SHAPE","contextShape","unsubscribeToOuterId","initialState","outerContext","outerTheme","broadcast","publish","nextState","currentId","unsubID","_this3","subscriber","unsubscribeId","passedTheme","STATIC_EXECUTION_CONTEXT","modifiedContextShape","identifiers","BaseStyledComponent","attrs","generatedClassName","unsubscribeFromContext","buildExecutionContext","acc","attr","hasInInheritanceChain","generateAndInjectStyles","_constructor","componentStyle","warnTooManyClasses","isStatic","styledContext","nextTheme","_generatedClassName","prevState","_constructor2","isTargetTag","className","baseProps","propsForElement","murmurhash","areStylesCacheable","isStaticRules","isHMREnabled","hot","domElements","replaceWhitespace","Component$$1","isStatelessFunctionalComponent","shouldSetInnerRef","WithTheme","_React$Component","themeProp","oldState","__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS","ComponentStyle","nameGenerator","generateRuleHash","lastClassName","generateName","_ComponentStyle","constructWithOptions","componentConstructor","templateFunction","_constructWithOptions","StyledComponent","createStyledComponent","_options$isClass","isClass","_options$displayName","generateDisplayName","_options$componentId","_displayName","parentComponentId","nr","generateId","_options$ParentCompon","ParentComponent","extendingRules","_ParentComponent","withComponent","previousComponentId","optionsToCopy","newComponentId","newOptions","rulesFromOptions","newRules","_StyledComponent","_keyframes","injectGlobal","_injectGlobal","styled","styledComponent","domElement","_styled","delimiter","toSheet","block","selectors","parents","ns","depth","at","nullptn","formatptn","colonptn","cursorptn","transformptn","animationptn","propertiesptn","elementptn","selectorptn","andptn","escapeptn","invalidptn","keyframeptn","plcholdrptn","readonlyptn","beforeptn","afterptn","tailptn","whiteptn","pseudoptn","writingptn","supportsptn","propertyptn","selfptn","pseudofmt","dimensionptn","imgsrcptn","webkit","moz","ms","SEMICOLON","CLOSEBRACES","OPENBRACES","OPENPARENTHESES","CLOSEPARENTHESES","NEWLINE","CARRIAGE","AT","SPACE","DASH","STAR","COMMA","COLON","FOWARDSLASH","GREATERTHAN","PLUS","TILDE","KEYFRAME","preserve","plugins","plugged","should","unkwn","keyed","nscopealt","nscope","bracket","comment","parentheses","quote","trail","peak","atrule","pseudo","caret","insert","invert","eof","eol","flat","delimited","select","supports","vendor","property","isolate","scope","level","third","declare","items","parseFloat","minify","plugin","extendStatics","__extends","__","__rest","__decorate","decorators","decorate","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","__awaiter","_arguments","generator","__generator","sent","trys","ops","verb","op","__createBinding","o","k2","__exportStar","__values","__read","ar","__spread","__spreadArrays","il","__await","__asyncGenerator","asyncIterator","resume","fulfill","__asyncDelegator","__asyncValues","cooked","__importStar","mod","__classPrivateFieldGet","receiver","privateMap","__classPrivateFieldSet","root","freeGlobal","punycode","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","stringFromCharCode","mapDomain","ucs2decode","extra","ucs2encode","digitToBasic","digit","adapt","delta","numPoints","firstTime","baseMinusTMin","basic","oldi","baseMinusT","inputLength","bias","handledCPCount","basicLength","currentValue","handledCPCountPlusOne","qMinusT","util","Url","slashes","query","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","hostlessProtocol","slashedProtocol","querystring","parseQueryString","slashesDenoteHost","queryIndex","uSplit","simplePath","lowerProto","atSign","hostEnd","hec","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","toASCII","esc","qm","resolveObject","urlParse","rel","tkeys","tkey","rkeys","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","isNullOrUndefined","authInHost","isNull","hasTrailingSlash","up","isAbsolute","v1","v4","uuid","byteToHex","bth","getRandomValues","crypto","msCrypto","rnds8","rnds","_nodeId","_clockseq","rng","bytesToUuid","_lastMSecs","_lastNSecs","clockseq","seedBytes","msecs","nsecs","dt","tmh","_defineProperties","_getPrototypeOf","_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","newObj","hasPropertyDescriptor","assertThisInitialized","_setPrototypeOf","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","getter","definition","chunkId","miniCssF","hmd","script","needAttach","scripts","charset","onScriptComplete","onload","doneFns","toStringTag","nmd","paths","installedChunks","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","chunkLoadingGlobal","SENTRY_RELEASE","jQuery","debug","getOptimizelyEndUserId","optimizely","randomId","getOptimizelyCohorts","variations","getVariationMap","buckets","getOptimizelySegments","custom","segments","capturedEventsPromise","onAnalyticsLoad","trackEvent","ace","analytics","Tracking","segmentPageReady","msg","title","Logger","GASv2","hasShownWarning","postBody","Constants","GASv3","GoogleAnalytics","attributes","category","isNonInteraction","ga","nonInteraction","Optimizely","optimizelyValue","inferredName","inferName","eventName","Segment","imkt","additionalAttributes","eventProperties","eventAction","urlParams","getUrlParams","optimizelyCohorts","optimizelySegments","optimizelyEndUserId","tracking","trackAllPlatforms","processAttributes","platform","ImktTracking","Platforms","eventProperty","propertiesObj","sanitizeEventProperties","eventTarget","dataset","eventData","innerText","attribute","campaigns","campaignList","getCampaignStates","campaign","activeExperiments","experiment","variation","holdbackExperiments","isInCampaignHoldback","_e","core","init","domRoot","featureDetect","LocalizedPricing","localizedPricing","each","elem","componentInfo","componentRoot","productKey","productKeyArray","period","offeringSku","countryISOCodeReq","pricing","getPricingPromise","pricingObject","customCurrency","countryISOCodePromise","getLocale","componentInit","resolvePricingPromises","trigger","appInitialized","onInitialized","bodyClasses","svg","backgroundSize","flexBox","addClass","supertype","subtype","overrides","createIfNotExists","basis","componentType","history","pushState","hasFeature","touch","placeholder","localStorage","setItem","removeItem","mobile","wpl","wac","landing","experts","legal","components","software","bxp","customers","pages","teamPatterns","$domRoot","$header","$globalNav","$globalNavLogo","$globalNavTitle","$dropdown","$search","$searchInput","$dropdownContent","mobileBreakpoint","dropdownSpeed","dropdownSpeedFast","canClickDropdown","isCurrentlyMobile","classNames","mobileMenuOpenClass","searchOpenClass","overlayOpenClass","searchIconClass","overlayClass","headerlessNavbarClass","globalNavBackArrowClass","menuToggleClass","searchCloseIconClass","dropdownLinksClass","dropdownCloseClass","dropdownClass","dropdownOpenClass","slideInClass","logoInactiveClass","navLinkDropDownClass","navDropdownLinksClass","navDropDownColumnSecondaryClass","navDropDownLinkAllClass","navLogoClass","setLayoutState","addOverlay","bindEvents","hasChangedLayout","closeMobileMenu","closeDropdown","showLogo","hasClass","openSearch","isMobileLayout","isMobileMenuOpen","setHeaderHeight","openMobileMenu","hideOverlay","isMobileDropdownOpen","hideLogo","dropdownId","isDropdownHidden","closeSearch","removeClass","openDropdown","addTitle","dropdownSlideIn","sendTracking","linkName","originUrl","linkText","prepend","overlay","resetHeaderHeight","deselectLinks","showOverlay","dropdownLink","dropdownRemoveSlideIn","$dropdownText","getCacheId","inputs","FormatConstructor","cacheId","defaultLocaleData","addLocaleData","hasIMFAndIRFLocaleData","normalizedLocale","AwaitValue","AsyncGenerator","gen","front","back","_invoke","throw","toConsumableArray","arr2","localeMatcher","narrowShortLong","numeric2digit","funcReq","intlConfigPropTypes","timeZone","textComponent","defaultFormats","intlFormatPropTypes","formatDate","formatTime","formatRelative","formatNumber","formatPlural","formatHTMLMessage","intlShape","formatters","dateTimeFormatPropTypes","formatMatcher","hour12","era","numberFormatPropTypes","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","relativeFormatPropTypes","pluralFormatPropTypes","intlConfigPropNames","ESCAPED_CHARS","UNSAFE_CHARS_REGEX","filterProps","whitelist","defaults$$1","filtered","invariantIntlContext","intl","shallowEquals","objA","objB","keysA","keysB","bHasOwnProperty","shouldIntlComponentUpdate","_ref2","_ref2$context","nextContext","_context$intl","_nextContext$intl","nextIntl","exception","defaultErrorHandler","resolveLocale","findPluralFunction","IntlPluralFormat","DATE_TIME_FORMAT_OPTIONS","NUMBER_FORMAT_OPTIONS","RELATIVE_FORMAT_OPTIONS","PLURAL_FORMAT_OPTIONS","RELATIVE_FORMAT_THRESHOLDS","updateRelativeFormatThresholds","newThresholds","getNamedFormat","messageDescriptor","defaultMessage","hasValues","formattedMessage","formatter","getMessageFormat","_formatter","filteredOptions","getDateTimeFormat","oldThresholds","getRelativeFormat","getNumberFormat","getPluralFormat","rawValues","escapedValues","escaped","intlConfigPropNames$1","intlFormatPropNames","IntlProvider","intlContext","initialNow","_ref$formatters","_didDisplay","hasLocaleData","_config","boundFormatFns","getConfig","getBoundFormatFns","_state","FormattedDate","Text","formattedDate","FormattedTime","formattedTime","HOUR","DAY","FormattedRelative","_timer","updateInterval","unitDelay","getUnitDelay","absDelta","selectUnits","unitRemainder","scheduleNextUpdate","aTime","bTime","isSameDate","formattedRelative","FormattedNumber","formattedNumber","FormattedPlural","pluralCategory","formattedPlural","defaultFormatMessage","FormattedMessage","nextValues","nextPropsToCheck","_ref$formatMessage","formatMessage$$1","_ref$textComponent","_props$tagName","tokenDelimiter","tokenizedValues","generateToken","FormattedHTMLMessage","formattedHTMLMessage","_inheritsLoose","isSpeedy","speedy","ctr","container","before","_proto","_tag","createStyleElement","isImportRule","Sheet","ruleSheet","getRegisteredStyles","registered","registeredStyles","rawClassName","insertStyles","serialized","isStringTag","inserted","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","WebkitLineClamp","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","processStyleValue","p2","cursor","handleInterpolation","mergedProps","interpolation","couldBeSelectorInterpolation","__emotion_styles","anim","interpolated","createStringFromObject","previousCursor","cached","labelPattern","stringMode","identifierName","EmotionCacheContext","HTMLElement","stylisOptions","_insert","stylisPlugins","shouldCache","typePropName","createEmotionProps","Noop","cssProp","ele","possiblyStyleElement","Emotion","jsx","createElementArgArray","insertable","classnames","cls","toAdd","cx","useTheme","getAtlaskitAnalyticsContext","getAtlaskitAnalyticsEventHandlers","ContextTypes","AnalyticsListener","getAnalyticsEventHandlers","onEvent","eventChannel","contextValue","ExportedAnalyticsListener","ArrayProto","ObjProto","SymbolProto","supportsArrayBuffer","supportsDataView","DataView","nativeIsArray","nativeCreate","nativeIsView","_isNaN","_isFinite","hasEnumBug","nonEnumerableProps","MAX_ARRAY_INDEX","restArguments","startIndex","isBoolean","tagTester","nodelist","childNodes","Int8Array","hasStringTagBug","isIE11","isDataView","getInt8","isArguments","constant","createSizePropertyCheck","getSizeProperty","collection","sizeProperty","shallowProperty","typedArrayPattern","collectNonEnumProps","emulatedSet","nonEnumIdx","isEmpty","isMatch","_keys","_wrapped","toBufferView","bufferSource","tagDataView","aStack","bStack","deepEq","areArrays","aCtor","bCtor","isEqual","allKeys","ie11fingerprint","weakMapMethods","forEachName","commonInit","mapTail","mapMethods","setMethods","pairs","functions","createAssigner","keysFunc","baseCreate","Ctor","extendOwn","tap","toPath","deepGet","identity","optimizeCb","argCount","accumulator","baseIteratee","iteratee","mapObject","currentKey","propertyOf","times","accum","createEscaper","escaper","testRegexp","replaceRegexp","templateSettings","evaluate","interpolate","noMatch","escapes","escapeRegExp","escapeChar","bareIdentifier","template","settings","oldSettings","variable","idCounter","uniqueId","_chain","executeBound","sourceFunc","boundFunc","callingContext","partial","boundArgs","bound","callArgs","strict","hasher","memoize","address","wait","throttle","previous","later","leading","throttled","_now","trailing","debounce","immediate","debounced","_args","negate","after","findKey","createPredicateIndexFinder","sortedIndex","low","high","mid","createIndexFinder","predicateFind","findLastIndex","findWhere","createReduce","reducer","initial","guard","contextPath","pluck","where","computed","lastComputed","reStrSymbol","sample","rand","shuffle","sortBy","criteria","right","behavior","partition","pass","keyInObj","pick","compact","otherArrays","difference","uniq","isSorted","seen","arrays","intersection","unzip","chainResult","mixin","hamletApi","baseDomain","getBaseDomain","useCofsPath","basePath","getCofsPath","getHamletPath","cacheBuster","authenticated","hamletUser","getToken","getBxpPath","hamletRequest","ProductKey","HamletUser","initialized","user","contactDetails","firstName","lastName","organisationDetails","address1","address2","city","postcode","isoCountryCode","organisationName","organisationType","payOnAccount","taxId","lassoDetails","myDetails","aaid","avatar","isLoggedIn","sites","performanceBoostExperiment","enableAisAvailableProducts","retrieveXsrfToken","getStargateProfile","setToken","debugAllSites","retrieveMe","retrieveSitesData","identityData","sitesData","setSites","stargateData","account_id","picture","getFirstName","getLastName","retrieveAvailableProductsData","availableProductsSites","site","adminAccess","products","availableProducts","availableProduct","productType","cloudId","avatarUrl","transformAvailableProductsIntoAvailableSites","sitesResult","isValidSite","migrationSourceUuid","cloudIds","setExtendedTrialAvailability","extendedTrialAvailability","groupSitesByProduct","isVertigo","icon","login_logo_url","fullName","UIAnalyticsEvent","_super","hasFired","fire","update","AnalyticsEvent","AnalyticsContextConsumer","originalEventProps","patchedEventProps","updatePatchedEventProps","changedPropCallbacks","createEventMap","mapCreateEventsToProps","changedPropNames","modified","propCallbackName","eventCreator","providedCallback","analyticsEvent","createAnalyticsEvent","wrappedComponentProps","WithAnalyticsEvents","_toConsumableArray","iter","minLen","_assertThisInitialized","generateUID","AnalyticsContext","getAnalyticsContext","ancestorData","safeIsNaN","areInputsEqual","newInputs","lastInputs","resultFn","lastThis","lastResult","lastArgs","calledOnce","newArgs","compactButtonHeight","buttonHeight","getBackground","applyPropertyStyle","baseTheme","getBoxShadow","getColor","getCursor","getHeight","spacing","getLineHeight","getTextDecoration","getTransition","getTransitionDuration","getVerticalAlign","getWidth","shouldFitContainer","staticStyles","alignItems","borderWidth","boxSizing","fontStyle","maxWidth","outline","textAlign","textDecoration","mapAttributesToState","isFocus","isHover","isSelected","getLoadingStyle","isLoading","composeRefs","hex2rgba","alpha","colorArr","fallbacks","hover","active","focusSelected","warning","danger","subtle","boxShadowColor","propertyStyles","appearanceStyles","stateStyles","buttonStyles","boxShadow","transitionDuration","verticalAlign","margin","pointerEvents","spinnerStyles","transform","followsIcon","alignSelf","textOverflow","isOnlyChild","userSelect","fit","flexWrap","justifyContent","xsmall","providedSize","strokeColor","focusable","viewBox","xmlns","cy","appearances","LoadingSpinner","invertSpinner","Button","getComposedRefs","isInteractive","onMouseEnter","onMouseLeave","onMouseDown","onMouseUp","onFocus","onBlur","getElement","onInnerClick","HTMLButtonElement","CustomComponent","consumerRef","iconAfter","iconBefore","StyledButton","iconIsOnlyChild","InnerWrapper","Content","createAndFireEventOnAtlaskit","consumerEvent","clonedEvent","ButtonWithRef","defaultData","packageName","packageVersion","WithAnalyticsContext","analyticsContext","analyticsData","actionSubject","excluded","sourceKeys","timeoutDuration","longerTimeoutBrowsers","scheduled","functionToCheck","getStyleComputedProperty","getParentNode","getScrollParent","_getStyleComputedProp","overflowX","overflowY","getReferenceNode","reference","referenceNode","MSInputMethodContext","isIE10","isIE","getOffsetParent","noOffsetParent","offsetParent","nextElementSibling","getRoot","findCommonOffsetParent","element1","element2","Node","DOCUMENT_POSITION_FOLLOWING","commonAncestorContainer","firstElementChild","element1root","getScroll","side","upperSide","scrollingElement","includeScroll","rect","modifier","bottom","getBordersSize","axis","sideA","sideB","computedStyle","getWindowSizes","getClientRect","offsets","getBoundingClientRect","horizScrollbar","offsetWidth","vertScrollbar","getOffsetRectRelativeToArbitraryNode","fixedPosition","isHTML","childrenRect","parentRect","scrollParent","borderTopWidth","borderLeftWidth","marginTop","marginLeft","getViewportOffsetRectRelativeToArtbitraryNode","excludeScroll","relativeOffset","isFixed","getFixedPositionOffsetParent","parentElement","getBoundaries","popper","boundariesElement","boundaries","boundariesNode","_getWindowSizes","isPaddingNumber","getArea","computeAutoPlacement","placement","refRect","rects","sortedAreas","filteredAreas","computedPlacement","getReferenceOffsets","commonOffsetParent","getOuterSizes","marginBottom","marginRight","getOppositePlacement","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","runModifiers","modifiers","ends","cur","enabled","isDestroyed","arrowStyles","flipped","positionFixed","flip","originalPlacement","isCreated","onCreate","isModifierEnabled","modifierName","getSupportedPropertyName","prefixes","upperProp","toCheck","willChange","disableEventListeners","removeOnDestroy","getWindow","attachToScrollParents","scrollParents","isBody","setupEventListeners","updateBound","scrollElement","eventsEnabled","enableEventListeners","cancelAnimationFrame","isNumeric","setStyles","unit","isFirefox","isModifierRequired","requestingName","requestedName","requesting","_requesting","requested","placements","validPlacements","clockwise","reverse","basePlacement","shiftvariation","_data$offsets","isVertical","shiftOffsets","useHeight","fragments","frag","divider","splitRegex","mergeWithPrevious","toValue","index2","parseOffset","preventOverflow","transformProp","popperStyles","escapeWithReference","secondary","keepTogether","opSide","arrow","_data$offsets$arrow","arrowElement","querySelector","sideCapitalized","altSide","arrowElementSize","center","popperMarginSide","popperBorderSide","sideValue","placementOpposite","flipOrder","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariationByRef","flipVariations","flippedVariationByContent","flipVariationsByContent","flippedVariation","getOppositeVariation","subtractLength","hide","computeStyle","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","shouldRound","noRound","referenceWidth","popperWidth","isVariation","horizontalToInteger","verticalToInteger","getRoundedOffsets","devicePixelRatio","prefixedProperty","invertTop","invertLeft","applyStyle","onLoad","modifierOptions","Defaults","Popper","requestAnimationFrame","jquery","Utils","PopperUtils","ManagerReferenceNodeContext","setRef","safeInvoke","initialStyle","initialArrowStyle","InnerPopper","popperNode","updatePopperInstance","arrowNode","updateStateModifier","popperInstance","destroyPopperInstance","referenceElement","getOptions","prevProps","setPopperNode","getPopperStyle","getPopperPlacement","outOfBoundaries","getOutOfBoundariesState","arrowProps","setArrowNode","getArrowStyle","FlipBehavior","auto","getModifiers","createContainer","getBody","zIndexToName","layerName","getLayerName","firePortalEvent","CustomEvent","cancellable","initCustomEvent","getEvent","getPortalParent","portalIsMounted","newContainer","replaceChild","TooltipPrimitive","Tooltip","truncate","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","initialStatus","appear","isMounting","appearStatus","in","unmountOnExit","mountOnEnter","nextCallback","updateStatus","nextStatus","cancelNextCallback","getTimeouts","mounting","performEnter","performExit","appearing","nodeRef","maybeNode","maybeAppearing","timeouts","enterTimeout","onEnter","safeSetState","onEntering","onTransitionEnd","onEntered","onExit","onExiting","onExited","setNextCallback","_this4","doesNotHaveTimeoutOrListener","addEndListener","_ref3","maybeNextCallback","childProps","TransitionGroupContext","defaultStyle","transitionStyle","entering","entered","exiting","immediatelyHide","immediatelyShow","inProp","getStyle","hoveredPayload","unhoveredPayload","SCROLL_OPTIONS","getMousePosition","mouseCoordinates","safeMouse","pendingHide","wrapperRef","targetRef","cancelPendingSetState","userInteraction","isVisible","renderTooltip","handleWindowScroll","handleMouseClick","hideTooltipOnClick","handleMouseDown","hideTooltipOnMouseDown","handleMouseOver","fakeMouseElement","handleShowTooltip","handleFocus","defaultDelay","isHidePending","showTooltip","handleHideTooltip","flushed","hideTooltip","handleMouseMove","removeScrollListener","_prevProps","onShow","onHide","shouldPositionTooltipNearMouse","mousePosition","TooltipContainer","TargetContainer","tooltipPosition","onMouseOver","onMouseOut","onMouseMove","getAnimationStyles","activeBackgroundColor","hoverBackgroundColor","selectedBackgroundColor","activePrimaryTextColor","defaultPrimaryTextColor","disabledPrimaryTextColor","primaryPrimaryTextColor","selectedPrimaryTextColor","focusedStyles","activeStyles","primaryStyles","sharedStyles","isHidden","isFocused","Anchor","Span","InputWrapper","Before","After","ContentWrapper","allowMultiline","Description","getInputBackground","isChecked","isHovered","isPressed","getInputFill","appearanceProps","supportsVoiceOver","ariaProps","ariaRoles","checkbox","radio","consolidatedProps","handleClick","onKeyPress","handleKeyPress","handleMouseOut","handleMouseUp","tabIndex","inputTypes","Item","onActivate","guardedActivate","_this$state","hasInput","Input","elemBefore","shouldAllowMultilineItems","elemAfter","tooltipDescription","itemContext","Heading","HeadingAfter","HeadingText","DroplistGroup","ariaLabel","getAriaLabel","afterText","headingElement","_this$props2","Group","Blanket","ScrollBlock","positionMap","maxHeight","FixedTarget","fixedOffset","Layer","popperHeight","cssPosition","fixPositionTopUnderflow","originalHeight","calculateMaxHeight","hasExtractedStyles","actualPosition","originalPosition","extractStyles","frameId","wrapperFn","applyPopper","calculateFixedOffset","onFlippedChange","onPositioned","currentHeight","positionTop","DocumentElementClientHeight","viewportHeight","isAlwaysFixed","actualTarget","popperTop","fixedRef","contentRef","popperOpts","positionToPopper","autoFlip","flipBehavior","lockScroll","_this$state2","_ref4","isTall","SpinnerContainer","Trigger","dropdownPadding","secondaryText","dropOffset","Droplist","setContentWidth","handleClickOutside","handleEsc","isOpen","_assertThisInitialize","dropContentRef","triggerRef","halfFocusRing","withinTrigger","withinContent","onOpenChange","onKeyDown","isMenuFixed","shouldFlip","layerContent","handleContentRef","handleTriggerRef","focusManagerContext","selectionCacheContext","clickManagerContext","KEY_UP","KEY_DOWN","KEY_SPACE","KEY_ENTER","DropdownItemFocusManager","itemId","itemNode","registeredItems","focusedItemId","matchingIndex","focusedItemIndex","handleItemRegistered","nextItemIndex","itemFocused","handleItemFocused","registerItem","deregisterItem","handleItemDeregistered","updateItem","handleItemUpdated","handleKeyboard","DropdownItemClickManager","onItemClicked","itemClicked","handleItemClicked","isItemInList","itemList","groupId","DropdownItemSelectionCache","lastCacheUpdate","newGroupSelections","newSelectedItems","selectedItems","isItemSelected","itemsInGroup","itemSelectionsChanged","handleItemSelectionsChanged","hasItemAlreadyHadDefaultSelectedApplied","alreadyDefaultedItems","markItemAsDefaultApplied","DropdownMenuStateless","autoFocusDropdownItems","isUsingDeprecatedAPI","domItemsList","focusFirstItem","prevProp","indexItem","available","currentItem","latestAvailable","getNextFocusable","getPrevFocusable","sourceOfIsOpen","focusItem","focusedItem","isDroplistItem","thisDom","isTargetChildItem","focusPreviousItem","focusNextItem","menuContainer","domMenuContainer","handleClickDeprecated","triggerContainer","triggerButtonProps","triggerType","insideTriggerContent","triggerProps","defaultButtonProps","triggerContent","itemIndex","onItemActivated","groupIndex","renderItems","renderGroups","dropdownListPositioned","_this$props3","isDeprecated","deprecatedProps","handleKeyboardInteractionsDeprecated","handleKeyboardInteractionForClosed","renderTrigger","onDroplistPositioned","renderDeprecated","WidthConstrainer","renderDropdownItems","DropdownMenu","defaultOpen","activatedItem","activatedGroup","findActivatedGroup","_len3","_key3","handleItemActivation","handleOpenChange","getStarted","cloudProducts","cloudProductsMobile","activeSites","profile","licenses","logOut","BlankPointerImage","React","alt","EmptyView","getStartedUrl","onGetStartedClick","Container","Link","useCallbackOne","getResult","isFirstRun","committed","useCache","useMemoOne","useCallbackWithAnalytics","contextRef","methodRef","payloadRef","pload","trackingData","eventType","eventContainer","eventComponent","magnoliaComponentId","atlOrigin","parseProductKey","getParameterByName","Chevron","SubDomain","withAnalyticsEvents","domRootId","URL","subdomain","trackAndFollowUrl","SiteList","Message","List","ListItem","SiteLinkWithAnalytics","ProductLink","Header","ProductNameLabel","setIsOpen","singleSite","ProductsView","MessageLabel","MessageLabelDivider","ProductDropdownItemWithAnalytics","UserNav","onProfileClick","onLicensesClick","onLogOutClick","UserProfileView","userName","userEmail","onMobileBackClick","onMobileCloseClick","RootContainerMobile","TopRowContainer","UserDetailsContainerMobile","UserNameLabelMobile","UserEmailLabelMobile","FooterMobile","RootContainer","UserDetailsContainer","UserNameLabel","UserEmailLabel","Footer","TRANSITION_DURATION","gridSizeValue","xxlarge","AVATAR_RADIUS","BORDER_WIDTH","overlayColorDisabled","getBorderRadius","includeBorderWidth","getAvatarDimensions","sizeOnly","finalSize","CustomComponentProxy","ProxiedComponent","borderColor","enableTooltip","groupAppearance","primaryText","stackIndex","templateObject_2","templateObject_3","templateObject_4","isClickable","overlayShade","overlayOpacity","StyledCustomComponent","StyledLink","StyledSpan","Ret","e_1","keysToOmit","keysToOmit_1","keysToOmit_1_1","e_1_1","getBackgroundColor","backgroundColors","getDimensions","getPresenceLayout","presencePosition","presenceSize","getStatusLayout","statusPosition","statusSize","propsDefaults","presence","propsWithDefaults","dimensions","PresenceWrapper","StatusWrapper","ShapeGroup","Slot","backgroundImage","backgroundPosition","backgroundRepeat","Svg","otherProps","DefaultImage","AvatarImage","hasError","handleLoadSuccess","handleLoadError","Image","_b","imageUrl","templateObject_5","templateObject_6","propsOmittedFromClickData","BusyCircle","BusyPath","FocusPath","OfflineOuter","OfflineInner","OnlineCircle","Outer","bgColor","Inner","Presence","ApprovedCircle","ApprovedPath","DeclinedCircle","DeclinedPath","LockedCircle","LockedPath","Status","validIconSizes","Avatar","clickAnalyticsCaller","blur","guardedClick","renderIcon","showPresence","showStatus","customPresenceNode","customStatusNode","enhancedProps","getAppearanceProps","onKeyUp","getInteractionProps","getLinkElementProps","interface","getButtonElementProps","getProps","getStyledAvatar","AvatarNode","AvatarWithoutAnalytics","DecoratedComponent","MapProps","setComponent","mapped","ComponentWithPseudoState","actionKeys","avatarSrc","isBorderVisible","Initials","UserProfileDropdown","_typeof2","createCustomError","LDUnexpectedResponseError","LDInvalidEnvironmentIdError","LDInvalidUserError","LDInvalidEventKeyError","LDInvalidArgumentError","LDFlagFetchError","isHttpErrorRecoverable","tripletToBase64","keyList","hasProp","fastDeepEqual","userAttrsToStringify","fromByteArray_1","stringToBytes","base64URLEncode","deepEquals","onNextTick","wrapPromiseCallback","transformValuesToVersionedValues","transformVersionedValuesToValues","chunkUserEventsForUrl","getLDUserAgentString","getLDHeaders","sanitizeUser","docLink","networkError","unknownCustomEventKey","environmentNotFound","environmentNotSpecified","errorFetchingFlags","userNotSpecified","invalidUser","bootstrapOldFormat","deprecated","httpErrorMessage","httpUnavailable","debugPolling","debugStreamPatch","debugStreamPatchIgnored","debugStreamDelete","debugStreamDeleteIgnored","debugEnqueueingEvent","debugPostingEvents","clientInitialized","clientNotReady","eventWithoutUser","invalidKey","localStorageUnavailable","localStorageUnavailableForUserId","bootstrapInvalid","identifyDisabled","debugStreamPing","debugStreamPut","i$1","header","launchDarklyClientSideIds","env"],"sourceRoot":""}