cornell-glue-ui
Version:
Glue UI is Cornell WebDev's centralized UI component library. It implements our design system and serves as a single source of truth for React components used within our projects.
652 lines (619 loc) • 91.9 kB
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var React = require('react');
var styled = require('styled-components');
var reactRouterDom = require('react-router-dom');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
}
var ContainedButton = function (_a) {
var children = _a.children, _b = _a.background, background = _b === void 0 ? theme.brand[500] : _b, _c = _a.hoverBackground, hoverBackground = _c === void 0 ? theme.brand[600] : _c, _d = _a.color, color = _d === void 0 ? theme.background.default : _d, startIcon = _a.startIcon, endIcon = _a.endIcon, rest = __rest(_a, ["children", "background", "hoverBackground", "color", "startIcon", "endIcon"]);
return (React__default['default'].createElement(CoreButton, __assign({ background: background, hoverBackground: hoverBackground, color: color, startIcon: startIcon, endIcon: endIcon }, rest),
startIcon,
children,
endIcon));
};
var OutlinedButton = function (_a) {
var children = _a.children, _b = _a.background, background = _b === void 0 ? theme.background.default : _b, _c = _a.hoverBackground, hoverBackground = _c === void 0 ? theme.brand[50] : _c, _d = _a.color, color = _d === void 0 ? theme.brand[500] : _d, startIcon = _a.startIcon, endIcon = _a.endIcon, rest = __rest(_a, ["children", "background", "hoverBackground", "color", "startIcon", "endIcon"]);
return (React__default['default'].createElement(CoreButton, __assign({ background: background, hoverBackground: hoverBackground, color: color, startIcon: startIcon, endIcon: endIcon }, rest),
startIcon,
children,
endIcon));
};
var TextButton = function (_a) {
var children = _a.children, _b = _a.background, background = _b === void 0 ? theme.brand[50] : _b, _c = _a.hoverBackground, hoverBackground = _c === void 0 ? theme.brand[100] : _c, _d = _a.color, color = _d === void 0 ? theme.brand[500] : _d, startIcon = _a.startIcon, endIcon = _a.endIcon, rest = __rest(_a, ["children", "background", "hoverBackground", "color", "startIcon", "endIcon"]);
return (React__default['default'].createElement(CoreButton, __assign({ background: background, hoverBackground: hoverBackground, color: color, startIcon: startIcon, endIcon: endIcon }, rest),
startIcon,
children,
endIcon));
};
var Button = function (_a) {
var children = _a.children, _b = _a.variant, variant = _b === void 0 ? 'contained' : _b, rest = __rest(_a, ["children", "variant"]);
switch (variant) {
case 'contained':
return (React__default['default'].createElement(ContainedButton, __assign({ variant: variant }, rest), children));
case 'text':
return (React__default['default'].createElement(TextButton, __assign({ variant: variant }, rest), children));
case 'outlined':
return (React__default['default'].createElement(OutlinedButton, __assign({ variant: variant }, rest), children));
}
};
var CoreButton = styled__default['default'].button(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n cursor: pointer;\n border-radius: 8px;\n display: flex;\n align-items: center;\n padding: 0.3rem 0.8rem;\n font-size: 1rem;\n\n /* border */\n border: 2px solid transparent;\n border-color: ", ";\n border-color: ", ";\n border-color: ", ";\n\n /* size === 'small' */\n font-size: ", ";\n padding: ", ";\n padding: ", ";\n\n /* color */\n color: ", ";\n\n /* background */\n background: ", ";\n\n /* startIcon */\n padding-left: ", ";\n padding-left: ", ";\n padding-left: ", ";\n\n /* endIcon */\n padding-right: ", ";\n padding-right: ", ";\n padding-right: ", ";\n\n & svg {\n height: 20px;\n width: 20px;\n\n /* size === 'small' */\n height: ", ";\n width: ", ";\n\n /* color */\n fill: ", ";\n\n /* disabled */\n fill: ", ";\n\n /* startIcon */\n margin-right: ", ";\n margin-right: ", ";\n\n /* endIcon */\n margin-left: ", ";\n margin-left: ", ";\n }\n\n /* disabled */\n color: ", ";\n background: ", ";\n border-color: ", ";\n cursor: ", ";\n background: ", ";\n\n @media (min-width: ", ") {\n &:hover {\n /* hoverBackground */\n background-color: ", ";\n border-color: ", ";\n border-color: ", ";\n\n /* disabled */\n background-color: ", ";\n background: ", ";\n }\n }\n"], ["\n cursor: pointer;\n border-radius: 8px;\n display: flex;\n align-items: center;\n padding: 0.3rem 0.8rem;\n font-size: 1rem;\n\n /* border */\n border: 2px solid transparent;\n border-color: ", ";\n border-color: ", ";\n border-color: ", ";\n\n /* size === 'small' */\n font-size: ", ";\n padding: ", ";\n padding: ", ";\n\n /* color */\n color: ", ";\n\n /* background */\n background: ", ";\n\n /* startIcon */\n padding-left: ", ";\n padding-left: ", ";\n padding-left: ", ";\n\n /* endIcon */\n padding-right: ", ";\n padding-right: ", ";\n padding-right: ", ";\n\n & svg {\n height: 20px;\n width: 20px;\n\n /* size === 'small' */\n height: ", ";\n width: ", ";\n\n /* color */\n fill: ", ";\n\n /* disabled */\n fill: ", ";\n\n /* startIcon */\n margin-right: ", ";\n margin-right: ", ";\n\n /* endIcon */\n margin-left: ", ";\n margin-left: ", ";\n }\n\n /* disabled */\n color: ", ";\n background: ", ";\n border-color: ", ";\n cursor: ", ";\n background: ", ";\n\n @media (min-width: ", ") {\n &:hover {\n /* hoverBackground */\n background-color: ", ";\n border-color: ", ";\n border-color: ", ";\n\n /* disabled */\n background-color: ", ";\n background: ", ";\n }\n }\n"])), function (props) { return props.variant === 'contained' && props.background; }, function (props) { return props.variant === 'outlined' && props.color; }, function (props) { return props.variant === 'text' && props.background; }, function (props) { return props.size === 'small' && '0.875rem'; }, function (props) { return props.size === 'small' && '0.2rem 0.6rem'; }, function (props) { return props.size === 'small' && props.variant === 'text' && '0.2rem 0.3rem'; }, function (props) { return props.color && props.color; }, function (props) { return props.background && props.background; }, function (props) { return props.startIcon && '.6rem;'; }, function (props) { return props.startIcon && props.size === 'small' && '.4rem;'; }, function (props) {
return props.startIcon && props.size === 'small' && props.variant === 'text' && '.25rem;';
}, function (props) { return props.endIcon && '.6rem;'; }, function (props) { return props.endIcon && props.size === 'small' && '.4rem;'; }, function (props) {
return props.endIcon && props.size === 'small' && props.variant === 'text' && '.25rem;';
}, function (props) { return props.size === 'small' && '18px'; }, function (props) { return props.size === 'small' && '18px'; }, function (props) { return props.color && props.color; }, function (props) { return props.disabled && props.theme.text.muted; }, function (props) { return props.startIcon && '.4rem;'; }, function (props) { return props.startIcon && props.size === 'small' && '.25rem;'; }, function (props) { return props.endIcon && '.4rem;'; }, function (props) { return props.endIcon && props.size === 'small' && '.25rem;'; }, function (props) { return props.disabled && props.theme.text.muted; }, function (props) { return props.disabled && props.theme.grey[200]; }, function (props) { return props.disabled && props.theme.grey[200]; }, function (props) { return props.disabled && 'initial'; }, function (props) {
return props.disabled && props.variant === 'outlined' && props.theme.background.default;
}, function (props) { return props.theme.small; }, function (props) { return props.hoverBackground && props.hoverBackground; }, function (props) {
return !props.disabled && props.variant === 'contained' && props.hoverBackground;
}, function (props) {
return !props.disabled && props.variant === 'text' && props.hoverBackground;
}, function (props) { return props.disabled && props.theme.grey[200]; }, function (props) {
return props.disabled && props.variant === 'outlined' && props.theme.background.default;
});
var templateObject_1$c;
var palette = {
// feedback
danger: {
50: '#fee8e7',
100: '#fcc7c3',
200: '#faa19b',
300: '#f77b72',
400: '#f65f54',
500: '#f44336',
600: '#f33d30',
700: '#f13429',
800: '#ef2c22',
900: '#ec1e16',
},
warning: {
50: '#fff3e0',
100: '#ffe0b3',
200: '#ffcc80',
300: '#ffb74d',
400: '#ffa726',
500: '#ff9800',
600: '#ff9000',
700: '#ff8500',
800: '#ff7b00',
900: '#ff6a00',
},
info: {
50: '#e4f2fe',
100: '#bce0fb',
200: '#90cbf9',
300: '#64b6f7',
400: '#42a6f5',
500: '#2196f3',
600: '#1d8ef1',
700: '#1883ef',
800: '#1479ed',
900: '#0b68ea',
},
success: {
50: '#eaf5ea',
100: '#c9e7cb',
200: '#a6d7a8',
300: '#82c785',
400: '#67bb6a',
500: '#4caf50',
600: '#45a849',
700: '#3c9f40',
800: '#339637',
900: '#248627',
},
// all colors
red: {
50: '#ffebee',
100: '#ffcdd2',
200: '#ef9a9a',
300: '#e57373',
400: '#ef5350',
500: '#f44336',
600: '#e53935',
700: '#d32f2f',
800: '#c62828',
900: '#b71c1c',
a100: '#ff8a80',
a200: '#ff5252',
a400: '#ff1744',
a700: '#d50000',
},
pink: {
50: '#fce4ec',
100: '#f8bbd0',
200: '#f48fb1',
300: '#f06292',
400: '#ec407a',
500: '#e91e63',
600: '#d81b60',
700: '#c2185b',
800: '#ad1457',
900: '#880e4f',
a100: '#ff80ab',
a200: '#ff4081',
a400: '#f50057',
a700: '#c51162',
},
purple: {
50: '#f3e5f5',
100: '#e1bee7',
200: '#ce93d8',
300: '#ba68c8',
400: '#ab47bc',
500: '#9c27b0',
600: '#8e24aa',
700: '#7b1fa2',
800: '#6a1b9a',
900: '#4a148c',
a100: '#ea80fc',
a200: '#e040fb',
a400: '#d500f9',
a700: '#aa00ff',
},
deeppurple: {
50: '#ede7f6',
100: '#d1c4e9',
200: '#b39ddb',
300: '#9575cd',
400: '#7e57c2',
500: '#673ab7',
600: '#5e35b1',
700: '#512da8',
800: '#4527a0',
900: '#311b92',
a100: '#b388ff',
a200: '#7c4dff',
a400: '#651fff',
a700: '#6200ea',
},
indigo: {
50: '#e8eaf6',
100: '#c5cae9',
200: '#9fa8da',
300: '#7986cb',
400: '#5c6bc0',
500: '#3f51b5',
600: '#3949ab',
700: '#303f9f',
800: '#283593',
900: '#1a237e',
a100: '#8c9eff',
a200: '#536dfe',
a400: '#3d5afe',
a700: '#304ffe',
},
blue: {
50: '#e3f2fd',
100: '#bbdefb',
200: '#90caf9',
300: '#64b5f6',
400: '#42a5f5',
500: '#2196f3',
600: '#1e88e5',
700: '#1976d2',
800: '#1565c0',
900: '#0d47a1',
a100: '#82b1ff',
a200: '#448aff',
a400: '#2979ff',
a700: '#2962ff',
},
lightblue: {
50: '#e1f5fe',
100: '#b3e5fc',
200: '#81d4fa',
300: '#4fc3f7',
400: '#29b6f6',
500: '#03a9f4',
600: '#039be5',
700: '#0288d1',
800: '#0277bd',
900: '#01579b',
a100: '#80d8ff',
a200: '#40c4ff',
a400: '#00b0ff',
a700: '#0091ea',
},
cyan: {
50: '#e0f7fa',
100: '#b2ebf2',
200: '#80deea',
300: '#4dd0e1',
400: '#26c6da',
500: '#00bcd4',
600: '#00acc1',
700: '#0097a7',
800: '#00838f',
900: '#006064',
a100: '#84ffff',
a200: '#18ffff',
a400: '#00e5ff',
a700: '#00b8d4',
},
teal: {
50: '#e0f2f1',
100: '#b2dfdb',
200: '#80cbc4',
300: '#4db6ac',
400: '#26a69a',
500: '#009688',
600: '#00897b',
700: '#00796b',
800: '#00695c',
900: '#004d40',
a100: '#a7ffeb',
a200: '#64ffda',
a400: '#1de9b6',
a700: '#00bfa5',
},
green: {
50: '#e8f5e9',
100: '#c8e6c9',
200: '#a5d6a7',
300: '#81c784',
400: '#66bb6a',
500: '#4caf50',
600: '#43a047',
700: '#388e3c',
800: '#2e7d32',
900: '#1b5e20',
a100: '#b9f6ca',
a200: '#69f0ae',
a400: '#00e676',
a700: '#00c853',
},
lightgreen: {
50: '#f1f8e9',
100: '#dcedc8',
200: '#c5e1a5',
300: '#aed581',
400: '#9ccc65',
500: '#8bc34a',
600: '#7cb342',
700: '#689f38',
800: '#558b2f',
900: '#33691e',
a100: '#ccff90',
a200: '#b2ff59',
a400: '#76ff03',
a700: '#64dd17',
},
lime: {
50: '#f9fbe7',
100: '#f0f4c3',
200: '#e6ee9c',
300: '#dce775',
400: '#d4e157',
500: '#cddc39',
600: '#c0ca33',
700: '#afb42b',
800: '#9e9d24',
900: '#827717',
a100: '#f4ff81',
a200: '#eeff41',
a400: '#c6ff00',
a700: '#aeea00',
},
yellow: {
50: '#fffde7',
100: '#fff9c4',
200: '#fff59d',
300: '#fff176',
400: '#ffee58',
500: '#ffeb3b',
600: '#fdd835',
700: '#fbc02d',
800: '#f9a825',
900: '#f57f17',
a100: '#ffff8d',
a200: '#ffff00',
a400: '#ffea00',
a700: '#ffd600',
},
amber: {
50: '#fff8e1',
100: '#ffecb3',
200: '#ffe082',
300: '#ffd54f',
400: '#ffca28',
500: '#ffc107',
600: '#ffb300',
700: '#ffa000',
800: '#ff8f00',
900: '#ff6f00',
a100: '#ffe57f',
a200: '#ffd740',
a400: '#ffc400',
a700: '#ffab00',
},
orange: {
50: '#fff3e0',
100: '#ffe0b2',
200: '#ffcc80',
300: '#ffb74d',
400: '#ffa726',
500: '#ff9800',
600: '#fb8c00',
700: '#f57c00',
800: '#ef6c00',
900: '#e65100',
a100: '#ffd180',
a200: '#ffab40',
a400: '#ff9100',
a700: '#ff6d00',
},
deeporange: {
50: '#fbe9e7',
100: '#ffccbc',
200: '#ffab91',
300: '#ff8a65',
400: '#ff7043',
500: '#ff5722',
600: '#f4511e',
700: '#e64a19',
800: '#d84315',
900: '#bf360c',
a100: '#ff9e80',
a200: '#ff6e40',
a400: '#ff3d00',
a700: '#dd2c00',
},
brown: {
50: '#efebe9',
100: '#d7ccc8',
200: '#bcaaa4',
300: '#a1887f',
400: '#8d6e63',
500: '#795548',
600: '#6d4c41',
700: '#5d4037',
800: '#4e342e',
900: '#3e2723',
},
grey: {
0: '#ffffff',
50: '#fafafa',
100: '#f5f5f5',
200: '#eeeeee',
300: '#e0e0e0',
400: '#bdbdbd',
500: '#9e9e9e',
600: '#757575',
700: '#616161',
800: '#424242',
900: '#212121',
},
bluegrey: {
50: '#eceff1',
100: '#cfd8dc',
200: '#b0bec5',
300: '#90a4ae',
400: '#78909c',
500: '#607d8b',
600: '#546e7a',
700: '#455a64',
800: '#37474f',
900: '#263238',
},
};
var theme = __assign(__assign({}, palette), { disabled: palette.grey[400], brand: {
25: '#FEFBFB',
50: '#FCF6F6',
100: '#f9ecec',
200: '#e8afaf',
300: '#de8f8f',
400: '#d77777',
500: '#d05f5f',
600: '#cb5757',
700: '#c44d4d',
800: '#be4343',
900: '#b33232',
},
// bg
background: {
default: palette.grey[0],
wash: palette.grey[50],
grey: palette.grey[200],
},
// border
border: {
default: palette.grey[200],
light: palette.grey[50],
dark: palette.grey[400],
},
// text
text: {
default: '#424242',
light: '#575859',
muted: '#737576',
placeholder: '#D3D7DB',
disabled: 'rgba(0, 0, 0, 0.38)',
error: '#D05F5F',
},
// shadow
shadow: {
default: '0 2px 4px rgba(0, 0, 0, .1)',
},
// social
facebook: '#3B5998', twitter: '#00ACED', google: '#ea4335', github: '#16171A',
// breakpoints
small: '576px', tablet: '1366px', large: '992px' });
function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { return; }
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
}
var css_248z$1 = "@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Medium.eot');\n src: local('SF Pro Display Medium'), local('SFProDisplay-Medium'),\n url('./sf-pro/SFProDisplay-Medium.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Medium.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Medium.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Medium.ttf') format('truetype');\n font-weight: 500;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Heavy.eot');\n src: local('SF Pro Display Heavy'), local('SFProDisplay-Heavy'),\n url('./sf-pro/SFProDisplay-Heavy.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Heavy.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Heavy.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Heavy.ttf') format('truetype');\n font-weight: 900;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-UltralightItalic.eot');\n src: local('SF Pro Display UltralightItalic'), local('SFProDisplay-UltralightItalic'),\n url('./sf-pro/SFProDisplay-UltralightItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-UltralightItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-UltralightItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-UltralightItalic.ttf') format('truetype');\n font-weight: 100;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-RegularItalic.eot');\n src: local('SF Pro Display Regular Italic'), local('SFProDisplay-RegularItalic'),\n url('./sf-pro/SFProDisplay-RegularItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-RegularItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-RegularItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-RegularItalic.ttf') format('truetype');\n font-weight: normal;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-RegularItalic.eot');\n src: local('SF Pro Display Regular Italic'), local('SFProDisplay-RegularItalic'),\n url('./sf-pro/SFProDisplay-RegularItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-RegularItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-RegularItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-RegularItalic.ttf') format('truetype');\n font-weight: 400;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Thin.eot');\n src: local('SF Pro Display Thin'), local('SFProDisplay-Thin'),\n url('./sf-pro/SFProDisplay-Thin.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Thin.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Thin.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Thin.ttf') format('truetype');\n font-weight: 200;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Light.eot');\n src: local('SF Pro Display Light'), local('SFProDisplay-Light'),\n url('./sf-pro/SFProDisplay-Light.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Light.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Light.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Light.ttf') format('truetype');\n font-weight: 300;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-BlackItalic.eot');\n src: local('SF Pro Display Black Italic'), local('SFProDisplay-BlackItalic'),\n url('./sf-pro/SFProDisplay-BlackItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-BlackItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-BlackItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-BlackItalic.ttf') format('truetype');\n font-weight: 900;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Bold.eot');\n src: local('SF Pro Display Bold'), local('SFProDisplay-Bold'),\n url('./sf-pro/SFProDisplay-Bold.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Bold.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Bold.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Bold.ttf') format('truetype');\n font-weight: bold;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Bold.eot');\n src: local('SF Pro Display Bold'), local('SFProDisplay-Bold'),\n url('./sf-pro/SFProDisplay-Bold.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Bold.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Bold.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Bold.ttf') format('truetype');\n font-weight: 700;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Black.eot');\n src: local('SF Pro Display Black'), local('SFProDisplay-Black'),\n url('./sf-pro/SFProDisplay-Black.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Black.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Black.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Black.ttf') format('truetype');\n font-weight: 900;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-SemiboldItalic.eot');\n src: local('SF Pro Display SemiboldItalic'), local('SFProDisplay-SemiboldItalic'),\n url('./sf-pro/SFProDisplay-SemiboldItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-SemiboldItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-SemiboldItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-SemiboldItalic.ttf') format('truetype');\n font-weight: 600;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Ultralight.eot');\n src: local('SF Pro Display Ultralight'), local('SFProDisplay-Ultralight'),\n url('./sf-pro/SFProDisplay-Ultralight.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Ultralight.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Ultralight.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Ultralight.ttf') format('truetype');\n font-weight: 100;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-LightItalic.eot');\n src: local('SF Pro Display LightItalic'), local('SFProDisplay-LightItalic'),\n url('./sf-pro/SFProDisplay-LightItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-LightItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-LightItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-LightItalic.ttf') format('truetype');\n font-weight: 300;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-ThinItalic.eot');\n src: local('SF Pro Display ThinItalic'), local('SFProDisplay-ThinItalic'),\n url('./sf-pro/SFProDisplay-ThinItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-ThinItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-ThinItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-ThinItalic.ttf') format('truetype');\n font-weight: 200;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-MediumItalic.eot');\n src: local('SF Pro Display MediumItalic'), local('SFProDisplay-MediumItalic'),\n url('./sf-pro/SFProDisplay-MediumItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-MediumItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-MediumItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-MediumItalic.ttf') format('truetype');\n font-weight: 500;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Semibold.eot');\n src: local('SF Pro Display Semibold'), local('SFProDisplay-Semibold'),\n url('./sf-pro/SFProDisplay-Semibold.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Semibold.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Semibold.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Semibold.ttf') format('truetype');\n font-weight: 600;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-HeavyItalic.eot');\n src: local('SF Pro Display HeavyItalic'), local('SFProDisplay-HeavyItalic'),\n url('./sf-pro/SFProDisplay-HeavyItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-HeavyItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-HeavyItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-HeavyItalic.ttf') format('truetype');\n font-weight: 900;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Regular.eot');\n src: local('SF Pro Display Regular'), local('SFProDisplay-Regular'),\n url('./sf-pro/SFProDisplay-Regular.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Regular.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Regular.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Regular.ttf') format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-Regular.eot');\n src: local('SF Pro Display Regular'), local('SFProDisplay-Regular'),\n url('./sf-pro/SFProDisplay-Regular.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-Regular.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-Regular.woff') format('woff'),\n url('./sf-pro/SFProDisplay-Regular.ttf') format('truetype');\n font-weight: 400;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-BoldItalic.eot');\n src: local('SF Pro Display BoldItalic'), local('SFProDisplay-BoldItalic'),\n url('./sf-pro/SFProDisplay-BoldItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-BoldItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-BoldItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-BoldItalic.ttf') format('truetype');\n font-weight: bold;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'SF Pro Display';\n src: url('./sf-pro/SFProDisplay-BoldItalic.eot');\n src: local('SF Pro Display BoldItalic'), local('SFProDisplay-BoldItalic'),\n url('./sf-pro/SFProDisplay-BoldItalic.eot?#iefix') format('embedded-opentype'),\n url('./sf-pro/SFProDisplay-BoldItalic.woff2') format('woff2'),\n url('./sf-pro/SFProDisplay-BoldItalic.woff') format('woff'),\n url('./sf-pro/SFProDisplay-BoldItalic.ttf') format('truetype');\n font-weight: 700;\n font-style: italic;\n}\n\n";
styleInject(css_248z$1);
var css_248z = "* {\n\tbox-sizing: border-box !important;\n}\n\n*:focus {\n\toutline: none;\n}\n\nhtml, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, u, i, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\narticle, aside, canvas, details, embed, \nfigure, figcaption, footer, header, hgroup, \nmenu, nav, output, ruby, section, summary,\ntime, mark, audio, video, button {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-family: 'SF Pro Display', sans-serif !important;\n\tvertical-align: baseline;\n}\n\n/* HTML5 display-role reset for older browsers */\narticle, aside, details, figcaption, figure, \nfooter, header, hgroup, menu, nav, section {\n\tdisplay: block;\n}\nbody {\n\tline-height: 1.5;\n}\nol, ul {\n\tlist-style: none;\n}\nblockquote, q {\n\tquotes: none;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\n\tcontent: '';\n\tcontent: none;\n}\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\na, a:hover, a:focus {\n\ttext-decoration: none;\n\tcolor: inherit;\n\tdisplay: inline-block;\n}\n\ninput, button { \n\tborder:none; \n} \n\ninput {\n\t-webkit-appearance: none;\n\tletter-spacing: .5px;\n}\n\ninput:disabled, textarea:disabled, input:disabled::placeholder, textarea:disabled::placeholder {\n -webkit-text-fill-color: currentcolor; \n opacity: 1; \n}\n\nhtml {\n\tfont-size: 16px;\n\t-webkit-text-size-adjust: 100%;\n}";
styleInject(css_248z);
function ScrollToTop() {
var pathname = reactRouterDom.useLocation().pathname;
React.useEffect(function () {
window.scrollTo(0, 0);
}, [pathname]);
return null;
}
var GlueProvider = function (_a) {
var overrideTheme = _a.overrideTheme, children = _a.children;
return (React__default['default'].createElement(React__default['default'].Fragment, null,
React__default['default'].createElement(styled.ThemeProvider, { theme: __assign(__assign({}, theme), overrideTheme) },
React__default['default'].createElement(Container$3, null,
children,
React__default['default'].createElement(ScrollToTop, null)))));
};
var Container$3 = styled__default['default'].div(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["\n width: 100vw;\n max-width: 100vw;\n height: 100vh;\n background: ", ";\n\n @media (min-width: ", ") {\n width: initial;\n }\n"], ["\n width: 100vw;\n max-width: 100vw;\n height: 100vh;\n background: ", ";\n\n @media (min-width: ", ") {\n width: initial;\n }\n"])), function (props) { return props.theme.background.default; }, function (props) { return props.theme.tablet; });
var templateObject_1$b;
var IconButton = function (_a) {
var icon = _a.icon, color = _a.color, rest = __rest(_a, ["icon", "color"]);
return (React__default['default'].createElement(StyledIconButton, __assign({}, rest, { color: color }), icon));
};
var StyledIconButton = styled__default['default'].button(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n border: none;\n background: inherit;\n border-radius: 50%;\n padding: 0;\n margin: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 2.5rem;\n width: 2.5rem;\n cursor: pointer;\n background: ", ";\n\n &:hover {\n background: ", ";\n }\n\n & svg {\n fill: ", " !important;\n\n // color\n fill: ", ";\n }\n"], ["\n border: none;\n background: inherit;\n border-radius: 50%;\n padding: 0;\n margin: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 2.5rem;\n width: 2.5rem;\n cursor: pointer;\n background: ", ";\n\n &:hover {\n background: ", ";\n }\n\n & svg {\n fill: ", " !important;\n\n // color\n fill: ", ";\n }\n"])), function (props) { return props.theme.grey[100]; }, function (props) { return props.theme.grey[200]; }, function (props) { return props.theme.grey[700]; }, function (props) { return props.color && props.color + " !important"; });
var templateObject_1$a;
var Text = function (_a) {
var _b = _a.variant, variant = _b === void 0 ? 'p' : _b, children = _a.children, rest = __rest(_a, ["variant", "children"]);
switch (variant) {
case 'h1':
return React__default['default'].createElement(H1, __assign({}, rest), children);
case 'h2':
return React__default['default'].createElement(H2, __assign({}, rest), children);
case 'h3':
return React__default['default'].createElement(H3, __assign({}, rest), children);
case 'h4':
return React__default['default'].createElement(H4, __assign({}, rest), children);
case 'h5':
return React__default['default'].createElement(H5, __assign({}, rest), children);
case 'h6':
return React__default['default'].createElement(H6, __assign({}, rest), children);
case 'p':
return React__default['default'].createElement(P, __assign({}, rest), children);
case 'meta1':
return React__default['default'].createElement(Meta1, __assign({}, rest), children);
case 'meta2':
return React__default['default'].createElement(Meta2, __assign({}, rest), children);
}
};
var CoreText = styled__default['default'].p(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n color: ", ";\n white-space: pre-line;\n font-weight: 400;\n line-height: 1.5;\n\n /* maxLines */\n overflow: ", ";\n text-overflow: ", ";\n display: ", ";\n -webkit-line-clamp: ", ";\n -webkit-box-orient: ", ";\n\n /* fontWeight */\n font-weight: ", ";\n\n /* color */\n color: ", ";\n\n /* textAlign */\n text-align: ", ";\n"], ["\n color: ", ";\n white-space: pre-line;\n font-weight: 400;\n line-height: 1.5;\n\n /* maxLines */\n overflow: ", ";\n text-overflow: ", ";\n display: ", ";\n -webkit-line-clamp: ", ";\n -webkit-box-orient: ", ";\n\n /* fontWeight */\n font-weight: ", ";\n\n /* color */\n color: ", ";\n\n /* textAlign */\n text-align: ", ";\n"])), function (props) { return props.theme.text.default; }, function (props) { return props.maxLines && 'hidden'; }, function (props) { return props.maxLines && 'ellipsis'; }, function (props) { return props.maxLines && '-webkit-box'; }, function (props) { return props.maxLines && props.maxLines; }, function (props) { return props.maxLines && 'vertical'; }, function (props) { return props.fontWeight && props.fontWeight; }, function (props) { return props.color && props.color; }, function (props) { return props.textAlign && props.textAlign; });
var H1 = styled__default['default'](CoreText)(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n font-size: 3rem;\n font-weight: 700;\n"], ["\n font-size: 3rem;\n font-weight: 700;\n"])));
var H2 = styled__default['default'](CoreText)(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n font-size: 2.5rem;\n font-weight: 700;\n"], ["\n font-size: 2.5rem;\n font-weight: 700;\n"])));
var H3 = styled__default['default'](CoreText)(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n font-size: 2rem;\n font-weight: 500;\n"], ["\n font-size: 2rem;\n font-weight: 500;\n"])));
var H4 = styled__default['default'](CoreText)(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n font-size: 1.5rem;\n"], ["\n font-size: 1.5rem;\n"])));
var H5 = styled__default['default'](CoreText)(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\n font-size: 1.375rem;\n"], ["\n font-size: 1.375rem;\n"])));
var H6 = styled__default['default'](CoreText)(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n font-size: 1.125rem;\n"], ["\n font-size: 1.125rem;\n"])));
var P = styled__default['default'](CoreText)(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n font-size: 1rem;\n"], ["\n font-size: 1rem;\n"])));
var Meta1 = styled__default['default'](CoreText)(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n font-size: 0.88rem;\n"], ["\n font-size: 0.88rem;\n"])));
var Meta2 = styled__default['default'](CoreText)(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n font-size: 0.75rem;\n"], ["\n font-size: 0.75rem;\n"])));
var templateObject_1$9, templateObject_2$3, templateObject_3$3, templateObject_4$3, templateObject_5$2, templateObject_6$2, templateObject_7$1, templateObject_8$1, templateObject_9$1, templateObject_10$1;
function FadeIn(props) {
var _a = React.useState(0), maxIsVisible = _a[0], setMaxIsVisible = _a[1];
var transitionDuration = props.transitionDuration || 400;
var delay = props.delay || 50;
var WrapperTag = props.wrapperTag || 'div';
var visible = typeof props.visible === 'undefined' ? true : props.visible;
React.useEffect(function () {
var count = React__default['default'].Children.count(props.children);
if (!visible) {
// Animate all children out
count = 0;
}
if (count === maxIsVisible) {
// We're done updating maxVisible, notify when animation is done
var timeout_1 = setTimeout(function () {
if (props.onComplete)
props.onComplete();
}, transitionDuration);
return function () { return clearTimeout(timeout_1); };
}
// Move maxIsVisible toward count
var increment = count > maxIsVisible ? 1 : -1;
var timeout = setTimeout(function () {
setMaxIsVisible(maxIsVisible + increment);
}, delay);
return function () { return clearTimeout(timeout); };
}, [React__default['default'].Children.count(props.children), delay, maxIsVisible, visible, transitionDuration]);
return (React__default['default'].createElement(WrapperTag, { className: props.className }, React__default['default'].Children.map(props.children, function (child, i) {
return (React__default['default'].createElement(Child, { className: props.childClassName, transitionDuration: transitionDuration, maxIsVisible: maxIsVisible, i: i }, child));
})));
}
var Child = styled__default['default'].div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n /* -webkit-transition: ", ";\n -webkit-transition: ", "; */\n transform: ", ";\n -webkit-transform: ", ";\n opacity: ", ";\n -webkit-opacity: ", ";\n transition: ", ";\n -webkit-transition: ", ";\n"], ["\n /* -webkit-transition: ", ";\n -webkit-transition: ", "; */\n transform: ", ";\n -webkit-transform: ", ";\n opacity: ", ";\n -webkit-opacity: ", ";\n transition: ", ";\n -webkit-transition: ", ";\n"])), function (props) { return "-webkit-opacity " + props.transitionDuration + "ms"; }, function (props) { return "-webkit-transform " + props.transitionDuration + "ms"; }, function (props) { return (props.maxIsVisible > props.i ? 'none' : 'translateY(20px)'); }, function (props) { return (props.maxIsVisible > props.i ? 'none' : 'translateY(20px)'); }, function (props) { return (props.maxIsVisible > props.i ? 1 : 0); }, function (props) { return (props.maxIsVisible > props.i ? 1 : 0); }, function (props) { return "all " + props.transitionDuration + "ms"; }, function (props) { return "all " + props.transitionDuration + "ms"; });
var templateObject_1$8;
function useOnScreen(ref) {
var _a = React.useState(false), isIntersecting = _a[0], setIntersecting = _a[1];
var observer = new IntersectionObserver(function (_a) {
var entry = _a[0];
return setIntersecting(entry.isIntersecting);
});
React.useEffect(function () {
observer.observe(ref.current);
// Remove the observer as soon as the component is unmounted
return function () {
observer.disconnect();
};
}, []);
return isIntersecting;
}
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function createCommonjsModule(fn) {
var module = { exports: {} };
return fn(module, module.exports), module.exports;
}
/* UAParser.js v0.7.31
Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
MIT License */
var uaParser_min = createCommonjsModule(function (module, exports) {
(function(window,undefined$1){var LIBVERSION="0.7.31",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded",UA_MAX_LENGTH=255;var AMAZON="Amazon",APPLE="Apple",ASUS="ASUS",BLACKBERRY="BlackBerry",BROWSER="Browser",CHROME="Chrome",EDGE="Edge",FIREFOX="Firefox",GOOGLE="Google",HUAWEI="Huawei",LG="LG",MICROSOFT="Microsoft",MOTOROLA="Motorola",OPERA="Opera",SAMSUNG="Samsung",SONY="Sony",XIAOMI="Xiaomi",ZEBRA="Zebra",FACEBOOK="Facebook";var extend=function(regexes,extensions){var mergedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){mergedRegexes[i]=extensions[i].concat(regexes[i]);}else {mergedRegexes[i]=regexes[i];}}return mergedRegexes},enumerize=function(arr){var enums={};for(var i=0;i<arr.length;i++){enums[arr[i].toUpperCase()]=arr[i];}return enums},has=function(str1,str2){return typeof str1===STR_TYPE?lowerize(str2).indexOf(lowerize(str1))!==-1:false},lowerize=function(str){return str.toLowerCase()},majorize=function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,EMPTY).split(".")[0]:undefined$1},trim=function(str,len){if(typeof str===STR_TYPE){str=str.replace(/^\s\s*/,EMPTY).replace(/\s\s*$/,EMPTY);return typeof len===UNDEF_TYPE?str:str.substring(0,UA_MAX_LENGTH)}};var rgxMapper=function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i<arrays.length&&!matches){var regex=arrays[i],props=arrays[i+1];j=k=0;while(j<regex.length&&!matches){matches=regex[j++].exec(ua);if(!!matches){for(p=0;p<props.length;p++){match=matches[++k];q=props[p];if(typeof q===OBJ_TYPE&&q.length>0){if(q.length===2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match);}else {this[q[0]]=q[1];}}else if(q.length===3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined$1;}else {this[q[0]]=match?match.replace(q[1],q[2]):undefined$1;}}else if(q.length===4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined$1;}}else {this[q]=match?match:undefined$1;}}}}i+=2;}},strMapper=function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j<map[i].length;j++){if(has(map[i][j],str)){return i===UNKNOWN?undefined$1:i}}}else if(has(map[i],str)){return i===UNKNOWN?undefined$1:i}}return str};var oldSafariMap={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},windowsVersionMap={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"};var regexes={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[VERSION,[NAME,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[VERSION,[NAME,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[NAME,VERSION],[/opios[\/ ]+([\w\.]+)/i],[VERSION,[NAME,OPERA+" Mini"]],[/\bopr\/([\w\.]+)/i],[VERSION,[NAME,OPERA]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[NAME,VERSION],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[VERSION,[NAME,"UC"+BROWSER]],[/\bqbcore\/([\w\.]+)/i],[VERSION,[NAME,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[VERSION,[NAME,"WeChat"]],[/konqueror\/([\w\.]+)/i],[VERSION,[NAME,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[VERSION,[NAME,"IE"]],[/yabrowser\/([\w\.]+)/i],[VERSION,[NAME,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 Secure "+BROWSER],VERSION],[/\bfocus\/([\w\.]+)/i],[VERSION,[NAME,FIREFOX+" Focus"]],[/\bopt\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[VERSION,[NAME,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[VERSION,[NAME,"Dolphin"]],[/coast\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[VERSION,[NAME,"MIUI "+BROWSER]],[/fxios\/([-\w\.]+)/i],[VERSION,[NAME,FIREFOX]],[/\bqihu|(qi?ho?o?|360)browser/i],[[NAME,"360 "+BROWSER]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 "+BROWSER],VERSION],[/(comodo_dragon)\/([\w\.]+)/i],[[NAME,/_/g," "],VERSION],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[NAME,VERSION],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[NAME],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[NAME,FACEBOOK],VERSION],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[NAME,VERSION],[/\bgsa\/([\w\.]+) .*safari\//i],[VERSION,[NAME,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[VERSION,[NAME,CHROME+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[NAME,CHROME+" WebView"],VERSION],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[VERSION,[NAME,"Android "+BROWSER]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[NAME,VERSION],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[VERSION,[NAME,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[VERSION,NAME],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[NAME,[VERSION,strMapper,oldSafariMap]],[/(webkit|khtml)\/([\w\.]+)/i],[NAME,VERSION],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[NAME,"Netscape"],VERSION],[/mobile vr;