/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 174); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(98); } else {} /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(99); } else {} /***/ }), /* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; }); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /***/ }), /* 3 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; }); /* harmony import */ var _objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Object(_objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } /***/ }), /* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; function toVal(mix) { var k, y, str = ''; if (typeof mix === 'string' || typeof mix === 'number') { str += mix; } else if (typeof mix === 'object') { if (Array.isArray(mix)) { for (k = 0; k < mix.length; k++) { if (mix[k]) { if (y = toVal(mix[k])) { str && (str += ' '); str += y; } } } } else { for (k in mix) { if (mix[k]) { str && (str += ' '); str += k; } } } } return str; } /* harmony default export */ __webpack_exports__["a"] = (function () { var i = 0, tmp, x, str = ''; while (i < arguments.length) { if (tmp = arguments[i++]) { if (x = toVal(tmp)) { str && (str += ' '); str += x; } } } return str; }); /***/ }), /* 5 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js var arrayLikeToArray = __webpack_require__(37); // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); } // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArray.js function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js var unsupportedIterableToArray = __webpack_require__(45); // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); } /***/ }), /* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /***/ }), /* 7 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; }); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } /***/ }), /* 8 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(2); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(3); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__(0); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__(12); // EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js var hoist_non_react_statics_cjs = __webpack_require__(84); var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs); // EXTERNAL MODULE: ./node_modules/jss/dist/jss.esm.js + 1 modules var jss_esm = __webpack_require__(18); // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/mergeClasses/mergeClasses.js var mergeClasses = __webpack_require__(155); // CONCATENATED MODULE: ./node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js // Used https://github.com/thinkloop/multi-key-cache as inspiration var multiKeyStore = { set: function set(cache, key1, key2, value) { var subCache = cache.get(key1); if (!subCache) { subCache = new Map(); cache.set(key1, subCache); } subCache.set(key2, value); }, get: function get(cache, key1, key2) { var subCache = cache.get(key1); return subCache ? subCache.get(key2) : undefined; }, delete: function _delete(cache, key1, key2) { var subCache = cache.get(key1); subCache.delete(key2); } }; /* harmony default export */ var makeStyles_multiKeyStore = (multiKeyStore); // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/useTheme/useTheme.js var useTheme = __webpack_require__(109); // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js var StylesProvider = __webpack_require__(157); // CONCATENATED MODULE: ./node_modules/@material-ui/styles/esm/makeStyles/indexCounter.js /* eslint-disable import/prefer-default-export */ // Global index counter to preserve source order. // We create the style sheet during the creation of the component, // children are handled after the parents, so the order of style elements would be parent->child. // It is a problem though when a parent passes a className // which needs to override any child's styles. // StyleSheet of the child has a higher specificity, because of the source order. // So our solution is to render sheets them in the reverse order child->sheet, so // that parent has a higher specificity. var indexCounter = -1e9; function increment() { indexCounter += 1; if (false) {} return indexCounter; } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__(39); // EXTERNAL MODULE: ./node_modules/@material-ui/utils/esm/deepmerge.js var deepmerge = __webpack_require__(156); // CONCATENATED MODULE: ./node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js function getStylesCreator(stylesOrCreator) { var themingEnabled = typeof stylesOrCreator === 'function'; if (false) {} return { create: function create(theme, name) { var styles; try { styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator; } catch (err) { if (false) {} throw err; } if (!name || !theme.overrides || !theme.overrides[name]) { return styles; } var overrides = theme.overrides[name]; var stylesWithOverrides = Object(esm_extends["a" /* default */])({}, styles); Object.keys(overrides).forEach(function (key) { if (false) {} stylesWithOverrides[key] = Object(deepmerge["a" /* default */])(stylesWithOverrides[key], overrides[key]); }); return stylesWithOverrides; }, options: {} }; } // CONCATENATED MODULE: ./node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js // We use the same empty object to ref count the styles that don't need a theme object. var noopTheme = {}; /* harmony default export */ var getStylesCreator_noopTheme = (noopTheme); // CONCATENATED MODULE: ./node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js function getClasses(_ref, classes, Component) { var state = _ref.state, stylesOptions = _ref.stylesOptions; if (stylesOptions.disableGeneration) { return classes || {}; } if (!state.cacheClasses) { state.cacheClasses = { // Cache for the finalized classes value. value: null, // Cache for the last used classes prop pointer. lastProp: null, // Cache for the last used rendered classes pointer. lastJSS: {} }; } // Tracks if either the rendered classes or classes prop has changed, // requiring the generation of a new finalized classes object. var generate = false; if (state.classes !== state.cacheClasses.lastJSS) { state.cacheClasses.lastJSS = state.classes; generate = true; } if (classes !== state.cacheClasses.lastProp) { state.cacheClasses.lastProp = classes; generate = true; } if (generate) { state.cacheClasses.value = Object(mergeClasses["a" /* default */])({ baseClasses: state.cacheClasses.lastJSS, newClasses: classes, Component: Component }); } return state.cacheClasses.value; } function attach(_ref2, props) { var state = _ref2.state, theme = _ref2.theme, stylesOptions = _ref2.stylesOptions, stylesCreator = _ref2.stylesCreator, name = _ref2.name; if (stylesOptions.disableGeneration) { return; } var sheetManager = makeStyles_multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme); if (!sheetManager) { sheetManager = { refs: 0, staticSheet: null, dynamicStyles: null }; makeStyles_multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager); } var options = Object(esm_extends["a" /* default */])({}, stylesCreator.options, stylesOptions, { theme: theme, flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl' }); options.generateId = options.serverGenerateClassName || options.generateClassName; var sheetsRegistry = stylesOptions.sheetsRegistry; if (sheetManager.refs === 0) { var staticSheet; if (stylesOptions.sheetsCache) { staticSheet = makeStyles_multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme); } var styles = stylesCreator.create(theme, name); if (!staticSheet) { staticSheet = stylesOptions.jss.createStyleSheet(styles, Object(esm_extends["a" /* default */])({ link: false }, options)); staticSheet.attach(); if (stylesOptions.sheetsCache) { makeStyles_multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet); } } if (sheetsRegistry) { sheetsRegistry.add(staticSheet); } sheetManager.staticSheet = staticSheet; sheetManager.dynamicStyles = Object(jss_esm["d" /* getDynamicStyles */])(styles); } if (sheetManager.dynamicStyles) { var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, Object(esm_extends["a" /* default */])({ link: true }, options)); dynamicSheet.update(props); dynamicSheet.attach(); state.dynamicSheet = dynamicSheet; state.classes = Object(mergeClasses["a" /* default */])({ baseClasses: sheetManager.staticSheet.classes, newClasses: dynamicSheet.classes }); if (sheetsRegistry) { sheetsRegistry.add(dynamicSheet); } } else { state.classes = sheetManager.staticSheet.classes; } sheetManager.refs += 1; } function update(_ref3, props) { var state = _ref3.state; if (state.dynamicSheet) { state.dynamicSheet.update(props); } } function detach(_ref4) { var state = _ref4.state, theme = _ref4.theme, stylesOptions = _ref4.stylesOptions, stylesCreator = _ref4.stylesCreator; if (stylesOptions.disableGeneration) { return; } var sheetManager = makeStyles_multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme); sheetManager.refs -= 1; var sheetsRegistry = stylesOptions.sheetsRegistry; if (sheetManager.refs === 0) { makeStyles_multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme); stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet); if (sheetsRegistry) { sheetsRegistry.remove(sheetManager.staticSheet); } } if (state.dynamicSheet) { stylesOptions.jss.removeStyleSheet(state.dynamicSheet); if (sheetsRegistry) { sheetsRegistry.remove(state.dynamicSheet); } } } function useSynchronousEffect(func, values) { var key = react_default.a.useRef([]); var output; // Store "generation" key. Just returns a new object every time var currentKey = react_default.a.useMemo(function () { return {}; }, values); // eslint-disable-line react-hooks/exhaustive-deps // "the first render", or "memo dropped the value" if (key.current !== currentKey) { key.current = currentKey; output = func(); } react_default.a.useEffect(function () { return function () { if (output) { output(); } }; }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps ); } function makeStyles(stylesOrCreator) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var name = options.name, classNamePrefixOption = options.classNamePrefix, Component = options.Component, _options$defaultTheme = options.defaultTheme, defaultTheme = _options$defaultTheme === void 0 ? getStylesCreator_noopTheme : _options$defaultTheme, stylesOptions2 = Object(objectWithoutProperties["a" /* default */])(options, ["name", "classNamePrefix", "Component", "defaultTheme"]); var stylesCreator = getStylesCreator(stylesOrCreator); var classNamePrefix = name || classNamePrefixOption || 'makeStyles'; stylesCreator.options = { index: increment(), name: name, meta: classNamePrefix, classNamePrefix: classNamePrefix }; var useStyles = function useStyles() { var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var theme = Object(useTheme["a" /* default */])() || defaultTheme; var stylesOptions = Object(esm_extends["a" /* default */])({}, react_default.a.useContext(StylesProvider["a" /* StylesContext */]), stylesOptions2); var instance = react_default.a.useRef(); var shouldUpdate = react_default.a.useRef(); useSynchronousEffect(function () { var current = { name: name, state: {}, stylesCreator: stylesCreator, stylesOptions: stylesOptions, theme: theme }; attach(current, props); shouldUpdate.current = false; instance.current = current; return function () { detach(current); }; }, [theme, stylesCreator]); react_default.a.useEffect(function () { if (shouldUpdate.current) { update(instance.current, props); } shouldUpdate.current = true; }); var classes = getClasses(instance.current, props.classes, Component); if (false) {} return classes; }; return useStyles; } // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js var getThemeProps = __webpack_require__(158); // CONCATENATED MODULE: ./node_modules/@material-ui/styles/esm/withStyles/withStyles.js // Link a style sheet with a component. // It does not modify the component passed to it; // instead, it returns a new component, with a `classes` property. var withStyles_withStyles = function withStyles(stylesOrCreator) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; return function (Component) { var defaultTheme = options.defaultTheme, _options$withTheme = options.withTheme, withTheme = _options$withTheme === void 0 ? false : _options$withTheme, name = options.name, stylesOptions = Object(objectWithoutProperties["a" /* default */])(options, ["defaultTheme", "withTheme", "name"]); if (false) {} var classNamePrefix = name; if (false) { var displayName; } var useStyles = makeStyles(stylesOrCreator, Object(esm_extends["a" /* default */])({ defaultTheme: defaultTheme, Component: Component, name: name || Component.displayName, classNamePrefix: classNamePrefix }, stylesOptions)); var WithStyles = /*#__PURE__*/react_default.a.forwardRef(function WithStyles(props, ref) { var classesProp = props.classes, innerRef = props.innerRef, other = Object(objectWithoutProperties["a" /* default */])(props, ["classes", "innerRef"]); // The wrapper receives only user supplied props, which could be a subset of // the actual props Component might receive due to merging with defaultProps. // So copying it here would give us the same result in the wrapper as well. var classes = useStyles(Object(esm_extends["a" /* default */])({}, Component.defaultProps, props)); var theme; var more = other; if (typeof name === 'string' || withTheme) { // name and withTheme are invariant in the outer scope // eslint-disable-next-line react-hooks/rules-of-hooks theme = Object(useTheme["a" /* default */])() || defaultTheme; if (name) { more = Object(getThemeProps["a" /* default */])({ theme: theme, name: name, props: other }); } // Provide the theme to the wrapped component. // So we don't have to use the `withTheme()` Higher-order Component. if (withTheme && !more.theme) { more.theme = theme; } } return /*#__PURE__*/react_default.a.createElement(Component, Object(esm_extends["a" /* default */])({ ref: innerRef || ref, classes: classes }, more)); }); false ? undefined : void 0; if (false) {} hoist_non_react_statics_cjs_default()(WithStyles, Component); if (false) {} return WithStyles; }; }; /* harmony default export */ var esm_withStyles_withStyles = (withStyles_withStyles); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/styles/defaultTheme.js var styles_defaultTheme = __webpack_require__(60); // CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/styles/withStyles.js function styles_withStyles_withStyles(stylesOrCreator, options) { return esm_withStyles_withStyles(stylesOrCreator, Object(esm_extends["a" /* default */])({ defaultTheme: styles_defaultTheme["a" /* default */] }, options)); } /* harmony default export */ var styles_withStyles = __webpack_exports__["a"] = (styles_withStyles_withStyles); /***/ }), /* 9 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); /* global window */var Route=/*#__PURE__*/function(){function Route(){Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this,Route);}Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Route,null,[{key:"isOutermostFrame",value:/** * Check if we are in an iframe or frame. */function isOutermostFrame(){return!window.parent||window.parent===window;}/** * Known hosts for AppBind environments */},{key:"isAppBind",value:/** * Check if we are on an AppBind app domain. * * @uri URI to check. Otherwise, will check window.location.href */function isAppBind(uri){var hostname=new URL(uri||window.location.href).hostname;for(var _i=0,_Object$keys=Object.keys(Route.APPBIND_HOSTS);_i<_Object$keys.length;_i++){var host=_Object$keys[_i];if(hostname.indexOf(host)>=0)return true;}return false;}/** * Get the AppBind environment */},{key:"environment",value:function environment(){var hostname=new URL(window.location.href).hostname;for(var _i2=0,_Object$keys2=Object.keys(Route.APPBIND_HOSTS);_i2<_Object$keys2.length;_i2++){var host=_Object$keys2[_i2];if(hostname.indexOf(host)>=0)return Route.APPBIND_HOSTS[host];}return'prod';}},{key:"appbind",value:function appbind(environment){if(Route.isAppBind())return'';return Route.APPBIND_ENVIRONMENTS[environment]||'https://app.appbind.com';}/** * Check if we are on a marqeta domain. */},{key:"isMarqeta",value:function isMarqeta(){return new URL(window.location.href).hostname.endsWith('.marqeta.com');}},{key:"currentDomain",value:function currentDomain(){return Route.canonicalizeDomain(new URL(window.location.href).hostname);}},{key:"canonicalizeDomain",value:function canonicalizeDomain(domain){if(!domain)return;domain=domain.toLowerCase();domain=domain.replace('www2.','');domain=domain.replace('web.','');domain=domain.replace('www.','');domain=domain.replace('app.','');domain=domain.replace('auth.','');return domain;}},{key:"matchDomains",value:function matchDomains(a,b){a=Route.canonicalizeDomain(a);b=Route.canonicalizeDomain(b);return a&&b&&(a.indexOf(b)>=0||b.indexOf(a)>=0);}}]);return Route;}();Route.APPBIND_HOSTS={'app.appbind.com':'prod','poc.appbind.com':'poc','local.appbind.com':'local'};Route.APPBIND_ENVIRONMENTS={'prod':'https://app.appbind.com','poc':'https://poc.appbind.com','local':'https://local.appbind.com:3000'};/* harmony default export */ __webpack_exports__["a"] = (Route); /***/ }), /* 10 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _createSuper; }); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js var getPrototypeOf = __webpack_require__(28); // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/typeof.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js var assertThisInitialized = __webpack_require__(55); // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return Object(assertThisInitialized["a" /* default */])(self); } // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper.js function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } /***/ }), /* 11 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; }); // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (false) { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(100)(); } /***/ }), /* 13 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return capitalize; }); /* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91); // It should to be noted that this function isn't equivalent to `text-transform: capitalize`. // // A strict capitalization should uppercase the first letter of each word a the sentence. // We only handle the first word. function capitalize(string) { if (typeof string !== 'string') { throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(7)); } return string.charAt(0).toUpperCase() + string.slice(1); } /***/ }), /* 14 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export hexToRgb */ /* unused harmony export rgbToHex */ /* unused harmony export hslToRgb */ /* unused harmony export decomposeColor */ /* unused harmony export recomposeColor */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getContrastRatio; }); /* unused harmony export getLuminance */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return emphasize; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return fade; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return darken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return lighten; }); /* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91); /* eslint-disable no-use-before-define */ /** * Returns a number whose value is limited to the given range. * * @param {number} value The value to be clamped * @param {number} min The lower boundary of the output range * @param {number} max The upper boundary of the output range * @returns {number} A number in the range [min, max] */ function clamp(value) { var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; if (false) {} return Math.min(Math.max(min, value), max); } /** * Converts a color from CSS hex format to CSS rgb format. * * @param {string} color - Hex color, i.e. #nnn or #nnnnnn * @returns {string} A CSS rgb color string */ function hexToRgb(color) { color = color.substr(1); var re = new RegExp(".{1,".concat(color.length >= 6 ? 2 : 1, "}"), 'g'); var colors = color.match(re); if (colors && colors[0].length === 1) { colors = colors.map(function (n) { return n + n; }); } return colors ? "rgb".concat(colors.length === 4 ? 'a' : '', "(").concat(colors.map(function (n, index) { return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000; }).join(', '), ")") : ''; } function intToHex(int) { var hex = int.toString(16); return hex.length === 1 ? "0".concat(hex) : hex; } /** * Converts a color from CSS rgb format to CSS hex format. * * @param {string} color - RGB color, i.e. rgb(n, n, n) * @returns {string} A CSS rgb color string, i.e. #nnnnnn */ function rgbToHex(color) { // Idempotent if (color.indexOf('#') === 0) { return color; } var _decomposeColor = decomposeColor(color), values = _decomposeColor.values; return "#".concat(values.map(function (n) { return intToHex(n); }).join('')); } /** * Converts a color from hsl format to rgb format. * * @param {string} color - HSL color values * @returns {string} rgb color values */ function hslToRgb(color) { color = decomposeColor(color); var _color = color, values = _color.values; var h = values[0]; var s = values[1] / 100; var l = values[2] / 100; var a = s * Math.min(l, 1 - l); var f = function f(n) { var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12; return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); }; var type = 'rgb'; var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; if (color.type === 'hsla') { type += 'a'; rgb.push(values[3]); } return recomposeColor({ type: type, values: rgb }); } /** * Returns an object with the type and values of a color. * * Note: Does not support rgb % values. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @returns {object} - A MUI color object: {type: string, values: number[]} */ function decomposeColor(color) { // Idempotent if (color.type) { return color; } if (color.charAt(0) === '#') { return decomposeColor(hexToRgb(color)); } var marker = color.indexOf('('); var type = color.substring(0, marker); if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) { throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(3, color)); } var values = color.substring(marker + 1, color.length - 1).split(','); values = values.map(function (value) { return parseFloat(value); }); return { type: type, values: values }; } /** * Converts a color object with type and values to a string. * * @param {object} color - Decomposed color * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla' * @param {array} color.values - [n,n,n] or [n,n,n,n] * @returns {string} A CSS color string */ function recomposeColor(color) { var type = color.type; var values = color.values; if (type.indexOf('rgb') !== -1) { // Only convert the first 3 values to int (i.e. not alpha) values = values.map(function (n, i) { return i < 3 ? parseInt(n, 10) : n; }); } else if (type.indexOf('hsl') !== -1) { values[1] = "".concat(values[1], "%"); values[2] = "".concat(values[2], "%"); } return "".concat(type, "(").concat(values.join(', '), ")"); } /** * Calculates the contrast ratio between two colors. * * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests * * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @returns {number} A contrast ratio value in the range 0 - 21. */ function getContrastRatio(foreground, background) { var lumA = getLuminance(foreground); var lumB = getLuminance(background); return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); } /** * The relative brightness of any point in a color space, * normalized to 0 for darkest black and 1 for lightest white. * * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @returns {number} The relative brightness of the color in the range 0 - 1 */ function getLuminance(color) { color = decomposeColor(color); var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values; rgb = rgb.map(function (val) { val /= 255; // normalized return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4); }); // Truncate at 3 digits return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); } /** * Darken or lighten a color, depending on its luminance. * Light colors are darkened, dark colors are lightened. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function emphasize(color) { var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15; return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); } /** * Set the absolute transparency of a color. * Any existing alpha values are overwritten. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {number} value - value to set the alpha channel to in the range 0 -1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function fade(color, value) { color = decomposeColor(color); value = clamp(value); if (color.type === 'rgb' || color.type === 'hsl') { color.type += 'a'; } color.values[3] = value; return recomposeColor(color); } /** * Darkens a color. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {number} coefficient - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function darken(color, coefficient) { color = decomposeColor(color); coefficient = clamp(coefficient); if (color.type.indexOf('hsl') !== -1) { color.values[2] *= 1 - coefficient; } else if (color.type.indexOf('rgb') !== -1) { for (var i = 0; i < 3; i += 1) { color.values[i] *= 1 - coefficient; } } return recomposeColor(color); } /** * Lightens a color. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {number} coefficient - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function lighten(color, coefficient) { color = decomposeColor(color); coefficient = clamp(coefficient); if (color.type.indexOf('hsl') !== -1) { color.values[2] += (100 - color.values[2]) * coefficient; } else if (color.type.indexOf('rgb') !== -1) { for (var i = 0; i < 3; i += 1) { color.values[i] += (255 - color.values[i]) * coefficient; } } return recomposeColor(color); } /***/ }), /* 15 */, /* 16 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10); /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6); /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7); var _class,_temp;/* global chrome */ //NEW API // https://api.appbind.com/partner/appbind/app/6fe0a878-db6f-11ec-9510-c7ad4af4714f var API=/*#__PURE__*/function(){/** Create an API proxy, using the given bearerToken for authentication. * * @path What subpath of the API endpoint to use * @environment Which dev environment to use of {'prod', 'poc', 'local'} */function API(bearerToken){var path=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'partner/appbind';var environment=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'prod';Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this,API);this.bearerToken=bearerToken;this.environment=environment||'prod';this.baseURI={'prod':"https://ws.appbind.com/",'poc':"https://api.appbind.com/"}[environment]||"https://ws.appbind.com/";this.baseURI+=path;}// --------------------------------------------------------- // -------------- HTTP Convenience methods ----------------- // --------------------------------------------------------- Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(API,[{key:"DELETE",value:function DELETE(path,body,options){return this.__query('DELETE',path,body,options);}},{key:"GET",value:function GET(path,options){return this.__query('GET',path,null,options);}},{key:"PATCH",value:function PATCH(path,body,options){return this.__query('PATCH',path,body,options);}},{key:"POST",value:function POST(path,body,options){return this.__query('POST',path,body,options);}},{key:"PUT",value:function PUT(path,body,options){return this.__query('PUT',path,body,options);}},{key:"__query",value:function __query(method,path,body,options){var _this=this;if(!this.bearerToken){return new Promise(function(resolve,reject){reject("No bearer token");});}var request={method:method,headers:{'Authorization':'Bearer '+this.bearerToken,'Accept':'application/json','Content-type':options&&options.contentType||'application/json'}};options||(options={});var uri=this.baseURI+path;if(body){if('GET'===method){var queryString=Object.keys(body).map(function(key){var value=encodeURIComponent(body[key]);return"".concat(encodeURIComponent(key),"=").concat(value);}).join('&');if(queryString)uri=uri+"?"+queryString;}else{request.body=JSON.stringify(body);}}return new Promise(function(resolve,reject){_this.fetch(uri,request).then(function(response){console.log("API response");console.log(response);if(response.json&&'function'===typeof response.json)response=response.json();if(!response)return reject({status:-2,message:"API response object is null"});_this.__queryResponse(resolve,reject,response);}).catch(function(error){var message='Error fetching extension API: '+error.message;reject({status:error.status,message:message});});});}},{key:"__queryResponse",value:function __queryResponse(resolve,reject,response){if(response.abMessage){if(response.err){return reject({status:-2,message:response.err});}resolve(response.data);}if(undefined===response.status)return reject({status:-2,message:"API response has no status code"});if(response.status!==0||response.message!=="Success")return reject({status:response.status,message:response.message||"API response has no error message"});if(!response.data)return reject({status:response.status,message:"API response has no data"});resolve(response.data);}},{key:"fetch",value:function(_fetch){function fetch(_x,_x2){return _fetch.apply(this,arguments);}fetch.toString=function(){return _fetch.toString();};return fetch;}(function(uri,request){console.log("API FETCH %s\n%s\n\n",uri,JSON.stringify(request));if(this.isExtension()){return chrome.runtime.sendMessage({'fetch':{'uri':uri,'request':request}});}else{//request['mode'] = 'no-cors'; return fetch(uri,request).then(function(response){return response.json();});}})},{key:"isExtension",value:function isExtension(){return chrome&&chrome.runtime&&chrome.runtime.sendMessage;/* TODO */}}]);return API;}();API.Session=(_temp=_class=/*#__PURE__*/function(_API){Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_class,_API);var _super=Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class);function _class(bearerToken){var environment=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'prod';Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this,_class);return _super.call(this,bearerToken,'partner/appbind/',environment);}/** * Create a customer * * API: partner API * * Partner API version takes this body: * { * 'operation': 'createCustomer', * 'params': { * "accountName": "My Customer", * "accountNum": "1234", * "contactEmail": "joe@somewhere.com", * "contactFirstName": "Joe", * "contactLastName": "Smith", * "address1": "44 West Gay Street", * "city": "West Chester", * "state": "PA", * "country": "US", * "postalCode": "19380" * } * } */Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_class,[{key:"createCustomer",value:function createCustomer(customer){var createCustomerBody={'operation':'createCustomer','params':customer};return this.POST('generic',createCustomerBody);}/** * Lookup all invitations. * * API: partner API (for a reseller getting "expert" invitations) * API: vendor API (for a vendor's customer looking up invitations they've sent) * * @param {*} externalId * @returns */},{key:"getAllInvitations",value:function getAllInvitations(externalId){return this.POST('generic',{'operation':'getExpertInvitations'});}/** * Reseller - accept a customer's invitation. * * API: partner API * * @param {*} invitationId * @param {*} accountId * @returns */},{key:"acceptInvitation",value:function acceptInvitation(invitationId,/*TODO: this field shouldn't be in the api */accountId){return this.POST('generic',{'operation':'acceptExpertInvitation','params':{'invitationId':invitationId,'accountId':accountId}});}/** * Reseller - decline a customer's invitation. * * API: partner API * * @param {*} invitationId * @param {*} accountId * @returns */},{key:"declineInvitation",value:function declineInvitation(invitationId,/*TODO: this field shouldn't be in the api */accountId){return this.POST('generic',{'operation':'declineExpertInvitation','params':{'invitationId':invitationId,'accountId':accountId}});}},{key:"getAllSubscriptions",value:function getAllSubscriptions(){return this.GET('subscriptions');}},{key:"getSubscription",value:function getSubscription(customerAppId){var mode=arguments.length>1&&arguments[1]!==undefined?arguments[1]:API.Session.SUBSCRIPTION_BASE;return this.GET('subscriptions/'+encodeURIComponent(customerAppId)+"?mode="+encodeURIComponent(mode));}},{key:"cancelSubscription",value:/** * Cancel a subscription * @params provisionAccountId Which account create the subscription? TODO: This is a wart; it's unnecessary. */function cancelSubscription(provisioningAccountId,customerAccountId,customerAppId){var cancelSubscriptionBody={'operation':'updateSubscriptionStatus','params':{'provisioningAccountId':provisioningAccountId,'customerAccountId':customerAccountId,'customerAppId':customerAppId,'status':2}};return this.POST('generic',cancelSubscriptionBody);}/** * Reseller - create an auth-only subscription. * * API: partner API * * The createAuthOnlySubscription operation takes a complex body; we're simplifying this by * prefilling most of the fields. We'll want to revisit this later. * * @param {*} customerAccountId * @param {*} appId * @returns */},{key:"createAuthOnlySubscription",value:function createAuthOnlySubscription(customerAccountId,resellerAccountId,appId){var params={'accountId':customerAccountId,'pAccountId':resellerAccountId,'appId':appId};var createAuthOnlySubscriptionPayload={'operation':'createAuthOnlySubscription','params':params};return this.POST('generic',createAuthOnlySubscriptionPayload);}/** * Reseller - create an auth-only subscription. If neeeded, create the customer account first. * If password is null or empty (password === ''), a password will be generated. * * @param {*} customerAccountId * @param {*} accountName * @param {*} contactLastName * @param {*} contactFirstName * @param {*} contactEmail * @param {*} resellerAccountId * @param {*} appId * @param {*} subscriptionEmail * @param {*} subscriptionPassword * @returns */},{key:"createAccountAndAuthOnlySubscription",value:function createAccountAndAuthOnlySubscription(customerAccountId,accountName,contactLastName,contactFirstName,contactEmail,resellerAccountId,appId,subscriptionEmail,subscriptionPassword){var params={'accountId':customerAccountId,'accountName':accountName,'contactLastName':contactLastName,'contactFirstName':contactFirstName,'contactEmail':contactEmail,'pAccountId':resellerAccountId,'appId':appId,'useEmail':subscriptionEmail,'password':subscriptionPassword};var createAccountAndAuthOnlySubscriptionPayload={'operation':'createAccountAndAuthOnlySubscription','params':params};return this.POST('generic',createAccountAndAuthOnlySubscriptionPayload);}/** * Reseller - save authentication for a subscription. This uses the partner api update subscription * operation. * * API: partner API * * @param {*} provisioningAccountId * @param {*} customerAccountId * @param {*} customerAppId * @param {*} subscriptionEmailAddress * @param {*} password * @returns */},{key:"saveAuthentication",value:function saveAuthentication(provisioningAccountId,customerAccountId,customerAppId,subscriptionEmailAddress,password){var updateSubscriptionBody={'operation':'updateSubscription','params':{'provisioningAccountId':provisioningAccountId,'customerAccountId':customerAccountId,'customerAppId':customerAppId,'useEmail':subscriptionEmailAddress,'unencryptedString':password}};return this.POST('generic',updateSubscriptionBody);}}]);return _class;}(API),_class.SUBSCRIPTION_BASE=0,_class.SUBSCRIPTION_AUTH=1,_class.SUBSCRIPTION_CARD=2,_temp);API.Vendor=/*#__PURE__*/function(_API2){Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_class2,_API2);var _super2=Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class2);function _class2(bearerToken){var environment=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'prod';Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this,_class2);return _super2.call(this,bearerToken,'v1/vendor/',environment);}/** * Lookup all invitations. * * @param {*} externalId * @returns */Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_class2,[{key:"getAllInvitations",value:function getAllInvitations(externalId){return this.GET('invitations?invitingExternalId='+encodeURIComponent(externalId));}/** * Get a specific invitation. * * API: vendor API * * @param {*} invitationId * @returns */},{key:"getInvitation",value:function getInvitation(invitationId){return this.GET('invitations/'+encodeURIComponent(invitationId));}/** Create an invitation using this format { "invitingExternalId": "12345", "invitingAccountName": "Happy Harvest", "invitingLastName": "Harper", "invitingFirstName": "Barney", "invitingEmail": "testcust1+bharper@appbind.com", "invitedExternalId": "testres1+iconsultants@appbind.com", "invitedAccountName": "Integration Consultants", "invitedLastName": "Berger", "invitedFirstName": "Samantha", "invitedEmail": "testres1+zconsulting1@appbind.com", "appId": "88e71728-3fbc-11e9-8d90-4bbe4aece328" } */ /** * Vendor's customer - create an invitation. * * API: vendor API * * Body: * { * "invitingExternalId": "12345", * "invitingAccountName": "Happy Harvest", * "invitingLastName": "Harper", * "invitingFirstName": "Barney", * "invitingEmail": "testcust1+bharper@appbind.com", * "invitedExternalId": "testres1+iconsultants@appbind.com", * "invitedAccountName": "Integration Consultants", * "invitedLastName": "Berger", * "invitedFirstName": "Samantha", * "invitedEmail": "testres1+zconsulting1@appbind.com", * "appId": "88e71728-3fbc-11e9-8d90-4bbe4aece328" * } * * @param {*} invitation * @returns */},{key:"createInvitation",value:function createInvitation(invitation){return this.POST('invitations',invitation);}/** * Vendor's customer - delete an invitation. * * API: vendor API * * @param {*} invitationId * @returns */},{key:"deleteInvitation",value:function deleteInvitation(invitationId){return this.DELETE('invitations/'+encodeURIComponent(invitationId));}}]);return _class2;}(API);API.Reseller=/*#__PURE__*/function(_API3){Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_class3,_API3);var _super3=Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_class3);function _class3(bearerToken){var environment=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'prod';Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this,_class3);return _super3.call(this,bearerToken,'v1/reseller/',environment);}/** * Create a customer * * API: partner API * * Partner API version takes this body: * { * 'operation': 'createCustomer', * 'params': { * "accountName": "My Customer", * "accountNum": "1234", * "contactEmail": "joe@somewhere.com", * "contactFirstName": "Joe", * "contactLastName": "Smith", * "address1": "44 West Gay Street", * "city": "West Chester", * "state": "PA", * "country": "US", * "postalCode": "19380" * } * } */ // partner, sometimes reseller Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_class3,[{key:"createCustomer",value:function createCustomer(customer){return this.POST('customers',customer);}/** * Reseller - create a subscription order (used in the customer pay scenario, in which the reseller * is going to send an SO to the customer to request payment. This is for future use.) * * API: partner API * * { * "sendOrderToCustomer": 1, * "emailAddress": "joe@customer.com", * "subscriptions": [ * { * "catalogAppId": "5546d3c2-08ef-11ed-a980-931d5c4a9c64" * } * ], * "services": [ * { * "catalogServiceId": "0840b15a-0dd2-11ed-91f1-ef1890698d3b" * } * ], * "budget": { * "maxMonthlyBudget": 12000, * "initialBalanceAmount": 300, * "autoTopupAmount": 200, * "autoTopupThreshold": 50, * "preApproveSubs": 0 * } * * } * * @param {*} customerAccountId * @param {*} appId * @returns */ // reseller },{key:"createSubscriptionOrder",value:function createSubscriptionOrder(customerAccountId,appId){var order={'sendOrderToCustomer':0,'subscriptions':[{'catalogAppId':appId}],'budget':{'initialBalanceAmount':40,'autoTopupAmount':40,'autoTopupThreshold':20,'preApproveSubs':1}};var createSubscriptionOrder={'operation':'createSubscriptionOrder','params':{'customerAccountId':customerAccountId,'order':order}};return this.POST('generic',createSubscriptionOrder);}// reseller },{key:"createSubscription",value:function createSubscription(customerAccountId,appId){return this.POST('customers/'+customerAccountId+'/subscriptionorder',{'sendOrderToCustomer':0,'subscriptions':[{'catalogAppId':appId}],"budget":{"initialBalanceAmount":40,"autoTopupAmount":40,"autoTopupThreshold":20,"preApproveSubs":1}});}},{key:"saveAuthentication",value:function saveAuthentication(customerAccountId,customerAppId,auth){var _auth={"subscriptionEmailAddress":auth.email,"subscriptionPassword":auth.password};return this.PATCH("customers/"+customerAccountId+"/subscriptions/"+customerAppId,_auth);}},{key:"__queryResponse",value:function __queryResponse(resolve,reject,response){if(response.errMessage||response.message){return reject({status:-1,message:response.message||response.errMessage});}resolve(response);}}]);return _class3;}(API);/* harmony default export */ __webpack_exports__["a"] = (API); /***/ }), /* 17 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useForkRef; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _setRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29); function useForkRef(refA, refB) { /** * This will create a new function if the ref props change and are defined. * This means react will call the old forkRef with `null` and the new forkRef * with the ref. Cleanup naturally emerges from this behavior */ return react__WEBPACK_IMPORTED_MODULE_0__["useMemo"](function () { if (refA == null && refB == null) { return null; } return function (refValue) { Object(_setRef__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(refA, refValue); Object(_setRef__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(refB, refValue); }; }, [refA, refB]); } /***/ }), /* 18 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ jss_esm_RuleList; }); __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ create; }); __webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ createRule; }); __webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ getDynamicStyles; }); __webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ hasCSSTOMSupport; }); __webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ toCssValue; }); // UNUSED EXPORTS: SheetsManager, SheetsRegistry, createGenerateId, sheets // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(2); // EXTERNAL MODULE: ./node_modules/is-in-browser/dist/module.js var dist_module = __webpack_require__(38); // EXTERNAL MODULE: ./node_modules/tiny-warning/dist/tiny-warning.esm.js var tiny_warning_esm = __webpack_require__(46); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__(50); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js var setPrototypeOf = __webpack_require__(85); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; Object(setPrototypeOf["a" /* default */])(subClass, superClass); } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js var assertThisInitialized = __webpack_require__(75); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js var objectWithoutPropertiesLoose = __webpack_require__(56); // CONCATENATED MODULE: ./node_modules/jss/dist/jss.esm.js var plainObjectConstrurctor = {}.constructor; function cloneStyle(style) { if (style == null || typeof style !== 'object') return style; if (Array.isArray(style)) return style.map(cloneStyle); if (style.constructor !== plainObjectConstrurctor) return style; var newStyle = {}; for (var name in style) { newStyle[name] = cloneStyle(style[name]); } return newStyle; } /** * Create a rule instance. */ function createRule(name, decl, options) { if (name === void 0) { name = 'unnamed'; } var jss = options.jss; var declCopy = cloneStyle(decl); var rule = jss.plugins.onCreateRule(name, declCopy, options); if (rule) return rule; // It is an at-rule and it has no instance. if (name[0] === '@') { false ? undefined : void 0; } return null; } var join = function join(value, by) { var result = ''; for (var i = 0; i < value.length; i++) { // Remove !important from the value, it will be readded later. if (value[i] === '!important') break; if (result) result += by; result += value[i]; } return result; }; /** * Converts array values to string. * * `margin: [['5px', '10px']]` > `margin: 5px 10px;` * `border: ['1px', '2px']` > `border: 1px, 2px;` * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;` * `color: ['red', !important]` > `color: red !important;` */ var toCssValue = function toCssValue(value, ignoreImportant) { if (ignoreImportant === void 0) { ignoreImportant = false; } if (!Array.isArray(value)) return value; var cssValue = ''; // Support space separated values via `[['5px', '10px']]`. if (Array.isArray(value[0])) { for (var i = 0; i < value.length; i++) { if (value[i] === '!important') break; if (cssValue) cssValue += ', '; cssValue += join(value[i], ' '); } } else cssValue = join(value, ', '); // Add !important, because it was ignored. if (!ignoreImportant && value[value.length - 1] === '!important') { cssValue += ' !important'; } return cssValue; }; /** * Indent a string. * http://jsperf.com/array-join-vs-for */ function indentStr(str, indent) { var result = ''; for (var index = 0; index < indent; index++) { result += ' '; } return result + str; } /** * Converts a Rule to CSS string. */ function toCss(selector, style, options) { if (options === void 0) { options = {}; } var result = ''; if (!style) return result; var _options = options, _options$indent = _options.indent, indent = _options$indent === void 0 ? 0 : _options$indent; var fallbacks = style.fallbacks; if (selector) indent++; // Apply fallbacks first. if (fallbacks) { // Array syntax {fallbacks: [{prop: value}]} if (Array.isArray(fallbacks)) { for (var index = 0; index < fallbacks.length; index++) { var fallback = fallbacks[index]; for (var prop in fallback) { var value = fallback[prop]; if (value != null) { if (result) result += '\n'; result += "" + indentStr(prop + ": " + toCssValue(value) + ";", indent); } } } } else { // Object syntax {fallbacks: {prop: value}} for (var _prop in fallbacks) { var _value = fallbacks[_prop]; if (_value != null) { if (result) result += '\n'; result += "" + indentStr(_prop + ": " + toCssValue(_value) + ";", indent); } } } } for (var _prop2 in style) { var _value2 = style[_prop2]; if (_value2 != null && _prop2 !== 'fallbacks') { if (result) result += '\n'; result += "" + indentStr(_prop2 + ": " + toCssValue(_value2) + ";", indent); } } // Allow empty style in this case, because properties will be added dynamically. if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined. if (!selector) return result; indent--; if (result) result = "\n" + result + "\n"; return indentStr(selector + " {" + result, indent) + indentStr('}', indent); } var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g; var nativeEscape = typeof CSS !== 'undefined' && CSS.escape; var jss_esm_escape = function escape(str) { return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\$1'); }; var BaseStyleRule = /*#__PURE__*/function () { function BaseStyleRule(key, style, options) { this.type = 'style'; this.key = void 0; this.isProcessed = false; this.style = void 0; this.renderer = void 0; this.renderable = void 0; this.options = void 0; var sheet = options.sheet, Renderer = options.Renderer; this.key = key; this.options = options; this.style = style; if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer(); } /** * Get or set a style property. */ var _proto = BaseStyleRule.prototype; _proto.prop = function prop(name, value, options) { // It's a getter. if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed. var force = options ? options.force : false; if (!force && this.style[name] === value) return this; var newValue = value; if (!options || options.process !== false) { newValue = this.options.jss.plugins.onChangeValue(value, name, this); } var isEmpty = newValue == null || newValue === false; var isDefined = (name in this.style); // Value is empty and wasn't defined before. if (isEmpty && !isDefined && !force) return this; // We are going to remove this value. var remove = isEmpty && isDefined; if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true. if (this.renderable && this.renderer) { if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue); return this; } var sheet = this.options.sheet; if (sheet && sheet.attached) { false ? undefined : void 0; } return this; }; return BaseStyleRule; }(); var jss_esm_StyleRule = /*#__PURE__*/function (_BaseStyleRule) { _inheritsLoose(StyleRule, _BaseStyleRule); function StyleRule(key, style, options) { var _this; _this = _BaseStyleRule.call(this, key, style, options) || this; _this.selectorText = void 0; _this.id = void 0; _this.renderable = void 0; var selector = options.selector, scoped = options.scoped, sheet = options.sheet, generateId = options.generateId; if (selector) { _this.selectorText = selector; } else if (scoped !== false) { _this.id = generateId(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)), sheet); _this.selectorText = "." + jss_esm_escape(_this.id); } return _this; } /** * Set selector string. * Attention: use this with caution. Most browsers didn't implement * selectorText setter, so this may result in rerendering of entire Style Sheet. */ var _proto2 = StyleRule.prototype; /** * Apply rule to an element inline. */ _proto2.applyTo = function applyTo(renderable) { var renderer = this.renderer; if (renderer) { var json = this.toJSON(); for (var prop in json) { renderer.setProperty(renderable, prop, json[prop]); } } return this; } /** * Returns JSON representation of the rule. * Fallbacks are not supported. * Useful for inline styles. */ ; _proto2.toJSON = function toJSON() { var json = {}; for (var prop in this.style) { var value = this.style[prop]; if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value); } return json; } /** * Generates a CSS string. */ ; _proto2.toString = function toString(options) { var sheet = this.options.sheet; var link = sheet ? sheet.options.link : false; var opts = link ? Object(esm_extends["a" /* default */])({}, options, { allowEmpty: true }) : options; return toCss(this.selectorText, this.style, opts); }; Object(createClass["a" /* default */])(StyleRule, [{ key: "selector", set: function set(selector) { if (selector === this.selectorText) return; this.selectorText = selector; var renderer = this.renderer, renderable = this.renderable; if (!renderable || !renderer) return; var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule. if (!hasChanged) { renderer.replaceRule(renderable, this); } } /** * Get selector string. */ , get: function get() { return this.selectorText; } }]); return StyleRule; }(BaseStyleRule); var pluginStyleRule = { onCreateRule: function onCreateRule(name, style, options) { if (name[0] === '@' || options.parent && options.parent.type === 'keyframes') { return null; } return new jss_esm_StyleRule(name, style, options); } }; var defaultToStringOptions = { indent: 1, children: true }; var atRegExp = /@([\w-]+)/; /** * Conditional rule for @media, @supports */ var jss_esm_ConditionalRule = /*#__PURE__*/function () { function ConditionalRule(key, styles, options) { this.type = 'conditional'; this.at = void 0; this.key = void 0; this.query = void 0; this.rules = void 0; this.options = void 0; this.isProcessed = false; this.renderable = void 0; this.key = key; var atMatch = key.match(atRegExp); this.at = atMatch ? atMatch[1] : 'unknown'; // Key might contain a unique suffix in case the `name` passed by user was duplicate. this.query = options.name || "@" + this.at; this.options = options; this.rules = new jss_esm_RuleList(Object(esm_extends["a" /* default */])({}, options, { parent: this })); for (var name in styles) { this.rules.add(name, styles[name]); } this.rules.process(); } /** * Get a rule. */ var _proto = ConditionalRule.prototype; _proto.getRule = function getRule(name) { return this.rules.get(name); } /** * Get index of a rule. */ ; _proto.indexOf = function indexOf(rule) { return this.rules.indexOf(rule); } /** * Create and register rule, run plugins. */ ; _proto.addRule = function addRule(name, style, options) { var rule = this.rules.add(name, style, options); if (!rule) return null; this.options.jss.plugins.onProcessRule(rule); return rule; } /** * Generates a CSS string. */ ; _proto.toString = function toString(options) { if (options === void 0) { options = defaultToStringOptions; } if (options.indent == null) options.indent = defaultToStringOptions.indent; if (options.children == null) options.children = defaultToStringOptions.children; if (options.children === false) { return this.query + " {}"; } var children = this.rules.toString(options); return children ? this.query + " {\n" + children + "\n}" : ''; }; return ConditionalRule; }(); var keyRegExp = /@media|@supports\s+/; var pluginConditionalRule = { onCreateRule: function onCreateRule(key, styles, options) { return keyRegExp.test(key) ? new jss_esm_ConditionalRule(key, styles, options) : null; } }; var defaultToStringOptions$1 = { indent: 1, children: true }; var nameRegExp = /@keyframes\s+([\w-]+)/; /** * Rule for @keyframes */ var jss_esm_KeyframesRule = /*#__PURE__*/function () { function KeyframesRule(key, frames, options) { this.type = 'keyframes'; this.at = '@keyframes'; this.key = void 0; this.name = void 0; this.id = void 0; this.rules = void 0; this.options = void 0; this.isProcessed = false; this.renderable = void 0; var nameMatch = key.match(nameRegExp); if (nameMatch && nameMatch[1]) { this.name = nameMatch[1]; } else { this.name = 'noname'; false ? undefined : void 0; } this.key = this.type + "-" + this.name; this.options = options; var scoped = options.scoped, sheet = options.sheet, generateId = options.generateId; this.id = scoped === false ? this.name : jss_esm_escape(generateId(this, sheet)); this.rules = new jss_esm_RuleList(Object(esm_extends["a" /* default */])({}, options, { parent: this })); for (var name in frames) { this.rules.add(name, frames[name], Object(esm_extends["a" /* default */])({}, options, { parent: this })); } this.rules.process(); } /** * Generates a CSS string. */ var _proto = KeyframesRule.prototype; _proto.toString = function toString(options) { if (options === void 0) { options = defaultToStringOptions$1; } if (options.indent == null) options.indent = defaultToStringOptions$1.indent; if (options.children == null) options.children = defaultToStringOptions$1.children; if (options.children === false) { return this.at + " " + this.id + " {}"; } var children = this.rules.toString(options); if (children) children = "\n" + children + "\n"; return this.at + " " + this.id + " {" + children + "}"; }; return KeyframesRule; }(); var keyRegExp$1 = /@keyframes\s+/; var refRegExp = /\$([\w-]+)/g; var findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) { if (typeof val === 'string') { return val.replace(refRegExp, function (match, name) { if (name in keyframes) { return keyframes[name]; } false ? undefined : void 0; return match; }); } return val; }; /** * Replace the reference for a animation name. */ var replaceRef = function replaceRef(style, prop, keyframes) { var value = style[prop]; var refKeyframe = findReferencedKeyframe(value, keyframes); if (refKeyframe !== value) { style[prop] = refKeyframe; } }; var jss_esm_plugin = { onCreateRule: function onCreateRule(key, frames, options) { return typeof key === 'string' && keyRegExp$1.test(key) ? new jss_esm_KeyframesRule(key, frames, options) : null; }, // Animation name ref replacer. onProcessStyle: function onProcessStyle(style, rule, sheet) { if (rule.type !== 'style' || !sheet) return style; if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes); if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes); return style; }, onChangeValue: function onChangeValue(val, prop, rule) { var sheet = rule.options.sheet; if (!sheet) { return val; } switch (prop) { case 'animation': return findReferencedKeyframe(val, sheet.keyframes); case 'animation-name': return findReferencedKeyframe(val, sheet.keyframes); default: return val; } } }; var jss_esm_KeyframeRule = /*#__PURE__*/function (_BaseStyleRule) { _inheritsLoose(KeyframeRule, _BaseStyleRule); function KeyframeRule() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _BaseStyleRule.call.apply(_BaseStyleRule, [this].concat(args)) || this; _this.renderable = void 0; return _this; } var _proto = KeyframeRule.prototype; /** * Generates a CSS string. */ _proto.toString = function toString(options) { var sheet = this.options.sheet; var link = sheet ? sheet.options.link : false; var opts = link ? Object(esm_extends["a" /* default */])({}, options, { allowEmpty: true }) : options; return toCss(this.key, this.style, opts); }; return KeyframeRule; }(BaseStyleRule); var pluginKeyframeRule = { onCreateRule: function onCreateRule(key, style, options) { if (options.parent && options.parent.type === 'keyframes') { return new jss_esm_KeyframeRule(key, style, options); } return null; } }; var FontFaceRule = /*#__PURE__*/function () { function FontFaceRule(key, style, options) { this.type = 'font-face'; this.at = '@font-face'; this.key = void 0; this.style = void 0; this.options = void 0; this.isProcessed = false; this.renderable = void 0; this.key = key; this.style = style; this.options = options; } /** * Generates a CSS string. */ var _proto = FontFaceRule.prototype; _proto.toString = function toString(options) { if (Array.isArray(this.style)) { var str = ''; for (var index = 0; index < this.style.length; index++) { str += toCss(this.at, this.style[index]); if (this.style[index + 1]) str += '\n'; } return str; } return toCss(this.at, this.style, options); }; return FontFaceRule; }(); var keyRegExp$2 = /@font-face/; var pluginFontFaceRule = { onCreateRule: function onCreateRule(key, style, options) { return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null; } }; var ViewportRule = /*#__PURE__*/function () { function ViewportRule(key, style, options) { this.type = 'viewport'; this.at = '@viewport'; this.key = void 0; this.style = void 0; this.options = void 0; this.isProcessed = false; this.renderable = void 0; this.key = key; this.style = style; this.options = options; } /** * Generates a CSS string. */ var _proto = ViewportRule.prototype; _proto.toString = function toString(options) { return toCss(this.key, this.style, options); }; return ViewportRule; }(); var pluginViewportRule = { onCreateRule: function onCreateRule(key, style, options) { return key === '@viewport' || key === '@-ms-viewport' ? new ViewportRule(key, style, options) : null; } }; var SimpleRule = /*#__PURE__*/function () { function SimpleRule(key, value, options) { this.type = 'simple'; this.key = void 0; this.value = void 0; this.options = void 0; this.isProcessed = false; this.renderable = void 0; this.key = key; this.value = value; this.options = options; } /** * Generates a CSS string. */ // eslint-disable-next-line no-unused-vars var _proto = SimpleRule.prototype; _proto.toString = function toString(options) { if (Array.isArray(this.value)) { var str = ''; for (var index = 0; index < this.value.length; index++) { str += this.key + " " + this.value[index] + ";"; if (this.value[index + 1]) str += '\n'; } return str; } return this.key + " " + this.value + ";"; }; return SimpleRule; }(); var keysMap = { '@charset': true, '@import': true, '@namespace': true }; var pluginSimpleRule = { onCreateRule: function onCreateRule(key, value, options) { return key in keysMap ? new SimpleRule(key, value, options) : null; } }; var plugins = [pluginStyleRule, pluginConditionalRule, jss_esm_plugin, pluginKeyframeRule, pluginFontFaceRule, pluginViewportRule, pluginSimpleRule]; var defaultUpdateOptions = { process: true }; var forceUpdateOptions = { force: true, process: true /** * Contains rules objects and allows adding/removing etc. * Is used for e.g. by `StyleSheet` or `ConditionalRule`. */ }; var jss_esm_RuleList = /*#__PURE__*/function () { // Rules registry for access by .get() method. // It contains the same rule registered by name and by selector. // Original styles object. // Used to ensure correct rules order. function RuleList(options) { this.map = {}; this.raw = {}; this.index = []; this.counter = 0; this.options = void 0; this.classes = void 0; this.keyframes = void 0; this.options = options; this.classes = options.classes; this.keyframes = options.keyframes; } /** * Create and register rule. * * Will not render after Style Sheet was rendered the first time. */ var _proto = RuleList.prototype; _proto.add = function add(name, decl, ruleOptions) { var _this$options = this.options, parent = _this$options.parent, sheet = _this$options.sheet, jss = _this$options.jss, Renderer = _this$options.Renderer, generateId = _this$options.generateId, scoped = _this$options.scoped; var options = Object(esm_extends["a" /* default */])({ classes: this.classes, parent: parent, sheet: sheet, jss: jss, Renderer: Renderer, generateId: generateId, scoped: scoped, name: name, keyframes: this.keyframes, selector: undefined }, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but // `sheet.addRule()` opens the door for any duplicate rule name. When this happens // we need to make the key unique within this RuleList instance scope. var key = name; if (name in this.raw) { key = name + "-d" + this.counter++; } // We need to save the original decl before creating the rule // because cache plugin needs to use it as a key to return a cached rule. this.raw[key] = decl; if (key in this.classes) { // E.g. rules inside of @media container options.selector = "." + jss_esm_escape(this.classes[key]); } var rule = createRule(key, decl, options); if (!rule) return null; this.register(rule); var index = options.index === undefined ? this.index.length : options.index; this.index.splice(index, 0, rule); return rule; } /** * Get a rule. */ ; _proto.get = function get(name) { return this.map[name]; } /** * Delete a rule. */ ; _proto.remove = function remove(rule) { this.unregister(rule); delete this.raw[rule.key]; this.index.splice(this.index.indexOf(rule), 1); } /** * Get index of a rule. */ ; _proto.indexOf = function indexOf(rule) { return this.index.indexOf(rule); } /** * Run `onProcessRule()` plugins on every rule. */ ; _proto.process = function process() { var plugins = this.options.jss.plugins; // We need to clone array because if we modify the index somewhere else during a loop // we end up with very hard-to-track-down side effects. this.index.slice(0).forEach(plugins.onProcessRule, plugins); } /** * Register a rule in `.map`, `.classes` and `.keyframes` maps. */ ; _proto.register = function register(rule) { this.map[rule.key] = rule; if (rule instanceof jss_esm_StyleRule) { this.map[rule.selector] = rule; if (rule.id) this.classes[rule.key] = rule.id; } else if (rule instanceof jss_esm_KeyframesRule && this.keyframes) { this.keyframes[rule.name] = rule.id; } } /** * Unregister a rule. */ ; _proto.unregister = function unregister(rule) { delete this.map[rule.key]; if (rule instanceof jss_esm_StyleRule) { delete this.map[rule.selector]; delete this.classes[rule.key]; } else if (rule instanceof jss_esm_KeyframesRule) { delete this.keyframes[rule.name]; } } /** * Update the function values with a new data. */ ; _proto.update = function update() { var name; var data; var options; if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') { name = arguments.length <= 0 ? undefined : arguments[0]; // $FlowFixMe[invalid-tuple-index] data = arguments.length <= 1 ? undefined : arguments[1]; // $FlowFixMe[invalid-tuple-index] options = arguments.length <= 2 ? undefined : arguments[2]; } else { data = arguments.length <= 0 ? undefined : arguments[0]; // $FlowFixMe[invalid-tuple-index] options = arguments.length <= 1 ? undefined : arguments[1]; name = null; } if (name) { this.updateOne(this.map[name], data, options); } else { for (var index = 0; index < this.index.length; index++) { this.updateOne(this.index[index], data, options); } } } /** * Execute plugins, update rule props. */ ; _proto.updateOne = function updateOne(rule, data, options) { if (options === void 0) { options = defaultUpdateOptions; } var _this$options2 = this.options, plugins = _this$options2.jss.plugins, sheet = _this$options2.sheet; // It is a rules container like for e.g. ConditionalRule. if (rule.rules instanceof RuleList) { rule.rules.update(data, options); return; } var styleRule = rule; var style = styleRule.style; plugins.onUpdate(data, rule, sheet, options); // We rely on a new `style` ref in case it was mutated during onUpdate hook. if (options.process && style && style !== styleRule.style) { // We need to run the plugins in case new `style` relies on syntax plugins. plugins.onProcessStyle(styleRule.style, styleRule, sheet); // Update and add props. for (var prop in styleRule.style) { var nextValue = styleRule.style[prop]; var prevValue = style[prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule. // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here. if (nextValue !== prevValue) { styleRule.prop(prop, nextValue, forceUpdateOptions); } } // Remove props. for (var _prop in style) { var _nextValue = styleRule.style[_prop]; var _prevValue = style[_prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule. // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here. if (_nextValue == null && _nextValue !== _prevValue) { styleRule.prop(_prop, null, forceUpdateOptions); } } } } /** * Convert rules to a CSS string. */ ; _proto.toString = function toString(options) { var str = ''; var sheet = this.options.sheet; var link = sheet ? sheet.options.link : false; for (var index = 0; index < this.index.length; index++) { var rule = this.index[index]; var css = rule.toString(options); // No need to render an empty rule. if (!css && !link) continue; if (str) str += '\n'; str += css; } return str; }; return RuleList; }(); var jss_esm_StyleSheet = /*#__PURE__*/function () { function StyleSheet(styles, options) { this.options = void 0; this.deployed = void 0; this.attached = void 0; this.rules = void 0; this.renderer = void 0; this.classes = void 0; this.keyframes = void 0; this.queue = void 0; this.attached = false; this.deployed = false; this.classes = {}; this.keyframes = {}; this.options = Object(esm_extends["a" /* default */])({}, options, { sheet: this, parent: this, classes: this.classes, keyframes: this.keyframes }); if (options.Renderer) { this.renderer = new options.Renderer(this); } this.rules = new jss_esm_RuleList(this.options); for (var name in styles) { this.rules.add(name, styles[name]); } this.rules.process(); } /** * Attach renderable to the render tree. */ var _proto = StyleSheet.prototype; _proto.attach = function attach() { if (this.attached) return this; if (this.renderer) this.renderer.attach(); this.attached = true; // Order is important, because we can't use insertRule API if style element is not attached. if (!this.deployed) this.deploy(); return this; } /** * Remove renderable from render tree. */ ; _proto.detach = function detach() { if (!this.attached) return this; if (this.renderer) this.renderer.detach(); this.attached = false; return this; } /** * Add a rule to the current stylesheet. * Will insert a rule also after the stylesheet has been rendered first time. */ ; _proto.addRule = function addRule(name, decl, options) { var queue = this.queue; // Plugins can create rules. // In order to preserve the right order, we need to queue all `.addRule` calls, // which happen after the first `rules.add()` call. if (this.attached && !queue) this.queue = []; var rule = this.rules.add(name, decl, options); if (!rule) return null; this.options.jss.plugins.onProcessRule(rule); if (this.attached) { if (!this.deployed) return rule; // Don't insert rule directly if there is no stringified version yet. // It will be inserted all together when .attach is called. if (queue) queue.push(rule);else { this.insertRule(rule); if (this.queue) { this.queue.forEach(this.insertRule, this); this.queue = undefined; } } return rule; } // We can't add rules to a detached style node. // We will redeploy the sheet once user will attach it. this.deployed = false; return rule; } /** * Insert rule into the StyleSheet */ ; _proto.insertRule = function insertRule(rule) { if (this.renderer) { this.renderer.insertRule(rule); } } /** * Create and add rules. * Will render also after Style Sheet was rendered the first time. */ ; _proto.addRules = function addRules(styles, options) { var added = []; for (var name in styles) { var rule = this.addRule(name, styles[name], options); if (rule) added.push(rule); } return added; } /** * Get a rule by name. */ ; _proto.getRule = function getRule(name) { return this.rules.get(name); } /** * Delete a rule by name. * Returns `true`: if rule has been deleted from the DOM. */ ; _proto.deleteRule = function deleteRule(name) { var rule = typeof name === 'object' ? name : this.rules.get(name); if (!rule || // Style sheet was created without link: true and attached, in this case we // won't be able to remove the CSS rule from the DOM. this.attached && !rule.renderable) { return false; } this.rules.remove(rule); if (this.attached && rule.renderable && this.renderer) { return this.renderer.deleteRule(rule.renderable); } return true; } /** * Get index of a rule. */ ; _proto.indexOf = function indexOf(rule) { return this.rules.indexOf(rule); } /** * Deploy pure CSS string to a renderable. */ ; _proto.deploy = function deploy() { if (this.renderer) this.renderer.deploy(); this.deployed = true; return this; } /** * Update the function values with a new data. */ ; _proto.update = function update() { var _this$rules; (_this$rules = this.rules).update.apply(_this$rules, arguments); return this; } /** * Updates a single rule. */ ; _proto.updateOne = function updateOne(rule, data, options) { this.rules.updateOne(rule, data, options); return this; } /** * Convert rules to a CSS string. */ ; _proto.toString = function toString(options) { return this.rules.toString(options); }; return StyleSheet; }(); var PluginsRegistry = /*#__PURE__*/function () { function PluginsRegistry() { this.plugins = { internal: [], external: [] }; this.registry = void 0; } var _proto = PluginsRegistry.prototype; /** * Call `onCreateRule` hooks and return an object if returned by a hook. */ _proto.onCreateRule = function onCreateRule(name, decl, options) { for (var i = 0; i < this.registry.onCreateRule.length; i++) { var rule = this.registry.onCreateRule[i](name, decl, options); if (rule) return rule; } return null; } /** * Call `onProcessRule` hooks. */ ; _proto.onProcessRule = function onProcessRule(rule) { if (rule.isProcessed) return; var sheet = rule.options.sheet; for (var i = 0; i < this.registry.onProcessRule.length; i++) { this.registry.onProcessRule[i](rule, sheet); } if (rule.style) this.onProcessStyle(rule.style, rule, sheet); rule.isProcessed = true; } /** * Call `onProcessStyle` hooks. */ ; _proto.onProcessStyle = function onProcessStyle(style, rule, sheet) { for (var i = 0; i < this.registry.onProcessStyle.length; i++) { // $FlowFixMe[prop-missing] rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet); } } /** * Call `onProcessSheet` hooks. */ ; _proto.onProcessSheet = function onProcessSheet(sheet) { for (var i = 0; i < this.registry.onProcessSheet.length; i++) { this.registry.onProcessSheet[i](sheet); } } /** * Call `onUpdate` hooks. */ ; _proto.onUpdate = function onUpdate(data, rule, sheet, options) { for (var i = 0; i < this.registry.onUpdate.length; i++) { this.registry.onUpdate[i](data, rule, sheet, options); } } /** * Call `onChangeValue` hooks. */ ; _proto.onChangeValue = function onChangeValue(value, prop, rule) { var processedValue = value; for (var i = 0; i < this.registry.onChangeValue.length; i++) { processedValue = this.registry.onChangeValue[i](processedValue, prop, rule); } return processedValue; } /** * Register a plugin. */ ; _proto.use = function use(newPlugin, options) { if (options === void 0) { options = { queue: 'external' }; } var plugins = this.plugins[options.queue]; // Avoids applying same plugin twice, at least based on ref. if (plugins.indexOf(newPlugin) !== -1) { return; } plugins.push(newPlugin); this.registry = [].concat(this.plugins.external, this.plugins.internal).reduce(function (registry, plugin) { for (var name in plugin) { if (name in registry) { registry[name].push(plugin[name]); } else { false ? undefined : void 0; } } return registry; }, { onCreateRule: [], onProcessRule: [], onProcessStyle: [], onProcessSheet: [], onChangeValue: [], onUpdate: [] }); }; return PluginsRegistry; }(); /** * Sheets registry to access them all at one place. */ var jss_esm_SheetsRegistry = /*#__PURE__*/function () { function SheetsRegistry() { this.registry = []; } var _proto = SheetsRegistry.prototype; /** * Register a Style Sheet. */ _proto.add = function add(sheet) { var registry = this.registry; var index = sheet.options.index; if (registry.indexOf(sheet) !== -1) return; if (registry.length === 0 || index >= this.index) { registry.push(sheet); return; } // Find a position. for (var i = 0; i < registry.length; i++) { if (registry[i].options.index > index) { registry.splice(i, 0, sheet); return; } } } /** * Reset the registry. */ ; _proto.reset = function reset() { this.registry = []; } /** * Remove a Style Sheet. */ ; _proto.remove = function remove(sheet) { var index = this.registry.indexOf(sheet); this.registry.splice(index, 1); } /** * Convert all attached sheets to a CSS string. */ ; _proto.toString = function toString(_temp) { var _ref = _temp === void 0 ? {} : _temp, attached = _ref.attached, options = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref, ["attached"]); var css = ''; for (var i = 0; i < this.registry.length; i++) { var sheet = this.registry[i]; if (attached != null && sheet.attached !== attached) { continue; } if (css) css += '\n'; css += sheet.toString(options); } return css; }; Object(createClass["a" /* default */])(SheetsRegistry, [{ key: "index", /** * Current highest index number. */ get: function get() { return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index; } }]); return SheetsRegistry; }(); /** * This is a global sheets registry. Only DomRenderer will add sheets to it. * On the server one should use an own SheetsRegistry instance and add the * sheets to it, because you need to make sure to create a new registry for * each request in order to not leak sheets across requests. */ var registry = new jss_esm_SheetsRegistry(); /* eslint-disable */ /** * Now that `globalThis` is available on most platforms * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility) * we check for `globalThis` first. `globalThis` is necessary for jss * to run in Agoric's secure version of JavaScript (SES). Under SES, * `globalThis` exists, but `window`, `self`, and `Function('return * this')()` are all undefined for security reasons. * * https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 */ var globalThis$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' && window.Math === Math ? window : typeof self !== 'undefined' && self.Math === Math ? self : Function('return this')(); var ns = '2f1acc6c3a606b082e5eef5e54414ffb'; if (globalThis$1[ns] == null) globalThis$1[ns] = 0; // Bundle may contain multiple JSS versions at the same time. In order to identify // the current version with just one short number and use it for classes generation // we use a counter. Also it is more accurate, because user can manually reevaluate // the module. var moduleId = globalThis$1[ns]++; var maxRules = 1e10; /** * Returns a function which generates unique class names based on counters. * When new generator function is created, rule counter is reseted. * We need to reset the rule counter for SSR for each request. */ var createGenerateId = function createGenerateId(options) { if (options === void 0) { options = {}; } var ruleCounter = 0; return function (rule, sheet) { ruleCounter += 1; if (ruleCounter > maxRules) { false ? undefined : void 0; } var jssId = ''; var prefix = ''; if (sheet) { if (sheet.options.classNamePrefix) { prefix = sheet.options.classNamePrefix; } if (sheet.options.jss.id != null) { jssId = String(sheet.options.jss.id); } } if (options.minify) { // Using "c" because a number can't be the first char in a class name. return "" + (prefix || 'c') + moduleId + jssId + ruleCounter; } return prefix + rule.key + "-" + moduleId + (jssId ? "-" + jssId : '') + "-" + ruleCounter; }; }; /** * Cache the value from the first time a function is called. */ var memoize = function memoize(fn) { var value; return function () { if (!value) value = fn(); return value; }; }; /** * Get a style property value. */ var getPropertyValue = function getPropertyValue(cssRule, prop) { try { // Support CSSTOM. if (cssRule.attributeStyleMap) { return cssRule.attributeStyleMap.get(prop); } return cssRule.style.getPropertyValue(prop); } catch (err) { // IE may throw if property is unknown. return ''; } }; /** * Set a style property. */ var setProperty = function setProperty(cssRule, prop, value) { try { var cssValue = value; if (Array.isArray(value)) { cssValue = toCssValue(value, true); if (value[value.length - 1] === '!important') { cssRule.style.setProperty(prop, cssValue, 'important'); return true; } } // Support CSSTOM. if (cssRule.attributeStyleMap) { cssRule.attributeStyleMap.set(prop, cssValue); } else { cssRule.style.setProperty(prop, cssValue); } } catch (err) { // IE may throw if property is unknown. return false; } return true; }; /** * Remove a style property. */ var removeProperty = function removeProperty(cssRule, prop) { try { // Support CSSTOM. if (cssRule.attributeStyleMap) { cssRule.attributeStyleMap.delete(prop); } else { cssRule.style.removeProperty(prop); } } catch (err) { false ? undefined : void 0; } }; /** * Set the selector. */ var setSelector = function setSelector(cssRule, selectorText) { cssRule.selectorText = selectorText; // Return false if setter was not successful. // Currently works in chrome only. return cssRule.selectorText === selectorText; }; /** * Gets the `head` element upon the first call and caches it. * We assume it can't be null. */ var getHead = memoize(function () { return document.querySelector('head'); }); /** * Find attached sheet with an index higher than the passed one. */ function findHigherSheet(registry, options) { for (var i = 0; i < registry.length; i++) { var sheet = registry[i]; if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) { return sheet; } } return null; } /** * Find attached sheet with the highest index. */ function findHighestSheet(registry, options) { for (var i = registry.length - 1; i >= 0; i--) { var sheet = registry[i]; if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) { return sheet; } } return null; } /** * Find a comment with "jss" inside. */ function findCommentNode(text) { var head = getHead(); for (var i = 0; i < head.childNodes.length; i++) { var node = head.childNodes[i]; if (node.nodeType === 8 && node.nodeValue.trim() === text) { return node; } } return null; } /** * Find a node before which we can insert the sheet. */ function findPrevNode(options) { var registry$1 = registry.registry; if (registry$1.length > 0) { // Try to insert before the next higher sheet. var sheet = findHigherSheet(registry$1, options); if (sheet && sheet.renderer) { return { parent: sheet.renderer.element.parentNode, node: sheet.renderer.element }; } // Otherwise insert after the last attached. sheet = findHighestSheet(registry$1, options); if (sheet && sheet.renderer) { return { parent: sheet.renderer.element.parentNode, node: sheet.renderer.element.nextSibling }; } } // Try to find a comment placeholder if registry is empty. var insertionPoint = options.insertionPoint; if (insertionPoint && typeof insertionPoint === 'string') { var comment = findCommentNode(insertionPoint); if (comment) { return { parent: comment.parentNode, node: comment.nextSibling }; } // If user specifies an insertion point and it can't be found in the document - // bad specificity issues may appear. false ? undefined : void 0; } return false; } /** * Insert style element into the DOM. */ function insertStyle(style, options) { var insertionPoint = options.insertionPoint; var nextNode = findPrevNode(options); if (nextNode !== false && nextNode.parent) { nextNode.parent.insertBefore(style, nextNode.node); return; } // Works with iframes and any node types. if (insertionPoint && typeof insertionPoint.nodeType === 'number') { // https://stackoverflow.com/questions/41328728/force-casting-in-flow var insertionPointElement = insertionPoint; var parentNode = insertionPointElement.parentNode; if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else false ? undefined : void 0; return; } getHead().appendChild(style); } /** * Read jss nonce setting from the page if the user has set it. */ var getNonce = memoize(function () { var node = document.querySelector('meta[property="csp-nonce"]'); return node ? node.getAttribute('content') : null; }); var _insertRule = function insertRule(container, rule, index) { try { if ('insertRule' in container) { var c = container; c.insertRule(rule, index); } // Keyframes rule. else if ('appendRule' in container) { var _c = container; _c.appendRule(rule); } } catch (err) { false ? undefined : void 0; return false; } return container.cssRules[index]; }; var getValidRuleInsertionIndex = function getValidRuleInsertionIndex(container, index) { var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong if (index === undefined || index > maxIndex) { // eslint-disable-next-line no-param-reassign return maxIndex; } return index; }; var createStyle = function createStyle() { var el = document.createElement('style'); // Without it, IE will have a broken source order specificity if we // insert rules after we insert the style tag. // It seems to kick-off the source order specificity algorithm. el.textContent = '\n'; return el; }; var DomRenderer = /*#__PURE__*/function () { // HTMLStyleElement needs fixing https://github.com/facebook/flow/issues/2696 // Will be empty if link: true option is not set, because // it is only for use together with insertRule API. function DomRenderer(sheet) { this.getPropertyValue = getPropertyValue; this.setProperty = setProperty; this.removeProperty = removeProperty; this.setSelector = setSelector; this.element = void 0; this.sheet = void 0; this.hasInsertedRules = false; this.cssRules = []; // There is no sheet when the renderer is used from a standalone StyleRule. if (sheet) registry.add(sheet); this.sheet = sheet; var _ref = this.sheet ? this.sheet.options : {}, media = _ref.media, meta = _ref.meta, element = _ref.element; this.element = element || createStyle(); this.element.setAttribute('data-jss', ''); if (media) this.element.setAttribute('media', media); if (meta) this.element.setAttribute('data-meta', meta); var nonce = getNonce(); if (nonce) this.element.setAttribute('nonce', nonce); } /** * Insert style element into render tree. */ var _proto = DomRenderer.prototype; _proto.attach = function attach() { // In the case the element node is external and it is already in the DOM. if (this.element.parentNode || !this.sheet) return; insertStyle(this.element, this.sheet.options); // When rules are inserted using `insertRule` API, after `sheet.detach().attach()` // most browsers create a new CSSStyleSheet, except of all IEs. var deployed = Boolean(this.sheet && this.sheet.deployed); if (this.hasInsertedRules && deployed) { this.hasInsertedRules = false; this.deploy(); } } /** * Remove style element from render tree. */ ; _proto.detach = function detach() { if (!this.sheet) return; var parentNode = this.element.parentNode; if (parentNode) parentNode.removeChild(this.element); // In the most browsers, rules inserted using insertRule() API will be lost when style element is removed. // Though IE will keep them and we need a consistent behavior. if (this.sheet.options.link) { this.cssRules = []; this.element.textContent = '\n'; } } /** * Inject CSS string into element. */ ; _proto.deploy = function deploy() { var sheet = this.sheet; if (!sheet) return; if (sheet.options.link) { this.insertRules(sheet.rules); return; } this.element.textContent = "\n" + sheet.toString() + "\n"; } /** * Insert RuleList into an element. */ ; _proto.insertRules = function insertRules(rules, nativeParent) { for (var i = 0; i < rules.index.length; i++) { this.insertRule(rules.index[i], i, nativeParent); } } /** * Insert a rule into element. */ ; _proto.insertRule = function insertRule(rule, index, nativeParent) { if (nativeParent === void 0) { nativeParent = this.element.sheet; } if (rule.rules) { var parent = rule; var latestNativeParent = nativeParent; if (rule.type === 'conditional' || rule.type === 'keyframes') { var _insertionIndex = getValidRuleInsertionIndex(nativeParent, index); // We need to render the container without children first. latestNativeParent = _insertRule(nativeParent, parent.toString({ children: false }), _insertionIndex); if (latestNativeParent === false) { return false; } this.refCssRule(rule, _insertionIndex, latestNativeParent); } this.insertRules(parent.rules, latestNativeParent); return latestNativeParent; } var ruleStr = rule.toString(); if (!ruleStr) return false; var insertionIndex = getValidRuleInsertionIndex(nativeParent, index); var nativeRule = _insertRule(nativeParent, ruleStr, insertionIndex); if (nativeRule === false) { return false; } this.hasInsertedRules = true; this.refCssRule(rule, insertionIndex, nativeRule); return nativeRule; }; _proto.refCssRule = function refCssRule(rule, index, cssRule) { rule.renderable = cssRule; // We only want to reference the top level rules, deleteRule API doesn't support removing nested rules // like rules inside media queries or keyframes if (rule.options.parent instanceof jss_esm_StyleSheet) { this.cssRules[index] = cssRule; } } /** * Delete a rule. */ ; _proto.deleteRule = function deleteRule(cssRule) { var sheet = this.element.sheet; var index = this.indexOf(cssRule); if (index === -1) return false; sheet.deleteRule(index); this.cssRules.splice(index, 1); return true; } /** * Get index of a CSS Rule. */ ; _proto.indexOf = function indexOf(cssRule) { return this.cssRules.indexOf(cssRule); } /** * Generate a new CSS rule and replace the existing one. * * Only used for some old browsers because they can't set a selector. */ ; _proto.replaceRule = function replaceRule(cssRule, rule) { var index = this.indexOf(cssRule); if (index === -1) return false; this.element.sheet.deleteRule(index); this.cssRules.splice(index, 1); return this.insertRule(rule, index); } /** * Get all rules elements. */ ; _proto.getRules = function getRules() { return this.element.sheet.cssRules; }; return DomRenderer; }(); var instanceCounter = 0; var jss_esm_Jss = /*#__PURE__*/function () { function Jss(options) { this.id = instanceCounter++; this.version = "10.6.0"; this.plugins = new PluginsRegistry(); this.options = { id: { minify: false }, createGenerateId: createGenerateId, Renderer: dist_module["a" /* default */] ? DomRenderer : null, plugins: [] }; this.generateId = createGenerateId({ minify: false }); for (var i = 0; i < plugins.length; i++) { this.plugins.use(plugins[i], { queue: 'internal' }); } this.setup(options); } /** * Prepares various options, applies plugins. * Should not be used twice on the same instance, because there is no plugins * deduplication logic. */ var _proto = Jss.prototype; _proto.setup = function setup(options) { if (options === void 0) { options = {}; } if (options.createGenerateId) { this.options.createGenerateId = options.createGenerateId; } if (options.id) { this.options.id = Object(esm_extends["a" /* default */])({}, this.options.id, options.id); } if (options.createGenerateId || options.id) { this.generateId = this.options.createGenerateId(this.options.id); } if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint; if ('Renderer' in options) { this.options.Renderer = options.Renderer; } // eslint-disable-next-line prefer-spread if (options.plugins) this.use.apply(this, options.plugins); return this; } /** * Create a Style Sheet. */ ; _proto.createStyleSheet = function createStyleSheet(styles, options) { if (options === void 0) { options = {}; } var _options = options, index = _options.index; if (typeof index !== 'number') { index = registry.index === 0 ? 0 : registry.index + 1; } var sheet = new jss_esm_StyleSheet(styles, Object(esm_extends["a" /* default */])({}, options, { jss: this, generateId: options.generateId || this.generateId, insertionPoint: this.options.insertionPoint, Renderer: this.options.Renderer, index: index })); this.plugins.onProcessSheet(sheet); return sheet; } /** * Detach the Style Sheet and remove it from the registry. */ ; _proto.removeStyleSheet = function removeStyleSheet(sheet) { sheet.detach(); registry.remove(sheet); return this; } /** * Create a rule without a Style Sheet. * [Deprecated] will be removed in the next major version. */ ; _proto.createRule = function createRule$1(name, style, options) { if (style === void 0) { style = {}; } if (options === void 0) { options = {}; } // Enable rule without name for inline styles. if (typeof name === 'object') { // $FlowFixMe[incompatible-call] return this.createRule(undefined, name, style); } // $FlowFixMe[incompatible-type] var ruleOptions = Object(esm_extends["a" /* default */])({}, options, { name: name, jss: this, Renderer: this.options.Renderer }); if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId; if (!ruleOptions.classes) ruleOptions.classes = {}; if (!ruleOptions.keyframes) ruleOptions.keyframes = {}; var rule = createRule(name, style, ruleOptions); if (rule) this.plugins.onProcessRule(rule); return rule; } /** * Register plugin. Passed function will be invoked with a rule instance. */ ; _proto.use = function use() { var _this = this; for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) { plugins[_key] = arguments[_key]; } plugins.forEach(function (plugin) { _this.plugins.use(plugin); }); return this; }; return Jss; }(); /** * Extracts a styles object with only props that contain function values. */ function getDynamicStyles(styles) { var to = null; for (var key in styles) { var value = styles[key]; var type = typeof value; if (type === 'function') { if (!to) to = {}; to[key] = value; } else if (type === 'object' && value !== null && !Array.isArray(value)) { var extracted = getDynamicStyles(value); if (extracted) { if (!to) to = {}; to[key] = extracted; } } } return to; } /** * SheetsManager is like a WeakMap which is designed to count StyleSheet * instances and attach/detach automatically. */ var jss_esm_SheetsManager = /*#__PURE__*/function () { function SheetsManager() { this.length = 0; this.sheets = new WeakMap(); } var _proto = SheetsManager.prototype; _proto.get = function get(key) { var entry = this.sheets.get(key); return entry && entry.sheet; }; _proto.add = function add(key, sheet) { if (this.sheets.has(key)) return; this.length++; this.sheets.set(key, { sheet: sheet, refs: 0 }); }; _proto.manage = function manage(key) { var entry = this.sheets.get(key); if (entry) { if (entry.refs === 0) { entry.sheet.attach(); } entry.refs++; return entry.sheet; } Object(tiny_warning_esm["a" /* default */])(false, "[JSS] SheetsManager: can't find sheet to manage"); return undefined; }; _proto.unmanage = function unmanage(key) { var entry = this.sheets.get(key); if (entry) { if (entry.refs > 0) { entry.refs--; if (entry.refs === 0) entry.sheet.detach(); } } else { Object(tiny_warning_esm["a" /* default */])(false, "SheetsManager: can't find sheet to unmanage"); } }; Object(createClass["a" /* default */])(SheetsManager, [{ key: "size", get: function get() { return this.length; } }]); return SheetsManager; }(); /** * A better abstraction over CSS. * * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present * @website https://github.com/cssinjs/jss * @license MIT */ /** * Export a constant indicating if this browser has CSSTOM support. * https://developers.google.com/web/updates/2018/03/cssom */ var hasCSSTOMSupport = typeof CSS === 'object' && CSS != null && 'number' in CSS; /** * Creates a new instance of Jss. */ var create = function create(options) { return new jss_esm_Jss(options); }; /** * A global Jss instance. */ var jss_esm_jss = create(); /* harmony default export */ var jss_esm = (jss_esm_jss); /***/ }), /* 19 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; }); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /***/ }), /* 20 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread2; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function checkDCE() { /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function') { return; } if (false) {} try { // Verify that the code above has been dead code eliminated (DCE'd). __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); } catch (err) { // DevTools shouldn't crash React, no matter what. // We should still report in case we break this code. console.error(err); } } if (true) { // DCE check should happen before ReactDOM bundle executes so that // DevTools can report bad minification during injection. checkDCE(); module.exports = __webpack_require__(102); } else {} /***/ }), /* 22 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useEventCallback; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useEffect"]; /** * https://github.com/facebook/react/issues/14099#issuecomment-440013892 * * @param {function} fn */ function useEventCallback(fn) { var ref = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](fn); useEnhancedEffect(function () { ref.current = fn; }); return react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function () { return (0, ref.current).apply(void 0, arguments); }, []); } /***/ }), /* 23 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js var getPrototypeOf = __webpack_require__(28); // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/superPropBase.js function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = Object(getPrototypeOf["a" /* default */])(object); if (object === null) break; } return object; } // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/get.js function get_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { get_get = Reflect.get; } else { get_get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return get_get(target, property, receiver || target); } // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js var createForOfIteratorHelper = __webpack_require__(25); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 3 modules var toConsumableArray = __webpack_require__(5); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules var inherits = __webpack_require__(11); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper.js + 3 modules var createSuper = __webpack_require__(10); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__(20); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__(6); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__(7); // EXTERNAL MODULE: ./src/utils/Route.js var Route = __webpack_require__(9); // EXTERNAL MODULE: ./src/utils/object.js var utils_object = __webpack_require__(27); // CONCATENATED MODULE: ./src/appbind/model.js var model_class,_temp,model_class2,_temp2,model_class3,_temp3,model_class4,_temp4;/** * TODO: * * We don't want to be web scraping. Everything should be API based. We should * therefore organize rebuild the model with a mock API that represents the * true data store * * There should be an account database. * The app scrape should act as model updates. * The model should acquire sessions from the mock api */ /** * AppBind is a proxy to load data from AppBind. In this current version * it is a mock object with demo data. * * TODO: It should be asynchronously. * * SHAPE * ----- * user = AppBind.User * id * firstName * lastName * email * initials * avatar * address = {} * address1 * address2 * city * state * country * postalCode * parentAccount = AppBind.Account * accounts = AppBind.Account[] * id * name * subscriptions = AppBind.Subscription * id * app = AppBind.App * id * name * domain * logo * links = {} * login * signup * partnerCenter * order * scripts = {} * login * signup * auth = {} * email * password * domain * username * card = {} * firstName * lastName * address = {} * address1 * address2 * city * country * state * postalCode * pan * cvv * expiryMonth * expiryYear */var model_Model=/*#__PURE__*/function(){/** * @param data Parameters for this Model's serializeable state */function Model(data){Object(classCallCheck["a" /* default */])(this,Model);this._data=Object(objectSpread2["a" /* default */])({},data);}/** * A map of AppBind GraphQL API keys to serialized JSON keys, using dotted notation for subkeys * { "api.key": "serialize.key.subkey" } * * Implemented by subclass */Object(createClass["a" /* default */])(Model,[{key:"view",value:/** * Returns a URI to the part of the AppBind web app that represents this model * * @return A URI to the part of the AppBind web app that represents this model */function view(environment){return Route["a" /* default */].appbind(environment);}}],[{key:"fromAPI",value:/** * Take in a JSON object from the AppBind API and generate a model. * * @param json A GraphQL shape from the AppBind API * @return a Model */function fromAPI(json){if(!json)return;var params=Object(utils_object["b" /* remapKeys */])(json,this.API_KEY_MAP);return new this(params);}}]);return Model;}();model_Model.API_KEY_MAP={};var model_AppBind=/*#__PURE__*/function(_Model){Object(inherits["a" /* default */])(AppBind,_Model);var _super=Object(createSuper["a" /* default */])(AppBind);function AppBind(data){var _this;Object(classCallCheck["a" /* default */])(this,AppBind);_this=_super.call(this,data);_this._data=Object(objectSpread2["a" /* default */])({'user':null},data);return _this;}Object(createClass["a" /* default */])(AppBind,[{key:"user",value:/* ACCESSORS */function user(){return this._data.user;}},{key:"appByDomain",value:function appByDomain(domain){var apps=this.user()&&[].concat(Object(toConsumableArray["a" /* default */])(this.user().__apps()),Object(toConsumableArray["a" /* default */])(this.user().apps()));// this.apps(); apps=apps.filter(function(app){return Route["a" /* default */].matchDomains(app.domain(),domain);});if(!apps.length)return;return apps[0];}/** Finds an account by its id * * @returns An account or undefined */},{key:"accountById",value:function accountById(accountId){return this.user()&&this.user().accountById(accountId);}/** Finds an app by its id * * @returns An app or undefined */},{key:"appById",value:function appById(appId){return this.user()&&this.user().appById(appId);}/** Finds a subscription by its id (customerAppId) * * @returns A subscription or undefined */},{key:"subscriptionById",value:function subscriptionById(subscriptionId){return this.user()&&this.user().subscriptionById(subscriptionId);}/** @returns all subscriptions in this model */},{key:"subscriptions",value:function subscriptions(){return this.user()&&this.user().subscriptions();}/** @returns all accounts in this model */},{key:"accounts",value:function accounts(){return this.user()&&this.user().accounts();}/** @returns all accounts in this model */},{key:"accountByEmail",value:function accountByEmail(email){var accounts=this.accounts();var matches=Object(toConsumableArray["a" /* default */])(accounts.filter(function(account){return account._data.primaryContact&&account._data.primaryContact.email===email;}));if(matches.length>0)return matches[0];}/** @returns all apps in this model */},{key:"apps",value:function apps(){return this.user()&&this.user().apps();}}],[{key:"SCHEMA",value:function SCHEMA(){return{'user':AppBind.User};}},{key:"fromAPI",value:function fromAPI(json){console.log('APPBIND.FROMAPI');if(!json)return;//console.log(JSON.parse(JSON.stringify(json))); var user=AppBind.User.fromAPI(json['userTByUserId']);if(!user)return;var parentAccount=AppBind.Account.fromAPI(json['accountTByAccountId']);if(parentAccount)user.parentAccount(parentAccount);if(json['allAccountTs']&&json['allAccountTs']['nodes']){var nodes=json['allAccountTs']['nodes'];for(var i=0;i=2000?this._data.card.expiryYear-2000:this._data.card.expiryYear,2);}if(this._data.card&&this._data.card.expiry&&(!this._data.card.expiryMonth||!this._data.card.expiryYear)){this._data.card.expiryMonth=this._data.card.expiry.slice(0,2);this._data.card.expiryYear=this._data.card.expiry.slice(2,4);}/* Reject encrypted strings from the database (or a null value because that's useless) */if(!this._data.auth.password||this._data.auth.password.match(new RegExp('E01\\|([a-f0-9]+?):([a-f0-9]+)'))){this._data.auth.password='';}/* Pick an email address */if(this._data.auth){this._data.auth.email=this._data.auth.useEmail||this._data.auth.sharedEmail||'';}}},{key:"id",value:function id(){return this._data.id;}},{key:"app",value:function app(){return this._data.app;}},{key:"account",value:function account(){return this._data.account;}},{key:"auth",value:function auth(){return this._data.auth;}},{key:"card",value:function card(){return this._data.card;}},{key:"view",value:function view(environment){return Route["a" /* default */].appbind(environment)+'/subscription?customerAppId='+this.id();}}],[{key:"fromAPI",value:function fromAPI(json){if(!json)return;if(json.appTByAppId){json.appTByAppId=model_AppBind.App.fromAPI(json.appTByAppId);}if(json.customerAccountId&&!json.accountTByCustomerAccountId){json.accountTByCustomerAccountId={'accountId':json.customerAccountId};}if(json.accountTByCustomerAccountId){json.accountTByCustomerAccountId=model_AppBind.Account.fromAPI(json.accountTByCustomerAccountId);}return get_get(Object(getPrototypeOf["a" /* default */])(_class3),"fromAPI",this).call(this,json);}}]);return _class3;}(model_Model),model_class3.API_KEY_MAP={"customerAppId":"id","appTByAppId":"app","accountTByCustomerAccountId":"account","customerAccountId":"account.accountId","bindCardTByBcId.firstName":"card.address.firstName","bindCardTByBcId.lastName":"card.address.lastName","bindCardTByBcId.address1":"card.address.address1","bindCardTByBcId.address2":"card.address.address2","bindCardTByBcId.city":"card.address.city","bindCardTByBcId.state":"card.address.state","bindCardTByBcId.country":"card.address.country","bindCardTByBcId.postalCode":"card.address.postalCode","bindCardTByBcId.extSource":"card.externalSource","bindCardTByBcId.extBcId":"card.externalID","bindCardTByBcId.bcLast4":"card.last4","bindCardTByBcId.bcExpy":"card.expiry","bindCardTByBcId.cvv":"card.cvv","bindCardTByBcId.pan":"card.pan","sharedEmail":"auth.sharedEmail","useEmail":"auth.useEmail","pwd":"auth.password"},_temp3);model_AppBind.App=(_temp4=model_class4=/*#__PURE__*/function(_Model5){Object(inherits["a" /* default */])(_class4,_Model5);var _super5=Object(createSuper["a" /* default */])(_class4);function _class4(data){var _this5;Object(classCallCheck["a" /* default */])(this,_class4);_this5=_super5.call(this,data);_this5._data=Object(objectSpread2["a" /* default */])({'id':'','name':'','domain':'','links':{'signup':'','login':'','partnerCenter':null,'order':null},'logo':'','subscriptions':[]},data);_this5.adjust();return _this5;}Object(createClass["a" /* default */])(_class4,[{key:"adjust",value:function adjust(){this._updateDomain();this._sortSubscriptions();var subscriptions=this.subscriptions();for(var i=0;i= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } /***/ }), /* 26 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return debounce; }); // Corresponds to 10 frames at 60 Hz. // A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B. function debounce(func) { var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166; var timeout; function debounced() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } // eslint-disable-next-line consistent-this var that = this; var later = function later() { func.apply(that, args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); } debounced.clear = function () { clearTimeout(timeout); }; return debounced; } /***/ }), /* 27 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export getDotted */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return setDotted; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return remapKeys; }); /* unused harmony export objectGetDotted */ /* unused harmony export inverseRemapKeys */ /* unused harmony export clone */ /* unused harmony export deepUpdate */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return deepApply; }); /* unused harmony export deepCollect */ /* unused harmony export safeStringify */ /* unused harmony export waitfor */ /* global structuredClone */function getDotted(obj,key,defaultValue){if(!obj)return;var keys=key.split('.');for(var i=0;i0&&target[key].length>0&&sourceValue[0].id&&target[key][0].update&&target[key][0].id){var t=target[key];/* For each source element, try to find a matching target element and update that element */for(var i=0;i=t.length){t.push(sourceEl);}}/* A key sourceValue pair */}else if(sourceValue||'boolean'===typeof sourceValue){target[key]=sourceValue;}}return target;}/** * Maps an object hierarchy to a new object hierachy, applying a method to objects that support it. * * @param object The root of the object hierarchy * @param method The name of the method to call * @param args Optional args to pass to method * * @return The resulting copy of the hierarchy */function deepApply(object,method,args){if(!object)return object;if(object[method]&&object[method].constructor===Function){return object[method].apply(object,args);}if(object.map&&object.map.constructor===Function){return object.map(function(el){return deepApply(el,method,args);});}if(object.constructor===Object){var result={};for(var _i4=0,_Object$keys4=Object.keys(object);_i4<_Object$keys4.length;_i4++){var k=_Object$keys4[_i4];result[k]=deepApply(object[k],method,args);}return result;}return object;}/** * Walks an object hierarchy, collecting results from transformations. * * The transformer is a function(value, collector). If you want to store the * transformation, call collector(transformation). If you want to stop the descent * down the tree, return true from the transformer. * * @param object The root of the object hierarchy * @param method(value, collector) A callback that calls collector(transformation) to save the transformation * @param collection Optional. The array to append the results. * * @return The resulting collection */function deepCollect(object,transformer){var collection=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];if(!transformer(object,function(x){return collection.push(x);})){if(object.map&&object.map.constructor===Function){object.forEach(function(el){return deepCollect(el,transformer,collection);});}else if(object.constructor===Object){for(var _i5=0,_Object$keys5=Object.keys(object);_i5<_Object$keys5.length;_i5++){var k=_Object$keys5[_i5];deepCollect(object[k],transformer,collection);}}}return collection;}/** * For stringifying JSON objects that may have recursive references. * * @param {*} obj * @returns */function safeStringify(obj){var cache=[];var retVal=JSON.stringify(obj,function(key,value){return typeof value==="object"&&value!=null?cache.includes(value)?undefined:cache.push(value)&&value:value;},2);cache=null;return retVal;}/** * Utility function for use in await (instead of requiring try/catch in functional code) * @param {*} promise * @returns */function waitfor(promise){return promise.then(function(data){return[null,data];}).catch(function(err){return[err];});} /***/ }), /* 28 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; }); function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /***/ }), /* 29 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return setRef; }); // TODO v5: consider to make it private function setRef(ref, value) { if (typeof ref === 'function') { ref(value); } else if (ref) { ref.current = value; } } /***/ }), /* 30 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createSvgIcon; }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _SvgIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90); /** * Private module reserved for @material-ui/x packages. */ function createSvgIcon(path, displayName) { var Component = function Component(props, ref) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_SvgIcon__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ ref: ref }, props), path); }; if (false) {} Component.muiName = _SvgIcon__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].muiName; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.memo( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.forwardRef(Component)); } /***/ }), /* 31 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /** * @ignore - internal component. */ var Tablelvl2Context = react__WEBPACK_IMPORTED_MODULE_0__["createContext"](); if (false) {} /* harmony default export */ __webpack_exports__["a"] = (Tablelvl2Context); /***/ }), /* 32 */, /* 33 */ /***/ (function(module, exports) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = _interopRequireDefault; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { var _typeof = __webpack_require__(108)["default"]; function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } module.exports = _interopRequireWildcard; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /* 35 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _utils.createSvgIcon; } }); var _utils = __webpack_require__(78); /***/ }), /* 36 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js var arrayLikeToArray = __webpack_require__(49); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js var iterableToArray = __webpack_require__(86); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js var unsupportedIterableToArray = __webpack_require__(58); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); } /***/ }), /* 37 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } /***/ }), /* 38 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export isBrowser */ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && document.nodeType === 9; /* harmony default export */ __webpack_exports__["a"] = (isBrowser); /***/ }), /* 39 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; }); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /***/ }), /* 40 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ownerWindow; }); /* harmony import */ var _ownerDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24); function ownerWindow(node) { var doc = Object(_ownerDocument__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(node); return doc.defaultView || window; } /***/ }), /* 41 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createChainedFunction; }); /** * Safe chained function * * Will only create a new function if needed, * otherwise will pass back existing functions or null. * * @param {function} functions to chain * @returns {function|null} */ function createChainedFunction() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } return funcs.reduce(function (acc, func) { if (func == null) { return acc; } if (false) {} return function chainedFunction() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } acc.apply(this, args); func.apply(this, args); }; }, function () {}); } /***/ }), /* 42 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isMuiElement; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); function isMuiElement(element, muiNames) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"](element) && muiNames.indexOf(element.type.muiName) !== -1; } /***/ }), /* 43 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js var arrayWithHoles = __webpack_require__(87); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js var unsupportedIterableToArray = __webpack_require__(58); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js var nonIterableRest = __webpack_require__(88); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js function _slicedToArray(arr, i) { return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])(); } /***/ }), /* 44 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /** * @ignore - internal component. */ var ListContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({}); if (false) {} /* harmony default export */ __webpack_exports__["a"] = (ListContext); /***/ }), /* 45 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); /* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37); function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); } /***/ }), /* 46 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var isProduction = "production" === 'production'; function warning(condition, message) { if (!isProduction) { if (condition) { return; } var text = "Warning: " + message; if (typeof console !== 'undefined') { console.warn(text); } try { throw Error(text); } catch (x) {} } } /* harmony default export */ __webpack_exports__["a"] = (warning); /***/ }), /* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useTheme; }); /* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(109); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60); function useTheme() { var theme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])() || _defaultTheme__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]; if (false) {} return theme; } /***/ }), /* 48 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // UNUSED EXPORTS: WidgetController // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js var assertThisInitialized = __webpack_require__(55); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__(6); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__(7); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules var inherits = __webpack_require__(11); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper.js + 3 modules var createSuper = __webpack_require__(10); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__(0); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./src/utils/Route.js var Route = __webpack_require__(9); // EXTERNAL MODULE: ./src/appbind/model.js + 2 modules var model = __webpack_require__(23); // EXTERNAL MODULE: ./src/appbind/API.js var API = __webpack_require__(16); // EXTERNAL MODULE: ./src/mech/Mech.js var Mech = __webpack_require__(69); // EXTERNAL MODULE: ./src/mech/MechFactory.js var MechFactory = __webpack_require__(52); // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__(20); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__(21); var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/createGenerateClassName/createGenerateClassName.js var createGenerateClassName = __webpack_require__(110); // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js var StylesProvider = __webpack_require__(157); // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/jssPreset/jssPreset.js + 9 modules var jssPreset = __webpack_require__(92); // EXTERNAL MODULE: ./node_modules/jss/dist/jss.esm.js + 1 modules var jss_esm = __webpack_require__(18); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(2); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__(12); // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js var ThemeContext = __webpack_require__(57); // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/useTheme/useTheme.js var useTheme = __webpack_require__(109); // EXTERNAL MODULE: ./node_modules/@material-ui/styles/esm/ThemeProvider/nested.js var nested = __webpack_require__(59); // CONCATENATED MODULE: ./node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js // To support composition of theme. function mergeOuterLocalTheme(outerTheme, localTheme) { if (typeof localTheme === 'function') { var mergedTheme = localTheme(outerTheme); if (false) {} return mergedTheme; } return Object(esm_extends["a" /* default */])({}, outerTheme, localTheme); } /** * This component takes a `theme` prop. * It makes the `theme` available down the React tree thanks to React context. * This component should preferably be used at **the root of your component tree**. */ function ThemeProvider(props) { var children = props.children, localTheme = props.theme; var outerTheme = Object(useTheme["a" /* default */])(); if (false) {} var theme = react_default.a.useMemo(function () { var output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme); if (output != null) { output[nested["a" /* default */]] = outerTheme !== null; } return output; }, [localTheme, outerTheme]); return /*#__PURE__*/react_default.a.createElement(ThemeContext["a" /* default */].Provider, { value: theme }, children); } false ? undefined : void 0; if (false) {} /* harmony default export */ var ThemeProvider_ThemeProvider = (ThemeProvider); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/styles/createMuiTheme.js + 20 modules var createMuiTheme = __webpack_require__(89); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/styles/withStyles.js + 6 modules var withStyles = __webpack_require__(8); // CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/CssBaseline/CssBaseline.js var html = { WebkitFontSmoothing: 'antialiased', // Antialiasing. MozOsxFontSmoothing: 'grayscale', // Antialiasing. // Change from `box-sizing: content-box` so that `width` // is not affected by `padding` or `border`. boxSizing: 'border-box' }; var CssBaseline_body = function body(theme) { return Object(esm_extends["a" /* default */])({ color: theme.palette.text.primary }, theme.typography.body2, { backgroundColor: theme.palette.background.default, '@media print': { // Save printer ink. backgroundColor: theme.palette.common.white } }); }; var CssBaseline_styles = function styles(theme) { return { '@global': { html: html, '*, *::before, *::after': { boxSizing: 'inherit' }, 'strong, b': { fontWeight: theme.typography.fontWeightBold }, body: Object(esm_extends["a" /* default */])({ margin: 0 }, CssBaseline_body(theme), { // Add support for document.body.requestFullScreen(). // Other elements, if background transparent, are not supported. '&::backdrop': { backgroundColor: theme.palette.background.default } }) } }; }; /** * Kickstart an elegant, consistent, and simple baseline to build upon. */ function CssBaseline(props) { /* eslint-disable no-unused-vars */ var _props$children = props.children, children = _props$children === void 0 ? null : _props$children, classes = props.classes; /* eslint-enable no-unused-vars */ return /*#__PURE__*/react["createElement"](react["Fragment"], null, children); } false ? undefined : void 0; if (false) {} /* harmony default export */ var CssBaseline_CssBaseline = (Object(withStyles["a" /* default */])(CssBaseline_styles, { name: 'MuiCssBaseline' })(CssBaseline)); // EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js var jsx_runtime = __webpack_require__(1); // CONCATENATED MODULE: ./src/widget/DOMInjector.js var defaultTheme=Object(createMuiTheme["a" /* default */])();// or your custom theme var DOMInjector_DOMInjector=/*#__PURE__*/function(){/** * The DOMInjector will create a style safe element to inject a widget into an existing * page inside of the element given as settings.containerElement. * * To safely position the widget, there is a separate control plane for positioning. * You can set the parameters using CSS styles through settings.styles.positionable * * settings.styles.positionable = { 'position': 'fixed', 'top': 0, 'left': 0, height: '32px' } * * You can also control the look and feel of the widget, say if you have customizations, with the * themeable set of styles: * * settings.styles.renderable = { 'fontFamily': 'sans-serif', 'color': 'orange' } * * @params * settings (optional) A bag of settings * settings.id (optional) Unique ID for the injected widget (default: will be autogenerated) * settings.containerElement (optional) The element in the page DOM to inject the widget into (default: document.body) * settings.onRender (optional) A callback that Rrturns a React fragment to render * settings.onPause (optional) A callback when DOM observations should be paused * settings.styles.positionable (optional) Positioning styles to place the widget on the page * settings.styles.renderable (optional) Theme styles for the rendered widget (e.g. colors, fonts) */function DOMInjector(settings){var _this$styles,_this$styles2;Object(classCallCheck["a" /* default */])(this,DOMInjector);console.log("DOMInjector constructor");settings=settings||{};this.id=settings.id||'appbindInjector-'+DOMInjector.index++;this.styles=settings.styles||{};(_this$styles=this.styles).positionable||(_this$styles.positionable={});(_this$styles2=this.styles).renderable||(_this$styles2.renderable={});this.onRender=settings.onRender;this.onPause=settings.onPause||function(callback){return callback();};/* container The site in the DOM to make the injection. root An element to hold all the new DOM objects we create positionable An element that only exists to position the widget (e.g. fixed, static, absolute) renderable An element to render the widget into */this.elements={'container':settings.containerElement,'root':null,'positionable':null,'renderable':null};/* We keep our own display state because the root element may not exist when this changes. */this.display='none';this.generateClassName=Object(createGenerateClassName["a" /* default */])({'productionPrefix':'__appbind_jss'});}/** Document onDOMLoaded(callback) { // Already started? if( this.rootElement ) return; console.log("ToolbarInjector.onDOMLoaded()"); this.toolbarPositioner.onDOMLoaded(); this.inject(callback); }*/Object(createClass["a" /* default */])(DOMInjector,[{key:"inject",value:function inject(callback){var _this=this;this.elements.container=this.elements.container||document.body;if(!this.elements.container)return;// Already injected if(document.getElementById(this.id))return;console.log("DOMInjector.inject()");this.pause(function(){console.log("DOMInjector.inject() pause()d");// If we already injected it once, just reuse our work. if(_this.elements.root){_this.elements.container.insertBefore(_this.elements.root,_this.elements.container.firstChild);return _this.elements.root;}_this.elements.root=document.createElement('div');_this.elements.root.id=_this.id;_this.elements.root.style.display=_this.display;_this.elements.container.insertBefore(_this.elements.root,_this.elements.container.firstChild);_this.elements.positionable=document.createElement('div');_this.elements.root.appendChild(_this.elements.positionable);_this.elements.positionable.style.zIndex="2147483647";for(var k in _this.styles.positionable){if(_this.styles.positionable.hasOwnProperty(k))_this.elements.positionable.style[k]=_this.styles.positionable[k];}var shadowRoot=_this.elements.positionable.attachShadow({mode:'closed'});var stylesRoot=document.createElement('div');shadowRoot.appendChild(stylesRoot);_this.elements.renderable=document.createElement('div');shadowRoot.appendChild(_this.elements.renderable);// this.elements.__reactRoot = ReactDOM.createRoot(this.elements.renderable); _this.jss=Object(jss_esm["b" /* create */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({},Object(jssPreset["a" /* default */])()),{},{insertionPoint:stylesRoot}));_this.render();if(callback)callback();});}},{key:"pause",value:function pause(callback){if(this.onPause)return this.onPause(callback);return callback();}},{key:"render",value:function render(){var _this2=this;if(!this.elements.root)return;console.log("DOMInjector.render()");if(this.onRender){this.pause(function(){var rendered=/*#__PURE__*/Object(jsx_runtime["jsxs"])(react_default.a.Fragment,{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(CssBaseline_CssBaseline,{}),/*#__PURE__*/Object(jsx_runtime["jsx"])(StylesProvider["b" /* default */],{jss:_this2.jss,generateClassName:_this2.generateClassName,children:/*#__PURE__*/Object(jsx_runtime["jsx"])(ThemeProvider_ThemeProvider,{theme:defaultTheme,children:_this2.onRender()})})]});if(_this2.elements.renderable){react_dom_default.a.render(rendered,_this2.elements.renderable);}});}}},{key:"resetStyles",value:function resetStyles(){return"\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n vertical-align: baseline;\n }\n // HTML5 display-role reset for older browsers \n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n ";}},{key:"isVisible",value:function isVisible(){return this.display!=='none';}},{key:"show",value:function show(){var _this3=this;console.log("DOMInjector.show()");this.pause(function(){_this3.display='block';if(_this3.elements.root)_this3.elements.root.style.display='block';_this3.render();});}},{key:"hide",value:function hide(){var _this4=this;console.log("DOMInjector.hide()");this.pause(function(){_this4.display='none';if(_this4.elements.root)_this4.elements.root.style.display='none';_this4.render();});}}]);return DOMInjector;}();DOMInjector_DOMInjector.index=1;/* harmony default export */ var widget_DOMInjector = (DOMInjector_DOMInjector); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/Grid/Grid.js var Grid = __webpack_require__(161); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/Button/Button.js var Button = __webpack_require__(164); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/IconButton/IconButton.js var IconButton = __webpack_require__(159); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/List/List.js var List = __webpack_require__(160); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(3); // EXTERNAL MODULE: ./node_modules/clsx/dist/clsx.m.js var clsx_m = __webpack_require__(4); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js + 6 modules var ButtonBase = __webpack_require__(76); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/utils/isMuiElement.js var isMuiElement = __webpack_require__(42); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/utils/useForkRef.js var useForkRef = __webpack_require__(17); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/List/ListContext.js var ListContext = __webpack_require__(44); // CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/ListItem/ListItem.js var ListItem_styles = function styles(theme) { return { /* Styles applied to the (normally root) `component` element. May be wrapped by a `container`. */ root: { display: 'flex', justifyContent: 'flex-start', alignItems: 'center', position: 'relative', textDecoration: 'none', width: '100%', boxSizing: 'border-box', textAlign: 'left', paddingTop: 8, paddingBottom: 8, '&$focusVisible': { backgroundColor: theme.palette.action.selected }, '&$selected, &$selected:hover': { backgroundColor: theme.palette.action.selected }, '&$disabled': { opacity: 0.5 } }, /* Styles applied to the `container` element if `children` includes `ListItemSecondaryAction`. */ container: { position: 'relative' }, /* Pseudo-class applied to the `component`'s `focusVisibleClassName` prop if `button={true}`. */ focusVisible: {}, /* Styles applied to the `component` element if dense. */ dense: { paddingTop: 4, paddingBottom: 4 }, /* Styles applied to the `component` element if `alignItems="flex-start"`. */ alignItemsFlexStart: { alignItems: 'flex-start' }, /* Pseudo-class applied to the inner `component` element if `disabled={true}`. */ disabled: {}, /* Styles applied to the inner `component` element if `divider={true}`. */ divider: { borderBottom: "1px solid ".concat(theme.palette.divider), backgroundClip: 'padding-box' }, /* Styles applied to the inner `component` element if `disableGutters={false}`. */ gutters: { paddingLeft: 16, paddingRight: 16 }, /* Styles applied to the inner `component` element if `button={true}`. */ button: { transition: theme.transitions.create('background-color', { duration: theme.transitions.duration.shortest }), '&:hover': { textDecoration: 'none', backgroundColor: theme.palette.action.hover, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } } }, /* Styles applied to the `component` element if `children` includes `ListItemSecondaryAction`. */ secondaryAction: { // Add some space to avoid collision as `ListItemSecondaryAction` // is absolutely positioned. paddingRight: 48 }, /* Pseudo-class applied to the root element if `selected={true}`. */ selected: {} }; }; var useEnhancedEffect = typeof window === 'undefined' ? react["useEffect"] : react["useLayoutEffect"]; /** * Uses an additional container component if `ListItemSecondaryAction` is the last child. */ var ListItem_ListItem = /*#__PURE__*/react["forwardRef"](function ListItem(props, ref) { var _props$alignItems = props.alignItems, alignItems = _props$alignItems === void 0 ? 'center' : _props$alignItems, _props$autoFocus = props.autoFocus, autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus, _props$button = props.button, button = _props$button === void 0 ? false : _props$button, childrenProp = props.children, classes = props.classes, className = props.className, componentProp = props.component, _props$ContainerCompo = props.ContainerComponent, ContainerComponent = _props$ContainerCompo === void 0 ? 'li' : _props$ContainerCompo, _props$ContainerProps = props.ContainerProps; _props$ContainerProps = _props$ContainerProps === void 0 ? {} : _props$ContainerProps; var ContainerClassName = _props$ContainerProps.className, ContainerProps = Object(objectWithoutProperties["a" /* default */])(_props$ContainerProps, ["className"]), _props$dense = props.dense, dense = _props$dense === void 0 ? false : _props$dense, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$disableGutters = props.disableGutters, disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters, _props$divider = props.divider, divider = _props$divider === void 0 ? false : _props$divider, focusVisibleClassName = props.focusVisibleClassName, _props$selected = props.selected, selected = _props$selected === void 0 ? false : _props$selected, other = Object(objectWithoutProperties["a" /* default */])(props, ["alignItems", "autoFocus", "button", "children", "classes", "className", "component", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "divider", "focusVisibleClassName", "selected"]); var context = react["useContext"](ListContext["a" /* default */]); var childContext = { dense: dense || context.dense || false, alignItems: alignItems }; var listItemRef = react["useRef"](null); useEnhancedEffect(function () { if (autoFocus) { if (listItemRef.current) { listItemRef.current.focus(); } else if (false) {} } }, [autoFocus]); var children = react["Children"].toArray(childrenProp); var hasSecondaryAction = children.length && Object(isMuiElement["a" /* default */])(children[children.length - 1], ['ListItemSecondaryAction']); var handleOwnRef = react["useCallback"](function (instance) { // #StrictMode ready listItemRef.current = react_dom["findDOMNode"](instance); }, []); var handleRef = Object(useForkRef["a" /* default */])(handleOwnRef, ref); var componentProps = Object(esm_extends["a" /* default */])({ className: Object(clsx_m["a" /* default */])(classes.root, className, childContext.dense && classes.dense, !disableGutters && classes.gutters, divider && classes.divider, disabled && classes.disabled, button && classes.button, alignItems !== "center" && classes.alignItemsFlexStart, hasSecondaryAction && classes.secondaryAction, selected && classes.selected), disabled: disabled }, other); var Component = componentProp || 'li'; if (button) { componentProps.component = componentProp || 'div'; componentProps.focusVisibleClassName = Object(clsx_m["a" /* default */])(classes.focusVisible, focusVisibleClassName); Component = ButtonBase["a" /* default */]; } if (hasSecondaryAction) { // Use div by default. Component = !componentProps.component && !componentProp ? 'div' : Component; // Avoid nesting of li > li. if (ContainerComponent === 'li') { if (Component === 'li') { Component = 'div'; } else if (componentProps.component === 'li') { componentProps.component = 'div'; } } return /*#__PURE__*/react["createElement"](ListContext["a" /* default */].Provider, { value: childContext }, /*#__PURE__*/react["createElement"](ContainerComponent, Object(esm_extends["a" /* default */])({ className: Object(clsx_m["a" /* default */])(classes.container, ContainerClassName), ref: handleRef }, ContainerProps), /*#__PURE__*/react["createElement"](Component, componentProps, children), children.pop())); } return /*#__PURE__*/react["createElement"](ListContext["a" /* default */].Provider, { value: childContext }, /*#__PURE__*/react["createElement"](Component, Object(esm_extends["a" /* default */])({ ref: handleRef }, componentProps), children)); }); false ? undefined : void 0; /* harmony default export */ var esm_ListItem_ListItem = (Object(withStyles["a" /* default */])(ListItem_styles, { name: 'MuiListItem' })(ListItem_ListItem)); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js var SvgIcon = __webpack_require__(90); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/Table/Table.js var Table = __webpack_require__(165); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/TableHead/TableHead.js var TableHead = __webpack_require__(166); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/TableBody/TableBody.js var TableBody = __webpack_require__(169); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/TableCell/TableCell.js var TableCell = __webpack_require__(168); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/TableRow/TableRow.js var TableRow = __webpack_require__(167); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/Tabs/Tabs.js + 7 modules var Tabs = __webpack_require__(173); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/Tab/Tab.js var Tab = __webpack_require__(163); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/Typography/Typography.js var Typography = __webpack_require__(162); // EXTERNAL MODULE: ./node_modules/@material-ui/icons/Delete.js var Delete = __webpack_require__(62); var Delete_default = /*#__PURE__*/__webpack_require__.n(Delete); // EXTERNAL MODULE: ./node_modules/@material-ui/icons/Edit.js var Edit = __webpack_require__(73); var Edit_default = /*#__PURE__*/__webpack_require__.n(Edit); // CONCATENATED MODULE: ./src/widget/PartnerWidget.js /* global window */var EXPAND_ICON=/*#__PURE__*/Object(jsx_runtime["jsx"])(SvgIcon["a" /* default */],{children:/*#__PURE__*/Object(jsx_runtime["jsx"])("path",{d:"m15 3 2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3h-6zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3v6zm6 12-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6h6zm12-6-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6v-6z"})});var COLLAPSE_ICON=/*#__PURE__*/Object(jsx_runtime["jsx"])(SvgIcon["a" /* default */],{children:/*#__PURE__*/Object(jsx_runtime["jsx"])("path",{d:"M9 9V3H7v2.59L3.91 2.5 2.5 3.91 5.59 7H3v2h6zm12 0V7h-2.59l3.09-3.09-1.41-1.41L17 5.59V3h-2v6h6zM3 15v2h2.59L2.5 20.09l1.41 1.41L7 18.41V21h2v-6H3zm12 0v6h2v-2.59l3.09 3.09 1.41-1.41L18.41 17H21v-2h-6z"})});var AppContext=/*#__PURE__*/react_default.a.createContext();function PartnerWidget_navigate(path){PartnerWidget_navigate.previous=PartnerWidget_navigate.current;PartnerWidget_navigate.current=path;PartnerWidget_navigate.subscribers.forEach(function(sub){return sub.onNavigate(path);});}PartnerWidget_navigate.subscribers=[];PartnerWidget_navigate.previous=null;PartnerWidget_navigate.current=null;function navigateBack(){PartnerWidget_navigate(PartnerWidget_navigate.previous);}var PartnerWidget_Popover=/*#__PURE__*/function(_React$Component){Object(inherits["a" /* default */])(_Popover,_React$Component);var _super=Object(createSuper["a" /* default */])(_Popover);function _Popover(props){var _this2;Object(classCallCheck["a" /* default */])(this,_Popover);_this2=_super.call(this,props);_this2.popoverRef=/*#__PURE__*/react_default.a.createRef();_this2.index=_Popover.index++;return _this2;}Object(createClass["a" /* default */])(_Popover,[{key:"render",value:function render(){console.log('Popover.render [open? %s] [%d]',this.props.open,this.index);var classes=this.props.classes;var anchor=this.props.anchorEl||document.body;var rect=anchor.getBoundingClientRect();var width=parseInt(this.props.width)||300;this.anchor=anchor;if(!this.props.open){return/*#__PURE__*/Object(jsx_runtime["jsx"])(react_default.a.Fragment,{});}return/*#__PURE__*/Object(jsx_runtime["jsx"])("div",{className:classes.popover,ref:this.popoverRef,style:{'position':'absolute','top':Math.max(rect.top+rect.height-10,0).toString()+"px",'left':Math.max(rect.left+rect.width-width,0).toString()+"px",'width':width.toString()+"px",'height':"auto",'zIndex':"2147483647",'display':this.props.open?'block':'none'},children:/*#__PURE__*/Object(jsx_runtime["jsx"])("div",{className:classes.popoverContent,children:this.props.children})});}},{key:"componentDidMount",value:function componentDidMount(){if(this.props.open)this.onOpen();else this.onClose();}},{key:"componentDidUpdate",value:function componentDidUpdate(){if(this.props.open)this.onOpen();else this.onClose();}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.onClose();}},{key:"onOpen",value:function onOpen(){var _this=this;if(!this.popoverRef.current||this.popoverRef.current.__listening)return;// Prevent adding listeners multiple times this.popoverRef.current.__listening=true;/* Close the popover if you click off of it somewhere or hit ESC */this.popoverRef.current.clickListener=function(e){console.log('Click listener');console.log(_this.popoverRef.current);console.log(_this.props.anchorEl);console.log(_this.anchor);console.log(e.target);if(_this.popoverRef.current){var rect=_this.popoverRef.current.getBoundingClientRect();if(e.x>=rect.left&&e.x<=rect.left+rect.width&&e.y>=rect.top&&e.y<=rect.top+rect.height||_this.popoverRef.current.contains(e.target)){return;}}if(_this.anchor&&_this.anchor.contains(e.target)){return;}console.log('Click listener detection');_this.onClose();};this.popoverRef.current.keyupListener=function(e){console.log('Keyup listener');if(e.keyCode===27){console.log('Keyup listener detection');_this.onClose();}};this.popoverRef.current.stopPropogation=function(e){e.stopPropogation();};this.popoverRef.current.addEventListener('click',this.popoverRef.stopPropogation);document.addEventListener('click',this.popoverRef.current.clickListener);document.addEventListener('keyup',this.popoverRef.current.keyupListener);}},{key:"onClose",value:function onClose(){if(!this.popoverRef.current||!this.popoverRef.current.__listening)return;this.popoverRef.current.__listening=false;this.popoverRef.current.removeEventListener('click',this.popoverRef.stopPropogation);document.removeEventListener("click",this.popoverRef.current.clickListener);document.removeEventListener("keyup",this.popoverRef.current.keyupListener);if(this.props.onClose)this.props.onClose();}}]);return _Popover;}(react_default.a.Component);PartnerWidget_Popover.index=0;var Popover=Object(withStyles["a" /* default */])({popover:{},popoverContent:{borderRadius:"3px",border:"solid 1px #d7d5d2",boxShadow:"rgb(0 0 0 / 20%) 0px 10px 30px 0px",transition:"all 0.3s cubic-bezier(.25,.8,.25,1)",background:"#fffdf9",fontFamily:"Inter, sans-serif",fontSize:"12px",color:"#2d2d2d",animation:"300ms ease-out 0s 1 normal none running"}})(PartnerWidget_Popover);var PartnerWidget_AgencyInvitations=/*#__PURE__*/function(_React$Component2){Object(inherits["a" /* default */])(AgencyInvitations,_React$Component2);var _super2=Object(createSuper["a" /* default */])(AgencyInvitations);function AgencyInvitations(props){var _this3;Object(classCallCheck["a" /* default */])(this,AgencyInvitations);_this3=_super2.call(this,props);_this3.state={'invitations':[]};return _this3;}Object(createClass["a" /* default */])(AgencyInvitations,[{key:"componentDidMount",value:function componentDidMount(){this.loadInvitations();}},{key:"render",value:function render(){var _this4=this;if(this.state.invitations&&this.state.invitations.length>0){var invitationItems=this.state.invitations.map(function(invitation){return/*#__PURE__*/Object(jsx_runtime["jsxs"])("div",{style:{border:"solid 1px #eee",background:"white",borderRadius:"6px",padding:"8px",margin:"16px",width:"100%"},children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("h3",{children:"New invitation"}),/*#__PURE__*/Object(jsx_runtime["jsxs"])("p",{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("span",{style:{fontWeight:'bold',color:'#3d4592'},children:invitation.invitingFirstName+" "+invitation.invitingLastName}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("span",{style:{fontStyle:'italics',fontSize:'0.8em',display:'inline-block',marginBottom:'8px'},children:invitation.invitingEmail}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("span",{children:"has invited you to manage their account."})]}),/*#__PURE__*/Object(jsx_runtime["jsxs"])("p",{style:{marginTop:"16px"},children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(Button["a" /* default */],{variant:"contained",size:"small",onClick:function onClick(e){_this4.context.acceptInvitation(invitation,function(){return _this4.onChange();});e.stopPropagation();},children:"Accept"}),"\xA0",/*#__PURE__*/Object(jsx_runtime["jsx"])(Button["a" /* default */],{variant:"text","aria-label":"expand",size:"small",onClick:function onClick(e){_this4.context.declineInvitation(invitation,function(){return _this4.onChange();});e.stopPropagation();},children:"Decline"})]})]});});return/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{item:true,xs:12,children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{container:true,item:true,xs:12,children:invitationItems})});}return/*#__PURE__*/Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"],{});}},{key:"onChange",value:function onChange(){this.loadInvitations('force');}},{key:"loadInvitations",value:function loadInvitations(force){var _this5=this;this.context.getAgencyInvitations(function(invitations){if(typeof invitations==='string')return;_this5.setState({'invitations':invitations||[]});},force);}}]);return AgencyInvitations;}(react_default.a.Component);PartnerWidget_AgencyInvitations.contextType=AppContext;var PartnerWidget_AccountSwitcher=/*#__PURE__*/function(_React$Component3){Object(inherits["a" /* default */])(AccountSwitcher,_React$Component3);var _super3=Object(createSuper["a" /* default */])(AccountSwitcher);function AccountSwitcher(props){var _this6;Object(classCallCheck["a" /* default */])(this,AccountSwitcher);_this6=_super3.call(this,props);_this6.state={'subscriptions':[]};return _this6;}Object(createClass["a" /* default */])(AccountSwitcher,[{key:"componentDidMount",value:function componentDidMount(){var _this7=this;this.context.getSubscriptions(function(subscriptions){_this7.setState({'subscriptions':subscriptions||[]});});}},{key:"render",value:function render(){var controller=this.context;var listItems=[/*#__PURE__*/Object(jsx_runtime["jsx"])(esm_ListItem_ListItem,{item:true,xs:12,button:true,children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Typography["a" /* default */],{children:/*#__PURE__*/Object(jsx_runtime["jsx"])("span",{style:{fontSize:"0.8em",fontStyle:'italic'},children:"No accounts."})})})];if(this.state.subscriptions.length>0){listItems=this.state.subscriptions.map(function(subscription){return/*#__PURE__*/Object(jsx_runtime["jsx"])(esm_ListItem_ListItem,{item:true,xs:12,button:true,onClick:function onClick(){controller.login(subscription.id());},children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Typography["a" /* default */],{children:/*#__PURE__*/Object(jsx_runtime["jsx"])("strong",{style:{fontSize:"0.8em"},children:subscription.account().name()})})},subscription.id());});}return/*#__PURE__*/Object(jsx_runtime["jsxs"])(Grid["a" /* default */],{container:true,children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{item:true,style:{flexGrow:1,padding:'16px'},children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Button["a" /* default */],{variant:"outlined",onClick:function onClick(e){PartnerWidget_navigate('NewAccount');e.stopPropagation();},children:"New account"})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{item:true,style:{padding:'16px'},children:/*#__PURE__*/Object(jsx_runtime["jsx"])(IconButton["a" /* default */],{"aria-label":"expand",size:"small",onClick:function onClick(e){PartnerWidget_navigate('AccountTable');e.stopPropagation();},children:EXPAND_ICON})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(PartnerWidget_AgencyInvitations,{}),/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{item:true,xs:12,children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{xs:12,children:/*#__PURE__*/Object(jsx_runtime["jsx"])(List["a" /* default */],{dense:true,children:listItems})})})]});}}]);return AccountSwitcher;}(react_default.a.Component);PartnerWidget_AccountSwitcher.contextType=AppContext;var PartnerWidget_AccountPickerTable=/*#__PURE__*/function(_React$Component4){Object(inherits["a" /* default */])(AccountPickerTable,_React$Component4);var _super4=Object(createSuper["a" /* default */])(AccountPickerTable);function AccountPickerTable(props){var _this8;Object(classCallCheck["a" /* default */])(this,AccountPickerTable);_this8=_super4.call(this,props);_this8.state={'subscriptions':[]};return _this8;}Object(createClass["a" /* default */])(AccountPickerTable,[{key:"componentDidMount",value:function componentDidMount(){var _this9=this;this.context.getSubscriptions(function(subscriptions){_this9.setState({'subscriptions':subscriptions||[]});});}},{key:"render",value:function render(){var controller=this.context;return/*#__PURE__*/Object(jsx_runtime["jsxs"])(Table["a" /* default */],{size:"small",children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(TableHead["a" /* default */],{children:/*#__PURE__*/Object(jsx_runtime["jsxs"])(TableRow["a" /* default */],{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(TableCell["a" /* default */],{children:"Account"}),/*#__PURE__*/Object(jsx_runtime["jsx"])(TableCell["a" /* default */],{children:"Account owner"}),/*#__PURE__*/Object(jsx_runtime["jsx"])(TableCell["a" /* default */],{children:"\xA0"}),/*#__PURE__*/Object(jsx_runtime["jsx"])(TableCell["a" /* default */],{children:"\xA0"})]})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(TableBody["a" /* default */],{children:this.state.subscriptions.map(function(subscription){var email=subscription&&subscription.account()&&subscription.account().primaryContact()&&subscription.account().primaryContact().email||'';return/*#__PURE__*/Object(jsx_runtime["jsxs"])(TableRow["a" /* default */],{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(TableCell["a" /* default */],{component:"th",scope:"row",children:/*#__PURE__*/Object(jsx_runtime["jsx"])("strong",{children:subscription.account().name()})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(TableCell["a" /* default */],{children:email}),/*#__PURE__*/Object(jsx_runtime["jsxs"])(TableCell["a" /* default */],{align:"right",style:{whiteSpace:'nowrap'},children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(IconButton["a" /* default */],{variant:"outline",size:"small",onClick:function onClick(){controller.viewSubscription(subscription);},title:subscription.view(controller.session&&controller.session.environment),children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Edit_default.a,{})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(IconButton["a" /* default */],{variant:"outline",size:"small",onClick:function onClick(){controller.cancelSubscription(subscription);},children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Delete_default.a,{})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(Button["a" /* default */],{variant:"outline",size:"small",onClick:function onClick(){controller.login(subscription);},children:"Login"})]})]},subscription.id());})})]});}}]);return AccountPickerTable;}(react_default.a.Component);PartnerWidget_AccountPickerTable.contextType=AppContext;var PartnerWidget_AccountTable=/*#__PURE__*/function(_React$Component5){Object(inherits["a" /* default */])(AccountTable,_React$Component5);var _super5=Object(createSuper["a" /* default */])(AccountTable);function AccountTable(props){Object(classCallCheck["a" /* default */])(this,AccountTable);return _super5.call(this,props);}Object(createClass["a" /* default */])(AccountTable,[{key:"render",value:function render(){var controller=this.context;return/*#__PURE__*/Object(jsx_runtime["jsxs"])(Grid["a" /* default */],{container:true,children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{item:true,style:{flexGrow:1,padding:'16px'},children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Button["a" /* default */],{variant:"outlined",onClick:function onClick(e){PartnerWidget_navigate('NewAccount');e.stopPropagation();},children:"New account"})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{item:true,style:{padding:'16px'},xs:2,children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Button["a" /* default */],{variant:"text",onClick:function onClick(e){e.stopPropagation();controller.openReports();},children:"Reports"})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{item:true,style:{padding:'16px',marginRight:'16px'},xs:1,children:/*#__PURE__*/Object(jsx_runtime["jsx"])(IconButton["a" /* default */],{"aria-label":"expand",size:"small",onClick:function onClick(e){PartnerWidget_navigate('AccountSwitcher');e.stopPropagation();},children:COLLAPSE_ICON})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(PartnerWidget_AgencyInvitations,{}),/*#__PURE__*/Object(jsx_runtime["jsx"])(Grid["a" /* default */],{item:true,xs:12,children:/*#__PURE__*/Object(jsx_runtime["jsx"])(PartnerWidget_AccountPickerTable,{})})]});}}]);return AccountTable;}(react_default.a.Component);PartnerWidget_AccountTable.contextType=AppContext;var PartnerWidget_NewAccount=/*#__PURE__*/function(_React$Component6){Object(inherits["a" /* default */])(NewAccount,_React$Component6);var _super6=Object(createSuper["a" /* default */])(NewAccount);function NewAccount(props){var _this10;Object(classCallCheck["a" /* default */])(this,NewAccount);_this10=_super6.call(this,props);_this10.state={'created':null};return _this10;}Object(createClass["a" /* default */])(NewAccount,[{key:"render",value:function render(){var _this=this;if(this.state.created){return/*#__PURE__*/Object(jsx_runtime["jsxs"])("div",{class:"appbind-main",children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("h3",{children:"Creating the account"}),/*#__PURE__*/Object(jsx_runtime["jsxs"])("p",{children:["Please stand by while we create the account for ",/*#__PURE__*/Object(jsx_runtime["jsx"])("strong",{children:this.state.created.company}),"..."]})]});}return/*#__PURE__*/Object(jsx_runtime["jsx"])("div",{class:"appbind-main",children:/*#__PURE__*/Object(jsx_runtime["jsxs"])("form",{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(Button["a" /* default */],{variant:"text",onClick:function onClick(e){navigateBack();e.stopPropagation();},children:"\u2190 BACK"}),/*#__PURE__*/Object(jsx_runtime["jsxs"])("p",{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("label",{for:"appbind-customer-name",children:"Customer name"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("input",{name:"appbind-customer-name"})]}),/*#__PURE__*/Object(jsx_runtime["jsx"])("hr",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("p",{style:{fontSize:'0.8em',fontWeight:'bold',color:'#888',textTransform:'uppercase'},children:"Primary contact"}),/*#__PURE__*/Object(jsx_runtime["jsxs"])("p",{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("label",{for:"appbind-customer-fname",children:"First name"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("input",{name:"appbind-customer-fname"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("label",{for:"appbind-customer-lname",children:"Last name"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("input",{name:"appbind-customer-lname"})]}),/*#__PURE__*/Object(jsx_runtime["jsxs"])("p",{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("label",{for:"appbind-customer-email",children:"Customer email"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("input",{name:"appbind-customer-email"})]}),/*#__PURE__*/Object(jsx_runtime["jsx"])("hr",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("p",{children:/*#__PURE__*/Object(jsx_runtime["jsx"])("input",{type:"submit",class:"button",value:"Create account",onClick:function onClick(e){_this.onSubmit(e);}})})]})});}},{key:"onSubmit",value:function onSubmit(e){var _this11=this;e.stopPropagation();e.preventDefault();var form=e.target.closest('form');console.log('NewAccount.createSubscription');var inputs=form.getElementsByTagName('input');this.context.getApp(function(app){// contact email is used for creating the account contact, // email is the email on the subscription. If null or blank, the // shared email will be used. var subscription={//'domain': Route.currentDomain().toLowerCase().trim(), 'company':inputs[0].value,'firstName':inputs[1].value,'lastName':inputs[2].value,'contactEmail':inputs[3].value,'email':'','app':app};// this.context.createSubscriptionOld(subscription, (customerAppId) => this.context.signup(customerAppId)); _this11.context.createSubscription(subscription,function(customerAppId){return _this11.context.signup(customerAppId);});_this11.setState({'created':subscription});});}}]);return NewAccount;}(react_default.a.Component);PartnerWidget_NewAccount.contextType=AppContext;var PartnerWidget_InviteExpert=/*#__PURE__*/function(_React$Component7){Object(inherits["a" /* default */])(InviteExpert,_React$Component7);var _super7=Object(createSuper["a" /* default */])(InviteExpert);function InviteExpert(props){var _this12;Object(classCallCheck["a" /* default */])(this,InviteExpert);_this12=_super7.call(this,props);_this12.state={'invited':false,'email':''};return _this12;}Object(createClass["a" /* default */])(InviteExpert,[{key:"componentDidMount",value:function componentDidMount(){var _this13=this;this.context.getUserEmail(function(email){return _this13.setState({'email':email});});}},{key:"render",value:function render(){var _this14=this;var _this=this;if(this.state.invited){return/*#__PURE__*/Object(jsx_runtime["jsxs"])("div",{class:"appbind-main",children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("h3",{children:"Invitation sent"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("p",{class:"appbind-explainer",children:"We have sent an invitation to manage your account."}),/*#__PURE__*/Object(jsx_runtime["jsx"])("label",{for:"appbind-expert-email",children:"Expert's email address"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("strong",{class:"appbind-monospace",children:this.state.invited.invitedEmail}),/*#__PURE__*/Object(jsx_runtime["jsx"])("p",{class:"appbind-explainer",children:"You may revoke the invitation at any time."}),/*#__PURE__*/Object(jsx_runtime["jsx"])(Button["a" /* default */],{variant:"text",onClick:function onClick(){_this14.context.app.close();},children:"Close"})]});}return/*#__PURE__*/Object(jsx_runtime["jsx"])("div",{class:"appbind-main",children:/*#__PURE__*/Object(jsx_runtime["jsxs"])("form",{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("h3",{children:"Invite an Expert"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("p",{class:"appbind-explainer",children:"Securely invite an expert to manage your account."}),/*#__PURE__*/Object(jsx_runtime["jsx"])("label",{for:"appbind-expert-email",children:"Expert's email address"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("input",{type:"email",name:"appbind-expert-email",autocomplete:"off","data-lpignore":"true",placeholder:"Email address..."}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsxs"])("label",{for:"appbind-secure-group",children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("span",{class:"appbind-lock",children:/*#__PURE__*/Object(jsx_runtime["jsx"])("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",children:/*#__PURE__*/Object(jsx_runtime["jsx"])("path",{fill:"#CA4",d:"m3,9h1V6a5,5 0 0,1 12,0V9h1v11H3M14,9V6a4,4 0 1,0-8,0v3"})})}),"Securely share your login"]}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsxs"])("div",{class:"appbind-group",id:"appbind-secure-group",children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("label",{for:"appbind-email",children:"Your email"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("p",{class:"appbind-monospace appbind-subtext appbind-ellipsis",id:"appbind-user-email",children:this.state.email}),/*#__PURE__*/Object(jsx_runtime["jsx"])("label",{for:"appbind-password",children:"Your password"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("input",{type:"password",name:"appbind-password",autocomplete:"current-password"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{}),/*#__PURE__*/Object(jsx_runtime["jsx"])("span",{class:"appbind-subtext",children:"We never reveal nor share your password."}),/*#__PURE__*/Object(jsx_runtime["jsx"])("br",{})]}),/*#__PURE__*/Object(jsx_runtime["jsx"])("p",{class:"appbind-cta",children:/*#__PURE__*/Object(jsx_runtime["jsx"])("input",{type:"submit",class:"button",value:"Invite Expert",onClick:function onClick(e){return _this.onSubmit(e);}})})]})});}},{key:"onSubmit",value:function onSubmit(e){var _this15=this;e.stopPropagation();e.preventDefault();var form=e.target.closest('form');console.log('InviteExpert.onInvite');var inputs=form.getElementsByTagName('input');this.context.getUserEmail(function(email){return _this15.context.getUserName(function(name){var names=name.trim().split(" ");var firstName=names[0];var lastName=names.length>0?names[1]:'';var invitation={//'domain': Route.currentDomain().toLowerCase().trim(), 'invitingExternalId':email.toLowerCase().trim(),'invitingEmail':email.toLowerCase().trim(),'invitingFirstName':firstName,'invitingLastName':lastName,'invitingAccountName':[firstName,lastName].join(" "),'invitingPassword':inputs[1].value,'invitedExternalId':inputs[0].value.toLowerCase().trim(),'invitedEmail':inputs[0].value.toLowerCase().trim()};_this15.context.createInvitation(invitation).then(function(response){console.log("Create Invitation API response");console.log(response);_this15.setState({'invited':invitation});_this15.props.onChange();});});});}}]);return InviteExpert;}(react_default.a.Component);PartnerWidget_InviteExpert.contextType=AppContext;var PartnerWidget_RevokeExpert=/*#__PURE__*/function(_React$Component8){Object(inherits["a" /* default */])(RevokeExpert,_React$Component8);var _super8=Object(createSuper["a" /* default */])(RevokeExpert);function RevokeExpert(props){Object(classCallCheck["a" /* default */])(this,RevokeExpert);return _super8.call(this,props);}Object(createClass["a" /* default */])(RevokeExpert,[{key:"render",value:function render(){var _this16=this;console.log('THIS.PROPS.INVITATIONS');console.log(this.props.invitations);return/*#__PURE__*/Object(jsx_runtime["jsxs"])("div",{class:"appbind-main",children:[/*#__PURE__*/Object(jsx_runtime["jsx"])("h3",{children:"Remove an Expert"}),/*#__PURE__*/Object(jsx_runtime["jsx"])("p",{class:"appbind-explainer",children:"Revoke sharing your account. The Expert will no longer be able to log in."}),/*#__PURE__*/Object(jsx_runtime["jsx"])(Table["a" /* default */],{size:"small",children:/*#__PURE__*/Object(jsx_runtime["jsx"])(TableBody["a" /* default */],{children:this.props.invitations&&this.props.invitations.map(function(invitation){return/*#__PURE__*/Object(jsx_runtime["jsxs"])(TableRow["a" /* default */],{children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(TableCell["a" /* default */],{component:"th",scope:"row",children:/*#__PURE__*/Object(jsx_runtime["jsx"])("span",{style:{fontSize:"0.8em"},children:invitation.invitedEmail})}),/*#__PURE__*/Object(jsx_runtime["jsx"])(TableCell["a" /* default */],{align:"right",children:/*#__PURE__*/Object(jsx_runtime["jsx"])(IconButton["a" /* default */],{size:"small",onClick:function onClick(e){return _this16.onDelete(e,invitation);},children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Delete_default.a,{})})})]},invitation.invitationId);})})})]});}},{key:"onDelete",value:function onDelete(e,invitation){var _this17=this;e.stopPropagation();e.preventDefault();this.context.deleteInvitation(invitation,function(){return _this17.props.onChange();});}}]);return RevokeExpert;}(react_default.a.Component);PartnerWidget_RevokeExpert.contextType=AppContext;var PartnerWidget_CustomerApp=/*#__PURE__*/function(_React$Component9){Object(inherits["a" /* default */])(CustomerApp,_React$Component9);var _super9=Object(createSuper["a" /* default */])(CustomerApp);function CustomerApp(props){var _this18;Object(classCallCheck["a" /* default */])(this,CustomerApp);_this18=_super9.call(this,props);_this18.state={'tabIndex':0,'invitations':[]};return _this18;}Object(createClass["a" /* default */])(CustomerApp,[{key:"componentDidMount",value:function componentDidMount(){this.loadInvitations();}},{key:"render",value:function render(){var _this=this;return/*#__PURE__*/Object(jsx_runtime["jsxs"])(jsx_runtime["Fragment"],{children:[/*#__PURE__*/Object(jsx_runtime["jsxs"])(Tabs["a" /* default */],{value:this.state.tabIndex,onChange:function onChange(e,v){return _this.setState({'tabIndex':v});},variant:"fullWidth",children:[/*#__PURE__*/Object(jsx_runtime["jsx"])(Tab["a" /* default */],{label:"Invite",value:0}),/*#__PURE__*/Object(jsx_runtime["jsx"])(Tab["a" /* default */],{label:"Revoke",value:1})]}),0===this.state.tabIndex&&/*#__PURE__*/Object(jsx_runtime["jsx"])(PartnerWidget_InviteExpert,{onChange:function onChange(){return _this.loadInvitations();}}),1===this.state.tabIndex&&/*#__PURE__*/Object(jsx_runtime["jsx"])(PartnerWidget_RevokeExpert,{invitations:this.state.invitations,onChange:function onChange(){return _this.loadInvitations();}})]});}},{key:"loadInvitations",value:function loadInvitations(){var _this19=this;this.context.getCustomerInvitations(function(invitations){_this19.setState({'invitations':invitations});});}}]);return CustomerApp;}(react_default.a.Component);PartnerWidget_CustomerApp.contextType=AppContext;var PartnerWidget_App=/*#__PURE__*/function(_React$Component10){Object(inherits["a" /* default */])(_App,_React$Component10);var _super10=Object(createSuper["a" /* default */])(_App);function _App(props){var _this20;Object(classCallCheck["a" /* default */])(this,_App);_this20=_super10.call(this,props);_this20.state={'popoverOpen':false,'anchorEl':null,'app':'','route':'','agencyInvitations':null};PartnerWidget_navigate.current=_this20.state.route;PartnerWidget_navigate.subscribers.push(Object(assertThisInitialized["a" /* default */])(_this20));return _this20;}Object(createClass["a" /* default */])(_App,[{key:"componentDidMount",value:function componentDidMount(){var _this21=this;var _this=this;if(null===this.state.agencyInvitations){this.props.context.getAgencyInvitations(function(invitations){_this21.setState({'agencyInvitations':invitations});});}}},{key:"render",value:function render(){var _this=this;this.props.context.app=this;if(this.props.buttons&&this.props.buttons.agency&&!this.props.buttons.agency.onclick){this.props.buttons.agency.button.onclick=function(){return _this.onClick('agency');};}if(this.props.buttons&&this.props.buttons.customer&&!this.props.buttons.customer.onclick){this.props.buttons.customer.button.onclick=function(){return _this.onClick('customer');};}console.log(this.state.app);console.log(this.state.anchorEl);console.log(this.state.route);return/*#__PURE__*/Object(jsx_runtime["jsx"])(AppContext.Provider,{value:this.props.context,children:/*#__PURE__*/Object(jsx_runtime["jsx"])(Popover,{anchorEl:this.state.anchorEl,open:this.state.popoverOpen,onClose:function onClose(){return _this.close();},width:this.state.route==='AccountTable'?600:300,children:/*#__PURE__*/Object(jsx_runtime["jsx"])("div",{className:this.props.classes.AppBindWidget,children:this.route()})})});}},{key:"onClick",value:function onClick(app){if('agency'===app&&!this.props.context.hasAppBindSession()){this.props.context.enroll();return;}if(this.state.app!==app){PartnerWidget_navigate({'agency':'AccountSwitcher','customer':'CustomerApp'}[app]);this.open();this.setState({'app':app});}else{this.toggle();}}},{key:"onNavigate",value:function onNavigate(route){var customerRoutes=['CustomerApp'];if(this.state.route!==route){if(customerRoutes.indexOf(route)>=0){this.setState({'anchorEl':this.props.buttons.customer.button});}else{this.setState({'anchorEl':this.props.buttons.agency.button});}this.setState({'route':route});}}},{key:"route",value:function route(){switch(this.state.route){case'AccountSwitcher':return/*#__PURE__*/Object(jsx_runtime["jsx"])(PartnerWidget_AccountSwitcher,{agencyInvitations:this.state.agencyInvitations});case'AccountTable':return/*#__PURE__*/Object(jsx_runtime["jsx"])(PartnerWidget_AccountTable,{agencyInvitations:this.state.agencyInvitations});case'NewAccount':return/*#__PURE__*/Object(jsx_runtime["jsx"])(PartnerWidget_NewAccount,{});case'CustomerApp':return/*#__PURE__*/Object(jsx_runtime["jsx"])(PartnerWidget_CustomerApp,{});default:return/*#__PURE__*/Object(jsx_runtime["jsxs"])("h1",{children:["Sorry :( (",this.state.route,")"]});}}},{key:"isOpen",value:function isOpen(){return this.state.popoverOpen;}},{key:"toggle",value:function toggle(){this.setState({'popoverOpen':!this.state.popoverOpen});}},{key:"open",value:function open(){this.setState({'popoverOpen':true});}},{key:"close",value:function close(){this.setState({'popoverOpen':false});}}]);return _App;}(react_default.a.Component);var App=Object(withStyles["a" /* default */])({'AppBindWidget':{'& .appbind-main':{"padding":"16px","clear":"both"},'& .MuiTab-root':{"minWidth":'80px'},"& h3":{"fontSize":"16px","fontWeight":"800","marginBottom":"8px"},"& p.appbind-explainer":{"marginBottom":"16px","lineHeight":"16px","fallbacks":[{"marginBottom":"12px"}]},'& .appbind-ellipsis':{textOverflow:'ellipsis',overflow:'hidden',whiteSpace:'nowrap'},"& label":{"fontWeight":"bold","marginTop":"16px"},"& input":{"padding":"9px","borderRadius":"4px","border":"solid 1px #95928e","width":"100%","boxSizing":"border-box","margin":"4px 0 8px 0"},'& .button, & .MuiButton-contained':{"background":'#3d4592',"color":'#fffdf9'},'& .button:hover, & .MuiButton-contained':{"background":'#2c3266',"boxShadow":'rgb(0 0 0 / 20%) 0px 5px 10px 0px'},"& .appbind-subtext":{"color":"#444"},"& .appbind-group":{"padding":"8px","borderRadius":"8px","border":"solid 1px #CA4","background":"#fff6dd","marginBottom":"16px"},"& .appbind-monospace":{"fontFamily":"monospace","fontWeight":"400","color":"#444"},'& hr':{borderLeft:0,borderRight:0,borderTop:0,borderBottom:"solid 1px #eee",margin:"24px 0 8px 0",color:'#eee'},"& .MuiTableRow-root:last-child td":{"border":0},"& .MuiTableRow-root:last-child th":{"border":0}}})(PartnerWidget_App);var PartnerWidget_WidgetController=/*#__PURE__*/function(){function WidgetController(settings,session){Object(classCallCheck["a" /* default */])(this,WidgetController);console.log('WidgetController.constructor');this.session=settings.session||session;this.getUserEmail=function(callback){return settings.fetchUserEmail(callback);};this.getUserName=function(callback){return settings.fetchUserName(callback);};this.enroll=function(){return window.open(settings.enrollURI,'appbind');};this.vendorId=settings.vendorId;this.vendorAppId=settings.vendorAppId;if(this.session&&this.session.storage)this.mech=new Mech["a" /* default */](this.session.storage.parent());this.apis={'vendor':new API["a" /* default */].Vendor(settings.vendorAPIKey,this.session&&this.session.environment),'reseller':new API["a" /* default */].Reseller(settings.resellerAPIKey,this.session&&this.session.environment)};// this.buttons={};}Object(createClass["a" /* default */])(WidgetController,[{key:"inject",value:function inject(){var _this=this;if(this.injector)return;this.injector=new widget_DOMInjector({'onRender':function onRender(){return _this.render();}});this.injector.show();this.injector.inject();}},{key:"attachAgencyButton",value:function attachAgencyButton(container){this.buttons.agency={'button':container.button,'label':container.label||container.button};if(!this.session||!this.session.isLoggedIn())this.buttons.agency.label.innerHTML='Become an Expert';else this.buttons.agency.label.innerHTML='Switch accounts';if(this.injector)this.injector.render();}},{key:"attachCustomerButton",value:function attachCustomerButton(container){this.buttons.customer={'button':container.button,'label':container.label||container.button};this.buttons.customer.label.innerHTML='Invite expert';if(this.injector)this.injector.render();}},{key:"attachBuyButton",value:function attachBuyButton(container){var _this22=this;container.innerHTML="\n ";var button=container.querySelector('button');button.onclick=function(){return _this22.buySubscription();};if(this.injector)this.injector.render();}},{key:"render",value:function render(){console.log('WidgetController.render');return/*#__PURE__*/Object(jsx_runtime["jsx"])(App,{rootEl:this.injector.elements.root,context:this,buttons:this.buttons});}},{key:"hasAppBindSession",value:function hasAppBindSession(){return this.session&&this.session.isLoggedIn();}/* TODO: The WidgetController should manage the model state. Subscriptions should be passed in through props. */},{key:"getSubscriptions",value:function getSubscriptions(callback){var subscriptions;if(this.session&&this.session.isLoggedIn()){var app=this.getApp(function(app){if(!app)return callback();callback(app.subscriptions());});}}/** * Call the API to create an auth-only subscription. If necessary, the API will * create a customer account for the subscription. * * @param {*} subscription * @param {*} callback */},{key:"createSubscription",value:function createSubscription(subscription,callback){var _this23=this;console.log("WidgetController.createSubscription");// Get the customer account if it already exists var customerAccountId=null;var customerAccount=this.session.__model.accountByEmail(subscription.email);if(customerAccount){customerAccountId=customerAccount.id();}var accountName=subscription.company;var contactLastName=subscription.lastName;var contactFirstName=subscription.firstName;var contactEmail=subscription.contactEmail;var resellerAccountId=this.session.__model.user().parentAccount().id();var appId=subscription.app.id();var subscriptionEmail=subscription.email;var subscriptionPassword='';this.session.api.createAccountAndAuthOnlySubscription(customerAccountId,accountName,contactLastName,contactFirstName,contactEmail,resellerAccountId,appId,subscriptionEmail,subscriptionPassword).then(function(data){// The return contains the new subscription (customer_app_id) id. // console.log( "WidgetController.createSubscription API returned %s", JSON.stringify(data)); var theId=data.customerAppId;_this23.session.loadSubscriptions(function(){if(callback){callback(theId);}});}).catch(function(error){});}},{key:"createSubscriptionOld",value:function createSubscriptionOld(subscription,callback){var _this24=this;var _this=this;console.log("WidgetController.createSubscriptionOld");var createAccount=function createAccount(callback){console.log("WidgetController.createSubscriptionOld.createAccount");var account=_this24.session.__model.accountByEmail(subscription.email);if(account){console.log("WidgetController.createSubscriptionOld.createAccount %s",account.name());callback();}else{console.log("WidgetController.createSubscriptionOld.api.reseller.createCustomer");_this24.apis.reseller.createCustomer({'customerName':subscription.company,'contactFirstName':subscription.firstName,'contactLastName':subscription.lastName,'contactEmail':subscription.contactEmail}).then(function(data){console.log("WidgetController.createSubscriptionOld.api.reseller.createCustomer returned %s",JSON.stringify(data));_this24.session.loadSubscriptions(callback);}).catch(function(error){console.log("WidgetController.createSubscriptionOld.api.reseller.createCustomer error %s",JSON.stringify(error));});}};var createSubscription=function createSubscription(callback){console.log("WidgetController.createSubscriptionOld.createSubscription");var account=_this24.session.__model.accountByEmail(subscription.email);var _previousSubscriptions=account.subscriptionsByAppId(subscription.app.id());var previousSubscriptions={};for(var i=0;i<_previousSubscriptions.length;i++){previousSubscriptions[_previousSubscriptions[i].id()]=true;}_this24.apis.reseller.createSubscription(account.id(),subscription.app.id()).then(function(data){console.log("WidgetController.createSubscriptionOld.createSubscription returns %s",JSON.stringify(data));_this24.session.loadSubscriptions(function(){/* Find the new subscription */var account=_this24.session.__model.accountByEmail(subscription.email);var newSubscriptions=account.subscriptionsByAppId(subscription.app.id());for(var _i=0;_i0){window.location.href=app.links()['login'];}}});}/* TODO. Consolidate somehow. Copy and pasted from App.js and adapted here */},{key:"signup",value:function signup(customerAppId,link){var _this27=this;console.state_log("Action: signup");if(!this.hasAppBindSession())return;var subscription=this.session.__model.subscriptionById(customerAppId);if(!subscription)return;this.session.api.getSubscription(customerAppId,API["a" /* default */].Session.SUBSCRIPTION_AUTH).then(function(data){var loadedSubscription=data.customerAppTByCustomerAppId;loadedSubscription=model["a" /* default */].Subscription.fromAPI(loadedSubscription);if(loadedSubscription){// TODO: undo this hack. The API shape is missing signup link data, so get it from the account tree var app=_this27.session.__model.user().__appById(subscription.app().id());var account=_this27.session.__model.accountById(subscription.account().id());// Can't log in to an app we don't know the website of if(!app.domain())return;// Try to get a signup script var auth=loadedSubscription.auth();auth.firstName=account.primaryContact().firstName||'';auth.lastName=account.primaryContact().lastName||'';var script=MechFactory["a" /* default */].signup({auth:auth},app.domain());console.log(script);if(script&&_this27.mech){_this27.mech.run(script);// Otherwise, just redirect to the signup URI }else if(link){window.location.href=link;}else if(app.links()['signup'].indexOf('.')>0){window.location.href=app.links()['signup'];// or the login URI if that's the only thing available }else if(app.links()['login'].indexOf('.')>0){window.location.href=app.links()['login'];}}});}},{key:"getCustomerInvitations",value:function getCustomerInvitations(callback){var _this28=this;this.getUserEmail(function(email){_this28.apis.vendor.getAllInvitations(email).then(function(response){callback(response.invitations);}).catch(callback);});}},{key:"getAgencyInvitations",value:function getAgencyInvitations(callback,force){var _this29=this;if(!this.hasAppBindSession())return;if(!force&&this.__agencyInvitations)return callback(this.__agencyInvitations);this.session.api.getAllInvitations().then(function(response){_this29.__agencyInvitations=response.invitations.filter(function(inv){return inv.vendorId===_this29.vendorId;});if(_this29.__agencyInvitations.length>0){_this29.flagNotifications();}if(callback)callback(_this29.__agencyInvitations);}).catch(callback);}/** @return Returns a Promise */},{key:"createInvitation",value:function createInvitation(invitation){return this.apis.vendor.createInvitation(invitation);}},{key:"deleteInvitation",value:function deleteInvitation(invitation,callback){this.apis.vendor.deleteInvitation(invitation.invitationId).then(callback).catch(callback);}},{key:"acceptInvitation",value:function acceptInvitation(invitation,callback){this.session.api.acceptInvitation(invitation.invitationId,this.session.__model.user().parentAccount().id()).then(callback).catch(callback);}},{key:"declineInvitation",value:function declineInvitation(invitation,callback){this.session.api.declineInvitation(invitation.invitationId,this.session.__model.user().parentAccount().id()).then(callback).catch(callback);}},{key:"openReports",value:function openReports(){var _this30=this;this.getApp(function(app){if(!app)return;var uri=app.view(_this30.session&&_this30.session.environment);if(uri)window.open(uri,/* tab target */'appbind');});}},{key:"getApp",value:function getApp(callback){if(this.session&&this.session.__model){var app;if(this.vendorAppId){app=this.session.__model.appById(this.vendorAppId);if(!app)app=new model["a" /* default */].App({'id':this.vendorAppId});}else{app=this.session.__model.appByDomain(Route["a" /* default */].currentDomain());if(!app)return;app=this.session.__model.appById(app.id());if(!app)return;}callback(app);return app;}}},{key:"flagNotifications",value:function flagNotifications(){this.buttons.agency.label.innerHTML+=" *";}}]);return WidgetController;}();/* harmony default export */ var PartnerWidget = __webpack_exports__["a"] = (PartnerWidget_WidgetController); /***/ }), /* 49 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } /***/ }), /* 50 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; }); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } /***/ }), /* 51 */, /* 52 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); var MechFactory=function(){function set_script(selector,value){return[['click',selector],['click',selector],['focus',selector],['click',selector],['focus',selector],['keyboard_events',selector],['set_value',selector,value],['keyboard_events',selector],['change_events',selector],['set_value',selector,value],['check_value',selector,value],['blur',selector]];}function set_login(email,password){return[['await','input[type=email]',10000],['delay',200]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=email]',email)),[['await','input[type=password]',10000],['delay',200]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=password]',password)),[['delay',200]]);}function script_by_domain(domainMap,domain){if(!domain)domain=new URL(window.location.href).hostname;for(var slug in domainMap){if(domain.indexOf(slug)>=0){return domainMap[slug];}}}return{login:function login(params,domain){console.log('MechFactory.login('+JSON.stringify(params)+', '+domain+')');var domainMap={'zapier':[['redirect','https://zapier.com/logout'],['redirect','https://zapier.com/app/login'],['await','input[type=email]',10000],['delay',200]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=email]',params.auth.email)),[['await',['form button:not(:disabled)','Continue'],10000],['delay',200]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=email]',params.auth.email)),[['click',['form button:not(:disabled)','Continue']],['await','input[type=password]',10000],['delay',200]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=password]',params.auth.password)),[['await',['form button','Continue'],10000],['delay',1000]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=password]',params.auth.password)),[['await',['form button:not(:disabled)','Continue'],10000],['delay',200],['click',['form button','Continue']]]),'jotform.com':[['fetch','https://www.jotform.com/logout.php',{"headers":{"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","accept-language":"en-US,en;q=0.9","sec-ch-ua":"\"Chromium\";v=\"112\", \"Google Chrome\";v=\"112\", \"Not:A-Brand\";v=\"99\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"macOS\"","sec-fetch-dest":"document","sec-fetch-mode":"navigate","sec-fetch-site":"same-origin","sec-fetch-user":"?1","upgrade-insecure-requests":"1"},"referrer":"https://www.jotform.com/myforms/","referrerPolicy":"strict-origin-when-cross-origin","body":null,"method":"GET","mode":"cors","credentials":"include"}],['delay',200],['redirect','https://www.jotform.com/logout.php'],['redirect','https://www.jotform.com/login']].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_login(params.auth.email,params.auth.password)),[['click',['#signinButton']]]),'app.netlify.com':[['redirect','https://app.netlify.com/login/email'],['fetch','https://app.netlify.com/access-control/bb-api/api/v1/access_tokens/revoke',{"headers":{"accept":"*/*","accept-language":"en-US,en;q=0.9","content-type":"application/json","sec-ch-ua":"\"Chromium\";v=\"112\", \"Google Chrome\";v=\"112\", \"Not:A-Brand\";v=\"99\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"macOS\"","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin"},"referrer":"https://app.netlify.com/teams/bibdex-netlify/overview","referrerPolicy":"no-referrer-when-downgrade","body":null,"method":"DELETE","mode":"cors","credentials":"include"}],['delay',200],['redirect','https://app.netlify.com/login/email'],['delay',1000]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_login(params.auth.email,params.auth.password)),[['click',['button[type="submit"]']]]),'freshbooks.com':[['redirect','https://my.freshbooks.com/#/dashboard'],['delay',1000],['await',['a','log out'],1000,true],['click',['a','log out'],true],['await',['.js-navbar-popover-toggle-icon-cog'],1000,true],['click',['.js-navbar-popover-toggle-icon-cog'],true],['await',['.js-logout','log out'],1000,true],['click',['.js-logout','log out'],true],['delay',3000],['redirect','https://my.freshbooks.com/#/login'],['await','input[type=email]']].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=email]',params.auth.email)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=password]',params.auth.password)),[['click','input[type=submit]']]),'pandadoc.com':[['redirect','https://app.pandadoc.com/logout'],['redirect','https://app.pandadoc.com/login/?lng=en-US'],['await','input#email',10000]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#email',params.auth.email)),[['await','input#password',10000]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#email',params.auth.password)),[['click',['button[type=button]','log in']]]),'typeform.com':[['redirect','https://admin.typeform.com/login/logout'],['redirect','https://admin.typeform.com/login'],['await','input[name=username]',10000]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[name=username]',params.auth.email)),[['await','input[name=password]',10000]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[name=password]',params.auth.password)),[['await','input.button',10000],['delay',250],['click',['input[type=submit]']]]),'reply.io':[['redirect','https://run.reply.io/login'],['await','input#Email',3000,true],['click',['a','Logout'],true],['click',['button[data-test-id="header-nav-dropdown"]'],true],['await',['li[role=menuitem]','Logout'],500,true],['click',['li[role=menuitem]','Logout'],true],['await','input#Email',3000]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#Email',params.auth.email)),[['await','input#Password',10000]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#Password',params.auth.password)),[['click',['button','log in']]]),'copper.com':[['redirect','https://app.copper.com/users/sign_in'],['await',['.LeftNav_footerMenu a','log out'],3000,true],['click',['.LeftNav_footerMenu a','log out'],true],['await','input[type=email]',10000,true]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=email]',params.auth.email)),[['click','input[type=submit]'],['await','input[type=password]',10000,true]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=password]',params.auth.password)),[['click','input[type=submit]']]),'bubble.io':[['redirect','https://bubble.io/home/apps'],['await','div.bubble-element.CustomElement.floating-group.bubble-r-container.flex.column > div.bubble-element.Group.bubble-r-container.flex.row > div > div.bubble-element.Group.bubble-r-container.flex.row > div.clickable-element.bubble-element.Group.bubble-r-container.relative > div',3000,true],['click','div.bubble-element.CustomElement.floating-group.bubble-r-container.flex.column > div.bubble-element.Group.bubble-r-container.flex.row > div > div.bubble-element.Group.bubble-r-container.flex.row > div.clickable-element.bubble-element.Group.bubble-r-container.relative > div',true],['await',['div.Text.clickable-element div','log out'],3000,true],['click',['div.Text.clickable-element div','log out'],true],['redirect','https://bubble.io/login?mode=login'],['await','input[type=email]#emailsignup',10000],['remove','input[type=email]#emailsignup'],['await','input[type=email]',10000,true]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=email]',params.auth.email)),[['await','input + div + input[type=password]',10000,true]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input + div + input[type=password]',params.auth.password)),[['click',["input + div + input[type=password] + div + div > button",'log in']]]),'algolia.com':[['redirect','https://www.algolia.com/users/sign_out'],['redirect','https://www.algolia.com/users/sign_in'],['delay',200]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_login(params.auth.email,params.auth.password)),[['delay',200],['click',['button[type="submit"]','Log in']]]),'bibdex.com':[['redirect','https://www.bibdex.com/account/logout'],['redirect','https://www.bibdex.com/account/login'],['delay',200],['await','input#user_email',10000],['delay',200]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#user_email',params.auth.email)),[['await','input[type=password]',10000],['delay',200]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=password]',params.auth.password)),[['delay',200],['click',['input[type="submit"]','Log in']]])};var script=script_by_domain(domainMap,domain);if(script)return script;},signup:function signup(params,domain){console.log('MechFactory.signup('+JSON.stringify(params)+', '+domain+')');var domainMap={'zapier.com':[['redirect','https://zapier.com/logout'],['redirect','https://zapier.com/sign-up'],['await','input[type=email]',10000]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=email]',params.auth.email)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#signup-first-name',params.auth.firstName)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#signup-last-name',params.auth.lastName)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=password]',params.auth.password)),[['delay',1000]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=email]',params.auth.email)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=password]',params.auth.password)),[['await',['form button:not(:disabled)','Start'],10000],['click',['form button','Start']]]),'jotform.com':[['fetch','https://www.jotform.com/logout.php',{"headers":{"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","accept-language":"en-US,en;q=0.9","sec-ch-ua":"\"Chromium\";v=\"112\", \"Google Chrome\";v=\"112\", \"Not:A-Brand\";v=\"99\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"macOS\"","sec-fetch-dest":"document","sec-fetch-mode":"navigate","sec-fetch-site":"same-origin","sec-fetch-user":"?1","upgrade-insecure-requests":"1"},"referrer":"https://www.jotform.com/myforms/","referrerPolicy":"strict-origin-when-cross-origin","body":null,"method":"GET","mode":"cors","credentials":"include"}],['delay',200],['redirect','https://www.jotform.com/logout.php'],['await_href','https://www.jotform.com'],['redirect','https://www.jotform.com/signup']].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_login(params.auth.email,params.auth.password)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[name="name"]',params.auth.firstName+' '+params.auth.lastName)),[['click',['#terms']],['delay, 200'],['click',['button[type="button"]','Sign up']]]),'app.netlify.com':[['redirect','https://app.netlify.com/signup'],['fetch','https://app.netlify.com/access-control/bb-api/api/v1/access_tokens/revoke',{"headers":{"accept":"*/*","accept-language":"en-US,en;q=0.9","content-type":"application/json","sec-ch-ua":"\"Chromium\";v=\"112\", \"Google Chrome\";v=\"112\", \"Not:A-Brand\";v=\"99\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"macOS\"","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin"},"referrer":"https://app.netlify.com/teams/bibdex-netlify/overview","referrerPolicy":"no-referrer-when-downgrade","body":null,"method":"DELETE","mode":"cors","credentials":"include"}],['delay',200],['redirect','https://app.netlify.com/login/email']].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_login(params.auth.email,params.auth.password)),[['click',['button[type="submit"]']]]),'algolia.com':[['redirect','https://www.algolia.com/users/sign_out'],['redirect','https://www.algolia.com/users/sign_up'],['delay',200]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_login(params.auth.email,params.auth.password))),'bibdex.com':[['redirect','https://www.bibdex.com/account/logout'],['redirect','https://www.bibdex.com/account/signup'],['delay',200],['await','input#user_first_name',10000],['delay',200]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#first_name',params.auth.firstName)),[['await','input#user_last_name',10000],['delay',200]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#last_name',params.auth.lastName)),[['await','input#user_email',10000],['delay',200]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#user_email',params.auth.email)),[['await','input#user_password',10000],['delay',200]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#user_password',params.auth.password)),[['await','input#user_password_confirmation',10000],['delay',200]],Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input#user_password_confirmation',params.auth.password)),[['delay',200],['click',['input[type="submit"]','Sign up']]])};var script=script_by_domain(domainMap,domain);if(script)return script;},g2signup:function g2signup(params,domain){console.log('MechFactory.g2signup('+JSON.stringify(params)+', '+domain+')');var domainMap={'squarespace.com':[['redirect','https://www.squarespace.com'],['await','.www-navigation__desktop__account-info__login-button',10000],['click','.www-navigation__desktop__account-info__login-button'],['await',['a','Create Account'],10000],['click',['a','Create Account']],['await',['a','Continue with Email'],10000],['click',['a','Continue with Email']],['await','form input[placeholder="First Name"]',10000]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('form input[placeholder="First Name"]',params.firstName)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('form input[placeholder="Last Name"]',params.lastName)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('form input[type="email"]',params.email)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('form input[type=password]',params.password)),[['await',['form button[type=submit]'],10000],['click',['form button[type=submit]']]]),'clickup.com':[['redirect','https://app.clickup.com/signup?promo=g2'],['await','#signup-username-input']].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#signup-username-input',params.fullName)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#signup-email',params.email)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('input[type=password]',params.password)),[['check','input[type=checkbox]',params.newsletter],['await',['form button'],10000],['delay',2000],['click',['form button']]]),'engagebay.com':[['redirect','https://app.engagebay.com/signup?gt=true&utm_source=g2-store&utm_medium=g2-store&utm_campaign=g2-store&sa=D&source=editors&ust=1624459327645000&usg=AFQjCNGMQcOwExeWo8Wn6nUzbMPbRL8PfQ'],['await','#loginForm']].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#loginForm input[name=name]',params.fullName)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#loginForm input[name=email]',params.email)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#loginForm input[name=website]',params.website)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#loginForm input[type=password]',params.password))),'expensify.com':[['redirect','https://www.expensify.com/m/?promoCode=g2storefront'],['await_href','https://www.expensify.com/'],['await','button#js_click_showEmailForm',10000],['click','button#js_click_showEmailForm'],['await','#signin-flow input[type=email]',10000]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#signin-flow input[type=email]',params.email)),[['click',['button','next']],['await',['button','join'],10000]//['click', ['button', 'join']], ]),'icontact.com':[['redirect','https://www2.icontact.com/embed/signup-freemium-2k5x?utm_source=lp&utm_medium=g2-offer&utm_campaign=2000free'],['await','#formSignup',10000]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#formSignup input[name=sFirstName]',params.firstName)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#formSignup input[name=sLastName]',params.lastName)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#formSignup input[name=sBusinessName]',params.organization)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#formSignup input[name=sPhone]',params.phone)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#formSignup input[name=sEmail]',params.email)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('#formSignup input[name=sPassword]',params.password))),'getresponse.com':[['redirect','https://www.getresponse.com/start-free?utm_source=g2&utm_medium=cpc&utm_campaign=12-storefront'],['await','form#free-trial-form',10000]].concat(Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('form#free-trial-form input#startFreeTrial_firstName',params.fullName)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('form#free-trial-form input#startFreeTrial_email',params.email)),Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(set_script('form#free-trial-form input#startFreeTrial_password',params.password)))};var script=script_by_domain(domainMap,domain);if(script)return script;}};}();/* harmony default export */ __webpack_exports__["a"] = (MechFactory); /***/ }), /* 53 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony default export */ __webpack_exports__["a"] = (react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(null)); /***/ }), /* 54 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export teardown */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useIsFocusVisible; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); // based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js var hadKeyboardEvent = true; var hadFocusVisibleRecently = false; var hadFocusVisibleRecentlyTimeout = null; var inputTypesWhitelist = { text: true, search: true, url: true, tel: true, email: true, password: true, number: true, date: true, month: true, week: true, time: true, datetime: true, 'datetime-local': true }; /** * Computes whether the given element should automatically trigger the * `focus-visible` class being added, i.e. whether it should always match * `:focus-visible` when focused. * @param {Element} node * @return {boolean} */ function focusTriggersKeyboardModality(node) { var type = node.type, tagName = node.tagName; if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) { return true; } if (tagName === 'TEXTAREA' && !node.readOnly) { return true; } if (node.isContentEditable) { return true; } return false; } /** * Keep track of our keyboard modality state with `hadKeyboardEvent`. * If the most recent user interaction was via the keyboard; * and the key press did not include a meta, alt/option, or control key; * then the modality is keyboard. Otherwise, the modality is not keyboard. * @param {KeyboardEvent} event */ function handleKeyDown(event) { if (event.metaKey || event.altKey || event.ctrlKey) { return; } hadKeyboardEvent = true; } /** * If at any point a user clicks with a pointing device, ensure that we change * the modality away from keyboard. * This avoids the situation where a user presses a key on an already focused * element, and then clicks on a different element, focusing it with a * pointing device, while we still think we're in keyboard modality. */ function handlePointerDown() { hadKeyboardEvent = false; } function handleVisibilityChange() { if (this.visibilityState === 'hidden') { // If the tab becomes active again, the browser will handle calling focus // on the element (Safari actually calls it twice). // If this tab change caused a blur on an element with focus-visible, // re-apply the class when the user switches back to the tab. if (hadFocusVisibleRecently) { hadKeyboardEvent = true; } } } function prepare(doc) { doc.addEventListener('keydown', handleKeyDown, true); doc.addEventListener('mousedown', handlePointerDown, true); doc.addEventListener('pointerdown', handlePointerDown, true); doc.addEventListener('touchstart', handlePointerDown, true); doc.addEventListener('visibilitychange', handleVisibilityChange, true); } function teardown(doc) { doc.removeEventListener('keydown', handleKeyDown, true); doc.removeEventListener('mousedown', handlePointerDown, true); doc.removeEventListener('pointerdown', handlePointerDown, true); doc.removeEventListener('touchstart', handlePointerDown, true); doc.removeEventListener('visibilitychange', handleVisibilityChange, true); } function isFocusVisible(event) { var target = event.target; try { return target.matches(':focus-visible'); } catch (error) {} // browsers not implementing :focus-visible will throw a SyntaxError // we use our own heuristic for those browsers // rethrow might be better if it's not the expected error but do we really // want to crash if focus-visible malfunctioned? // no need for validFocusTarget check. the user does that by attaching it to // focusable events only return hadKeyboardEvent || focusTriggersKeyboardModality(target); } /** * Should be called if a blur event is fired on a focus-visible element */ function handleBlurVisible() { // To detect a tab/window switch, we look for a blur event followed // rapidly by a visibility change. // If we don't see a visibility change within 100ms, it's probably a // regular focus change. hadFocusVisibleRecently = true; window.clearTimeout(hadFocusVisibleRecentlyTimeout); hadFocusVisibleRecentlyTimeout = window.setTimeout(function () { hadFocusVisibleRecently = false; }, 100); } function useIsFocusVisible() { var ref = react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function (instance) { var node = react_dom__WEBPACK_IMPORTED_MODULE_1__["findDOMNode"](instance); if (node != null) { prepare(node.ownerDocument); } }, []); if (false) {} return { isFocusVisible: isFocusVisible, onBlurVisible: handleBlurVisible, ref: ref }; } /***/ }), /* 55 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } /***/ }), /* 56 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; }); function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /***/ }), /* 57 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var ThemeContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(null); if (false) {} /* harmony default export */ __webpack_exports__["a"] = (ThemeContext); /***/ }), /* 58 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49); function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); } /***/ }), /* 59 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var hasSymbol = typeof Symbol === 'function' && Symbol.for; /* harmony default export */ __webpack_exports__["a"] = (hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__'); /***/ }), /* 60 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _createMuiTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89); var defaultTheme = Object(_createMuiTheme__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(); /* harmony default export */ __webpack_exports__["a"] = (defaultTheme); /***/ }), /* 61 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /** * @ignore - internal component. */ var TableContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"](); if (false) {} /* harmony default export */ __webpack_exports__["a"] = (TableContext); /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(33); var _interopRequireWildcard = __webpack_require__(34); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _createSvgIcon = _interopRequireDefault(__webpack_require__(35)); var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" }), 'Delete'); exports.default = _default; /***/ }), /* 63 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unsupportedProp; }); function unsupportedProp(props, propName, componentName, location, propFullName) { if (true) { return null; } var propFullNameSafe = propFullName || propName; if (typeof props[propName] !== 'undefined') { return new Error("The prop `".concat(propFullNameSafe, "` is not supported. Please remove it.")); } return null; } /***/ }), /* 64 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; }); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /***/ }), /* 65 */, /* 66 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /* 67 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return requirePropFactory; }); function requirePropFactory(componentNameInError) { if (true) { return function () { return null; }; } var requireProp = function requireProp(requiredProp) { return function (props, propName, componentName, location, propFullName) { var propFullNameSafe = propFullName || propName; if (typeof props[propName] !== 'undefined' && !props[requiredProp]) { return new Error("The prop `".concat(propFullNameSafe, "` of ") + "`".concat(componentNameInError, "` must be used on `").concat(requiredProp, "`.")); } return null; }; }; return requireProp; } /***/ }), /* 68 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useControlled; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */ function useControlled(_ref) { var controlled = _ref.controlled, defaultProp = _ref.default, name = _ref.name, _ref$state = _ref.state, state = _ref$state === void 0 ? 'value' : _ref$state; var _React$useRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](controlled !== undefined), isControlled = _React$useRef.current; var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](defaultProp), valueState = _React$useState[0], setValue = _React$useState[1]; var value = isControlled ? controlled : valueState; if (false) { var _React$useRef2, defaultValue; } var setValueIfUncontrolled = react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function (newValue) { if (!isControlled) { setValue(newValue); } }, []); return [value, setValueIfUncontrolled]; } /***/ }), /* 69 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7); var isFirefox=navigator.userAgent.indexOf('Firefox')!==-1||navigator.userAgent.indexOf('Gecko/')!==-1;var Mech=/*#__PURE__*/function(){function Mech(storage,options){Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this,Mech);this.script=null;this.step=null;this.options=options||{};this.storage=storage.clone('mech');if(this.storage)this.restore();}Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Mech,[{key:"overlay",value:function overlay(){if(!this.options.overlay)return;if(!this._overlay)this._overlay=document.getElementById('appbind-overlay');if(this._overlay)return;this._overlay=document.createElement('div');this._overlay.style.background='white';this._overlay.style.width="100%";this._overlay.style.height="100%";this._overlay.style.position='absolute';this._overlay.style.zIndex=2147483647;this._overlay.style.top=0;this._overlay.style.bottom=0;this._overlay.style.left=0;this._overlay.style.right=0;this._overlay.style.margin=0;this._overlay.style.padding=0;this._overlay.style.opacity="0.95";this._overlay.id='appbind-overlay';document.body.appendChild(this._overlay);}},{key:"run",value:function run(script,step){var _this=this;if(script)this.script=script;if(step)this.step=step;if(!this.step)this.step=0;if(this.script&&this.step=0)return true;this.retryStep();return false;}},{key:"action_await",value:function action_await(selector,timeout,force){if(!timeout)timeout=Mech.TIMEOUT;if(!this.script_timeout){this.script_timeout=new Date();}if(new Date().getTime()-this.script_timeout.getTime()>=timeout){return false||force;}var elem=this._query(selector);if(elem){return true;}this.retryStep();return false;}},{key:"action_delay",value:function action_delay(time){var _this4=this;window.setTimeout(function(){return _this4.run();},time);return false;}},{key:"action_set_value",value:function action_set_value(selector,value){var inputs=this._queryAll(selector);if(inputs&&inputs.length===1&&undefined!==value){var input=inputs[0];/* Keep lastpass from overriding field */input.setAttribute('autocomplete','off');input.setAttribute('data-lpignore','true');input.value=value;return true;}return false;}},{key:"action_check_value",value:function action_check_value(selector,value){var inputs=this._queryAll(selector);if(inputs&&inputs.length===1&&undefined!==value){var input=inputs[0];/* Keep lastpass from overriding field */input.setAttribute('autocomplete','off');input.setAttribute('data-lpignore','true');return value===input.value;}return false;}},{key:"action_check",value:function action_check(selector,value){if(undefined===value)value=true;var inputs=this._queryAll(selector);if(inputs&&inputs.length===1&&'checkbox'===inputs[0].type){var input=inputs[0];/* Keep lastpass from overriding field */input.setAttribute('autocomplete','off');input.setAttribute('data-lpignore','true');input.checked=value;return true;}return false;}},{key:"action_click",value:function action_click(selector,force){var els=this._queryAll(selector);if(els&&els.length===1){var el=els[0];el.click();return true;}return false||force;}},{key:"action_remove",value:function action_remove(selector,force){var els=this._queryAll(selector);if(els&&els.length===1){var el=els[0];el.parentElement.removeChild(el);return true;}return false||force;}},{key:"action_red_border",value:function action_red_border(selector){var els=this._queryAll(selector);if(els&&els.length===1){var el=els[0];el.style.border="solid red 2px";return true;}return false;}},{key:"action_focus",value:function action_focus(selector){var inputs=this._queryAll(selector);if(inputs&&inputs.length===1){var input=inputs[0];var value=input.value;input.focus();/* Keep lastpass from overriding field */input.setAttribute('autocomplete','off');input.setAttribute('data-lpignore','true');input.value=value;return true;}return false;}},{key:"action_blur",value:function action_blur(selector){var inputs=this._queryAll(selector);if(inputs&&inputs.length===1){var input=inputs[0];/* Keep lastpass from overriding field */input.setAttribute('autocomplete','off');input.setAttribute('data-lpignore','true');input.blur();return true;}return false;}},{key:"action_post",value:function action_post(uri){fetch(uri,{'method':'POST'});return true;}},{key:"action_keyboard_events",value:function action_keyboard_events(selector){var inputs=this._queryAll(selector);if(inputs&&inputs.length===1){var input=inputs[0];/* Keep lastpass from overriding field */input.setAttribute('autocomplete','off');input.setAttribute('data-lpignore','true');var eventNames=['keydown','keypress','keyup'];for(var i=0;i1){_filter=selector[1];if('string'===typeof _filter){_filter=function _filter(el){return el.innerText.toLowerCase().indexOf(selector[1].toLowerCase())>=0;};}}}if(!root)root=document;var elements=root.querySelectorAll(_selector);if(!elements)return[];if(_filter){elements=Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(elements).filter(_filter);}return elements;}},{key:"_query",value:function _query(selector,root/* optional; default === document */){var elements=this._queryAll(selector,root);if(elements&&elements.length&&elements.length>0)return elements[0];}}]);return Mech;}();Mech.TIMEOUT=10000;/* harmony default export */ __webpack_exports__["a"] = (Mech); /***/ }), /* 70 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // We need to centralize the zIndex definitions as they work // like global values in the browser. var zIndex = { mobileStepper: 1000, speedDial: 1050, appBar: 1100, drawer: 1200, modal: 1300, snackbar: 1400, tooltip: 1500 }; /* harmony default export */ __webpack_exports__["a"] = (zIndex); /***/ }), /* 71 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; }); function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /***/ }), /* 72 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6); var Observer=function Observer(onNotify){Object(_Users_sunir_source_appbind_source_appbind_chrome_extension_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this,Observer);this.onNotify=onNotify;};/* harmony default export */ __webpack_exports__["a"] = (Observer); /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(33); var _interopRequireWildcard = __webpack_require__(34); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _createSvgIcon = _interopRequireDefault(__webpack_require__(35)); var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" }), 'Edit'); exports.default = _default; /***/ }), /* 74 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inheritsLoose; }); // CONCATENATED MODULE: ./node_modules/react-transition-group/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } // CONCATENATED MODULE: ./node_modules/react-transition-group/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } /***/ }), /* 75 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } /***/ }), /* 76 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // UNUSED EXPORTS: styles // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(2); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(3); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__(0); var react_default = /*#__PURE__*/__webpack_require__.n(react); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__(12); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__(21); // EXTERNAL MODULE: ./node_modules/clsx/dist/clsx.m.js var clsx_m = __webpack_require__(4); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/utils/useForkRef.js var useForkRef = __webpack_require__(17); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/utils/useEventCallback.js var useEventCallback = __webpack_require__(22); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/styles/withStyles.js + 6 modules var withStyles = __webpack_require__(8); // EXTERNAL MODULE: ./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js var useIsFocusVisible = __webpack_require__(54); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules var toConsumableArray = __webpack_require__(36); // EXTERNAL MODULE: ./node_modules/react-transition-group/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js var objectWithoutPropertiesLoose = __webpack_require__(71); // CONCATENATED MODULE: ./node_modules/react-transition-group/node_modules/@babel/runtime/helpers/esm/extends.js function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } // CONCATENATED MODULE: ./node_modules/react-transition-group/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } // EXTERNAL MODULE: ./node_modules/react-transition-group/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules var inheritsLoose = __webpack_require__(74); // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js var TransitionGroupContext = __webpack_require__(53); // CONCATENATED MODULE: ./node_modules/react-transition-group/esm/utils/ChildMapping.js /** * Given `this.props.children`, return an object mapping key to child. * * @param {*} children `this.props.children` * @return {object} Mapping of key to child */ function getChildMapping(children, mapFn) { var mapper = function mapper(child) { return mapFn && Object(react["isValidElement"])(child) ? mapFn(child) : child; }; var result = Object.create(null); if (children) react["Children"].map(children, function (c) { return c; }).forEach(function (child) { // run the map function here instead so that the key is the computed one result[child.key] = mapper(child); }); return result; } /** * When you're adding or removing children some may be added or removed in the * same render pass. We want to show *both* since we want to simultaneously * animate elements in and out. This function takes a previous set of keys * and a new set of keys and merges them with its best guess of the correct * ordering. In the future we may expose some of the utilities in * ReactMultiChild to make this easy, but for now React itself does not * directly have this concept of the union of prevChildren and nextChildren * so we implement it here. * * @param {object} prev prev children as returned from * `ReactTransitionChildMapping.getChildMapping()`. * @param {object} next next children as returned from * `ReactTransitionChildMapping.getChildMapping()`. * @return {object} a key set that contains all keys in `prev` and all keys * in `next` in a reasonable order. */ function mergeChildMappings(prev, next) { prev = prev || {}; next = next || {}; function getValueForKey(key) { return key in next ? next[key] : prev[key]; } // For each key of `next`, the list of keys to insert before that key in // the combined list var nextKeysPending = Object.create(null); var pendingKeys = []; for (var prevKey in prev) { if (prevKey in next) { if (pendingKeys.length) { nextKeysPending[prevKey] = pendingKeys; pendingKeys = []; } } else { pendingKeys.push(prevKey); } } var i; var childMapping = {}; for (var nextKey in next) { if (nextKeysPending[nextKey]) { for (i = 0; i < nextKeysPending[nextKey].length; i++) { var pendingNextKey = nextKeysPending[nextKey][i]; childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); } } childMapping[nextKey] = getValueForKey(nextKey); } // Finally, add the keys which didn't appear before any key in `next` for (i = 0; i < pendingKeys.length; i++) { childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); } return childMapping; } function getProp(child, prop, props) { return props[prop] != null ? props[prop] : child.props[prop]; } function getInitialChildMapping(props, onExited) { return getChildMapping(props.children, function (child) { return Object(react["cloneElement"])(child, { onExited: onExited.bind(null, child), in: true, appear: getProp(child, 'appear', props), enter: getProp(child, 'enter', props), exit: getProp(child, 'exit', props) }); }); } function getNextChildMapping(nextProps, prevChildMapping, onExited) { var nextChildMapping = getChildMapping(nextProps.children); var children = mergeChildMappings(prevChildMapping, nextChildMapping); Object.keys(children).forEach(function (key) { var child = children[key]; if (!Object(react["isValidElement"])(child)) return; var hasPrev = (key in prevChildMapping); var hasNext = (key in nextChildMapping); var prevChild = prevChildMapping[key]; var isLeaving = Object(react["isValidElement"])(prevChild) && !prevChild.props.in; // item is new (entering) if (hasNext && (!hasPrev || isLeaving)) { // console.log('entering', key) children[key] = Object(react["cloneElement"])(child, { onExited: onExited.bind(null, child), in: true, exit: getProp(child, 'exit', nextProps), enter: getProp(child, 'enter', nextProps) }); } else if (!hasNext && hasPrev && !isLeaving) { // item is old (exiting) // console.log('leaving', key) children[key] = Object(react["cloneElement"])(child, { in: false }); } else if (hasNext && hasPrev && Object(react["isValidElement"])(prevChild)) { // item hasn't changed transition states // copy over the last transition props; // console.log('unchanged', key) children[key] = Object(react["cloneElement"])(child, { onExited: onExited.bind(null, child), in: prevChild.props.in, exit: getProp(child, 'exit', nextProps), enter: getProp(child, 'enter', nextProps) }); } }); return children; } // CONCATENATED MODULE: ./node_modules/react-transition-group/esm/TransitionGroup.js var values = Object.values || function (obj) { return Object.keys(obj).map(function (k) { return obj[k]; }); }; var defaultProps = { component: 'div', childFactory: function childFactory(child) { return child; } }; /** * The `` component manages a set of transition components * (`` and ``) in a list. Like with the transition * components, `` is a state machine for managing the mounting * and unmounting of components over time. * * Consider the example below. As items are removed or added to the TodoList the * `in` prop is toggled automatically by the ``. * * Note that `` does not define any animation behavior! * Exactly _how_ a list item animates is up to the individual transition * component. This means you can mix and match animations across different list * items. */ var TransitionGroup_TransitionGroup = /*#__PURE__*/function (_React$Component) { Object(inheritsLoose["a" /* default */])(TransitionGroup, _React$Component); function TransitionGroup(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear _this.state = { contextValue: { isMounting: true }, handleExited: handleExited, firstRender: true }; return _this; } var _proto = TransitionGroup.prototype; _proto.componentDidMount = function componentDidMount() { this.mounted = true; this.setState({ contextValue: { isMounting: false } }); }; _proto.componentWillUnmount = function componentWillUnmount() { this.mounted = false; }; TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) { var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender; return { children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited), firstRender: false }; } // node is `undefined` when user provided `nodeRef` prop ; _proto.handleExited = function handleExited(child, node) { var currentChildMapping = getChildMapping(this.props.children); if (child.key in currentChildMapping) return; if (child.props.onExited) { child.props.onExited(node); } if (this.mounted) { this.setState(function (state) { var children = _extends({}, state.children); delete children[child.key]; return { children: children }; }); } }; _proto.render = function render() { var _this$props = this.props, Component = _this$props.component, childFactory = _this$props.childFactory, props = Object(objectWithoutPropertiesLoose["a" /* default */])(_this$props, ["component", "childFactory"]); var contextValue = this.state.contextValue; var children = values(this.state.children).map(childFactory); delete props.appear; delete props.enter; delete props.exit; if (Component === null) { return /*#__PURE__*/react_default.a.createElement(TransitionGroupContext["a" /* default */].Provider, { value: contextValue }, children); } return /*#__PURE__*/react_default.a.createElement(TransitionGroupContext["a" /* default */].Provider, { value: contextValue }, /*#__PURE__*/react_default.a.createElement(Component, props, children)); }; return TransitionGroup; }(react_default.a.Component); TransitionGroup_TransitionGroup.propTypes = false ? undefined : {}; TransitionGroup_TransitionGroup.defaultProps = defaultProps; /* harmony default export */ var esm_TransitionGroup = (TransitionGroup_TransitionGroup); // CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/ButtonBase/Ripple.js var useEnhancedEffect = typeof window === 'undefined' ? react["useEffect"] : react["useLayoutEffect"]; /** * @ignore - internal component. */ function Ripple(props) { var classes = props.classes, _props$pulsate = props.pulsate, pulsate = _props$pulsate === void 0 ? false : _props$pulsate, rippleX = props.rippleX, rippleY = props.rippleY, rippleSize = props.rippleSize, inProp = props.in, _props$onExited = props.onExited, onExited = _props$onExited === void 0 ? function () {} : _props$onExited, timeout = props.timeout; var _React$useState = react["useState"](false), leaving = _React$useState[0], setLeaving = _React$useState[1]; var rippleClassName = Object(clsx_m["a" /* default */])(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate); var rippleStyles = { width: rippleSize, height: rippleSize, top: -(rippleSize / 2) + rippleY, left: -(rippleSize / 2) + rippleX }; var childClassName = Object(clsx_m["a" /* default */])(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate); var handleExited = Object(useEventCallback["a" /* default */])(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority useEnhancedEffect(function () { if (!inProp) { // react-transition-group#onExit setLeaving(true); // react-transition-group#onExited var timeoutId = setTimeout(handleExited, timeout); return function () { clearTimeout(timeoutId); }; } return undefined; }, [handleExited, inProp, timeout]); return /*#__PURE__*/react["createElement"]("span", { className: rippleClassName, style: rippleStyles }, /*#__PURE__*/react["createElement"]("span", { className: childClassName })); } false ? undefined : void 0; /* harmony default export */ var ButtonBase_Ripple = (Ripple); // CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js var DURATION = 550; var DELAY_RIPPLE = 80; var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { overflow: 'hidden', pointerEvents: 'none', position: 'absolute', zIndex: 0, top: 0, right: 0, bottom: 0, left: 0, borderRadius: 'inherit' }, /* Styles applied to the internal `Ripple` components `ripple` class. */ ripple: { opacity: 0, position: 'absolute' }, /* Styles applied to the internal `Ripple` components `rippleVisible` class. */ rippleVisible: { opacity: 0.3, transform: 'scale(1)', animation: "$enter ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut) }, /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */ ripplePulsate: { animationDuration: "".concat(theme.transitions.duration.shorter, "ms") }, /* Styles applied to the internal `Ripple` components `child` class. */ child: { opacity: 1, display: 'block', width: '100%', height: '100%', borderRadius: '50%', backgroundColor: 'currentColor' }, /* Styles applied to the internal `Ripple` components `childLeaving` class. */ childLeaving: { opacity: 0, animation: "$exit ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut) }, /* Styles applied to the internal `Ripple` components `childPulsate` class. */ childPulsate: { position: 'absolute', left: 0, top: 0, animation: "$pulsate 2500ms ".concat(theme.transitions.easing.easeInOut, " 200ms infinite") }, '@keyframes enter': { '0%': { transform: 'scale(0)', opacity: 0.1 }, '100%': { transform: 'scale(1)', opacity: 0.3 } }, '@keyframes exit': { '0%': { opacity: 1 }, '100%': { opacity: 0 } }, '@keyframes pulsate': { '0%': { transform: 'scale(1)' }, '50%': { transform: 'scale(0.92)' }, '100%': { transform: 'scale(1)' } } }; }; /** * @ignore - internal component. * * TODO v5: Make private */ var TouchRipple_TouchRipple = /*#__PURE__*/react["forwardRef"](function TouchRipple(props, ref) { var _props$center = props.center, centerProp = _props$center === void 0 ? false : _props$center, classes = props.classes, className = props.className, other = Object(objectWithoutProperties["a" /* default */])(props, ["center", "classes", "className"]); var _React$useState = react["useState"]([]), ripples = _React$useState[0], setRipples = _React$useState[1]; var nextKey = react["useRef"](0); var rippleCallback = react["useRef"](null); react["useEffect"](function () { if (rippleCallback.current) { rippleCallback.current(); rippleCallback.current = null; } }, [ripples]); // Used to filter out mouse emulated events on mobile. var ignoringMouseDown = react["useRef"](false); // We use a timer in order to only show the ripples for touch "click" like events. // We don't want to display the ripple for touch scroll events. var startTimer = react["useRef"](null); // This is the hook called once the previous timeout is ready. var startTimerCommit = react["useRef"](null); var container = react["useRef"](null); react["useEffect"](function () { return function () { clearTimeout(startTimer.current); }; }, []); var startCommit = react["useCallback"](function (params) { var pulsate = params.pulsate, rippleX = params.rippleX, rippleY = params.rippleY, rippleSize = params.rippleSize, cb = params.cb; setRipples(function (oldRipples) { return [].concat(Object(toConsumableArray["a" /* default */])(oldRipples), [/*#__PURE__*/react["createElement"](ButtonBase_Ripple, { key: nextKey.current, classes: classes, timeout: DURATION, pulsate: pulsate, rippleX: rippleX, rippleY: rippleY, rippleSize: rippleSize })]); }); nextKey.current += 1; rippleCallback.current = cb; }, [classes]); var start = react["useCallback"](function () { var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var cb = arguments.length > 2 ? arguments[2] : undefined; var _options$pulsate = options.pulsate, pulsate = _options$pulsate === void 0 ? false : _options$pulsate, _options$center = options.center, center = _options$center === void 0 ? centerProp || options.pulsate : _options$center, _options$fakeElement = options.fakeElement, fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement; if (event.type === 'mousedown' && ignoringMouseDown.current) { ignoringMouseDown.current = false; return; } if (event.type === 'touchstart') { ignoringMouseDown.current = true; } var element = fakeElement ? null : container.current; var rect = element ? element.getBoundingClientRect() : { width: 0, height: 0, left: 0, top: 0 }; // Get the size of the ripple var rippleX; var rippleY; var rippleSize; if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) { rippleX = Math.round(rect.width / 2); rippleY = Math.round(rect.height / 2); } else { var _ref = event.touches ? event.touches[0] : event, clientX = _ref.clientX, clientY = _ref.clientY; rippleX = Math.round(clientX - rect.left); rippleY = Math.round(clientY - rect.top); } if (center) { rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even. if (rippleSize % 2 === 0) { rippleSize += 1; } } else { var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2; var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2; rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2)); } // Touche devices if (event.touches) { // check that this isn't another touchstart due to multitouch // otherwise we will only clear a single timer when unmounting while two // are running if (startTimerCommit.current === null) { // Prepare the ripple effect. startTimerCommit.current = function () { startCommit({ pulsate: pulsate, rippleX: rippleX, rippleY: rippleY, rippleSize: rippleSize, cb: cb }); }; // Delay the execution of the ripple effect. startTimer.current = setTimeout(function () { if (startTimerCommit.current) { startTimerCommit.current(); startTimerCommit.current = null; } }, DELAY_RIPPLE); // We have to make a tradeoff with this value. } } else { startCommit({ pulsate: pulsate, rippleX: rippleX, rippleY: rippleY, rippleSize: rippleSize, cb: cb }); } }, [centerProp, startCommit]); var pulsate = react["useCallback"](function () { start({}, { pulsate: true }); }, [start]); var stop = react["useCallback"](function (event, cb) { clearTimeout(startTimer.current); // The touch interaction occurs too quickly. // We still want to show ripple effect. if (event.type === 'touchend' && startTimerCommit.current) { event.persist(); startTimerCommit.current(); startTimerCommit.current = null; startTimer.current = setTimeout(function () { stop(event, cb); }); return; } startTimerCommit.current = null; setRipples(function (oldRipples) { if (oldRipples.length > 0) { return oldRipples.slice(1); } return oldRipples; }); rippleCallback.current = cb; }, []); react["useImperativeHandle"](ref, function () { return { pulsate: pulsate, start: start, stop: stop }; }, [pulsate, start, stop]); return /*#__PURE__*/react["createElement"]("span", Object(esm_extends["a" /* default */])({ className: Object(clsx_m["a" /* default */])(classes.root, className), ref: container }, other), /*#__PURE__*/react["createElement"](esm_TransitionGroup, { component: null, exit: true }, ripples)); }); false ? undefined : void 0; /* harmony default export */ var ButtonBase_TouchRipple = (Object(withStyles["a" /* default */])(styles, { flip: false, name: 'MuiTouchRipple' })( /*#__PURE__*/react["memo"](TouchRipple_TouchRipple))); // CONCATENATED MODULE: ./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js var ButtonBase_styles = { /* Styles applied to the root element. */ root: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', position: 'relative', WebkitTapHighlightColor: 'transparent', backgroundColor: 'transparent', // Reset default value // We disable the focus ring for mouse, touch and keyboard users. outline: 0, border: 0, margin: 0, // Remove the margin in Safari borderRadius: 0, padding: 0, // Remove the padding in Firefox cursor: 'pointer', userSelect: 'none', verticalAlign: 'middle', '-moz-appearance': 'none', // Reset '-webkit-appearance': 'none', // Reset textDecoration: 'none', // So we take precedent over the style of a native element. color: 'inherit', '&::-moz-focus-inner': { borderStyle: 'none' // Remove Firefox dotted outline. }, '&$disabled': { pointerEvents: 'none', // Disable link interactions cursor: 'default' }, '@media print': { colorAdjust: 'exact' } }, /* Pseudo-class applied to the root element if `disabled={true}`. */ disabled: {}, /* Pseudo-class applied to the root element if keyboard focused. */ focusVisible: {} }; /** * `ButtonBase` contains as few styles as possible. * It aims to be a simple building block for creating a button. * It contains a load of style reset and some focus/ripple logic. */ var ButtonBase_ButtonBase = /*#__PURE__*/react["forwardRef"](function ButtonBase(props, ref) { var action = props.action, buttonRefProp = props.buttonRef, _props$centerRipple = props.centerRipple, centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple, children = props.children, classes = props.classes, className = props.className, _props$component = props.component, component = _props$component === void 0 ? 'button' : _props$component, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$disableRipple = props.disableRipple, disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple, _props$disableTouchRi = props.disableTouchRipple, disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi, _props$focusRipple = props.focusRipple, focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple, focusVisibleClassName = props.focusVisibleClassName, onBlur = props.onBlur, onClick = props.onClick, onFocus = props.onFocus, onFocusVisible = props.onFocusVisible, onKeyDown = props.onKeyDown, onKeyUp = props.onKeyUp, onMouseDown = props.onMouseDown, onMouseLeave = props.onMouseLeave, onMouseUp = props.onMouseUp, onTouchEnd = props.onTouchEnd, onTouchMove = props.onTouchMove, onTouchStart = props.onTouchStart, onDragLeave = props.onDragLeave, _props$tabIndex = props.tabIndex, tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, TouchRippleProps = props.TouchRippleProps, _props$type = props.type, type = _props$type === void 0 ? 'button' : _props$type, other = Object(objectWithoutProperties["a" /* default */])(props, ["action", "buttonRef", "centerRipple", "children", "classes", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "onBlur", "onClick", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "onDragLeave", "tabIndex", "TouchRippleProps", "type"]); var buttonRef = react["useRef"](null); function getButtonNode() { // #StrictMode ready return react_dom["findDOMNode"](buttonRef.current); } var rippleRef = react["useRef"](null); var _React$useState = react["useState"](false), focusVisible = _React$useState[0], setFocusVisible = _React$useState[1]; if (disabled && focusVisible) { setFocusVisible(false); } var _useIsFocusVisible = Object(useIsFocusVisible["a" /* default */])(), isFocusVisible = _useIsFocusVisible.isFocusVisible, onBlurVisible = _useIsFocusVisible.onBlurVisible, focusVisibleRef = _useIsFocusVisible.ref; react["useImperativeHandle"](action, function () { return { focusVisible: function focusVisible() { setFocusVisible(true); buttonRef.current.focus(); } }; }, []); react["useEffect"](function () { if (focusVisible && focusRipple && !disableRipple) { rippleRef.current.pulsate(); } }, [disableRipple, focusRipple, focusVisible]); function useRippleHandler(rippleAction, eventCallback) { var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple; return Object(useEventCallback["a" /* default */])(function (event) { if (eventCallback) { eventCallback(event); } var ignore = skipRippleAction; if (!ignore && rippleRef.current) { rippleRef.current[rippleAction](event); } return true; }); } var handleMouseDown = useRippleHandler('start', onMouseDown); var handleDragLeave = useRippleHandler('stop', onDragLeave); var handleMouseUp = useRippleHandler('stop', onMouseUp); var handleMouseLeave = useRippleHandler('stop', function (event) { if (focusVisible) { event.preventDefault(); } if (onMouseLeave) { onMouseLeave(event); } }); var handleTouchStart = useRippleHandler('start', onTouchStart); var handleTouchEnd = useRippleHandler('stop', onTouchEnd); var handleTouchMove = useRippleHandler('stop', onTouchMove); var handleBlur = useRippleHandler('stop', function (event) { if (focusVisible) { onBlurVisible(event); setFocusVisible(false); } if (onBlur) { onBlur(event); } }, false); var handleFocus = Object(useEventCallback["a" /* default */])(function (event) { // Fix for https://github.com/facebook/react/issues/7769 if (!buttonRef.current) { buttonRef.current = event.currentTarget; } if (isFocusVisible(event)) { setFocusVisible(true); if (onFocusVisible) { onFocusVisible(event); } } if (onFocus) { onFocus(event); } }); var isNonNativeButton = function isNonNativeButton() { var button = getButtonNode(); return component && component !== 'button' && !(button.tagName === 'A' && button.href); }; /** * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat */ var keydownRef = react["useRef"](false); var handleKeyDown = Object(useEventCallback["a" /* default */])(function (event) { // Check if key is already down to avoid repeats being counted as multiple activations if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') { keydownRef.current = true; event.persist(); rippleRef.current.stop(event, function () { rippleRef.current.start(event); }); } if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') { event.preventDefault(); } if (onKeyDown) { onKeyDown(event); } // Keyboard accessibility for non interactive elements if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) { event.preventDefault(); if (onClick) { onClick(event); } } }); var handleKeyUp = Object(useEventCallback["a" /* default */])(function (event) { // calling preventDefault in keyUp on a