\n );\n};\n\nexport const CurrentCatalogItem = (props) => {\n const [isLoading, setIsLoading] = useState(false);\n const [inventory, setInventory] = useState(0);\n const [qty, setQty] = useState(1);\n const [variation, setVariation] = useState(\n props.item.item_data.variations[0]\n );\n const [image, setImage] = useState(\"/assets/llama-placeholder.png\");\n const [images, setImages] = useState([]);\n const itemData = props.item.item_data;\n\n React.useEffect(() => {\n console.log(props.variations);\n setIsLoading(true);\n if (props.item) {\n setImages(getItemsImages(props.item, props.images));\n let foundImages = getItemsImages(props.item, props.images);\n if (foundImages.length > 0) {\n setImage(foundImages[0]);\n } else {\n setImage(\"/assets/llama-placeholder.png\");\n }\n checkInventory(props.item.item_data.variations[0].id, (result) => {\n setInventory(parseInt(result[0].quantity));\n setIsLoading(false);\n });\n\n getItem(props.item.item_data.variations[0].id, (result) => {\n console.log(result);\n });\n }\n }, [props.item])\n\n const onVariationUpdated = (variationId) => {\n let newVariation = itemData.variations.find((v) => v.id == variationId);\n\n // Check for Images\n // let foundImages = getItemsImages(newVariation, props.images);\n // if (foundImages.length > 0) {\n // setImage(foundImages[0]);\n // } else {\n // setImage(\"/assets/llama-placeholder.png\");\n // }\n\n // setImages(foundImages);\n\n setVariation(\n newVariation\n );\n\n setIsLoading(true);\n checkInventory(variationId, (result) => {\n setInventory(parseInt(result[0].quantity));\n setIsLoading(false);\n });\n }\n\n return (\n
\n );\n};\n\nconst CatalogItemImages = (props) => {\n if (props.images.length > 0) {\n return (\n
\n {props.images.map((image) => {\n return (\n
props.onImageSelected(image)}\n />\n );\n })}\n
\n );\n } else {\n return
;\n }\n};\n\nexport const getItemsImages = (item, images) => {\n console.log(\"Getting Images\");\n console.log(item);\n var item_images = [];\n if (item.image_id != null) {\n item_images.push(images.find((i) => i.id == item.image_id).image_data.url);\n } else if (item.item_data && item.item_data.ecom_image_uris != null) {\n item_images = item.item_data.ecom_image_uris;\n } else if (item.item_data && item.item_data.image_ids) {\n item_images= item.item_data.image_ids.map((id) => {\n return images.find((i) => i.id == id).image_data.url;\n })\n }\n console.log(item_images);\n return item_images;\n};\n\nexport const StatusBar = (props) => {\n return (\n
\n
\n {props.currentCategory != null\n ? props.currentCategory.name\n : \"Select A Category\"}\n
\n {props.scriptsLoaded ? (\n
\n ) : (\n \"Loading...\"\n )}\n
\n );\n};\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 _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}","// TODO v5: consider to make it private\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","import memoize from '@emotion/memoize';\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|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|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|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|fr|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|panose1|paintOrder|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|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */ && prop.charCodeAt(1) === 110\n /* n */ && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */);\n\nexport default isPropValid;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\nfunction noop() {}\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\nprocess.listeners = function (name) {\n return [];\n};\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\nprocess.cwd = function () {\n return '/';\n};\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function () {\n return 0;\n};","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","import React from \"react\";\nimport styled from \"styled-components\";\n\nconst Overlay = styled.div`\n width: 100%;\n height: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 99;\n background-color: #00000070;\n`;\n\nconst Container = styled.div`\n width: 25%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: white;\n padding: 2%;\n border-radius: 2rem;\n`;\n\nconst LoadingImage = styled.img`\n width: 100%;\n height: 100%;\n`;\n\n//Scale Text size to 1.5rem\n// Set font as Roboto\n// Set container to be max width\nconst LoadingText = styled.p`\n font-size: 2.5rem;\n font-family: Roboto;\n max-width: 100%;\n text-align: center;\n`;\n\nexport default (props) => {\n return (\n
\n \n \n Loading... \n \n \n );\n};\n","var isProduction = process.env.NODE_ENV === 'production';\nfunction warning(condition, message) {\n if (!isProduction) {\n if (condition) {\n return;\n }\n var text = \"Warning: \" + message;\n if (typeof console !== 'undefined') {\n console.warn(text);\n }\n try {\n throw Error(text);\n } catch (x) {}\n }\n}\nexport default warning;","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n var toParts = to && to.split('/') || [];\n var fromParts = from && from.split('/') || [];\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n if (!fromParts.length) return '/';\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');\n var result = fromParts.join('/');\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n return result;\n}\nexport default resolvePathname;","function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true;\n\n // Otherwise, if either of them == null they are not equal.\n if (a == null || b == null) return false;\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n return Object.keys(Object.assign({}, a, b)).every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n return false;\n}\nexport default valueEqual;","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n var searchIndex = pathname.indexOf('?');\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n if (key) location.key = key;\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n return location;\n}\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\nfunction createTransitionManager() {\n var prompt = null;\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n var listeners = [];\n function appendListener(fn) {\n var isActive = true;\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n var transitionManager = createTransitionManager();\n function setState(nextState) {\n _extends(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n var forceNextPop = false;\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n function go(n) {\n globalHistory.go(n);\n }\n function goBack() {\n go(-1);\n }\n function goForward() {\n go(1);\n }\n var listenerCount = 0;\n function checkDOMListeners(delta) {\n listenerCount += delta;\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n var isBlocked = false;\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n var unblock = transitionManager.setPrompt(prompt);\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n return unblock();\n };\n }\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n var transitionManager = createTransitionManager();\n function setState(nextState) {\n _extends(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n var forceNextPop = false;\n var ignorePath = null;\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n return href + '#' + encodePath(basename + createPath(location));\n }\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n function goBack() {\n go(-1);\n }\n function goForward() {\n go(1);\n }\n var listenerCount = 0;\n function checkDOMListeners(delta) {\n listenerCount += delta;\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n var isBlocked = false;\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n var unblock = transitionManager.setPrompt(prompt);\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n return unblock();\n };\n }\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n function setState(nextState) {\n _extends(history, nextState);\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n function goBack() {\n go(-1);\n }\n function goForward() {\n go(1);\n }\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n return transitionManager.setPrompt(prompt);\n }\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\nexport default memoize;","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}","import React from 'react';\nexport default /*#__PURE__*/React.createContext(null);","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _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, toPropertyKey(descriptor.key), descriptor);\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}","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\nexport { invariant as default };","import React, { Fragment, useState } from \"react\";\nimport { Markup } from \"interweave\";\nimport $ from \"jquery\";\nconst COLORS = [\n \"#009CAB\",\n \"#21C48F\",\n \"#787F13\",\n \"#C57241\",\n \"#B54456\",\n \"#46769D\",\n \"#B0437C\",\n \"#8bbf8c\",\n \"#99a2dc\",\n \"#ffa490\",\n \"#6e22b4\",\n \"f07aa4\",\n \"#87e5c2\",\n];\n\nvar acfs;\nvar confirmInputs;\nvar pricing;\nvar currentGroupSize = 0;\nvar maxGroupSize = 0;\nvar eventId;\nvar currentEventInfo;\n\nexport const resetCurrentGroupSize = () => {\n currentGroupSize = 0;\n};\nconst NumInput = (props) => {\n const increment = (newValue) => {\n if (currentGroupSize > maxGroupSize && newValue > props.value) {\n currentGroupSize -= 1;\n alert(\n \"Please make sure your total person count is not more than \" +\n maxGroupSize +\n \" people.\"\n );\n } else {\n props.onIncrement(newValue < 0 ? 0 : newValue);\n }\n };\n var numInput = (\n
\n );\n return (\n
\n
{props.name}: \n
\n {\n if (currentGroupSize > 0 && props.value > 0) {\n currentGroupSize = currentGroupSize - 1;\n increment(props.value - 1);\n }\n }}\n />\n {numInput}\n {\n currentGroupSize = currentGroupSize + 1;\n increment(props.value + 1);\n }}\n />\n
\n
\n );\n};\n\nexport const PeopleInputs = (props) => {\n console.log(props);\n var numInputs = Object.keys(props.peopleLimits)\n .filter((p) => p != \"total\")\n .map((p, i) => {\n return (\n
{\n console.log(currentGroupSize);\n props.callback({ id: p, qty: qty });\n }}\n />\n );\n });\n\n numInputs.push(\n \n Max Group Size: {props.peopleLimits[\"total\"].max}\n \n );\n\n return {numInputs}
;\n};\n\nconst onProductSelect = (activity, callback) => {\n $.ajax({\n type: \"GET\",\n url: \"/activity\",\n data: { productId: activity.id },\n success: function (result) {\n console.log(result);\n if (result.errorId) {\n alert(result.message);\n }\n loadProductInfo(result);\n callback(result);\n },\n error: function (xhr, status, error) {\n console.log(error);\n },\n });\n};\n\nconst getEventOptions = (options) => {\n console.log(options);\n return options.map((option) => {\n if (option.enabled && option.shownToCustomers)\n return (\n \"\" +\n option.name +\n '
'\n );\n });\n};\n\nconst loadProductInfo = (eventInfo) => {\n $(\"#booking-form-header\").text(eventInfo.name);\n $(\"#booking-form-event-description\").html(\n eventInfo.description.replace(/(<([^>]+)>)/gi, \"\")\n );\n $(\"#booking-form-options\").html(\n eventInfo.options != null ? getEventOptions(eventInfo.options) : \"\"\n );\n\n pricing = {};\n for (var property in eventInfo.people_limits) {\n var data = eventInfo.people_limits[property];\n if (property != \"total\") {\n if (data.price) {\n var price = data.price.amount;\n pricing[property] = \"$\" + price;\n } else {\n console.log(\"Free\");\n pricing[property] = \"$0\";\n }\n } else {\n maxGroupSize = data.max;\n var maxGroupSpan = document.createElement(\"SPAN\");\n maxGroupSpan.innerHTML = \"Max Group Size: \" + data.max;\n maxGroupSpan.setAttribute(\"class\", \"max-group-size\");\n }\n }\n console.log(currentEventInfo);\n console.log(pricing);\n};\n\nconst loadCalendar = (productId, date, peopleNumbers, callback) => {\n console.log(date);\n $.ajax({\n type: \"GET\",\n url: \"/booking_calendar\",\n data: { date: date, productId: productId, peopleNumbers: peopleNumbers },\n success: function (result) {\n console.log(result);\n if (result.errorId) {\n alert(result.message);\n }\n callback(result);\n },\n error: function (xhr, status, error) {\n console.log(error);\n },\n });\n};\n\nexport const searchAvailableSlots = (productInfo, people, date, callback) => {\n console.log(productInfo);\n console.log(people);\n console.log(date);\n\n if (currentGroupSize == 0) {\n alert(\"Please add at least 1 attendee!\");\n return;\n }\n\n var peopleNumbers = Object.keys(people).map((pid) => {\n return { peopleCategoryId: pid, number: people[pid] };\n });\n\n loadCalendar(productInfo.id, date, peopleNumbers, callback);\n};\n\nexport const getCurrentCosts = (productInfo, people) => {\n var currentCosts = Object.keys(people).map((pid) => {\n return {\n label: productInfo.people_limits[pid].name + \" Total\",\n price: productInfo.people_limits[pid].price ? productInfo.people_limits[pid].price.amount * people[pid] : 0,\n };\n });\n\n currentCosts.push({\n label: \"Group Total\",\n price: currentCosts.reduce((a, b) => +a + +b.price, 0),\n extra: \"(Group Rates Applied at Checkout)\",\n });\n console.log(currentCosts);\n return currentCosts;\n};\n\nexport const getTotalCosts = (productInfo, people) => {\n let total = 0.0;\n Object.keys(people).map((pid) => {\n total += productInfo.people_limits[pid].price ? productInfo.people_limits[pid].price.amount * people[pid] : 0.0;\n });\n\n return total;\n};\n\nexport const book = (productInfo, eventId, people, customer, onError) => {\n var peopleNumbers = Object.keys(people).map((pid) => {\n return { peopleCategoryId: pid, number: people[pid] };\n });\n\n var priceBook = {};\n for (var id in pricing) {\n priceBook[id.replace(\"activity_\", \"\")] = pricing[id];\n }\n\n var options = [];\n\n if (productInfo.options) {\n options = productInfo.options.map((option) => {\n return { id: option.id, value: $(\"#\" + option.id).val() };\n });\n }\n\n console.log(options);\n\n var params = {\n productName: productInfo.name,\n productId: productInfo.id,\n eventId: eventId,\n peopleNumbers: peopleNumbers,\n priceBook: priceBook,\n customer: customer,\n options: options,\n };\n\n console.log(params);\n $.post(\"/book\", params, function (data, status) {\n console.log(data);\n if (data.errorId) {\n if (onError != null){\n onError(data.message);\n } else {\n alert(data.message);\n }\n } else {\n window.location.replace(data.checkout.checkout_page_url);\n }\n });\n};\n\nexport const getActivities = (activities, currentProduct, callback) => {\n var colorCount = -1;\n return activities.map((a) => {\n colorCount += 1;\n return (\n \n onProductSelect(a, callback)}\n style={{ \"--color\": COLORS[colorCount] }}\n >\n
\n {a.name}\n
\n
\n \n \n
\n \n );\n });\n};\n\nexport const bookingAPICall = (type, endpoint, params, callback) => {\n fetch(endpoint, {\n method: type, // *GET, POST, PUT, DELETE, etc.\n headers: {\n \"Content-Type\": \"application/json\",\n },\n redirect: \"follow\", // manual, *follow, error\n referrerPolicy: \"no-referrer\", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url\n body: type != \"GET\" ? JSON.stringify(params) : null,\n })\n .then((response) => response.json())\n .then((data) => callback(data));\n};\n\nexport const PeopleTotalCosts = (props) => {\n return (\n \n {getCurrentCosts(props.productInfo, props.people).map((cost) => {\n return (\n \n {cost.label + \": \"} \n {\"$\" + cost.price} \n {cost.extra != null ? \" \" + cost.extra : \"\"} \n
\n );\n })}\n \n );\n};\n\nexport const Calendar = (props) => {\n if (props.calendar) {\n return (\n \n
\n {props.calendar.title.content}\n
\n
\n
\n {props.calendar.rows.weekdays.map((weekday) => {\n return
{weekday} ;\n })}\n \n {props.calendar.rows.day_rows.map((day_row) => {\n return (\n
\n {day_row.map((day_item) => {\n return (\n
\n
{day_item.day}
\n
{day_item.long_date}
\n
\n {day_item.available_slots.map((slot) => {\n return (\n
props.onSlotClicked(slot.id)}\n >\n {slot.label}\n
\n );\n })}\n
\n
\n );\n })}\n
\n );\n })}\n
\n
\n );\n } else {\n return
;\n }\n};\n\nexport const SelecOptions = () => {\n var year = new Date().getFullYear();\n var years = [year, year + 1, year + 2];\n return years.map((y) => {\n return {y} ;\n });\n};\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\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 return self;\n}","/*!\n * jQuery JavaScript Library v3.6.3\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2022-12-20T21:28Z\n */\n(function (global, factory) {\n \"use strict\";\n\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n // For CommonJS and CommonJS-like environments where a proper `window`\n // is present, execute the factory and get jQuery.\n // For environments that do not have a `window` with a `document`\n // (such as Node.js), expose a factory as module.exports.\n // This accentuates the need for the creation of a real `window`.\n // e.g. var jQuery = require(\"jquery\")(window);\n // See ticket trac-14549 for more info.\n module.exports = global.document ? factory(global, true) : function (w) {\n if (!w.document) {\n throw new Error(\"jQuery requires a window with a document\");\n }\n return factory(w);\n };\n } else {\n factory(global);\n }\n\n // Pass this if window is not defined yet\n})(typeof window !== \"undefined\" ? window : this, function (window, noGlobal) {\n // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n // enough that all such attempts are guarded in a try block.\n \"use strict\";\n\n var arr = [];\n var getProto = Object.getPrototypeOf;\n var slice = arr.slice;\n var flat = arr.flat ? function (array) {\n return arr.flat.call(array);\n } : function (array) {\n return arr.concat.apply([], array);\n };\n var push = arr.push;\n var indexOf = arr.indexOf;\n var class2type = {};\n var toString = class2type.toString;\n var hasOwn = class2type.hasOwnProperty;\n var fnToString = hasOwn.toString;\n var ObjectFunctionString = fnToString.call(Object);\n var support = {};\n var isFunction = function isFunction(obj) {\n // Support: Chrome <=57, Firefox <=52\n // In some browsers, typeof returns \"function\" for HTML elements\n // (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n // We don't want to classify *any* DOM node as a function.\n // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n // Plus for old WebKit, typeof returns \"function\" for HTML collections\n // (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n return typeof obj === \"function\" && typeof obj.nodeType !== \"number\" && typeof obj.item !== \"function\";\n };\n var isWindow = function isWindow(obj) {\n return obj != null && obj === obj.window;\n };\n var document = window.document;\n var preservedScriptAttributes = {\n type: true,\n src: true,\n nonce: true,\n noModule: true\n };\n function DOMEval(code, node, doc) {\n doc = doc || document;\n var i,\n val,\n script = doc.createElement(\"script\");\n script.text = code;\n if (node) {\n for (i in preservedScriptAttributes) {\n // Support: Firefox 64+, Edge 18+\n // Some browsers don't support the \"nonce\" property on scripts.\n // On the other hand, just using `getAttribute` is not enough as\n // the `nonce` attribute is reset to an empty string whenever it\n // becomes browsing-context connected.\n // See https://github.com/whatwg/html/issues/2369\n // See https://html.spec.whatwg.org/#nonce-attributes\n // The `node.getAttribute` check was added for the sake of\n // `jQuery.globalEval` so that it can fake a nonce-containing node\n // via an object.\n val = node[i] || node.getAttribute && node.getAttribute(i);\n if (val) {\n script.setAttribute(i, val);\n }\n }\n }\n doc.head.appendChild(script).parentNode.removeChild(script);\n }\n function toType(obj) {\n if (obj == null) {\n return obj + \"\";\n }\n\n // Support: Android <=2.3 only (functionish RegExp)\n return typeof obj === \"object\" || typeof obj === \"function\" ? class2type[toString.call(obj)] || \"object\" : typeof obj;\n }\n /* global Symbol */\n // Defining this global in .eslintrc.json would create a danger of using the global\n // unguarded in another place, it seems safer to define global only for this module\n\n var version = \"3.6.3\",\n // Define a local copy of jQuery\n jQuery = function (selector, context) {\n // The jQuery object is actually just the init constructor 'enhanced'\n // Need init if jQuery is called (just allow error to be thrown if not included)\n return new jQuery.fn.init(selector, context);\n };\n jQuery.fn = jQuery.prototype = {\n // The current version of jQuery being used\n jquery: version,\n constructor: jQuery,\n // The default length of a jQuery object is 0\n length: 0,\n toArray: function () {\n return slice.call(this);\n },\n // Get the Nth element in the matched element set OR\n // Get the whole matched element set as a clean array\n get: function (num) {\n // Return all the elements in a clean array\n if (num == null) {\n return slice.call(this);\n }\n\n // Return just the one element from the set\n return num < 0 ? this[num + this.length] : this[num];\n },\n // Take an array of elements and push it onto the stack\n // (returning the new matched element set)\n pushStack: function (elems) {\n // Build a new jQuery matched element set\n var ret = jQuery.merge(this.constructor(), elems);\n\n // Add the old object onto the stack (as a reference)\n ret.prevObject = this;\n\n // Return the newly-formed element set\n return ret;\n },\n // Execute a callback for every element in the matched set.\n each: function (callback) {\n return jQuery.each(this, callback);\n },\n map: function (callback) {\n return this.pushStack(jQuery.map(this, function (elem, i) {\n return callback.call(elem, i, elem);\n }));\n },\n slice: function () {\n return this.pushStack(slice.apply(this, arguments));\n },\n first: function () {\n return this.eq(0);\n },\n last: function () {\n return this.eq(-1);\n },\n even: function () {\n return this.pushStack(jQuery.grep(this, function (_elem, i) {\n return (i + 1) % 2;\n }));\n },\n odd: function () {\n return this.pushStack(jQuery.grep(this, function (_elem, i) {\n return i % 2;\n }));\n },\n eq: function (i) {\n var len = this.length,\n j = +i + (i < 0 ? len : 0);\n return this.pushStack(j >= 0 && j < len ? [this[j]] : []);\n },\n end: function () {\n return this.prevObject || this.constructor();\n },\n // For internal use only.\n // Behaves like an Array's method, not like a jQuery method.\n push: push,\n sort: arr.sort,\n splice: arr.splice\n };\n jQuery.extend = jQuery.fn.extend = function () {\n var options,\n name,\n src,\n copy,\n copyIsArray,\n clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false;\n\n // Handle a deep copy situation\n if (typeof target === \"boolean\") {\n deep = target;\n\n // Skip the boolean and the target\n target = arguments[i] || {};\n i++;\n }\n\n // Handle case when target is a string or something (possible in deep copy)\n if (typeof target !== \"object\" && !isFunction(target)) {\n target = {};\n }\n\n // Extend jQuery itself if only one argument is passed\n if (i === length) {\n target = this;\n i--;\n }\n for (; i < length; i++) {\n // Only deal with non-null/undefined values\n if ((options = arguments[i]) != null) {\n // Extend the base object\n for (name in options) {\n copy = options[name];\n\n // Prevent Object.prototype pollution\n // Prevent never-ending loop\n if (name === \"__proto__\" || target === copy) {\n continue;\n }\n\n // Recurse if we're merging plain objects or arrays\n if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {\n src = target[name];\n\n // Ensure proper type for the source value\n if (copyIsArray && !Array.isArray(src)) {\n clone = [];\n } else if (!copyIsArray && !jQuery.isPlainObject(src)) {\n clone = {};\n } else {\n clone = src;\n }\n copyIsArray = false;\n\n // Never move original objects, clone them\n target[name] = jQuery.extend(deep, clone, copy);\n\n // Don't bring in undefined values\n } else if (copy !== undefined) {\n target[name] = copy;\n }\n }\n }\n }\n\n // Return the modified object\n return target;\n };\n jQuery.extend({\n // Unique for each copy of jQuery on the page\n expando: \"jQuery\" + (version + Math.random()).replace(/\\D/g, \"\"),\n // Assume jQuery is ready without the ready module\n isReady: true,\n error: function (msg) {\n throw new Error(msg);\n },\n noop: function () {},\n isPlainObject: function (obj) {\n var proto, Ctor;\n\n // Detect obvious negatives\n // Use toString instead of jQuery.type to catch host objects\n if (!obj || toString.call(obj) !== \"[object Object]\") {\n return false;\n }\n proto = getProto(obj);\n\n // Objects with no prototype (e.g., `Object.create( null )`) are plain\n if (!proto) {\n return true;\n }\n\n // Objects with prototype are plain iff they were constructed by a global Object function\n Ctor = hasOwn.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && fnToString.call(Ctor) === ObjectFunctionString;\n },\n isEmptyObject: function (obj) {\n var name;\n for (name in obj) {\n return false;\n }\n return true;\n },\n // Evaluates a script in a provided context; falls back to the global one\n // if not specified.\n globalEval: function (code, options, doc) {\n DOMEval(code, {\n nonce: options && options.nonce\n }, doc);\n },\n each: function (obj, callback) {\n var length,\n i = 0;\n if (isArrayLike(obj)) {\n length = obj.length;\n for (; i < length; i++) {\n if (callback.call(obj[i], i, obj[i]) === false) {\n break;\n }\n }\n } else {\n for (i in obj) {\n if (callback.call(obj[i], i, obj[i]) === false) {\n break;\n }\n }\n }\n return obj;\n },\n // results is for internal usage only\n makeArray: function (arr, results) {\n var ret = results || [];\n if (arr != null) {\n if (isArrayLike(Object(arr))) {\n jQuery.merge(ret, typeof arr === \"string\" ? [arr] : arr);\n } else {\n push.call(ret, arr);\n }\n }\n return ret;\n },\n inArray: function (elem, arr, i) {\n return arr == null ? -1 : indexOf.call(arr, elem, i);\n },\n // Support: Android <=4.0 only, PhantomJS 1 only\n // push.apply(_, arraylike) throws on ancient WebKit\n merge: function (first, second) {\n var len = +second.length,\n j = 0,\n i = first.length;\n for (; j < len; j++) {\n first[i++] = second[j];\n }\n first.length = i;\n return first;\n },\n grep: function (elems, callback, invert) {\n var callbackInverse,\n matches = [],\n i = 0,\n length = elems.length,\n callbackExpect = !invert;\n\n // Go through the array, only saving the items\n // that pass the validator function\n for (; i < length; i++) {\n callbackInverse = !callback(elems[i], i);\n if (callbackInverse !== callbackExpect) {\n matches.push(elems[i]);\n }\n }\n return matches;\n },\n // arg is for internal usage only\n map: function (elems, callback, arg) {\n var length,\n value,\n i = 0,\n ret = [];\n\n // Go through the array, translating each of the items to their new values\n if (isArrayLike(elems)) {\n length = elems.length;\n for (; i < length; i++) {\n value = callback(elems[i], i, arg);\n if (value != null) {\n ret.push(value);\n }\n }\n\n // Go through every key on the object,\n } else {\n for (i in elems) {\n value = callback(elems[i], i, arg);\n if (value != null) {\n ret.push(value);\n }\n }\n }\n\n // Flatten any nested arrays\n return flat(ret);\n },\n // A global GUID counter for objects\n guid: 1,\n // jQuery.support is not used in Core but other projects attach their\n // properties to it so it needs to exist.\n support: support\n });\n if (typeof Symbol === \"function\") {\n jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];\n }\n\n // Populate the class2type map\n jQuery.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"), function (_i, name) {\n class2type[\"[object \" + name + \"]\"] = name.toLowerCase();\n });\n function isArrayLike(obj) {\n // Support: real iOS 8.2 only (not reproducible in simulator)\n // `in` check used to prevent JIT error (gh-2145)\n // hasOwn isn't used here due to false negatives\n // regarding Nodelist length in IE\n var length = !!obj && \"length\" in obj && obj.length,\n type = toType(obj);\n if (isFunction(obj) || isWindow(obj)) {\n return false;\n }\n return type === \"array\" || length === 0 || typeof length === \"number\" && length > 0 && length - 1 in obj;\n }\n var Sizzle =\n /*!\n * Sizzle CSS Selector Engine v2.3.9\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2022-12-19\n */\n function (window) {\n var i,\n support,\n Expr,\n getText,\n isXML,\n tokenize,\n compile,\n select,\n outermostContext,\n sortInput,\n hasDuplicate,\n // Local document vars\n setDocument,\n document,\n docElem,\n documentIsHTML,\n rbuggyQSA,\n rbuggyMatches,\n matches,\n contains,\n // Instance-specific data\n expando = \"sizzle\" + 1 * new Date(),\n preferredDoc = window.document,\n dirruns = 0,\n done = 0,\n classCache = createCache(),\n tokenCache = createCache(),\n compilerCache = createCache(),\n nonnativeSelectorCache = createCache(),\n sortOrder = function (a, b) {\n if (a === b) {\n hasDuplicate = true;\n }\n return 0;\n },\n // Instance methods\n hasOwn = {}.hasOwnProperty,\n arr = [],\n pop = arr.pop,\n pushNative = arr.push,\n push = arr.push,\n slice = arr.slice,\n // Use a stripped-down indexOf as it's faster than native\n // https://jsperf.com/thor-indexof-vs-for/5\n indexOf = function (list, elem) {\n var i = 0,\n len = list.length;\n for (; i < len; i++) {\n if (list[i] === elem) {\n return i;\n }\n }\n return -1;\n },\n booleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" + \"ismap|loop|multiple|open|readonly|required|scoped\",\n // Regular expressions\n\n // http://www.w3.org/TR/css3-selectors/#whitespace\n whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n identifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n attributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n // Operator (capture 2)\n \"*([*^$|!~]?=)\" + whitespace +\n // \"Attribute values must be CSS identifiers [capture 5]\n // or strings [capture 3 or capture 4]\"\n \"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace + \"*\\\\]\",\n pseudos = \":(\" + identifier + \")(?:\\\\((\" +\n // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n // 1. quoted (capture 3; capture 4 or capture 5)\n \"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n // 2. simple (capture 6)\n \"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n // 3. anything else (capture 2)\n \".*\" + \")\\\\)|)\",\n // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n rwhitespace = new RegExp(whitespace + \"+\", \"g\"),\n rtrim = new RegExp(\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\"),\n rcomma = new RegExp(\"^\" + whitespace + \"*,\" + whitespace + \"*\"),\n rcombinators = new RegExp(\"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\"),\n rdescend = new RegExp(whitespace + \"|>\"),\n rpseudo = new RegExp(pseudos),\n ridentifier = new RegExp(\"^\" + identifier + \"$\"),\n matchExpr = {\n \"ID\": new RegExp(\"^#(\" + identifier + \")\"),\n \"CLASS\": new RegExp(\"^\\\\.(\" + identifier + \")\"),\n \"TAG\": new RegExp(\"^(\" + identifier + \"|[*])\"),\n \"ATTR\": new RegExp(\"^\" + attributes),\n \"PSEUDO\": new RegExp(\"^\" + pseudos),\n \"CHILD\": new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\"),\n \"bool\": new RegExp(\"^(?:\" + booleans + \")$\", \"i\"),\n // For use in libraries implementing .is()\n // We use this for POS matching in `select`\n \"needsContext\": new RegExp(\"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\")\n },\n rhtml = /HTML$/i,\n rinputs = /^(?:input|select|textarea|button)$/i,\n rheader = /^h\\d$/i,\n rnative = /^[^{]+\\{\\s*\\[native \\w/,\n // Easily-parseable/retrievable ID or TAG or CLASS selectors\n rquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n rsibling = /[+~]/,\n // CSS escapes\n // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n runescape = new RegExp(\"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\"),\n funescape = function (escape, nonHex) {\n var high = \"0x\" + escape.slice(1) - 0x10000;\n return nonHex ?\n // Strip the backslash prefix from a non-hex escape sequence\n nonHex :\n // Replace a hexadecimal escape sequence with the encoded Unicode code point\n // Support: IE <=11+\n // For values outside the Basic Multilingual Plane (BMP), manually construct a\n // surrogate pair\n high < 0 ? String.fromCharCode(high + 0x10000) : String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);\n },\n // CSS string/identifier serialization\n // https://drafts.csswg.org/cssom/#common-serializing-idioms\n rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n fcssescape = function (ch, asCodePoint) {\n if (asCodePoint) {\n // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n if (ch === \"\\0\") {\n return \"\\uFFFD\";\n }\n\n // Control characters and (dependent upon position) numbers get escaped as code points\n return ch.slice(0, -1) + \"\\\\\" + ch.charCodeAt(ch.length - 1).toString(16) + \" \";\n }\n\n // Other potentially-special ASCII characters get backslash-escaped\n return \"\\\\\" + ch;\n },\n // Used for iframes\n // See setDocument()\n // Removing the function wrapper causes a \"Permission Denied\"\n // error in IE\n unloadHandler = function () {\n setDocument();\n },\n inDisabledFieldset = addCombinator(function (elem) {\n return elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n }, {\n dir: \"parentNode\",\n next: \"legend\"\n });\n\n // Optimize for push.apply( _, NodeList )\n try {\n push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes);\n\n // Support: Android<4.0\n // Detect silently failing push.apply\n // eslint-disable-next-line no-unused-expressions\n arr[preferredDoc.childNodes.length].nodeType;\n } catch (e) {\n push = {\n apply: arr.length ?\n // Leverage slice if possible\n function (target, els) {\n pushNative.apply(target, slice.call(els));\n } :\n // Support: IE<9\n // Otherwise append directly\n function (target, els) {\n var j = target.length,\n i = 0;\n\n // Can't trust NodeList.length\n while (target[j++] = els[i++]) {}\n target.length = j - 1;\n }\n };\n }\n function Sizzle(selector, context, results, seed) {\n var m,\n i,\n elem,\n nid,\n match,\n groups,\n newSelector,\n newContext = context && context.ownerDocument,\n // nodeType defaults to 9, since context defaults to document\n nodeType = context ? context.nodeType : 9;\n results = results || [];\n\n // Return early from calls with invalid selector or context\n if (typeof selector !== \"string\" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {\n return results;\n }\n\n // Try to shortcut find operations (as opposed to filters) in HTML documents\n if (!seed) {\n setDocument(context);\n context = context || document;\n if (documentIsHTML) {\n // If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n // (excepting DocumentFragment context, where the methods don't exist)\n if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {\n // ID selector\n if (m = match[1]) {\n // Document context\n if (nodeType === 9) {\n if (elem = context.getElementById(m)) {\n // Support: IE, Opera, Webkit\n // TODO: identify versions\n // getElementById can match elements by name instead of ID\n if (elem.id === m) {\n results.push(elem);\n return results;\n }\n } else {\n return results;\n }\n\n // Element context\n } else {\n // Support: IE, Opera, Webkit\n // TODO: identify versions\n // getElementById can match elements by name instead of ID\n if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) {\n results.push(elem);\n return results;\n }\n }\n\n // Type selector\n } else if (match[2]) {\n push.apply(results, context.getElementsByTagName(selector));\n return results;\n\n // Class selector\n } else if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) {\n push.apply(results, context.getElementsByClassName(m));\n return results;\n }\n }\n\n // Take advantage of querySelectorAll\n if (support.qsa && !nonnativeSelectorCache[selector + \" \"] && (!rbuggyQSA || !rbuggyQSA.test(selector)) && (\n // Support: IE 8 only\n // Exclude object elements\n nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\")) {\n newSelector = selector;\n newContext = context;\n\n // qSA considers elements outside a scoping root when evaluating child or\n // descendant combinators, which is not what we want.\n // In such cases, we work around the behavior by prefixing every selector in the\n // list with an ID selector referencing the scope context.\n // The technique has to be used as well when a leading combinator is used\n // as such selectors are not recognized by querySelectorAll.\n // Thanks to Andrew Dupont for this technique.\n if (nodeType === 1 && (rdescend.test(selector) || rcombinators.test(selector))) {\n // Expand context for sibling selectors\n newContext = rsibling.test(selector) && testContext(context.parentNode) || context;\n\n // We can use :scope instead of the ID hack if the browser\n // supports it & if we're not changing the context.\n if (newContext !== context || !support.scope) {\n // Capture the context ID, setting it first if necessary\n if (nid = context.getAttribute(\"id\")) {\n nid = nid.replace(rcssescape, fcssescape);\n } else {\n context.setAttribute(\"id\", nid = expando);\n }\n }\n\n // Prefix every selector in the list\n groups = tokenize(selector);\n i = groups.length;\n while (i--) {\n groups[i] = (nid ? \"#\" + nid : \":scope\") + \" \" + toSelector(groups[i]);\n }\n newSelector = groups.join(\",\");\n }\n try {\n // `qSA` may not throw for unrecognized parts using forgiving parsing:\n // https://drafts.csswg.org/selectors/#forgiving-selector\n // like the `:has()` pseudo-class:\n // https://drafts.csswg.org/selectors/#relational\n // `CSS.supports` is still expected to return `false` then:\n // https://drafts.csswg.org/css-conditional-4/#typedef-supports-selector-fn\n // https://drafts.csswg.org/css-conditional-4/#dfn-support-selector\n if (support.cssSupportsSelector &&\n // eslint-disable-next-line no-undef\n !CSS.supports(\"selector(:is(\" + newSelector + \"))\")) {\n // Support: IE 11+\n // Throw to get to the same code path as an error directly in qSA.\n // Note: once we only support browser supporting\n // `CSS.supports('selector(...)')`, we can most likely drop\n // the `try-catch`. IE doesn't implement the API.\n throw new Error();\n }\n push.apply(results, newContext.querySelectorAll(newSelector));\n return results;\n } catch (qsaError) {\n nonnativeSelectorCache(selector, true);\n } finally {\n if (nid === expando) {\n context.removeAttribute(\"id\");\n }\n }\n }\n }\n }\n\n // All others\n return select(selector.replace(rtrim, \"$1\"), context, results, seed);\n }\n\n /**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\n function createCache() {\n var keys = [];\n function cache(key, value) {\n // Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n if (keys.push(key + \" \") > Expr.cacheLength) {\n // Only keep the most recent entries\n delete cache[keys.shift()];\n }\n return cache[key + \" \"] = value;\n }\n return cache;\n }\n\n /**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\n function markFunction(fn) {\n fn[expando] = true;\n return fn;\n }\n\n /**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\n function assert(fn) {\n var el = document.createElement(\"fieldset\");\n try {\n return !!fn(el);\n } catch (e) {\n return false;\n } finally {\n // Remove from its parent by default\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n\n // release memory in IE\n el = null;\n }\n }\n\n /**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\n function addHandle(attrs, handler) {\n var arr = attrs.split(\"|\"),\n i = arr.length;\n while (i--) {\n Expr.attrHandle[arr[i]] = handler;\n }\n }\n\n /**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\n function siblingCheck(a, b) {\n var cur = b && a,\n diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex;\n\n // Use IE sourceIndex if available on both nodes\n if (diff) {\n return diff;\n }\n\n // Check if b follows a\n if (cur) {\n while (cur = cur.nextSibling) {\n if (cur === b) {\n return -1;\n }\n }\n }\n return a ? 1 : -1;\n }\n\n /**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\n function createInputPseudo(type) {\n return function (elem) {\n var name = elem.nodeName.toLowerCase();\n return name === \"input\" && elem.type === type;\n };\n }\n\n /**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\n function createButtonPseudo(type) {\n return function (elem) {\n var name = elem.nodeName.toLowerCase();\n return (name === \"input\" || name === \"button\") && elem.type === type;\n };\n }\n\n /**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\n function createDisabledPseudo(disabled) {\n // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n return function (elem) {\n // Only certain elements can match :enabled or :disabled\n // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n if (\"form\" in elem) {\n // Check for inherited disabledness on relevant non-disabled elements:\n // * listed form-associated elements in a disabled fieldset\n // https://html.spec.whatwg.org/multipage/forms.html#category-listed\n // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n // * option elements in a disabled optgroup\n // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n // All such elements have a \"form\" property.\n if (elem.parentNode && elem.disabled === false) {\n // Option elements defer to a parent optgroup if present\n if (\"label\" in elem) {\n if (\"label\" in elem.parentNode) {\n return elem.parentNode.disabled === disabled;\n } else {\n return elem.disabled === disabled;\n }\n }\n\n // Support: IE 6 - 11\n // Use the isDisabled shortcut property to check for disabled fieldset ancestors\n return elem.isDisabled === disabled ||\n // Where there is no isDisabled, check manually\n /* jshint -W018 */\n elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;\n }\n return elem.disabled === disabled;\n\n // Try to winnow out elements that can't be disabled before trusting the disabled property.\n // Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n // even exist on them, let alone have a boolean value.\n } else if (\"label\" in elem) {\n return elem.disabled === disabled;\n }\n\n // Remaining elements are neither :enabled nor :disabled\n return false;\n };\n }\n\n /**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\n function createPositionalPseudo(fn) {\n return markFunction(function (argument) {\n argument = +argument;\n return markFunction(function (seed, matches) {\n var j,\n matchIndexes = fn([], seed.length, argument),\n i = matchIndexes.length;\n\n // Match elements found at the specified indexes\n while (i--) {\n if (seed[j = matchIndexes[i]]) {\n seed[j] = !(matches[j] = seed[j]);\n }\n }\n });\n });\n }\n\n /**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\n function testContext(context) {\n return context && typeof context.getElementsByTagName !== \"undefined\" && context;\n }\n\n // Expose support vars for convenience\n support = Sizzle.support = {};\n\n /**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\n isXML = Sizzle.isXML = function (elem) {\n var namespace = elem && elem.namespaceURI,\n docElem = elem && (elem.ownerDocument || elem).documentElement;\n\n // Support: IE <=8\n // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n // https://bugs.jquery.com/ticket/4833\n return !rhtml.test(namespace || docElem && docElem.nodeName || \"HTML\");\n };\n\n /**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\n setDocument = Sizzle.setDocument = function (node) {\n var hasCompare,\n subWindow,\n doc = node ? node.ownerDocument || node : preferredDoc;\n\n // Return early if doc is invalid or already selected\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if (doc == document || doc.nodeType !== 9 || !doc.documentElement) {\n return document;\n }\n\n // Update global variables\n document = doc;\n docElem = document.documentElement;\n documentIsHTML = !isXML(document);\n\n // Support: IE 9 - 11+, Edge 12 - 18+\n // Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if (preferredDoc != document && (subWindow = document.defaultView) && subWindow.top !== subWindow) {\n // Support: IE 11, Edge\n if (subWindow.addEventListener) {\n subWindow.addEventListener(\"unload\", unloadHandler, false);\n\n // Support: IE 9 - 10 only\n } else if (subWindow.attachEvent) {\n subWindow.attachEvent(\"onunload\", unloadHandler);\n }\n }\n\n // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n // Safari 4 - 5 only, Opera <=11.6 - 12.x only\n // IE/Edge & older browsers don't support the :scope pseudo-class.\n // Support: Safari 6.0 only\n // Safari 6.0 supports :scope but it's an alias of :root there.\n support.scope = assert(function (el) {\n docElem.appendChild(el).appendChild(document.createElement(\"div\"));\n return typeof el.querySelectorAll !== \"undefined\" && !el.querySelectorAll(\":scope fieldset div\").length;\n });\n\n // Support: Chrome 105+, Firefox 104+, Safari 15.4+\n // Make sure forgiving mode is not used in `CSS.supports( \"selector(...)\" )`.\n //\n // `:is()` uses a forgiving selector list as an argument and is widely\n // implemented, so it's a good one to test against.\n support.cssSupportsSelector = assert(function () {\n /* eslint-disable no-undef */\n\n return CSS.supports(\"selector(*)\") &&\n // Support: Firefox 78-81 only\n // In old Firefox, `:is()` didn't use forgiving parsing. In that case,\n // fail this test as there's no selector to test against that.\n // `CSS.supports` uses unforgiving parsing\n document.querySelectorAll(\":is(:jqfake)\") &&\n // `*` is needed as Safari & newer Chrome implemented something in between\n // for `:has()` - it throws in `qSA` if it only contains an unsupported\n // argument but multiple ones, one of which is supported, are fine.\n // We want to play safe in case `:is()` gets the same treatment.\n !CSS.supports(\"selector(:is(*,:jqfake))\");\n\n /* eslint-enable */\n });\n\n /* Attributes\n ---------------------------------------------------------------------- */\n\n // Support: IE<8\n // Verify that getAttribute really returns attributes and not properties\n // (excepting IE8 booleans)\n support.attributes = assert(function (el) {\n el.className = \"i\";\n return !el.getAttribute(\"className\");\n });\n\n /* getElement(s)By*\n ---------------------------------------------------------------------- */\n\n // Check if getElementsByTagName(\"*\") returns only elements\n support.getElementsByTagName = assert(function (el) {\n el.appendChild(document.createComment(\"\"));\n return !el.getElementsByTagName(\"*\").length;\n });\n\n // Support: IE<9\n support.getElementsByClassName = rnative.test(document.getElementsByClassName);\n\n // Support: IE<10\n // Check if getElementById returns elements by name\n // The broken getElementById methods don't pick up programmatically-set names,\n // so use a roundabout getElementsByName test\n support.getById = assert(function (el) {\n docElem.appendChild(el).id = expando;\n return !document.getElementsByName || !document.getElementsByName(expando).length;\n });\n\n // ID filter and find\n if (support.getById) {\n Expr.filter[\"ID\"] = function (id) {\n var attrId = id.replace(runescape, funescape);\n return function (elem) {\n return elem.getAttribute(\"id\") === attrId;\n };\n };\n Expr.find[\"ID\"] = function (id, context) {\n if (typeof context.getElementById !== \"undefined\" && documentIsHTML) {\n var elem = context.getElementById(id);\n return elem ? [elem] : [];\n }\n };\n } else {\n Expr.filter[\"ID\"] = function (id) {\n var attrId = id.replace(runescape, funescape);\n return function (elem) {\n var node = typeof elem.getAttributeNode !== \"undefined\" && elem.getAttributeNode(\"id\");\n return node && node.value === attrId;\n };\n };\n\n // Support: IE 6 - 7 only\n // getElementById is not reliable as a find shortcut\n Expr.find[\"ID\"] = function (id, context) {\n if (typeof context.getElementById !== \"undefined\" && documentIsHTML) {\n var node,\n i,\n elems,\n elem = context.getElementById(id);\n if (elem) {\n // Verify the id attribute\n node = elem.getAttributeNode(\"id\");\n if (node && node.value === id) {\n return [elem];\n }\n\n // Fall back on getElementsByName\n elems = context.getElementsByName(id);\n i = 0;\n while (elem = elems[i++]) {\n node = elem.getAttributeNode(\"id\");\n if (node && node.value === id) {\n return [elem];\n }\n }\n }\n return [];\n }\n };\n }\n\n // Tag\n Expr.find[\"TAG\"] = support.getElementsByTagName ? function (tag, context) {\n if (typeof context.getElementsByTagName !== \"undefined\") {\n return context.getElementsByTagName(tag);\n\n // DocumentFragment nodes don't have gEBTN\n } else if (support.qsa) {\n return context.querySelectorAll(tag);\n }\n } : function (tag, context) {\n var elem,\n tmp = [],\n i = 0,\n // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n results = context.getElementsByTagName(tag);\n\n // Filter out possible comments\n if (tag === \"*\") {\n while (elem = results[i++]) {\n if (elem.nodeType === 1) {\n tmp.push(elem);\n }\n }\n return tmp;\n }\n return results;\n };\n\n // Class\n Expr.find[\"CLASS\"] = support.getElementsByClassName && function (className, context) {\n if (typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML) {\n return context.getElementsByClassName(className);\n }\n };\n\n /* QSA/matchesSelector\n ---------------------------------------------------------------------- */\n\n // QSA and matchesSelector support\n\n // matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n rbuggyMatches = [];\n\n // qSa(:focus) reports false when true (Chrome 21)\n // We allow this because of a bug in IE8/9 that throws an error\n // whenever `document.activeElement` is accessed on an iframe\n // So, we allow :focus to pass through QSA all the time to avoid the IE error\n // See https://bugs.jquery.com/ticket/13378\n rbuggyQSA = [];\n if (support.qsa = rnative.test(document.querySelectorAll)) {\n // Build QSA regex\n // Regex strategy adopted from Diego Perini\n assert(function (el) {\n var input;\n\n // Select is set to empty string on purpose\n // This is to test IE's treatment of not explicitly\n // setting a boolean content attribute,\n // since its presence should be enough\n // https://bugs.jquery.com/ticket/12359\n docElem.appendChild(el).innerHTML = \" \" + \"\" + \" \";\n\n // Support: IE8, Opera 11-12.16\n // Nothing should be selected when empty strings follow ^= or $= or *=\n // The test attribute must be unknown in Opera but \"safe\" for WinRT\n // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n if (el.querySelectorAll(\"[msallowcapture^='']\").length) {\n rbuggyQSA.push(\"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\");\n }\n\n // Support: IE8\n // Boolean attributes and \"value\" are not treated correctly\n if (!el.querySelectorAll(\"[selected]\").length) {\n rbuggyQSA.push(\"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\");\n }\n\n // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n if (!el.querySelectorAll(\"[id~=\" + expando + \"-]\").length) {\n rbuggyQSA.push(\"~=\");\n }\n\n // Support: IE 11+, Edge 15 - 18+\n // IE 11/Edge don't find elements on a `[name='']` query in some cases.\n // Adding a temporary attribute to the document before the selection works\n // around the issue.\n // Interestingly, IE 10 & older don't seem to have the issue.\n input = document.createElement(\"input\");\n input.setAttribute(\"name\", \"\");\n el.appendChild(input);\n if (!el.querySelectorAll(\"[name='']\").length) {\n rbuggyQSA.push(\"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" + whitespace + \"*(?:''|\\\"\\\")\");\n }\n\n // Webkit/Opera - :checked should return selected option elements\n // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n // IE8 throws error here and will not see later tests\n if (!el.querySelectorAll(\":checked\").length) {\n rbuggyQSA.push(\":checked\");\n }\n\n // Support: Safari 8+, iOS 8+\n // https://bugs.webkit.org/show_bug.cgi?id=136851\n // In-page `selector#id sibling-combinator selector` fails\n if (!el.querySelectorAll(\"a#\" + expando + \"+*\").length) {\n rbuggyQSA.push(\".#.+[+~]\");\n }\n\n // Support: Firefox <=3.6 - 5 only\n // Old Firefox doesn't throw on a badly-escaped identifier.\n el.querySelectorAll(\"\\\\\\f\");\n rbuggyQSA.push(\"[\\\\r\\\\n\\\\f]\");\n });\n assert(function (el) {\n el.innerHTML = \" \" + \" \";\n\n // Support: Windows 8 Native Apps\n // The type and name attributes are restricted during .innerHTML assignment\n var input = document.createElement(\"input\");\n input.setAttribute(\"type\", \"hidden\");\n el.appendChild(input).setAttribute(\"name\", \"D\");\n\n // Support: IE8\n // Enforce case-sensitivity of name attribute\n if (el.querySelectorAll(\"[name=d]\").length) {\n rbuggyQSA.push(\"name\" + whitespace + \"*[*^$|!~]?=\");\n }\n\n // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n // IE8 throws error here and will not see later tests\n if (el.querySelectorAll(\":enabled\").length !== 2) {\n rbuggyQSA.push(\":enabled\", \":disabled\");\n }\n\n // Support: IE9-11+\n // IE's :disabled selector does not pick up the children of disabled fieldsets\n docElem.appendChild(el).disabled = true;\n if (el.querySelectorAll(\":disabled\").length !== 2) {\n rbuggyQSA.push(\":enabled\", \":disabled\");\n }\n\n // Support: Opera 10 - 11 only\n // Opera 10-11 does not throw on post-comma invalid pseudos\n el.querySelectorAll(\"*,:x\");\n rbuggyQSA.push(\",.*:\");\n });\n }\n if (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) {\n assert(function (el) {\n // Check to see if it's possible to do matchesSelector\n // on a disconnected node (IE 9)\n support.disconnectedMatch = matches.call(el, \"*\");\n\n // This should fail with an exception\n // Gecko does not error, returns false instead\n matches.call(el, \"[s!='']:x\");\n rbuggyMatches.push(\"!=\", pseudos);\n });\n }\n if (!support.cssSupportsSelector) {\n // Support: Chrome 105+, Safari 15.4+\n // `:has()` uses a forgiving selector list as an argument so our regular\n // `try-catch` mechanism fails to catch `:has()` with arguments not supported\n // natively like `:has(:contains(\"Foo\"))`. Where supported & spec-compliant,\n // we now use `CSS.supports(\"selector(:is(SELECTOR_TO_BE_TESTED))\")`, but\n // outside that we mark `:has` as buggy.\n rbuggyQSA.push(\":has\");\n }\n rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join(\"|\"));\n rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join(\"|\"));\n\n /* Contains\n ---------------------------------------------------------------------- */\n hasCompare = rnative.test(docElem.compareDocumentPosition);\n\n // Element contains another\n // Purposefully self-exclusive\n // As in, an element does not contain itself\n contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) {\n // Support: IE <9 only\n // IE doesn't have `contains` on `document` so we need to check for\n // `documentElement` presence.\n // We need to fall back to `a` when `documentElement` is missing\n // as `ownerDocument` of elements within ` ` may have\n // a null one - a default behavior of all modern browsers.\n var adown = a.nodeType === 9 && a.documentElement || a,\n bup = b && b.parentNode;\n return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));\n } : function (a, b) {\n if (b) {\n while (b = b.parentNode) {\n if (b === a) {\n return true;\n }\n }\n }\n return false;\n };\n\n /* Sorting\n ---------------------------------------------------------------------- */\n\n // Document order sorting\n sortOrder = hasCompare ? function (a, b) {\n // Flag for duplicate removal\n if (a === b) {\n hasDuplicate = true;\n return 0;\n }\n\n // Sort on method existence if only one input has compareDocumentPosition\n var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n if (compare) {\n return compare;\n }\n\n // Calculate position if both inputs belong to the same document\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) :\n // Otherwise we know they are disconnected\n 1;\n\n // Disconnected nodes\n if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {\n // Choose the first element that is related to our preferred document\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if (a == document || a.ownerDocument == preferredDoc && contains(preferredDoc, a)) {\n return -1;\n }\n\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if (b == document || b.ownerDocument == preferredDoc && contains(preferredDoc, b)) {\n return 1;\n }\n\n // Maintain original order\n return sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;\n }\n return compare & 4 ? -1 : 1;\n } : function (a, b) {\n // Exit early if the nodes are identical\n if (a === b) {\n hasDuplicate = true;\n return 0;\n }\n var cur,\n i = 0,\n aup = a.parentNode,\n bup = b.parentNode,\n ap = [a],\n bp = [b];\n\n // Parentless nodes are either documents or disconnected\n if (!aup || !bup) {\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n /* eslint-disable eqeqeq */\n return a == document ? -1 : b == document ? 1 : /* eslint-enable eqeqeq */\n aup ? -1 : bup ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;\n\n // If the nodes are siblings, we can do a quick check\n } else if (aup === bup) {\n return siblingCheck(a, b);\n }\n\n // Otherwise we need full lists of their ancestors for comparison\n cur = a;\n while (cur = cur.parentNode) {\n ap.unshift(cur);\n }\n cur = b;\n while (cur = cur.parentNode) {\n bp.unshift(cur);\n }\n\n // Walk down the tree looking for a discrepancy\n while (ap[i] === bp[i]) {\n i++;\n }\n return i ?\n // Do a sibling check if the nodes have a common ancestor\n siblingCheck(ap[i], bp[i]) :\n // Otherwise nodes in our document sort first\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n /* eslint-disable eqeqeq */\n ap[i] == preferredDoc ? -1 : bp[i] == preferredDoc ? 1 : /* eslint-enable eqeqeq */\n 0;\n };\n return document;\n };\n Sizzle.matches = function (expr, elements) {\n return Sizzle(expr, null, null, elements);\n };\n Sizzle.matchesSelector = function (elem, expr) {\n setDocument(elem);\n if (support.matchesSelector && documentIsHTML && !nonnativeSelectorCache[expr + \" \"] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {\n try {\n var ret = matches.call(elem, expr);\n\n // IE 9's matchesSelector returns false on disconnected nodes\n if (ret || support.disconnectedMatch ||\n // As well, disconnected nodes are said to be in a document\n // fragment in IE 9\n elem.document && elem.document.nodeType !== 11) {\n return ret;\n }\n } catch (e) {\n nonnativeSelectorCache(expr, true);\n }\n }\n return Sizzle(expr, document, null, [elem]).length > 0;\n };\n Sizzle.contains = function (context, elem) {\n // Set document vars if needed\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if ((context.ownerDocument || context) != document) {\n setDocument(context);\n }\n return contains(context, elem);\n };\n Sizzle.attr = function (elem, name) {\n // Set document vars if needed\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if ((elem.ownerDocument || elem) != document) {\n setDocument(elem);\n }\n var fn = Expr.attrHandle[name.toLowerCase()],\n // Don't get fooled by Object.prototype properties (jQuery #13807)\n val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;\n return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;\n };\n Sizzle.escape = function (sel) {\n return (sel + \"\").replace(rcssescape, fcssescape);\n };\n Sizzle.error = function (msg) {\n throw new Error(\"Syntax error, unrecognized expression: \" + msg);\n };\n\n /**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\n Sizzle.uniqueSort = function (results) {\n var elem,\n duplicates = [],\n j = 0,\n i = 0;\n\n // Unless we *know* we can detect duplicates, assume their presence\n hasDuplicate = !support.detectDuplicates;\n sortInput = !support.sortStable && results.slice(0);\n results.sort(sortOrder);\n if (hasDuplicate) {\n while (elem = results[i++]) {\n if (elem === results[i]) {\n j = duplicates.push(i);\n }\n }\n while (j--) {\n results.splice(duplicates[j], 1);\n }\n }\n\n // Clear input after sorting to release objects\n // See https://github.com/jquery/sizzle/pull/225\n sortInput = null;\n return results;\n };\n\n /**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\n getText = Sizzle.getText = function (elem) {\n var node,\n ret = \"\",\n i = 0,\n nodeType = elem.nodeType;\n if (!nodeType) {\n // If no nodeType, this is expected to be an array\n while (node = elem[i++]) {\n // Do not traverse comment nodes\n ret += getText(node);\n }\n } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {\n // Use textContent for elements\n // innerText usage removed for consistency of new lines (jQuery #11153)\n if (typeof elem.textContent === \"string\") {\n return elem.textContent;\n } else {\n // Traverse its children\n for (elem = elem.firstChild; elem; elem = elem.nextSibling) {\n ret += getText(elem);\n }\n }\n } else if (nodeType === 3 || nodeType === 4) {\n return elem.nodeValue;\n }\n\n // Do not include comment or processing instruction nodes\n\n return ret;\n };\n Expr = Sizzle.selectors = {\n // Can be adjusted by the user\n cacheLength: 50,\n createPseudo: markFunction,\n match: matchExpr,\n attrHandle: {},\n find: {},\n relative: {\n \">\": {\n dir: \"parentNode\",\n first: true\n },\n \" \": {\n dir: \"parentNode\"\n },\n \"+\": {\n dir: \"previousSibling\",\n first: true\n },\n \"~\": {\n dir: \"previousSibling\"\n }\n },\n preFilter: {\n \"ATTR\": function (match) {\n match[1] = match[1].replace(runescape, funescape);\n\n // Move the given value to match[3] whether quoted or unquoted\n match[3] = (match[3] || match[4] || match[5] || \"\").replace(runescape, funescape);\n if (match[2] === \"~=\") {\n match[3] = \" \" + match[3] + \" \";\n }\n return match.slice(0, 4);\n },\n \"CHILD\": function (match) {\n /* matches from matchExpr[\"CHILD\"]\n \t1 type (only|nth|...)\n \t2 what (child|of-type)\n \t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n \t4 xn-component of xn+y argument ([+-]?\\d*n|)\n \t5 sign of xn-component\n \t6 x of xn-component\n \t7 sign of y-component\n \t8 y of y-component\n */\n match[1] = match[1].toLowerCase();\n if (match[1].slice(0, 3) === \"nth\") {\n // nth-* requires argument\n if (!match[3]) {\n Sizzle.error(match[0]);\n }\n\n // numeric x and y parameters for Expr.filter.CHILD\n // remember that false/true cast respectively to 0/1\n match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === \"even\" || match[3] === \"odd\"));\n match[5] = +(match[7] + match[8] || match[3] === \"odd\");\n\n // other types prohibit arguments\n } else if (match[3]) {\n Sizzle.error(match[0]);\n }\n return match;\n },\n \"PSEUDO\": function (match) {\n var excess,\n unquoted = !match[6] && match[2];\n if (matchExpr[\"CHILD\"].test(match[0])) {\n return null;\n }\n\n // Accept quoted arguments as-is\n if (match[3]) {\n match[2] = match[4] || match[5] || \"\";\n\n // Strip excess characters from unquoted arguments\n } else if (unquoted && rpseudo.test(unquoted) && (\n // Get excess from tokenize (recursively)\n excess = tokenize(unquoted, true)) && (\n // advance to the next closing parenthesis\n excess = unquoted.indexOf(\")\", unquoted.length - excess) - unquoted.length)) {\n // excess is a negative index\n match[0] = match[0].slice(0, excess);\n match[2] = unquoted.slice(0, excess);\n }\n\n // Return only captures needed by the pseudo filter method (type and argument)\n return match.slice(0, 3);\n }\n },\n filter: {\n \"TAG\": function (nodeNameSelector) {\n var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();\n return nodeNameSelector === \"*\" ? function () {\n return true;\n } : function (elem) {\n return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n };\n },\n \"CLASS\": function (className) {\n var pattern = classCache[className + \" \"];\n return pattern || (pattern = new RegExp(\"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\")) && classCache(className, function (elem) {\n return pattern.test(typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\");\n });\n },\n \"ATTR\": function (name, operator, check) {\n return function (elem) {\n var result = Sizzle.attr(elem, name);\n if (result == null) {\n return operator === \"!=\";\n }\n if (!operator) {\n return true;\n }\n result += \"\";\n\n /* eslint-disable max-len */\n\n return operator === \"=\" ? result === check : operator === \"!=\" ? result !== check : operator === \"^=\" ? check && result.indexOf(check) === 0 : operator === \"*=\" ? check && result.indexOf(check) > -1 : operator === \"$=\" ? check && result.slice(-check.length) === check : operator === \"~=\" ? (\" \" + result.replace(rwhitespace, \" \") + \" \").indexOf(check) > -1 : operator === \"|=\" ? result === check || result.slice(0, check.length + 1) === check + \"-\" : false;\n /* eslint-enable max-len */\n };\n },\n\n \"CHILD\": function (type, what, _argument, first, last) {\n var simple = type.slice(0, 3) !== \"nth\",\n forward = type.slice(-4) !== \"last\",\n ofType = what === \"of-type\";\n return first === 1 && last === 0 ?\n // Shortcut for :nth-*(n)\n function (elem) {\n return !!elem.parentNode;\n } : function (elem, _context, xml) {\n var cache,\n uniqueCache,\n outerCache,\n node,\n nodeIndex,\n start,\n dir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n parent = elem.parentNode,\n name = ofType && elem.nodeName.toLowerCase(),\n useCache = !xml && !ofType,\n diff = false;\n if (parent) {\n // :(first|last|only)-(child|of-type)\n if (simple) {\n while (dir) {\n node = elem;\n while (node = node[dir]) {\n if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {\n return false;\n }\n }\n\n // Reverse direction for :only-* (if we haven't yet done so)\n start = dir = type === \"only\" && !start && \"nextSibling\";\n }\n return true;\n }\n start = [forward ? parent.firstChild : parent.lastChild];\n\n // non-xml :nth-child(...) stores cache data on `parent`\n if (forward && useCache) {\n // Seek `elem` from a previously-cached index\n\n // ...in a gzip-friendly way\n node = parent;\n outerCache = node[expando] || (node[expando] = {});\n\n // Support: IE <9 only\n // Defend against cloned attroperties (jQuery gh-1709)\n uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});\n cache = uniqueCache[type] || [];\n nodeIndex = cache[0] === dirruns && cache[1];\n diff = nodeIndex && cache[2];\n node = nodeIndex && parent.childNodes[nodeIndex];\n while (node = ++nodeIndex && node && node[dir] || (\n // Fallback to seeking `elem` from the start\n diff = nodeIndex = 0) || start.pop()) {\n // When found, cache indexes on `parent` and break\n if (node.nodeType === 1 && ++diff && node === elem) {\n uniqueCache[type] = [dirruns, nodeIndex, diff];\n break;\n }\n }\n } else {\n // Use previously-cached element index if available\n if (useCache) {\n // ...in a gzip-friendly way\n node = elem;\n outerCache = node[expando] || (node[expando] = {});\n\n // Support: IE <9 only\n // Defend against cloned attroperties (jQuery gh-1709)\n uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});\n cache = uniqueCache[type] || [];\n nodeIndex = cache[0] === dirruns && cache[1];\n diff = nodeIndex;\n }\n\n // xml :nth-child(...)\n // or :nth-last-child(...) or :nth(-last)?-of-type(...)\n if (diff === false) {\n // Use the same loop as above to seek `elem` from the start\n while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {\n if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {\n // Cache the index of each encountered element\n if (useCache) {\n outerCache = node[expando] || (node[expando] = {});\n\n // Support: IE <9 only\n // Defend against cloned attroperties (jQuery gh-1709)\n uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});\n uniqueCache[type] = [dirruns, diff];\n }\n if (node === elem) {\n break;\n }\n }\n }\n }\n }\n\n // Incorporate the offset, then check against cycle size\n diff -= last;\n return diff === first || diff % first === 0 && diff / first >= 0;\n }\n };\n },\n \"PSEUDO\": function (pseudo, argument) {\n // pseudo-class names are case-insensitive\n // http://www.w3.org/TR/selectors/#pseudo-classes\n // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n // Remember that setFilters inherits from pseudos\n var args,\n fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error(\"unsupported pseudo: \" + pseudo);\n\n // The user may use createPseudo to indicate that\n // arguments are needed to create the filter function\n // just as Sizzle does\n if (fn[expando]) {\n return fn(argument);\n }\n\n // But maintain support for old signatures\n if (fn.length > 1) {\n args = [pseudo, pseudo, \"\", argument];\n return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {\n var idx,\n matched = fn(seed, argument),\n i = matched.length;\n while (i--) {\n idx = indexOf(seed, matched[i]);\n seed[idx] = !(matches[idx] = matched[i]);\n }\n }) : function (elem) {\n return fn(elem, 0, args);\n };\n }\n return fn;\n }\n },\n pseudos: {\n // Potentially complex pseudos\n \"not\": markFunction(function (selector) {\n // Trim the selector passed to compile\n // to avoid treating leading and trailing\n // spaces as combinators\n var input = [],\n results = [],\n matcher = compile(selector.replace(rtrim, \"$1\"));\n return matcher[expando] ? markFunction(function (seed, matches, _context, xml) {\n var elem,\n unmatched = matcher(seed, null, xml, []),\n i = seed.length;\n\n // Match elements unmatched by `matcher`\n while (i--) {\n if (elem = unmatched[i]) {\n seed[i] = !(matches[i] = elem);\n }\n }\n }) : function (elem, _context, xml) {\n input[0] = elem;\n matcher(input, null, xml, results);\n\n // Don't keep the element (issue #299)\n input[0] = null;\n return !results.pop();\n };\n }),\n \"has\": markFunction(function (selector) {\n return function (elem) {\n return Sizzle(selector, elem).length > 0;\n };\n }),\n \"contains\": markFunction(function (text) {\n text = text.replace(runescape, funescape);\n return function (elem) {\n return (elem.textContent || getText(elem)).indexOf(text) > -1;\n };\n }),\n // \"Whether an element is represented by a :lang() selector\n // is based solely on the element's language value\n // being equal to the identifier C,\n // or beginning with the identifier C immediately followed by \"-\".\n // The matching of C against the element's language value is performed case-insensitively.\n // The identifier C does not have to be a valid language name.\"\n // http://www.w3.org/TR/selectors/#lang-pseudo\n \"lang\": markFunction(function (lang) {\n // lang value must be a valid identifier\n if (!ridentifier.test(lang || \"\")) {\n Sizzle.error(\"unsupported lang: \" + lang);\n }\n lang = lang.replace(runescape, funescape).toLowerCase();\n return function (elem) {\n var elemLang;\n do {\n if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) {\n elemLang = elemLang.toLowerCase();\n return elemLang === lang || elemLang.indexOf(lang + \"-\") === 0;\n }\n } while ((elem = elem.parentNode) && elem.nodeType === 1);\n return false;\n };\n }),\n // Miscellaneous\n \"target\": function (elem) {\n var hash = window.location && window.location.hash;\n return hash && hash.slice(1) === elem.id;\n },\n \"root\": function (elem) {\n return elem === docElem;\n },\n \"focus\": function (elem) {\n return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n },\n // Boolean properties\n \"enabled\": createDisabledPseudo(false),\n \"disabled\": createDisabledPseudo(true),\n \"checked\": function (elem) {\n // In CSS3, :checked should return both checked and selected elements\n // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n var nodeName = elem.nodeName.toLowerCase();\n return nodeName === \"input\" && !!elem.checked || nodeName === \"option\" && !!elem.selected;\n },\n \"selected\": function (elem) {\n // Accessing this property makes selected-by-default\n // options in Safari work properly\n if (elem.parentNode) {\n // eslint-disable-next-line no-unused-expressions\n elem.parentNode.selectedIndex;\n }\n return elem.selected === true;\n },\n // Contents\n \"empty\": function (elem) {\n // http://www.w3.org/TR/selectors/#empty-pseudo\n // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n // but not by others (comment: 8; processing instruction: 7; etc.)\n // nodeType < 6 works because attributes (2) do not appear as children\n for (elem = elem.firstChild; elem; elem = elem.nextSibling) {\n if (elem.nodeType < 6) {\n return false;\n }\n }\n return true;\n },\n \"parent\": function (elem) {\n return !Expr.pseudos[\"empty\"](elem);\n },\n // Element/input types\n \"header\": function (elem) {\n return rheader.test(elem.nodeName);\n },\n \"input\": function (elem) {\n return rinputs.test(elem.nodeName);\n },\n \"button\": function (elem) {\n var name = elem.nodeName.toLowerCase();\n return name === \"input\" && elem.type === \"button\" || name === \"button\";\n },\n \"text\": function (elem) {\n var attr;\n return elem.nodeName.toLowerCase() === \"input\" && elem.type === \"text\" && (\n // Support: IE <10 only\n // New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\");\n },\n // Position-in-collection\n \"first\": createPositionalPseudo(function () {\n return [0];\n }),\n \"last\": createPositionalPseudo(function (_matchIndexes, length) {\n return [length - 1];\n }),\n \"eq\": createPositionalPseudo(function (_matchIndexes, length, argument) {\n return [argument < 0 ? argument + length : argument];\n }),\n \"even\": createPositionalPseudo(function (matchIndexes, length) {\n var i = 0;\n for (; i < length; i += 2) {\n matchIndexes.push(i);\n }\n return matchIndexes;\n }),\n \"odd\": createPositionalPseudo(function (matchIndexes, length) {\n var i = 1;\n for (; i < length; i += 2) {\n matchIndexes.push(i);\n }\n return matchIndexes;\n }),\n \"lt\": createPositionalPseudo(function (matchIndexes, length, argument) {\n var i = argument < 0 ? argument + length : argument > length ? length : argument;\n for (; --i >= 0;) {\n matchIndexes.push(i);\n }\n return matchIndexes;\n }),\n \"gt\": createPositionalPseudo(function (matchIndexes, length, argument) {\n var i = argument < 0 ? argument + length : argument;\n for (; ++i < length;) {\n matchIndexes.push(i);\n }\n return matchIndexes;\n })\n }\n };\n Expr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n // Add button/input type pseudos\n for (i in {\n radio: true,\n checkbox: true,\n file: true,\n password: true,\n image: true\n }) {\n Expr.pseudos[i] = createInputPseudo(i);\n }\n for (i in {\n submit: true,\n reset: true\n }) {\n Expr.pseudos[i] = createButtonPseudo(i);\n }\n\n // Easy API for creating new setFilters\n function setFilters() {}\n setFilters.prototype = Expr.filters = Expr.pseudos;\n Expr.setFilters = new setFilters();\n tokenize = Sizzle.tokenize = function (selector, parseOnly) {\n var matched,\n match,\n tokens,\n type,\n soFar,\n groups,\n preFilters,\n cached = tokenCache[selector + \" \"];\n if (cached) {\n return parseOnly ? 0 : cached.slice(0);\n }\n soFar = selector;\n groups = [];\n preFilters = Expr.preFilter;\n while (soFar) {\n // Comma and first run\n if (!matched || (match = rcomma.exec(soFar))) {\n if (match) {\n // Don't consume trailing commas as valid\n soFar = soFar.slice(match[0].length) || soFar;\n }\n groups.push(tokens = []);\n }\n matched = false;\n\n // Combinators\n if (match = rcombinators.exec(soFar)) {\n matched = match.shift();\n tokens.push({\n value: matched,\n // Cast descendant combinators to space\n type: match[0].replace(rtrim, \" \")\n });\n soFar = soFar.slice(matched.length);\n }\n\n // Filters\n for (type in Expr.filter) {\n if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {\n matched = match.shift();\n tokens.push({\n value: matched,\n type: type,\n matches: match\n });\n soFar = soFar.slice(matched.length);\n }\n }\n if (!matched) {\n break;\n }\n }\n\n // Return the length of the invalid excess\n // if we're just parsing\n // Otherwise, throw an error or return tokens\n return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) :\n // Cache the tokens\n tokenCache(selector, groups).slice(0);\n };\n function toSelector(tokens) {\n var i = 0,\n len = tokens.length,\n selector = \"\";\n for (; i < len; i++) {\n selector += tokens[i].value;\n }\n return selector;\n }\n function addCombinator(matcher, combinator, base) {\n var dir = combinator.dir,\n skip = combinator.next,\n key = skip || dir,\n checkNonElements = base && key === \"parentNode\",\n doneName = done++;\n return combinator.first ?\n // Check against closest ancestor/preceding element\n function (elem, context, xml) {\n while (elem = elem[dir]) {\n if (elem.nodeType === 1 || checkNonElements) {\n return matcher(elem, context, xml);\n }\n }\n return false;\n } :\n // Check against all ancestor/preceding elements\n function (elem, context, xml) {\n var oldCache,\n uniqueCache,\n outerCache,\n newCache = [dirruns, doneName];\n\n // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n if (xml) {\n while (elem = elem[dir]) {\n if (elem.nodeType === 1 || checkNonElements) {\n if (matcher(elem, context, xml)) {\n return true;\n }\n }\n }\n } else {\n while (elem = elem[dir]) {\n if (elem.nodeType === 1 || checkNonElements) {\n outerCache = elem[expando] || (elem[expando] = {});\n\n // Support: IE <9 only\n // Defend against cloned attroperties (jQuery gh-1709)\n uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {});\n if (skip && skip === elem.nodeName.toLowerCase()) {\n elem = elem[dir] || elem;\n } else if ((oldCache = uniqueCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {\n // Assign to newCache so results back-propagate to previous elements\n return newCache[2] = oldCache[2];\n } else {\n // Reuse newcache so results back-propagate to previous elements\n uniqueCache[key] = newCache;\n\n // A match means we're done; a fail means we have to keep checking\n if (newCache[2] = matcher(elem, context, xml)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n };\n }\n function elementMatcher(matchers) {\n return matchers.length > 1 ? function (elem, context, xml) {\n var i = matchers.length;\n while (i--) {\n if (!matchers[i](elem, context, xml)) {\n return false;\n }\n }\n return true;\n } : matchers[0];\n }\n function multipleContexts(selector, contexts, results) {\n var i = 0,\n len = contexts.length;\n for (; i < len; i++) {\n Sizzle(selector, contexts[i], results);\n }\n return results;\n }\n function condense(unmatched, map, filter, context, xml) {\n var elem,\n newUnmatched = [],\n i = 0,\n len = unmatched.length,\n mapped = map != null;\n for (; i < len; i++) {\n if (elem = unmatched[i]) {\n if (!filter || filter(elem, context, xml)) {\n newUnmatched.push(elem);\n if (mapped) {\n map.push(i);\n }\n }\n }\n }\n return newUnmatched;\n }\n function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {\n if (postFilter && !postFilter[expando]) {\n postFilter = setMatcher(postFilter);\n }\n if (postFinder && !postFinder[expando]) {\n postFinder = setMatcher(postFinder, postSelector);\n }\n return markFunction(function (seed, results, context, xml) {\n var temp,\n i,\n elem,\n preMap = [],\n postMap = [],\n preexisting = results.length,\n // Get initial elements from seed or context\n elems = seed || multipleContexts(selector || \"*\", context.nodeType ? [context] : context, []),\n // Prefilter to get matcher input, preserving a map for seed-results synchronization\n matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems,\n matcherOut = matcher ?\n // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n postFinder || (seed ? preFilter : preexisting || postFilter) ?\n // ...intermediate processing is necessary\n [] :\n // ...otherwise use results directly\n results : matcherIn;\n\n // Find primary matches\n if (matcher) {\n matcher(matcherIn, matcherOut, context, xml);\n }\n\n // Apply postFilter\n if (postFilter) {\n temp = condense(matcherOut, postMap);\n postFilter(temp, [], context, xml);\n\n // Un-match failing elements by moving them back to matcherIn\n i = temp.length;\n while (i--) {\n if (elem = temp[i]) {\n matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);\n }\n }\n }\n if (seed) {\n if (postFinder || preFilter) {\n if (postFinder) {\n // Get the final matcherOut by condensing this intermediate into postFinder contexts\n temp = [];\n i = matcherOut.length;\n while (i--) {\n if (elem = matcherOut[i]) {\n // Restore matcherIn since elem is not yet a final match\n temp.push(matcherIn[i] = elem);\n }\n }\n postFinder(null, matcherOut = [], temp, xml);\n }\n\n // Move matched elements from seed to results to keep them synchronized\n i = matcherOut.length;\n while (i--) {\n if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {\n seed[temp] = !(results[temp] = elem);\n }\n }\n }\n\n // Add elements to results, through postFinder if defined\n } else {\n matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);\n if (postFinder) {\n postFinder(null, results, matcherOut, xml);\n } else {\n push.apply(results, matcherOut);\n }\n }\n });\n }\n function matcherFromTokens(tokens) {\n var checkContext,\n matcher,\n j,\n len = tokens.length,\n leadingRelative = Expr.relative[tokens[0].type],\n implicitRelative = leadingRelative || Expr.relative[\" \"],\n i = leadingRelative ? 1 : 0,\n // The foundational matcher ensures that elements are reachable from top-level context(s)\n matchContext = addCombinator(function (elem) {\n return elem === checkContext;\n }, implicitRelative, true),\n matchAnyContext = addCombinator(function (elem) {\n return indexOf(checkContext, elem) > -1;\n }, implicitRelative, true),\n matchers = [function (elem, context, xml) {\n var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));\n\n // Avoid hanging onto element (issue #299)\n checkContext = null;\n return ret;\n }];\n for (; i < len; i++) {\n if (matcher = Expr.relative[tokens[i].type]) {\n matchers = [addCombinator(elementMatcher(matchers), matcher)];\n } else {\n matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);\n\n // Return special upon seeing a positional matcher\n if (matcher[expando]) {\n // Find the next relative operator (if any) for proper handling\n j = ++i;\n for (; j < len; j++) {\n if (Expr.relative[tokens[j].type]) {\n break;\n }\n }\n return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(\n // If the preceding token was a descendant combinator, insert an implicit any-element `*`\n tokens.slice(0, i - 1).concat({\n value: tokens[i - 2].type === \" \" ? \"*\" : \"\"\n })).replace(rtrim, \"$1\"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));\n }\n matchers.push(matcher);\n }\n }\n return elementMatcher(matchers);\n }\n function matcherFromGroupMatchers(elementMatchers, setMatchers) {\n var bySet = setMatchers.length > 0,\n byElement = elementMatchers.length > 0,\n superMatcher = function (seed, context, xml, results, outermost) {\n var elem,\n j,\n matcher,\n matchedCount = 0,\n i = \"0\",\n unmatched = seed && [],\n setMatched = [],\n contextBackup = outermostContext,\n // We must always have either seed elements or outermost context\n elems = seed || byElement && Expr.find[\"TAG\"](\"*\", outermost),\n // Use integer dirruns iff this is the outermost matcher\n dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1,\n len = elems.length;\n if (outermost) {\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n outermostContext = context == document || context || outermost;\n }\n\n // Add elements passing elementMatchers directly to results\n // Support: IE<9, Safari\n // Tolerate NodeList properties (IE: \"length\"; Safari: ) matching elements by id\n for (; i !== len && (elem = elems[i]) != null; i++) {\n if (byElement && elem) {\n j = 0;\n\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if (!context && elem.ownerDocument != document) {\n setDocument(elem);\n xml = !documentIsHTML;\n }\n while (matcher = elementMatchers[j++]) {\n if (matcher(elem, context || document, xml)) {\n results.push(elem);\n break;\n }\n }\n if (outermost) {\n dirruns = dirrunsUnique;\n }\n }\n\n // Track unmatched elements for set filters\n if (bySet) {\n // They will have gone through all possible matchers\n if (elem = !matcher && elem) {\n matchedCount--;\n }\n\n // Lengthen the array for every element, matched or not\n if (seed) {\n unmatched.push(elem);\n }\n }\n }\n\n // `i` is now the count of elements visited above, and adding it to `matchedCount`\n // makes the latter nonnegative.\n matchedCount += i;\n\n // Apply set filters to unmatched elements\n // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n // equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n // no element matchers and no seed.\n // Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n // case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n // numerically zero.\n if (bySet && i !== matchedCount) {\n j = 0;\n while (matcher = setMatchers[j++]) {\n matcher(unmatched, setMatched, context, xml);\n }\n if (seed) {\n // Reintegrate element matches to eliminate the need for sorting\n if (matchedCount > 0) {\n while (i--) {\n if (!(unmatched[i] || setMatched[i])) {\n setMatched[i] = pop.call(results);\n }\n }\n }\n\n // Discard index placeholder values to get only actual matches\n setMatched = condense(setMatched);\n }\n\n // Add matches to results\n push.apply(results, setMatched);\n\n // Seedless set matches succeeding multiple successful matchers stipulate sorting\n if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {\n Sizzle.uniqueSort(results);\n }\n }\n\n // Override manipulation of globals by nested matchers\n if (outermost) {\n dirruns = dirrunsUnique;\n outermostContext = contextBackup;\n }\n return unmatched;\n };\n return bySet ? markFunction(superMatcher) : superMatcher;\n }\n compile = Sizzle.compile = function (selector, match /* Internal Use Only */) {\n var i,\n setMatchers = [],\n elementMatchers = [],\n cached = compilerCache[selector + \" \"];\n if (!cached) {\n // Generate a function of recursive functions that can be used to check each element\n if (!match) {\n match = tokenize(selector);\n }\n i = match.length;\n while (i--) {\n cached = matcherFromTokens(match[i]);\n if (cached[expando]) {\n setMatchers.push(cached);\n } else {\n elementMatchers.push(cached);\n }\n }\n\n // Cache the compiled function\n cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));\n\n // Save selector and tokenization\n cached.selector = selector;\n }\n return cached;\n };\n\n /**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\n select = Sizzle.select = function (selector, context, results, seed) {\n var i,\n tokens,\n token,\n type,\n find,\n compiled = typeof selector === \"function\" && selector,\n match = !seed && tokenize(selector = compiled.selector || selector);\n results = results || [];\n\n // Try to minimize operations if there is only one selector in the list and no seed\n // (the latter of which guarantees us context)\n if (match.length === 1) {\n // Reduce context if the leading compound selector is an ID\n tokens = match[0] = match[0].slice(0);\n if (tokens.length > 2 && (token = tokens[0]).type === \"ID\" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {\n context = (Expr.find[\"ID\"](token.matches[0].replace(runescape, funescape), context) || [])[0];\n if (!context) {\n return results;\n\n // Precompiled matchers will still verify ancestry, so step up a level\n } else if (compiled) {\n context = context.parentNode;\n }\n selector = selector.slice(tokens.shift().value.length);\n }\n\n // Fetch a seed set for right-to-left matching\n i = matchExpr[\"needsContext\"].test(selector) ? 0 : tokens.length;\n while (i--) {\n token = tokens[i];\n\n // Abort if we hit a combinator\n if (Expr.relative[type = token.type]) {\n break;\n }\n if (find = Expr.find[type]) {\n // Search, expanding context for leading sibling combinators\n if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {\n // If seed is empty or no tokens remain, we can return early\n tokens.splice(i, 1);\n selector = seed.length && toSelector(tokens);\n if (!selector) {\n push.apply(results, seed);\n return results;\n }\n break;\n }\n }\n }\n }\n\n // Compile and execute a filtering function if one is not provided\n // Provide `match` to avoid retokenization if we modified the selector above\n (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context);\n return results;\n };\n\n // One-time assignments\n\n // Sort stability\n support.sortStable = expando.split(\"\").sort(sortOrder).join(\"\") === expando;\n\n // Support: Chrome 14-35+\n // Always assume duplicates if they aren't passed to the comparison function\n support.detectDuplicates = !!hasDuplicate;\n\n // Initialize against the default document\n setDocument();\n\n // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n // Detached nodes confoundingly follow *each other*\n support.sortDetached = assert(function (el) {\n // Should return 1, but returns 4 (following)\n return el.compareDocumentPosition(document.createElement(\"fieldset\")) & 1;\n });\n\n // Support: IE<8\n // Prevent attribute/property \"interpolation\"\n // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\n if (!assert(function (el) {\n el.innerHTML = \" \";\n return el.firstChild.getAttribute(\"href\") === \"#\";\n })) {\n addHandle(\"type|href|height|width\", function (elem, name, isXML) {\n if (!isXML) {\n return elem.getAttribute(name, name.toLowerCase() === \"type\" ? 1 : 2);\n }\n });\n }\n\n // Support: IE<9\n // Use defaultValue in place of getAttribute(\"value\")\n if (!support.attributes || !assert(function (el) {\n el.innerHTML = \" \";\n el.firstChild.setAttribute(\"value\", \"\");\n return el.firstChild.getAttribute(\"value\") === \"\";\n })) {\n addHandle(\"value\", function (elem, _name, isXML) {\n if (!isXML && elem.nodeName.toLowerCase() === \"input\") {\n return elem.defaultValue;\n }\n });\n }\n\n // Support: IE<9\n // Use getAttributeNode to fetch booleans when getAttribute lies\n if (!assert(function (el) {\n return el.getAttribute(\"disabled\") == null;\n })) {\n addHandle(booleans, function (elem, name, isXML) {\n var val;\n if (!isXML) {\n return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;\n }\n });\n }\n return Sizzle;\n }(window);\n jQuery.find = Sizzle;\n jQuery.expr = Sizzle.selectors;\n\n // Deprecated\n jQuery.expr[\":\"] = jQuery.expr.pseudos;\n jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\n jQuery.text = Sizzle.getText;\n jQuery.isXMLDoc = Sizzle.isXML;\n jQuery.contains = Sizzle.contains;\n jQuery.escapeSelector = Sizzle.escape;\n var dir = function (elem, dir, until) {\n var matched = [],\n truncate = until !== undefined;\n while ((elem = elem[dir]) && elem.nodeType !== 9) {\n if (elem.nodeType === 1) {\n if (truncate && jQuery(elem).is(until)) {\n break;\n }\n matched.push(elem);\n }\n }\n return matched;\n };\n var siblings = function (n, elem) {\n var matched = [];\n for (; n; n = n.nextSibling) {\n if (n.nodeType === 1 && n !== elem) {\n matched.push(n);\n }\n }\n return matched;\n };\n var rneedsContext = jQuery.expr.match.needsContext;\n function nodeName(elem, name) {\n return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n }\n var rsingleTag = /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i;\n\n // Implement the identical functionality for filter and not\n function winnow(elements, qualifier, not) {\n if (isFunction(qualifier)) {\n return jQuery.grep(elements, function (elem, i) {\n return !!qualifier.call(elem, i, elem) !== not;\n });\n }\n\n // Single element\n if (qualifier.nodeType) {\n return jQuery.grep(elements, function (elem) {\n return elem === qualifier !== not;\n });\n }\n\n // Arraylike of elements (jQuery, arguments, Array)\n if (typeof qualifier !== \"string\") {\n return jQuery.grep(elements, function (elem) {\n return indexOf.call(qualifier, elem) > -1 !== not;\n });\n }\n\n // Filtered directly for both simple and complex selectors\n return jQuery.filter(qualifier, elements, not);\n }\n jQuery.filter = function (expr, elems, not) {\n var elem = elems[0];\n if (not) {\n expr = \":not(\" + expr + \")\";\n }\n if (elems.length === 1 && elem.nodeType === 1) {\n return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];\n }\n return jQuery.find.matches(expr, jQuery.grep(elems, function (elem) {\n return elem.nodeType === 1;\n }));\n };\n jQuery.fn.extend({\n find: function (selector) {\n var i,\n ret,\n len = this.length,\n self = this;\n if (typeof selector !== \"string\") {\n return this.pushStack(jQuery(selector).filter(function () {\n for (i = 0; i < len; i++) {\n if (jQuery.contains(self[i], this)) {\n return true;\n }\n }\n }));\n }\n ret = this.pushStack([]);\n for (i = 0; i < len; i++) {\n jQuery.find(selector, self[i], ret);\n }\n return len > 1 ? jQuery.uniqueSort(ret) : ret;\n },\n filter: function (selector) {\n return this.pushStack(winnow(this, selector || [], false));\n },\n not: function (selector) {\n return this.pushStack(winnow(this, selector || [], true));\n },\n is: function (selector) {\n return !!winnow(this,\n // If this is a positional/relative selector, check membership in the returned set\n // so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n typeof selector === \"string\" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length;\n }\n });\n\n // Initialize a jQuery object\n\n // A central reference to the root jQuery(document)\n var rootjQuery,\n // A simple way to check for HTML strings\n // Prioritize #id over to avoid XSS via location.hash (trac-9521)\n // Strict HTML recognition (trac-11290: must start with <)\n // Shortcut simple #id case for speed\n rquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n init = jQuery.fn.init = function (selector, context, root) {\n var match, elem;\n\n // HANDLE: $(\"\"), $(null), $(undefined), $(false)\n if (!selector) {\n return this;\n }\n\n // Method init() accepts an alternate rootjQuery\n // so migrate can support jQuery.sub (gh-2101)\n root = root || rootjQuery;\n\n // Handle HTML strings\n if (typeof selector === \"string\") {\n if (selector[0] === \"<\" && selector[selector.length - 1] === \">\" && selector.length >= 3) {\n // Assume that strings that start and end with <> are HTML and skip the regex check\n match = [null, selector, null];\n } else {\n match = rquickExpr.exec(selector);\n }\n\n // Match html or make sure no context is specified for #id\n if (match && (match[1] || !context)) {\n // HANDLE: $(html) -> $(array)\n if (match[1]) {\n context = context instanceof jQuery ? context[0] : context;\n\n // Option to run scripts is true for back-compat\n // Intentionally let the error be thrown if parseHTML is not present\n jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true));\n\n // HANDLE: $(html, props)\n if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {\n for (match in context) {\n // Properties of context are called as methods if possible\n if (isFunction(this[match])) {\n this[match](context[match]);\n\n // ...and otherwise set as attributes\n } else {\n this.attr(match, context[match]);\n }\n }\n }\n return this;\n\n // HANDLE: $(#id)\n } else {\n elem = document.getElementById(match[2]);\n if (elem) {\n // Inject the element directly into the jQuery object\n this[0] = elem;\n this.length = 1;\n }\n return this;\n }\n\n // HANDLE: $(expr, $(...))\n } else if (!context || context.jquery) {\n return (context || root).find(selector);\n\n // HANDLE: $(expr, context)\n // (which is just equivalent to: $(context).find(expr)\n } else {\n return this.constructor(context).find(selector);\n }\n\n // HANDLE: $(DOMElement)\n } else if (selector.nodeType) {\n this[0] = selector;\n this.length = 1;\n return this;\n\n // HANDLE: $(function)\n // Shortcut for document ready\n } else if (isFunction(selector)) {\n return root.ready !== undefined ? root.ready(selector) :\n // Execute immediately if ready is not present\n selector(jQuery);\n }\n return jQuery.makeArray(selector, this);\n };\n\n // Give the init function the jQuery prototype for later instantiation\n init.prototype = jQuery.fn;\n\n // Initialize central reference\n rootjQuery = jQuery(document);\n var rparentsprev = /^(?:parents|prev(?:Until|All))/,\n // Methods guaranteed to produce a unique set when starting from a unique set\n guaranteedUnique = {\n children: true,\n contents: true,\n next: true,\n prev: true\n };\n jQuery.fn.extend({\n has: function (target) {\n var targets = jQuery(target, this),\n l = targets.length;\n return this.filter(function () {\n var i = 0;\n for (; i < l; i++) {\n if (jQuery.contains(this, targets[i])) {\n return true;\n }\n }\n });\n },\n closest: function (selectors, context) {\n var cur,\n i = 0,\n l = this.length,\n matched = [],\n targets = typeof selectors !== \"string\" && jQuery(selectors);\n\n // Positional selectors never match, since there's no _selection_ context\n if (!rneedsContext.test(selectors)) {\n for (; i < l; i++) {\n for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {\n // Always skip document fragments\n if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 :\n // Don't pass non-elements to Sizzle\n cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) {\n matched.push(cur);\n break;\n }\n }\n }\n }\n return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);\n },\n // Determine the position of an element within the set\n index: function (elem) {\n // No argument, return index in parent\n if (!elem) {\n return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;\n }\n\n // Index in selector\n if (typeof elem === \"string\") {\n return indexOf.call(jQuery(elem), this[0]);\n }\n\n // Locate the position of the desired element\n return indexOf.call(this,\n // If it receives a jQuery object, the first element is used\n elem.jquery ? elem[0] : elem);\n },\n add: function (selector, context) {\n return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context))));\n },\n addBack: function (selector) {\n return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector));\n }\n });\n function sibling(cur, dir) {\n while ((cur = cur[dir]) && cur.nodeType !== 1) {}\n return cur;\n }\n jQuery.each({\n parent: function (elem) {\n var parent = elem.parentNode;\n return parent && parent.nodeType !== 11 ? parent : null;\n },\n parents: function (elem) {\n return dir(elem, \"parentNode\");\n },\n parentsUntil: function (elem, _i, until) {\n return dir(elem, \"parentNode\", until);\n },\n next: function (elem) {\n return sibling(elem, \"nextSibling\");\n },\n prev: function (elem) {\n return sibling(elem, \"previousSibling\");\n },\n nextAll: function (elem) {\n return dir(elem, \"nextSibling\");\n },\n prevAll: function (elem) {\n return dir(elem, \"previousSibling\");\n },\n nextUntil: function (elem, _i, until) {\n return dir(elem, \"nextSibling\", until);\n },\n prevUntil: function (elem, _i, until) {\n return dir(elem, \"previousSibling\", until);\n },\n siblings: function (elem) {\n return siblings((elem.parentNode || {}).firstChild, elem);\n },\n children: function (elem) {\n return siblings(elem.firstChild);\n },\n contents: function (elem) {\n if (elem.contentDocument != null &&\n // Support: IE 11+\n // elements with no `data` attribute has an object\n // `contentDocument` with a `null` prototype.\n getProto(elem.contentDocument)) {\n return elem.contentDocument;\n }\n\n // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n // Treat the template element as a regular one in browsers that\n // don't support it.\n if (nodeName(elem, \"template\")) {\n elem = elem.content || elem;\n }\n return jQuery.merge([], elem.childNodes);\n }\n }, function (name, fn) {\n jQuery.fn[name] = function (until, selector) {\n var matched = jQuery.map(this, fn, until);\n if (name.slice(-5) !== \"Until\") {\n selector = until;\n }\n if (selector && typeof selector === \"string\") {\n matched = jQuery.filter(selector, matched);\n }\n if (this.length > 1) {\n // Remove duplicates\n if (!guaranteedUnique[name]) {\n jQuery.uniqueSort(matched);\n }\n\n // Reverse order for parents* and prev-derivatives\n if (rparentsprev.test(name)) {\n matched.reverse();\n }\n }\n return this.pushStack(matched);\n };\n });\n var rnothtmlwhite = /[^\\x20\\t\\r\\n\\f]+/g;\n\n // Convert String-formatted options into Object-formatted ones\n function createOptions(options) {\n var object = {};\n jQuery.each(options.match(rnothtmlwhite) || [], function (_, flag) {\n object[flag] = true;\n });\n return object;\n }\n\n /*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\n jQuery.Callbacks = function (options) {\n // Convert options from String-formatted to Object-formatted if needed\n // (we check in cache first)\n options = typeof options === \"string\" ? createOptions(options) : jQuery.extend({}, options);\n var\n // Flag to know if list is currently firing\n firing,\n // Last fire value for non-forgettable lists\n memory,\n // Flag to know if list was already fired\n fired,\n // Flag to prevent firing\n locked,\n // Actual callback list\n list = [],\n // Queue of execution data for repeatable lists\n queue = [],\n // Index of currently firing callback (modified by add/remove as needed)\n firingIndex = -1,\n // Fire callbacks\n fire = function () {\n // Enforce single-firing\n locked = locked || options.once;\n\n // Execute callbacks for all pending executions,\n // respecting firingIndex overrides and runtime changes\n fired = firing = true;\n for (; queue.length; firingIndex = -1) {\n memory = queue.shift();\n while (++firingIndex < list.length) {\n // Run callback and check for early termination\n if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) {\n // Jump to end and forget the data so .add doesn't re-fire\n firingIndex = list.length;\n memory = false;\n }\n }\n }\n\n // Forget the data if we're done with it\n if (!options.memory) {\n memory = false;\n }\n firing = false;\n\n // Clean up if we're done firing for good\n if (locked) {\n // Keep an empty list if we have data for future add calls\n if (memory) {\n list = [];\n\n // Otherwise, this object is spent\n } else {\n list = \"\";\n }\n }\n },\n // Actual Callbacks object\n self = {\n // Add a callback or a collection of callbacks to the list\n add: function () {\n if (list) {\n // If we have memory from a past run, we should fire after adding\n if (memory && !firing) {\n firingIndex = list.length - 1;\n queue.push(memory);\n }\n (function add(args) {\n jQuery.each(args, function (_, arg) {\n if (isFunction(arg)) {\n if (!options.unique || !self.has(arg)) {\n list.push(arg);\n }\n } else if (arg && arg.length && toType(arg) !== \"string\") {\n // Inspect recursively\n add(arg);\n }\n });\n })(arguments);\n if (memory && !firing) {\n fire();\n }\n }\n return this;\n },\n // Remove a callback from the list\n remove: function () {\n jQuery.each(arguments, function (_, arg) {\n var index;\n while ((index = jQuery.inArray(arg, list, index)) > -1) {\n list.splice(index, 1);\n\n // Handle firing indexes\n if (index <= firingIndex) {\n firingIndex--;\n }\n }\n });\n return this;\n },\n // Check if a given callback is in the list.\n // If no argument is given, return whether or not list has callbacks attached.\n has: function (fn) {\n return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;\n },\n // Remove all callbacks from the list\n empty: function () {\n if (list) {\n list = [];\n }\n return this;\n },\n // Disable .fire and .add\n // Abort any current/pending executions\n // Clear all callbacks and values\n disable: function () {\n locked = queue = [];\n list = memory = \"\";\n return this;\n },\n disabled: function () {\n return !list;\n },\n // Disable .fire\n // Also disable .add unless we have memory (since it would have no effect)\n // Abort any pending executions\n lock: function () {\n locked = queue = [];\n if (!memory && !firing) {\n list = memory = \"\";\n }\n return this;\n },\n locked: function () {\n return !!locked;\n },\n // Call all callbacks with the given context and arguments\n fireWith: function (context, args) {\n if (!locked) {\n args = args || [];\n args = [context, args.slice ? args.slice() : args];\n queue.push(args);\n if (!firing) {\n fire();\n }\n }\n return this;\n },\n // Call all the callbacks with the given arguments\n fire: function () {\n self.fireWith(this, arguments);\n return this;\n },\n // To know if the callbacks have already been called at least once\n fired: function () {\n return !!fired;\n }\n };\n return self;\n };\n function Identity(v) {\n return v;\n }\n function Thrower(ex) {\n throw ex;\n }\n function adoptValue(value, resolve, reject, noValue) {\n var method;\n try {\n // Check for promise aspect first to privilege synchronous behavior\n if (value && isFunction(method = value.promise)) {\n method.call(value).done(resolve).fail(reject);\n\n // Other thenables\n } else if (value && isFunction(method = value.then)) {\n method.call(value, resolve, reject);\n\n // Other non-thenables\n } else {\n // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n // * false: [ value ].slice( 0 ) => resolve( value )\n // * true: [ value ].slice( 1 ) => resolve()\n resolve.apply(undefined, [value].slice(noValue));\n }\n\n // For Promises/A+, convert exceptions into rejections\n // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n // Deferred#then to conditionally suppress rejection.\n } catch (value) {\n // Support: Android 4.0 only\n // Strict mode functions invoked without .call/.apply get global-object context\n reject.apply(undefined, [value]);\n }\n }\n jQuery.extend({\n Deferred: function (func) {\n var tuples = [\n // action, add listener, callbacks,\n // ... .then handlers, argument index, [final state]\n [\"notify\", \"progress\", jQuery.Callbacks(\"memory\"), jQuery.Callbacks(\"memory\"), 2], [\"resolve\", \"done\", jQuery.Callbacks(\"once memory\"), jQuery.Callbacks(\"once memory\"), 0, \"resolved\"], [\"reject\", \"fail\", jQuery.Callbacks(\"once memory\"), jQuery.Callbacks(\"once memory\"), 1, \"rejected\"]],\n state = \"pending\",\n promise = {\n state: function () {\n return state;\n },\n always: function () {\n deferred.done(arguments).fail(arguments);\n return this;\n },\n \"catch\": function (fn) {\n return promise.then(null, fn);\n },\n // Keep pipe for back-compat\n pipe: function /* fnDone, fnFail, fnProgress */\n () {\n var fns = arguments;\n return jQuery.Deferred(function (newDefer) {\n jQuery.each(tuples, function (_i, tuple) {\n // Map tuples (progress, done, fail) to arguments (done, fail, progress)\n var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]];\n\n // deferred.progress(function() { bind to newDefer or newDefer.notify })\n // deferred.done(function() { bind to newDefer or newDefer.resolve })\n // deferred.fail(function() { bind to newDefer or newDefer.reject })\n deferred[tuple[1]](function () {\n var returned = fn && fn.apply(this, arguments);\n if (returned && isFunction(returned.promise)) {\n returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);\n } else {\n newDefer[tuple[0] + \"With\"](this, fn ? [returned] : arguments);\n }\n });\n });\n fns = null;\n }).promise();\n },\n then: function (onFulfilled, onRejected, onProgress) {\n var maxDepth = 0;\n function resolve(depth, deferred, handler, special) {\n return function () {\n var that = this,\n args = arguments,\n mightThrow = function () {\n var returned, then;\n\n // Support: Promises/A+ section 2.3.3.3.3\n // https://promisesaplus.com/#point-59\n // Ignore double-resolution attempts\n if (depth < maxDepth) {\n return;\n }\n returned = handler.apply(that, args);\n\n // Support: Promises/A+ section 2.3.1\n // https://promisesaplus.com/#point-48\n if (returned === deferred.promise()) {\n throw new TypeError(\"Thenable self-resolution\");\n }\n\n // Support: Promises/A+ sections 2.3.3.1, 3.5\n // https://promisesaplus.com/#point-54\n // https://promisesaplus.com/#point-75\n // Retrieve `then` only once\n then = returned && (\n // Support: Promises/A+ section 2.3.4\n // https://promisesaplus.com/#point-64\n // Only check objects and functions for thenability\n typeof returned === \"object\" || typeof returned === \"function\") && returned.then;\n\n // Handle a returned thenable\n if (isFunction(then)) {\n // Special processors (notify) just wait for resolution\n if (special) {\n then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special));\n\n // Normal processors (resolve) also hook into progress\n } else {\n // ...and disregard older resolution values\n maxDepth++;\n then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special), resolve(maxDepth, deferred, Identity, deferred.notifyWith));\n }\n\n // Handle all other returned values\n } else {\n // Only substitute handlers pass on context\n // and multiple values (non-spec behavior)\n if (handler !== Identity) {\n that = undefined;\n args = [returned];\n }\n\n // Process the value(s)\n // Default process is resolve\n (special || deferred.resolveWith)(that, args);\n }\n },\n // Only normal processors (resolve) catch and reject exceptions\n process = special ? mightThrow : function () {\n try {\n mightThrow();\n } catch (e) {\n if (jQuery.Deferred.exceptionHook) {\n jQuery.Deferred.exceptionHook(e, process.stackTrace);\n }\n\n // Support: Promises/A+ section 2.3.3.3.4.1\n // https://promisesaplus.com/#point-61\n // Ignore post-resolution exceptions\n if (depth + 1 >= maxDepth) {\n // Only substitute handlers pass on context\n // and multiple values (non-spec behavior)\n if (handler !== Thrower) {\n that = undefined;\n args = [e];\n }\n deferred.rejectWith(that, args);\n }\n }\n };\n\n // Support: Promises/A+ section 2.3.3.3.1\n // https://promisesaplus.com/#point-57\n // Re-resolve promises immediately to dodge false rejection from\n // subsequent errors\n if (depth) {\n process();\n } else {\n // Call an optional hook to record the stack, in case of exception\n // since it's otherwise lost when execution goes async\n if (jQuery.Deferred.getStackHook) {\n process.stackTrace = jQuery.Deferred.getStackHook();\n }\n window.setTimeout(process);\n }\n };\n }\n return jQuery.Deferred(function (newDefer) {\n // progress_handlers.add( ... )\n tuples[0][3].add(resolve(0, newDefer, isFunction(onProgress) ? onProgress : Identity, newDefer.notifyWith));\n\n // fulfilled_handlers.add( ... )\n tuples[1][3].add(resolve(0, newDefer, isFunction(onFulfilled) ? onFulfilled : Identity));\n\n // rejected_handlers.add( ... )\n tuples[2][3].add(resolve(0, newDefer, isFunction(onRejected) ? onRejected : Thrower));\n }).promise();\n },\n // Get a promise for this deferred\n // If obj is provided, the promise aspect is added to the object\n promise: function (obj) {\n return obj != null ? jQuery.extend(obj, promise) : promise;\n }\n },\n deferred = {};\n\n // Add list-specific methods\n jQuery.each(tuples, function (i, tuple) {\n var list = tuple[2],\n stateString = tuple[5];\n\n // promise.progress = list.add\n // promise.done = list.add\n // promise.fail = list.add\n promise[tuple[1]] = list.add;\n\n // Handle state\n if (stateString) {\n list.add(function () {\n // state = \"resolved\" (i.e., fulfilled)\n // state = \"rejected\"\n state = stateString;\n },\n // rejected_callbacks.disable\n // fulfilled_callbacks.disable\n tuples[3 - i][2].disable,\n // rejected_handlers.disable\n // fulfilled_handlers.disable\n tuples[3 - i][3].disable,\n // progress_callbacks.lock\n tuples[0][2].lock,\n // progress_handlers.lock\n tuples[0][3].lock);\n }\n\n // progress_handlers.fire\n // fulfilled_handlers.fire\n // rejected_handlers.fire\n list.add(tuple[3].fire);\n\n // deferred.notify = function() { deferred.notifyWith(...) }\n // deferred.resolve = function() { deferred.resolveWith(...) }\n // deferred.reject = function() { deferred.rejectWith(...) }\n deferred[tuple[0]] = function () {\n deferred[tuple[0] + \"With\"](this === deferred ? undefined : this, arguments);\n return this;\n };\n\n // deferred.notifyWith = list.fireWith\n // deferred.resolveWith = list.fireWith\n // deferred.rejectWith = list.fireWith\n deferred[tuple[0] + \"With\"] = list.fireWith;\n });\n\n // Make the deferred a promise\n promise.promise(deferred);\n\n // Call given func if any\n if (func) {\n func.call(deferred, deferred);\n }\n\n // All done!\n return deferred;\n },\n // Deferred helper\n when: function (singleValue) {\n var\n // count of uncompleted subordinates\n remaining = arguments.length,\n // count of unprocessed arguments\n i = remaining,\n // subordinate fulfillment data\n resolveContexts = Array(i),\n resolveValues = slice.call(arguments),\n // the primary Deferred\n primary = jQuery.Deferred(),\n // subordinate callback factory\n updateFunc = function (i) {\n return function (value) {\n resolveContexts[i] = this;\n resolveValues[i] = arguments.length > 1 ? slice.call(arguments) : value;\n if (! --remaining) {\n primary.resolveWith(resolveContexts, resolveValues);\n }\n };\n };\n\n // Single- and empty arguments are adopted like Promise.resolve\n if (remaining <= 1) {\n adoptValue(singleValue, primary.done(updateFunc(i)).resolve, primary.reject, !remaining);\n\n // Use .then() to unwrap secondary thenables (cf. gh-3000)\n if (primary.state() === \"pending\" || isFunction(resolveValues[i] && resolveValues[i].then)) {\n return primary.then();\n }\n }\n\n // Multiple arguments are aggregated like Promise.all array elements\n while (i--) {\n adoptValue(resolveValues[i], updateFunc(i), primary.reject);\n }\n return primary.promise();\n }\n });\n\n // These usually indicate a programmer mistake during development,\n // warn about them ASAP rather than swallowing them by default.\n var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n jQuery.Deferred.exceptionHook = function (error, stack) {\n // Support: IE 8 - 9 only\n // Console exists when dev tools are open, which can happen at any time\n if (window.console && window.console.warn && error && rerrorNames.test(error.name)) {\n window.console.warn(\"jQuery.Deferred exception: \" + error.message, error.stack, stack);\n }\n };\n jQuery.readyException = function (error) {\n window.setTimeout(function () {\n throw error;\n });\n };\n\n // The deferred used on DOM ready\n var readyList = jQuery.Deferred();\n jQuery.fn.ready = function (fn) {\n readyList.then(fn)\n\n // Wrap jQuery.readyException in a function so that the lookup\n // happens at the time of error handling instead of callback\n // registration.\n .catch(function (error) {\n jQuery.readyException(error);\n });\n return this;\n };\n jQuery.extend({\n // Is the DOM ready to be used? Set to true once it occurs.\n isReady: false,\n // A counter to track how many items to wait for before\n // the ready event fires. See trac-6781\n readyWait: 1,\n // Handle when the DOM is ready\n ready: function (wait) {\n // Abort if there are pending holds or we're already ready\n if (wait === true ? --jQuery.readyWait : jQuery.isReady) {\n return;\n }\n\n // Remember that the DOM is ready\n jQuery.isReady = true;\n\n // If a normal DOM Ready event fired, decrement, and wait if need be\n if (wait !== true && --jQuery.readyWait > 0) {\n return;\n }\n\n // If there are functions bound, to execute\n readyList.resolveWith(document, [jQuery]);\n }\n });\n jQuery.ready.then = readyList.then;\n\n // The ready event handler and self cleanup method\n function completed() {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n jQuery.ready();\n }\n\n // Catch cases where $(document).ready() is called\n // after the browser event has already occurred.\n // Support: IE <=9 - 10 only\n // Older IE sometimes signals \"interactive\" too soon\n if (document.readyState === \"complete\" || document.readyState !== \"loading\" && !document.documentElement.doScroll) {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n window.setTimeout(jQuery.ready);\n } else {\n // Use the handy event callback\n document.addEventListener(\"DOMContentLoaded\", completed);\n\n // A fallback to window.onload, that will always work\n window.addEventListener(\"load\", completed);\n }\n\n // Multifunctional method to get and set values of a collection\n // The value/s can optionally be executed if it's a function\n var access = function (elems, fn, key, value, chainable, emptyGet, raw) {\n var i = 0,\n len = elems.length,\n bulk = key == null;\n\n // Sets many values\n if (toType(key) === \"object\") {\n chainable = true;\n for (i in key) {\n access(elems, fn, i, key[i], true, emptyGet, raw);\n }\n\n // Sets one value\n } else if (value !== undefined) {\n chainable = true;\n if (!isFunction(value)) {\n raw = true;\n }\n if (bulk) {\n // Bulk operations run against the entire set\n if (raw) {\n fn.call(elems, value);\n fn = null;\n\n // ...except when executing function values\n } else {\n bulk = fn;\n fn = function (elem, _key, value) {\n return bulk.call(jQuery(elem), value);\n };\n }\n }\n if (fn) {\n for (; i < len; i++) {\n fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));\n }\n }\n }\n if (chainable) {\n return elems;\n }\n\n // Gets\n if (bulk) {\n return fn.call(elems);\n }\n return len ? fn(elems[0], key) : emptyGet;\n };\n\n // Matches dashed string for camelizing\n var rmsPrefix = /^-ms-/,\n rdashAlpha = /-([a-z])/g;\n\n // Used by camelCase as callback to replace()\n function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n }\n\n // Convert dashed to camelCase; used by the css and data modules\n // Support: IE <=9 - 11, Edge 12 - 15\n // Microsoft forgot to hump their vendor prefix (trac-9572)\n function camelCase(string) {\n return string.replace(rmsPrefix, \"ms-\").replace(rdashAlpha, fcamelCase);\n }\n var acceptData = function (owner) {\n // Accepts only:\n // - Node\n // - Node.ELEMENT_NODE\n // - Node.DOCUMENT_NODE\n // - Object\n // - Any\n return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType;\n };\n function Data() {\n this.expando = jQuery.expando + Data.uid++;\n }\n Data.uid = 1;\n Data.prototype = {\n cache: function (owner) {\n // Check if the owner object already has a cache\n var value = owner[this.expando];\n\n // If not, create one\n if (!value) {\n value = {};\n\n // We can accept data for non-element nodes in modern browsers,\n // but we should not, see trac-8335.\n // Always return an empty object.\n if (acceptData(owner)) {\n // If it is a node unlikely to be stringify-ed or looped over\n // use plain assignment\n if (owner.nodeType) {\n owner[this.expando] = value;\n\n // Otherwise secure it in a non-enumerable property\n // configurable must be true to allow the property to be\n // deleted when data is removed\n } else {\n Object.defineProperty(owner, this.expando, {\n value: value,\n configurable: true\n });\n }\n }\n }\n return value;\n },\n set: function (owner, data, value) {\n var prop,\n cache = this.cache(owner);\n\n // Handle: [ owner, key, value ] args\n // Always use camelCase key (gh-2257)\n if (typeof data === \"string\") {\n cache[camelCase(data)] = value;\n\n // Handle: [ owner, { properties } ] args\n } else {\n // Copy the properties one-by-one to the cache object\n for (prop in data) {\n cache[camelCase(prop)] = data[prop];\n }\n }\n return cache;\n },\n get: function (owner, key) {\n return key === undefined ? this.cache(owner) :\n // Always use camelCase key (gh-2257)\n owner[this.expando] && owner[this.expando][camelCase(key)];\n },\n access: function (owner, key, value) {\n // In cases where either:\n //\n // 1. No key was specified\n // 2. A string key was specified, but no value provided\n //\n // Take the \"read\" path and allow the get method to determine\n // which value to return, respectively either:\n //\n // 1. The entire cache object\n // 2. The data stored at the key\n //\n if (key === undefined || key && typeof key === \"string\" && value === undefined) {\n return this.get(owner, key);\n }\n\n // When the key is not a string, or both a key and value\n // are specified, set or extend (existing objects) with either:\n //\n // 1. An object of properties\n // 2. A key and value\n //\n this.set(owner, key, value);\n\n // Since the \"set\" path can have two possible entry points\n // return the expected data based on which path was taken[*]\n return value !== undefined ? value : key;\n },\n remove: function (owner, key) {\n var i,\n cache = owner[this.expando];\n if (cache === undefined) {\n return;\n }\n if (key !== undefined) {\n // Support array or space separated string of keys\n if (Array.isArray(key)) {\n // If key is an array of keys...\n // We always set camelCase keys, so remove that.\n key = key.map(camelCase);\n } else {\n key = camelCase(key);\n\n // If a key with the spaces exists, use it.\n // Otherwise, create an array by matching non-whitespace\n key = key in cache ? [key] : key.match(rnothtmlwhite) || [];\n }\n i = key.length;\n while (i--) {\n delete cache[key[i]];\n }\n }\n\n // Remove the expando if there's no more data\n if (key === undefined || jQuery.isEmptyObject(cache)) {\n // Support: Chrome <=35 - 45\n // Webkit & Blink performance suffers when deleting properties\n // from DOM nodes, so set to undefined instead\n // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n if (owner.nodeType) {\n owner[this.expando] = undefined;\n } else {\n delete owner[this.expando];\n }\n }\n },\n hasData: function (owner) {\n var cache = owner[this.expando];\n return cache !== undefined && !jQuery.isEmptyObject(cache);\n }\n };\n var dataPriv = new Data();\n var dataUser = new Data();\n\n //\tImplementation Summary\n //\n //\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n //\t2. Improve the module's maintainability by reducing the storage\n //\t\tpaths to a single mechanism.\n //\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n //\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n //\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n //\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\n var rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n rmultiDash = /[A-Z]/g;\n function getData(data) {\n if (data === \"true\") {\n return true;\n }\n if (data === \"false\") {\n return false;\n }\n if (data === \"null\") {\n return null;\n }\n\n // Only convert to a number if it doesn't change the string\n if (data === +data + \"\") {\n return +data;\n }\n if (rbrace.test(data)) {\n return JSON.parse(data);\n }\n return data;\n }\n function dataAttr(elem, key, data) {\n var name;\n\n // If nothing was found internally, try to fetch any\n // data from the HTML5 data-* attribute\n if (data === undefined && elem.nodeType === 1) {\n name = \"data-\" + key.replace(rmultiDash, \"-$&\").toLowerCase();\n data = elem.getAttribute(name);\n if (typeof data === \"string\") {\n try {\n data = getData(data);\n } catch (e) {}\n\n // Make sure we set the data so it isn't changed later\n dataUser.set(elem, key, data);\n } else {\n data = undefined;\n }\n }\n return data;\n }\n jQuery.extend({\n hasData: function (elem) {\n return dataUser.hasData(elem) || dataPriv.hasData(elem);\n },\n data: function (elem, name, data) {\n return dataUser.access(elem, name, data);\n },\n removeData: function (elem, name) {\n dataUser.remove(elem, name);\n },\n // TODO: Now that all calls to _data and _removeData have been replaced\n // with direct calls to dataPriv methods, these can be deprecated.\n _data: function (elem, name, data) {\n return dataPriv.access(elem, name, data);\n },\n _removeData: function (elem, name) {\n dataPriv.remove(elem, name);\n }\n });\n jQuery.fn.extend({\n data: function (key, value) {\n var i,\n name,\n data,\n elem = this[0],\n attrs = elem && elem.attributes;\n\n // Gets all values\n if (key === undefined) {\n if (this.length) {\n data = dataUser.get(elem);\n if (elem.nodeType === 1 && !dataPriv.get(elem, \"hasDataAttrs\")) {\n i = attrs.length;\n while (i--) {\n // Support: IE 11 only\n // The attrs elements can be null (trac-14894)\n if (attrs[i]) {\n name = attrs[i].name;\n if (name.indexOf(\"data-\") === 0) {\n name = camelCase(name.slice(5));\n dataAttr(elem, name, data[name]);\n }\n }\n }\n dataPriv.set(elem, \"hasDataAttrs\", true);\n }\n }\n return data;\n }\n\n // Sets multiple values\n if (typeof key === \"object\") {\n return this.each(function () {\n dataUser.set(this, key);\n });\n }\n return access(this, function (value) {\n var data;\n\n // The calling jQuery object (element matches) is not empty\n // (and therefore has an element appears at this[ 0 ]) and the\n // `value` parameter was not undefined. An empty jQuery object\n // will result in `undefined` for elem = this[ 0 ] which will\n // throw an exception if an attempt to read a data cache is made.\n if (elem && value === undefined) {\n // Attempt to get data from the cache\n // The key will always be camelCased in Data\n data = dataUser.get(elem, key);\n if (data !== undefined) {\n return data;\n }\n\n // Attempt to \"discover\" the data in\n // HTML5 custom data-* attrs\n data = dataAttr(elem, key);\n if (data !== undefined) {\n return data;\n }\n\n // We tried really hard, but the data doesn't exist.\n return;\n }\n\n // Set the data...\n this.each(function () {\n // We always store the camelCased key\n dataUser.set(this, key, value);\n });\n }, null, value, arguments.length > 1, null, true);\n },\n removeData: function (key) {\n return this.each(function () {\n dataUser.remove(this, key);\n });\n }\n });\n jQuery.extend({\n queue: function (elem, type, data) {\n var queue;\n if (elem) {\n type = (type || \"fx\") + \"queue\";\n queue = dataPriv.get(elem, type);\n\n // Speed up dequeue by getting out quickly if this is just a lookup\n if (data) {\n if (!queue || Array.isArray(data)) {\n queue = dataPriv.access(elem, type, jQuery.makeArray(data));\n } else {\n queue.push(data);\n }\n }\n return queue || [];\n }\n },\n dequeue: function (elem, type) {\n type = type || \"fx\";\n var queue = jQuery.queue(elem, type),\n startLength = queue.length,\n fn = queue.shift(),\n hooks = jQuery._queueHooks(elem, type),\n next = function () {\n jQuery.dequeue(elem, type);\n };\n\n // If the fx queue is dequeued, always remove the progress sentinel\n if (fn === \"inprogress\") {\n fn = queue.shift();\n startLength--;\n }\n if (fn) {\n // Add a progress sentinel to prevent the fx queue from being\n // automatically dequeued\n if (type === \"fx\") {\n queue.unshift(\"inprogress\");\n }\n\n // Clear up the last queue stop function\n delete hooks.stop;\n fn.call(elem, next, hooks);\n }\n if (!startLength && hooks) {\n hooks.empty.fire();\n }\n },\n // Not public - generate a queueHooks object, or return the current one\n _queueHooks: function (elem, type) {\n var key = type + \"queueHooks\";\n return dataPriv.get(elem, key) || dataPriv.access(elem, key, {\n empty: jQuery.Callbacks(\"once memory\").add(function () {\n dataPriv.remove(elem, [type + \"queue\", key]);\n })\n });\n }\n });\n jQuery.fn.extend({\n queue: function (type, data) {\n var setter = 2;\n if (typeof type !== \"string\") {\n data = type;\n type = \"fx\";\n setter--;\n }\n if (arguments.length < setter) {\n return jQuery.queue(this[0], type);\n }\n return data === undefined ? this : this.each(function () {\n var queue = jQuery.queue(this, type, data);\n\n // Ensure a hooks for this queue\n jQuery._queueHooks(this, type);\n if (type === \"fx\" && queue[0] !== \"inprogress\") {\n jQuery.dequeue(this, type);\n }\n });\n },\n dequeue: function (type) {\n return this.each(function () {\n jQuery.dequeue(this, type);\n });\n },\n clearQueue: function (type) {\n return this.queue(type || \"fx\", []);\n },\n // Get a promise resolved when queues of a certain type\n // are emptied (fx is the type by default)\n promise: function (type, obj) {\n var tmp,\n count = 1,\n defer = jQuery.Deferred(),\n elements = this,\n i = this.length,\n resolve = function () {\n if (! --count) {\n defer.resolveWith(elements, [elements]);\n }\n };\n if (typeof type !== \"string\") {\n obj = type;\n type = undefined;\n }\n type = type || \"fx\";\n while (i--) {\n tmp = dataPriv.get(elements[i], type + \"queueHooks\");\n if (tmp && tmp.empty) {\n count++;\n tmp.empty.add(resolve);\n }\n }\n resolve();\n return defer.promise(obj);\n }\n });\n var pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source;\n var rcssNum = new RegExp(\"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\");\n var cssExpand = [\"Top\", \"Right\", \"Bottom\", \"Left\"];\n var documentElement = document.documentElement;\n var isAttached = function (elem) {\n return jQuery.contains(elem.ownerDocument, elem);\n },\n composed = {\n composed: true\n };\n\n // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n // Check attachment across shadow DOM boundaries when possible (gh-3504)\n // Support: iOS 10.0-10.2 only\n // Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n // leading to errors. We need to check for `getRootNode`.\n if (documentElement.getRootNode) {\n isAttached = function (elem) {\n return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument;\n };\n }\n var isHiddenWithinTree = function (elem, el) {\n // isHiddenWithinTree might be called from jQuery#filter function;\n // in that case, element will be second argument\n elem = el || elem;\n\n // Inline style trumps all\n return elem.style.display === \"none\" || elem.style.display === \"\" &&\n // Otherwise, check computed style\n // Support: Firefox <=43 - 45\n // Disconnected elements can have computed display: none, so first confirm that elem is\n // in the document.\n isAttached(elem) && jQuery.css(elem, \"display\") === \"none\";\n };\n function adjustCSS(elem, prop, valueParts, tween) {\n var adjusted,\n scale,\n maxIterations = 20,\n currentValue = tween ? function () {\n return tween.cur();\n } : function () {\n return jQuery.css(elem, prop, \"\");\n },\n initial = currentValue(),\n unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? \"\" : \"px\"),\n // Starting value computation is required for potential unit mismatches\n initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== \"px\" && +initial) && rcssNum.exec(jQuery.css(elem, prop));\n if (initialInUnit && initialInUnit[3] !== unit) {\n // Support: Firefox <=54\n // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n initial = initial / 2;\n\n // Trust units reported by jQuery.css\n unit = unit || initialInUnit[3];\n\n // Iteratively approximate from a nonzero starting point\n initialInUnit = +initial || 1;\n while (maxIterations--) {\n // Evaluate and update our best guess (doubling guesses that zero out).\n // Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n jQuery.style(elem, prop, initialInUnit + unit);\n if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) {\n maxIterations = 0;\n }\n initialInUnit = initialInUnit / scale;\n }\n initialInUnit = initialInUnit * 2;\n jQuery.style(elem, prop, initialInUnit + unit);\n\n // Make sure we update the tween properties later on\n valueParts = valueParts || [];\n }\n if (valueParts) {\n initialInUnit = +initialInUnit || +initial || 0;\n\n // Apply relative offset (+=/-=) if specified\n adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2];\n if (tween) {\n tween.unit = unit;\n tween.start = initialInUnit;\n tween.end = adjusted;\n }\n }\n return adjusted;\n }\n var defaultDisplayMap = {};\n function getDefaultDisplay(elem) {\n var temp,\n doc = elem.ownerDocument,\n nodeName = elem.nodeName,\n display = defaultDisplayMap[nodeName];\n if (display) {\n return display;\n }\n temp = doc.body.appendChild(doc.createElement(nodeName));\n display = jQuery.css(temp, \"display\");\n temp.parentNode.removeChild(temp);\n if (display === \"none\") {\n display = \"block\";\n }\n defaultDisplayMap[nodeName] = display;\n return display;\n }\n function showHide(elements, show) {\n var display,\n elem,\n values = [],\n index = 0,\n length = elements.length;\n\n // Determine new display value for elements that need to change\n for (; index < length; index++) {\n elem = elements[index];\n if (!elem.style) {\n continue;\n }\n display = elem.style.display;\n if (show) {\n // Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n // check is required in this first loop unless we have a nonempty display value (either\n // inline or about-to-be-restored)\n if (display === \"none\") {\n values[index] = dataPriv.get(elem, \"display\") || null;\n if (!values[index]) {\n elem.style.display = \"\";\n }\n }\n if (elem.style.display === \"\" && isHiddenWithinTree(elem)) {\n values[index] = getDefaultDisplay(elem);\n }\n } else {\n if (display !== \"none\") {\n values[index] = \"none\";\n\n // Remember what we're overwriting\n dataPriv.set(elem, \"display\", display);\n }\n }\n }\n\n // Set the display of the elements in a second loop to avoid constant reflow\n for (index = 0; index < length; index++) {\n if (values[index] != null) {\n elements[index].style.display = values[index];\n }\n }\n return elements;\n }\n jQuery.fn.extend({\n show: function () {\n return showHide(this, true);\n },\n hide: function () {\n return showHide(this);\n },\n toggle: function (state) {\n if (typeof state === \"boolean\") {\n return state ? this.show() : this.hide();\n }\n return this.each(function () {\n if (isHiddenWithinTree(this)) {\n jQuery(this).show();\n } else {\n jQuery(this).hide();\n }\n });\n }\n });\n var rcheckableType = /^(?:checkbox|radio)$/i;\n var rtagName = /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i;\n var rscriptType = /^$|^module$|\\/(?:java|ecma)script/i;\n (function () {\n var fragment = document.createDocumentFragment(),\n div = fragment.appendChild(document.createElement(\"div\")),\n input = document.createElement(\"input\");\n\n // Support: Android 4.0 - 4.3 only\n // Check state lost if the name is set (trac-11217)\n // Support: Windows Web Apps (WWA)\n // `name` and `type` must use .setAttribute for WWA (trac-14901)\n input.setAttribute(\"type\", \"radio\");\n input.setAttribute(\"checked\", \"checked\");\n input.setAttribute(\"name\", \"t\");\n div.appendChild(input);\n\n // Support: Android <=4.1 only\n // Older WebKit doesn't clone checked state correctly in fragments\n support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;\n\n // Support: IE <=11 only\n // Make sure textarea (and checkbox) defaultValue is properly cloned\n div.innerHTML = \"\";\n support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;\n\n // Support: IE <=9 only\n // IE <=9 replaces tags with their contents when inserted outside of\n // the select element.\n div.innerHTML = \" \";\n support.option = !!div.lastChild;\n })();\n\n // We have to close these tags to support XHTML (trac-13200)\n var wrapMap = {\n // XHTML parsers do not magically insert elements in the\n // same way that tag soup parsers do. So we cannot shorten\n // this by omitting or other required elements.\n thead: [1, \"\"],\n col: [2, \"\"],\n tr: [2, \"\"],\n td: [3, \"\"],\n _default: [0, \"\", \"\"]\n };\n wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\n wrapMap.th = wrapMap.td;\n\n // Support: IE <=9 only\n if (!support.option) {\n wrapMap.optgroup = wrapMap.option = [1, \"\", \" \"];\n }\n function getAll(context, tag) {\n // Support: IE <=9 - 11 only\n // Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n var ret;\n if (typeof context.getElementsByTagName !== \"undefined\") {\n ret = context.getElementsByTagName(tag || \"*\");\n } else if (typeof context.querySelectorAll !== \"undefined\") {\n ret = context.querySelectorAll(tag || \"*\");\n } else {\n ret = [];\n }\n if (tag === undefined || tag && nodeName(context, tag)) {\n return jQuery.merge([context], ret);\n }\n return ret;\n }\n\n // Mark scripts as having already been evaluated\n function setGlobalEval(elems, refElements) {\n var i = 0,\n l = elems.length;\n for (; i < l; i++) {\n dataPriv.set(elems[i], \"globalEval\", !refElements || dataPriv.get(refElements[i], \"globalEval\"));\n }\n }\n var rhtml = /<|?\\w+;/;\n function buildFragment(elems, context, scripts, selection, ignored) {\n var elem,\n tmp,\n tag,\n wrap,\n attached,\n j,\n fragment = context.createDocumentFragment(),\n nodes = [],\n i = 0,\n l = elems.length;\n for (; i < l; i++) {\n elem = elems[i];\n if (elem || elem === 0) {\n // Add nodes directly\n if (toType(elem) === \"object\") {\n // Support: Android <=4.0 only, PhantomJS 1 only\n // push.apply(_, arraylike) throws on ancient WebKit\n jQuery.merge(nodes, elem.nodeType ? [elem] : elem);\n\n // Convert non-html into a text node\n } else if (!rhtml.test(elem)) {\n nodes.push(context.createTextNode(elem));\n\n // Convert html into DOM nodes\n } else {\n tmp = tmp || fragment.appendChild(context.createElement(\"div\"));\n\n // Deserialize a standard representation\n tag = (rtagName.exec(elem) || [\"\", \"\"])[1].toLowerCase();\n wrap = wrapMap[tag] || wrapMap._default;\n tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];\n\n // Descend through wrappers to the right content\n j = wrap[0];\n while (j--) {\n tmp = tmp.lastChild;\n }\n\n // Support: Android <=4.0 only, PhantomJS 1 only\n // push.apply(_, arraylike) throws on ancient WebKit\n jQuery.merge(nodes, tmp.childNodes);\n\n // Remember the top-level container\n tmp = fragment.firstChild;\n\n // Ensure the created nodes are orphaned (trac-12392)\n tmp.textContent = \"\";\n }\n }\n }\n\n // Remove wrapper from fragment\n fragment.textContent = \"\";\n i = 0;\n while (elem = nodes[i++]) {\n // Skip elements already in the context collection (trac-4087)\n if (selection && jQuery.inArray(elem, selection) > -1) {\n if (ignored) {\n ignored.push(elem);\n }\n continue;\n }\n attached = isAttached(elem);\n\n // Append to fragment\n tmp = getAll(fragment.appendChild(elem), \"script\");\n\n // Preserve script evaluation history\n if (attached) {\n setGlobalEval(tmp);\n }\n\n // Capture executables\n if (scripts) {\n j = 0;\n while (elem = tmp[j++]) {\n if (rscriptType.test(elem.type || \"\")) {\n scripts.push(elem);\n }\n }\n }\n }\n return fragment;\n }\n var rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n function returnTrue() {\n return true;\n }\n function returnFalse() {\n return false;\n }\n\n // Support: IE <=9 - 11+\n // focus() and blur() are asynchronous, except when they are no-op.\n // So expect focus to be synchronous when the element is already active,\n // and blur to be synchronous when the element is not already active.\n // (focus and blur are always synchronous in other supported browsers,\n // this just defines when we can count on it).\n function expectSync(elem, type) {\n return elem === safeActiveElement() === (type === \"focus\");\n }\n\n // Support: IE <=9 only\n // Accessing document.activeElement can throw unexpectedly\n // https://bugs.jquery.com/ticket/13393\n function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }\n function on(elem, types, selector, data, fn, one) {\n var origFn, type;\n\n // Types can be a map of types/handlers\n if (typeof types === \"object\") {\n // ( types-Object, selector, data )\n if (typeof selector !== \"string\") {\n // ( types-Object, data )\n data = data || selector;\n selector = undefined;\n }\n for (type in types) {\n on(elem, type, selector, data, types[type], one);\n }\n return elem;\n }\n if (data == null && fn == null) {\n // ( types, fn )\n fn = selector;\n data = selector = undefined;\n } else if (fn == null) {\n if (typeof selector === \"string\") {\n // ( types, selector, fn )\n fn = data;\n data = undefined;\n } else {\n // ( types, data, fn )\n fn = data;\n data = selector;\n selector = undefined;\n }\n }\n if (fn === false) {\n fn = returnFalse;\n } else if (!fn) {\n return elem;\n }\n if (one === 1) {\n origFn = fn;\n fn = function (event) {\n // Can use an empty set, since event contains the info\n jQuery().off(event);\n return origFn.apply(this, arguments);\n };\n\n // Use same guid so caller can remove using origFn\n fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);\n }\n return elem.each(function () {\n jQuery.event.add(this, types, fn, data, selector);\n });\n }\n\n /*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\n jQuery.event = {\n global: {},\n add: function (elem, types, handler, data, selector) {\n var handleObjIn,\n eventHandle,\n tmp,\n events,\n t,\n handleObj,\n special,\n handlers,\n type,\n namespaces,\n origType,\n elemData = dataPriv.get(elem);\n\n // Only attach events to objects that accept data\n if (!acceptData(elem)) {\n return;\n }\n\n // Caller can pass in an object of custom data in lieu of the handler\n if (handler.handler) {\n handleObjIn = handler;\n handler = handleObjIn.handler;\n selector = handleObjIn.selector;\n }\n\n // Ensure that invalid selectors throw exceptions at attach time\n // Evaluate against documentElement in case elem is a non-element node (e.g., document)\n if (selector) {\n jQuery.find.matchesSelector(documentElement, selector);\n }\n\n // Make sure that the handler has a unique ID, used to find/remove it later\n if (!handler.guid) {\n handler.guid = jQuery.guid++;\n }\n\n // Init the element's event structure and main handler, if this is the first\n if (!(events = elemData.events)) {\n events = elemData.events = Object.create(null);\n }\n if (!(eventHandle = elemData.handle)) {\n eventHandle = elemData.handle = function (e) {\n // Discard the second event of a jQuery.event.trigger() and\n // when an event is called after a page has unloaded\n return typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : undefined;\n };\n }\n\n // Handle multiple events separated by a space\n types = (types || \"\").match(rnothtmlwhite) || [\"\"];\n t = types.length;\n while (t--) {\n tmp = rtypenamespace.exec(types[t]) || [];\n type = origType = tmp[1];\n namespaces = (tmp[2] || \"\").split(\".\").sort();\n\n // There *must* be a type, no attaching namespace-only handlers\n if (!type) {\n continue;\n }\n\n // If event changes its type, use the special event handlers for the changed type\n special = jQuery.event.special[type] || {};\n\n // If selector defined, determine special event api type, otherwise given type\n type = (selector ? special.delegateType : special.bindType) || type;\n\n // Update special based on newly reset type\n special = jQuery.event.special[type] || {};\n\n // handleObj is passed to all event handlers\n handleObj = jQuery.extend({\n type: type,\n origType: origType,\n data: data,\n handler: handler,\n guid: handler.guid,\n selector: selector,\n needsContext: selector && jQuery.expr.match.needsContext.test(selector),\n namespace: namespaces.join(\".\")\n }, handleObjIn);\n\n // Init the event handler queue if we're the first\n if (!(handlers = events[type])) {\n handlers = events[type] = [];\n handlers.delegateCount = 0;\n\n // Only use addEventListener if the special events handler returns false\n if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {\n if (elem.addEventListener) {\n elem.addEventListener(type, eventHandle);\n }\n }\n }\n if (special.add) {\n special.add.call(elem, handleObj);\n if (!handleObj.handler.guid) {\n handleObj.handler.guid = handler.guid;\n }\n }\n\n // Add to the element's handler list, delegates in front\n if (selector) {\n handlers.splice(handlers.delegateCount++, 0, handleObj);\n } else {\n handlers.push(handleObj);\n }\n\n // Keep track of which events have ever been used, for event optimization\n jQuery.event.global[type] = true;\n }\n },\n // Detach an event or set of events from an element\n remove: function (elem, types, handler, selector, mappedTypes) {\n var j,\n origCount,\n tmp,\n events,\n t,\n handleObj,\n special,\n handlers,\n type,\n namespaces,\n origType,\n elemData = dataPriv.hasData(elem) && dataPriv.get(elem);\n if (!elemData || !(events = elemData.events)) {\n return;\n }\n\n // Once for each type.namespace in types; type may be omitted\n types = (types || \"\").match(rnothtmlwhite) || [\"\"];\n t = types.length;\n while (t--) {\n tmp = rtypenamespace.exec(types[t]) || [];\n type = origType = tmp[1];\n namespaces = (tmp[2] || \"\").split(\".\").sort();\n\n // Unbind all events (on this namespace, if provided) for the element\n if (!type) {\n for (type in events) {\n jQuery.event.remove(elem, type + types[t], handler, selector, true);\n }\n continue;\n }\n special = jQuery.event.special[type] || {};\n type = (selector ? special.delegateType : special.bindType) || type;\n handlers = events[type] || [];\n tmp = tmp[2] && new RegExp(\"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\");\n\n // Remove matching events\n origCount = j = handlers.length;\n while (j--) {\n handleObj = handlers[j];\n if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector)) {\n handlers.splice(j, 1);\n if (handleObj.selector) {\n handlers.delegateCount--;\n }\n if (special.remove) {\n special.remove.call(elem, handleObj);\n }\n }\n }\n\n // Remove generic event handler if we removed something and no more handlers exist\n // (avoids potential for endless recursion during removal of special event handlers)\n if (origCount && !handlers.length) {\n if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {\n jQuery.removeEvent(elem, type, elemData.handle);\n }\n delete events[type];\n }\n }\n\n // Remove data and the expando if it's no longer used\n if (jQuery.isEmptyObject(events)) {\n dataPriv.remove(elem, \"handle events\");\n }\n },\n dispatch: function (nativeEvent) {\n var i,\n j,\n ret,\n matched,\n handleObj,\n handlerQueue,\n args = new Array(arguments.length),\n // Make a writable jQuery.Event from the native event object\n event = jQuery.event.fix(nativeEvent),\n handlers = (dataPriv.get(this, \"events\") || Object.create(null))[event.type] || [],\n special = jQuery.event.special[event.type] || {};\n\n // Use the fix-ed jQuery.Event rather than the (read-only) native event\n args[0] = event;\n for (i = 1; i < arguments.length; i++) {\n args[i] = arguments[i];\n }\n event.delegateTarget = this;\n\n // Call the preDispatch hook for the mapped type, and let it bail if desired\n if (special.preDispatch && special.preDispatch.call(this, event) === false) {\n return;\n }\n\n // Determine handlers\n handlerQueue = jQuery.event.handlers.call(this, event, handlers);\n\n // Run delegates first; they may want to stop propagation beneath us\n i = 0;\n while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {\n event.currentTarget = matched.elem;\n j = 0;\n while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {\n // If the event is namespaced, then each handler is only invoked if it is\n // specially universal or its namespaces are a superset of the event's.\n if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) {\n event.handleObj = handleObj;\n event.data = handleObj.data;\n ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);\n if (ret !== undefined) {\n if ((event.result = ret) === false) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n }\n }\n\n // Call the postDispatch hook for the mapped type\n if (special.postDispatch) {\n special.postDispatch.call(this, event);\n }\n return event.result;\n },\n handlers: function (event, handlers) {\n var i,\n handleObj,\n sel,\n matchedHandlers,\n matchedSelectors,\n handlerQueue = [],\n delegateCount = handlers.delegateCount,\n cur = event.target;\n\n // Find delegate handlers\n if (delegateCount &&\n // Support: IE <=9\n // Black-hole SVG instance trees (trac-13180)\n cur.nodeType &&\n // Support: Firefox <=42\n // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n // Support: IE 11 only\n // ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n !(event.type === \"click\" && event.button >= 1)) {\n for (; cur !== this; cur = cur.parentNode || this) {\n // Don't check non-elements (trac-13208)\n // Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n if (cur.nodeType === 1 && !(event.type === \"click\" && cur.disabled === true)) {\n matchedHandlers = [];\n matchedSelectors = {};\n for (i = 0; i < delegateCount; i++) {\n handleObj = handlers[i];\n\n // Don't conflict with Object.prototype properties (trac-13203)\n sel = handleObj.selector + \" \";\n if (matchedSelectors[sel] === undefined) {\n matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;\n }\n if (matchedSelectors[sel]) {\n matchedHandlers.push(handleObj);\n }\n }\n if (matchedHandlers.length) {\n handlerQueue.push({\n elem: cur,\n handlers: matchedHandlers\n });\n }\n }\n }\n }\n\n // Add the remaining (directly-bound) handlers\n cur = this;\n if (delegateCount < handlers.length) {\n handlerQueue.push({\n elem: cur,\n handlers: handlers.slice(delegateCount)\n });\n }\n return handlerQueue;\n },\n addProp: function (name, hook) {\n Object.defineProperty(jQuery.Event.prototype, name, {\n enumerable: true,\n configurable: true,\n get: isFunction(hook) ? function () {\n if (this.originalEvent) {\n return hook(this.originalEvent);\n }\n } : function () {\n if (this.originalEvent) {\n return this.originalEvent[name];\n }\n },\n set: function (value) {\n Object.defineProperty(this, name, {\n enumerable: true,\n configurable: true,\n writable: true,\n value: value\n });\n }\n });\n },\n fix: function (originalEvent) {\n return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent);\n },\n special: {\n load: {\n // Prevent triggered image.load events from bubbling to window.load\n noBubble: true\n },\n click: {\n // Utilize native event to ensure correct state for checkable inputs\n setup: function (data) {\n // For mutual compressibility with _default, replace `this` access with a local var.\n // `|| data` is dead code meant only to preserve the variable through minification.\n var el = this || data;\n\n // Claim the first handler\n if (rcheckableType.test(el.type) && el.click && nodeName(el, \"input\")) {\n // dataPriv.set( el, \"click\", ... )\n leverageNative(el, \"click\", returnTrue);\n }\n\n // Return false to allow normal processing in the caller\n return false;\n },\n trigger: function (data) {\n // For mutual compressibility with _default, replace `this` access with a local var.\n // `|| data` is dead code meant only to preserve the variable through minification.\n var el = this || data;\n\n // Force setup before triggering a click\n if (rcheckableType.test(el.type) && el.click && nodeName(el, \"input\")) {\n leverageNative(el, \"click\");\n }\n\n // Return non-false to allow normal event-path propagation\n return true;\n },\n // For cross-browser consistency, suppress native .click() on links\n // Also prevent it if we're currently inside a leveraged native-event stack\n _default: function (event) {\n var target = event.target;\n return rcheckableType.test(target.type) && target.click && nodeName(target, \"input\") && dataPriv.get(target, \"click\") || nodeName(target, \"a\");\n }\n },\n beforeunload: {\n postDispatch: function (event) {\n // Support: Firefox 20+\n // Firefox doesn't alert if the returnValue field is not set.\n if (event.result !== undefined && event.originalEvent) {\n event.originalEvent.returnValue = event.result;\n }\n }\n }\n }\n };\n\n // Ensure the presence of an event listener that handles manually-triggered\n // synthetic events by interrupting progress until reinvoked in response to\n // *native* events that it fires directly, ensuring that state changes have\n // already occurred before other listeners are invoked.\n function leverageNative(el, type, expectSync) {\n // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n if (!expectSync) {\n if (dataPriv.get(el, type) === undefined) {\n jQuery.event.add(el, type, returnTrue);\n }\n return;\n }\n\n // Register the controller as a special universal handler for all event namespaces\n dataPriv.set(el, type, false);\n jQuery.event.add(el, type, {\n namespace: false,\n handler: function (event) {\n var notAsync,\n result,\n saved = dataPriv.get(this, type);\n if (event.isTrigger & 1 && this[type]) {\n // Interrupt processing of the outer synthetic .trigger()ed event\n // Saved data should be false in such cases, but might be a leftover capture object\n // from an async native handler (gh-4350)\n if (!saved.length) {\n // Store arguments for use when handling the inner native event\n // There will always be at least one argument (an event object), so this array\n // will not be confused with a leftover capture object.\n saved = slice.call(arguments);\n dataPriv.set(this, type, saved);\n\n // Trigger the native event and capture its result\n // Support: IE <=9 - 11+\n // focus() and blur() are asynchronous\n notAsync = expectSync(this, type);\n this[type]();\n result = dataPriv.get(this, type);\n if (saved !== result || notAsync) {\n dataPriv.set(this, type, false);\n } else {\n result = {};\n }\n if (saved !== result) {\n // Cancel the outer synthetic event\n event.stopImmediatePropagation();\n event.preventDefault();\n\n // Support: Chrome 86+\n // In Chrome, if an element having a focusout handler is blurred by\n // clicking outside of it, it invokes the handler synchronously. If\n // that handler calls `.remove()` on the element, the data is cleared,\n // leaving `result` undefined. We need to guard against this.\n return result && result.value;\n }\n\n // If this is an inner synthetic event for an event with a bubbling surrogate\n // (focus or blur), assume that the surrogate already propagated from triggering the\n // native event and prevent that from happening again here.\n // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n // bubbling surrogate propagates *after* the non-bubbling base), but that seems\n // less bad than duplication.\n } else if ((jQuery.event.special[type] || {}).delegateType) {\n event.stopPropagation();\n }\n\n // If this is a native event triggered above, everything is now in order\n // Fire an inner synthetic event with the original arguments\n } else if (saved.length) {\n // ...and capture the result\n dataPriv.set(this, type, {\n value: jQuery.event.trigger(\n // Support: IE <=9 - 11+\n // Extend with the prototype to reset the above stopImmediatePropagation()\n jQuery.extend(saved[0], jQuery.Event.prototype), saved.slice(1), this)\n });\n\n // Abort handling of the native event\n event.stopImmediatePropagation();\n }\n }\n });\n }\n jQuery.removeEvent = function (elem, type, handle) {\n // This \"if\" is needed for plain objects\n if (elem.removeEventListener) {\n elem.removeEventListener(type, handle);\n }\n };\n jQuery.Event = function (src, props) {\n // Allow instantiation without the 'new' keyword\n if (!(this instanceof jQuery.Event)) {\n return new jQuery.Event(src, props);\n }\n\n // Event object\n if (src && src.type) {\n this.originalEvent = src;\n this.type = src.type;\n\n // Events bubbling up the document may have been marked as prevented\n // by a handler lower down the tree; reflect the correct value.\n this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined &&\n // Support: Android <=2.3 only\n src.returnValue === false ? returnTrue : returnFalse;\n\n // Create target properties\n // Support: Safari <=6 - 7 only\n // Target should not be a text node (trac-504, trac-13143)\n this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target;\n this.currentTarget = src.currentTarget;\n this.relatedTarget = src.relatedTarget;\n\n // Event type\n } else {\n this.type = src;\n }\n\n // Put explicitly provided properties onto the event object\n if (props) {\n jQuery.extend(this, props);\n }\n\n // Create a timestamp if incoming event doesn't have one\n this.timeStamp = src && src.timeStamp || Date.now();\n\n // Mark it as fixed\n this[jQuery.expando] = true;\n };\n\n // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\n jQuery.Event.prototype = {\n constructor: jQuery.Event,\n isDefaultPrevented: returnFalse,\n isPropagationStopped: returnFalse,\n isImmediatePropagationStopped: returnFalse,\n isSimulated: false,\n preventDefault: function () {\n var e = this.originalEvent;\n this.isDefaultPrevented = returnTrue;\n if (e && !this.isSimulated) {\n e.preventDefault();\n }\n },\n stopPropagation: function () {\n var e = this.originalEvent;\n this.isPropagationStopped = returnTrue;\n if (e && !this.isSimulated) {\n e.stopPropagation();\n }\n },\n stopImmediatePropagation: function () {\n var e = this.originalEvent;\n this.isImmediatePropagationStopped = returnTrue;\n if (e && !this.isSimulated) {\n e.stopImmediatePropagation();\n }\n this.stopPropagation();\n }\n };\n\n // Includes all common event props including KeyEvent and MouseEvent specific props\n jQuery.each({\n altKey: true,\n bubbles: true,\n cancelable: true,\n changedTouches: true,\n ctrlKey: true,\n detail: true,\n eventPhase: true,\n metaKey: true,\n pageX: true,\n pageY: true,\n shiftKey: true,\n view: true,\n \"char\": true,\n code: true,\n charCode: true,\n key: true,\n keyCode: true,\n button: true,\n buttons: true,\n clientX: true,\n clientY: true,\n offsetX: true,\n offsetY: true,\n pointerId: true,\n pointerType: true,\n screenX: true,\n screenY: true,\n targetTouches: true,\n toElement: true,\n touches: true,\n which: true\n }, jQuery.event.addProp);\n jQuery.each({\n focus: \"focusin\",\n blur: \"focusout\"\n }, function (type, delegateType) {\n jQuery.event.special[type] = {\n // Utilize native event if possible so blur/focus sequence is correct\n setup: function () {\n // Claim the first handler\n // dataPriv.set( this, \"focus\", ... )\n // dataPriv.set( this, \"blur\", ... )\n leverageNative(this, type, expectSync);\n\n // Return false to allow normal processing in the caller\n return false;\n },\n trigger: function () {\n // Force setup before trigger\n leverageNative(this, type);\n\n // Return non-false to allow normal event-path propagation\n return true;\n },\n // Suppress native focus or blur if we're currently inside\n // a leveraged native-event stack\n _default: function (event) {\n return dataPriv.get(event.target, type);\n },\n delegateType: delegateType\n };\n });\n\n // Create mouseenter/leave events using mouseover/out and event-time checks\n // so that event delegation works in jQuery.\n // Do the same for pointerenter/pointerleave and pointerover/pointerout\n //\n // Support: Safari 7 only\n // Safari sends mouseenter too often; see:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n // for the description of the bug (it existed in older Chrome versions as well).\n jQuery.each({\n mouseenter: \"mouseover\",\n mouseleave: \"mouseout\",\n pointerenter: \"pointerover\",\n pointerleave: \"pointerout\"\n }, function (orig, fix) {\n jQuery.event.special[orig] = {\n delegateType: fix,\n bindType: fix,\n handle: function (event) {\n var ret,\n target = this,\n related = event.relatedTarget,\n handleObj = event.handleObj;\n\n // For mouseenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n if (!related || related !== target && !jQuery.contains(target, related)) {\n event.type = handleObj.origType;\n ret = handleObj.handler.apply(this, arguments);\n event.type = fix;\n }\n return ret;\n }\n };\n });\n jQuery.fn.extend({\n on: function (types, selector, data, fn) {\n return on(this, types, selector, data, fn);\n },\n one: function (types, selector, data, fn) {\n return on(this, types, selector, data, fn, 1);\n },\n off: function (types, selector, fn) {\n var handleObj, type;\n if (types && types.preventDefault && types.handleObj) {\n // ( event ) dispatched jQuery.Event\n handleObj = types.handleObj;\n jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler);\n return this;\n }\n if (typeof types === \"object\") {\n // ( types-object [, selector] )\n for (type in types) {\n this.off(type, selector, types[type]);\n }\n return this;\n }\n if (selector === false || typeof selector === \"function\") {\n // ( types [, fn] )\n fn = selector;\n selector = undefined;\n }\n if (fn === false) {\n fn = returnFalse;\n }\n return this.each(function () {\n jQuery.event.remove(this, types, fn, selector);\n });\n }\n });\n var\n // Support: IE <=10 - 11, Edge 12 - 13 only\n // In IE/Edge using regex groups here causes severe slowdowns.\n // See https://connect.microsoft.com/IE/feedback/details/1736512/\n rnoInnerhtml = /