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xBnhD,EAAQ+iD,gBAAkBA,gBAC1B/iD,EAAQ4iD,kBAAoBA,kBAC5B9iD,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,KAvMTmjD,CA0MuB3C,EAAuBzgD,QA1M7B,I","sources":["/app/apps/respweb/node_modules/@sm/apollo-clients/dist/browser.js","/app/apps/respweb/node_modules/@sm/intl/dist/formats.js","/app/apps/respweb/node_modules/@sm/intl/dist/index.js","/app/apps/respweb/node_modules/@sm/locale/dist/dataCenters.js","/app/apps/respweb/node_modules/@sm/locale/dist/index.js","/app/apps/respweb/node_modules/@sm/locale/dist/languages.js","/app/apps/respweb/node_modules/@sm/locale/dist/localeSets.js","/app/apps/respweb/node_modules/@sm/metrics/dist/BaseMetricsTracker.js","/app/apps/respweb/node_modules/@sm/metrics/dist/MetricsTracker.js","/app/apps/respweb/node_modules/@sm/metrics/dist/helpers.js","/app/apps/respweb/node_modules/@sm/metrics/dist/index.js","/app/apps/respweb/node_modules/@sm/metrics/dist/providers/ComponentMetricsProvider.js","/app/apps/respweb/node_modules/@sm/metrics/dist/providers/PageMetricsProvider.js","/app/apps/respweb/node_modules/@sm/metrics/dist/providers/SPARouteMetricsProvider.js","/app/apps/respweb/node_modules/@sm/metrics/dist/subscribers/AmplitudeSubscriber.js","/app/apps/respweb/node_modules/@sm/metrics/dist/subscribers/DataAnalyticsMetricsSubscriber.js","/app/apps/respweb/node_modules/@sm/metrics/dist/subscribers/FacebookPixelSubscriber.js","/app/apps/respweb/node_modules/@sm/metrics/dist/subscribers/GTMMeticsSubscriber.js","/app/apps/respweb/node_modules/@sm/metrics/dist/subscribers/LoggingMetricsSubscriber.js","/app/apps/respweb/node_modules/@sm/metrics/dist/subscribers/MixPanelSubscriber.js","/app/apps/respweb/node_modules/@sm/metrics/dist/types/enums.js","/app/apps/respweb/node_modules/@sm/metrics/dist/utils.js","/app/apps/respweb/node_modules/@sm/question-ui/node_modules/@wds/utils/dist/index.es.js","/app/apps/respweb/node_modules/@sm/utils/dist/S3Uploader/S3Uploader.js","/app/apps/respweb/node_modules/@sm/utils/dist/environment/index.js","/app/apps/respweb/node_modules/@sm/utils/dist/index.js","/app/apps/respweb/node_modules/@sm/utils/dist/object/deepFreeze.js","/app/apps/respweb/node_modules/@sm/utils/dist/string/isValidEmail.js","/app/apps/respweb/node_modules/@sm/utils/dist/string/sanitizeString.js","/app/apps/respweb/node_modules/@sm/utils/dist/url/createURL.js","/app/apps/respweb/node_modules/@sm/question-definitions/esm/index.js","/app/apps/respweb/node_modules/@sm/question-ui/theme-respondent.js","/app/apps/respweb/node_modules/@sm/question-widgets/utils-fc914b8b.js","/app/apps/respweb/node_modules/@sm/question-ui/vendor-1a792cb6.js","/app/apps/respweb/node_modules/@sm/question-ui/respondent-quiz-results.js","/app/apps/respweb/node_modules/@sm/question-widgets/controllers-f58b7b59.js","/app/apps/respweb/node_modules/@sm/question-widgets/respondent-quiz-results.js","/app/apps/respweb/node_modules/@sm/question-widgets/utils-c442d71f.js","/app/apps/respweb/node_modules/@sm/question-ui/vendor-5c6709b4.js","/app/apps/respweb/node_modules/@sm/question-ui/respondent-survey.js","/app/apps/respweb/node_modules/@sm/question-widgets/controllers-bbf80d91.js","/app/apps/respweb/node_modules/@sm/question-widgets/respondent-survey.js","/app/apps/respweb/node_modules/@sm/question-widgets/vendor-4368c290.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createBrowserApolloClient;\n\nvar _apolloClient = _interopRequireDefault(require(\"apollo-client\"));\n\nvar _apolloLinkBatchHttp = require(\"apollo-link-batch-http\");\n\nvar _apolloCacheInmemory = require(\"apollo-cache-inmemory\");\n\nvar _apolloLink = require(\"apollo-link\");\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar DEFAULT_TARGET_PATH = 'default';\nvar DEFAULT_LINK_OPTIONS = {\n credentials: 'include',\n batchInterval: 30\n};\n\nfunction createBrowserApolloClient(_ref) {\n var fragmentMatcherFn = _ref.fragmentMatcherFn,\n metadata = _ref.metadata,\n pageRequestId = _ref.pageRequestId,\n _ref$cacheHydration = _ref.cacheHydration,\n cacheHydration = _ref$cacheHydration === void 0 ? {} : _ref$cacheHydration,\n _ref$uri = _ref.uri,\n uri = _ref$uri === void 0 ? '/graphql' : _ref$uri,\n _ref$linkOptions = _ref.linkOptions,\n linkOptions = _ref$linkOptions === void 0 ? {} : _ref$linkOptions,\n _ref$devToolsEnabled = _ref.devToolsEnabled,\n devToolsEnabled = _ref$devToolsEnabled === void 0 ? true : _ref$devToolsEnabled,\n _ref$availableLoggedO = _ref.availableLoggedOutPaths,\n availableLoggedOutPaths = _ref$availableLoggedO === void 0 ? [] : _ref$availableLoggedO,\n authLink = _ref.authLink;\n var appName = metadata.appName,\n appVersion = metadata.appVersion;\n var cache = new _apolloCacheInmemory.InMemoryCache({\n fragmentMatcher: fragmentMatcherFn && fragmentMatcherFn()\n }).restore(cacheHydration);\n\n var _linkOptions$headers = linkOptions.headers,\n headers = _linkOptions$headers === void 0 ? {} : _linkOptions$headers,\n otherLinkOptions = _objectWithoutProperties(linkOptions, [\"headers\"]);\n\n if (pageRequestId) {\n headers['sm-page-request-id'] = pageRequestId;\n }\n\n var apolloLinkMemoizeCache = {};\n\n function apolloLinkFactory() {\n var targetPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_TARGET_PATH;\n\n if (apolloLinkMemoizeCache[targetPath]) {\n return apolloLinkMemoizeCache[targetPath];\n }\n\n var link = new _apolloLinkBatchHttp.BatchHttpLink(_objectSpread({}, DEFAULT_LINK_OPTIONS, {}, otherLinkOptions, {\n uri: targetPath,\n headers: headers\n }));\n\n if (authLink && targetPath === '/graphql') {\n link = authLink.concat(link);\n }\n\n apolloLinkMemoizeCache[targetPath] = link;\n return link;\n } // custom apollo-link that determines the actual link to use based on the passed\n // `targetPath` context.\n\n\n var link = new _apolloLink.ApolloLink(function (operation) {\n var _operation$getContext, _operation$getContext2; // if the targetPath is not the default, use an alternate graphql endpoint.\n\n\n var targetPath = operation === null || operation === void 0 ? void 0 : (_operation$getContext = operation.getContext) === null || _operation$getContext === void 0 ? void 0 : (_operation$getContext2 = _operation$getContext.call(operation)) === null || _operation$getContext2 === void 0 ? void 0 : _operation$getContext2.targetPath;\n var graphQLPath = uri;\n\n if (availableLoggedOutPaths.includes(targetPath)) {\n // whitelist for security\n graphQLPath = targetPath;\n }\n\n return apolloLinkFactory(graphQLPath).request(operation) || _apolloLink.Observable.of();\n });\n return new _apolloClient.default({\n connectToDevTools: devToolsEnabled,\n cache: cache,\n link: link,\n name: appName,\n version: appVersion\n });\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _utils = require(\"@sm/utils\");\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar _getClientEnvironment = (0, _utils.getClientEnvironmentDetails)(),\n isBrowser = _getClientEnvironment.isBrowser;\n\nvar currency = ['AFN', 'EUR', 'ALL', 'DZD', 'USD', 'AOA', 'XCD', 'ARS', 'AMD', 'AWG', 'AUD', 'AZN', 'BSD', 'BHD', 'BDT', 'BBD', 'BYN', 'BZD', 'XOF', 'BMD', 'INR', 'BTN', 'BOB', 'BOV', 'BAM', 'BWP', 'NOK', 'BRL', 'BND', 'BGN', 'BIF', 'CVE', 'KHR', 'XAF', 'CAD', 'KYD', 'CLP', 'CLF', 'CNY', 'COP', 'COU', 'KMF', 'CDF', 'NZD', 'CRC', 'HRK', 'CUP', 'CUC', 'ANG', 'CZK', 'DKK', 'DJF', 'DOP', 'EGP', 'SVC', 'ERN', 'ETB', 'FKP', 'FJD', 'XPF', 'GMD', 'GEL', 'GHS', 'GIP', 'GTQ', 'GBP', 'GNF', 'GYD', 'HTG', 'HNL', 'HKD', 'HUF', 'ISK', 'IDR', 'XDR', 'IRR', 'IQD', 'ILS', 'JMD', 'JPY', 'JOD', 'KZT', 'KES', 'KPW', 'KRW', 'KWD', 'KGS', 'LAK', 'LBP', 'LSL', 'ZAR', 'LRD', 'LYD', 'CHF', 'MOP', 'MKD', 'MGA', 'MWK', 'MYR', 'MVR', 'MRO', 'MUR', 'XUA', 'MXN', 'MXV', 'MDL', 'MNT', 'MAD', 'MZN', 'MMK', 'NAD', 'NPR', 'NIO', 'NGN', 'OMR', 'PKR', 'PAB', 'PGK', 'PYG', 'PEN', 'PHP', 'PLN', 'QAR', 'RON', 'RUB', 'RWF', 'SHP', 'WST', 'STD', 'SAR', 'RSD', 'SCR', 'SLL', 'SGD', 'XSU', 'SBD', 'SOS', 'SSP', 'LKR', 'SDG', 'SRD', 'SZL', 'SEK', 'CHE', 'CHW', 'SYP', 'TWD', 'TJS', 'TZS', 'THB', 'TOP', 'TTD', 'TND', 'TRY', 'TMT', 'UGX', 'UAH', 'AED', 'USN', 'UYU', 'UYI', 'UZS', 'VUV', 'VEF', 'VND', 'YER', 'ZMW', 'ZWL', 'XBA', 'XBB', 'XBC', 'XBD', 'XTS', 'XXX', 'XAU', 'XPD', 'XPT', 'XAG'];\n/** List of supported currencies */\n\nvar numberFormat = currency.reduce(function (acc, key) {\n return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, key, {\n style: 'currency',\n currency: key\n }));\n}, {});\nvar dateTimeFormat;\n\nif (isBrowser) {\n var browserTimezone = 'UTC';\n\n try {\n browserTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n dateTimeFormat = {\n timeZone: browserTimezone\n };\n } catch (err) {\n // We're throwing in a settimeout because we don't want to break the current tick.\n window.setTimeout(function () {\n throw err;\n }, 1);\n }\n}\n\nvar _default = {\n number: numberFormat,\n dateTime: dateTimeFormat,\n relativeTime: undefined\n};\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.clearOptionsObject = clearOptionsObject;\nexports.substitute = substitute;\nexports.defineMessages = defineMessages;\nexports.t = t;\nexports.T = T;\nexports.initIntl = initIntl;\nexports.resetMessageStore = resetMessageStore;\nexports.getMessageStore = getMessageStore;\nexports.FormattedDateTime = FormattedDateTime;\nexports.FormattedNumber = FormattedNumber;\nexports.FormattedRelativeTime = FormattedRelativeTime;\nexports.L10nProvider = exports.L10NContext = void 0;\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _intlMessageformat = _interopRequireDefault(require(\"intl-messageformat\"));\n\nvar _escapeHtml = _interopRequireDefault(require(\"escape-html\"));\n\nvar _invariant = _interopRequireDefault(require(\"invariant\"));\n\nvar _lodash = _interopRequireDefault(require(\"lodash.merge\"));\n\nvar _utils = require(\"@sm/utils\");\n\nvar _locale = require(\"@sm/locale\");\n\nvar _intlRelativeformat = _interopRequireDefault(require(\"intl-relativeformat\"));\n\nvar _formats = _interopRequireDefault(require(\"./formats\"));\n\nvar _excluded = [\"value\"],\n _excluded2 = [\"value\"];\nvar _jsxFileName = \"/repo/packages/intl/src/index.tsx\";\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\n\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj.default = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nvar _getClientEnvironment = (0, _utils.getClientEnvironmentDetails)(),\n isBrowser = _getClientEnvironment.isBrowser;\n\nvar INTL_OPT_KEY = 'SM_intlUniqueOptionsObjectKey';\nvar INTL_MSG_STORE_KEY = 'SM_intlUniqueMessageStoreObjectKey';\n/** Intl Options */\n\nfunction getDefaultOptions() {\n return {\n currentLocale: null,\n // Current locale such as 'en-US' - `null` is not allowed for IntlMessageFormat and needs to be set\n warningHandler: console.warn.bind(console),\n // eslint-disable-line\n escapeHtml: true // disable escape html in variable mode\n\n };\n}\n\nfunction getStore() {\n var glob = isBrowser ? window : global;\n\n if (!glob[INTL_MSG_STORE_KEY]) {\n glob[INTL_MSG_STORE_KEY] = {};\n }\n\n return glob[INTL_MSG_STORE_KEY];\n}\n\nfunction getOptionsObject() {\n var glob = isBrowser ? window : global;\n\n if (!glob[INTL_OPT_KEY]) {\n glob[INTL_OPT_KEY] = getDefaultOptions();\n }\n\n return glob[INTL_OPT_KEY];\n}\n\nfunction clearOptionsObject() {\n if (isBrowser) {\n delete window[INTL_OPT_KEY];\n } else {\n delete global[INTL_OPT_KEY];\n }\n}\n\nvar intlRelativeFormat;\n/**\n * @param {string} input\n * @returns {string} hash\n * @private\n */\n\nfunction hashInput(input) {\n var hash = 0;\n var i;\n var chr;\n if (input.length === 0) return hash;\n\n for (i = 0; i < input.length; i += 1) {\n chr = input.charCodeAt(i);\n hash = (hash << 5) - hash + chr; // eslint-disable-line no-bitwise\n // Convert to 32bit integer\n\n hash |= 0; // eslint-disable-line no-bitwise\n }\n\n return hash;\n}\n\nvar randomStr = function randomStr(N) {\n return _toConsumableArray(Array(N)).map(function () {\n return (~~(Math.random() * 36)).toString(36);\n }).join('');\n}; // eslint-disable-line no-bitwise\n\n\nvar keysOf = Object.keys;\n\nvar maybePseudo = function maybePseudo(msg) {\n if (process.env.NODE_ENV !== \"production\" && isBrowser) {\n var pseudoFactor = window.location.href.toString().match(/[&?]intl-pseudo(=([0-9]*\\.[0-9]+|[0-9]+))?/);\n\n if (pseudoFactor) {\n return msg.replace(/\\S+/g, function (match) {\n return randomStr(parseInt(\"\".concat(match.length * parseFloat(\"\".concat(pseudoFactor[2] || 1))), 10) || 1);\n });\n }\n }\n\n return msg;\n};\n\nvar replacer = function replacer(elements) {\n return function (part) {\n var element = elements[part];\n return element || maybePseudo(part);\n };\n};\n/** `string` type-guard including check for `instanceof` */\n// work-around as TS does not infer type string for instanceof\n\n\nvar isString = function isString(s) {\n return typeof s === 'string' || s instanceof String;\n};\n/**\n *\n * @param {string} message\n * @param {Object} variables (Optional)\n * @returns {Object} The substitution\n */\n\n\nfunction substitute(message, variables) {\n var vars = _objectSpread({}, variables);\n\n var msg = message;\n var options = getOptionsObject();\n var uid = Math.abs(hashInput(JSON.stringify({\n msg: msg,\n keys: keysOf(vars)\n }))).toString(16);\n var tokenDelimiter = \"@__\".concat(uid, \"__@\");\n var tokenizedValues = {};\n var elements = {};\n\n var generateToken = function () {\n var counter = 0;\n return function () {\n counter += 1;\n return \"ELEMENT-\".concat(uid, \"-\").concat(counter);\n };\n }();\n\n keysOf(vars).forEach(function (name) {\n var value = vars[name];\n\n if ( /*#__PURE__*/_react.default.isValidElement(value)) {\n var token = generateToken();\n tokenizedValues[name] = tokenDelimiter + token + tokenDelimiter;\n elements[token] = value;\n } else if (options.escapeHtml === true && isString(value) && value.indexOf('<') >= 0 && value.indexOf('>') >= 0) {\n tokenizedValues[name] = (0, _escapeHtml.default)(value);\n } else {\n // `React.isValidElement` matches `React.ReactElement` so its type can be omitted\n tokenizedValues[name] = value;\n }\n });\n\n try {\n var msgFormatter = new _intlMessageformat.default(msg, options.currentLocale, options.formats);\n msg = msgFormatter.format(tokenizedValues);\n } catch (err) {\n options.warningHandler({\n context: 'sm/intl',\n error: 'message_formatting_error',\n err: err,\n msg: msg,\n tokenizedValues: tokenizedValues,\n vars: vars,\n currentLocale: options.currentLocale\n });\n return msg;\n }\n\n try {\n var stack = [];\n var exhausted = false;\n var runningIndex = 0;\n\n while (!exhausted) {\n // The runningIndex is the pointer in the string at which we want to look right (->).\n var match = msg.substr(runningIndex).match(/]+)\">|<\\/span>/);\n\n if (match) {\n // eslint-disable-next-line prefer-const\n var _ref = match,\n _ref2 = _slicedToArray(_ref, 2),\n matched = _ref2[0],\n tag = _ref2[1]; // we need to adjust for the running index because match.index is relative to the substring we used\n\n\n var matchIndex = (match.index || 0) + runningIndex;\n var isOpening = !!tag;\n\n if (isOpening) {\n // If it's an opening tag, just push it on the stack and move on.\n stack.push({\n tag: tag,\n index: matchIndex\n });\n runningIndex = matchIndex + matched.length;\n } else {\n // We reached an ending tag.\n var popped = stack.pop();\n\n if (!popped) {\n options.warningHandler({\n context: 'sm/intl',\n error: 'unbalanced_delimiters_extra_closing',\n message: message,\n tokenizedValues: tokenizedValues,\n vars: vars\n });\n return message;\n }\n\n runningIndex = popped.index; // Find the content between the opening tag and the current one\n\n var content = msg.substring(runningIndex, matchIndex).replace(/]+)\">/, '').replace(/<\\span>/, '');\n var children = void 0; // If there are other functional elements saved already, try to split\n // the content and replace them with the right elements.\n\n if (elements && keysOf(elements).length > 0) {\n children = content.split(tokenDelimiter).filter(function (part) {\n return !!part;\n }).map(replacer(elements));\n } else {\n children = content;\n } // Build an element by cloning the passed element or calling the\n // passed function.\n\n\n var element = vars[popped.tag]({\n children: children\n });\n\n if ( /*#__PURE__*/_react.default.isValidElement(element)) {\n element = /*#__PURE__*/_react.default.cloneElement(element, {\n key: \"\".concat(popped.tag, \"_\").concat(randomStr(8))\n });\n } // Build the new string and adjust the running index based on that token.\n\n\n var token = generateToken();\n var tokenReplacement = \"\".concat(tokenDelimiter).concat(token).concat(tokenDelimiter);\n msg = \"\".concat(msg.substring(0, popped.index)).concat(tokenReplacement).concat(msg.substring(matchIndex + matched.length, msg.length));\n elements[token] = element;\n }\n } else {\n exhausted = true;\n }\n }\n\n if (stack.length) {\n options.warningHandler({\n context: 'sm/intl',\n error: 'unbalanced_delimiters_extra_opening',\n message: message,\n tokenizedValues: tokenizedValues,\n vars: vars\n });\n return message;\n } // Do a final replace once we're done with matching\n\n\n if (elements && keysOf(elements).length > 0) {\n msg = msg.split(tokenDelimiter).filter(function (part) {\n return !!part;\n }).map(replacer(elements));\n } else {\n msg = maybePseudo(msg);\n }\n\n return msg;\n } catch (err) {\n options.warningHandler({\n context: 'sm/intl',\n error: 'unexpected_tokenization_error',\n message: message,\n err: err\n });\n return message;\n }\n}\n/**\n * Retrieves and format a particular message by key. Uses defaultMessage if key is not found in message list.\n * @param {string} key Unique identifier for this string\n * @param {Object} variables (Optional) - Key/values for string substitution\n * @param {string} defaultMessage (Optional) Default message if string isn't found for key\n * @private\n */\n\n\nfunction get(key, variables, defaultMessage) {\n var vars = variables;\n !key ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'key is required') : invariant(false) : void 0;\n\n var _getOptionsObject = getOptionsObject(),\n currentLocale = _getOptionsObject.currentLocale,\n warningHandler = _getOptionsObject.warningHandler;\n\n var messages = getStore()[currentLocale];\n var msg;\n\n if (!messages) {\n warningHandler({\n context: 'sm/intl',\n error: 'locale_not_found_in_message_store',\n currentLocale: currentLocale\n });\n msg = defaultMessage || '';\n }\n\n msg = msg || messages[key];\n\n if (!msg && defaultMessage) {\n if (currentLocale !== 'en-US') {\n warningHandler({\n context: 'sm/intl',\n error: 'message_not_found_default_fallback',\n currentLocale: currentLocale,\n key: key\n });\n }\n\n msg = defaultMessage;\n }\n\n if (!msg) {\n warningHandler({\n context: 'sm/intl',\n error: 'message_not_found_no_default',\n currentLocale: currentLocale,\n key: key,\n defaultMessage: defaultMessage\n });\n return '';\n }\n\n return substitute(msg, vars);\n}\n/**\n * @param {string} key\n * @param {Object} variables\n * @param {string} defaultMessage\n * @returns {string} html\n * @private\n */\n\n\nfunction getHTML(key, variables, defaultMessage) {\n var msg = get(key, variables, defaultMessage);\n\n if (msg) {\n var el = /*#__PURE__*/_react.default.createElement('span', {\n dangerouslySetInnerHTML: {\n __html: msg\n }\n }); // when key exists, it should still return element if there's defaultMessage() after getHTML()\n\n\n var defaultMsg = function defaultMsg() {\n return el;\n };\n\n return _objectSpread({\n defaultMessage: defaultMsg,\n d: defaultMsg\n }, el);\n }\n\n return '';\n}\n/**\n *\n * @param {string} currentLocale\n * @param {string} currentLanguage\n * @private\n */\n\n\nfunction defineIntlRelativeFormat(currentLocale, currentLanguage) {\n if (window.ReactIntlLocaleData && window.ReactIntlLocaleData[currentLanguage] && Object.keys(window.ReactIntlLocaleData[currentLanguage]).length > 0) {\n window.ReactIntlLocaleData[currentLanguage].forEach(function (localeData) {\n _intlRelativeformat.default.__addLocaleData(localeData);\n });\n }\n\n intlRelativeFormat = new _intlRelativeformat.default(currentLocale, _objectSpread({}, _formats.default.relativeTime || {}));\n} // =================== Public API\n\n/**\n * Definition function used by our babel-plugin to extract messages during development.\n * For the description, Type must have one of the following values `Button | Link | Label | Header | Paragraph`. Vis, for visibility, must be one of `low | med | high`.\n *\n * More in the {@link https://code.corp.surveymonkey.com/pages/webplatform/smweb/#/pages/webs/localization?id=definemessages|WebPlatform docs}\n *\n * @param {Object} v Key/Descriptor objects where Descriptor.id, Descriptor.defaultMessage and Descriptor.description are present.\n * @returns {Object} message definition\n *\n */\n\n\nfunction defineMessages(v) {\n return v;\n}\n/**\n * Translates a message matching a specific Descriptor object.\n * Ref: https://code.corp.surveymonkey.com/pages/webplatform/smweb/#/pages/webs/localization\n *\n * @param {Desc} desc Descriptor object for the current message to translate. ({id: String!, defaultMessage: String!, description: String})\n * @param {Object} values (Optional) - key/values for substitution based on the ICU message format.\n * @param {Object} opts (Optional)\n * @param {Object} opts.html (Optional/Defaults to `false`) - Whether or not to allow for HTML nodes in the message before substitution.\n * @returns {string|React.ReactElement} HTML string or key value\n */\n\n\nfunction t(desc, values) {\n var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var id = desc.id,\n defaultMessage = desc.defaultMessage;\n var html = opts.html;\n return (html ? getHTML : get)(id, values, defaultMessage); // force return type\n}\n/** Props for `T` React component */\n\n/**\n * (React Component) Translates a message matching a specific Descriptor object.\n * Ref: https://code.corp.surveymonkey.com/pages/webplatform/smweb/#/pages/webs/localization\n */\n\n\nfunction T(props) {\n var desc = props.desc,\n values = props.values,\n id = props.id,\n defaultMessage = props.defaultMessage,\n html = props.html;\n return (html ? getHTML : get)(desc ? desc.id : id, values, desc ? desc.defaultMessage : defaultMessage);\n}\n\nT.propTypes = {\n desc: _propTypes.default.shape({\n id: _propTypes.default.string.isRequired,\n defaultMessage: _propTypes.default.string.isRequired,\n description: _propTypes.default.string\n }),\n id: _propTypes.default.string,\n values: _propTypes.default.objectOf(_propTypes.default.any),\n defaultMessage: _propTypes.default.string,\n html: _propTypes.default.bool\n};\nT.defaultProps = {\n desc: undefined,\n id: undefined,\n values: undefined,\n defaultMessage: undefined,\n html: false\n};\n/**\n * Initialize the localization framework with the passed messages and set of currentLocale/currentLanguage. Can be called more than once.\n * @param {Object} messages Key/Values where keys are string IDs and values are the translated message for such ID.\n * @param {Options} [opts={}] Options for Intl\n * @returns {void}\n */\n\nfunction initIntl(\n/** Key/Values where keys are string IDs and values are the translated message for such ID */\nmessages) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n !opts.currentLocale ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'opts.currentLocale is required') : invariant(false) : void 0;\n !opts.currentLanguage ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'opts.currentLanguage is required') : invariant(false) : void 0;\n !messages ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'messages is required') : invariant(false) : void 0;\n var options = getOptionsObject();\n options.currentLocale = opts.currentLocale;\n options.currentLanguage = opts.currentLanguage;\n options.warningHandler = opts.warningHandler || options.warningHandler;\n var messageStore = getStore();\n var langInited = !!messageStore[options.currentLocale];\n (0, _lodash.default)(messageStore, _defineProperty({}, options.currentLocale, messages));\n options.formats = _objectSpread(_objectSpread(_objectSpread({}, options.formats), opts.formats), _formats.default);\n\n if (langInited) {\n return;\n }\n\n if (isBrowser) {\n defineIntlRelativeFormat(options.currentLocale, options.currentLanguage);\n } else {\n // For Node.js, common locales are added in the application\n intlRelativeFormat = new _intlRelativeformat.default(options.currentLocale, _objectSpread({}, _formats.default.relativeTime || {}));\n }\n}\n/**\n * Clears the object where we store messages. Useful for testing\n * @returns {undefined}\n */\n\n\nfunction resetMessageStore() {\n var messageStore = getStore();\n Object.keys(messageStore).forEach(function (member) {\n return delete messageStore[member];\n });\n}\n/**\n * Retrieves a copy of the stored messages.\n * @returns {JSON} JSON Message Store\n */\n\n\nfunction getMessageStore() {\n return JSON.parse(JSON.stringify(getStore()));\n}\n/**\n * The FormattedDateTime component uses the Intl.DateTimeFormat API and as such, here are the supported props.\n * All optionals.\n *\n * type DateTimeFormatOptions = {\n * localeMatcher: 'best fit' | 'lookup' = 'best fit',\n * formatMatcher: 'basic' | 'best fit' = 'best fit',\n *\n * timeZone: string,\n * hour12 : boolean,\n *\n * weekday : 'narrow' | 'short' | 'long',\n * era : 'narrow' | 'short' | 'long',\n * year : 'numeric' | '2-digit',\n * month : 'numeric' | '2-digit' | 'narrow' | 'short' | 'long',\n * day : 'numeric' | '2-digit',\n * hour : 'numeric' | '2-digit',\n * minute : 'numeric' | '2-digit',\n * second : 'numeric' | '2-digit',\n * timeZoneName: 'short' | 'long',\n * };\n *\n * @param {Date} props Actual date to format.\n * @returns {string} formatted date\n */\n\n\nfunction FormattedDateTime(props) {\n var _options$currentLocal;\n\n var value = props.value,\n restProps = _objectWithoutProperties(props, _excluded);\n\n var options = getOptionsObject();\n return new Intl.DateTimeFormat((_options$currentLocal = options.currentLocale) !== null && _options$currentLocal !== void 0 ? _options$currentLocal : undefined, _objectSpread(_objectSpread({}, _formats.default.dateTime || {}), restProps)).format(value);\n}\n/**\n * The FormattedNumber component uses the Intl.NumberFormat API and as such, here are the supported props.\n * All optionals.\n *\n * type NumberFormatOptions = {\n * localeMatcher: 'best fit' | 'lookup' = 'best fit',\n *\n * style: 'decimal' | 'currency' | 'percent' = 'decimal',\n *\n * currency : string,\n * currencyDisplay: 'symbol' | 'code' | 'name' = 'symbol',\n *\n * useGrouping: boolean = true,\n *\n * minimumIntegerDigits : number = 1,\n * minimumFractionDigits : number,\n * maximumFractionDigits : number,\n * minimumSignificantDigits: number = 1,\n * maximumSignificantDigits: number,\n * };\n *\n * @param {number} props Actual number to format.\n * @returns {string} Formatted number\n */\n\n\nfunction FormattedNumber(props) {\n var _options$currentLocal2;\n\n var value = props.value,\n restProps = _objectWithoutProperties(props, _excluded2);\n\n var options = getOptionsObject();\n restProps.style = restProps.formatStyle;\n return new Intl.NumberFormat((_options$currentLocal2 = options.currentLocale) !== null && _options$currentLocal2 !== void 0 ? _options$currentLocal2 : undefined, _objectSpread(_objectSpread({}, _formats.default.number || {}), restProps)).format(value);\n}\n/**\n * The FormattedRelativeTime component uses the IntlRelativeTime API and as such, here are the supported props.\n * All optionals.\n *\n * type RelativeTimeFormatOptions = {\n * units: 'second' | 'second-short' | 'minute' | 'minute-short' | 'hour' | 'hour-short' | 'day' | 'day-short' | 'month' | 'month-short' | 'year' | 'year-short'\n * style: 'best fit' | 'numeric'\n * };\n *\n * @param {Object} props\n * @param {Date} props.value Actual date to format.\n * @param {Date} props.now (Optional) Fix the value of \"now\" to a certain date.\n * @returns {string} Formatted date\n */\n\n\nfunction FormattedRelativeTime(props) {\n var value = props.value,\n now = props.now;\n return intlRelativeFormat.format(value, {\n now: now\n });\n}\n/** Context is currently only used to prevent isRTL prop drilling */\n\n\nvar L10NContext = /*#__PURE__*/(0, _react.createContext)({\n isRTL: false\n});\nexports.L10NContext = L10NContext;\n\nvar RTLLanguageCodes = _locale.LANGUAGES.filter(function (l) {\n return l.isRTL;\n}).map(function (l) {\n return l.code;\n});\n/**\n * Configures the global localization context for the whole page.\n * @class\n */\n\n\nvar L10nProvider = /*#__PURE__*/function (_React$Component) {\n _inherits(L10nProvider, _React$Component);\n\n var _super = _createSuper(L10nProvider);\n\n function L10nProvider(props) {\n var _this;\n\n _classCallCheck(this, L10nProvider);\n\n _this = _super.call(this, props);\n _this.state = {\n messages: null,\n isRTL: false\n };\n var currentLocale = props.localeCode;\n var currentLanguage = props.languageCode; // If the locale is english, we are not expecting any messages; hence, default to {}\n\n _this.state.messages = _this.getMessages();\n /**\n * `SSR/isNode` - Initialize Intl on the server with the provided messages (if any).\n * `messages ` - We already have the messages (SSR/CSR/en-US), initIntl right away.\n *\n * The above takes care of three scenarios -\n * 1. SSR - Everything is provided on the server; hence, no need to fetch messages.\n * 2. CSR + messages - Messages were fetched before this component; hence, no need to fetch messages.\n * 3. In the case of `en-US`, we really don't need messages.\n */\n\n var _getClientEnvironment2 = (0, _utils.getClientEnvironmentDetails)(),\n isNode = _getClientEnvironment2.isNode;\n\n if (isNode || _this.state.messages) {\n initIntl(_this.state.messages, {\n currentLocale: currentLocale,\n currentLanguage: currentLanguage\n });\n }\n\n if (RTLLanguageCodes.indexOf(currentLanguage) !== -1) {\n _this.state.isRTL = true;\n }\n\n return _this;\n }\n\n _createClass(L10nProvider, [{\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n // Update text-direction\n if (prevProps.languageCode !== this.props.languageCode) {\n var isRTL = RTLLanguageCodes.indexOf(this.props.languageCode) !== -1;\n\n if (isRTL !== this.state.isRTL) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(function () {\n return {\n isRTL: isRTL\n };\n });\n }\n } // Update messages at runtime is not yet implemented\n\n }\n /** Picks the correct localized messages */\n\n }, {\n key: \"getMessages\",\n value: function getMessages() {\n return this.props.localeCode === 'en-US' ? {} : this.props.localeMessages || {};\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!this.state.messages) {\n return null;\n }\n\n return /*#__PURE__*/_react.default.createElement(L10NContext.Provider, {\n value: {\n isRTL: this.state.isRTL\n },\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 869,\n columnNumber: 7\n }\n }, this.props.children);\n }\n }]);\n\n return L10nProvider;\n}(_react.default.Component);\n\nexports.L10nProvider = L10nProvider;\nL10nProvider.propTypes = {\n children: _propTypes.default.node.isRequired,\n localeMessages: _propTypes.default.object,\n // eslint-disable-line\n localeCode: _propTypes.default.string,\n languageCode: _propTypes.default.string\n};\nL10nProvider.defaultProps = {\n localeCode: 'en-US',\n languageCode: 'en'\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getDataCenterById = getDataCenterById;\nexports.getDataCenterIdFromCurrentUrl = getDataCenterIdFromCurrentUrl;\nexports.getDefaultSubdomainForDataCenter = getDefaultSubdomainForDataCenter;\nexports.DC_SPECIFIC_SUBDOMAINS = exports.DataCenterIds = void 0;\n\nvar _parseDomain = require(\"parse-domain\");\n\nvar _dataCenters = _interopRequireDefault(require(\"./data/dataCenters.json\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nvar DataCenterIds;\nexports.DataCenterIds = DataCenterIds;\n\n(function (DataCenterIds) {\n DataCenterIds[\"US\"] = \"0\";\n DataCenterIds[\"CA\"] = \"1\";\n DataCenterIds[\"EU\"] = \"2\";\n})(DataCenterIds || (exports.DataCenterIds = DataCenterIds = {}));\n\nvar DC_SPECIFIC_SUBDOMAINS;\n/**\n * Returns the data center by id\n * @param {string} dataCenterId\n * @returns {Object} data center details\n * @memberof module:@sm/locale\n */\n\nexports.DC_SPECIFIC_SUBDOMAINS = DC_SPECIFIC_SUBDOMAINS;\n\n(function (DC_SPECIFIC_SUBDOMAINS) {\n DC_SPECIFIC_SUBDOMAINS[DC_SPECIFIC_SUBDOMAINS[\"eu\"] = DataCenterIds.EU] = \"eu\";\n})(DC_SPECIFIC_SUBDOMAINS || (exports.DC_SPECIFIC_SUBDOMAINS = DC_SPECIFIC_SUBDOMAINS = {}));\n\nfunction getDataCenterById(dataCenterId) {\n return _dataCenters.default.dataCenters[dataCenterId];\n}\n/**\n * Returns the data center id from the url\n * @param {string} url\n * @param {string} dataCenterAffinityCookie\n * @returns {string} data center id\n * @memberof module:@sm/locale\n */\n\n\nfunction getDataCenterIdFromCurrentUrl(url, dataCenterAffinityCookie) {\n var parseResult = (0, _parseDomain.parseDomain)((0, _parseDomain.fromUrl)(url)) || {};\n var subdomain;\n var dataCenterId = DataCenterIds.US;\n\n if (parseResult.type === _parseDomain.ParseResultType.Listed) {\n subdomain = parseResult.subDomains.join('.');\n\n if (subdomain) {\n var dcSub = Object.keys(_dataCenters.default.dataCenterSpecificSubdomains).find(function (subSpecific) {\n return subSpecific === subdomain || subdomain.endsWith(\".\".concat(subSpecific));\n });\n\n if (dcSub) {\n dataCenterId = _dataCenters.default.dataCenterSpecificSubdomains[dcSub];\n }\n }\n }\n\n if (dataCenterId === DataCenterIds.US && \"\".concat(dataCenterAffinityCookie) === DataCenterIds.CA) {\n dataCenterId = DataCenterIds.CA;\n }\n\n return dataCenterId;\n} // This is currently being used in UserWeb here https://code.corp.surveymonkey.com/devmonkeys/userweb/blob/e7646369dfae9fef0c8d1fa3c23f1bde61a9c906/userweb/lib/language.py#L31\n// So I'm leaving this function for when we port the corresponding code in UserWeb.\n\n/**\n * Returns the default subdomain for a data center\n * @param {string} dataCenterId\n * @returns {string} subdomain\n * @memberof module:@sm/locale\n */\n\n\nfunction getDefaultSubdomainForDataCenter(dataCenterId) {\n var dc = getDataCenterById(dataCenterId);\n return dc && dc.defaultSubdomain || 'www';\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sanitizeCountryCode = sanitizeCountryCode;\nexports.isGDPRCountry = isGDPRCountry;\nexports.isDACHCountry = isDACHCountry;\nexports.isGBCountry = isGBCountry;\nexports.isUSTerritory = isUSTerritory;\nexports.isEUCountry = isEUCountry;\nexports.isEUDC = isEUDC;\nexports.isEUSubdomain = isEUSubdomain;\nexports.getEUCountries = getEUCountries;\nexports.getCookieTransportTLDs = getCookieTransportTLDs;\nexports.getAudienceSupportedCountries = getAudienceSupportedCountries;\nexports.getBenchmarksSupportedCountries = getBenchmarksSupportedCountries;\nexports.getSMSupportedCountries = getSMSupportedCountries;\nexports.getSiteSupportedLanguages = getSiteSupportedLanguages;\nexports.getLanguageCodeFromCountryCode = getLanguageCodeFromCountryCode;\nexports.getLanguageCodeFromSubdomain = getLanguageCodeFromSubdomain;\nexports.getSubdomainFromLanguageCodeAndDataCenter = getSubdomainFromLanguageCodeAndDataCenter;\nexports.getSiteSupportedLanguageCodes = getSiteSupportedLanguageCodes;\nexports.getTldLanguageInfo = getTldLanguageInfo;\nObject.defineProperty(exports, \"LANGUAGES_BY_CODE\", {\n enumerable: true,\n get: function get() {\n return _languages.LANGUAGES_BY_CODE;\n }\n});\nObject.defineProperty(exports, \"LANGUAGES_BY_ID\", {\n enumerable: true,\n get: function get() {\n return _languages.LANGUAGES_BY_ID;\n }\n});\nObject.defineProperty(exports, \"LANGUAGES\", {\n enumerable: true,\n get: function get() {\n return _languages.LANGUAGES;\n }\n});\nObject.defineProperty(exports, \"getDataCenterById\", {\n enumerable: true,\n get: function get() {\n return _dataCenters.getDataCenterById;\n }\n});\nObject.defineProperty(exports, \"getDataCenterIdFromCurrentUrl\", {\n enumerable: true,\n get: function get() {\n return _dataCenters.getDataCenterIdFromCurrentUrl;\n }\n});\nObject.defineProperty(exports, \"getDefaultSubdomainForDataCenter\", {\n enumerable: true,\n get: function get() {\n return _dataCenters.getDefaultSubdomainForDataCenter;\n }\n});\nexports.localeSets = void 0;\n\nvar _invariant = _interopRequireDefault(require(\"invariant\"));\n\nvar _tlds = _interopRequireDefault(require(\"./data/tlds.json\"));\n\nvar _localeSets = require(\"./localeSets\");\n\nvar _languages = require(\"./languages\");\n\nvar _dataCenters = require(\"./dataCenters\");\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n} // This is for backward compatibility. Remove for 2.0\n\n\nvar localeSets = {\n GDPR_COUNTRIES: _localeSets.GDPRCountryCodes,\n SM_SUPPORTED_COUNTRIES: _localeSets.SMSupportedCountryCodes,\n EU_COUNTRIES: _localeSets.EUCountryCodes,\n US_TERRITORIES: _localeSets.USTerritoryCountryCodes,\n GB_COUNTRIES: _localeSets.GBCountryCodes,\n DASH_COUNTRIES: _localeSets.DASHCountryCodes\n};\nexports.localeSets = localeSets;\n/**\n * @param {string} country - code\n * @param {string} fallBackCountry - default country code\n * @returns {string} two letter country code, default to US if a fallback is not provided\n */\n\nfunction sanitizeCountryCode(country) {\n var fallBackCountry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _localeSets.CountryCodes.US;\n var isString = typeof country === 'string';\n\n if (!isString) {\n // TODO log this\n !false ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'Country code is not a string.') : invariant(false) : void 0;\n return fallBackCountry;\n }\n\n var isTwoLetterCode = country.length === 2;\n\n if (!isTwoLetterCode) {\n // TODO log this\n !false ? process.env.NODE_ENV !== \"production\" ? (0, _invariant.default)(false, 'Country code is not a 2 letter code') : invariant(false) : void 0;\n return fallBackCountry;\n }\n\n return _localeSets.SMSupportedCountryCodes.find(function (c) {\n return c === country.toUpperCase();\n }) || fallBackCountry.toUpperCase();\n}\n/**\n * @param {string} country - Two-letter country code\n * @returns {bool} if that country has GDPR laws\n */\n\n\nfunction isGDPRCountry(country) {\n // if we cannot determine the country, assume GDPR country ie GB\n return _localeSets.GDPRCountryCodes.includes(sanitizeCountryCode(country, _localeSets.CountryCodes.GB));\n}\n/**\n * @param {string} country - Two-letter country code\n * @returns {bool} if country is in DASH country set\n */\n\n\nfunction isDACHCountry(country) {\n // if we cannot determine the country, assume non Dash ie. US\n return _localeSets.DASHCountryCodes.includes(sanitizeCountryCode(country, _localeSets.CountryCodes.US));\n}\n/**\n * @param {string} country - Two-letter country code\n * @returns {bool} if country is in the United Kingdoms\n * @public\n */\n\n\nfunction isGBCountry(country) {\n // if we cannot determine the country, assume GB country\n return _localeSets.GBCountryCodes.includes(sanitizeCountryCode(country, _localeSets.CountryCodes.GB));\n}\n/**\n * @param {string} country - Two-letter country code\n * @returns {bool} if country is a US Territory\n * @public\n */\n\n\nfunction isUSTerritory(country) {\n // if we cannot determine the country, assume Non US\n return _localeSets.USTerritoryCountryCodes.includes(sanitizeCountryCode(country, _localeSets.CountryCodes.GB));\n}\n/**\n * @param {string} country - Two-letter country code\n * @returns {bool} if country is in European Union\n * @public\n */\n\n\nfunction isEUCountry(country) {\n // if we cannot determine the country, assume EU. (joelm: WHY?!?!?!)\n return _localeSets.EUCountryCodes.includes(sanitizeCountryCode(country, _localeSets.CountryCodes.GB));\n}\n/**\n * @param {string} hostname\n * @returns {bool} if host is a EUDC\n * @public\n */\n\n\nfunction isEUDC(hostname) {\n return (0, _dataCenters.getDataCenterIdFromCurrentUrl)(hostname) === _dataCenters.DataCenterIds.EU;\n}\n/**\n * @param {string} subdomain\n * @returns {bool} if EU Subdomain\n * @public\n */\n\n\nfunction isEUSubdomain(subdomain) {\n return !!(subdomain && subdomain.indexOf('eu') !== -1);\n}\n/**\n * @returns {Array} list of European Union Countries\n * @public\n */\n\n\nfunction getEUCountries() {\n return _toConsumableArray(_localeSets.EUCountryCodes);\n}\n/**\n * @returns {Array} List of SM supported TLDs\n * @public\n */\n\n\nfunction getCookieTransportTLDs() {\n return _tlds.default.filter(function (tld) {\n return tld.enabled;\n }).map(function (tld) {\n return tld.tld;\n });\n}\n/**\n * @returns {Array} Countries that SM Audience supports\n * @public\n */\n\n\nfunction getAudienceSupportedCountries() {\n // TODO change this to just return list of country codes\n return {\n US: 'United States',\n AU: 'Australia',\n CA: 'Canada',\n NZ: 'New Zealand',\n SG: 'Singapore',\n GB: 'United Kingdom',\n IE: 'Ireland'\n };\n}\n/**\n * @returns {Array} Countries that SM Benchmarks supports\n * @public\n */\n\n\nfunction getBenchmarksSupportedCountries() {\n // TODO change this to jst return a list of country codes\n return {\n US: 'United States'\n };\n}\n/**\n * @returns {Array} Countries that SM supports\n * @public\n */\n\n\nfunction getSMSupportedCountries() {\n return _toConsumableArray(_localeSets.SMSupportedCountryCodes);\n}\n/**\n * @returns {Object} Language Object that SM Supports\n * @public\n */\n\n\nfunction getSiteSupportedLanguages() {\n return _languages.LANGUAGES.filter(function (language) {\n return language.supportLevel === _languages.SupportLevels.SITE_WIDE;\n });\n}\n/**\n * @param {string} country - Two-letter country code\n * @returns {string} language code\n */\n\n\nfunction getLanguageCodeFromCountryCode(country) {\n var language = _languages.LANGUAGES.find(function (lang) {\n return lang.countries.includes(sanitizeCountryCode(country));\n });\n\n return language ? language.code : 'en';\n}\n/**\n * Returns the language code from the subdomain\n * @param {string} subdomain\n * @returns {string} language code\n */\n\n\nfunction getLanguageCodeFromSubdomain(subdomain) {\n if (subdomain === 'eu' || subdomain === 'www') {\n return 'en';\n }\n\n var language = _languages.LANGUAGES_WITH_SUBDOMAINS.find(function (lang) {\n return lang.subdomain === subdomain || \"\".concat(lang.subdomain, \".eu\") === subdomain;\n });\n\n if (language) {\n return language.code;\n }\n\n return 'en';\n}\n/**\n * Returns the subdomain from the language code and data center combination\n * @param {string} languageCode\n * @param {string} dataCenterId\n * @returns {string} subdomain\n */\n\n\nfunction getSubdomainFromLanguageCodeAndDataCenter(languageCode, dataCenterId) {\n var language = _languages.LANGUAGES_BY_CODE[languageCode];\n var result = language.subdomain;\n\n if (dataCenterId === _dataCenters.DataCenterIds.EU) {\n result = \"\".concat(language.subdomain, \".eu\");\n } else if (language.tld === language.subdomain) {\n // override for langs like de and ru which have a cctld\n // only affects www.sm.de || www.sm.ru\n result = 'www';\n }\n\n return result === 'www.eu' ? 'eu' : result;\n}\n/**\n * @returns {Array} Language codes that SM Supports\n * @public\n */\n\n\nfunction getSiteSupportedLanguageCodes() {\n return getSiteSupportedLanguages().map(function (language) {\n return language.code;\n });\n}\n/**\n * Returns the tld language info\n * @param {string} tld\n * @returns {string} language info\n */\n\n\nfunction getTldLanguageInfo(tld) {\n var data = _tlds.default.find(function (i) {\n return i.tld === tld;\n });\n\n if (!data) {\n return _tlds.default.find(function (i) {\n return i.tld === 'com';\n });\n }\n\n return data;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.LANGUAGES_WITH_SUBDOMAINS = exports.LANGUAGES_BY_CODE = exports.LANGUAGES_BY_ID = exports.LANGUAGES = exports.SupportLevels = void 0;\n/*\nSM has the language data recorded in a number of places. There is DB table sm_Localization_D_Languages present in multiple schemas.\nHere are some examples of the sources that support createweb languages. There are many more references to the top 17 languages supported SM-wide.\nhttps://code.corp.surveymonkey.com/devmonkeys/smlib.locale/blob/master/smlib/locale/locale.yml#L330\nhttps://code.corp.surveymonkey.com/devmonkeys/createweb/blob/develop/createweb/lib/translations.py\nhttps://code.corp.surveymonkey.com/devmonkeys/smsdk.surveysvc/blob/master/smsdk/surveysvc/lib/languages.yml\nhttps://code.corp.surveymonkey.com/devmonkeys/AnWeb/blob/develop/anweb/lib/languages.py\n*/\n\n/**\n * @constant\n * @default\n * @memberof module:@sm/locale\n */\n\nvar SupportLevels;\nexports.SupportLevels = SupportLevels;\n\n(function (SupportLevels) {\n SupportLevels[SupportLevels[\"SITE_WIDE\"] = 1] = \"SITE_WIDE\";\n SupportLevels[SupportLevels[\"SURVEY_CREATION\"] = 2] = \"SURVEY_CREATION\";\n SupportLevels[SupportLevels[\"MULTILINGUAL_SURVEYS\"] = 3] = \"MULTILINGUAL_SURVEYS\";\n})(SupportLevels || (exports.SupportLevels = SupportLevels = {}));\n/**\n * An array of available languages.\n *\n * The language codes in the database do not follow IETF language tag standard https://en.wikipedia.org/wiki/IETF_language_tag\n * or confuse regional locale with language dialect. That causes issues when working with internationalization libraries like ICU.\n * The field code is the \"code\" as in the SM database and python packages. The \"codeIETF\" is the correct code. This API accepts both.\n * For the output choose \"code\" unless you are sure that the consumer supports IETF codes (e.g, uses this library).\n * @type {Array}\n * @memberof module:@sm/locale\n */\n\n\nvar LANGUAGES = [{\n code: 'sq',\n name: 'Albanian',\n id: 24,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'ar',\n name: 'Arabic',\n id: 25,\n countries: [],\n isRTL: true,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'hy',\n name: 'Armenian',\n id: 26,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'eu',\n name: 'Basque',\n id: 27,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'bn',\n name: 'Bengali',\n id: 28,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'bs',\n name: 'Bosnian',\n id: 29,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'bg',\n name: 'Bulgarian',\n id: 30,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'ca',\n name: 'Catalan',\n id: 31,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'zh-cn',\n codeIETF: 'zh-Hans',\n name: 'Chinese (Simplified)',\n id: 2,\n countries: [],\n isRTL: false,\n subdomain: 'www',\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'zh-tw',\n codeIETF: 'zh-Hant',\n name: 'Chinese (Traditional)',\n displayName: '中文(繁體)',\n id: 3,\n helplink: 'zh_TW',\n tld: 'com',\n subdomain: 'zh',\n countries: ['TW'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 14\n}, {\n code: 'pt-br',\n name: 'Portuguese (Brazilian)',\n id: 17,\n displayName: 'Português',\n helplink: 'pt_BR',\n tld: 'com',\n subdomain: 'pt',\n countries: ['BR', 'PT', 'AO', 'CV'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 2\n}, {\n code: 'pt',\n name: 'Portuguese (Iberian)',\n id: 16,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'hr',\n name: 'Croatian',\n id: 32,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'cs',\n name: 'Czech',\n id: 33,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'da',\n name: 'Danish',\n displayName: 'Dansk',\n tld: 'com',\n helplink: 'en_US',\n subdomain: 'da',\n id: 4,\n countries: ['DK', 'GL'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 10\n}, {\n code: 'nl',\n name: 'Dutch',\n id: 5,\n displayName: 'Nederlands',\n helplink: 'nl_NL',\n subdomain: 'nl',\n tld: 'com',\n countries: ['NL', 'BE'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 4\n}, {\n code: 'en',\n name: 'English',\n id: 1,\n tld: 'com',\n subdomain: 'www',\n displayName: 'English',\n helplink: 'en_US',\n countries: ['US', 'AU', 'GB', 'IE', 'CA', 'GG', 'NZ'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 5\n}, {\n code: 'et',\n name: 'Estonian',\n id: 34,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'tl',\n codeIETF: 'fil',\n name: 'Filipino',\n id: 35,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'fi',\n name: 'Finnish',\n id: 6,\n displayName: 'Suomi',\n helplink: 'en_US',\n tld: 'com',\n subdomain: 'fi',\n countries: ['FI'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 17\n}, {\n code: 'fr',\n name: 'French',\n id: 7,\n displayName: 'Français',\n helplink: 'fr',\n tld: 'com',\n subdomain: 'fr',\n countries: ['FR', 'MA', 'DZ', 'TN', 'RE', 'CI', 'SN', 'TG', 'MQ', 'GP', 'PF', 'CG', 'CM', 'BJ', 'CD'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 7\n}, {\n code: 'ka',\n name: 'Georgian',\n id: 36,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'de',\n name: 'German',\n id: 8,\n displayName: 'Deutsch',\n helplink: 'de',\n tld: 'de',\n subdomain: 'de',\n countries: ['DE', 'AT', 'CH', 'LI'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 3\n}, {\n code: 'el',\n name: 'Greek',\n id: 9,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'he',\n name: 'Hebrew',\n id: 37,\n countries: [],\n isRTL: true,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'hi',\n name: 'Hindi',\n id: 38,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'hu',\n name: 'Hungarian',\n id: 39,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'is',\n name: 'Icelandic',\n id: 40,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'id',\n name: 'Indonesian',\n id: 41,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'ga',\n name: 'Irish',\n id: 42,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'it',\n name: 'Italian',\n id: 10,\n displayName: 'Italiano',\n helplink: 'it',\n tld: 'com',\n subdomain: 'it',\n countries: ['IT'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 9\n}, {\n code: 'ja',\n name: 'Japanese',\n id: 11,\n displayName: '日本語',\n helplink: 'ja',\n tld: 'com',\n subdomain: 'jp',\n countries: ['JP'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 12\n}, {\n code: 'ko',\n name: 'Korean',\n id: 12,\n displayName: '한국어',\n helplink: 'ko',\n tld: 'com',\n subdomain: 'ko',\n countries: ['KP', 'KR'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 13\n}, {\n code: 'ku',\n name: 'Kurdish',\n id: 43,\n countries: [],\n\n /** Kurdish can be written in two scripts - it may or may not be RTL */\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'lv',\n name: 'Latvian',\n id: 44,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'lt',\n name: 'Lithuanian',\n id: 45,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'mk',\n name: 'Macedonian',\n id: 46,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'ms',\n name: 'Malay',\n id: 13,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'ml',\n name: 'Malayalam',\n id: 47,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'no',\n codeIETF: 'nb',\n name: 'Norwegian',\n id: 14,\n displayName: 'Norsk',\n helplink: 'en_US',\n tld: 'com',\n subdomain: 'no',\n countries: ['NO', 'SJ'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 16\n}, {\n code: 'fa',\n name: 'Persian',\n id: 48,\n countries: [],\n isRTL: true,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'pl',\n name: 'Polish',\n id: 15,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'pa',\n name: 'Punjabi',\n id: 49,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'ro',\n name: 'Romanian',\n id: 50,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'ru',\n name: 'Russian',\n id: 18,\n displayName: 'Русский',\n helplink: 'ru',\n tld: 'ru',\n subdomain: 'ru',\n countries: ['RU', 'BY', 'UA', 'KZ', 'UZ', 'TJ', 'AZ', 'TM', 'AM', 'MD', 'KG'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 8\n}, {\n code: 'sr',\n name: 'Serbian',\n id: 51,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'sk',\n name: 'Slovak',\n id: 52,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'sl',\n name: 'Slovenian',\n id: 53,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'es',\n name: 'Spanish',\n id: 19,\n displayName: 'Español',\n helplink: 'es',\n tld: 'com',\n subdomain: 'es',\n countries: ['MX', 'ES', 'AR', 'GT', 'HN', 'SV', 'NI', 'CR', 'PA', 'GQ', 'CU', 'DO', 'PR', 'VE', 'CO', 'EC', 'PE', 'BO', 'PY', 'CL', 'UY'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 1\n}, {\n code: 'sw',\n name: 'Swahili',\n id: 54,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'sv',\n name: 'Swedish',\n id: 20,\n displayName: 'Svenska',\n helplink: 'en_US',\n tld: 'com',\n subdomain: 'sv',\n countries: ['SE'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 11\n}, {\n code: 'ta',\n name: 'Tamil',\n id: 55,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'te',\n name: 'Telugu',\n id: 56,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'th',\n name: 'Thai',\n id: 57,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'tr',\n name: 'Turkish',\n id: 21,\n displayName: 'Türkçe',\n helplink: 'tr',\n tld: 'com',\n subdomain: 'tr',\n countries: ['TR'],\n isRTL: false,\n supportLevel: SupportLevels.SITE_WIDE,\n displayOrder: 15\n}, {\n code: 'uk',\n name: 'Ukrainian',\n id: 22,\n countries: ['UA'],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'vi',\n name: 'Vietnamese',\n id: 58,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}, {\n code: 'cy',\n name: 'Welsh',\n id: 59,\n countries: [],\n isRTL: false,\n supportLevel: SupportLevels.SURVEY_CREATION\n}];\n/**\n * Languages by ID\n * @memberof module:@sm/locale\n */\n\nexports.LANGUAGES = LANGUAGES;\nvar LANGUAGES_BY_ID_REC = {};\n/**\n * Languages by code\n * @memberof module:@sm/locale\n */\n\nvar LANGUAGES_BY_CODE_REC = {};\n/**\n * Languages with sub-domains\n * @memberof module:@sm/locale\n */\n\nvar LANGUAGES_WITH_SUBDOMAINS_REC = [];\nLANGUAGES.forEach(function (language) {\n LANGUAGES_BY_ID_REC[language.id] = language;\n LANGUAGES_BY_CODE_REC[language.code] = language;\n\n if (language.codeIETF) {\n LANGUAGES_BY_CODE_REC[language.codeIETF] = language;\n }\n\n if (language.subdomain) {\n LANGUAGES_WITH_SUBDOMAINS_REC.push(language);\n }\n});\nvar LANGUAGES_BY_ID = Object.freeze(LANGUAGES_BY_ID_REC);\nexports.LANGUAGES_BY_ID = LANGUAGES_BY_ID;\nvar LANGUAGES_BY_CODE = Object.freeze(LANGUAGES_BY_CODE_REC);\nexports.LANGUAGES_BY_CODE = LANGUAGES_BY_CODE;\nvar LANGUAGES_WITH_SUBDOMAINS = Object.freeze(LANGUAGES_WITH_SUBDOMAINS_REC);\nexports.LANGUAGES_WITH_SUBDOMAINS = LANGUAGES_WITH_SUBDOMAINS;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SMSupportedCountryCodes = exports.EUCountryCodes = exports.USTerritoryCountryCodes = exports.GBCountryCodes = exports.DASHCountryCodes = exports.GDPRCountryCodes = exports.CountryCodes = void 0;\nvar CountryCodes;\nexports.CountryCodes = CountryCodes;\n\n(function (CountryCodes) {\n CountryCodes[\"AE\"] = \"AE\";\n CountryCodes[\"AR\"] = \"AR\";\n CountryCodes[\"AU\"] = \"AU\";\n CountryCodes[\"BR\"] = \"BR\";\n CountryCodes[\"CA\"] = \"CA\";\n CountryCodes[\"CH\"] = \"CH\";\n CountryCodes[\"LI\"] = \"LI\";\n CountryCodes[\"DK\"] = \"DK\";\n CountryCodes[\"FO\"] = \"FO\";\n CountryCodes[\"GL\"] = \"GL\";\n CountryCodes[\"AD\"] = \"AD\";\n CountryCodes[\"AL\"] = \"AL\";\n CountryCodes[\"AT\"] = \"AT\";\n CountryCodes[\"AX\"] = \"AX\";\n CountryCodes[\"BA\"] = \"BA\";\n CountryCodes[\"BE\"] = \"BE\";\n CountryCodes[\"BG\"] = \"BG\";\n CountryCodes[\"BY\"] = \"BY\";\n CountryCodes[\"CY\"] = \"CY\";\n CountryCodes[\"CZ\"] = \"CZ\";\n CountryCodes[\"DE\"] = \"DE\";\n CountryCodes[\"EE\"] = \"EE\";\n CountryCodes[\"ES\"] = \"ES\";\n CountryCodes[\"FI\"] = \"FI\";\n CountryCodes[\"FR\"] = \"FR\";\n CountryCodes[\"GF\"] = \"GF\";\n CountryCodes[\"GP\"] = \"GP\";\n CountryCodes[\"GR\"] = \"GR\";\n CountryCodes[\"HR\"] = \"HR\";\n CountryCodes[\"HU\"] = \"HU\";\n CountryCodes[\"IE\"] = \"IE\";\n CountryCodes[\"IS\"] = \"IS\";\n CountryCodes[\"IT\"] = \"IT\";\n CountryCodes[\"LT\"] = \"LT\";\n CountryCodes[\"LU\"] = \"LU\";\n CountryCodes[\"LV\"] = \"LV\";\n CountryCodes[\"MC\"] = \"MC\";\n CountryCodes[\"MD\"] = \"MD\";\n CountryCodes[\"ME\"] = \"ME\";\n CountryCodes[\"MF\"] = \"MF\";\n CountryCodes[\"MK\"] = \"MK\";\n CountryCodes[\"MQ\"] = \"MQ\";\n CountryCodes[\"MT\"] = \"MT\";\n CountryCodes[\"NL\"] = \"NL\";\n CountryCodes[\"PL\"] = \"PL\";\n CountryCodes[\"PM\"] = \"PM\";\n CountryCodes[\"PT\"] = \"PT\";\n CountryCodes[\"RE\"] = \"RE\";\n CountryCodes[\"RO\"] = \"RO\";\n CountryCodes[\"RS\"] = \"RS\";\n CountryCodes[\"RU\"] = \"RU\";\n CountryCodes[\"SI\"] = \"SI\";\n CountryCodes[\"SK\"] = \"SK\";\n CountryCodes[\"SM\"] = \"SM\";\n CountryCodes[\"TF\"] = \"TF\";\n CountryCodes[\"TR\"] = \"TR\";\n CountryCodes[\"UA\"] = \"UA\";\n CountryCodes[\"VA\"] = \"VA\";\n CountryCodes[\"YT\"] = \"YT\";\n CountryCodes[\"GB\"] = \"GB\";\n CountryCodes[\"GG\"] = \"GG\";\n CountryCodes[\"GI\"] = \"GI\";\n CountryCodes[\"GS\"] = \"GS\";\n CountryCodes[\"IM\"] = \"IM\";\n CountryCodes[\"JE\"] = \"JE\";\n CountryCodes[\"HK\"] = \"HK\";\n CountryCodes[\"IN\"] = \"IN\";\n CountryCodes[\"JP\"] = \"JP\";\n CountryCodes[\"KR\"] = \"KR\";\n CountryCodes[\"MX\"] = \"MX\";\n CountryCodes[\"NO\"] = \"NO\";\n CountryCodes[\"NZ\"] = \"NZ\";\n CountryCodes[\"SE\"] = \"SE\";\n CountryCodes[\"SG\"] = \"SG\";\n CountryCodes[\"TW\"] = \"TW\";\n CountryCodes[\"AF\"] = \"AF\";\n CountryCodes[\"AG\"] = \"AG\";\n CountryCodes[\"AI\"] = \"AI\";\n CountryCodes[\"AM\"] = \"AM\";\n CountryCodes[\"AN\"] = \"AN\";\n CountryCodes[\"AO\"] = \"AO\";\n CountryCodes[\"AQ\"] = \"AQ\";\n CountryCodes[\"AS\"] = \"AS\";\n CountryCodes[\"AW\"] = \"AW\";\n CountryCodes[\"AZ\"] = \"AZ\";\n CountryCodes[\"BB\"] = \"BB\";\n CountryCodes[\"BD\"] = \"BD\";\n CountryCodes[\"BF\"] = \"BF\";\n CountryCodes[\"BH\"] = \"BH\";\n CountryCodes[\"BI\"] = \"BI\";\n CountryCodes[\"BJ\"] = \"BJ\";\n CountryCodes[\"BL\"] = \"BL\";\n CountryCodes[\"BM\"] = \"BM\";\n CountryCodes[\"BN\"] = \"BN\";\n CountryCodes[\"BO\"] = \"BO\";\n CountryCodes[\"BS\"] = \"BS\";\n CountryCodes[\"BT\"] = \"BT\";\n CountryCodes[\"BV\"] = \"BV\";\n CountryCodes[\"BW\"] = \"BW\";\n CountryCodes[\"BZ\"] = \"BZ\";\n CountryCodes[\"CC\"] = \"CC\";\n CountryCodes[\"CD\"] = \"CD\";\n CountryCodes[\"CF\"] = \"CF\";\n CountryCodes[\"CG\"] = \"CG\";\n CountryCodes[\"CI\"] = \"CI\";\n CountryCodes[\"CK\"] = \"CK\";\n CountryCodes[\"CL\"] = \"CL\";\n CountryCodes[\"CM\"] = \"CM\";\n CountryCodes[\"CN\"] = \"CN\";\n CountryCodes[\"CO\"] = \"CO\";\n CountryCodes[\"CR\"] = \"CR\";\n CountryCodes[\"CV\"] = \"CV\";\n CountryCodes[\"CX\"] = \"CX\";\n CountryCodes[\"DJ\"] = \"DJ\";\n CountryCodes[\"DM\"] = \"DM\";\n CountryCodes[\"DO\"] = \"DO\";\n CountryCodes[\"DZ\"] = \"DZ\";\n CountryCodes[\"EC\"] = \"EC\";\n CountryCodes[\"EG\"] = \"EG\";\n CountryCodes[\"EH\"] = \"EH\";\n CountryCodes[\"ER\"] = \"ER\";\n CountryCodes[\"ET\"] = \"ET\";\n CountryCodes[\"FJ\"] = \"FJ\";\n CountryCodes[\"FK\"] = \"FK\";\n CountryCodes[\"FM\"] = \"FM\";\n CountryCodes[\"GA\"] = \"GA\";\n CountryCodes[\"GD\"] = \"GD\";\n CountryCodes[\"GE\"] = \"GE\";\n CountryCodes[\"GH\"] = \"GH\";\n CountryCodes[\"GM\"] = \"GM\";\n CountryCodes[\"GN\"] = \"GN\";\n CountryCodes[\"GQ\"] = \"GQ\";\n CountryCodes[\"GT\"] = \"GT\";\n CountryCodes[\"GU\"] = \"GU\";\n CountryCodes[\"GW\"] = \"GW\";\n CountryCodes[\"GY\"] = \"GY\";\n CountryCodes[\"HM\"] = \"HM\";\n CountryCodes[\"HN\"] = \"HN\";\n CountryCodes[\"HT\"] = \"HT\";\n CountryCodes[\"ID\"] = \"ID\";\n CountryCodes[\"IL\"] = \"IL\";\n CountryCodes[\"IO\"] = \"IO\";\n CountryCodes[\"IQ\"] = \"IQ\";\n CountryCodes[\"JM\"] = \"JM\";\n CountryCodes[\"JO\"] = \"JO\";\n CountryCodes[\"KE\"] = \"KE\";\n CountryCodes[\"KG\"] = \"KG\";\n CountryCodes[\"KH\"] = \"KH\";\n CountryCodes[\"KI\"] = \"KI\";\n CountryCodes[\"KM\"] = \"KM\";\n CountryCodes[\"KN\"] = \"KN\";\n CountryCodes[\"KP\"] = \"KP\";\n CountryCodes[\"KW\"] = \"KW\";\n CountryCodes[\"KY\"] = \"KY\";\n CountryCodes[\"KZ\"] = \"KZ\";\n CountryCodes[\"LA\"] = \"LA\";\n CountryCodes[\"LB\"] = \"LB\";\n CountryCodes[\"LC\"] = \"LC\";\n CountryCodes[\"LK\"] = \"LK\";\n CountryCodes[\"LR\"] = \"LR\";\n CountryCodes[\"LS\"] = \"LS\";\n CountryCodes[\"LY\"] = \"LY\";\n CountryCodes[\"MA\"] = \"MA\";\n CountryCodes[\"MG\"] = \"MG\";\n CountryCodes[\"MH\"] = \"MH\";\n CountryCodes[\"ML\"] = \"ML\";\n CountryCodes[\"MM\"] = \"MM\";\n CountryCodes[\"MN\"] = \"MN\";\n CountryCodes[\"MO\"] = \"MO\";\n CountryCodes[\"MP\"] = \"MP\";\n CountryCodes[\"MR\"] = \"MR\";\n CountryCodes[\"MS\"] = \"MS\";\n CountryCodes[\"MU\"] = \"MU\";\n CountryCodes[\"MV\"] = \"MV\";\n CountryCodes[\"MW\"] = \"MW\";\n CountryCodes[\"MY\"] = \"MY\";\n CountryCodes[\"MZ\"] = \"MZ\";\n CountryCodes[\"NA\"] = \"NA\";\n CountryCodes[\"NC\"] = \"NC\";\n CountryCodes[\"NE\"] = \"NE\";\n CountryCodes[\"NF\"] = \"NF\";\n CountryCodes[\"NG\"] = \"NG\";\n CountryCodes[\"NI\"] = \"NI\";\n CountryCodes[\"NP\"] = \"NP\";\n CountryCodes[\"NR\"] = \"NR\";\n CountryCodes[\"NU\"] = \"NU\";\n CountryCodes[\"OM\"] = \"OM\";\n CountryCodes[\"PA\"] = \"PA\";\n CountryCodes[\"PE\"] = \"PE\";\n CountryCodes[\"PF\"] = \"PF\";\n CountryCodes[\"PG\"] = \"PG\";\n CountryCodes[\"PH\"] = \"PH\";\n CountryCodes[\"PK\"] = \"PK\";\n CountryCodes[\"PN\"] = \"PN\";\n CountryCodes[\"PR\"] = \"PR\";\n CountryCodes[\"PS\"] = \"PS\";\n CountryCodes[\"PW\"] = \"PW\";\n CountryCodes[\"PY\"] = \"PY\";\n CountryCodes[\"QA\"] = \"QA\";\n CountryCodes[\"RW\"] = \"RW\";\n CountryCodes[\"SA\"] = \"SA\";\n CountryCodes[\"SB\"] = \"SB\";\n CountryCodes[\"SC\"] = \"SC\";\n CountryCodes[\"SH\"] = \"SH\";\n CountryCodes[\"SJ\"] = \"SJ\";\n CountryCodes[\"SL\"] = \"SL\";\n CountryCodes[\"SN\"] = \"SN\";\n CountryCodes[\"SO\"] = \"SO\";\n CountryCodes[\"SR\"] = \"SR\";\n CountryCodes[\"ST\"] = \"ST\";\n CountryCodes[\"SV\"] = \"SV\";\n CountryCodes[\"SY\"] = \"SY\";\n CountryCodes[\"SZ\"] = \"SZ\";\n CountryCodes[\"TC\"] = \"TC\";\n CountryCodes[\"TD\"] = \"TD\";\n CountryCodes[\"TG\"] = \"TG\";\n CountryCodes[\"TH\"] = \"TH\";\n CountryCodes[\"TJ\"] = \"TJ\";\n CountryCodes[\"TK\"] = \"TK\";\n CountryCodes[\"TL\"] = \"TL\";\n CountryCodes[\"TM\"] = \"TM\";\n CountryCodes[\"TN\"] = \"TN\";\n CountryCodes[\"TO\"] = \"TO\";\n CountryCodes[\"TT\"] = \"TT\";\n CountryCodes[\"TV\"] = \"TV\";\n CountryCodes[\"TZ\"] = \"TZ\";\n CountryCodes[\"UG\"] = \"UG\";\n CountryCodes[\"UM\"] = \"UM\";\n CountryCodes[\"US\"] = \"US\";\n CountryCodes[\"UY\"] = \"UY\";\n CountryCodes[\"UZ\"] = \"UZ\";\n CountryCodes[\"VC\"] = \"VC\";\n CountryCodes[\"VE\"] = \"VE\";\n CountryCodes[\"VG\"] = \"VG\";\n CountryCodes[\"VI\"] = \"VI\";\n CountryCodes[\"VN\"] = \"VN\";\n CountryCodes[\"VU\"] = \"VU\";\n CountryCodes[\"WF\"] = \"WF\";\n CountryCodes[\"WS\"] = \"WS\";\n CountryCodes[\"YE\"] = \"YE\";\n CountryCodes[\"ZM\"] = \"ZM\";\n CountryCodes[\"ZW\"] = \"ZW\";\n CountryCodes[\"ZA\"] = \"ZA\";\n})(CountryCodes || (exports.CountryCodes = CountryCodes = {}));\n\nvar GDPRCountryCodes = [CountryCodes.AT, CountryCodes.BE, CountryCodes.BG, CountryCodes.CH, CountryCodes.CY, CountryCodes.CZ, CountryCodes.DE, CountryCodes.DK, CountryCodes.EE, CountryCodes.ES, CountryCodes.FI, CountryCodes.FR, CountryCodes.GB, CountryCodes.GR, CountryCodes.HR, CountryCodes.HU, CountryCodes.IE, CountryCodes.IM, CountryCodes.IT, CountryCodes.LT, CountryCodes.LU, CountryCodes.LV, CountryCodes.MC, CountryCodes.MT, CountryCodes.NL, CountryCodes.PL, CountryCodes.PT, CountryCodes.RO, CountryCodes.SE, CountryCodes.SI, CountryCodes.SK, CountryCodes.IS, CountryCodes.LI, CountryCodes.NO];\nexports.GDPRCountryCodes = GDPRCountryCodes;\nvar DASHCountryCodes = [CountryCodes.DE, CountryCodes.AT, CountryCodes.CH];\nexports.DASHCountryCodes = DASHCountryCodes;\nvar GBCountryCodes = [CountryCodes.GB, CountryCodes.GG, CountryCodes.GI, CountryCodes.GS, CountryCodes.IM, CountryCodes.JE];\nexports.GBCountryCodes = GBCountryCodes;\nvar USTerritoryCountryCodes = [CountryCodes.GU, CountryCodes.PR, CountryCodes.UM, CountryCodes.US, CountryCodes.VI];\nexports.USTerritoryCountryCodes = USTerritoryCountryCodes;\nvar EUCountryCodes = [CountryCodes.AT, CountryCodes.BE, CountryCodes.BG, CountryCodes.CY, CountryCodes.CZ, CountryCodes.DE, CountryCodes.DK, CountryCodes.EE, CountryCodes.ES, CountryCodes.FI, CountryCodes.FR, CountryCodes.GB, CountryCodes.GR, CountryCodes.HR, CountryCodes.HU, CountryCodes.IE, CountryCodes.IM, CountryCodes.IT, CountryCodes.LT, CountryCodes.LU, CountryCodes.LV, CountryCodes.MC, CountryCodes.MT, CountryCodes.NL, CountryCodes.PL, CountryCodes.PT, CountryCodes.RO, CountryCodes.SE, CountryCodes.SI, CountryCodes.SK];\nexports.EUCountryCodes = EUCountryCodes;\nvar SMSupportedCountryCodes = [CountryCodes.AE, CountryCodes.AR, CountryCodes.AU, CountryCodes.BR, CountryCodes.CA, CountryCodes.CH, CountryCodes.LI, CountryCodes.DK, CountryCodes.FO, CountryCodes.GL, CountryCodes.AD, CountryCodes.AL, CountryCodes.AT, CountryCodes.AX, CountryCodes.BA, CountryCodes.BE, CountryCodes.BG, CountryCodes.BY, CountryCodes.CY, CountryCodes.CZ, CountryCodes.DE, CountryCodes.EE, CountryCodes.ES, CountryCodes.FI, CountryCodes.FR, CountryCodes.GF, CountryCodes.GP, CountryCodes.GR, CountryCodes.HR, CountryCodes.HU, CountryCodes.IE, CountryCodes.IS, CountryCodes.IT, CountryCodes.LT, CountryCodes.LU, CountryCodes.LV, CountryCodes.MC, CountryCodes.MD, CountryCodes.ME, CountryCodes.MF, CountryCodes.MK, CountryCodes.MQ, CountryCodes.MT, CountryCodes.NL, CountryCodes.PL, CountryCodes.PM, CountryCodes.PT, CountryCodes.RE, CountryCodes.RO, CountryCodes.RS, CountryCodes.RU, CountryCodes.SI, CountryCodes.SK, CountryCodes.SM, CountryCodes.TF, CountryCodes.TR, CountryCodes.UA, CountryCodes.VA, CountryCodes.YT, CountryCodes.GB, CountryCodes.GG, CountryCodes.GI, CountryCodes.GS, CountryCodes.IM, CountryCodes.JE, CountryCodes.HK, CountryCodes.IN, CountryCodes.JP, CountryCodes.KR, CountryCodes.MX, CountryCodes.NO, CountryCodes.NZ, CountryCodes.SE, CountryCodes.SG, CountryCodes.TW, CountryCodes.AF, CountryCodes.AG, CountryCodes.AI, CountryCodes.AM, CountryCodes.AN, CountryCodes.AO, CountryCodes.AQ, CountryCodes.AS, CountryCodes.AW, CountryCodes.AZ, CountryCodes.BB, CountryCodes.BD, CountryCodes.BF, CountryCodes.BH, CountryCodes.BI, CountryCodes.BJ, CountryCodes.BL, CountryCodes.BM, CountryCodes.BN, CountryCodes.BO, CountryCodes.BS, CountryCodes.BT, CountryCodes.BV, CountryCodes.BW, CountryCodes.BZ, CountryCodes.CC, CountryCodes.CD, CountryCodes.CF, CountryCodes.CG, CountryCodes.CI, CountryCodes.CK, CountryCodes.CL, CountryCodes.CM, CountryCodes.CN, CountryCodes.CO, CountryCodes.CR, CountryCodes.CV, CountryCodes.CX, CountryCodes.DJ, CountryCodes.DM, CountryCodes.DO, CountryCodes.DZ, CountryCodes.EC, CountryCodes.EG, CountryCodes.EH, CountryCodes.ER, CountryCodes.ET, CountryCodes.FJ, CountryCodes.FK, CountryCodes.FM, CountryCodes.GA, CountryCodes.GD, CountryCodes.GE, CountryCodes.GH, CountryCodes.GM, CountryCodes.GN, CountryCodes.GQ, CountryCodes.GT, CountryCodes.GU, CountryCodes.GW, CountryCodes.GY, CountryCodes.HM, CountryCodes.HN, CountryCodes.HT, CountryCodes.ID, CountryCodes.IL, CountryCodes.IO, CountryCodes.IQ, CountryCodes.JM, CountryCodes.JO, CountryCodes.KE, CountryCodes.KG, CountryCodes.KH, CountryCodes.KI, CountryCodes.KM, CountryCodes.KN, CountryCodes.KP, CountryCodes.KW, CountryCodes.KY, CountryCodes.KZ, CountryCodes.LA, CountryCodes.LB, CountryCodes.LC, CountryCodes.LK, CountryCodes.LR, CountryCodes.LS, CountryCodes.LY, CountryCodes.MA, CountryCodes.MG, CountryCodes.MH, CountryCodes.ML, CountryCodes.MM, CountryCodes.MN, CountryCodes.MO, CountryCodes.MP, CountryCodes.MR, CountryCodes.MS, CountryCodes.MU, CountryCodes.MV, CountryCodes.MW, CountryCodes.MY, CountryCodes.MZ, CountryCodes.NA, CountryCodes.NC, CountryCodes.NE, CountryCodes.NF, CountryCodes.NG, CountryCodes.NI, CountryCodes.NP, CountryCodes.NR, CountryCodes.NU, CountryCodes.OM, CountryCodes.PA, CountryCodes.PE, CountryCodes.PF, CountryCodes.PG, CountryCodes.PH, CountryCodes.PK, CountryCodes.PN, CountryCodes.PR, CountryCodes.PS, CountryCodes.PW, CountryCodes.PY, CountryCodes.QA, CountryCodes.RW, CountryCodes.SA, CountryCodes.SB, CountryCodes.SC, CountryCodes.SH, CountryCodes.SJ, CountryCodes.SL, CountryCodes.SN, CountryCodes.SO, CountryCodes.SR, CountryCodes.ST, CountryCodes.SV, CountryCodes.SY, CountryCodes.SZ, CountryCodes.TC, CountryCodes.TD, CountryCodes.TG, CountryCodes.TH, CountryCodes.TJ, CountryCodes.TK, CountryCodes.TL, CountryCodes.TM, CountryCodes.TN, CountryCodes.TO, CountryCodes.TT, CountryCodes.TV, CountryCodes.TZ, CountryCodes.UG, CountryCodes.UM, CountryCodes.US, CountryCodes.UY, CountryCodes.UZ, CountryCodes.VC, CountryCodes.VE, CountryCodes.VG, CountryCodes.VI, CountryCodes.VN, CountryCodes.VU, CountryCodes.WF, CountryCodes.WS, CountryCodes.YE, CountryCodes.ZM, CountryCodes.ZW, CountryCodes.ZA];\nexports.SMSupportedCountryCodes = SMSupportedCountryCodes;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getCleanDigitalData = getCleanDigitalData;\nexports.setupRoot = setupRoot;\nexports.getRoot = getRoot;\nexports.createMetricsTracker = void 0;\n\nvar _enums = _interopRequireDefault(require(\"./types/enums\"));\n\nvar _helpers = require(\"./helpers\");\n\nvar _utils = _interopRequireDefault(require(\"./utils\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar DEFAULT_USER_ID = '1';\nvar GLOBAL_KEY = 'sm_metrics_tracker_do_not_touch_this';\n/**\n * Creates a new DigitalData object and populates default values for the user\n *\n * @param userId The ID of the current user\n * @returns A DigitalData object populated only with default values\n */\n\nfunction getCleanDigitalData() {\n var userId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_USER_ID;\n return {\n page: {\n pageInfo: {\n pageId: '',\n attributes: {},\n pathname: ''\n }\n },\n events: [],\n components: [],\n user: {\n ep201: (0, _utils.default)('ep201'),\n ep202: (0, _utils.default)('ep202'),\n id: userId\n }\n };\n}\n/**\n * Returns the MetricsTracker root object. If it doesn't exist, creates it.\n *\n * @param glob A reference to the global object that MetricsTrackerRoot will by saved to\n * @returns The MetricsTrackerRoot\n */\n\n\nfunction setupRoot(glob) {\n if (!glob[GLOBAL_KEY]) {\n var root = {\n subscribers: [],\n automaticSubscribers: [],\n config: {\n user: {\n id: '',\n isAuthenticated: false\n },\n dataAnalyticsAPIPath: null,\n loggingAPIPath: null,\n country: 'GB',\n legacyWeb: '',\n gtmId: ''\n },\n digitalData: getCleanDigitalData(DEFAULT_USER_ID)\n };\n glob[GLOBAL_KEY] = root;\n }\n\n return glob[GLOBAL_KEY];\n}\n/**\n * Returns the global MetricsTrackerRoot object\n *\n * @param glob A reference to the global object on which the MetricsTrackerRoot object exists\n * @returns\n */\n\n\nfunction getRoot(glob) {\n if (!glob[GLOBAL_KEY]) {\n throw new Error('Please initialize MetricsTracker with a userId before tracking events.');\n }\n\n return glob[GLOBAL_KEY];\n}\n/**\n * Creates a MetricsTrackerType object with common level functionality that is wrapped\n * in scope by the provided global object reference.\n *\n * @param glob A reference to the global namespace that the metrics tracker will be added to\n * @returns A MetricsTrackerType object with it's context bound to the passed in `glob` ref\n */\n\n\nvar createMetricsTracker = function createMetricsTracker(glob) {\n return {\n initialize: function initialize(config) {\n throw new Error('initialize not implemented');\n },\n reset: function reset() {\n throw new Error('reset not implemented');\n },\n update: function update(config) {\n // for some data points within an SPA, the configuration must be\n // updated post initialization\n var root = getRoot(glob);\n root.config = _objectSpread(_objectSpread({}, root.config), config);\n return root;\n },\n\n /**\n * Convenience method to update parts of the user config that can be decorated post-initialization\n *\n * @param userConfig The updated user configuration\n */\n updateUserConfig: function updateUserConfig(userConfigUpdate) {\n var root = getRoot(glob);\n root.config.user = _objectSpread(_objectSpread({}, root.config.user), userConfigUpdate);\n return root;\n },\n getSubscribers: function getSubscribers() {\n var _getRoot = getRoot(glob),\n subscribers = _getRoot.subscribers;\n\n return subscribers;\n },\n getAutomaticSubscribers: function getAutomaticSubscribers() {\n var _getRoot2 = getRoot(glob),\n automaticSubscribers = _getRoot2.automaticSubscribers;\n\n return automaticSubscribers;\n },\n track: function track(event) {\n var _event$data, _event$data2, _event$data2$data;\n\n var root = getRoot(glob);\n\n if (root.config.user.id === '') {\n throw new Error('Please initialize MetricsTracker with a userId before tracking events.');\n }\n\n var maskedEvent = event; // mask email addresses\n\n if (event !== null && event !== void 0 && (_event$data = event.data) !== null && _event$data !== void 0 && _event$data.email) {\n maskedEvent.data.email = (0, _helpers.maskEmail)(event.data.email);\n }\n\n if (event !== null && event !== void 0 && (_event$data2 = event.data) !== null && _event$data2 !== void 0 && (_event$data2$data = _event$data2.data) !== null && _event$data2$data !== void 0 && _event$data2$data.email) {\n maskedEvent.data.data.email = (0, _helpers.maskEmail)(event.data.data.email);\n }\n\n if (_enums.default[event.name]) {\n root.digitalData.events.push(event);\n\n if (_enums.default.COMPONENT_ADD === event.name) {\n root.digitalData.components.push(event.data);\n }\n\n if (event.name === _enums.default.PAGE_VIEW || event.name === _enums.default.VIRTUAL_PAGE_VIEW) {\n root.digitalData = (0, _helpers.pageViewMutation)(event, root.digitalData);\n }\n\n root.subscribers.forEach(function (subscriber) {\n subscriber(event, root.config);\n });\n }\n },\n automaticTrack: function automaticTrack(event) {\n var root = getRoot(glob);\n root.automaticSubscribers.forEach(function (subscriber) {\n subscriber(event, root.config);\n });\n },\n addSubscriber: function addSubscriber(subscriber) {\n /**\n * We always want to allow the subscribers to subscribe. If the user\n * did not accept GDPR, we don't fire events; hence, we never violate GDPR.\n * If, however, the user does allow tracking, we don't want to subscribers\n * to re-subscribe.\n */\n var root = getRoot(glob);\n root.subscribers.push(subscriber);\n },\n addAutomaticSubscriber: function addAutomaticSubscriber(subscriber) {\n var root = getRoot(glob);\n root.automaticSubscribers.push(subscriber);\n },\n getConfig: function getConfig() {\n return getRoot(glob).config;\n },\n getDigitalData: function getDigitalData() {\n return getRoot(glob).digitalData;\n }\n };\n};\n\nexports.createMetricsTracker = createMetricsTracker;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generateMetricsAttribute = generateMetricsAttribute;\nexports.MetricsTracker = void 0;\n\nvar _utils = require(\"@sm/utils\");\n\nvar _enums = _interopRequireDefault(require(\"./types/enums\"));\n\nvar _BaseMetricsTracker = require(\"./BaseMetricsTracker\");\n\nvar _DataAnalyticsMetricsSubscriber = _interopRequireDefault(require(\"./subscribers/DataAnalyticsMetricsSubscriber\"));\n\nvar _LoggingMetricsSubscriber = _interopRequireDefault(require(\"./subscribers/LoggingMetricsSubscriber\"));\n\nvar _GTMMeticsSubscriber = _interopRequireDefault(require(\"./subscribers/GTMMeticsSubscriber\"));\n\nvar _FacebookPixelSubscriber = _interopRequireDefault(require(\"./subscribers/FacebookPixelSubscriber\"));\n\nvar _MixPanelSubscriber = _interopRequireDefault(require(\"./subscribers/MixPanelSubscriber\"));\n\nvar _AmplitudeSubscriber = _interopRequireDefault(require(\"./subscribers/AmplitudeSubscriber\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar _getClientEnvironment = (0, _utils.getClientEnvironmentDetails)(),\n isBrowser = _getClientEnvironment.isBrowser;\n\nvar glob = isBrowser ? window : global; // Import/require only in the browser\n\nvar delegatedEvents = isBrowser ? require('delegated-events') : null;\n/**\n * Generates a string of event data that can be used in an HTML attribute\n *\n * @param eventData The name and data of the event\n * @returns A formatted strong of the eventData passed in\n */\n\nfunction generateMetricsAttribute(eventData) {\n return JSON.stringify({\n name: eventData.name || _enums.default.ELEMENT_INTERACTION,\n data: eventData.data\n });\n}\n\nvar MetricsTracker = _objectSpread(_objectSpread({}, (0, _BaseMetricsTracker.createMetricsTracker)(glob)), {}, {\n /**\n * Initializes the events and configuration of the MetricsTracker\n *\n * @override\n * @param config\n * @returns\n */\n initialize: function initialize(config) {\n var root = (0, _BaseMetricsTracker.setupRoot)(glob);\n root.config = config;\n root.digitalData = (0, _BaseMetricsTracker.getCleanDigitalData)(config.user.id);\n setupEvents();\n return root;\n },\n reset: function reset() {\n var root = (0, _BaseMetricsTracker.getRoot)(glob);\n root.digitalData = (0, _BaseMetricsTracker.getCleanDigitalData)(root.config.user.id);\n root.subscribers = [];\n root.automaticSubscribers = []; // Add the mandatory dataAnalytics subscriber\n\n this.addSubscriber(_DataAnalyticsMetricsSubscriber.default); // Add the mandatory logging subscriber\n\n this.addSubscriber(_LoggingMetricsSubscriber.default); // Add Google Tag Manager dataLayer subscriber\n\n MetricsTracker.addSubscriber(_GTMMeticsSubscriber.default); // Add Facebook Pixel subscriber\n\n MetricsTracker.addSubscriber(_FacebookPixelSubscriber.default); // Add MixPanel Subscriber\n\n MetricsTracker.addSubscriber(_MixPanelSubscriber.default); // Add MixPanel Automatic Subscriber\n\n MetricsTracker.addAutomaticSubscriber(_MixPanelSubscriber.default); // Add Amplitude Subscriber\n\n MetricsTracker.addSubscriber(_AmplitudeSubscriber.default);\n return root;\n }\n});\n\nexports.MetricsTracker = MetricsTracker;\n\nfunction setupEvents() {\n if (!isBrowser) {\n return;\n }\n\n if (window && window.SM && window.SM.MetricsTracker) {\n // only create one event listener on the document\n // this makes it safe for consumer apps to call initialize multiple times\n return;\n }\n /**\n * Add on click event listener\n * Note - this is done in the getInstance method; hence, until this\n * method is called, the event handler would never be bound.\n */\n\n\n delegatedEvents.on('click', '[data-sm-metrics]', function gce(event) {\n if (event && event.currentTarget) {\n var metricsData = event.currentTarget.getAttribute('data-sm-metrics');\n\n if (metricsData) {\n var metricsDataJSON = JSON.parse(metricsData);\n var eventData = metricsDataJSON.data;\n MetricsTracker.track({\n name: metricsDataJSON.name || _enums.default.ELEMENT_INTERACTION,\n data: eventData\n });\n }\n }\n }); // Add the mandatory dataAnalytics subscriber\n\n MetricsTracker.addSubscriber(_DataAnalyticsMetricsSubscriber.default); // Add the mandatory logging subscriber\n\n MetricsTracker.addSubscriber(_LoggingMetricsSubscriber.default); // Add Google Tag Manager dataLayer subscriber\n\n MetricsTracker.addSubscriber(_GTMMeticsSubscriber.default); // Add Facebook Pixel subscriber\n\n MetricsTracker.addSubscriber(_FacebookPixelSubscriber.default); // Add MixPanel Subscriber\n\n MetricsTracker.addSubscriber(_MixPanelSubscriber.default); // Add Amplitude Subscriber\n\n MetricsTracker.addSubscriber(_AmplitudeSubscriber.default);\n setupAutomaticEvents();\n window.SM = window.SM || {};\n window.SM.MetricsTracker = MetricsTracker;\n}\n\nfunction setupAutomaticEvents() {\n var clickableLinks = ['.wds-button', '.wds-link', 'a', 'wds-switch__native', 'wds-checkbox__native', 'wds-radio__native', 'wds-list__item', 'wds-close', 'wds-popout__trigger', 'wds-has-menu', 'wds-slider__handle', 'wds-tab__tab-btn'];\n delegatedEvents.on('click', clickableLinks.join(','), function gce(event) {\n if (!event.target) {\n return;\n }\n\n var name = event.type;\n var target = event.target;\n var inputTarget = target;\n MetricsTracker.automaticTrack({\n name: _enums.default.ELEMENT_INTERACTION,\n data: {\n actionType: name,\n actionFlow: 'automatic',\n class: target.className,\n text: target.innerText,\n checked: inputTarget.checked || undefined,\n value: inputTarget.value || undefined\n }\n });\n }); // Add MixPanel Subscriber\n\n MetricsTracker.addAutomaticSubscriber(_MixPanelSubscriber.default);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.cloneDigitalData = cloneDigitalData;\nexports.pageViewMutation = pageViewMutation;\nexports.maskString = maskString;\nexports.maskEmail = maskEmail;\n\nvar _enums = _interopRequireDefault(require(\"./types/enums\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction cloneDigitalData(digitalData) {\n return JSON.parse(JSON.stringify(digitalData));\n}\n\nfunction pageViewMutation(event, digitalData) {\n if (event.name !== _enums.default.PAGE_VIEW && event.name !== _enums.default.VIRTUAL_PAGE_VIEW) {\n return digitalData;\n }\n\n var newDigitalData = cloneDigitalData(digitalData);\n var _event$data = event.data,\n pageId = _event$data.pageId,\n pathname = _event$data.pathname,\n attributes = _event$data.attributes;\n newDigitalData.page.pageInfo = {\n pageId: pageId,\n pathname: pathname,\n attributes: attributes\n };\n return newDigitalData;\n}\n\nfunction maskString(str) {\n if (!str) return '';\n if (str.length === 1) return '*';\n if (str.length === 2) return '**';\n return str.replace(/^(.)(.*)(.)$/, function (_, a, b, c) {\n return a + b.replace(/./g, '*') + c;\n });\n}\n\nfunction maskEmail(email) {\n if (!email) return '';\n return email.replace(/^(.*)(@.*)$/, function (_, a, b) {\n return a.replace(/./g, '*') + b;\n });\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"MetricsTracker\", {\n enumerable: true,\n get: function get() {\n return _MetricsTracker.MetricsTracker;\n }\n});\nObject.defineProperty(exports, \"generateMetricsAttribute\", {\n enumerable: true,\n get: function get() {\n return _MetricsTracker.generateMetricsAttribute;\n }\n});\nObject.defineProperty(exports, \"PageMetricsProvider\", {\n enumerable: true,\n get: function get() {\n return _PageMetricsProvider.default;\n }\n});\nObject.defineProperty(exports, \"ComponentMetricsProvider\", {\n enumerable: true,\n get: function get() {\n return _ComponentMetricsProvider.default;\n }\n});\nObject.defineProperty(exports, \"SPARouteMetricsProvider\", {\n enumerable: true,\n get: function get() {\n return _SPARouteMetricsProvider.default;\n }\n});\nObject.defineProperty(exports, \"USER_EVENTS\", {\n enumerable: true,\n get: function get() {\n return _enums.default;\n }\n});\n\nvar _MetricsTracker = require(\"./MetricsTracker\");\n\nvar _PageMetricsProvider = _interopRequireDefault(require(\"./providers/PageMetricsProvider\"));\n\nvar _ComponentMetricsProvider = _interopRequireDefault(require(\"./providers/ComponentMetricsProvider\"));\n\nvar _SPARouteMetricsProvider = _interopRequireDefault(require(\"./providers/SPARouteMetricsProvider\"));\n\nvar _enums = _interopRequireDefault(require(\"./types/enums\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _utils = require(\"@sm/utils\");\n\nvar _ = require(\"..\");\n\nvar ComponentMetricsProvider = function ComponentMetricsProvider(_ref) {\n var name = _ref.name,\n _ref$attributes = _ref.attributes,\n attributes = _ref$attributes === void 0 ? null : _ref$attributes,\n _ref$disableDA = _ref.disableDA,\n disableDA = _ref$disableDA === void 0 ? false : _ref$disableDA,\n actionFlow = _ref.actionFlow,\n actionType = _ref.actionType,\n children = _ref.children;\n var envDetails = (0, _utils.getClientEnvironmentDetails)();\n\n if (envDetails.isBrowser) {\n _.MetricsTracker.track({\n name: _.USER_EVENTS.COMPONENT_ADD,\n data: {\n componentName: name,\n attributes: attributes,\n disableDA: disableDA,\n actionType: actionType,\n actionFlow: actionFlow\n }\n });\n }\n\n return children;\n};\n\nvar _default = ComponentMetricsProvider;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = require(\"react\");\n\nvar _ = require(\"..\");\n\nvar PageMetricsProvider = function PageMetricsProvider(_ref) {\n var pageId = _ref.pageId,\n pathname = _ref.pathname,\n attributes = _ref.attributes,\n GDPR = _ref.GDPR,\n user = _ref.user,\n country = _ref.country,\n children = _ref.children;\n var _GDPR$hasGDPRConsent = GDPR.hasGDPRConsent,\n hasGDPRConsent = _GDPR$hasGDPRConsent === void 0 ? false : _GDPR$hasGDPRConsent;\n var _user$id = user.id,\n userId = _user$id === void 0 ? '1' : _user$id,\n _user$package = user.package,\n packageId = _user$package === void 0 ? '1' : _user$package,\n _user$email = user.email,\n email = _user$email === void 0 ? '' : _user$email;\n (0, _react.useEffect)(function () {\n _.MetricsTracker.track({\n name: _.USER_EVENTS.PAGE_VIEW,\n data: {\n actionType: _.USER_EVENTS.PAGE_VIEW,\n actionFlow: pageId,\n pathname: pathname,\n pageId: pageId,\n attributes: attributes,\n data: {\n hasGDPRConsent: hasGDPRConsent,\n userId: userId,\n packageId: packageId,\n email: email,\n country: country\n }\n }\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n /**\n * Adding an empty array ensures that this is always and only called\n * on first page renders/reloads. SPA will never call this.\n */\n ]);\n return children;\n};\n\nvar _default = PageMetricsProvider;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = require(\"react\");\n\nvar _ = require(\"..\");\n\nvar SPARouteMetricsProvider = function SPARouteMetricsProvider(_ref) {\n var pageId = _ref.pageId,\n pathname = _ref.pathname,\n legacyWeb = _ref.legacyWeb,\n attributes = _ref.attributes,\n GDPR = _ref.GDPR,\n user = _ref.user,\n country = _ref.country,\n children = _ref.children;\n var _GDPR$hasGDPRConsent = GDPR.hasGDPRConsent,\n hasGDPRConsent = _GDPR$hasGDPRConsent === void 0 ? false : _GDPR$hasGDPRConsent;\n var _user$id = user.id,\n userId = _user$id === void 0 ? '1' : _user$id,\n _user$package = user.package,\n packageId = _user$package === void 0 ? '1' : _user$package,\n _user$email = user.email,\n email = _user$email === void 0 ? '' : _user$email;\n (0, _react.useEffect)(function () {\n // update the global config\n _.MetricsTracker.update({\n pageId: pageId,\n legacyWeb: legacyWeb\n });\n /*\n // TODO: This shouldn't fire on intital render, but it needs to right now\n // to ensure all page metrics for SPA are accurately recorded. For example\n // in the SPA, PAGE_VIEW only knows about the SPA container, not the page within\n // the container. So the VIRTUAL_PAGE_VIEW is needed to track the actual page content\n */\n\n\n _.MetricsTracker.track({\n name: _.USER_EVENTS.VIRTUAL_PAGE_VIEW,\n data: {\n actionType: _.USER_EVENTS.VIRTUAL_PAGE_VIEW,\n actionFlow: pageId,\n pageId: pageId,\n attributes: attributes,\n pathname: pathname,\n data: {\n hasGDPRConsent: hasGDPRConsent,\n userId: userId,\n packageId: packageId,\n email: email,\n countryCode: country\n }\n }\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, [pageId, legacyWeb, pathname]);\n return children;\n};\n\nvar _default = SPARouteMetricsProvider;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = amplitudeSubscriber;\nvar _excluded = [\"amplitudeEvent\", \"actionType\", \"actionFlow\"];\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction amplitudeSubscriber(digitalDataEvent, config) {\n var amplitudeToken = config.amplitudeToken,\n user = config.user;\n var digitalData = digitalDataEvent.data;\n\n var amplitudeEvent = digitalData.amplitudeEvent,\n actionType = digitalData.actionType,\n actionFlow = digitalData.actionFlow,\n data = _objectWithoutProperties(digitalData, _excluded);\n\n if ( // bail if we have no ampltude token\n !amplitudeToken || // or if this is not an amplitude event\n !amplitudeEvent) {\n return;\n }\n\n var userId = user.id,\n isAuthenticated = user.isAuthenticated,\n languageId = user.languageId,\n userPackageId = user.package,\n userPackageName = user.packageName,\n userSubscriptionStatus = user.subscriptionStatus; // we'll include the amplitude SDK here via \"require\" to avoid getting\n // yelled at by the test runner since amplitude makes explicit references\n // to \"window\", which doesn't exist in the test environment before we mock it\n // eslint-disable-next-line global-require\n\n var amplitude = require('amplitude-js');\n\n var amplitudeInstance = amplitude.getInstance();\n amplitudeInstance.init(amplitudeToken);\n\n if (isAuthenticated) {\n amplitudeInstance.setUserId(userId);\n amplitudeInstance.setUserProperties({\n languageId: languageId,\n userPackageId: userPackageId,\n userPackageName: userPackageName,\n userSubscriptionStatus: userSubscriptionStatus\n });\n }\n\n amplitudeInstance.logEvent(amplitudeEvent, _objectSpread({}, data));\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = dataAnalyticsMetricsSubscriber;\n\nfunction dataAnalyticsMetricsSubscriber(digitalDataEvent, metricsTrackerConfig) {\n var eventData = JSON.parse(JSON.stringify(digitalDataEvent.data)); // If the user doesn't want the event to be consumed for analytics, just return.\n\n if (eventData.disableDA === true) {\n return;\n }\n\n var dataAnalyticsAPIPath = metricsTrackerConfig.dataAnalyticsAPIPath,\n legacyWeb = metricsTrackerConfig.legacyWeb;\n var eventMeta = {\n ui_event: '',\n ui_goal: '',\n url: '',\n origin: '',\n legacy_web: legacyWeb\n }; // Validate required parameters for data analytics.\n\n if (!eventData.actionType || !eventData.actionFlow) {\n throw new Error('Incomplete data analytics tracking parameters - actionType and actionFlow are required parameters');\n }\n\n eventMeta.ui_event = eventData.actionType;\n eventMeta.ui_goal = eventData.actionFlow;\n eventMeta.url = window.location.href;\n eventMeta.origin = eventData.origin || 'user';\n delete eventData.actionType;\n delete eventData.actionFlow;\n delete eventData.origin; // FUTURE: The listener should implement experiments metrics.\n // Send the event to the data analytics api\n\n if (dataAnalyticsAPIPath) {\n fetch(dataAnalyticsAPIPath, {\n method: 'POST',\n cache: 'no-cache',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8'\n },\n body: JSON.stringify({\n data: eventData,\n meta: eventMeta\n })\n });\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = facebookPixelSubscriber;\n\nvar _enums = _interopRequireDefault(require(\"../types/enums\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nvar whiteListedURLs = [/\\/collect\\/audience\\/.*\\/status/];\n\nvar isValidURL = function isValidURL(url) {\n return whiteListedURLs.some(function (pattern) {\n return url.match(pattern) !== null;\n });\n};\n\nfunction facebookPixelSubscriber(digitalDataEvent) {\n // eslint-disable-next-line global-require\n var ReactPixel = require('react-facebook-pixel');\n\n var _JSON$parse = JSON.parse(JSON.stringify(digitalDataEvent.data)),\n name = _JSON$parse.name,\n data = _JSON$parse.data,\n key = _JSON$parse.key;\n\n var actionType = digitalDataEvent.name;\n\n if (isValidURL(window.location.href) && key) {\n ReactPixel.init(key);\n\n if (actionType === _enums.default.USER_METADATA && name && data) {\n ReactPixel.track(name, data);\n }\n\n if (actionType === _enums.default.PAGE_VIEW) ReactPixel.pageView();\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = gtmMetricsSubscriber;\n\nvar _utils = require(\"@sm/utils\");\n\nvar _helpers = require(\"../helpers\");\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction gtmMetricsSubscriber(digitalDataEvent) {\n var data = digitalDataEvent.data,\n name = digitalDataEvent.name;\n var actionType = data.actionType,\n actionFlow = data.actionFlow; // flatten the data object\n\n var gtmDataLayer = _objectSpread(_objectSpread({}, data), data.data);\n\n delete gtmDataLayer.data;\n var envDetails = (0, _utils.getClientEnvironmentDetails)();\n\n if (envDetails.isBrowser) {\n var pagePath = window.location.pathname;\n window.dataLayer = window.dataLayer || [];\n\n var eventObj = function eventObj(_ref) {\n var hasGDPRConsent = _ref.hasGDPRConsent,\n userId = _ref.userId,\n packageId = _ref.packageId,\n email = _ref.email,\n countryCode = _ref.countryCode;\n return {\n PAGE_VIEW: {\n event: 'pageView',\n loadMarketingContainer: hasGDPRConsent,\n user_id: userId,\n package_id: packageId,\n email: (0, _helpers.maskEmail)(email),\n country_code: countryCode\n },\n VIRTUAL_PAGE_VIEW: {\n event: 'virtualPageView',\n virtualPageUrl: pagePath,\n virtualPageTitle: actionFlow\n },\n GDPR_ACTION: {\n event: actionFlow,\n loadMarketingContainer: actionFlow !== 'denyConsent'\n }\n };\n };\n\n var gtm = eventObj(gtmDataLayer)[actionType] || _objectSpread({\n event: name\n }, gtmDataLayer);\n\n if (Object.keys(gtm).length) {\n window.dataLayer.push(gtm);\n }\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = loggingMetricsSubscriber;\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction loggingMetricsSubscriber(digitalDataEvent, metricsTrackerConfig) {\n var eventData = JSON.parse(JSON.stringify(digitalDataEvent.data));\n var logEventData = eventData ? eventData.log : null;\n var loggingAPIPath = metricsTrackerConfig.loggingAPIPath;\n\n if (typeof loggingAPIPath !== 'undefined' && typeof logEventData !== 'undefined' && logEventData !== null && loggingAPIPath) {\n delete eventData.log;\n\n var bodyRequestObject = _objectSpread({\n data: eventData\n }, logEventData);\n\n fetch(loggingAPIPath, {\n method: 'POST',\n cache: 'no-cache',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8'\n },\n body: JSON.stringify(bodyRequestObject)\n });\n }\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = mixPanelSubscriber;\n\nvar _mixpanelBrowser = _interopRequireDefault(require(\"mixpanel-browser\"));\n\nvar _helpers = require(\"../helpers\");\n\nvar _excluded = [\"actionType\", \"actionFlow\"];\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction mixPanelSubscriber(digitalDataEvent, config) {\n var mixpanelToken = config.mixpanelToken,\n user = config.user;\n var name = digitalDataEvent.name,\n digitalData = digitalDataEvent.data;\n\n var actionType = digitalData.actionType,\n actionFlow = digitalData.actionFlow,\n data = _objectWithoutProperties(digitalData, _excluded);\n\n if (!mixpanelToken) {\n return;\n }\n\n if (!actionType || !actionFlow) {\n return;\n }\n\n var userId = user.id,\n isAuthenticated = user.isAuthenticated,\n username = user.username,\n languageId = user.languageId,\n _package = user.package,\n email = user.email;\n\n _mixpanelBrowser.default.init(mixpanelToken);\n\n if (isAuthenticated) {\n _mixpanelBrowser.default.identify(userId);\n\n _mixpanelBrowser.default.people.set({\n $name: (0, _helpers.maskString)(username),\n $email: (0, _helpers.maskEmail)(email),\n languageId: languageId,\n package: _package\n });\n }\n\n _mixpanelBrowser.default.track(name, _objectSpread({\n actionType: actionType,\n actionFlow: actionFlow\n }, data));\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.USER_SUBSCRIPTION_STATUS = void 0;\nvar USER_EVENTS;\n\n(function (USER_EVENTS) {\n USER_EVENTS[\"PAGE_VIEW\"] = \"PAGE_VIEW\";\n USER_EVENTS[\"VIRTUAL_PAGE_VIEW\"] = \"VIRTUAL_PAGE_VIEW\";\n USER_EVENTS[\"COMPONENT_ADD\"] = \"COMPONENT_ADD\";\n USER_EVENTS[\"COMPONENT_ERROR\"] = \"COMPONENT_ERROR\";\n USER_EVENTS[\"DATA_FETCH_ERROR\"] = \"DATA_FETCH_ERROR\";\n USER_EVENTS[\"ELEMENT_INTERACTION\"] = \"ELEMENT_INTERACTION\";\n USER_EVENTS[\"GDPR_ACTION\"] = \"GDPR_ACTION\";\n USER_EVENTS[\"NAVIGATION\"] = \"NAVIGATION\";\n USER_EVENTS[\"USER_METADATA\"] = \"USER_METADATA\";\n})(USER_EVENTS || (USER_EVENTS = {}));\n\nvar USER_SUBSCRIPTION_STATUS;\nexports.USER_SUBSCRIPTION_STATUS = USER_SUBSCRIPTION_STATUS;\n\n(function (USER_SUBSCRIPTION_STATUS) {\n USER_SUBSCRIPTION_STATUS[\"NEW\"] = \"new\";\n USER_SUBSCRIPTION_STATUS[\"CHURNED\"] = \"churned\";\n USER_SUBSCRIPTION_STATUS[\"ACTIVE\"] = \"active\";\n})(USER_SUBSCRIPTION_STATUS || (exports.USER_SUBSCRIPTION_STATUS = USER_SUBSCRIPTION_STATUS = {}));\n\nvar _default = USER_EVENTS;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getCookieValue;\n\nfunction getCookieValue(cname, defaultValue) {\n // `getClientEnvironmentDetails` could provide this information, but imports\n // the \"bowser\" package to decorate a bunch of details we don't need (that's ~5k minified)\n // As such, we'll just lift the line we actually want:\n // https://code.corp.surveymonkey.com/webplatform/smpackages/blob/master/packages/utils/src/environment/index.ts#L83\n var isBrowser = typeof window === 'object';\n if (!isBrowser) return '';\n var name = \"\".concat(cname, \"=\");\n var decodedCookie = decodeURIComponent(document.cookie);\n var ca = decodedCookie.split(';');\n\n for (var i = 0; i < ca.length; i += 1) {\n var c = ca[i];\n\n while (c.charAt(0) === ' ') {\n c = c.substring(1);\n }\n\n if (c.indexOf(name) === 0) {\n return c.substring(name.length, c.length);\n }\n }\n\n return defaultValue || '';\n}\n\nmodule.exports = exports.default;","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { createUseStyles, useTheme } from 'react-jss';\n\nfunction toVal(mix) {\n var k,\n y,\n str = '';\n\n if (typeof mix === 'string' || typeof mix === 'number') {\n str += mix;\n } else if (typeof mix === 'object') {\n if (Array.isArray(mix)) {\n for (k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (y = toVal(mix[k])) {\n str && (str += ' ');\n str += y;\n }\n }\n }\n } else {\n for (k in mix) {\n if (mix[k]) {\n str && (str += ' ');\n str += k;\n }\n }\n }\n }\n\n return str;\n}\n\nfunction clsx() {\n var i = 0,\n tmp,\n x,\n str = '';\n\n while (i < arguments.length) {\n if (tmp = arguments[i++]) {\n if (x = toVal(tmp)) {\n str && (str += ' ');\n str += x;\n }\n }\n }\n\n return str;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !_isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n} // based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js\n\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\n\n\nvar ERRORS = {\n \"1\": \"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\\n\\n\",\n \"2\": \"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\\n\\n\",\n \"3\": \"Passed an incorrect argument to a color function, please pass a string representation of a color.\\n\\n\",\n \"4\": \"Couldn't generate valid rgb string from %s, it returned %s.\\n\\n\",\n \"5\": \"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\\n\\n\",\n \"6\": \"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\\n\\n\",\n \"7\": \"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\\n\\n\",\n \"8\": \"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\\n\\n\",\n \"9\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"10\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"11\": \"Invalid value passed as base to modularScale, expected number or em string but got \\\"%s\\\"\\n\\n\",\n \"12\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"13\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"14\": \"Passed invalid pixel value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"15\": \"Passed invalid base value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"16\": \"You must provide a template to this method.\\n\\n\",\n \"17\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"18\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"19\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"20\": \"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"21\": \"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"22\": \"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"23\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"24\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"25\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"26\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"27\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"28\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"29\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"30\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"31\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"32\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\\n\\n\",\n \"33\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"34\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"35\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"36\": \"Property must be a string value.\\n\\n\",\n \"37\": \"Syntax Error at %s.\\n\\n\",\n \"38\": \"Formula contains a function that needs parentheses at %s.\\n\\n\",\n \"39\": \"Formula is missing closing parenthesis at %s.\\n\\n\",\n \"40\": \"Formula has too many closing parentheses at %s.\\n\\n\",\n \"41\": \"All values in a formula must have the same unit or be unitless.\\n\\n\",\n \"42\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"43\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"44\": \"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\\n\\n\",\n \"45\": \"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\\n\\n\",\n \"46\": \"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\\n\\n\",\n \"47\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"48\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"49\": \"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"50\": \"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"51\": \"Expects the first argument object to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"52\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"53\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"54\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"55\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"56\": \"linearGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"57\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"58\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"59\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"60\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"61\": \"Property must be a string value.\\n\\n\",\n \"62\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"63\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"64\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"65\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\\n\\n\",\n \"66\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"67\": \"You must provide a template to this method.\\n\\n\",\n \"68\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"69\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got %s instead.\\n\\n\",\n \"70\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got %s instead.\\n\\n\",\n \"71\": \"Passed invalid pixel value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"72\": \"Passed invalid base value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"73\": \"Please provide a valid CSS variable.\\n\\n\",\n \"74\": \"CSS variable not found and no default was provided.\\n\\n\",\n \"75\": \"important requires a valid style object, got a %s instead.\\n\\n\",\n \"76\": \"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\\n\\n\",\n \"77\": \"remToPx expects a value in \\\"rem\\\" but you provided it in \\\"%s\\\".\\n\\n\",\n \"78\": \"base must be set in \\\"px\\\" or \\\"%\\\" but you set it in \\\"%s\\\".\\n\"\n};\n/**\n * super basic version of sprintf\n * @private\n */\n\nfunction format() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var a = args[0];\n var b = [];\n var c;\n\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\n\n\nvar PolishedError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(PolishedError, _Error);\n\n function PolishedError(code) {\n var _this;\n\n if (process.env.NODE_ENV === 'production') {\n _this = _Error.call(this, \"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\" + code + \" for more information.\") || this;\n } else {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;\n }\n\n return _assertThisInitialized(_this);\n }\n\n return PolishedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nfunction colorToInt(color) {\n return Math.round(color * 255);\n}\n\nfunction convertToInt(red, green, blue) {\n return colorToInt(red) + \",\" + colorToInt(green) + \",\" + colorToInt(blue);\n}\n\nfunction hslToRgb(hue, saturation, lightness, convert) {\n if (convert === void 0) {\n convert = convertToInt;\n }\n\n if (saturation === 0) {\n // achromatic\n return convert(lightness, lightness, lightness);\n } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n\n\n var huePrime = (hue % 360 + 360) % 360 / 60;\n var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n var red = 0;\n var green = 0;\n var blue = 0;\n\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n\n var lightnessModification = lightness - chroma / 2;\n var finalRed = red + lightnessModification;\n var finalGreen = green + lightnessModification;\n var finalBlue = blue + lightnessModification;\n return convert(finalRed, finalGreen, finalBlue);\n}\n\nvar namedColorMap = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '639',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n};\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n * @private\n */\n\nfunction nameToHex(color) {\n if (typeof color !== 'string') return color;\n var normalizedColorName = color.toLowerCase();\n return namedColorMap[normalizedColorName] ? \"#\" + namedColorMap[normalizedColorName] : color;\n}\n\nvar hexRegex = /^#[a-fA-F0-9]{6}$/;\nvar hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;\nvar reducedHexRegex = /^#[a-fA-F0-9]{3}$/;\nvar reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;\nvar rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/i;\nvar rgbaRegex = /^rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\nvar hslRegex = /^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i;\nvar hslaRegex = /^hsla\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\n/**\n * Returns an RgbColor or RgbaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a RgbColor or RgbaColor object back to a string.\n *\n * @example\n * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1\n * const color1 = parseToRgb('rgb(255, 0, 0)');\n * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2\n * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');\n */\n\nfunction parseToRgb(color) {\n if (typeof color !== 'string') {\n throw new PolishedError(3);\n }\n\n var normalizedColor = nameToHex(color);\n\n if (normalizedColor.match(hexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16)\n };\n }\n\n if (normalizedColor.match(hexRgbaRegex)) {\n var alpha = parseFloat((parseInt(\"\" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16),\n alpha: alpha\n };\n }\n\n if (normalizedColor.match(reducedHexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16)\n };\n }\n\n if (normalizedColor.match(reducedRgbaHexRegex)) {\n var _alpha = parseFloat((parseInt(\"\" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));\n\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16),\n alpha: _alpha\n };\n }\n\n var rgbMatched = rgbRegex.exec(normalizedColor);\n\n if (rgbMatched) {\n return {\n red: parseInt(\"\" + rgbMatched[1], 10),\n green: parseInt(\"\" + rgbMatched[2], 10),\n blue: parseInt(\"\" + rgbMatched[3], 10)\n };\n }\n\n var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));\n\n if (rgbaMatched) {\n return {\n red: parseInt(\"\" + rgbaMatched[1], 10),\n green: parseInt(\"\" + rgbaMatched[2], 10),\n blue: parseInt(\"\" + rgbaMatched[3], 10),\n alpha: parseFloat(\"\" + rgbaMatched[4])\n };\n }\n\n var hslMatched = hslRegex.exec(normalizedColor);\n\n if (hslMatched) {\n var hue = parseInt(\"\" + hslMatched[1], 10);\n var saturation = parseInt(\"\" + hslMatched[2], 10) / 100;\n var lightness = parseInt(\"\" + hslMatched[3], 10) / 100;\n var rgbColorString = \"rgb(\" + hslToRgb(hue, saturation, lightness) + \")\";\n var hslRgbMatched = rgbRegex.exec(rgbColorString);\n\n if (!hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + hslRgbMatched[1], 10),\n green: parseInt(\"\" + hslRgbMatched[2], 10),\n blue: parseInt(\"\" + hslRgbMatched[3], 10)\n };\n }\n\n var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));\n\n if (hslaMatched) {\n var _hue = parseInt(\"\" + hslaMatched[1], 10);\n\n var _saturation = parseInt(\"\" + hslaMatched[2], 10) / 100;\n\n var _lightness = parseInt(\"\" + hslaMatched[3], 10) / 100;\n\n var _rgbColorString = \"rgb(\" + hslToRgb(_hue, _saturation, _lightness) + \")\";\n\n var _hslRgbMatched = rgbRegex.exec(_rgbColorString);\n\n if (!_hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, _rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + _hslRgbMatched[1], 10),\n green: parseInt(\"\" + _hslRgbMatched[2], 10),\n blue: parseInt(\"\" + _hslRgbMatched[3], 10),\n alpha: parseFloat(\"\" + hslaMatched[4])\n };\n }\n\n throw new PolishedError(5);\n}\n\nfunction rgbToHsl(color) {\n // make sure rgb are contained in a set of [0, 255]\n var red = color.red / 255;\n var green = color.green / 255;\n var blue = color.blue / 255;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var lightness = (max + min) / 2;\n\n if (max === min) {\n // achromatic\n if (color.alpha !== undefined) {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness,\n alpha: color.alpha\n };\n } else {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness\n };\n }\n }\n\n var hue;\n var delta = max - min;\n var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n\n switch (max) {\n case red:\n hue = (green - blue) / delta + (green < blue ? 6 : 0);\n break;\n\n case green:\n hue = (blue - red) / delta + 2;\n break;\n\n default:\n // blue case\n hue = (red - green) / delta + 4;\n break;\n }\n\n hue *= 60;\n\n if (color.alpha !== undefined) {\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness,\n alpha: color.alpha\n };\n }\n\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness\n };\n}\n/**\n * Returns an HslColor or HslaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a HslColor or HslaColor object back to a string.\n *\n * @example\n * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1\n * const color1 = parseToHsl('rgb(255, 0, 0)');\n * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2\n * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');\n */\n\n\nfunction parseToHsl(color) {\n // Note: At a later stage we can optimize this function as right now a hsl\n // color would be parsed converted to rgb values and converted back to hsl.\n return rgbToHsl(parseToRgb(color));\n}\n/**\n * Reduces hex values if possible e.g. #ff8866 to #f86\n * @private\n */\n\n\nvar reduceHexValue = function reduceHexValue(value) {\n if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {\n return \"#\" + value[1] + value[3] + value[5];\n }\n\n return value;\n};\n\nfunction numberToHex(value) {\n var hex = value.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction colorToHex(color) {\n return numberToHex(Math.round(color * 255));\n}\n\nfunction convertToHex(red, green, blue) {\n return reduceHexValue(\"#\" + colorToHex(red) + colorToHex(green) + colorToHex(blue));\n}\n\nfunction hslToHex(hue, saturation, lightness) {\n return hslToRgb(hue, saturation, lightness, convertToHex);\n}\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsl(359, 0.75, 0.4),\n * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsl(359, 0.75, 0.4)};\n * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#b3191c\";\n * background: \"#b3191c\";\n * }\n */\n\n\nfunction hsl(value, saturation, lightness) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {\n return hslToHex(value, saturation, lightness);\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {\n return hslToHex(value.hue, value.saturation, value.lightness);\n }\n\n throw new PolishedError(1);\n}\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsla(359, 0.75, 0.4, 0.7),\n * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),\n * background: hsla(359, 0.75, 0.4, 1),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsla(359, 0.75, 0.4, 0.7)};\n * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};\n * background: ${hsla(359, 0.75, 0.4, 1)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"#b3191c\";\n * }\n */\n\n\nfunction hsla(value, saturation, lightness, alpha) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {\n return alpha >= 1 ? hslToHex(value, saturation, lightness) : \"rgba(\" + hslToRgb(value, saturation, lightness) + \",\" + alpha + \")\";\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {\n return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : \"rgba(\" + hslToRgb(value.hue, value.saturation, value.lightness) + \",\" + value.alpha + \")\";\n }\n\n throw new PolishedError(2);\n}\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgb(255, 205, 100),\n * background: rgb({ red: 255, green: 205, blue: 100 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgb(255, 205, 100)};\n * background: ${rgb({ red: 255, green: 205, blue: 100 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffcd64\";\n * background: \"#ffcd64\";\n * }\n */\n\n\nfunction rgb(value, green, blue) {\n if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {\n return reduceHexValue(\"#\" + numberToHex(value) + numberToHex(green) + numberToHex(blue));\n } else if (typeof value === 'object' && green === undefined && blue === undefined) {\n return reduceHexValue(\"#\" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));\n }\n\n throw new PolishedError(6);\n}\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgba(255, 205, 100, 0.7),\n * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),\n * background: rgba(255, 205, 100, 1),\n * background: rgba('#ffffff', 0.4),\n * background: rgba('black', 0.7),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgba(255, 205, 100, 0.7)};\n * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};\n * background: ${rgba(255, 205, 100, 1)};\n * background: ${rgba('#ffffff', 0.4)};\n * background: ${rgba('black', 0.7)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"#ffcd64\";\n * background: \"rgba(255,255,255,0.4)\";\n * background: \"rgba(0,0,0,0.7)\";\n * }\n */\n\n\nfunction rgba(firstValue, secondValue, thirdValue, fourthValue) {\n if (typeof firstValue === 'string' && typeof secondValue === 'number') {\n var rgbValue = parseToRgb(firstValue);\n return \"rgba(\" + rgbValue.red + \",\" + rgbValue.green + \",\" + rgbValue.blue + \",\" + secondValue + \")\";\n } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {\n return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : \"rgba(\" + firstValue + \",\" + secondValue + \",\" + thirdValue + \",\" + fourthValue + \")\";\n } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {\n return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : \"rgba(\" + firstValue.red + \",\" + firstValue.green + \",\" + firstValue.blue + \",\" + firstValue.alpha + \")\";\n }\n\n throw new PolishedError(7);\n}\n\nvar isRgb = function isRgb(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isRgba = function isRgba(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';\n};\n\nvar isHsl = function isHsl(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isHsla = function isHsla(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';\n};\n/**\n * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: toColorString({ red: 255, green: 205, blue: 100 }),\n * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${toColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\n\n\nfunction toColorString(color) {\n if (typeof color !== 'object') throw new PolishedError(8);\n if (isRgba(color)) return rgba(color);\n if (isRgb(color)) return rgb(color);\n if (isHsla(color)) return hsla(color);\n if (isHsl(color)) return hsl(color);\n throw new PolishedError(8);\n} // Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\n\n\nfunction curried(f, length, acc) {\n return function fn() {\n // eslint-disable-next-line prefer-rest-params\n var combined = acc.concat(Array.prototype.slice.call(arguments));\n return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);\n };\n} // eslint-disable-next-line no-redeclare\n\n\nfunction curry(f) {\n // eslint-disable-line no-redeclare\n return curried(f, f.length, []);\n}\n\nfunction guard(lowerBoundary, upperBoundary, value) {\n return Math.max(lowerBoundary, Math.min(upperBoundary, value));\n}\n/**\n * Returns a string value for the darkened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: darken(0.2, '#FFCD64'),\n * background: darken('0.2', 'rgba(255,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${darken(0.2, '#FFCD64')};\n * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffbd31\";\n * background: \"rgba(255,189,49,0.7)\";\n * }\n */\n\n\nfunction darken(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDarken = /*#__PURE__*/curry\n/* :: */\n(darken);\n/**\n * Returns a string value for the lightened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: lighten(0.2, '#CCCD64'),\n * background: lighten('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${lighten(0.2, '#FFCD64')};\n * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e5e6b1\";\n * background: \"rgba(229,230,177,0.7)\";\n * }\n */\n\nfunction lighten(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedLighten = /*#__PURE__*/curry\n/* :: */\n(lighten);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n} // Taken from lodash: https://github.com/lodash/lodash/blob/master/uniqueId.js\n\n\nvar getState = function getState(state, newState) {\n return _objectSpread(_objectSpread({}, state), newState);\n};\n\nvar isBrowser = typeof window !== 'undefined';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nvar _excluded$1 = [\"style\", \"className\"];\n\nvar safeRest = function (_ref) {\n _ref.style;\n _ref.className;\n\n var props = _objectWithoutProperties(_ref, _excluded$1);\n\n return props;\n}; // Taken from lodash: https://github.com/lodash/lodash/blob/master/uniqueId.js\n\n\nvar idCounter = 0;\n\nvar uniqueId = function uniqueId(prefix) {\n var id = ++idCounter; // eslint-disable-line no-plusplus\n\n if (prefix == null) {\n throw new Error('The value is missing in uniqueId() parameter');\n }\n\n return \"\".concat(prefix).concat(id);\n}; // https://snook.ca/archives/html_and_css/hiding-content-for-accessibility\n\n\nvar visuallyHidden = {\n border: '0px',\n clip: 'rect(1px, 1px, 1px, 1px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n width: '1px',\n // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n};\nvar clearfix = {\n '&:after': {\n content: '',\n display: 'block',\n clear: 'both'\n }\n};\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nvar createMemoStyles = function createMemoStyles(styles) {\n var useStyles = createUseStyles(styles);\n\n var useMemoStyles = function useMemoStyles(props) {\n var dependencies = _typeof(props) === 'object' && props !== null ? Object.keys(props).filter(function (key) {\n return key !== 'theme';\n }).map(function (key) {\n return props[key];\n }) : [];\n var stylesProps = useMemo(function () {\n return props;\n }, dependencies);\n return useStyles(stylesProps);\n };\n\n return useMemoStyles;\n};\n\nvar _excluded = [\"m\", \"mx\", \"my\", \"mt\", \"mb\", \"ml\", \"mr\", \"p\", \"px\", \"py\", \"pt\", \"pb\", \"pl\", \"pr\"];\nvar spacingOptions = Object.freeze([1, 2, 3, 4, 5, 6, 7, 8, 9]); // this pattern is described in React's documentation: https://reactjs.org/docs/higher-order-components.html#convention-wrap-the-display-name-for-easy-debugging\n\nfunction getDisplayName(Component) {\n return Component.displayName || Component.name || 'Component';\n}\n\nfunction withSpacing(Component) {\n /**\n * JSS injects css styles in the order of `createUseStyles` usage.\n * Hence, useStyles needs to be instantiated every single time while\n * using this HOC because it should be the last `createUseStyles` usage\n * for a component. With this mechanism, `withSpacing` overwrites the component\n * spacing. Not ideal for a design system, but we are waiting on the\n * below ticket.\n *\n * Note: https://jira.surveymonkey.com/browse/WRENCH-1107\n *\n * If the decision is have `withStyles` NOT overwrite the component spacing,\n * just move this declaration outside of this component. `withSpacing` will then\n * add to the styles and not overwrite them.\n */\n var useStyles = createMemoStyles(function (theme) {\n return {\n wrenchSpacing: function wrenchSpacing(_ref) {\n var margin = _ref.margin,\n padding = _ref.padding;\n return {\n marginTop: theme.spacing[margin.t],\n marginRight: theme.spacing[margin.r],\n marginBottom: theme.spacing[margin.b],\n marginLeft: theme.spacing[margin.l],\n paddingTop: theme.spacing[padding.t],\n paddingRight: theme.spacing[padding.r],\n paddingBottom: theme.spacing[padding.b],\n paddingLeft: theme.spacing[padding.l]\n };\n }\n };\n });\n\n function WithSpacing(_ref2) {\n var m = _ref2.m,\n mx = _ref2.mx,\n my = _ref2.my,\n mt = _ref2.mt,\n mb = _ref2.mb,\n ml = _ref2.ml,\n mr = _ref2.mr,\n p = _ref2.p,\n px = _ref2.px,\n py = _ref2.py,\n pt = _ref2.pt,\n pb = _ref2.pb,\n pl = _ref2.pl,\n pr = _ref2.pr,\n rest = _objectWithoutProperties(_ref2, _excluded);\n\n var margin = {\n t: m || my || mt,\n b: m || my || mb,\n l: m || mx || ml,\n r: m || mx || mr\n };\n var padding = {\n t: p || py || pt,\n b: p || py || pb,\n l: p || px || pl,\n r: p || px || pr\n };\n var theme = useTheme();\n var classes = useStyles({\n margin: margin,\n padding: padding,\n theme: theme\n });\n return /*#__PURE__*/React.createElement(Component, Object.assign({\n className: classes.wrenchSpacing\n }, safeRest(rest)));\n }\n\n WithSpacing.defaultProps = {\n m: undefined,\n mx: undefined,\n my: undefined,\n mt: undefined,\n mb: undefined,\n ml: undefined,\n mr: undefined,\n p: undefined,\n px: undefined,\n py: undefined,\n pt: undefined,\n pb: undefined,\n pl: undefined,\n pr: undefined\n };\n WithSpacing.propTypes = {\n m: PropTypes.oneOf(spacingOptions),\n mx: PropTypes.oneOf(spacingOptions),\n my: PropTypes.oneOf(spacingOptions),\n mt: PropTypes.oneOf(spacingOptions),\n mb: PropTypes.oneOf(spacingOptions),\n ml: PropTypes.oneOf(spacingOptions),\n mr: PropTypes.oneOf(spacingOptions),\n p: PropTypes.oneOf(spacingOptions),\n px: PropTypes.oneOf(spacingOptions),\n py: PropTypes.oneOf(spacingOptions),\n pt: PropTypes.oneOf(spacingOptions),\n pb: PropTypes.oneOf(spacingOptions),\n pl: PropTypes.oneOf(spacingOptions),\n pr: PropTypes.oneOf(spacingOptions)\n };\n WithSpacing.displayName = \"WithSpacing(\".concat(getDisplayName(Component), \")\");\n\n WithSpacing.getOriginalComponent = function () {\n return Component;\n };\n\n return WithSpacing;\n} // https://snook.ca/archives/html_and_css/hiding-content-for-accessibility\n\n\nvar defaultFonts = function defaultFonts(_ref) {\n var fontFamily = _ref.fontFamily,\n fontSize = _ref.fontSize;\n return {\n fontFamily: fontFamily.base,\n fontSize: fontSize.body,\n '-webkit-font-smoothing': 'antialiased'\n };\n}; // https://snook.ca/archives/html_and_css/hiding-content-for-accessibility\n\n\nvar defaultBaseline = {\n boxSizing: 'border-box',\n padding: 0,\n margin: 0,\n listStyle: 'none'\n};\n/**\n * @param value\n * @return {boolean}\n */\n\nvar isControlled = function isControlled(value) {\n return value !== undefined && value !== null;\n}; // eslint-disable-next-line import/prefer-default-export\n\n\nexport { clearfix, clsx, createMemoStyles, curriedDarken as darken, defaultBaseline, defaultFonts, getState, isBrowser, isControlled, curriedLighten as lighten, safeRest, uniqueId, visuallyHidden, withSpacing };","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _s3upload = _interopRequireDefault(require(\"react-s3-uploader/s3upload\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar DEFAULT_OPTIONS = {\n preprocess: function preprocess(file, next) {\n next(file);\n },\n onSignedUrl: function onSignedUrl() {},\n onProgress: function onProgress() {},\n onFinish: function onFinish() {},\n onError: function onError() {},\n signingUrl: '/core/api/s3/sign',\n scrubFilename: function scrubFilename(filename) {\n return \".\".concat(filename.split('.').pop());\n },\n s3path: '',\n autoUpload: true\n};\n/**\n * Creates a new S3Uploader.\n * @class\n */\n\nvar S3Uploader = /*#__PURE__*/function () {\n /**\n * @constructs S3Uploader\n * @param {Object} options S3Uploader options\n * @param {string} options.server S3Uploader server\n * @param {string} options.signingUrl S3Uploader singingUrl\n * @param {string} options.server S3Uploader server\n * @param {Array} options.successResponses {code, code} Success responses\n * @param {string} [options.signingUrlMethod=\"GET\"] S3Uploader singingUrlMethod\n * @param {string} [options.s3path=\"\"] S3Uploader s3path\n * @param {boolean} [options.autoUpload=true] S3Uploader autoupload\n * @param {Object} options.files S3Uploader files\n * @param {Object} options.fileElement S3Uploader fileElement\n * @param {Function} options.onFinishS3Put S3Uploader onFinishS3Put function\n * @param {Function} options.onFinish OnFinish uploading function\n * @param {Function} options.preprocess preprocess function\n * @param {Function} options.onProgress onProgress uploading function\n * @param {Function} options.onError on upload error function\n * @param {Function} options.onSignedUrl signed url function\n * @param {Function} options.fileElement fileElement\n * @param {Function} options.inputRef inputRef\n * @param {Function} options.contentDisposition\n * @param {Object} options.uploadRequestHeaders\n * @param {boolean} options.getSignedUrl\n */\n function S3Uploader(options) {\n _classCallCheck(this, S3Uploader);\n\n this.options = void 0;\n this.myUploader = void 0;\n this.options = _objectSpread(_objectSpread({}, DEFAULT_OPTIONS), options);\n }\n /**\n * Upload the file\n */\n\n\n _createClass(S3Uploader, [{\n key: \"uploadFile\",\n value: function uploadFile() {\n this.myUploader = new _s3upload.default(_objectSpread(_objectSpread({}, DEFAULT_OPTIONS), this.options));\n }\n /**\n * Abort the upload\n */\n\n }, {\n key: \"abort\",\n value: function abort() {\n if (this.myUploader) {\n this.myUploader.abortUpload();\n }\n }\n }]);\n\n return S3Uploader;\n}();\n\nexports.default = S3Uploader;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getClientEnvironmentDetails = getClientEnvironmentDetails;\nexports.isBrowserSupported = isBrowserSupported;\nexports.SupportedBrowserVendors = exports.environmentDetails = void 0;\n\nvar _bowser = _interopRequireDefault(require(\"bowser\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n/**\n * Environment Details\n * @typedef {Object}\n * @property {boolean} isNode\n * @property {boolean} isBrowser\n * @property {boolean} isDesktop\n * @property {boolean} isHeadlessChrome\n * @property {boolean} isMobile\n * @property {boolean} isTablet\n * @property {boolean} isIOS\n * @property {boolean} isAndroid\n * @property {Object} clientWindowSize\n * @property {string} clientWindowSize.width\n * @property {string} clientWindowSize.height\n * @memberof module:@sm/utils\n */\n\n\nvar environmentDetails = {\n isNode: false,\n isBrowser: false,\n isDesktop: false,\n isHeadlessChrome: false,\n isMobile: false,\n isTablet: false,\n isIOS: false,\n isAndroid: false,\n clientWindowSize: {\n width: undefined,\n height: undefined\n }\n};\nexports.environmentDetails = environmentDetails;\nvar userAgentTracker = '';\n/**\n * inspectAgent\n * @param {string} userAgent The string for the user agent\n */\n\nfunction inspectAgent(userAgent) {\n if (!userAgent) {\n return;\n }\n\n if (userAgent.match(/iPhone|iPod|iPad/i) !== null) {\n environmentDetails.isIOS = true;\n\n if (userAgent.match(/iPad/i) !== null) {\n environmentDetails.isTablet = true;\n } else {\n environmentDetails.isMobile = true;\n }\n } else if (userAgent.match(/Android/i) !== null) {\n environmentDetails.isMobile = true;\n environmentDetails.isAndroid = true;\n } else if (userAgent.match(/HeadlessChrome/i) !== null) {\n environmentDetails.isHeadlessChrome = true;\n } else {\n environmentDetails.isDesktop = true;\n }\n}\n/**\n * Initialize\n * @param {string} userAgent The string for the user agent\n * @private\n */\n\n\nfunction _initialize(userAgent) {\n var ua = userAgent;\n\n if (typeof window === 'object') {\n environmentDetails.isBrowser = true;\n window.SM = window.SM || {};\n var _window = window,\n SM = _window.SM;\n SM.__LOAD_PAYLOAD_CACHE__ = SM.__LOAD_PAYLOAD_CACHE__ || {}; // Detect banner type (iOS or Android)\n\n environmentDetails.clientWindowSize = {\n width: document.body.clientWidth,\n height: document.body.clientHeight\n };\n ua = navigator.userAgent;\n } else {\n environmentDetails.isNode = true;\n }\n\n inspectAgent(ua);\n}\n/**\n * Returns the environment details\n * @param {string} userAgent The string for the user agent\n * @returns {environmentDetails} env details\n * @memberof module:@sm/utils\n */\n\n\nfunction getClientEnvironmentDetails() {\n var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n if (environmentDetails.isBrowser === false && environmentDetails.isNode === false || userAgentTracker !== userAgent) {\n userAgentTracker = userAgent;\n\n _initialize(userAgentTracker);\n }\n\n return environmentDetails;\n}\n\nvar SupportedBrowserVendors;\nexports.SupportedBrowserVendors = SupportedBrowserVendors;\n\n(function (SupportedBrowserVendors) {\n SupportedBrowserVendors[\"Chrome\"] = \"chrome\";\n SupportedBrowserVendors[\"Firefox\"] = \"firefox\";\n SupportedBrowserVendors[\"Safari\"] = \"safari\";\n SupportedBrowserVendors[\"IE\"] = \"ie\";\n SupportedBrowserVendors[\"Edge\"] = \"edge\";\n})(SupportedBrowserVendors || (exports.SupportedBrowserVendors = SupportedBrowserVendors = {}));\n\nvar defaultSupportedBrowsers = [{\n vendor: SupportedBrowserVendors.Chrome,\n operator: '>=',\n version: '18'\n}, {\n vendor: SupportedBrowserVendors.Firefox,\n operator: '>=',\n version: '24'\n}, {\n vendor: SupportedBrowserVendors.Safari,\n operator: '>=',\n version: '7'\n}, {\n vendor: SupportedBrowserVendors.Edge,\n operator: '>=',\n version: '12'\n}, {\n vendor: SupportedBrowserVendors.IE,\n operator: '>=',\n version: '11'\n}];\n\nfunction isBrowserSupported(userAgent, supportedBrowsers) {\n var browser = _bowser.default.getParser(userAgent);\n\n var browsers = supportedBrowsers || defaultSupportedBrowsers;\n browsers.forEach(function (_ref) {\n var version = _ref.version;\n\n if (!version.match(/^\\d+(\\.\\d+)?(\\.\\d+)?$/)) {\n throw new Error(\"Unsupported version number: \".concat(version));\n }\n });\n var config = browsers.reduce(function (cfg, _ref2) {\n var vendor = _ref2.vendor,\n operator = _ref2.operator,\n version = _ref2.version;\n cfg[vendor] = \"\".concat(operator).concat(version);\n return cfg;\n }, {});\n return browser.satisfies(config) || false;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"sanitizeString\", {\n enumerable: true,\n get: function get() {\n return _sanitizeString.default;\n }\n});\nObject.defineProperty(exports, \"isValidEmail\", {\n enumerable: true,\n get: function get() {\n return _isValidEmail.default;\n }\n});\nObject.defineProperty(exports, \"createURL\", {\n enumerable: true,\n get: function get() {\n return _createURL.default;\n }\n});\nObject.defineProperty(exports, \"deepFreeze\", {\n enumerable: true,\n get: function get() {\n return _deepFreeze.default;\n }\n});\nObject.defineProperty(exports, \"S3Uploader\", {\n enumerable: true,\n get: function get() {\n return _S3Uploader.default;\n }\n});\nObject.defineProperty(exports, \"getClientEnvironmentDetails\", {\n enumerable: true,\n get: function get() {\n return _environment.getClientEnvironmentDetails;\n }\n});\nObject.defineProperty(exports, \"isBrowserSupported\", {\n enumerable: true,\n get: function get() {\n return _environment.isBrowserSupported;\n }\n});\nObject.defineProperty(exports, \"SupportedBrowserVendors\", {\n enumerable: true,\n get: function get() {\n return _environment.SupportedBrowserVendors;\n }\n});\nObject.defineProperty(exports, \"SupportedBrowsers\", {\n enumerable: true,\n get: function get() {\n return _environment.SupportedBrowsers;\n }\n});\nObject.defineProperty(exports, \"VersionOperators\", {\n enumerable: true,\n get: function get() {\n return _environment.VersionOperators;\n }\n});\n\nvar _sanitizeString = _interopRequireDefault(require(\"./string/sanitizeString\"));\n\nvar _isValidEmail = _interopRequireDefault(require(\"./string/isValidEmail\"));\n\nvar _createURL = _interopRequireDefault(require(\"./url/createURL\"));\n\nvar _deepFreeze = _interopRequireDefault(require(\"./object/deepFreeze\"));\n\nvar _S3Uploader = _interopRequireDefault(require(\"./S3Uploader/S3Uploader\"));\n\nvar _environment = require(\"./environment\");\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = deepFreeze;\n/**\n * Freezes the object\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nfunction deepFreeze(o) {\n Object.freeze(o);\n Object.getOwnPropertyNames(o).forEach(function (prop) {\n if (Object.hasOwnProperty.call(o, prop) && o[prop] !== null && (typeof o[prop] === 'object' || typeof o[prop] === 'function') && !Object.isFrozen(o[prop])) {\n deepFreeze(o[prop]);\n }\n });\n return o;\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isValidEmail;\n/**\n * Validates if the input is an email or not\n * @param {string} email\n * @returns {boolean} Is email valid\n * @memberof module:@sm/utils\n */\n\nfunction isValidEmail(email) {\n var re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n}\n\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _dompurify = _interopRequireWildcard(require(\"dompurify\"));\n\nvar _environment = require(\"../environment\");\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\n\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj.default = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nvar stringSanitize = _dompurify.sanitize;\n\nif ((0, _environment.getClientEnvironmentDetails)().isNode) {\n var _require = require('jsdom'),\n JSDOM = _require.JSDOM; // eslint-disable-line\n\n\n var _JSDOM = new JSDOM(''),\n window = _JSDOM.window;\n\n var DOMPurify = (0, _dompurify.default)(window);\n stringSanitize = DOMPurify.sanitize;\n}\n\nvar _default = stringSanitize;\nexports.default = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createURL;\n/**\n * Creates a url from base and params\n * @param {string} url\n * @param {Object} [params] Query string params\n * @returns {string} url\n * @memberof module:@sm/utils\n */\n\nfunction createURL(url, params) {\n if (!params || typeof params !== 'object' || Object.keys(params).length === 0) return url;\n var queryString = Object.keys(params).map(function (key) {\n return \"\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(params[key]));\n }).join('&');\n var queryURL = \"\".concat(url, \"?\").concat(queryString);\n return queryURL;\n}\n\nmodule.exports = exports.default;","/*\n * Tools for creating TypeGuards.\n */\nconst isNull = u => u === null;\n\nconst isString = u => typeof u === 'string';\n\nconst isNumber = u => typeof u === 'number';\n\nconst isBoolean = u => typeof u === 'boolean';\n\nconst isOptional = guard => u => u === undefined || guard(u);\n\nconst isArrayOf = guard => u => Array.isArray(u) && u.every(guard); /// TypeGuard for discriminated unions of strings\n\n\nconst isOneOf = list => u => !!list.find(i => i === u); /// TypeGuard for fixed values\n\n\nconst isFixed = value => u => u === value; // type guard operators\n/// TypeGuard for discriminated unions of objects\n\n\nconst isEither = list => u => !!list.find(g => g(u));\n\nconst isNullable = guard => u => {\n if (u === null) {\n return true;\n }\n\n const res = guard(u);\n return typeof res === 'boolean' && res;\n};\n/** *\n * TypeGuard for an object. Needs to have one Guard for every attribute\n * */\n\n\nconst typeGuard = guards => u => {\n return Object.entries(guards).every(([key, guard]) => {\n if (!u) {\n return false;\n }\n\n const value = u[key];\n\n if (!guard(value)) {\n return false;\n }\n\n return true;\n });\n};\n/** *\n * TypeAssertion for an object. Needs to have one Guard or TypeAssertion for every attribute.\n * Will throw an error if the property is of the wrong type.\n * */\n// TODO: refactor the typeGuard function to work as a typeAssertion when called by a typeAssertion\n\n\nfunction typeAssertion(guards) {\n return function assertGuard(u) {\n // for function Guards like `isEither`\n if (typeof guards === 'function') {\n const res = guards(u);\n\n if (typeof res === 'boolean' && !res) {\n throw new Error('failed-typeguard');\n }\n\n return;\n } // default with a Guard object\n\n\n Object.entries(guards).forEach(([key, guard]) => {\n if (!u) {\n throw new Error(`Can't read property '${key}' of '${u}'`);\n }\n\n const value = u[key];\n\n try {\n const res = guard(value);\n\n if (typeof res === 'boolean' && !res) {\n throw new Error('failed-typeguard');\n }\n } catch (e) {\n // TODO: write or install a nested error object\n throw new Error(`Value '${value}' has the wrong type for property '${key}':${'\\n'}${e && e.message}`);\n }\n });\n };\n} // Base Types\n// Question Guard Helpers\n\n\nconst isQuestionError = isEither([typeGuard({\n source: isFixed('local-error'),\n id: isString,\n field: isString,\n message: isString\n}), typeGuard({\n source: isFixed('upstream-error'),\n context: isString,\n id: isString,\n message: isString\n})]);\n\nconst baseQuestionGuards = (typeId, family, variant) => ({\n typeId: isFixed(typeId),\n variant: isFixed(variant),\n family: isFixed(family),\n id: isString,\n errors: isOptional(isArrayOf(isQuestionError))\n});\n/**\n * a very basic typeguard for the common fields for a Question Type.\n * should receive parameters for the actual ID, FAMILY and SUBTYPE of the\n * Question Type to avoid Typescript errors. Question types can use this function\n * to help build their own typeGuards\n */\n\n\nconst isQuestionType = (typeId, family, variant) => typeGuard(baseQuestionGuards(typeId, family, variant));\n\nconst questionTypeFamilies = ['PRESENTATION', 'MULTIPLE_CHOICE', 'OPEN_ENDED', 'RATING_SCALE', 'MATRIX', 'RANKING', 'SLIDER', 'DATETIME', 'CONTACT_INFO', 'CLICK_MAP', 'FILE_UPLOAD'];\nconst questionTypeRequiredPredicateTypes = ['ALL', 'AT_LEAST', 'AT_MOST', 'EXACTLY', 'RANGE', 'REQUIRED_ANSWERS_LIST'];\nconst questionTypeVariants = ['TEXT', 'IMAGE', 'SINGLE_LINE', 'ESSAY', 'MANY_FIELDS', 'SINGLE_ANSWER_RADIO', 'SINGLE_ANSWER_SYMBOL', 'SINGLE_ANSWER_MENU', 'MANY_ANSWERS_CHECKBOX', 'MENU', 'SINGLE_SLIDER', 'DATE', 'TIME', 'DATETIME', 'MANY_FIELDS', 'SINGLE_CLICK', null];\nconst questionTypeLayoutPlacements = ['NEW_ROW', 'RIGHT_ALIGNED'];\nconst questionTypeHeaderColumnWidths = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];\nconst questionTypeValidationTypes = ['SUM', 'TEXT_LENGTH', 'EMAIL', 'INTEGER', 'DECIMAL', 'DATE_US', 'DATE_INTL', 'FILE_FORMAT'];\nconst questionTypeFileFormats = ['PDF', 'DOC', 'DOCX', 'PNG', 'JPG', 'JPEG', 'GIF'];\nconst questionTypeIds = ['single_textbox', 'comment_box'];\nconst questionTypeSortingKinds = ['FLIP', 'RANDOM', 'TEXT_ASC', 'TEXT_DESC'];\nconst questionTypeSkipLogicTypes = ['QUESTION_CONDITIONAL_COL', 'QUESTION_CONDITIONAL_ROW'];\nconst questionTypeSkipLogicDestinationTypes = ['DISQUALIFY_RESPONDENT', 'END_SURVEY', 'SKIP_TO_PAGE'];\nconst questionTypeMultipleChoiceLayouts = ['VERTICAL', 'THREE_COLUMNS', 'TWO_COLUMNS', 'HORIZONTAL'];\nconst SENTIMENTS = ['positive', 'negative', 'neutral', 'unknown'];\n/** Possible icons for Star-Rating */\n\nconst ratingScaleSymbols = ['THUMB', 'STAR', 'HEART', 'SMILEY'];\n/** Possible values for relative width (in percentage) */\n\nconst relativeWidthOptions = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];\n/** Possible values for fixed width (in pixel) */\n\nconst fixedWidthOptions = [100, 200, 300, 400, 500, 600, 700, 800];\nconst isTextLengthValidation = typeGuard({\n errorMessage: isString,\n type: isFixed('TEXT_LENGTH'),\n minLength: isNumber,\n maxLength: isNumber\n});\nconst isIntegerValidation = typeGuard({\n errorMessage: isString,\n type: isFixed('INTEGER'),\n minValue: isNumber,\n maxValue: isNumber\n});\nconst isDecimalValidation = typeGuard({\n errorMessage: isString,\n type: isFixed('DECIMAL'),\n minValue: isNumber,\n maxValue: isNumber\n});\nconst isDateValidation = typeGuard({\n errorMessage: isString,\n type: isOneOf(['DATE_US', 'DATE_INTL']),\n minDate: isString,\n maxDate: isString\n});\nconst isEmailValidation = typeGuard({\n errorMessage: isString,\n type: isFixed('EMAIL')\n});\nconst isSumValidation = typeGuard({\n errorMessage: isString,\n type: isFixed('SUM'),\n sum: isNumber\n});\nconst isFieldValidation = isEither([isTextLengthValidation, isIntegerValidation, isDecimalValidation, isDateValidation, isEmailValidation]);\nconst headingGuards = typeGuard({\n default: typeGuard({\n text: isString\n }),\n assignments: isOptional(isArrayOf(typeGuard({\n id: isString,\n heading: typeGuard({\n text: isString\n }),\n variable: typeGuard({\n id: isString,\n name: isNullable(isString),\n percent: isNumber,\n position: isNumber\n })\n })))\n});\nconst positionGuard = {\n position: typeGuard({\n inPage: isNumber,\n inSurvey: isNumber,\n label: isString\n })\n};\nconst baseGuards$a = {\n id: isString\n};\n/** Guard for basic fields shared by all QuestionTypes' in the Response-Survey capabilities */\n\nconst surveyQuestionGuards = { ...baseGuards$a,\n ...positionGuard,\n // TODO: remove this\n family: isOneOf(questionTypeFamilies),\n variant: isOneOf(questionTypeVariants),\n heading: headingGuards,\n hasPiping: isBoolean,\n createdAt: isString,\n modifiedAt: isString\n};\nconst externalQuizResultsGuards = {\n id: isString,\n feedback: typeGuard({\n correct: isString,\n partial: isString,\n incorrect: isString\n }),\n answers: isArrayOf(typeGuard({\n answer: isEither([typeGuard({\n id: isString,\n label: isString,\n visible: isBoolean\n }), typeGuard({\n id: isString\n })]),\n points: isNumber,\n responded: isBoolean\n })),\n\n /** custom field - not in this spot in the GraphQL Schema (data from `OtherResponse`)) */\n answerOther: isOptional(typeGuard({\n textAnswer: isOptional(isString)\n })),\n totalPoints: isNumber\n};\nconst isSurveyQuestion = typeGuard(surveyQuestionGuards);\nconst isQuestionLayoutPlacement = isOneOf(questionTypeLayoutPlacements);\nconst isQuestionLayoutSpacing = typeGuard({\n left: isNumber,\n right: isNumber,\n top: isNumber,\n bottom: isNumber\n});\nconst isQuestionLayoutWidth = isEither([typeGuard({\n format: isFixed('PERCENT'),\n width: isOneOf(relativeWidthOptions)\n}), typeGuard({\n format: isFixed('FIXED'),\n width: isOneOf(fixedWidthOptions)\n})]);\nconst isQuestionLayoutHeaderColumnWidth = isOneOf(questionTypeHeaderColumnWidths);\n/** Internal non-nullable version */\n\nconst isAnswer = typeGuard({\n id: isString,\n label: isString,\n visible: isBoolean\n});\n/** Internal non-nullable version */\n\nconst isAnswerOtherCommentNonNullable = typeGuard({\n id: isString,\n label: isString,\n visible: isBoolean,\n type: isFixed('COMMENT'),\n layout: typeGuard({\n linesCount: isNumber,\n charsCount: isNumber\n })\n});\n/** Internal non-nullable version */\n\nconst isAnswerOtherChoiceNonNullable = typeGuard({\n id: isString,\n label: isString,\n visible: isBoolean,\n type: isFixed('ANSWER'),\n requiredErrorText: isString,\n layout: typeGuard({\n linesCount: isNumber,\n charsCount: isNumber\n })\n});\nconst isAnswerOther = isNullable(isEither([isAnswerOtherChoiceNonNullable, isAnswerOtherCommentNonNullable]));\nconst isAnswerOtherComment = isNullable(isAnswerOtherCommentNonNullable);\nconst isAnswerNoneOfTheAbove = isNullable(typeGuard({\n id: isString,\n label: isString,\n visible: isBoolean\n}));\nconst isFieldSet = typeGuard({\n id: isString,\n visible: isBoolean\n});\nconst isAllAnswerRequired = typeGuard({\n errorMessage: isString,\n type: isFixed('ALL')\n});\n/** Internal non-nullable version */\n\nconst isWeightedAnswer = typeGuard({\n id: isString,\n label: isString,\n weight: isNumber,\n visible: isBoolean\n});\nconst isWeightedAnswers = isArrayOf(isWeightedAnswer);\nconst isQuestionSorting = isNullable(typeGuard({\n ignoreLast: isBoolean,\n type: isOneOf(questionTypeSortingKinds)\n}));\nconst isQuestionSkipLogicRules = isArrayOf(typeGuard({\n id: isString,\n skipType: isOneOf(questionTypeSkipLogicTypes),\n sourceAnswer: isEither([isAnswer, isAnswerOtherChoiceNonNullable, isWeightedAnswer]),\n destination: isEither([typeGuard({\n type: isOneOf(['DISQUALIFY_RESPONDENT', 'END_SURVEY'])\n }), // ensure `SKIP_TO_PAGE` also has a question prop\n typeGuard({\n type: isFixed('SKIP_TO_PAGE'),\n question: isSurveyQuestion\n })])\n}));\nconst isExternalQuestionWithTypeId = typeGuard({\n typeId: isString\n});\nconst isAnswerRangeRequired = typeGuard({\n type: isFixed('RANGE'),\n min: isNumber,\n max: isNumber,\n errorMessage: isString\n});\nconst isAnswerCountPredicateRequired = typeGuard({\n errorMessage: isString,\n type: isOneOf(['AT_LEAST', 'AT_MOST', 'EXACTLY']),\n amount: isNumber\n});\n\nfunction assertExternalQuestionWithIds(u) {\n return typeAssertion({\n typeId: isString,\n id: isString\n })(u);\n}\n/** Only used for Respondent Survey */\n\n\nconst basicExternalAllMultipleChoiceGuards = {\n fieldSet: isFieldSet,\n sorting: isQuestionSorting,\n required: isNullable(isAllAnswerRequired)\n};\nconst basicExternalMultipleChoiceAnswersGuard = {\n answers: isArrayOf(typeGuard({\n id: isString,\n label: isString,\n visible: isBoolean\n }))\n};\nconst basicExternalMultipleChoiceValidationGuard = {\n validation: isNullable(isEither([isTextLengthValidation, isIntegerValidation, isDecimalValidation, isDateValidation, isEmailValidation]))\n};\nconst basicExternalMultipleChoiceLayoutGuard = {\n layout: typeGuard({\n answerLayout: isOneOf(questionTypeMultipleChoiceLayouts),\n placement: isQuestionLayoutPlacement,\n width: isQuestionLayoutWidth,\n spacing: isQuestionLayoutSpacing\n })\n};\nconst basicExternalMultipleChoiceAnswerOtherGuard = {\n answerOther: isAnswerOther\n};\nconst basicExternalMultipleChoiceAnswerNoneOfTheAboveGuard = {\n answerNoneOfTheAbove: isNullable(typeGuard({\n id: isString,\n label: isString,\n visible: isBoolean\n }))\n};\n/** Shared ExternalQuestion Guards for Respondent-Survey capability */\n\nconst externalRespondentSurveyGuards = { ...positionGuard,\n heading: headingGuards,\n hasPiping: isBoolean\n};\nconst isAggregateResponseHeaderItem$1 = typeGuard({\n id: isString,\n label: isString,\n weight: isNullable(isNumber)\n});\nconst isAggregateResponseHeader$1 = typeGuard({\n id: isString,\n items: isArrayOf(isAggregateResponseHeaderItem$1)\n});\n/** Shared ExternalQuestion Guards for Respondent-Quiz-Results capability */\n\nconst externalRespondentQuizResultsGuards = { ...positionGuard,\n heading: headingGuards,\n quizResults: isNullable(typeGuard(externalQuizResultsGuards))\n};\n/** Shared ExternalQuestion Guards for AggregateResponse-Dashboard capability */\n\nconst externalAggregateResponseDashboardGuards = {\n dashboardType: isOptional(isEither([isFixed('slide'), isFixed('list'), isFixed('sentiment-chart')])),\n filterCount: isOptional(isNumber),\n selectedCount: isOptional(isNumber),\n skippedCount: isOptional(isNumber),\n responseData: isOptional(isNullable(isArrayOf(typeGuard({\n content: isString,\n id: isString,\n sentiment: isEither([isFixed('positive'), isFixed('negative'), isFixed('neutral'), isFixed('unknown')])\n })))),\n aggregateResponse: isOptional(typeGuard({\n columnHeader: isNullable(isAggregateResponseHeader$1),\n rowHeader: isAggregateResponseHeader$1,\n groupHeader: isNullable(isAggregateResponseHeader$1),\n data: isArrayOf(typeGuard({\n columnItem: isNullable(isAggregateResponseHeaderItem$1),\n rowItem: isNullable(isAggregateResponseHeaderItem$1),\n groupItem: isNullable(isAggregateResponseHeaderItem$1),\n percentage: isNumber,\n total: isNumber\n })),\n id: isString,\n stats: isArrayOf(typeGuard({\n across: isNullable(isEither([isFixed('COLUMNS'), isFixed('GROUPS'), isFixed('ROWS')])),\n row: isNullable(isAggregateResponseHeaderItem$1),\n column: isNullable(isAggregateResponseHeaderItem$1),\n group: isNullable(isAggregateResponseHeaderItem$1)\n })),\n type: isEither([isFixed('ONE_D'), isFixed('TWO_D'), isFixed('THREE_D')])\n })),\n heading: headingGuards\n};\n/** List of all smQuestion supported capabilities (others might get defined via custom providers/views) */\n\nconst CAPABILITIES = ['respondent-survey', 'respondent-quiz-results', 'aggregate-response-dashboard'];\n\nfunction assertExternalQuestionByCapability(externalQuestion, guards) {\n return typeAssertion(guards)(externalQuestion);\n}\n\nfunction respondentSurveyMapping(externalQuestion) {\n assertExternalQuestionByCapability(externalQuestion, externalRespondentSurveyGuards);\n const {\n heading,\n position\n } = externalQuestion;\n return {\n questionNumber: position.label,\n title: heading.default.text,\n disabled: false,\n answer: {\n touched: false,\n value: ''\n }\n };\n}\n\nfunction respondentQuizResultsMapping(externalQuestion) {\n assertExternalQuestionByCapability(externalQuestion, externalRespondentQuizResultsGuards);\n return {\n quizResults: externalQuestion.quizResults || undefined,\n questionNumber: externalQuestion.position.label,\n title: externalQuestion.heading.default.text\n };\n}\n\nfunction aggregateResponseDashboardMapping(externalQuestion) {\n assertExternalQuestionByCapability(externalQuestion, externalAggregateResponseDashboardGuards);\n const {\n dashboardType,\n filterCount,\n selectedCount,\n skippedCount,\n responseData,\n aggregateResponse,\n heading: {\n default: {\n text: title\n }\n }\n } = externalQuestion;\n return {\n dashboardType,\n filterCount,\n selectedCount,\n skippedCount,\n responseData,\n aggregateResponse,\n title\n };\n}\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n\nfunction assertBasicFields(externalQuestion) {\n return typeAssertion(baseGuards$a)(externalQuestion);\n}\n\nfunction basicFieldsMapping(externalQuestion) {\n assertBasicFields(externalQuestion);\n const {\n id\n } = externalQuestion;\n return {\n id\n };\n}\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n\nconst basicExternalImageChoiceGuards = {\n family: isFixed('MULTIPLE_CHOICE'),\n variant: isEither([isFixed('MANY_ANSWERS_IMAGE'), isFixed('SINGLE_ANSWER_IMAGE')])\n};\n\nfunction assertExternalImageChoice(externalQuestion) {\n return typeAssertion(basicExternalImageChoiceGuards)(externalQuestion);\n}\n/** Map fields shared by all capabilities */\n\n\nconst mapExternalToInternalImageChoice = externalQuestion => {\n assertExternalImageChoice(externalQuestion);\n const {\n variant,\n family\n } = externalQuestion;\n return {\n typeId: 'image_choice',\n variant,\n family,\n disabled: false\n };\n};\n\nconst answersImageGuards = {\n answersImage: isArrayOf(typeGuard({\n id: isString,\n image: typeGuard({\n altText: isString,\n url: isString\n }),\n label: isString,\n visible: isBoolean\n }))\n};\n/** Assertion for Respondent-Survey */\n\nfunction assertRespondentSurvey$a(u) {\n return typeAssertion({ ...basicExternalAllMultipleChoiceGuards,\n ...basicExternalMultipleChoiceAnswerNoneOfTheAboveGuard,\n ...answersImageGuards,\n skipLogicRules: isQuestionSkipLogicRules\n })(u);\n}\n\nconst mapRespondentSurveyExternalImageChoice = externalQuestion => {\n assertRespondentSurvey$a(externalQuestion);\n const {\n answerNoneOfTheAbove,\n answersImage,\n fieldSet,\n required,\n skipLogicRules,\n sorting\n } = externalQuestion;\n return {\n answerNoneOfTheAbove,\n answersImage,\n fieldSet,\n required,\n skipLogicRules,\n sorting\n };\n};\n/** Assertion for Respondent-Quiz-Results */\n\n\nfunction assertRespondentQuizResults$2(u) {\n return typeAssertion(typeGuard({ ...basicExternalMultipleChoiceAnswerNoneOfTheAboveGuard,\n ...answersImageGuards\n }))(u);\n}\n/** Map Respondent-Quiz-Results specific properties */\n\n\nconst mapRespondentQuizResultsExternalImageChoice = externalQuestion => {\n assertRespondentQuizResults$2(externalQuestion);\n const {\n answerNoneOfTheAbove,\n answersImage\n } = externalQuestion;\n return {\n answerNoneOfTheAbove,\n answersImage\n };\n}; // Respondent-Survey\n\n\nconst imageChoiceRespondentSurveyMapping = externalQuestion => ({ ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalImageChoice(externalQuestion),\n ...mapRespondentSurveyExternalImageChoice(externalQuestion)\n}); // Respondent-Quiz-Results\n\n\nconst imageChoiceRespondentQuizResultsMapping = externalQuestion => ({ ...basicFieldsMapping(externalQuestion),\n ...respondentQuizResultsMapping(externalQuestion),\n ...mapExternalToInternalImageChoice(externalQuestion),\n ...mapRespondentQuizResultsExternalImageChoice(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst imageChoiceAggregateResponseDashboardMapping = externalQuestion => ({ ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalImageChoice(externalQuestion) // ...mapAggregateResponseDashboardExternalImageChoice(externalQuestion), //does not exist yet\n\n});\n/** Guard to check properties shared by all capabilities */\n\n\nconst basicExternalCheckBoxGuards = {\n family: isFixed('MULTIPLE_CHOICE'),\n variant: isFixed('MANY_ANSWERS_CHECKBOX')\n};\n/** Assertion to check properties shared by all capabilities */\n\nfunction assertExternalCheckBox(externalQuestion) {\n return typeAssertion(basicExternalCheckBoxGuards)(externalQuestion);\n}\n/** Map fields shared by all capabilities */\n\n\nconst mapExternalToInternalCheckBox = externalQuestion => {\n assertExternalCheckBox(externalQuestion);\n const {\n variant,\n family\n } = externalQuestion;\n return {\n variant,\n family,\n disabled: false\n };\n};\n/** Assertion for Respondent-Survey specific properties */\n\n\nfunction assertRespondentSurvey$9(u) {\n return typeAssertion(typeGuard({ ...basicExternalMultipleChoiceAnswersGuard,\n ...basicExternalMultipleChoiceAnswerOtherGuard,\n ...basicExternalMultipleChoiceAnswerNoneOfTheAboveGuard,\n ...basicExternalMultipleChoiceLayoutGuard,\n ...basicExternalMultipleChoiceValidationGuard,\n ...isNullable(isAllAnswerRequired)\n }))(u);\n}\n/** Map Respondent-Survey specific properties */\n\n\nconst mapRespondentSurveyExternalCheckBox = externalQuestion => {\n assertRespondentSurvey$9(externalQuestion);\n const {\n layout,\n validation,\n required,\n answers,\n answerOther,\n answerNoneOfTheAbove\n } = externalQuestion;\n return {\n layout,\n required,\n answers,\n answerOther: answerOther ? {\n id: answerOther.id,\n touched: false,\n value: '',\n label: answerOther.label,\n selected: false,\n visible: answerOther.visible,\n type: answerOther.type,\n ...(answerOther.type === 'ANSWER' ? {\n requiredErrorText: answerOther.requiredErrorText\n } : {}),\n linesCount: answerOther.layout.linesCount,\n charsCount: answerOther.layout.charsCount\n } : null,\n answerNoneOfTheAbove,\n ...(validation ? {\n validation\n } : {})\n };\n};\n/** Assertion for Respondent-Quiz-Results */\n\n\nfunction assertRespondentQuizResults$1(u) {\n return typeAssertion(typeGuard({ ...basicExternalMultipleChoiceLayoutGuard,\n ...basicExternalMultipleChoiceAnswerOtherGuard,\n ...basicExternalMultipleChoiceAnswerNoneOfTheAboveGuard\n }))(u);\n}\n\nconst mapRespondentQuizResultsExternalCheckBox = externalQuestion => {\n assertRespondentQuizResults$1(externalQuestion);\n const {\n layout,\n answerOther,\n answerNoneOfTheAbove\n } = externalQuestion;\n return {\n layout,\n answerOther: answerOther ? {\n id: answerOther.id,\n label: answerOther.label,\n visible: answerOther.visible,\n type: answerOther.type,\n ...(answerOther.type === 'ANSWER' ? {\n requiredErrorText: answerOther.requiredErrorText\n } : {}),\n linesCount: answerOther.layout.linesCount,\n charsCount: answerOther.layout.charsCount\n } : null,\n answerNoneOfTheAbove\n };\n}; // Respondent-Survey\n\n\nconst checkBoxRespondentSurveyMapping = externalQuestion => ({\n typeId: 'check_box',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalCheckBox(externalQuestion),\n ...mapRespondentSurveyExternalCheckBox(externalQuestion)\n}); // Respondent-Quiz-Results\n\n\nconst checkBoxRespondentQuizResultsMapping = externalQuestion => ({\n typeId: 'check_box',\n ...basicFieldsMapping(externalQuestion),\n ...respondentQuizResultsMapping(externalQuestion),\n ...mapExternalToInternalCheckBox(externalQuestion),\n ...mapRespondentQuizResultsExternalCheckBox(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst checkBoxAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'check_box',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalCheckBox(externalQuestion) // ...mapAggregateResponseDashboardExternalCheckBox(externalQuestion), // does not exist yet\n\n});\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n\nconst basicExternalDropdownGuards = {\n variant: isFixed('SINGLE_ANSWER_MENU'),\n family: isFixed('MULTIPLE_CHOICE')\n};\n\nfunction assertExternalDropdown(externalQuestion) {\n return typeAssertion(basicExternalDropdownGuards)(externalQuestion);\n}\n/** Map fields shared by all capabilities */\n\n\nconst mapExternalToInternalDropdown = externalQuestion => {\n assertExternalDropdown(externalQuestion);\n const {\n variant,\n family\n } = externalQuestion;\n return {\n variant,\n family,\n disabled: false\n };\n};\n/** Assertion for Respondent-Survey specific properties */\n\n\nfunction assertRespondentSurvey$8(u) {\n return typeAssertion(typeGuard({ ...basicExternalAllMultipleChoiceGuards,\n ...basicExternalMultipleChoiceLayoutGuard,\n ...basicExternalMultipleChoiceValidationGuard,\n ...basicExternalMultipleChoiceAnswersGuard,\n ...basicExternalMultipleChoiceAnswerOtherGuard\n }))(u);\n}\n/** Map Respondent-Survey specific properties */\n\n\nconst mapRespondentSurveyExternalDropdown = externalQuestion => {\n assertRespondentSurvey$8(externalQuestion); // Placeholder - we don't have this visualization yet\n\n const {\n layout,\n validation,\n answerOther,\n required,\n answers\n } = externalQuestion;\n return {\n required,\n layout,\n answers,\n answerOther: answerOther ? {\n id: answerOther.id,\n label: answerOther.label,\n touched: false,\n value: '',\n selected: false,\n visible: answerOther.visible,\n type: answerOther.type,\n ...(answerOther.type === 'ANSWER' ? {\n requiredErrorText: answerOther.requiredErrorText\n } : {}),\n linesCount: answerOther.layout.linesCount,\n charsCount: answerOther.layout.charsCount\n } : null,\n ...(validation ? {\n validation\n } : {})\n };\n};\n/** Assertion for Respondent-Survey specific properties */\n\n\nfunction assertQuizResults(u) {\n return typeAssertion(typeGuard({ ...basicExternalMultipleChoiceAnswerOtherGuard,\n ...basicExternalMultipleChoiceLayoutGuard\n }))(u);\n}\n\nconst mapRespondentQuizResultsExternalDropdown = externalQuestion => {\n assertQuizResults(externalQuestion);\n const {\n layout,\n answerOther\n } = externalQuestion;\n return {\n layout,\n answerOther: answerOther ? {\n id: answerOther.id,\n label: answerOther.label,\n visible: answerOther.visible,\n type: answerOther.type,\n ...(answerOther.type === 'ANSWER' ? {\n requiredErrorText: answerOther.requiredErrorText\n } : {}),\n linesCount: answerOther.layout.linesCount,\n charsCount: answerOther.layout.charsCount\n } : null\n };\n}; // Respondent-Survey\n\n\nconst dropdownRespondentSurveyMapping = externalQuestion => ({\n typeId: 'dropdown',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalDropdown(externalQuestion),\n ...mapRespondentSurveyExternalDropdown(externalQuestion)\n}); // Respondent-Quiz-Results\n\n\nconst dropdownRespondentQuizResultsMapping = externalQuestion => ({\n typeId: 'dropdown',\n ...basicFieldsMapping(externalQuestion),\n ...respondentQuizResultsMapping(externalQuestion),\n ...mapExternalToInternalDropdown(externalQuestion),\n ...mapRespondentQuizResultsExternalDropdown(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst dropdownAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'dropdown',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalDropdown(externalQuestion) // ...mapAggregateResponseDashboardExternalDropdown(externalQuestion), //does not exist yet\n\n});\n\nconst basicExternalFieldSetGuards = {\n fieldSet: isFieldSet\n};\nconst basicExternalRequiredGuards = {\n required: isNullable(isAllAnswerRequired)\n};\nconst basicExternalOpenEndedLayoutGuards = {\n layout: typeGuard({\n placement: isQuestionLayoutPlacement,\n spacing: isQuestionLayoutSpacing,\n linesCount: isNumber,\n charsCount: isNumber\n })\n};\nconst basicExternalOpenEndedValidationGuards = {\n validation: isOptional(isNullable(isEither([isTextLengthValidation, isIntegerValidation, isDecimalValidation, isDateValidation, isEmailValidation])))\n};\nconst basicExternalCommentBoxGuards = {\n family: isFixed('OPEN_ENDED'),\n variant: isFixed('ESSAY')\n};\n\nfunction assertExternalCommentBox(externalQuestion) {\n return typeAssertion(basicExternalCommentBoxGuards)(externalQuestion);\n}\n\nconst mapExternalToInternalCommentBox = externalQuestion => {\n assertExternalCommentBox(externalQuestion);\n const {\n variant,\n family\n } = externalQuestion;\n return {\n variant,\n family,\n disabled: false\n };\n};\n/** Assertion for Respondent-Survey */\n\n\nfunction assertRespondentSurvey$7(u) {\n return typeAssertion({ ...basicExternalFieldSetGuards,\n ...basicExternalRequiredGuards,\n ...basicExternalOpenEndedLayoutGuards,\n ...basicExternalOpenEndedValidationGuards\n })(u);\n}\n\nconst mapRespondentSurveyExternalCommentBox = externalQuestion => {\n assertRespondentSurvey$7(externalQuestion);\n const {\n layout,\n validation,\n required,\n fieldSet\n } = externalQuestion;\n return {\n layout,\n required,\n fieldSet,\n ...(validation ? {\n validation\n } : {})\n };\n}; // Respondent-Survey\n\n\nconst commentBoxRespondentSurveyMapping = externalQuestion => ({\n typeId: 'comment_box',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalCommentBox(externalQuestion),\n ...mapRespondentSurveyExternalCommentBox(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst commentBoxAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'comment_box',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalCommentBox(externalQuestion) // ...mapAggregateResponseDashboardExternalCommentBox(externalQuestion), //does not exist yet\n\n});\n\nconst basicExternalSingleTextboxGuards = {\n family: isFixed('OPEN_ENDED'),\n variant: isFixed('SINGLE_LINE')\n};\n\nfunction assertExternalSingleTextbox(externalQuestion) {\n return typeAssertion(basicExternalSingleTextboxGuards)(externalQuestion);\n}\n/** Map fields shared by all capabilities */\n\n\nconst mapExternalToInternalSingleTextbox = externalQuestion => {\n assertExternalSingleTextbox(externalQuestion);\n const {\n variant,\n family\n } = externalQuestion;\n return {\n variant,\n family,\n disabled: false\n };\n};\n/** Assertion for Respondent-Survey */\n\n\nfunction assertRespondentSurvey$6(u) {\n return typeAssertion({ ...basicExternalFieldSetGuards,\n ...basicExternalRequiredGuards,\n ...basicExternalOpenEndedLayoutGuards,\n ...basicExternalOpenEndedValidationGuards\n })(u);\n}\n\nconst mapRespondentSurveyExternalSingleTextbox = externalQuestion => {\n assertRespondentSurvey$6(externalQuestion);\n const {\n layout,\n validation,\n required,\n fieldSet\n } = externalQuestion;\n return {\n layout,\n required,\n fieldSet,\n ...(validation ? {\n validation\n } : {})\n };\n}; // Respondent-Survey\n\n\nconst singleTextboxRespondentSurveyMapping = externalQuestion => ({\n typeId: 'single_textbox',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalSingleTextbox(externalQuestion),\n ...mapRespondentSurveyExternalSingleTextbox(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst singleTextboxAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'single_textbox',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalSingleTextbox(externalQuestion) // ...mapAggregateResponseDashboardExternalSingleTextbox(externalQuestion), //does not exist yet\n\n});\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/** Guard to check properties shared by all capabilities */\n\n\nconst basicExternalMatrixGuards = {\n family: isFixed('MATRIX'),\n variant: isEither([isFixed('SINGLE_ANSWER_RADIO'), isFixed('MANY_ANSWERS_CHECKBOX')])\n};\n\nfunction assertExternalMatrix(externalQuestion) {\n return typeAssertion(basicExternalMatrixGuards)(externalQuestion);\n}\n/** Map fields shared by all capabilities */\n\n\nconst mapExternalToInternalMatrix = externalQuestion => {\n assertExternalMatrix(externalQuestion);\n const {\n family,\n variant\n } = externalQuestion;\n return {\n family,\n variant,\n disabled: false\n };\n};\n/** Assertion for Respondent-Survey specific properties */\n\n\nfunction assertRespondentSurvey$5(u) {\n return typeAssertion(typeGuard({\n fieldSets: isArrayOf(isFieldSet),\n required: isNullable(isEither([isAllAnswerRequired, isAnswerRangeRequired, isAnswerCountPredicateRequired])),\n sorting: isNullable(isQuestionSorting),\n layout: typeGuard({\n placement: isQuestionLayoutPlacement,\n spacing: isQuestionLayoutSpacing,\n width: isQuestionLayoutWidth,\n labelWidthPercent: isOneOf(questionTypeHeaderColumnWidths)\n })\n }))(u);\n}\n/** Map Respondent-Survey specific properties */\n\n\nconst mapRespondentSurveyExternalMatrix = externalQuestion => {\n assertRespondentSurvey$5(externalQuestion);\n const {\n layout,\n fieldSets,\n required,\n sorting\n } = externalQuestion;\n return {\n layout,\n fieldSets,\n required,\n sorting\n };\n}; // Respondent-Survey\n\n\nconst matrixRespondentSurveyMapping = externalQuestion => ({\n typeId: 'matrix',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalMatrix(externalQuestion),\n ...mapRespondentSurveyExternalMatrix(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst matrixAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'matrix',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalMatrix(externalQuestion) // ...mapAggregateResponseDashboardExternalMatrix(externalQuestion), //does not exist yet\n\n});\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/** Guard to check properties shared by all capabilities */\n\n\nconst basicExternalMultipleChoiceGuards = {\n family: isFixed('MULTIPLE_CHOICE'),\n variant: isFixed('SINGLE_ANSWER_RADIO')\n};\n/** Assertion to check properties shared by all capabilities */\n\nfunction assertExternalMultipleChoice(externalQuestion) {\n return typeAssertion(basicExternalMultipleChoiceGuards)(externalQuestion);\n}\n/** Map fields shared by all capabilities */\n\n\nconst mapExternalToInternalMultipleChoice = externalQuestion => {\n assertExternalMultipleChoice(externalQuestion);\n const {\n variant,\n family\n } = externalQuestion;\n return {\n variant,\n family,\n disabled: false\n };\n};\n/** Assertion for Respondent-Survey specific properties */\n\n\nfunction assertRespondentSurvey$4(u) {\n return typeAssertion(typeGuard({ ...basicExternalAllMultipleChoiceGuards,\n ...basicExternalMultipleChoiceLayoutGuard,\n ...basicExternalMultipleChoiceValidationGuard,\n ...basicExternalMultipleChoiceAnswersGuard,\n ...basicExternalMultipleChoiceAnswerOtherGuard,\n ...basicExternalMultipleChoiceAnswerNoneOfTheAboveGuard\n }))(u);\n}\n/** Map Respondent-Survey specific properties */\n\n\nconst mapRespondentSurveyExternalMultipleChoice = externalQuestion => {\n assertRespondentSurvey$4(externalQuestion); // Placeholder - we don't have this visualization yet\n\n const {\n required,\n layout,\n validation,\n answers,\n answerOther,\n answerNoneOfTheAbove\n } = externalQuestion;\n return {\n required,\n layout,\n answers,\n answerOther: answerOther ? {\n id: answerOther.id,\n label: answerOther.label,\n touched: false,\n value: '',\n selected: false,\n visible: answerOther.visible,\n type: answerOther.type,\n ...(answerOther.type === 'ANSWER' ? {\n requiredErrorText: answerOther.requiredErrorText\n } : {}),\n linesCount: answerOther.layout.linesCount,\n charsCount: answerOther.layout.charsCount\n } : null,\n answerNoneOfTheAbove,\n ...(validation ? {\n validation\n } : {})\n };\n};\n/** Assertion for Respondent-Quiz-Results */\n\n\nfunction assertRespondentQuizResults(u) {\n return typeAssertion(typeGuard({ ...basicExternalMultipleChoiceLayoutGuard,\n ...basicExternalMultipleChoiceAnswerOtherGuard,\n ...basicExternalMultipleChoiceAnswerNoneOfTheAboveGuard\n }))(u);\n}\n/** Map Respondent-Quiz-Results specific properties */\n\n\nconst mapRespondentQuizResultsExternalMultipleChoice = externalQuestion => {\n assertRespondentQuizResults(externalQuestion);\n const {\n layout,\n answerOther,\n answerNoneOfTheAbove\n } = externalQuestion;\n return {\n layout,\n answerOther: answerOther ? {\n id: answerOther.id,\n label: answerOther.label,\n visible: answerOther.visible,\n type: answerOther.type,\n ...(answerOther.type === 'ANSWER' ? {\n requiredErrorText: answerOther.requiredErrorText\n } : {}),\n linesCount: answerOther.layout.linesCount,\n charsCount: answerOther.layout.charsCount\n } : null,\n answerNoneOfTheAbove: answerNoneOfTheAbove || null\n };\n}; // Respondent-Survey\n\n\nconst multipleChoiceRespondentSurveyMapping = externalQuestion => ({\n typeId: 'multiple_choice',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalMultipleChoice(externalQuestion),\n ...mapRespondentSurveyExternalMultipleChoice(externalQuestion)\n}); // Respondent-Quiz-Results\n\n\nconst multipleChoiceRespondentQuizResultsMapping = externalQuestion => ({\n typeId: 'multiple_choice',\n ...basicFieldsMapping(externalQuestion),\n ...respondentQuizResultsMapping(externalQuestion),\n ...mapExternalToInternalMultipleChoice(externalQuestion),\n ...mapRespondentQuizResultsExternalMultipleChoice(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst multipleChoiceAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'multiple_choice',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalMultipleChoice(externalQuestion) // ...mapAggregateResponseDashboardExternalMultipleChoice(externalQuestion), //does not exist yet\n\n});\n\nconst basicExternalMultipleTextboxGuards = {\n family: isFixed('OPEN_ENDED'),\n variant: isFixed('MANY_FIELDS')\n};\n\nfunction assertExternalMultipleTextbox(externalQuestion) {\n return typeAssertion(basicExternalMultipleTextboxGuards)(externalQuestion);\n}\n/** Map external question type */\n\n\nconst mapExternalToInternalMultipleTextbox = externalQuestion => {\n assertExternalMultipleTextbox(externalQuestion);\n const {\n variant,\n family\n } = externalQuestion;\n return {\n variant,\n family,\n disabled: false\n };\n};\n/** Assertion for Respondent-Survey */\n\n\nfunction assertRespondentSurvey$3(u) {\n return typeAssertion({\n fieldSets: isArrayOf(isFieldSet),\n required: isAllAnswerRequired,\n layout: typeGuard({\n placement: isQuestionLayoutPlacement,\n spacing: isQuestionLayoutSpacing,\n width: isQuestionLayoutWidth,\n labelWidthPercent: isNumber,\n charsCount: isNumber\n }),\n sorting: isNullable(isQuestionSorting),\n validation: isOptional(isNullable(isEither([isSumValidation, isFieldValidation])))\n })(u);\n}\n\nconst mapRespondentSurveyExternalMultipleTextbox = externalQuestion => {\n assertRespondentSurvey$3(externalQuestion);\n const {\n fieldSets,\n layout,\n required,\n sorting,\n validation\n } = externalQuestion;\n return {\n fieldSets,\n layout,\n required,\n sorting,\n ...(validation ? {\n validation\n } : {})\n };\n}; // Respondent-Survey\n\n\nconst multipleTextboxRespondentSurveyMapping = externalQuestion => ({\n typeId: 'multiple_textbox',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalMultipleTextbox(externalQuestion),\n ...mapRespondentSurveyExternalMultipleTextbox(externalQuestion) // does not exist yet\n\n}); // Aggregate-Response-Dashboard\n\n\nconst multipleTextboxAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'multiple_textbox',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalMultipleTextbox(externalQuestion) // ...mapAggregateResponseDashboardExternalMultipleTextbox(externalQuestion), //does not exist yet\n\n});\n\nconst basicExternalRankingGuards = {\n family: isFixed('RANKING'),\n variant: isFixed('SINGLE_ANSWER_RADIO')\n};\n\nfunction assertExternalRanking(externalQuestion) {\n return typeAssertion(basicExternalRankingGuards)(externalQuestion);\n}\n/** Map external question type */\n\n\nconst mapExternalToInternalRanking = externalQuestion => {\n assertExternalRanking(externalQuestion);\n const {\n family,\n variant\n } = externalQuestion;\n return {\n variant,\n family,\n disabled: false\n };\n};\n\nconst isRankingLayoutOption = typeGuard({\n spacing: isQuestionLayoutSpacing,\n width: isQuestionLayoutWidth,\n labelWidthPercent: isQuestionLayoutHeaderColumnWidth\n});\n/** Assertion for Respondent-Survey */\n\nfunction assertRespondentSurvey$2(u) {\n return typeAssertion({\n required: isNullable(isAllAnswerRequired),\n answerNA: isNullable(isAnswerNoneOfTheAbove),\n answersWeighted: isWeightedAnswers,\n fieldSets: isArrayOf(isFieldSet),\n isWeighted: isFixed(true),\n layout: isRankingLayoutOption,\n sorting: isNullable(isQuestionSorting)\n })(u);\n}\n/** Map the respondent survey fields */\n\n\nconst mapRespondentSurveyExternalRanking = externalQuestion => {\n assertRespondentSurvey$2(externalQuestion);\n const {\n required,\n answerNA,\n answersWeighted,\n fieldSets,\n isWeighted,\n layout,\n sorting\n } = externalQuestion;\n return {\n required,\n answerNA,\n answersWeighted,\n fieldSets,\n isWeighted,\n layout,\n sorting\n };\n}; // Respondent-Survey\n\n\nconst rankingRespondentSurveyMapping = externalQuestion => ({\n typeId: 'ranking',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalRanking(externalQuestion),\n ...mapRespondentSurveyExternalRanking(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst rankingAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'ranking',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalRanking(externalQuestion) // ...mapAggregateResponseDashboardExternalRanking(externalQuestion), //does not exist yet\n\n});\n\nconst isSliderScaleLabels = typeGuard({\n left: isString,\n middle: isOptional(isNullable(isString)),\n right: isString\n});\nconst isScaleOptions = typeGuard({\n minValue: isNumber,\n maxValue: isNumber,\n errorMessage: isString,\n stepSize: isNumber,\n startPosition: isNumber,\n isCustom: isBoolean,\n labels: isSliderScaleLabels\n});\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nconst basicExternalSliderGuards = {\n family: isFixed('SLIDER'),\n variant: isFixed('SINGLE_SLIDER')\n};\n\nfunction assertExternalSlider(externalQuestion) {\n return typeAssertion(basicExternalSliderGuards)(externalQuestion);\n}\n/** Map external question type */\n\n\nconst mapExternalToInternalSlider = externalQuestion => {\n assertExternalSlider(externalQuestion);\n const {\n family,\n variant\n } = externalQuestion;\n return {\n variant,\n family,\n disabled: false\n };\n};\n/** Assertion for Respondent-Survey */\n\n\nfunction assertRespondentSurvey$1(u) {\n return typeAssertion({\n required: isNullable(isAnswerRangeRequired),\n fieldSet: isFieldSet,\n scaleOptions: isScaleOptions,\n hideNumericalInput: isBoolean,\n instructions: isOptional(isString)\n })(u);\n}\n/** Map the respondent survey fields */\n\n\nconst mapRespondentSurveyExternalSlider = externalQuestion => {\n assertRespondentSurvey$1(externalQuestion);\n const {\n required,\n fieldSet,\n scaleOptions,\n hideNumericalInput,\n instructions\n } = externalQuestion;\n return {\n required,\n fieldSet,\n scaleOptions,\n hideNumericalInput,\n instructions\n };\n}; // Respondent-Survey\n\n\nconst sliderRespondentSurveyMapping = externalQuestion => ({\n typeId: 'slider',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalSlider(externalQuestion),\n ...mapRespondentSurveyExternalSlider(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst sliderAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'slider',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalSlider(externalQuestion) // ...mapAggregateResponseDashboardExternalSlider(externalQuestion), //does not exist yet\n\n});\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n\nconst basicExternalStarRatingGuards = {\n family: isFixed('RATING_SCALE'),\n variant: isFixed('SINGLE_ANSWER_SYMBOL')\n};\n\nfunction assertExternalStarRating(externalQuestion) {\n return typeAssertion(basicExternalStarRatingGuards)(externalQuestion);\n}\n/** Map external question type */\n\n\nconst mapExternalToInternalStarRating = externalQuestion => {\n assertExternalStarRating(externalQuestion);\n const {\n family,\n variant\n } = externalQuestion;\n return {\n variant,\n family,\n disabled: false\n };\n};\n\nconst isRatingScaleSymbolOptions = typeGuard({\n color: isString,\n symbol: isOneOf(ratingScaleSymbols)\n});\n/** Assertion for Respondent-Survey */\n\nfunction assertRespondentSurvey(u) {\n return typeAssertion({\n required: isNullable(isAllAnswerRequired),\n fieldSet: isOptional(isFieldSet),\n layout: typeGuard({\n placement: isQuestionLayoutPlacement,\n spacing: isQuestionLayoutSpacing,\n width: isQuestionLayoutWidth\n }),\n answersWeighted: isWeightedAnswers,\n answerNA: isAnswerNoneOfTheAbove,\n answerOther: isAnswerOtherComment,\n sorting: isQuestionSorting,\n symbolOptions: isRatingScaleSymbolOptions\n })(u);\n}\n/** Map the respondent survey fields */\n\n\nconst mapRespondentSurveyExternalStarRating = externalQuestion => {\n assertRespondentSurvey(externalQuestion);\n const {\n required,\n fieldSet,\n layout,\n answersWeighted,\n answerNA,\n answerOther,\n sorting,\n symbolOptions\n } = externalQuestion;\n return {\n required,\n fieldSet,\n layout,\n answersWeighted,\n answerNA,\n answerOther,\n sorting,\n symbolOptions\n };\n}; // Respondent-Survey\n\n\nconst starRatingRespondentSurveyMapping = externalQuestion => ({\n typeId: 'star_rating',\n ...basicFieldsMapping(externalQuestion),\n ...respondentSurveyMapping(externalQuestion),\n ...mapExternalToInternalStarRating(externalQuestion),\n ...mapRespondentSurveyExternalStarRating(externalQuestion)\n}); // Aggregate-Response-Dashboard\n\n\nconst starRatingAggregateResponseDashboardMapping = externalQuestion => ({\n typeId: 'star_rating',\n ...basicFieldsMapping(externalQuestion),\n ...aggregateResponseDashboardMapping(externalQuestion),\n ...mapExternalToInternalStarRating(externalQuestion) // ...mapAggregateResponseDashboardExternalStarRating(externalQuestion), //does not exist yet\n\n});\n/* eslint-disable @typescript-eslint/naming-convention */\n\n\nconst invalidCombination = () => {\n throw new Error('Invalid question and capability combination');\n};\n/**\n * Main mapping to resolve QuestionType and Capability to\n * a mapping (and in it the assertion)\n */\n\n\nconst questionTypeAndCapabilityMapping = {\n single_textbox: {\n 'respondent-survey': singleTextboxRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': singleTextboxAggregateResponseDashboardMapping\n },\n comment_box: {\n 'respondent-survey': commentBoxRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': commentBoxAggregateResponseDashboardMapping\n },\n multiple_textbox: {\n 'respondent-survey': multipleTextboxRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': multipleTextboxAggregateResponseDashboardMapping\n },\n check_box: {\n 'respondent-survey': checkBoxRespondentSurveyMapping,\n 'respondent-quiz-results': checkBoxRespondentQuizResultsMapping,\n 'aggregate-response-dashboard': checkBoxAggregateResponseDashboardMapping\n },\n image_choice: {\n 'respondent-survey': imageChoiceRespondentSurveyMapping,\n 'respondent-quiz-results': imageChoiceRespondentQuizResultsMapping,\n 'aggregate-response-dashboard': imageChoiceAggregateResponseDashboardMapping\n },\n multiple_choice: {\n 'respondent-survey': multipleChoiceRespondentSurveyMapping,\n 'respondent-quiz-results': multipleChoiceRespondentQuizResultsMapping,\n 'aggregate-response-dashboard': multipleChoiceAggregateResponseDashboardMapping\n },\n dropdown: {\n 'respondent-survey': dropdownRespondentSurveyMapping,\n 'respondent-quiz-results': dropdownRespondentQuizResultsMapping,\n 'aggregate-response-dashboard': dropdownAggregateResponseDashboardMapping\n },\n slider: {\n 'respondent-survey': sliderRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': sliderAggregateResponseDashboardMapping\n },\n star_rating: {\n 'respondent-survey': starRatingRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': starRatingAggregateResponseDashboardMapping\n },\n ranking: {\n 'respondent-survey': rankingRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': rankingAggregateResponseDashboardMapping\n },\n matrix: {\n 'respondent-survey': matrixRespondentSurveyMapping,\n 'respondent-quiz-results': invalidCombination,\n 'aggregate-response-dashboard': matrixAggregateResponseDashboardMapping\n }\n};\n/** type guard to check if string is a capability */\n\nconst isCapability = u => CAPABILITIES.includes(u);\n/** Used to dynamically map the fields base on\n * * typeId\n * * question type\n * * capability\n * * combination of question type and capability\n */\n\n\nconst mapDynamic = ({\n typeId,\n capability,\n externalQuestion\n}) => {\n if (!isCapability(capability)) {\n // if this is a custom (unknown) capability just return the `externalQuestion` for now\n return externalQuestion;\n }\n\n return questionTypeAndCapabilityMapping[typeId][capability](externalQuestion);\n};\n\nconst mapInternalDynamicToExternal = (externalQuestion, // eslint-disable-next-line @typescript-eslint/no-unused-vars\nq, // eslint-disable-next-line @typescript-eslint/no-unused-vars\ncapability // keep for future use\n) => {\n // possibly mirror `mapDynamic`s setup if needed later\n // remove internal `typeId` and other possible attributes from exported type\n const {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n typeId,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n error,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n answer,\n ...cleanExternalQuestion\n } = externalQuestion;\n return { ...cleanExternalQuestion\n };\n};\n/**\n *\n * Detects if a question belongs to this question type -\n * minimalistically as this function is supposed to be as optimized as possible as it will run multiple times\n */\n\n\nconst isCompatible$b = (q, typeId) => 'typeId' in q && q.typeId === typeId;\n\nconst baseGuards$9 = baseQuestionGuards('single_textbox', 'OPEN_ENDED', 'SINGLE_LINE');\nconst isQuestionTypeSingleTextbox = typeGuard(baseGuards$9);\n\nfunction assertQuestionTypeSingleTextbox(q) {\n return typeAssertion(baseGuards$9)(q);\n}\n\nconst mapFromExternalQuestion$a = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'single_textbox',\n externalQuestion,\n capability\n });\n assertQuestionTypeSingleTextbox(questionType);\n return questionType;\n};\n\nconst typeId$a = 'single_textbox';\n\nconst fromExternalQuestion$a = (source, capability) => mapFromExternalQuestion$a(source, capability);\n\nconst toExternalQuestion$a = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst isCompatible$a = q => isCompatible$b(q, typeId$a);\n\nconst isOfQuestionType$a = isQuestionTypeSingleTextbox;\nconst assertQuestionType$a = assertQuestionTypeSingleTextbox;\n/** Factory to build validators */\n\nconst makeValidate = (\n/** Map of validators */\nvalidators,\n/** Function to retrieve the value to validate as an if the field is touched */\nvalueAccessor) =>\n/** Immutably applies the correct validator(s) to `question` based on `capability` and returns a new question instance */\n(\n/** Question to Validate */\nquestion,\n/** The capability (e.g. `respondent-survey`) that should be validated */\ncapability) => {\n const filteredValidators = validators[capability] || [];\n const validationErrors = filteredValidators.reduce((errors, validator) => {\n const {\n value,\n touched = false\n } = valueAccessor(question, capability);\n const newError = validator(question, value, touched);\n return newError ? [...errors, newError] : errors;\n }, []);\n\n if (validationErrors.length === 0) {\n return null;\n }\n\n return validationErrors;\n};\n\nconst makeErrorId$3 = questionId => `text-length-validation:${questionId}`;\n/** returns `null` if valid and error object if not */\n\n\nconst validateTextLength = (\n/** GraphQL `TextLengthValidation` entity */\nvalidation,\n/** Id to identify the question */\nquestionId, value = '', touched) => {\n if (!validation || !touched || validation.type !== 'TEXT_LENGTH') {\n return null;\n }\n\n const {\n minLength,\n maxLength,\n errorMessage\n } = validation;\n\n if (value.length > maxLength || value.length < minLength) {\n return {\n id: makeErrorId$3(questionId),\n source: 'local-error',\n // type: validation.type,\n field: questionId,\n message: errorMessage\n };\n }\n\n return null;\n};\n/** Validates `valueToValidate` for text-length and returns copy of `question` with updated `error` attribute */\n\n\nconst checkValueTextLength = (question, valueToValidate, isTouched) => {\n var _a;\n\n if (question.validation === undefined || valueToValidate === undefined || ((_a = question.validation) === null || _a === void 0 ? void 0 : _a.type) !== 'TEXT_LENGTH') {\n return null; // questionType does not support validation\n }\n\n return validateTextLength(question.validation, question.id, valueToValidate, isTouched);\n};\n\nconst DATE_PATTERNS = {\n DATE_INTL: /(((0|1)[0-9]|2[0-9]|3[0-1])\\/(0[1-9]|1[0-2])\\/((19|20)\\d\\d))$/,\n DATE_US: /(0[1-9]|1[0-2])\\/(((0|1)[0-9]|2[0-9]|3[0-1])\\/((19|20)\\d\\d))$/\n};\nconst DATE_BUILDERS = {\n DATE_INTL: ([dd, mm, yyyy]) => new Date(yyyy, mm - 1, dd),\n DATE_US: ([mm, dd, yyyy]) => new Date(yyyy, mm - 1, dd)\n};\n\nconst makeErrorId$2 = questionId => `date-validation:${questionId}`;\n\nconst isDateValidationType = validationType => validationType === 'DATE_INTL' || validationType === 'DATE_US';\n/** formats strings to dates\n *\n * - `DD/MM/YYYY` for `DATE_INTL`\n * - `MM/DD/YYYY` for `DATE_US`\n */\n\n\nconst stringToDate = format => s => DATE_PATTERNS[format].test(s) ? DATE_BUILDERS[format](s.split('/').map(Number)) : null;\n/** returns `null` if valid and error object if not */\n\n\nconst validateDate = (\n/** GraphQL `DateValidation` entity */\nvalidation,\n/** Id to identify the question */\nquestionId, value = '', touched) => {\n if (!validation || !touched || !isDateValidationType(validation.type)) {\n return null;\n }\n\n const {\n minDate,\n maxDate,\n errorMessage\n } = validation;\n const [dmin, dmax, date] = [minDate, maxDate, value].map(stringToDate(validation.type));\n\n if (!date || dmax && date.getTime() > dmax.getTime() || dmin && date.getTime() < dmin.getTime()) {\n return {\n id: makeErrorId$2(questionId),\n source: 'local-error',\n // type: validation.type,\n field: questionId,\n message: errorMessage\n };\n }\n\n return null;\n};\n/** Validates `valueToValidate` as date and returns copy of `question` with updated `error` attribute */\n\n\nconst checkValueDateFormat = (question, valueToValidate, isTouched) => {\n var _a;\n\n if (valueToValidate === undefined || !isDateValidationType((_a = question === null || question === void 0 ? void 0 : question.validation) === null || _a === void 0 ? void 0 : _a.type)) {\n return null; // questionType does not support validation\n }\n\n return validateDate(question.validation, question.id, valueToValidate, isTouched);\n};\n\nconst makeErrorId$1 = questionId => `numerical-validation:${questionId}`;\n\nconst isNumericalValidationType = validationType => validationType === 'INTEGER' || validationType === 'DECIMAL';\n/** Integers can only contain numbers (`0-9`) */\n\n\nconst isValidInteger = (maybeInteger = '') => maybeInteger.match(/^[0-9]+$/) !== null;\n/** returns `null` if valid and error object if not */\n\n\nconst validateNumber = (\n/** GraphQL `DateValidation` entity */\nvalidation,\n/** Id to identify the question */\nquestionId, value = '', touched) => {\n if (!validation || !touched || !isNumericalValidationType(validation.type)) {\n return null;\n }\n\n const {\n minValue,\n maxValue,\n errorMessage\n } = validation;\n const parsedNumber = parseFloat(value);\n\n if (Number.isNaN(parsedNumber) || validation.type === 'INTEGER' && !isValidInteger(value) || maxValue && parsedNumber > maxValue || minValue && parsedNumber < minValue) {\n return {\n id: makeErrorId$1(questionId),\n source: 'local-error',\n // type: validation.type,\n field: questionId,\n message: errorMessage\n };\n }\n\n return null;\n};\n/** Validates `valueToValidate` as number and returns copy of `question` with updated `error` attribute */\n\n\nconst checkValueNumericalFormat = (question, valueToValidate, isTouched) => {\n var _a;\n\n if (valueToValidate === undefined || !isNumericalValidationType((_a = question === null || question === void 0 ? void 0 : question.validation) === null || _a === void 0 ? void 0 : _a.type)) {\n return null; // questionType does not support validation\n }\n\n return validateNumber(question.validation, question.id, valueToValidate, isTouched);\n};\n\nfunction getDefaultExportFromCjs(x) {\n return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar isEmail$1 = {\n exports: {}\n};\nvar assertString = {\n exports: {}\n};\n\n(function (module, exports) {\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = assertString;\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function assertString(input) {\n var isString = typeof input === 'string' || input instanceof String;\n\n if (!isString) {\n var invalidType = _typeof(input);\n\n if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name;\n throw new TypeError(\"Expected a string but received a \".concat(invalidType));\n }\n }\n\n module.exports = exports.default;\n module.exports.default = exports.default;\n})(assertString, assertString.exports);\n\nvar merge = {\n exports: {}\n};\n\n(function (module, exports) {\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = merge;\n\n function merge() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaults = arguments.length > 1 ? arguments[1] : undefined;\n\n for (var key in defaults) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = defaults[key];\n }\n }\n\n return obj;\n }\n\n module.exports = exports.default;\n module.exports.default = exports.default;\n})(merge, merge.exports);\n\nvar isByteLength = {\n exports: {}\n};\n\n(function (module, exports) {\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = isByteLength;\n\n var _assertString = _interopRequireDefault(assertString.exports);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n /* eslint-disable prefer-rest-params */\n\n\n function isByteLength(str, options) {\n (0, _assertString.default)(str);\n var min;\n var max;\n\n if (_typeof(options) === 'object') {\n min = options.min || 0;\n max = options.max;\n } else {\n // backwards compatibility: isByteLength(str, min [, max])\n min = arguments[1];\n max = arguments[2];\n }\n\n var len = encodeURI(str).split(/%..|./).length - 1;\n return len >= min && (typeof max === 'undefined' || len <= max);\n }\n\n module.exports = exports.default;\n module.exports.default = exports.default;\n})(isByteLength, isByteLength.exports);\n\nvar isFQDN = {\n exports: {}\n};\n\n(function (module, exports) {\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = isFQDN;\n\n var _assertString = _interopRequireDefault(assertString.exports);\n\n var _merge = _interopRequireDefault(merge.exports);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n var default_fqdn_options = {\n require_tld: true,\n allow_underscores: false,\n allow_trailing_dot: false,\n allow_numeric_tld: false\n };\n\n function isFQDN(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, default_fqdn_options);\n /* Remove the optional trailing dot before checking validity */\n\n if (options.allow_trailing_dot && str[str.length - 1] === '.') {\n str = str.substring(0, str.length - 1);\n }\n\n var parts = str.split('.');\n var tld = parts[parts.length - 1];\n\n if (options.require_tld) {\n // disallow fqdns without tld\n if (parts.length < 2) {\n return false;\n }\n\n if (!/^([a-z\\u00a1-\\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n return false;\n } // disallow spaces && special characers\n\n\n if (/[\\s\\u2002-\\u200B\\u202F\\u205F\\u3000\\uFEFF\\uDB40\\uDC20\\u00A9\\uFFFD]/.test(tld)) {\n return false;\n }\n } // reject numeric TLDs\n\n\n if (!options.allow_numeric_tld && /^\\d+$/.test(tld)) {\n return false;\n }\n\n return parts.every(function (part) {\n if (part.length > 63) {\n return false;\n }\n\n if (!/^[a-z_\\u00a1-\\uffff0-9-]+$/i.test(part)) {\n return false;\n } // disallow full-width chars\n\n\n if (/[\\uff01-\\uff5e]/.test(part)) {\n return false;\n } // disallow parts starting or ending with hyphen\n\n\n if (/^-|-$/.test(part)) {\n return false;\n }\n\n if (!options.allow_underscores && /_/.test(part)) {\n return false;\n }\n\n return true;\n });\n }\n\n module.exports = exports.default;\n module.exports.default = exports.default;\n})(isFQDN, isFQDN.exports);\n\nvar isIP = {\n exports: {}\n};\n\n(function (module, exports) {\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = isIP;\n\n var _assertString = _interopRequireDefault(assertString.exports);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n /**\n 11.3. Examples\n \n The following addresses\n \n fe80::1234 (on the 1st link of the node)\n ff02::5678 (on the 5th link of the node)\n ff08::9abc (on the 10th organization of the node)\n \n would be represented as follows:\n \n fe80::1234%1\n ff02::5678%5\n ff08::9abc%10\n \n (Here we assume a natural translation from a zone index to the\n part, where the Nth zone of any scope is translated into\n \"N\".)\n \n If we use interface names as , those addresses could also be\n represented as follows:\n \n fe80::1234%ne0\n ff02::5678%pvc1.3\n ff08::9abc%interface10\n \n where the interface \"ne0\" belongs to the 1st link, \"pvc1.3\" belongs\n to the 5th link, and \"interface10\" belongs to the 10th organization.\n * * */\n\n\n var ipv4Maybe = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;\n var ipv6Block = /^[0-9A-F]{1,4}$/i;\n\n function isIP(str) {\n var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n (0, _assertString.default)(str);\n version = String(version);\n\n if (!version) {\n return isIP(str, 4) || isIP(str, 6);\n } else if (version === '4') {\n if (!ipv4Maybe.test(str)) {\n return false;\n }\n\n var parts = str.split('.').sort(function (a, b) {\n return a - b;\n });\n return parts[3] <= 255;\n } else if (version === '6') {\n var addressAndZone = [str]; // ipv6 addresses could have scoped architecture\n // according to https://tools.ietf.org/html/rfc4007#section-11\n\n if (str.includes('%')) {\n addressAndZone = str.split('%');\n\n if (addressAndZone.length !== 2) {\n // it must be just two parts\n return false;\n }\n\n if (!addressAndZone[0].includes(':')) {\n // the first part must be the address\n return false;\n }\n\n if (addressAndZone[1] === '') {\n // the second part must not be empty\n return false;\n }\n }\n\n var blocks = addressAndZone[0].split(':');\n var foundOmissionBlock = false; // marker to indicate ::\n // At least some OS accept the last 32 bits of an IPv6 address\n // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says\n // that '::ffff:a.b.c.d' is valid for IPv4-mapped IPv6 addresses,\n // and '::a.b.c.d' is deprecated, but also valid.\n\n var foundIPv4TransitionBlock = isIP(blocks[blocks.length - 1], 4);\n var expectedNumberOfBlocks = foundIPv4TransitionBlock ? 7 : 8;\n\n if (blocks.length > expectedNumberOfBlocks) {\n return false;\n } // initial or final ::\n\n\n if (str === '::') {\n return true;\n } else if (str.substr(0, 2) === '::') {\n blocks.shift();\n blocks.shift();\n foundOmissionBlock = true;\n } else if (str.substr(str.length - 2) === '::') {\n blocks.pop();\n blocks.pop();\n foundOmissionBlock = true;\n }\n\n for (var i = 0; i < blocks.length; ++i) {\n // test for a :: which can not be at the string start/end\n // since those cases have been handled above\n if (blocks[i] === '' && i > 0 && i < blocks.length - 1) {\n if (foundOmissionBlock) {\n return false; // multiple :: in address\n }\n\n foundOmissionBlock = true;\n } else if (foundIPv4TransitionBlock && i === blocks.length - 1) ;else if (!ipv6Block.test(blocks[i])) {\n return false;\n }\n }\n\n if (foundOmissionBlock) {\n return blocks.length >= 1;\n }\n\n return blocks.length === expectedNumberOfBlocks;\n }\n\n return false;\n }\n\n module.exports = exports.default;\n module.exports.default = exports.default;\n})(isIP, isIP.exports);\n\n(function (module, exports) {\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.default = isEmail;\n\n var _assertString = _interopRequireDefault(assertString.exports);\n\n var _merge = _interopRequireDefault(merge.exports);\n\n var _isByteLength = _interopRequireDefault(isByteLength.exports);\n\n var _isFQDN = _interopRequireDefault(isFQDN.exports);\n\n var _isIP = _interopRequireDefault(isIP.exports);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n }\n\n function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n\n function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n var default_email_options = {\n allow_display_name: false,\n require_display_name: false,\n allow_utf8_local_part: true,\n require_tld: true,\n blacklisted_chars: '',\n ignore_max_length: false\n };\n /* eslint-disable max-len */\n\n /* eslint-disable no-control-regex */\n\n var splitNameAddress = /^([^\\x00-\\x1F\\x7F-\\x9F\\cX]+)<(.+)>$/i;\n var emailUserPart = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]+$/i;\n var gmailUserPart = /^[a-z\\d]+$/;\n var quotedEmailUser = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]))*$/i;\n var emailUserUtf8Part = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+$/i;\n var quotedEmailUserUtf8 = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))*$/i;\n var defaultMaxEmailLength = 254;\n /* eslint-enable max-len */\n\n /* eslint-enable no-control-regex */\n\n /**\n * Validate display name according to the RFC2822: https://tools.ietf.org/html/rfc2822#appendix-A.1.2\n * @param {String} display_name\n */\n\n function validateDisplayName(display_name) {\n var trim_quotes = display_name.match(/^\"(.+)\"$/i);\n var display_name_without_quotes = trim_quotes ? trim_quotes[1] : display_name; // display name with only spaces is not valid\n\n if (!display_name_without_quotes.trim()) {\n return false;\n } // check whether display name contains illegal character\n\n\n var contains_illegal = /[\\.\";<>]/.test(display_name_without_quotes);\n\n if (contains_illegal) {\n // if contains illegal characters,\n // must to be enclosed in double-quotes, otherwise it's not a valid display name\n if (!trim_quotes) {\n return false;\n } // the quotes in display name must start with character symbol \\\n\n\n var all_start_with_back_slash = display_name_without_quotes.split('\"').length === display_name_without_quotes.split('\\\\\"').length;\n\n if (!all_start_with_back_slash) {\n return false;\n }\n }\n\n return true;\n }\n\n function isEmail(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, default_email_options);\n\n if (options.require_display_name || options.allow_display_name) {\n var display_email = str.match(splitNameAddress);\n\n if (display_email) {\n var display_name;\n\n var _display_email = _slicedToArray(display_email, 3);\n\n display_name = _display_email[1];\n str = _display_email[2]; // sometimes need to trim the last space to get the display name\n // because there may be a space between display name and email address\n // eg. myname \n // the display name is `myname` instead of `myname `, so need to trim the last space\n\n if (display_name.endsWith(' ')) {\n display_name = display_name.substr(0, display_name.length - 1);\n }\n\n if (!validateDisplayName(display_name)) {\n return false;\n }\n } else if (options.require_display_name) {\n return false;\n }\n }\n\n if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {\n return false;\n }\n\n var parts = str.split('@');\n var domain = parts.pop();\n var user = parts.join('@');\n var lower_domain = domain.toLowerCase();\n\n if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) {\n /*\n Previously we removed dots for gmail addresses before validating.\n This was removed because it allows `multiple..dots@gmail.com`\n to be reported as valid, but it is not.\n Gmail only normalizes single dots, removing them from here is pointless,\n should be done in normalizeEmail\n */\n user = user.toLowerCase(); // Removing sub-address from username before gmail validation\n\n var username = user.split('+')[0]; // Dots are not included in gmail length restriction\n\n if (!(0, _isByteLength.default)(username.replace('.', ''), {\n min: 6,\n max: 30\n })) {\n return false;\n }\n\n var _user_parts = username.split('.');\n\n for (var i = 0; i < _user_parts.length; i++) {\n if (!gmailUserPart.test(_user_parts[i])) {\n return false;\n }\n }\n }\n\n if (options.ignore_max_length === false && (!(0, _isByteLength.default)(user, {\n max: 64\n }) || !(0, _isByteLength.default)(domain, {\n max: 254\n }))) {\n return false;\n }\n\n if (!(0, _isFQDN.default)(domain, {\n require_tld: options.require_tld\n })) {\n if (!options.allow_ip_domain) {\n return false;\n }\n\n if (!(0, _isIP.default)(domain)) {\n if (!domain.startsWith('[') || !domain.endsWith(']')) {\n return false;\n }\n\n var noBracketdomain = domain.substr(1, domain.length - 2);\n\n if (noBracketdomain.length === 0 || !(0, _isIP.default)(noBracketdomain)) {\n return false;\n }\n }\n }\n\n if (user[0] === '\"') {\n user = user.slice(1, user.length - 1);\n return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);\n }\n\n var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;\n var user_parts = user.split('.');\n\n for (var _i2 = 0; _i2 < user_parts.length; _i2++) {\n if (!pattern.test(user_parts[_i2])) {\n return false;\n }\n }\n\n if (options.blacklisted_chars) {\n if (user.search(new RegExp(\"[\".concat(options.blacklisted_chars, \"]+\"), 'g')) !== -1) return false;\n }\n\n return true;\n }\n\n module.exports = exports.default;\n module.exports.default = exports.default;\n})(isEmail$1, isEmail$1.exports);\n\nvar isEmail = /*@__PURE__*/getDefaultExportFromCjs(isEmail$1.exports);\n\nconst makeErrorId = questionId => `email-validation:${questionId}`;\n/** returns `null` if valid and error object if not */\n\n\nconst validateEmail = (\n/** GraphQL `EmailQuestionValidation` entity */\nvalidation,\n/** Id to identify the question */\nquestionId, value = '', touched) => {\n if (!validation || !touched || (validation === null || validation === void 0 ? void 0 : validation.type) !== 'EMAIL') {\n return null;\n }\n\n const {\n errorMessage\n } = validation;\n\n if (!isEmail(value)) {\n return {\n id: makeErrorId(questionId),\n source: 'local-error',\n // type: validation.type,\n field: questionId,\n message: errorMessage\n };\n }\n\n return null;\n};\n/** Validates `valueToValidate` as email and returns copy of `question` with updated `error` attribute */\n\n\nconst checkValueEmailFormat = (question, valueToValidate, isTouched) => {\n var _a;\n\n if (question.validation === undefined || valueToValidate === undefined || ((_a = question.validation) === null || _a === void 0 ? void 0 : _a.type) !== 'EMAIL') {\n return null; // questionType does not support validation\n }\n\n return validateEmail(question.validation, question.id, valueToValidate, isTouched);\n};\n\nconst validators$a = {\n 'respondent-survey': [checkValueTextLength, checkValueNumericalFormat, checkValueDateFormat, checkValueEmailFormat]\n};\nconst validate$a = makeValidate(validators$a, (q, capability) => {\n var _a;\n\n if (capability === 'respondent-survey') {\n const {\n value,\n touched\n } = ((_a = q) === null || _a === void 0 ? void 0 : _a.answer) || {};\n return {\n value,\n touched\n };\n }\n\n return {};\n});\nconst singleTextboxQuestionDefinition = {\n typeId: typeId$a,\n validate: validate$a,\n fromExternalQuestion: fromExternalQuestion$a,\n toExternalQuestion: toExternalQuestion$a,\n isOfQuestionType: isOfQuestionType$a,\n isCompatible: isCompatible$a,\n assertQuestionType: assertQuestionType$a\n};\nconst baseGuards$8 = baseQuestionGuards('multiple_textbox', 'OPEN_ENDED', 'MANY_FIELDS');\nconst isQuestionTypeMultipleTextbox = typeGuard(baseGuards$8);\n\nfunction assertQuestionTypeMultipleTextbox(q) {\n return typeAssertion(baseGuards$8)(q);\n}\n\nconst mapFromExternalQuestion$9 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'multiple_textbox',\n externalQuestion,\n capability\n });\n assertQuestionTypeMultipleTextbox(questionType);\n return questionType;\n};\n\nconst typeId$9 = 'multiple_textbox';\n\nconst fromExternalQuestion$9 = (source, capability) => mapFromExternalQuestion$9(source, capability);\n\nconst toExternalQuestion$9 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst isCompatible$9 = q => isCompatible$b(q, typeId$9);\n\nconst isOfQuestionType$9 = isQuestionTypeMultipleTextbox;\nconst assertQuestionType$9 = assertQuestionTypeMultipleTextbox;\nconst validators$9 = {// insert validations in here (ref: singleTextbox.validation.ts)\n};\nconst validate$9 = makeValidate(validators$9, () => {\n // insert value accessor here\n return {};\n});\nconst multipleTextboxQuestionDefinition = {\n typeId: typeId$9,\n validate: validate$9,\n fromExternalQuestion: fromExternalQuestion$9,\n toExternalQuestion: toExternalQuestion$9,\n isOfQuestionType: isOfQuestionType$9,\n isCompatible: isCompatible$9,\n assertQuestionType: assertQuestionType$9\n}; /// Type Guards\n\nconst baseGuards$7 = baseQuestionGuards('comment_box', 'OPEN_ENDED', 'ESSAY');\nconst isQuestionTypeCommentBox = typeGuard(baseGuards$7);\n\nfunction assertQuestionTypeCommentBox(q) {\n return typeAssertion(baseGuards$7)(q);\n}\n\nconst mapFromExternalQuestion$8 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'comment_box',\n externalQuestion,\n capability\n });\n assertQuestionTypeCommentBox(questionType);\n return questionType;\n};\n\nconst typeId$8 = 'comment_box';\n\nconst fromExternalQuestion$8 = (source, capability) => mapFromExternalQuestion$8(source, capability);\n\nconst toExternalQuestion$8 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst isCompatible$8 = q => isCompatible$b(q, typeId$8);\n\nconst isOfQuestionType$8 = isQuestionTypeCommentBox;\nconst assertQuestionType$8 = assertQuestionTypeCommentBox;\nconst validators$8 = {\n 'respondent-survey': [checkValueTextLength] // Not sure this is correct - validate\n\n};\nconst validate$8 = makeValidate(validators$8, (q, capability) => {\n var _a;\n\n if (capability === 'respondent-survey') {\n const {\n value,\n touched\n } = ((_a = q) === null || _a === void 0 ? void 0 : _a.answer) || {};\n return {\n value,\n touched\n };\n }\n\n return {};\n});\nconst commentBoxQuestionDefinition = {\n typeId: typeId$8,\n validate: validate$8,\n fromExternalQuestion: fromExternalQuestion$8,\n toExternalQuestion: toExternalQuestion$8,\n isCompatible: isCompatible$8,\n isOfQuestionType: isOfQuestionType$8,\n assertQuestionType: assertQuestionType$8\n}; /// Type Guards\n\nconst baseGuards$6 = baseQuestionGuards('multiple_choice', 'MULTIPLE_CHOICE', 'SINGLE_ANSWER_RADIO');\nconst isQuestionValidationMultipleChoice = isFieldValidation;\nconst isQuestionTypeMultipleChoice = typeGuard(baseGuards$6);\n\nfunction assertQuestionTypeMultipleChoice(q) {\n return typeAssertion(baseGuards$6)(q);\n}\n\nconst mapFromExternalQuestion$7 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'multiple_choice',\n externalQuestion,\n capability\n });\n assertQuestionTypeMultipleChoice(questionType);\n return questionType;\n};\n\nconst typeId$7 = 'multiple_choice';\n\nconst fromExternalQuestion$7 = (source, capability) => mapFromExternalQuestion$7(source, capability);\n\nconst toExternalQuestion$7 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst isCompatible$7 = q => isCompatible$b(q, typeId$7);\n\nconst isOfQuestionType$7 = isQuestionTypeMultipleChoice;\nconst assertQuestionType$7 = assertQuestionTypeMultipleChoice;\nconst validators$7 = {\n 'respondent-survey': [checkValueTextLength, checkValueNumericalFormat, checkValueDateFormat, checkValueEmailFormat]\n};\nconst validate$7 = makeValidate(validators$7, (q, capability) => {\n var _a;\n\n if (capability === 'respondent-survey') {\n const {\n value,\n touched\n } = ((_a = q) === null || _a === void 0 ? void 0 : _a.answerOther) || {};\n return {\n value,\n touched\n };\n }\n\n return {};\n});\nconst multipleChoiceQuestionDefinition = {\n typeId: typeId$7,\n validate: validate$7,\n fromExternalQuestion: fromExternalQuestion$7,\n toExternalQuestion: toExternalQuestion$7,\n isCompatible: isCompatible$7,\n isOfQuestionType: isOfQuestionType$7,\n assertQuestionType: assertQuestionType$7\n}; // TypeGuards and Assertions\n\nconst baseGuards$5 = baseQuestionGuards('check_box', 'MULTIPLE_CHOICE', 'MANY_ANSWERS_CHECKBOX');\nconst isQuestionTypeCheckBox = typeGuard(baseGuards$5);\n\nfunction assertQuestionTypeCheckBox(externalQuestion) {\n return typeAssertion(baseGuards$5)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$6 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'check_box',\n externalQuestion,\n capability\n });\n assertQuestionTypeCheckBox(questionType);\n return questionType;\n};\n\nconst typeId$6 = 'check_box';\n\nconst fromExternalQuestion$6 = (source, capability) => mapFromExternalQuestion$6(source, capability);\n\nconst toExternalQuestion$6 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst isCompatible$6 = q => isCompatible$b(q, typeId$6);\n\nconst isOfQuestionType$6 = isQuestionTypeCheckBox;\nconst assertQuestionType$6 = assertQuestionTypeCheckBox;\nconst validators$6 = {\n 'respondent-survey': [checkValueTextLength, checkValueNumericalFormat, checkValueDateFormat, checkValueEmailFormat]\n};\nconst validate$6 = makeValidate(validators$6, (q, capability) => {\n var _a;\n\n if (capability === 'respondent-survey') {\n const {\n value,\n touched\n } = ((_a = q) === null || _a === void 0 ? void 0 : _a.answerOther) || {};\n return {\n value,\n touched\n };\n }\n\n return {};\n});\nconst checkBoxQuestionDefinition = {\n typeId: typeId$6,\n validate: validate$6,\n fromExternalQuestion: fromExternalQuestion$6,\n toExternalQuestion: toExternalQuestion$6,\n isCompatible: isCompatible$6,\n isOfQuestionType: isOfQuestionType$6,\n assertQuestionType: assertQuestionType$6\n};\nconst baseGuards$4 = baseQuestionGuards('dropdown', 'MULTIPLE_CHOICE', 'SINGLE_ANSWER_MENU');\nconst isQuestionTypeDropdown = typeGuard(baseGuards$4);\n\nfunction assertQuestionTypeDropdown(externalQuestion) {\n return typeAssertion(baseGuards$4)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$5 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'dropdown',\n externalQuestion,\n capability\n });\n assertQuestionTypeDropdown(questionType);\n return questionType;\n};\n\nconst typeId$5 = 'dropdown';\n\nconst fromExternalQuestion$5 = (source, capability) => mapFromExternalQuestion$5(source, capability);\n\nconst toExternalQuestion$5 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst isCompatible$5 = q => isCompatible$b(q, typeId$5);\n\nconst isOfQuestionType$5 = isQuestionTypeDropdown;\nconst assertQuestionType$5 = assertQuestionTypeDropdown;\nconst validators$5 = {\n 'respondent-survey': [checkValueTextLength, checkValueNumericalFormat, checkValueDateFormat, checkValueEmailFormat]\n};\nconst validate$5 = makeValidate(validators$5, (q, capability) => {\n var _a;\n\n if (capability === 'respondent-survey') {\n const {\n value,\n touched\n } = ((_a = q) === null || _a === void 0 ? void 0 : _a.answerOther) || {};\n return {\n value,\n touched\n };\n }\n\n return {};\n});\nconst dropdownQuestionDefinition = {\n typeId: typeId$5,\n validate: validate$5,\n fromExternalQuestion: fromExternalQuestion$5,\n toExternalQuestion: toExternalQuestion$5,\n isCompatible: isCompatible$5,\n isOfQuestionType: isOfQuestionType$5,\n assertQuestionType: assertQuestionType$5\n};\nconst baseGuards$3 = baseQuestionGuards('image_choice', 'MULTIPLE_CHOICE', 'SINGLE_ANSWER_IMAGE');\nconst isQuestionTypeImageChoice = typeGuard({ ...baseGuards$3,\n\n /* To reduce code duplication, we assume the discrepancies between\n * \"single answer\" and \"many answers\" question types are limited to \"typeId\" and \"variant\".\n */\n typeId: isFixed('image_choice'),\n variant: isEither([isFixed('SINGLE_ANSWER_IMAGE'), isFixed('MANY_ANSWERS_IMAGE')])\n});\n\nfunction assertQuestionTypeImageChoice(q) {\n return typeAssertion({ ...baseGuards$3,\n\n /* To reduce code duplication, we assume the discrepancies between\n * \"single answer\" and \"many answers\" question types are limited to \"typeId\" and \"variant\".\n */\n typeId: isFixed('image_choice'),\n variant: isEither([isFixed('SINGLE_ANSWER_IMAGE'), isFixed('MANY_ANSWERS_IMAGE')])\n })(q);\n}\n\nconst mapFromExternalQuestion$4 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'image_choice',\n externalQuestion,\n capability\n });\n assertQuestionTypeImageChoice(questionType);\n return questionType;\n};\n\nconst typeId$4 = 'image_choice';\n\nconst fromExternalQuestion$4 = (source, capability) => mapFromExternalQuestion$4(source, capability);\n\nconst toExternalQuestion$4 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst isCompatible$4 = q => isCompatible$b(q, typeId$4);\n\nconst isOfQuestionType$4 = isQuestionTypeImageChoice;\nconst assertQuestionType$4 = assertQuestionTypeImageChoice;\nconst validators$4 = {// insert validations in here (ref: singleTextbox.validation.ts)\n};\nconst validate$4 = makeValidate(validators$4, () => {\n // insert value accessor here\n return {};\n});\nconst imageChoiceQuestionDefinition = {\n typeId: typeId$4,\n validate: validate$4,\n fromExternalQuestion: fromExternalQuestion$4,\n toExternalQuestion: toExternalQuestion$4,\n isCompatible: isCompatible$4,\n isOfQuestionType: isOfQuestionType$4,\n assertQuestionType: assertQuestionType$4\n};\nconst baseGuards$2 = baseQuestionGuards('slider', 'SLIDER', 'SINGLE_SLIDER');\nconst isQuestionTypeSlider = typeGuard(baseGuards$2); // export const assertQuestionTypeSlider =\n\nfunction assertQuestionTypeSlider(externalQuestion) {\n return typeAssertion(baseGuards$2)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$3 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'slider',\n externalQuestion,\n capability\n });\n assertQuestionTypeSlider(questionType);\n return questionType;\n};\n\nconst typeId$3 = 'slider';\n\nconst isCompatible$3 = q => isCompatible$b(q, typeId$3);\n\nconst isOfQuestionType$3 = isQuestionTypeSlider;\nconst assertQuestionType$3 = assertQuestionTypeSlider;\n\nconst fromExternalQuestion$3 = (source, capability) => mapFromExternalQuestion$3(source, capability);\n\nconst toExternalQuestion$3 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst validators$3 = {// insert validations in here (ref: singleTextbox.validation.ts)\n};\nconst validate$3 = makeValidate(validators$3, () => {\n // insert value accessor here\n return {};\n});\nconst sliderQuestionDefinition = {\n typeId: typeId$3,\n validate: validate$3,\n fromExternalQuestion: fromExternalQuestion$3,\n toExternalQuestion: toExternalQuestion$3,\n isCompatible: isCompatible$3,\n isOfQuestionType: isOfQuestionType$3,\n assertQuestionType: assertQuestionType$3\n};\nconst baseGuards$1 = baseQuestionGuards('star_rating', 'RATING_SCALE', 'SINGLE_ANSWER_SYMBOL');\nconst isQuestionTypeStarRating = typeGuard(baseGuards$1);\n\nfunction assertQuestionTypeStarRating(externalQuestion) {\n return typeAssertion(baseGuards$1)(externalQuestion);\n}\n\nconst mapFromExternalQuestion$2 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'star_rating',\n externalQuestion,\n capability\n });\n assertQuestionTypeStarRating(questionType);\n return questionType;\n};\n\nconst typeId$2 = 'star_rating';\n\nconst isCompatible$2 = q => isCompatible$b(q, typeId$2);\n\nconst isOfQuestionType$2 = isQuestionTypeStarRating;\nconst assertQuestionType$2 = assertQuestionTypeStarRating;\n\nconst fromExternalQuestion$2 = (source, capability) => mapFromExternalQuestion$2(source, capability);\n\nconst toExternalQuestion$2 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst validators$2 = {// insert validations in here (ref: singleTextbox.validation.ts)\n};\nconst validate$2 = makeValidate(validators$2, () => {\n // insert value accessor here\n return {};\n});\nconst starRatingQuestionDefinition = {\n typeId: typeId$2,\n validate: validate$2,\n fromExternalQuestion: fromExternalQuestion$2,\n toExternalQuestion: toExternalQuestion$2,\n isCompatible: isCompatible$2,\n isOfQuestionType: isOfQuestionType$2,\n assertQuestionType: assertQuestionType$2\n};\nconst baseSingleAnswerGuards = baseQuestionGuards('matrix', 'MATRIX', 'SINGLE_ANSWER_RADIO');\nconst baseManyAnswersGuards = baseQuestionGuards('matrix', 'MATRIX', 'MANY_ANSWERS_CHECKBOX');\nconst isQuestionTypeMatrixSingleAnswer = typeGuard(baseSingleAnswerGuards);\nconst isQuestionTypeMatrixManyAnswers = typeGuard(baseManyAnswersGuards);\nconst isQuestionTypeMatrix = isEither([isQuestionTypeMatrixSingleAnswer, isQuestionTypeMatrixManyAnswers]);\n\nfunction assertQuestionTypeMatrix(externalQuestion) {\n // TODO: Refactor for better error messages\n if (!isQuestionTypeMatrix(externalQuestion)) {\n throw new Error('Question data does not match any supported question type.');\n }\n}\n\nconst mapFromExternalQuestion$1 = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'matrix',\n externalQuestion,\n capability\n });\n assertQuestionTypeMatrix(questionType);\n return questionType;\n};\n\nconst typeId$1 = 'matrix';\n\nconst isCompatible$1 = q => isCompatible$b(q, typeId$1);\n\nconst isOfQuestionType$1 = isQuestionTypeMatrix;\nconst assertQuestionType$1 = assertQuestionTypeMatrix;\n\nconst fromExternalQuestion$1 = (source, capability) => mapFromExternalQuestion$1(source, capability);\n\nconst toExternalQuestion$1 = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst validators$1 = {// insert validations in here (ref: singleTextbox.validation.ts)\n};\nconst validate$1 = makeValidate(validators$1, () => {\n // insert value accessor here\n return {};\n});\nconst matrixQuestionDefinition = {\n typeId: typeId$1,\n fromExternalQuestion: fromExternalQuestion$1,\n toExternalQuestion: toExternalQuestion$1,\n isOfQuestionType: isOfQuestionType$1,\n isCompatible: isCompatible$1,\n assertQuestionType: assertQuestionType$1,\n validate: validate$1\n};\nconst baseGuards = baseQuestionGuards('ranking', 'RANKING', 'SINGLE_ANSWER_RADIO'); // TODO: Remove Partial here\n\nconst isQuestionTypeRanking = typeGuard(baseGuards); // TODO: Remove Partial here\n\nfunction assertQuestionTypeRanking(externalQuestion) {\n return typeAssertion(baseGuards)(externalQuestion);\n}\n\nconst mapFromExternalQuestion = (externalQuestion, capability) => {\n const questionType = mapDynamic({\n typeId: 'ranking',\n externalQuestion,\n capability\n });\n assertQuestionTypeRanking(questionType);\n return questionType;\n};\n\nconst typeId = 'ranking';\n\nconst isCompatible = q => isCompatible$b(q, typeId);\n\nconst isOfQuestionType = isQuestionTypeRanking;\nconst assertQuestionType = assertQuestionTypeRanking;\n\nconst fromExternalQuestion = (source, capability) => mapFromExternalQuestion(source, capability);\n\nconst toExternalQuestion = (eq, q, capability) => mapInternalDynamicToExternal(eq);\n\nconst validators = {// insert validations in here (ref: singleTextbox.validation.ts)\n};\nconst validate = makeValidate(validators, () => {\n // insert value accessor here\n return {};\n});\nconst rankingQuestionDefinition = {\n typeId,\n validate,\n fromExternalQuestion,\n toExternalQuestion,\n isCompatible,\n isOfQuestionType,\n assertQuestionType\n};\nconst questionTypeDefinitionModules = [singleTextboxQuestionDefinition, multipleTextboxQuestionDefinition, commentBoxQuestionDefinition, multipleChoiceQuestionDefinition, checkBoxQuestionDefinition, imageChoiceQuestionDefinition, dropdownQuestionDefinition, sliderQuestionDefinition, starRatingQuestionDefinition, matrixQuestionDefinition, rankingQuestionDefinition];\n\nconst findByType = typeId => qd => qd.typeId === typeId;\n\nconst pickQuestionTypeDefinition = typeId => {\n const res = questionTypeDefinitionModules.find(findByType(typeId));\n\n if (res === undefined) {\n throw new Error(`Unable to find module definition for type ${typeId}`);\n }\n\n return res;\n};\n\nconst selectQuestionTypeDefinition = q => {\n var _a;\n\n return (_a = questionTypeDefinitionModules.find(({\n isCompatible\n }) => isCompatible(q))) !== null && _a !== void 0 ? _a : null;\n};\n/** Converts the external `family` and `variant` to the internally used `TypeId` */\n\n\nconst getTypeId = ({\n family,\n variant\n}) => {\n switch (family) {\n case 'OPEN_ENDED':\n switch (variant) {\n case 'SINGLE_LINE':\n return 'single_textbox';\n\n case 'ESSAY':\n return 'comment_box';\n\n case 'MANY_FIELDS':\n return 'multiple_textbox';\n\n default:\n return null;\n }\n\n case 'MULTIPLE_CHOICE':\n switch (variant) {\n case 'SINGLE_ANSWER_RADIO':\n return 'multiple_choice';\n\n case 'MANY_ANSWERS_CHECKBOX':\n return 'check_box';\n\n case 'SINGLE_ANSWER_IMAGE':\n case 'MANY_ANSWERS_IMAGE':\n return 'image_choice';\n\n case 'SINGLE_ANSWER_MENU':\n return 'dropdown';\n\n default:\n return null;\n }\n\n case 'SLIDER':\n switch (variant) {\n case 'SINGLE_SLIDER':\n return 'slider';\n\n default:\n return null;\n }\n\n case 'RATING_SCALE':\n switch (variant) {\n case 'SINGLE_ANSWER_SYMBOL':\n return 'star_rating';\n\n default:\n return null;\n }\n\n case 'MATRIX':\n switch (variant) {\n case 'SINGLE_ANSWER_RADIO':\n case 'MANY_ANSWERS_CHECKBOX':\n return 'matrix';\n\n default:\n return null;\n }\n\n case 'RANKING':\n switch (variant) {\n case 'SINGLE_ANSWER_RADIO':\n return 'ranking';\n\n default:\n return null;\n }\n\n default:\n return null;\n }\n}; /// Aggregate Response Guard Helpers\n/// GQL Types that will be generated soon.\n\n\nconst isAggregateResponseHeaderItem = typeGuard({\n id: isString,\n label: isString,\n weight: isNullable(isNumber)\n});\nconst isAggregateResponseHeader = typeGuard({\n id: isString,\n items: isArrayOf(isAggregateResponseHeaderItem)\n});\nconst isAggregateResponseCell = typeGuard({\n rowItem: isNullable(isAggregateResponseHeaderItem),\n columnItem: isNullable(isAggregateResponseHeaderItem),\n groupItem: isNullable(isAggregateResponseHeaderItem),\n percentage: isNumber,\n total: isNumber\n});\nconst aggregateResponseBasicStatDimension = ['ROWS', 'COLUMNS', 'GROUPS'];\nconst isAggregateResponseBasicStats = typeGuard({\n across: isNullable(isOneOf(aggregateResponseBasicStatDimension)),\n row: isNullable(isAggregateResponseHeaderItem),\n column: isNullable(isAggregateResponseHeaderItem),\n group: isNullable(isAggregateResponseHeaderItem)\n}); // One dimensional aggregate response\n\nconst isOneDimensionalAggregateResponseCell = typeGuard({\n rowItem: isAggregateResponseHeaderItem,\n columnItem: isNull,\n groupItem: isNull,\n percentage: isNumber,\n total: isNumber\n});\nconst isOneDimensionalAggregateResponse = typeGuard({\n id: isString,\n type: isFixed('ONE_D'),\n rowHeader: isAggregateResponseHeader,\n columnHeader: isNull,\n groupHeader: isNull,\n data: isArrayOf(isOneDimensionalAggregateResponseCell),\n stats: isArrayOf(isAggregateResponseBasicStats)\n}); // Two dimensional aggregate response\n\nconst isTwoDimensionalAggregateResponseCell = typeGuard({\n rowItem: isAggregateResponseHeaderItem,\n columnItem: isAggregateResponseHeaderItem,\n groupItem: isNull,\n percentage: isNumber,\n total: isNumber\n});\nconst isTwoDimensionalAggregateResponse = typeGuard({\n id: isString,\n type: isFixed('TWO_D'),\n rowHeader: isAggregateResponseHeader,\n columnHeader: isAggregateResponseHeader,\n groupHeader: isNull,\n data: isArrayOf(isTwoDimensionalAggregateResponseCell),\n stats: isArrayOf(isAggregateResponseBasicStats)\n}); // Three dimensional aggregate response\n\nconst isThreeDimensionalAggregateResponseCell = typeGuard({\n rowItem: isAggregateResponseHeaderItem,\n columnItem: isAggregateResponseHeaderItem,\n groupItem: isAggregateResponseHeaderItem,\n percentage: isNumber,\n total: isNumber\n});\nconst isThreeDimensionalAggregateResponse = typeGuard({\n id: isString,\n type: isFixed('THREE_D'),\n rowHeader: isAggregateResponseHeader,\n columnHeader: isAggregateResponseHeader,\n groupHeader: isAggregateResponseHeader,\n data: isArrayOf(isThreeDimensionalAggregateResponseCell),\n stats: isArrayOf(isAggregateResponseBasicStats)\n}); // Transformed type guards\n\nconst isOneDimensionalChartData = typeGuard({\n id: isString,\n rowID: isString,\n rowLabel: isString,\n total: isNumber,\n percentage: isNumber\n});\nconst isTwoDimensionalData = typeGuard({\n columnID: isString,\n columnLabel: isString,\n data: isArrayOf(isOneDimensionalChartData)\n});\nconst isThreeDimensionalData = typeGuard({\n groupID: isString,\n groupLabel: isString,\n data: isArrayOf(isTwoDimensionalData)\n});\nexport { SENTIMENTS, aggregateResponseBasicStatDimension, assertExternalQuestionWithIds, assertQuestionTypeCheckBox, assertQuestionTypeCommentBox, assertQuestionTypeDropdown, assertQuestionTypeImageChoice, assertQuestionTypeMatrix, assertQuestionTypeMultipleChoice, assertQuestionTypeMultipleTextbox, assertQuestionTypeRanking, assertQuestionTypeSingleTextbox, assertQuestionTypeSlider, assertQuestionTypeStarRating, baseQuestionGuards, checkBoxQuestionDefinition, commentBoxQuestionDefinition, dropdownQuestionDefinition, fixedWidthOptions, getTypeId, imageChoiceQuestionDefinition, isAggregateResponseCell, isAggregateResponseHeader, isAggregateResponseHeaderItem, isExternalQuestionWithTypeId, isOneDimensionalAggregateResponse, isOneDimensionalChartData, isQuestionError, isQuestionType, isQuestionTypeCheckBox, isQuestionTypeCommentBox, isQuestionTypeDropdown, isQuestionTypeImageChoice, isQuestionTypeMatrix, isQuestionTypeMultipleChoice, isQuestionTypeMultipleTextbox, isQuestionTypeRanking, isQuestionTypeSingleTextbox, isQuestionTypeSlider, isQuestionTypeStarRating, isQuestionValidationMultipleChoice, isThreeDimensionalAggregateResponse, isThreeDimensionalData, isTwoDimensionalAggregateResponse, isTwoDimensionalData, matrixQuestionDefinition, multipleChoiceQuestionDefinition, multipleTextboxQuestionDefinition, pickQuestionTypeDefinition, questionTypeFamilies, questionTypeFileFormats, questionTypeHeaderColumnWidths, questionTypeIds, questionTypeLayoutPlacements, questionTypeMultipleChoiceLayouts, questionTypeRequiredPredicateTypes, questionTypeSkipLogicDestinationTypes, questionTypeSkipLogicTypes, questionTypeSortingKinds, questionTypeValidationTypes, questionTypeVariants, rankingQuestionDefinition, ratingScaleSymbols, relativeWidthOptions, selectQuestionTypeDefinition, singleTextboxQuestionDefinition, sliderQuestionDefinition, starRatingQuestionDefinition };","import React from 'react';\nimport { createUseStyles, useTheme, createGenerateId, JssProvider, ThemeProvider } from 'react-jss';\nimport { useSurveyTheme } from '@sm/webassets/dist/components/SurveyTheme/context';\nconst smFont = `National2, \"Helvetica Neue\", Helvetica, Arial, \"Hiragino Sans\", \"Hiragino Kaku Gothic Pro\", 游ゴシック, 游ゴシック体, YuGothic, \"Yu Gothic\", \"MS ゴシック\", \"MS Gothic\", sans-serif`;\nconst grey = 'rgba(0, 0, 0, 0.1)';\n/** SmQuestion specific augmentation to the SurveyTheme */\n\nconst themeAugmentation = {\n // Tokens - shared across all surveys\n fontSize: {\n body: 16\n },\n fontWeight: {\n light: 300,\n regular: 400,\n medium: 500\n },\n nextButton: {\n backgroundColor: '#00BF6F',\n color: '#FFFFFF'\n },\n input: {\n activeColor: '#00BF6F',\n // Light | Dark BG are shared across all surveys\n bgColor: grey\n },\n border: {\n defaultColor: '#999',\n correctColor: '#00BF6F',\n wrongColor: '#F05B24'\n },\n correctAnswerHighlightColor: grey\n};\n\nconst getQuestionHighlightColor = (theme, isNps = false) => {\n var _a;\n\n const titleColor = (_a = theme.titleColor) === null || _a === void 0 ? void 0 : _a.replace(/\\s/g, '');\n\n if (theme.isDark) {\n return isNps ? 'rgba(255,255,255,0.55)' : 'rgba(255,255,255,0.15)';\n }\n\n if (!theme.isAccessible) {\n return isNps ? 'rgba(0,0,0,0.4)' : grey;\n }\n\n if (titleColor === 'rgba(5,70,126,1)') {\n return 'rgba(201,242,244,1)'; // Arctic theme rgba of #c9f2f4\n }\n\n if (titleColor === 'rgba(0,0,96,1)') {\n return 'rgba(31,216,234,1)'; // Iceberg theme rgba of #1fd8ea\n }\n\n return 'rgba(0,0,0,0.05)'; // Pastel theme\n};\n/** Augments `theme` with SmQuestion specific theme attributes */\n\n\nconst applySurveyThemeAugmentation = theme => {\n var _a, _b, _c;\n\n const questionHighlightColor = getQuestionHighlightColor(theme);\n return { ...themeAugmentation,\n nextButton: {\n backgroundColor: theme.primaryAccentColor || themeAugmentation.nextButton.backgroundColor,\n color: theme.secondaryAccentColor || themeAugmentation.nextButton.color\n },\n input: {\n activeColor: theme.primaryAccentColor || themeAugmentation.input.activeColor,\n bgColor: questionHighlightColor\n },\n border: {\n defaultColor: theme.isAccessible ? (_a = theme.answerColor) !== null && _a !== void 0 ? _a : '#999' : '#999',\n correctColor: theme.isAccessible ? (_b = theme.answerColor) !== null && _b !== void 0 ? _b : '#999' : '#00BF6F',\n wrongColor: theme.isAccessible ? (_c = theme.answerColor) !== null && _c !== void 0 ? _c : '#999' : '#F05B24'\n },\n correctAnswerHighlightColor: questionHighlightColor,\n ...theme // keep theme last to allow user to overwrite augmentation\n\n };\n};\n/**\n * Dummy SurveyTheme\n *\n * _Not a real theme - only use for testing_\n */\n\n\nconst DUMMY_SURVEY_THEME = {\n // Survey-specific styles\n layout: 'BACKGROUND_FULL_TEXT_CENTER',\n titleColor: 'rgba(255,51,0,1)',\n questionColor: 'rgba(79,122,39,1)',\n answerColor: 'rgba(56,136,254,1)',\n primaryAccentColor: '#00BF6F',\n secondaryAccentColor: '#FFFFFF',\n primaryBackgroundColor: '#F7F8FA',\n secondaryBackgroundColor: '#ccf2e2',\n isAccessible: false,\n isDark: false,\n isCustomTheme: false,\n // Survey-specific component Styles\n surveyPage: {\n overlayColor: 'rgba(217,238,236,0.68)',\n backgroundImage: 'url(https://images.pexels.com/photos/2760856/pexels-photo-2760856.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940)'\n },\n surveyTitle: {\n fontSize: 25,\n fontFamily: 'Montserrat,Arial,Helvetica',\n fontWeight: 700,\n fontStyle: 'normal',\n textDecoration: 'none'\n },\n pageTitle: {\n fontSize: 25,\n fontFamily: 'Montserrat,Arial,Helvetica',\n fontWeight: 700,\n fontStyle: 'normal',\n textDecoration: 'none'\n },\n button: {\n fontSize: 15,\n fontFamily: 'National2',\n fontWeight: 400\n },\n error: {\n fontSize: 16,\n fontFamily: 'arial,sans-serif',\n fontWeight: 500,\n fontStyle: 'normal',\n textDecoration: 'none'\n },\n exitLink: {\n fontSize: 12,\n fontWeight: 300,\n backgroundColor: 'rgba(0,0,0,0)'\n },\n logo: {\n enabled: true,\n image: {\n url: 'https://sm-assets-mt1.s3.amazonaws.com/survey/518810755/6816175a-dfd7-4cc3-8b5c-64fd07d6f491.jpeg'\n }\n },\n progressBar: {\n enabled: true,\n position: 'DISABLED',\n showPercent: true,\n showPageNumber: true\n },\n questionBody: {\n color: '#333e48',\n highlightColor: 'rgba(208,210,211,1)',\n fontSize: 18,\n fontFamily: smFont,\n fontWeight: 300,\n fontStyle: 'normal',\n textDecoration: 'none'\n },\n questionTitle: {\n fontSize: 20,\n fontFamily: smFont,\n fontWeight: 300,\n fontStyle: 'normal',\n textDecoration: 'none',\n color: '#333e48'\n },\n breakpoints: {\n xxs: {\n max: '480px'\n },\n xs: {\n min: '481px',\n max: '640px'\n },\n sm: {\n min: '641px',\n max: '768px'\n },\n md: {\n min: '769px',\n max: '1024px'\n },\n lg: {\n min: '1025px',\n max: '1200px'\n },\n xl: {\n min: '1201px'\n }\n }\n};\n/**\n * Dummy AugmentedSurveyTheme (pre-augmented SurveyTheme)\n *\n * _Not a real theme - only use for testing_\n */\n\nconst DUMMY_AUGMENTED_SURVEY_THEME = { ...DUMMY_SURVEY_THEME,\n ...themeAugmentation\n};\nconst prefix = 'smqr-';\nconst selectors = [`[class*='${prefix}']`, `[class*='${prefix}']::before`, `[class*='${prefix}']::after`];\nconst resetStyles = {\n '-webkit-font-smoothing': 'antialiased',\n boxSizing: 'border-box',\n listStyle: 'none',\n margin: 0,\n padding: 0\n};\nconst useStyles = createUseStyles({\n '@global': {\n [selectors.join(',')]: resetStyles\n }\n}, {\n // Ensure this gets added to as the first stylesheet\n // ref: https://github.com/cssinjs/jss/blob/master/packages/react-jss/src/utils/getSheetIndex.js#L3-L16\n index: (Number.MIN_SAFE_INTEGER || -1e9) - 1,\n name: 'smquestions-respondent-global-styles'\n});\n/* Must by rendered inside a ThemeProvider with the RespondentTheme */\n\nconst SurveyGlobalStyles = () => {\n const theme = useTheme();\n useStyles({\n theme\n });\n return React.createElement(React.Fragment, null);\n};\n/* Wraps all components and ThemeProvider of the Respondent experience */\n\n\nconst SurveyStylesProvider = ({\n children,\n ...props\n}) => {\n // https://cssinjs.org/jss-api?v=v10.4.0#generate-your-class-names\n const generateJssId = React.useMemo(() => createGenerateId(), []);\n\n const generateId = (rule, srcSheet) => {\n var _a;\n\n const sheet = srcSheet;\n\n if (sheet) {\n sheet.options.classNamePrefix = prefix;\n sheet.options.index = (_a = sheet.options.index) !== null && _a !== void 0 ? _a : 10;\n }\n\n return generateJssId(rule, sheet);\n };\n\n return React.createElement(JssProvider, Object.assign({}, props, {\n generateId: generateId\n }), children);\n};\n\nconst SurveyThemeWrapper = ({\n children\n}) => {\n const theme = useSurveyTheme();\n return React.createElement(SurveyStylesProvider, null, React.createElement(ThemeProvider, {\n theme: applySurveyThemeAugmentation(theme)\n }, React.createElement(SurveyGlobalStyles, null), children));\n};\n\nexport { DUMMY_AUGMENTED_SURVEY_THEME, DUMMY_SURVEY_THEME, SurveyGlobalStyles, SurveyStylesProvider, SurveyThemeWrapper, applySurveyThemeAugmentation };","import React, { createContext, useContext, useMemo } from 'react';\nimport { r as reactErrorBoundary_umd } from './vendor-4368c290.js';\nimport { getTypeId } from '@sm/question-definitions';\n\nconst filterVisualizationByQuestionType = typeId => qd => {\n const [qts] = qd;\n return qts.includes(typeId);\n};\n\nconst FallbackComponent = ({\n error\n}) => {\n // TODO: temporary fallback ui (RAWR-773)\n return React.createElement(React.Fragment, null, React.createElement(\"h1\", null, \"Sorry.. there was an error\"), React.createElement(\"p\", null, error.message));\n};\n\nconst withErrorBoundary = Component => {\n return props => React.createElement(reactErrorBoundary_umd.exports.ErrorBoundary, {\n FallbackComponent: FallbackComponent\n }, React.createElement(Component, Object.assign({}, props)));\n};\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n\nconst declareVisualization = (questionTypes, capabilities, component) => {\n return [questionTypes, capabilities, component];\n};\n\nconst providerAccessContext = createContext(null);\n\nconst useProviderAccessContext = () => {\n const access = useContext(providerAccessContext);\n\n if (!access) {\n throw new Error('Must call useProviderAccessContext inside a properly setup Capability Provider');\n }\n\n const {\n useUpstreamConfig,\n useVisualizationList\n } = access;\n return {\n useVisualizationList,\n useUpstreamConfig\n };\n};\n/** providerFactory\n * Creates a helper component that enables a CapabilityProvider to store the appropriate configurations,\n * making them available to the visualizations through the generic controllers. It makes sure that all\n * Visualizations have the proper types passed onto them.\n * @param visualizationList list of visualization definitions for all the visualizations that will be\n * supported by this Capability Provider.\n * @returns React Context Provider accepting the appropriate configuration for the CapabilityProvider\n */\n\n\nconst providerFactory = visualizationList => {\n const ctx = React.createContext(null); // TODO: further filter types to match the ones in the right indexes based on capability\n\n const useVisualizationList = capability => visualizationList.filter(([, fs]) => fs.indexOf(capability) >= 0);\n\n const useUpstreamConfig = () => {\n const config = useContext(ctx);\n\n if (!config) {\n throw new Error('Must call useUpstreamConfig inside a properly set up Capability Provider');\n }\n\n return config;\n };\n\n return ({\n children,\n value\n }) => {\n return React.createElement(reactErrorBoundary_umd.exports.ErrorBoundary, {\n FallbackComponent: FallbackComponent\n }, React.createElement(providerAccessContext.Provider, {\n value: {\n useVisualizationList: useVisualizationList,\n useUpstreamConfig: useUpstreamConfig\n }\n }, React.createElement(ctx.Provider, {\n value: value\n }, children)));\n };\n};\n\nconst UnsupportedVisualization = ({\n question: {\n typeId\n }\n}) => React.createElement(\"div\", null, \"Unsupported Visualization for \", typeId);\n\nconst createVisualization = (capability, questionTypeId, visualizationOptions, upstreamActions, settings, renderProps) => {\n const [,, VisualizationComponent] = visualizationOptions.find(filterVisualizationByQuestionType(questionTypeId)) || [];\n\n if (!VisualizationComponent) {\n return ({\n question\n }) => React.createElement(UnsupportedVisualization, {\n question: question\n });\n }\n\n return ({\n question,\n displayOptions,\n namedSlots,\n toExternalQuestion\n }) => React.createElement(VisualizationComponent, {\n capability: capability,\n question: question,\n upstreamActions: upstreamActions,\n settings: settings,\n displayOptions: displayOptions,\n renderProps: renderProps,\n toExternalQuestion: toExternalQuestion,\n namedSlots: namedSlots\n });\n};\n/** Finds and attaches a typeId to an `ExternalQuestion` */\n\n\nconst useExternalQuestionAugmentation = (externalQuestion, responseSet) => {\n return useMemo(() => {\n const typeId = getTypeId(externalQuestion);\n\n if (!typeId) {\n throw new Error(`Unsupported Question Type of family ${externalQuestion.family}, variant ${externalQuestion.variant}.`);\n }\n\n if (responseSet !== undefined) {\n return { ...externalQuestion,\n typeId,\n ...responseSet\n };\n }\n\n return { ...externalQuestion,\n typeId\n };\n }, [externalQuestion, responseSet]);\n};\n\nexport { useExternalQuestionAugmentation as a, createVisualization as c, declareVisualization as d, providerFactory as p, useProviderAccessContext as u, withErrorBoundary as w };","import React from 'react';\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar classnames$1 = {\n exports: {}\n};\n/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n\n(function (module) {\n /* global define */\n (function () {\n var hasOwn = {}.hasOwnProperty;\n\n function classNames() {\n var classes = [];\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (!arg) continue;\n var argType = typeof arg;\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg);\n } else if (Array.isArray(arg)) {\n if (arg.length) {\n var inner = classNames.apply(null, arg);\n\n if (inner) {\n classes.push(inner);\n }\n }\n } else if (argType === 'object') {\n if (arg.toString === Object.prototype.toString) {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key);\n }\n }\n } else {\n classes.push(arg.toString());\n }\n }\n }\n\n return classes.join(' ');\n }\n\n if (module.exports) {\n classNames.default = classNames;\n module.exports = classNames;\n } else {\n window.classNames = classNames;\n }\n })();\n})(classnames$1);\n\nvar classnames = classnames$1.exports;\n/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\n\nvar INFINITY = 1 / 0;\n/** `Object#toString` result references. */\n\nvar symbolTag = '[object Symbol]';\n/** Used to match HTML entities and HTML characters. */\n\nvar reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source);\n/** Used to map HTML entities to characters. */\n\nvar htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n};\n/** Detect free variable `global` from Node.js. */\n\nvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n/** Detect free variable `self`. */\n\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n/** Used as a reference to the global object. */\n\nvar root = freeGlobal || freeSelf || Function('return this')();\n/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n\nfunction basePropertyOf(object) {\n return function (key) {\n return object == null ? undefined : object[key];\n };\n}\n/**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n\n\nvar unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n/** Used for built-in method references. */\n\nvar objectProto = Object.prototype;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar objectToString = objectProto.toString;\n/** Built-in value references. */\n\nvar Symbol = root.Symbol;\n/** Used to convert symbols to primitives and strings. */\n\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n\n var result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result;\n}\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n\n\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n\n\nfunction isSymbol(value) {\n return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;\n}\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n/**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to\n * their corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @since 0.6.0\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n\n\nfunction unescape(string) {\n string = toString(string);\n return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;\n}\n\nvar lodash_unescape = unescape;\nvar reactErrorBoundary_umd = {\n exports: {}\n};\n\n(function (module, exports) {\n (function (global, factory) {\n factory(exports, React);\n })(commonjsGlobal, function (exports, React) {\n function _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () {\n return e[k];\n }\n });\n }\n });\n }\n\n n['default'] = e;\n return Object.freeze(n);\n }\n\n var React__namespace = /*#__PURE__*/_interopNamespace(React);\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n }\n\n var changedArray = function changedArray(a, b) {\n if (a === void 0) {\n a = [];\n }\n\n if (b === void 0) {\n b = [];\n }\n\n return a.length !== b.length || a.some(function (item, index) {\n return !Object.is(item, b[index]);\n });\n };\n\n var initialState = {\n error: null\n };\n\n var ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n _this.state = initialState;\n _this.updatedWithError = false;\n\n _this.resetErrorBoundary = function () {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);\n\n _this.reset();\n };\n\n return _this;\n }\n\n ErrorBoundary.getDerivedStateFromError = function getDerivedStateFromError(error) {\n return {\n error: error\n };\n };\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.reset = function reset() {\n this.updatedWithError = false;\n this.setState(initialState);\n };\n\n _proto.componentDidCatch = function componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n\n (_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error, info);\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var error = this.state.error;\n\n if (error !== null) {\n this.updatedWithError = true;\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var error = this.state.error;\n var resetKeys = this.props.resetKeys; // There's an edge case where if the thing that triggered the error\n // happens to *also* be in the resetKeys array, we'd end up resetting\n // the error boundary immediately. This would likely trigger a second\n // error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call\n // of cDU after the error is set\n\n if (error !== null && !this.updatedWithError) {\n this.updatedWithError = true;\n return;\n }\n\n if (error !== null && changedArray(prevProps.resetKeys, resetKeys)) {\n var _this$props$onResetKe, _this$props3;\n\n (_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);\n this.reset();\n }\n };\n\n _proto.render = function render() {\n var error = this.state.error;\n var _this$props4 = this.props,\n fallbackRender = _this$props4.fallbackRender,\n FallbackComponent = _this$props4.FallbackComponent,\n fallback = _this$props4.fallback;\n\n if (error !== null) {\n var _props = {\n error: error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n\n if ( /*#__PURE__*/React__namespace.isValidElement(fallback)) {\n return fallback;\n } else if (typeof fallbackRender === 'function') {\n return fallbackRender(_props);\n } else if (FallbackComponent) {\n return /*#__PURE__*/React__namespace.createElement(FallbackComponent, _props);\n } else {\n throw new Error('react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop');\n }\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n }(React__namespace.Component);\n\n function withErrorBoundary(Component, errorBoundaryProps) {\n var Wrapped = function Wrapped(props) {\n return /*#__PURE__*/React__namespace.createElement(ErrorBoundary, errorBoundaryProps, /*#__PURE__*/React__namespace.createElement(Component, props));\n }; // Format for display in DevTools\n\n\n var name = Component.displayName || Component.name || 'Unknown';\n Wrapped.displayName = \"withErrorBoundary(\" + name + \")\";\n return Wrapped;\n }\n\n function useErrorHandler(givenError) {\n var _React$useState = React__namespace.useState(null),\n error = _React$useState[0],\n setError = _React$useState[1];\n\n if (givenError != null) throw givenError;\n if (error != null) throw error;\n return setError;\n }\n /*\n eslint\n @typescript-eslint/no-throw-literal: \"off\",\n @typescript-eslint/prefer-nullish-coalescing: \"off\"\n */\n\n\n exports.ErrorBoundary = ErrorBoundary;\n exports.useErrorHandler = useErrorHandler;\n exports.withErrorBoundary = withErrorBoundary;\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n });\n})(reactErrorBoundary_umd, reactErrorBoundary_umd.exports);\n\nexport { classnames as c, lodash_unescape as l, reactErrorBoundary_umd as r };","import React, { useEffect, useRef, useCallback, useMemo, useContext } from 'react';\nimport { createUseStyles } from 'react-jss';\nimport { defineMessages, T, L10NContext } from '@sm/intl';\nimport { visuallyHidden, uniqueId } from '@wds/utils';\nimport { c as classnames, l as lodash_unescape, r as reactErrorBoundary_umd } from './vendor-1a792cb6.js';\nimport { sanitizeString } from '@sm/utils';\ncreateUseStyles(theme => {\n var _a;\n\n return {\n button: {\n color: theme.nextButton.color,\n backgroundColor: theme.nextButton.backgroundColor,\n fontFamily: (_a = theme.questionBody.fontFamily) !== null && _a !== void 0 ? _a : {},\n fontSize: 15,\n border: [1, 'solid', 'transparent'],\n borderRadius: 2,\n padding: [1, 6],\n maxWidth: '100%',\n minWidth: 60,\n minHeight: 40,\n cursor: 'pointer',\n overflowWrap: 'break-word'\n }\n };\n});\nconst useStyles$d = createUseStyles({\n visuallyHidden: visuallyHidden\n});\n\nconst VisuallyHidden = ({\n children,\n element: Element\n}) => {\n const {\n visuallyHidden\n } = useStyles$d();\n return React.createElement(Element, {\n className: visuallyHidden\n }, children);\n};\n\nconst useStyles$c = createUseStyles({\n paddingBox: ({\n padding\n }) => {\n return {\n paddingTop: (padding === null || padding === void 0 ? void 0 : padding.top) || 0,\n paddingBottom: (padding === null || padding === void 0 ? void 0 : padding.bottom) || 0,\n paddingLeft: (padding === null || padding === void 0 ? void 0 : padding.left) || 0,\n paddingRight: (padding === null || padding === void 0 ? void 0 : padding.right) || 0\n };\n }\n});\n\nconst QuestionSpacing = ({\n padding,\n children\n}) => {\n const {\n paddingBox\n } = useStyles$c({\n padding\n });\n return React.createElement(\"div\", {\n className: paddingBox\n }, children);\n};\n/**\n * Hook that calls the provided callback function when the ref element is blurred,\n * only if the next focus is outside the ref element\n *\n * @example\n * const ref = useRef(null);\n * useOnFocusLeave(ref, ()=> onLeaveQuestion());\n * \n */\n\n\nfunction useOnFocusLeave(ref, focusCallback) {\n useEffect(() => {\n const ele = ref === null || ref === void 0 ? void 0 : ref.current;\n\n function handleFocus(e) {\n if (!(ele === null || ele === void 0 ? void 0 : ele.contains(e.relatedTarget))) {\n focusCallback(ref);\n }\n }\n\n ele === null || ele === void 0 ? void 0 : ele.addEventListener('focusout', handleFocus);\n return () => {\n ele === null || ele === void 0 ? void 0 : ele.removeEventListener('focusout', handleFocus);\n };\n }, [ref, focusCallback]);\n}\n\nconst useStyles$b = createUseStyles({\n footerRow: ({\n hasFooterPadding\n }) => ({\n paddingTop: hasFooterPadding ? 20 : 0\n }),\n containerStyles: ({\n clickShield\n }) => ({\n position: 'relative',\n opacity: clickShield ? '0.5' : '1',\n transition: 'opacity 500ms ease-out',\n pointerEvents: clickShield ? 'none' : 'auto'\n }),\n errorRow: {\n marginBottom: 10\n },\n formReset: {\n border: 0,\n minWidth: 0\n },\n headerRow: {\n marginBottom: 24\n }\n});\nconst COPY$2 = defineMessages({\n QUESTION_TITLE: {\n id: 'ResponseQuestion.QUESTION_TITLE',\n defaultMessage: 'Question Title',\n description: '[Type: Label][Vis: low] - question landmark for screen readers only'\n }\n});\n\nconst QuestionFieldLayoutTemplate = ({\n footer,\n hasFooterPadding,\n children,\n clickShield,\n error,\n id,\n padding,\n title,\n onSubmit,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onLeave = () => {},\n ...props\n}) => {\n const {\n footerRow,\n containerStyles,\n formReset,\n errorRow,\n headerRow\n } = useStyles$b({\n hasFooterPadding,\n clickShield\n });\n const containerRef = useRef(null);\n const handleKeydown = useCallback(event => {\n if (event.key === 'Enter') {\n onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();\n }\n }, [onSubmit]);\n const fieldsetRef = useRef(null);\n useOnFocusLeave(fieldsetRef, onLeave);\n useEffect(() => {\n const {\n current: container\n } = containerRef;\n container === null || container === void 0 ? void 0 : container.addEventListener('keydown', handleKeydown);\n return () => {\n return container === null || container === void 0 ? void 0 : container.removeEventListener('keydown', handleKeydown);\n };\n }, [containerRef, handleKeydown]);\n return React.createElement(\"div\", Object.assign({\n ref: containerRef,\n id: id\n }, props, {\n className: containerStyles\n }), React.createElement(VisuallyHidden, {\n element: \"h3\"\n }, React.createElement(T, {\n desc: COPY$2.QUESTION_TITLE\n })), React.createElement(QuestionSpacing, {\n padding: padding\n }, React.createElement(\"fieldset\", {\n ref: fieldsetRef,\n className: formReset\n }, React.createElement(\"legend\", {\n className: headerRow\n }, error && React.createElement(\"div\", {\n className: errorRow\n }, error), title), children), footer && React.createElement(\"div\", {\n className: footerRow\n }, footer)));\n};\n/**\n * Calculate the max number of children each column can be filled in the layout\n * @param columns number of columns\n * @param total total child count\n * @description Based on the current implementation in production (as of Jan 20, 2021),\n * - if columns = 1, the max number of children per column = total (render all children vertically)\n * - if columns > 1, the max number of children per column = (total / columns) + 1\n */\n\n\nconst calculateMaxNumOfChildrenPerColumn = (columns, total) => {\n if (columns === 1) {\n return total;\n }\n\n const childrenPerColumn = total / columns;\n\n if (childrenPerColumn % 1 === 0) {\n return childrenPerColumn;\n }\n\n return Math.floor(childrenPerColumn) + 1;\n};\n/**\n * Divide the children array into slices for rendering\n * @param childrenArr - children array\n * @param childrenPerSlice - number of children per slice\n * @example\n * childrenArr = [option1, option2, option3, option4, option5]\n * childrenPerSlice = 2\n * output: [[option1, option2], [option3, option4], [option5]]\n */\n\n\nconst sliceChildren = (childrenArr, childrenPerSlice) => {\n let index = 0;\n const result = [];\n\n while (index < childrenArr.length) {\n result.push(childrenArr.slice(index, index + childrenPerSlice));\n index += childrenPerSlice;\n }\n\n return result;\n};\n\nconst useStyles$a = createUseStyles(theme => ({\n containerVertical: {\n display: 'initial'\n },\n containerHorizontal: {\n display: 'block'\n },\n\n /** shared between horizontal and vertical columns */\n column: {\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'flex-start'\n },\n columnHorizontal: {},\n\n /** Horizontal Column that adjust width to content width */\n columnHorizontalAutoAdjust: {\n width: 'auto'\n },\n [`@media (min-width: ${theme.breakpoints.xs.min})`]: {\n containerVertical: {\n display: 'flex'\n },\n containerHorizontal: {\n display: 'flex',\n flexWrap: 'wrap'\n }\n },\n [`@media only screen and (min-width: ${theme.breakpoints.lg.min})`]: {\n columnHorizontal: {\n width: '19%'\n }\n },\n [`@media (min-width: ${theme.breakpoints.sm.min}) and (max-width: ${theme.breakpoints.md.max})`]: {\n columnHorizontal: {\n width: '24%'\n }\n },\n [`@media only screen and (max-width: ${theme.breakpoints.xxs.max})`]: {\n columnHorizontal: {\n width: '100%',\n display: 'block'\n },\n columnHorizontalAutoAdjust: {\n width: '100%',\n display: 'block'\n }\n },\n answerLayoutCell: {\n flex: [0, 0, 'auto'] // fix for IE11 - images leaking out of label container\n\n }\n}));\n\nconst QuestionAnswerLayoutTemplate = ({\n children,\n columns = 1,\n other,\n noneOfTheAbove,\n adjustToContent = false\n}) => {\n const {\n containerVertical,\n containerHorizontal,\n column,\n columnHorizontal,\n columnHorizontalAutoAdjust,\n answerLayoutCell\n } = useStyles$a({\n columns,\n adjustToContent\n });\n const isHorizontal = columns === 'horizontal';\n /* Based on the columns config, divide the question answers\n (children of this component) into column groups for rendering.\n The reason we need to do this is when there are multiple columns,\n the answers are listed vertically instead of horizontally.\n For example:\n If there are 3 answers and 2 columns,\n Then the ordering will be:\n Answer 1 Answer 3\n Answer 2\n NOT:\n Answer 1 Answer 2\n Answer 3\n * though `horizontal` uses this\n \n */\n\n const columnGroups = useMemo(() => {\n const totalChildren = React.Children.count(children);\n const totalColumns = columns === 'horizontal' ? totalChildren : columns;\n const childrenArray = React.Children.toArray(children);\n const answersPerColumn = columns === 'horizontal' ? 1 : calculateMaxNumOfChildrenPerColumn(totalColumns, totalChildren);\n return sliceChildren(childrenArray, answersPerColumn);\n }, [children, columns]);\n const columnClassNames = isHorizontal ? [column, adjustToContent ? columnHorizontalAutoAdjust : columnHorizontal] : column;\n return React.createElement(React.Fragment, null, React.createElement(\"div\", {\n className: isHorizontal ? containerHorizontal : containerVertical\n }, columnGroups.map((col, columnIndex) => React.createElement(\"div\", {\n key: `col-${columnIndex + 1}`,\n className: classnames(columnClassNames),\n \"data-testid\": \"answer-layout-column\"\n }, col.map((cell, cellIndex) => React.createElement(\"div\", {\n key: `cell-${cellIndex + 1}`,\n \"data-testid\": \"answer-layout-cell\",\n className: answerLayoutCell\n }, cell))))), other && React.createElement(\"div\", null, other), noneOfTheAbove && React.createElement(\"div\", null, noneOfTheAbove));\n};\n\nconst textReset = {\n margin: 0\n};\nconst useStyles$9 = createUseStyles(theme => {\n const {\n fontSize,\n ...questionTitleFormatting\n } = theme.questionTitle;\n const questionTitleFontSize = theme.isAccessible ? '22px' : fontSize !== null && fontSize !== void 0 ? fontSize : {};\n return {\n addonContainer: {\n display: 'inline-block',\n margin: [0, 5],\n verticalAlign: 'text-bottom'\n },\n container: {\n position: 'relative'\n },\n questionNumber: ({\n isRTL\n }) => ({\n margin: isRTL ? '0 0 0 0.25em' : '0 0.25em 0 0'\n }),\n questionTitle: ({\n useDefaultFrontSize\n }) => {\n var _a;\n\n return { ...textReset,\n ...questionTitleFormatting,\n color: ((_a = theme.questionTitle) === null || _a === void 0 ? void 0 : _a.color) || theme.questionColor,\n fontSize: useDefaultFrontSize && !theme.isAccessible ? theme.fontSize.body : questionTitleFontSize,\n lineHeight: 1.25,\n whiteSpace: 'normal',\n wordWrap: 'break-word'\n };\n },\n requiredAsterisk: ({\n isRTL\n }) => ({\n display: 'inline-block',\n margin: isRTL ? '0 0 0 0.25em' : '0 0.25em 0 0'\n })\n };\n});\n/* eslint-disable @typescript-eslint/naming-convention */\n\nconst listSpacing = {\n margin: [16, 0],\n padding: [0, 0, 0, 40]\n};\nconst mediaReset = {\n border: 0,\n maxWidth: '100%'\n};\nconst useStyles$8 = createUseStyles({\n richTextContent: {\n // Typography\n '& a': {\n // Links are not themed by default. Users must select a link color in the editor\n color: 'blue',\n textDecoration: 'underline',\n '&:hover': {\n cursor: 'pointer'\n },\n '&:focus': {\n outline: 'currentColor auto 1px'\n }\n },\n '& ol': { ...listSpacing,\n listStyleType: 'decimal'\n },\n '& ul': { ...listSpacing,\n listStyle: 'disc outside none',\n '& ul li': {\n listStyle: 'circle'\n }\n },\n '& p': {\n margin: [13, 0]\n },\n '& b': {\n fontWeight: 'bold'\n },\n '& strong': {\n fontWeight: 'bold'\n },\n '& em': {\n fontStyle: 'italic'\n },\n '& i': {\n fontStyle: 'italic'\n },\n '& big': {\n fontSize: 'larger'\n },\n '& small': {\n fontSize: 'smaller'\n },\n '& sup': {\n fontSize: '75%',\n lineHeight: 0,\n position: 'relative',\n top: '-0.5em',\n verticalAlign: 'baseline'\n },\n // Media embeds\n '& iframe': mediaReset,\n '& img': { ...mediaReset,\n height: 'auto',\n '-ms-interpolation-mode': 'bicubic'\n }\n }\n}); // Support iframe video embeds and their matching attributes\n\nconst sanitizeOptions = {\n ADD_TAGS: ['iframe'],\n ADD_ATTR: ['target', 'allow', 'allowfullscreen', 'frameborder', 'sandbox', 'scrolling']\n};\n\nconst RichText = ({\n element: Element,\n text\n}) => {\n const {\n richTextContent\n } = useStyles$8();\n return React.createElement(Element, {\n className: richTextContent,\n dangerouslySetInnerHTML: {\n __html: sanitizeString(text, sanitizeOptions)\n }\n });\n};\n\nconst QuestionTitle = ({\n addon,\n heading,\n id,\n number,\n numbered,\n required,\n useDefaultFrontSize = false,\n ...props\n}) => {\n const {\n isRTL\n } = useContext(L10NContext);\n const {\n addonContainer,\n container,\n questionNumber,\n questionTitle,\n requiredAsterisk\n } = useStyles$9({\n useDefaultFrontSize,\n isRTL\n });\n return React.createElement(\"h4\", Object.assign({\n id: id,\n className: classnames(container, questionTitle),\n translate: \"no\"\n }, props), required && React.createElement(\"span\", {\n \"aria-hidden\": true,\n className: requiredAsterisk\n }, \"*\"), numbered && React.createElement(\"span\", {\n className: questionNumber\n }, number, \".\"), React.createElement(RichText, {\n element: \"span\",\n text: heading\n }), addon && React.createElement(\"span\", {\n className: addonContainer\n }, addon));\n};\n\ncreateUseStyles(theme => {\n var _a;\n\n return {\n icon: {\n backgroundClip: 'padding-box',\n backgroundColor: theme.primaryAccentColor,\n borderRadius: 3,\n color: theme.secondaryAccentColor,\n fontSize: theme.fontSize.body,\n padding: [0, 5]\n },\n iconWrapper: {\n marginRight: 5\n },\n validationMessage: {\n fontFamily: (_a = theme.questionBody.fontFamily) !== null && _a !== void 0 ? _a : {},\n lineHeight: 1.5,\n color: theme.questionBody.color,\n fontWeight: theme.fontWeight.light,\n fontSize: theme.fontSize.body\n }\n };\n});\nconst useStyles$7 = createUseStyles(theme => {\n var _a;\n\n return {\n textareaStyles: {\n fontFamily: (_a = theme.questionBody.fontFamily) !== null && _a !== void 0 ? _a : {},\n fontSize: '18px',\n lineHeight: '1.15em',\n padding: '6px 60px 6px 6px',\n maxWidth: '100%',\n color: theme.questionBody.color,\n outlineColor: theme.primaryAccentColor,\n transition: 'all 0.1s linear',\n verticalAlign: 'top',\n textSizeAdjust: 'auto',\n ...(theme.isAccessible ? {\n fontWeight: 500,\n opacity: 1,\n border: `1px solid ${theme.answerColor}`,\n backgroundColor: '#fff'\n } : {\n fontWeight: 300,\n backgroundColor: theme.input.bgColor,\n border: '0'\n }),\n '&:focus': {\n borderColor: theme.input.activeColor,\n borderRadius: '2px'\n },\n '&:focus, &:hover': theme.isAccessible ? {\n // should be there but was broken\n // https://code.corp.surveymonkey.com/devmonkeys/smlib.surveytemplates/blob/main/smlib/surveytemplates/themes_v3/base_css.jinja2#L1094-L1097\n boxShadow: '0px 2px 8px rgba(0, 0, 0, 7)'\n } : {},\n '&:disabled, &:read-only': {\n boxShadow: 'none',\n ...(theme.isAccessible ? {} : {\n borderColor: 'transparent',\n opacity: 0.5\n })\n }\n },\n [`@media only screen and (max-width: ${theme.breakpoints.md.max})`]: {\n textareaStyles: {\n fontSize: '16px'\n }\n }\n };\n}); // Custom textarea component for Response.\n\nconst TextArea = ({\n placeholder,\n disabled,\n rows,\n cols,\n id,\n name,\n defaultValue,\n labelId,\n errorId,\n required = false,\n readOnly = false,\n onChange,\n onBlur,\n onFocus\n}) => {\n const {\n textareaStyles\n } = useStyles$7();\n return React.createElement(\"textarea\", {\n className: textareaStyles,\n placeholder: placeholder,\n disabled: disabled,\n rows: rows,\n cols: cols,\n id: id,\n name: name,\n defaultValue: defaultValue,\n \"aria-labelledby\": labelId,\n \"aria-describedby\": errorId,\n \"aria-required\": required,\n onChange: onChange,\n onBlur: onBlur,\n onFocus: onFocus,\n spellCheck: true,\n readOnly: readOnly\n });\n};\n\nconst useStyles$6 = createUseStyles(theme => {\n var _a;\n\n return {\n inputStyles: {\n fontFamily: (_a = theme.questionBody.fontFamily) !== null && _a !== void 0 ? _a : {},\n fontSize: '18px',\n lineHeight: '1.5em',\n height: ({\n autoHeight\n }) => autoHeight ? {} : '50px',\n padding: '6px',\n maxWidth: '100%',\n color: theme.questionBody.color,\n transition: 'all 0.1s linear',\n ...(theme.isAccessible ? {\n fontWeight: 500,\n opacity: 1,\n border: theme.isAccessible ? `1px solid ${theme.answerColor}` : '0',\n backgroundColor: '#fff'\n } : {\n fontWeight: 300,\n backgroundColor: theme.input.bgColor,\n border: '0'\n }),\n '&:focus': {\n outline: 'none',\n borderColor: theme.input.activeColor,\n borderRadius: '2px'\n },\n '&:focus, &:hover': { ...(theme.isAccessible ? {\n // should be there but was broken\n // https://code.corp.surveymonkey.com/devmonkeys/smlib.surveytemplates/blob/main/smlib/surveytemplates/themes_v3/base_css.jinja2#L1094-L1097\n boxShadow: '0px 2px 8px rgba(0, 0, 0, 7)'\n } : {})\n },\n '&:disabled, &:read-only': {\n boxShadow: 'none',\n ...(theme.isAccessible ? {} : {\n borderColor: 'transparent',\n opacity: 0.5\n })\n }\n },\n [`@media only screen and (max-width: ${theme.breakpoints.md.max})`]: {\n inputStyles: {\n fontSize: '16px'\n }\n }\n };\n});\n\nconst TextInput = ({\n disabled,\n errorId,\n id,\n labelId,\n name,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n required = false,\n readOnly = false,\n autoHeight = false,\n value,\n size = 50\n}) => {\n const {\n inputStyles\n } = useStyles$6({\n autoHeight\n });\n return React.createElement(\"input\", {\n type: \"text\",\n className: inputStyles,\n placeholder: placeholder,\n disabled: disabled,\n size: size,\n id: id,\n name: name,\n value: value,\n onChange: onChange,\n onBlur: onBlur,\n onFocus: onFocus,\n \"aria-labelledby\": labelId,\n \"aria-describedby\": errorId,\n \"aria-required\": required,\n readOnly: readOnly\n });\n};\n\nconst useStyles$5 = createUseStyles(theme => {\n var _a; // Quiz results uses the default font size\n\n\n const defaultFontSize = theme.fontSize.body;\n const {\n fontFamily = 'inherit',\n fontWeight = 'inherit',\n fontStyle = 'inherit',\n textDecoration = 'inherit',\n highlightColor = 'inherit',\n color = 'inherit'\n } = (_a = theme.questionBody) !== null && _a !== void 0 ? _a : {};\n return {\n componentContainer: {\n position: 'relative'\n },\n labelContainer: {\n display: 'inline-block',\n position: 'relative',\n padding: 0,\n margin: [4, 2],\n borderRadius: 4\n },\n textContainer: {\n margin: [3, 0, 2],\n wordBreak: 'break-word',\n pointerEvents: 'none',\n fontFamily,\n fontWeight,\n fontStyle,\n textDecoration,\n highlightColor,\n color,\n fontSize: defaultFontSize\n },\n textInputContainer: {\n margin: [5, 0, 0, 0]\n }\n };\n});\n\nconst QuizResultComment = ({\n optionText,\n textInputValue = '',\n textInputSize = 50,\n textInputParagraphLines = 1,\n id\n}) => {\n const {\n componentContainer,\n labelContainer,\n textContainer,\n textInputContainer\n } = useStyles$5();\n return React.createElement(React.Fragment, null, React.createElement(\"div\", {\n className: componentContainer\n }, React.createElement(\"label\", {\n htmlFor: id,\n className: labelContainer\n }, React.createElement(\"div\", {\n className: textContainer\n }, React.createElement(RichText, {\n element: \"span\",\n text: optionText\n })))), React.createElement(\"div\", {\n className: textInputContainer\n }, textInputParagraphLines <= 1 ? React.createElement(TextInput, {\n id: id,\n name: \"otherOptionText\",\n value: textInputValue,\n size: textInputSize,\n autoHeight: true,\n readOnly: true\n }) : React.createElement(TextArea, {\n id: id,\n name: \"otherOptionText\",\n rows: textInputParagraphLines,\n defaultValue: textInputValue,\n cols: textInputSize,\n translate: \"no\",\n readOnly: true\n })));\n};\n\nvar useStyles$4 = createUseStyles({\n srOnly: visuallyHidden\n});\nconst COPY$1 = defineMessages({\n CORRECT: {\n id: 'SrText.CORRECT',\n defaultMessage: 'Correct',\n description: '[Type: label][Vis: med] - the answer was correct'\n },\n INCORRECT: {\n id: 'SrText.INCORRECT',\n defaultMessage: 'Incorrect',\n description: '[Type: label][Vis: med] - the answer was incorrect '\n }\n});\n\nconst SrText = ({\n icon\n}) => {\n const {\n srOnly\n } = useStyles$4();\n\n const TranslatedText = () => React.createElement(T, {\n desc: icon === 'correct' ? COPY$1.CORRECT : COPY$1.INCORRECT\n });\n\n return React.createElement(\"div\", {\n className: srOnly\n }, icon ? React.createElement(TranslatedText, null) : React.createElement(React.Fragment, null));\n};\n\nconst QuizCorrectIcon = ({\n isAriaHidden = false\n}) => React.createElement(\"svg\", {\n width: \"14px\",\n height: \"10px\",\n viewBox: \"0 0 14 10\",\n version: \"1.1\",\n \"data-testid\": \"quiz-result-correct-icon\",\n \"aria-hidden\": isAriaHidden\n}, React.createElement(\"g\", {\n stroke: \"none\",\n strokeWidth: \"1\",\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n transform: \"translate(-257, -338.75)\",\n fill: \"#F2FAE8\"\n}, React.createElement(\"g\", {\n id: \"check-correct\",\n transform: \"translate(254, 334)\"\n}, React.createElement(\"g\", null, React.createElement(\"path\", {\n d: \"M4,10.3259737 C4,10.4757908 4.04494448,10.5956428 4.13483478,10.6855331 L7.33716071,13.8990952 C7.42705101,13.9889855 7.55626637,14.069511 7.72481069,14.1406742 C7.893355,14.2118373 8.04504261,14.2474184 8.17987806,14.2474184 L8.78663455,14.2474184 C9.07877802,14.2474184 9.359681,14.1313118 9.6293519,13.8990952 L16.4160356,7.08993903 C16.5059259,7.00004873 16.5508704,6.88206948 16.5508704,6.73599774 C16.5508704,6.589926 16.5059259,6.47194675 16.4160356,6.38205645 L15.1575777,5.13483478 C15.0676874,5.04494448 14.9515809,5 14.8092545,5 C14.6669282,5 14.5433309,5.04494448 14.4384589,5.13483478 L8.85405194,10.7529504 C8.76416164,10.8428407 8.6443097,10.8877852 8.49449253,10.8877852 C8.34467537,10.8877852 8.22482343,10.8428407 8.13493313,10.7529504 L6.11241149,8.7304288 C6.02252119,8.6405385 5.90266926,8.59559403 5.75285209,8.59559403 C5.60303492,8.59559403 5.48318299,8.6405385 5.39329269,8.7304288 L4.13483478,9.96641425 C4.04494448,10.0563045 4,10.1761565 4,10.3259737 L4,10.3259737 Z\"\n}))))));\n\nconst QuizWrongIcon = ({\n isAriaHidden = false\n}) => React.createElement(\"svg\", {\n width: \"12px\",\n height: \"12px\",\n viewBox: \"0 0 12 12\",\n version: \"1.1\",\n \"data-testid\": \"quiz-result-wrong-icon\",\n \"aria-hidden\": isAriaHidden\n}, React.createElement(\"g\", {\n stroke: \"none\",\n strokeWidth: \"1\",\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"path\", {\n d: \"M0.281690141,9.92648775 C0.281690141,10.187088 0.368074254,10.4068447 0.54084507,10.5857643 L1.25070423,11.3208868 C1.42347504,11.4998064 1.63567949,11.5892649 1.88732394,11.5892649 C2.13896839,11.5892649 2.35117285,11.4998064 2.52394366,11.3208868 L5.03661972,8.71878646 C5.20939054,8.53986686 5.42159499,8.4504084 5.67323944,8.4504084 C5.92488389,8.4504084 6.1446,8.53986686 6.33239437,8.71878646 L8.82253521,11.3208868 C8.99530603,11.4998064 9.20751048,11.5892649 9.45915493,11.5892649 C9.71079938,11.5892649 9.93051549,11.4998064 10.1183099,11.3208868 L10.828169,10.5857643 C11.0009398,10.4068447 11.0873239,10.187088 11.0873239,9.92648775 C11.0873239,9.66588746 11.0009398,9.43835181 10.828169,9.24387398 L8.31549296,6.66511085 C8.14272214,6.47063302 8.05633803,6.24698687 8.05633803,5.99416569 C8.05633803,5.74134452 8.14272214,5.51769837 8.31549296,5.32322054 L10.828169,2.74445741 C11.0009398,2.54997958 11.0873239,2.32244393 11.0873239,2.06184364 C11.0873239,1.80124335 11.0009398,1.5814867 10.828169,1.40256709 L10.1183099,0.667444574 C9.93051549,0.488524971 9.71079938,0.399066511 9.45915493,0.399066511 C9.20751048,0.399066511 8.99530603,0.488524971 8.82253521,0.667444574 L6.33239437,3.26954492 C6.1446,3.44846453 5.92488389,3.53792299 5.67323944,3.53792299 C5.42159499,3.53792299 5.20939054,3.44846453 5.03661972,3.26954492 L2.52394366,0.667444574 C2.35117285,0.488524971 2.13896839,0.399066511 1.88732394,0.399066511 C1.63567949,0.399066511 1.42347504,0.488524971 1.25070423,0.667444574 L0.54084507,1.40256709 C0.368074254,1.5814867 0.281690141,1.80124335 0.281690141,2.06184364 C0.281690141,2.32244393 0.368074254,2.54997958 0.54084507,2.74445741 L3.05352113,5.32322054 C3.22629194,5.51769837 3.31267606,5.74134452 3.31267606,5.99416569 C3.31267606,6.24698687 3.22629194,6.47063302 3.05352113,6.66511085 L0.54084507,9.24387398 C0.368074254,9.43835181 0.281690141,9.66588746 0.281690141,9.92648775 L0.281690141,9.92648775 Z\",\n fill: \"#FFFFFF\"\n})));\n\nconst icons = {\n correct: QuizCorrectIcon,\n wrong: QuizWrongIcon\n};\nconst useStyles$3 = createUseStyles(theme => {\n const size = {\n height: 20,\n width: 20\n };\n const containerBase = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n ...size\n };\n\n const getIconContainerBg = (highlight, backgroundColor, iconName) => {\n if (iconName === 'correct') {\n return '#00BF6F';\n }\n\n if (iconName === 'wrong') {\n return '#b32e22';\n }\n\n if (highlight) {\n return theme.correctAnswerHighlightColor;\n }\n\n return 'transparent';\n };\n\n const getIconContainerBorderColor = iconName => {\n if (iconName === 'correct') {\n return theme.border.correctColor;\n }\n\n if (iconName === 'wrong') {\n return theme.border.wrongColor;\n }\n\n return 'inherit';\n };\n\n const getIconContainerBackground = (highlight, backgroundColor) => {\n if (!backgroundColor) {\n return 'inherit';\n }\n\n if (highlight) {\n return theme.primaryBackgroundColor;\n }\n\n return backgroundColor;\n };\n\n return {\n radioContainer: {\n position: 'relative',\n ...size\n },\n radioInput: {\n opacity: 0,\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%'\n },\n iconContainer: ({\n highlight,\n iconName,\n type,\n backgroundColor\n }) => ({ ...containerBase,\n position: 'relative',\n borderRadius: type === 'radio' ? 10 : 2,\n height: iconName ? size.height : size.height - 2,\n border: iconName ? ['1px', 'solid', theme.border.defaultColor] : [],\n backgroundColor: getIconContainerBg(highlight, backgroundColor, iconName),\n borderColor: getIconContainerBorderColor(iconName)\n }),\n // container needed as background for alpha transparency in `correctAnswerHighlightColor`\n iconContainerBackground: ({\n highlight,\n type,\n iconName,\n backgroundColor\n }) => ({ ...containerBase,\n position: 'absolute',\n borderRadius: type === 'radio' ? 10 : 2,\n border: iconName ? [] : ['1px', 'solid', theme.border.defaultColor],\n backgroundColor: getIconContainerBackground(highlight, backgroundColor)\n })\n };\n});\n\nconst InputIcon = ({\n type,\n id,\n ariaLabelledby,\n highlight = false,\n checked,\n isCorrect = true,\n ariaDescribedBy = [],\n noScreenReaderText = false,\n backgroundColor\n}) => {\n let iconName;\n\n if (checked && isCorrect) {\n iconName = 'correct';\n } else if (checked) {\n iconName = 'wrong';\n }\n\n const {\n radioContainer,\n radioInput,\n iconContainer,\n iconContainerBackground\n } = useStyles$3({\n highlight,\n iconName,\n type,\n backgroundColor\n });\n const Icon = iconName && icons[iconName];\n return React.createElement(\"div\", {\n className: radioContainer\n }, React.createElement(\"input\", {\n id: id,\n className: radioInput,\n type: type,\n checked: !!checked,\n \"aria-labelledby\": ariaLabelledby || undefined,\n \"aria-describedby\": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined,\n readOnly: true\n }), React.createElement(\"div\", {\n className: iconContainerBackground\n }, React.createElement(\"div\", {\n className: iconContainer,\n \"data-testid\": \"quiz-results-icon-container\"\n }, Icon && React.createElement(Icon, {\n isAriaHidden: true\n }))), iconName && !noScreenReaderText && React.createElement(SrText, {\n icon: iconName\n }));\n};\n\nconst useStyles$2 = createUseStyles(theme => {\n var _a; // Quiz results uses the default font size\n\n\n const defaultFrontSize = theme.fontSize.body;\n const {\n fontFamily = 'inherit',\n fontWeight = 'inherit',\n fontStyle = 'inherit',\n textDecoration = 'inherit',\n highlightColor = 'inherit',\n color = 'inherit'\n } = (_a = theme.questionBody) !== null && _a !== void 0 ? _a : {};\n return {\n componentContainer: {\n position: 'relative'\n },\n radioInput: {\n opacity: 0,\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%'\n },\n labelContainer: ({\n highlight,\n type\n }) => ({\n display: 'inline-block',\n position: 'relative',\n padding: [1, 8],\n margin: [4, 2],\n backgroundColor: highlight ? theme.correctAnswerHighlightColor : 'initial',\n borderRadius: type === 'checkbox' ? 4 : 13,\n // fix for IE11 bug - images leaking out of label container\n boxSizing: 'border-box',\n maxWidth: '100%'\n }),\n textContainer: ({\n highlight\n }) => {\n var _a;\n\n return {\n /* Right and left margin are both defined to account for RTL direction styling. */\n margin: [3, 30, 2],\n wordBreak: 'break-word',\n fontFamily,\n fontWeight,\n fontStyle,\n textDecoration,\n highlightColor,\n color,\n ...(highlight ? {\n fontWeight: (_a = theme.fontWeight.medium) !== null && _a !== void 0 ? _a : {}\n } : {}),\n fontSize: defaultFrontSize\n };\n },\n iconContainer: {\n margin: 2,\n position: 'absolute'\n },\n textInputContainer: {\n margin: [5, 0, 0, 0]\n },\n [`@media (min-width: ${theme.breakpoints.sm.min})`]: {\n textInputContainer: {\n margin: [5, 0, 0, 32]\n }\n }\n };\n});\n\nconst QuizResultChoices = ({\n id,\n type,\n optionText,\n highlight = false,\n icon,\n hasTextInput = false,\n textInputValue = '',\n textInputSize = 50,\n textInputParagraphLines = 1\n}) => {\n const {\n componentContainer,\n labelContainer,\n textContainer,\n iconContainer,\n textInputContainer\n } = useStyles$2({\n highlight,\n icon,\n type\n });\n const uniqId = useMemo(() => uniqueId('id-'), []);\n const radioButtonId = id || uniqId;\n const textInputId = `caption-${radioButtonId}`;\n const inputId = `input-${radioButtonId}`;\n const ariaDescribedBy = [];\n\n if (hasTextInput) {\n ariaDescribedBy.push(textInputId);\n }\n\n return React.createElement(React.Fragment, null, React.createElement(\"div\", {\n className: componentContainer\n }, React.createElement(\"label\", {\n htmlFor: inputId,\n className: labelContainer\n }, React.createElement(\"div\", {\n className: iconContainer\n }, React.createElement(InputIcon, {\n type: type,\n id: inputId,\n checked: !!icon,\n isCorrect: icon === 'correct',\n highlight: highlight,\n ariaDescribedBy: ariaDescribedBy,\n noScreenReaderText: true\n })), React.createElement(\"div\", {\n className: textContainer,\n translate: \"no\"\n }, React.createElement(RichText, {\n element: \"span\",\n text: optionText\n })), React.createElement(SrText, {\n icon: icon\n }))), React.createElement(\"div\", {\n className: textInputContainer,\n translate: \"no\"\n }, hasTextInput && (textInputParagraphLines <= 1 ? React.createElement(TextInput, {\n id: textInputId,\n name: \"otherOptionText\",\n value: textInputValue,\n size: textInputSize,\n labelId: inputId,\n autoHeight: true,\n readOnly: true\n }) : React.createElement(TextArea, {\n id: textInputId,\n name: \"otherOptionText\",\n rows: textInputParagraphLines,\n defaultValue: textInputValue,\n cols: textInputSize,\n labelId: inputId,\n readOnly: true\n }))));\n};\n\nconst useStyles$1 = createUseStyles(theme => {\n return {\n imageChoice: {\n display: 'inline-block',\n margin: [15, 0],\n padding: [0, 24, 0, 0]\n },\n componentContainer: ({\n highlight\n }) => ({\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'flex-end',\n alignItems: 'center',\n width: 224,\n borderRadius: 2,\n border: highlight ? `2px solid ${theme.answerColor}` : '1px solid #D0D2D3'\n }),\n iconLabel: {\n position: 'absolute',\n zIndex: 1,\n top: 2,\n left: 2\n },\n imageContainer: ({\n highlight\n }) => ({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n height: 168,\n position: 'relative',\n backgroundColor: highlight ? theme.correctAnswerHighlightColor : 'rgb(239, 239, 239)'\n }),\n imageStyle: {\n maxHeight: '100%',\n maxWidth: '100%',\n height: 'auto',\n width: 'auto',\n pointerEvents: 'none',\n flex: 'none' // fix for IE 11 - images leaking out of container\n\n },\n captionStyle: ({\n highlight\n }) => {\n var _a;\n\n return {\n fontFamily: (_a = theme.questionBody.fontFamily) !== null && _a !== void 0 ? _a : {},\n display: 'block',\n backgroundColor: highlight ? theme.correctAnswerHighlightColor : 'initial',\n color: theme.answerColor,\n width: '100%',\n padding: [7, 9, 9, 7],\n fontWeight: highlight ? 500 : 'initial'\n };\n },\n srOnly: {\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n border: 0\n }\n };\n});\n\nconst QuizResultImageChoice = ({\n id,\n highlight = false,\n selected = false,\n image,\n caption = '',\n correctMessage,\n selectedMessage,\n isManyAnswers = false\n}) => {\n const {\n imageChoice,\n componentContainer,\n imageContainer,\n imageStyle,\n iconLabel,\n captionStyle,\n srOnly\n } = useStyles$1({\n highlight\n });\n const uniqId = useMemo(() => uniqueId('id-'), []);\n const imageChoiceId = id || uniqId;\n const captionId = `caption-${imageChoiceId}`;\n const selectedId = `selected-${imageChoiceId}`;\n const inputId = `input-${imageChoiceId}`;\n const highlightedId = `highlighted-${imageChoiceId}`;\n const ariaDescribedBy = [];\n\n if (highlight) {\n ariaDescribedBy.push(highlightedId);\n }\n\n if (selected) {\n ariaDescribedBy.push(selectedId);\n }\n\n return React.createElement(\"div\", {\n className: imageChoice\n }, React.createElement(\"div\", {\n className: componentContainer\n }, React.createElement(\"div\", {\n className: imageContainer\n }, React.createElement(\"label\", {\n htmlFor: inputId,\n className: iconLabel\n }, React.createElement(InputIcon, {\n id: inputId,\n type: isManyAnswers ? 'checkbox' : 'radio',\n checked: selected,\n isCorrect: selected && highlight,\n highlight: highlight,\n backgroundColor: \"rgb(239, 239, 239)\",\n ariaDescribedBy: ariaDescribedBy,\n ariaLabelledby: caption ? `${captionId} ${inputId}` : undefined\n })), React.createElement(\"img\", {\n className: imageStyle,\n src: image.url,\n // Only add alt text if it's different than the label that describes it\n alt: caption === image.altText ? '' : image.altText,\n \"aria-labelledby\": caption || undefined,\n \"aria-describedby\": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined\n })), caption && React.createElement(\"span\", {\n className: captionStyle,\n id: captionId,\n translate: \"no\"\n }, caption), highlight && React.createElement(\"span\", {\n className: srOnly,\n id: highlightedId\n }, correctMessage), selected && React.createElement(\"span\", {\n className: srOnly,\n id: selectedId\n }, selectedMessage)));\n};\n\nconst useStyles = createUseStyles(theme => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j; // Quiz results has a consistent font size\n\n\n const fontSize = theme.fontSize.body;\n return {\n componentContainer: {\n margin: [5, 0],\n fontFamily: (_b = (_a = theme.questionTitle) === null || _a === void 0 ? void 0 : _a.fontFamily) !== null && _b !== void 0 ? _b : {},\n fontStyle: (_d = (_c = theme.questionTitle) === null || _c === void 0 ? void 0 : _c.fontStyle) !== null && _d !== void 0 ? _d : {},\n fontWeight: (_f = (_e = theme.questionTitle) === null || _e === void 0 ? void 0 : _e.fontWeight) !== null && _f !== void 0 ? _f : {},\n color: ((_g = theme.questionTitle) === null || _g === void 0 ? void 0 : _g.color) || theme.questionColor,\n fontSize,\n textDecoration: (_j = (_h = theme.questionTitle) === null || _h === void 0 ? void 0 : _h.textDecoration) !== null && _j !== void 0 ? _j : {}\n },\n scoreContainer: {\n display: 'inline'\n },\n feedbackContainer: {\n marginTop: 8,\n marginBottom: 0,\n wordWrap: 'wrap'\n },\n skippedBadge: {\n display: 'inline',\n padding: [2, 15],\n borderRadius: 15,\n backgroundColor: 'rgba(0, 0, 0, 0.1)',\n marginLeft: 5\n }\n };\n});\nconst COPY = defineMessages({\n POINT: {\n id: 'QuizResultScore.POINT',\n defaultMessage: 'point',\n description: '[Type: header][Vis: med] - total point of this quiz question'\n },\n POINTS: {\n id: 'QuizResultScore.POINTS',\n defaultMessage: 'points',\n description: '[Type: header][Vis: med] - total point of this quiz question'\n },\n SKIPPED: {\n id: 'QuizResultScore.SKIPPED',\n defaultMessage: 'Skipped',\n description: '[Type: header][Vis: med] - user skipped this quiz question'\n }\n});\n\nconst QuizResultScore = ({\n score,\n total,\n feedback,\n skipped = false\n}) => {\n const {\n componentContainer,\n scoreContainer,\n feedbackContainer,\n skippedBadge\n } = useStyles();\n return React.createElement(\"div\", {\n className: componentContainer\n }, React.createElement(\"p\", {\n className: scoreContainer\n }, `${score}/${total} `, React.createElement(T, {\n desc: total > 1 ? COPY.POINTS : COPY.POINT\n })), skipped && React.createElement(\"span\", {\n className: skippedBadge\n }, React.createElement(T, {\n desc: COPY.SKIPPED\n })), feedback && React.createElement(\"p\", {\n translate: \"no\",\n className: feedbackContainer,\n dangerouslySetInnerHTML: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n __html: sanitizeString(lodash_unescape(feedback))\n }\n }));\n};\n/**\n * Get the icon to indicator whether or not user got the answer correct or not\n * @param responded whether user selected the answer option or not\n * @param answerOptionPoints answer option points\n */\n\n\nconst getCorrectnessIndicatorIcon = (responded, answerOptionPoints) => {\n if (!responded) {\n return undefined;\n }\n\n if (answerOptionPoints <= 0) {\n return 'wrong';\n }\n\n return 'correct';\n};\n/** Gets the icon and highlight for `idToSearch` */\n\n\nconst getIconAndHighlight = (answers, idToSearch, highlightCorrectAnswers) => {\n const {\n points = 0,\n responded = false\n } = answers.find(({\n answer\n }) => answer.id === idToSearch) || {};\n const icon = getCorrectnessIndicatorIcon(responded, points);\n return {\n icon,\n highlight: highlightCorrectAnswers && points > 0\n };\n};\n/** Picks feedback string based on user/total score */\n\n\nconst pickFeedback = (feedback, userScore, totalScore) => {\n if (userScore >= totalScore) {\n return feedback.correct;\n }\n\n if (userScore > 0) {\n return feedback.partial;\n }\n\n return feedback.incorrect;\n};\n/**\n * Calculate user score for a quiz question\n * @param quizAnswers Quiz or QuizImage results answers\n */\n\n\nconst getUserScore = quizAnswers => {\n return quizAnswers.reduce((acc, cur) => {\n return cur.responded ? acc + cur.points : acc;\n }, 0);\n};\n/** Helper Type Guard to filter our `undefined` */\n\n\nconst isNotUndefined = a => a !== undefined;\n\nconst isPureQuizAnswer = answer => 'label' in answer.answer && 'visible' in answer.answer;\n/** Filter `answers` to only regular Answers without invisible, \"other\" and \"none of the above\" */\n\n\nconst filterQuizAnswers = (answers, idsToFilter = []) => answers.filter(isPureQuizAnswer).filter(({\n answer: {\n visible\n }\n}) => visible).filter(a => !idsToFilter.filter(isNotUndefined).includes(a.answer.id));\n\nconst isPureQuizImageAnswer = answer => 'label' in answer.answer && 'visible' in answer.answer && 'image' in answer.answer;\n/** QuizImageAnswer without \"other\" and \"none of the above\" */\n\n\nconst filterOtherFromQuizImageAnswer = (answers, idsToFilter = []) => answers.filter(isPureQuizImageAnswer).filter(({\n answer: {\n visible\n }\n}) => visible).filter(a => !idsToFilter.filter(isNotUndefined).includes(a.answer.id));\n\nconst ErrorFallback = ({\n error\n}) => {\n // TODO: temporary fallback ui (RAWR-773)\n return React.createElement(React.Fragment, null, React.createElement(\"h1\", null, \"Sorry.. there was an error\"), React.createElement(\"p\", null, error.message));\n};\n\nconst withErrorBoundary = Component => {\n return props => React.createElement(reactErrorBoundary_umd.exports.ErrorBoundary, {\n FallbackComponent: ErrorFallback\n }, React.createElement(Component, Object.assign({}, props)));\n};\n\nconst CheckBox = ({\n id,\n title,\n questionNumber,\n numberingEnabled,\n highlightCorrectAnswers,\n answerNoneOfTheAbove,\n answerLayoutColumns,\n spacing,\n answerOther,\n quizResults\n}) => {\n const userScore = getUserScore(quizResults.answers);\n const totalScore = quizResults.totalPoints;\n const feedback = pickFeedback(quizResults.feedback, userScore, totalScore);\n /** Visible answers without \"other\" and \"none of the above\" */\n\n const regularAnswers = filterQuizAnswers(quizResults.answers, [answerNoneOfTheAbove === null || answerNoneOfTheAbove === void 0 ? void 0 : answerNoneOfTheAbove.id, answerOther === null || answerOther === void 0 ? void 0 : answerOther.id]);\n const isComment = (answerOther === null || answerOther === void 0 ? void 0 : answerOther.type) === 'COMMENT';\n\n const NoneOfTheAboveOption = () => (answerNoneOfTheAbove === null || answerNoneOfTheAbove === void 0 ? void 0 : answerNoneOfTheAbove.visible) ? React.createElement(QuizResultChoices, Object.assign({\n id: answerNoneOfTheAbove.id,\n type: \"checkbox\",\n optionText: answerNoneOfTheAbove.label,\n textInputValue: \"\"\n }, getIconAndHighlight(quizResults.answers, answerNoneOfTheAbove.id, highlightCorrectAnswers))) : null;\n\n const OtherOption = () => {\n var _a, _b;\n\n if (!(answerOther === null || answerOther === void 0 ? void 0 : answerOther.visible)) {\n return null;\n }\n\n return isComment ? React.createElement(QuizResultComment, {\n id: answerOther.id,\n optionText: answerOther.label,\n textInputValue: ((_a = quizResults.answerOther) === null || _a === void 0 ? void 0 : _a.textAnswer) || '',\n textInputSize: answerOther.charsCount,\n textInputParagraphLines: answerOther.linesCount\n }) : React.createElement(QuizResultChoices, Object.assign({\n id: answerOther.id,\n type: \"checkbox\",\n optionText: answerOther.label,\n textInputValue: ((_b = quizResults.answerOther) === null || _b === void 0 ? void 0 : _b.textAnswer) || '',\n hasTextInput: true,\n textInputSize: answerOther.charsCount,\n textInputParagraphLines: answerOther.linesCount\n }, getIconAndHighlight(quizResults.answers, answerOther.id, !isComment && highlightCorrectAnswers)));\n };\n\n return React.createElement(QuestionFieldLayoutTemplate, {\n title: React.createElement(QuestionTitle, {\n id: id,\n heading: title,\n required: false,\n numbered: numberingEnabled,\n number: parseInt(questionNumber, 10),\n useDefaultFrontSize: true\n }),\n footer: React.createElement(QuizResultScore, {\n score: userScore,\n total: totalScore,\n feedback: feedback,\n skipped: false\n }),\n padding: spacing,\n clickShield: false,\n hasFooterPadding: true\n }, React.createElement(QuestionAnswerLayoutTemplate, {\n columns: answerLayoutColumns,\n noneOfTheAbove: !isComment ? React.createElement(NoneOfTheAboveOption, null) : null,\n other: React.createElement(OtherOption, null)\n }, regularAnswers.map(({\n answer,\n responded,\n points\n }) => {\n return React.createElement(QuizResultChoices, {\n key: answer.id,\n textInputValue: \"\",\n id: answer.id,\n type: \"checkbox\",\n optionText: answer.label,\n icon: getCorrectnessIndicatorIcon(responded, points),\n // Correct answers are expected to have a point value above 0\n // and should be highlighted.\n highlight: highlightCorrectAnswers && points > 0\n });\n }).concat(isComment ? [React.createElement(NoneOfTheAboveOption, {\n key: answerNoneOfTheAbove === null || answerNoneOfTheAbove === void 0 ? void 0 : answerNoneOfTheAbove.id\n })] : [])));\n};\n\nvar CheckBox$1 = withErrorBoundary(CheckBox);\n\nconst MultipleChoice = ({\n id,\n title,\n questionNumber,\n numberingEnabled,\n highlightCorrectAnswers,\n answerNoneOfTheAbove,\n answerLayoutColumns,\n spacing,\n answerOther,\n quizResults\n}) => {\n const userScore = getUserScore(quizResults.answers);\n const totalScore = quizResults.totalPoints;\n const feedback = pickFeedback(quizResults.feedback, userScore, totalScore);\n /** Visible answers without \"other\" and \"none of the above\" */\n\n const regularAnswers = filterQuizAnswers(quizResults.answers, [answerNoneOfTheAbove === null || answerNoneOfTheAbove === void 0 ? void 0 : answerNoneOfTheAbove.id, answerOther === null || answerOther === void 0 ? void 0 : answerOther.id]);\n const isComment = (answerOther === null || answerOther === void 0 ? void 0 : answerOther.type) === 'COMMENT';\n\n const NoneOfTheAboveOption = () => (answerNoneOfTheAbove === null || answerNoneOfTheAbove === void 0 ? void 0 : answerNoneOfTheAbove.visible) ? React.createElement(QuizResultChoices, Object.assign({\n type: \"radio\",\n id: answerNoneOfTheAbove.id,\n optionText: answerNoneOfTheAbove.label,\n textInputValue: \"\"\n }, getIconAndHighlight(quizResults.answers, answerNoneOfTheAbove.id, highlightCorrectAnswers))) : null;\n\n const OtherOption = () => {\n var _a, _b;\n\n if (!(answerOther === null || answerOther === void 0 ? void 0 : answerOther.visible)) {\n return null;\n }\n\n return isComment ? React.createElement(QuizResultComment, {\n id: answerOther.id,\n optionText: answerOther.label,\n textInputValue: ((_a = quizResults.answerOther) === null || _a === void 0 ? void 0 : _a.textAnswer) || '',\n textInputSize: answerOther.charsCount,\n textInputParagraphLines: answerOther.linesCount\n }) : React.createElement(QuizResultChoices, Object.assign({\n type: \"radio\",\n id: answerOther.id,\n optionText: answerOther.label,\n textInputValue: ((_b = quizResults.answerOther) === null || _b === void 0 ? void 0 : _b.textAnswer) || '',\n hasTextInput: true,\n textInputSize: answerOther.charsCount,\n textInputParagraphLines: answerOther.linesCount\n }, getIconAndHighlight(quizResults.answers, answerOther.id, !isComment && highlightCorrectAnswers)));\n };\n\n return React.createElement(QuestionFieldLayoutTemplate, {\n title: React.createElement(QuestionTitle, {\n id: id,\n heading: title,\n required: false,\n numbered: numberingEnabled,\n number: parseInt(questionNumber, 10),\n useDefaultFrontSize: true\n }),\n footer: React.createElement(QuizResultScore, {\n score: userScore,\n total: totalScore,\n feedback: feedback,\n skipped: false\n }),\n padding: spacing,\n clickShield: false,\n hasFooterPadding: true\n }, React.createElement(QuestionAnswerLayoutTemplate, {\n columns: answerLayoutColumns,\n noneOfTheAbove: !isComment ? React.createElement(NoneOfTheAboveOption, null) : null,\n other: React.createElement(OtherOption, null)\n }, regularAnswers.map(answerOption => {\n const {\n answer,\n points,\n responded\n } = answerOption;\n const icon = getCorrectnessIndicatorIcon(responded, points);\n return React.createElement(QuizResultChoices, {\n type: \"radio\",\n key: answer.id,\n id: answer.id,\n optionText: answer.label,\n textInputValue: \"\",\n icon: icon,\n // Correct answers are expected to have a point value above 0\n // and should be highlighted.\n highlight: highlightCorrectAnswers && points > 0\n });\n }).concat(isComment && answerNoneOfTheAbove ? [React.createElement(NoneOfTheAboveOption, {\n key: answerNoneOfTheAbove.id\n })] : [])));\n};\n\nvar MultipleChoice$1 = withErrorBoundary(MultipleChoice);\n\nconst ImageChoice = ({\n id,\n title,\n questionNumber,\n highlightCorrectAnswers,\n numberingEnabled,\n answerNoneOfTheAbove,\n quizResults,\n isManyAnswers\n}) => {\n const userScore = getUserScore(quizResults.answers);\n const totalScore = quizResults.totalPoints;\n const feedback = pickFeedback(quizResults.feedback, userScore, totalScore);\n\n const NoneOfTheAboveOption = () => {\n return answerNoneOfTheAbove && answerNoneOfTheAbove.visible ? React.createElement(QuizResultChoices, Object.assign({\n type: isManyAnswers ? 'checkbox' : 'radio',\n id: answerNoneOfTheAbove.id,\n optionText: answerNoneOfTheAbove.label,\n textInputValue: \"\"\n }, getIconAndHighlight(quizResults.answers, answerNoneOfTheAbove.id, highlightCorrectAnswers))) : null;\n };\n /** Answers without \"none of the above\" */\n\n\n const regularAnswers = filterOtherFromQuizImageAnswer(quizResults.answers, [answerNoneOfTheAbove === null || answerNoneOfTheAbove === void 0 ? void 0 : answerNoneOfTheAbove.id]);\n return React.createElement(QuestionFieldLayoutTemplate, {\n title: React.createElement(QuestionTitle, {\n id: id,\n heading: title,\n required: false,\n numbered: numberingEnabled,\n number: parseInt(questionNumber, 10),\n useDefaultFrontSize: true\n }),\n footer: React.createElement(QuizResultScore, {\n score: userScore,\n total: totalScore,\n feedback: feedback,\n skipped: false\n }),\n clickShield: false,\n hasFooterPadding: true\n }, React.createElement(QuestionAnswerLayoutTemplate, {\n columns: \"horizontal\",\n noneOfTheAbove: React.createElement(NoneOfTheAboveOption, null),\n adjustToContent: true\n }, regularAnswers.map(answerOption => {\n const {\n answer,\n points,\n responded\n } = answerOption;\n return React.createElement(QuizResultImageChoice, {\n key: answer.id,\n id: answer.id,\n image: answer.image,\n caption: answer.label,\n selected: responded,\n isManyAnswers: isManyAnswers,\n // Correct answers are expected to have a point value above 0\n // and should be highlighted.\n highlight: highlightCorrectAnswers && points > 0\n });\n })));\n};\n\nvar ImageChoice$1 = withErrorBoundary(ImageChoice);\nexport { CheckBox$1 as CheckBox, ImageChoice$1 as ImageChoice, MultipleChoice$1 as MultipleChoice };","import React, { useMemo } from 'react';\nimport { selectQuestionTypeDefinition, isExternalQuestionWithTypeId } from '@sm/question-definitions';\nimport { w as withErrorBoundary, u as useProviderAccessContext, a as useExternalQuestionAugmentation, c as createVisualization } from './utils-fc914b8b.js';\n\nconst UnsupportedQuestionTypeError = ({\n question\n}) => {\n const typeId = isExternalQuestionWithTypeId(question) && question.typeId;\n return React.createElement(\"div\", null, \"Unsupported Question Type: \", typeId);\n};\n\nconst SingleQuestionController = ({\n question: externalQuestion,\n displayOptions,\n namedSlots,\n responseSet\n}) => {\n const {\n useUpstreamConfig,\n useVisualizationList\n } = useProviderAccessContext();\n const {\n capability,\n upstreamActions,\n renderProps,\n settings\n } = useUpstreamConfig();\n /* NOTE:\n Since Controllers are expected to be capability-independent -- and should not import\n the CapabilityProvider types -- this config is returning the type params as `unknown`s.\n This shouldn't be a problem -- as the Controller doesn't need to know\n any specifics about these types - other than passing them to the compatible\n Visualizations (something that the Visualization Helpers runtime already takes\n care of). However, the consequence is that overall type safety of the Controller\n is not as strict as we would like it to be. We should probably create a task\n to improve this later.\n */\n // TODO: add controller type to the visualization selection -- to allow for different DisplayOptions and better support for nested visualizations\n\n const visualizationOptions = useVisualizationList(capability\n /* , controllerType */\n ); // Augment the external question with the type id\n\n const augmentedExternalQuestion = useExternalQuestionAugmentation(externalQuestion, responseSet);\n const definition = selectQuestionTypeDefinition(augmentedExternalQuestion);\n const ChosenVisualization = useMemo(() => {\n if (!definition) {\n return null;\n } // Is this React.memo necessary?\n\n\n return React.memo(createVisualization(capability, definition.typeId, visualizationOptions, upstreamActions, settings, renderProps)); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [//* * Revisit / Hoist */\n // capability, // causes constant re-renders\n definition === null || definition === void 0 ? void 0 : definition.typeId // settings, // causes constant re-renders\n // renderProps, // causes constant re-renders\n // definition, // causes constant re-renders\n // upstreamActions, // causes constant re-renders\n // visualizationOptions, // causes constant re-renders\n ]);\n\n if (ChosenVisualization === null || !definition) {\n return React.createElement(UnsupportedQuestionTypeError, {\n question: augmentedExternalQuestion\n });\n }\n\n const toExternalQuestion = q => definition.toExternalQuestion(externalQuestion, q, capability);\n /* NOTE:\n Type safety improvement: Currently 'QuestionType' is all the possible question types\n -- while createVisualization will choose a visualization that can render\n question types for a specific capability -- meaning that the resulting question\n type of 'ChosenVisualization' is a subset of all the possible QuestionTypes\n (only those that have viable visualizations for that capability -- and, in the\n future, ControllerType)\n */\n\n\n const question = definition.fromExternalQuestion(augmentedExternalQuestion, capability);\n return React.createElement(ChosenVisualization, {\n question: question,\n displayOptions: displayOptions,\n namedSlots: namedSlots,\n toExternalQuestion: toExternalQuestion\n });\n};\n\nvar SingleQuestionController$1 = withErrorBoundary(SingleQuestionController);\nexport { SingleQuestionController$1 as S };","import React from 'react';\nimport { SurveyThemeWrapper } from '@sm/question-ui/theme-respondent';\nimport { d as declareVisualization, p as providerFactory } from './utils-fc914b8b.js';\nimport { MultipleChoice, CheckBox, ImageChoice } from '@sm/question-ui/respondent-quiz-results';\nexport { S as SingleQuestionController } from './controllers-f58b7b59.js';\nimport './vendor-4368c290.js';\nimport '@sm/question-definitions';\n/**\n * Derive the answer layout columns\n * @param answerLayout answer layout from external question\n */\n\nconst getAnswerLayoutColumns = answerLayout => {\n if (answerLayout === 'VERTICAL') {\n return 1;\n }\n\n if (answerLayout === 'TWO_COLUMNS') {\n return 2;\n }\n\n if (answerLayout === 'THREE_COLUMNS') {\n return 3;\n }\n\n return 'horizontal';\n};\n\nconst isAnswer = maybeAnswer => 'label' in maybeAnswer && 'id' in maybeAnswer && 'visible' in maybeAnswer;\n\nconst quizAnswersToImageAnswers = (quizAnswers, answersImage) => quizAnswers.map(ans => {\n if (!isAnswer(ans.answer)) {\n return ans;\n }\n\n const matchingImageAnswer = answersImage.find(ansImg => ansImg.id === ans.answer.id);\n\n if (!matchingImageAnswer) {\n throw new Error('Image not found'); // TODO: Handle this later\n }\n\n const answer = matchingImageAnswer;\n return { ...ans,\n answer: { ...answer\n }\n };\n});\n/**\n * Map the quiz results with the image answers\n * @param quizResults the quizResults provided by the external question\n * @param answersImage the answersImage provided by the external question\n */\n\n\nconst getQuizResultsWithImage = (quizResults, answersImage) => ({ ...quizResults,\n answers: quizAnswersToImageAnswers(quizResults.answers, answersImage)\n});\n\nconst MultipleChoiceVisualization = ({\n question: {\n layout: {\n answerLayout,\n spacing\n },\n quizResults,\n id,\n title,\n questionNumber,\n answerNoneOfTheAbove,\n answerOther\n },\n settings: {\n survey: {\n numberingEnabled,\n highlightCorrectAnswers\n }\n }\n}) => {\n // TODO: use a better error handling once we have the error handing\n // pattern designed\n if (!quizResults) {\n /* eslint-disable-next-line no-console */\n console.warn('Missing quiz results in the data');\n return React.createElement(React.Fragment, null);\n }\n\n const answerLayoutColumns = getAnswerLayoutColumns(answerLayout);\n return React.createElement(MultipleChoice, {\n id: id,\n title: title,\n questionNumber: questionNumber,\n highlightCorrectAnswers: highlightCorrectAnswers,\n numberingEnabled: numberingEnabled,\n answerNoneOfTheAbove: answerNoneOfTheAbove,\n answerLayoutColumns: answerLayoutColumns,\n spacing: spacing,\n answerOther: answerOther,\n quizResults: quizResults\n });\n};\n\nvar MultipleChoiceVisualization$1 = declareVisualization(['multiple_choice'], ['respondent-quiz-results'], MultipleChoiceVisualization);\n\nconst CheckBoxVisualization = ({\n question: {\n layout: {\n answerLayout,\n spacing\n },\n quizResults,\n id,\n title,\n questionNumber,\n answerNoneOfTheAbove,\n answerOther\n },\n settings: {\n survey: {\n numberingEnabled,\n highlightCorrectAnswers\n }\n }\n}) => {\n // TODO: use a better error handling once we have the error handing\n // pattern designed\n if (!quizResults) {\n /* eslint-disable-next-line no-console */\n console.warn('Missing quiz results in the data');\n return null;\n }\n\n const answerLayoutColumns = getAnswerLayoutColumns(answerLayout);\n return React.createElement(CheckBox, {\n id: id,\n title: title,\n questionNumber: questionNumber,\n highlightCorrectAnswers: highlightCorrectAnswers,\n numberingEnabled: numberingEnabled,\n answerNoneOfTheAbove: answerNoneOfTheAbove,\n answerLayoutColumns: answerLayoutColumns,\n spacing: spacing,\n answerOther: answerOther,\n quizResults: quizResults\n });\n};\n\nvar CheckBoxVisualization$1 = declareVisualization(['check_box'], ['respondent-quiz-results'], CheckBoxVisualization);\n\nconst ImageChoiceVisualization = ({\n question: {\n quizResults,\n id,\n title,\n questionNumber,\n answerNoneOfTheAbove,\n answersImage,\n variant\n },\n settings: {\n survey: {\n numberingEnabled,\n highlightCorrectAnswers\n }\n }\n}) => {\n // TODO: use a better error handling once we have the error handing\n // pattern designed\n if (!quizResults) {\n /* eslint-disable-next-line no-console */\n console.warn('Missing quiz results in the data');\n return React.createElement(React.Fragment, null);\n }\n\n const isManyAnswers = variant === 'MANY_ANSWERS_IMAGE';\n const quizResultsWithImage = getQuizResultsWithImage(quizResults, answersImage);\n return React.createElement(ImageChoice, {\n id: id,\n title: title,\n questionNumber: questionNumber,\n highlightCorrectAnswers: highlightCorrectAnswers,\n numberingEnabled: numberingEnabled,\n answerNoneOfTheAbove: answerNoneOfTheAbove,\n quizResults: quizResultsWithImage,\n isManyAnswers: isManyAnswers\n });\n};\n\nvar ImageChoiceVisualization$1 = declareVisualization(['image_choice'], ['respondent-quiz-results'], ImageChoiceVisualization);\n\nconst DropdownVisualization = ({\n question: {\n layout: {\n answerLayout,\n spacing\n },\n quizResults,\n id,\n title,\n questionNumber,\n answerOther\n },\n settings: {\n survey: {\n numberingEnabled,\n highlightCorrectAnswers\n }\n }\n}) => {\n // TODO: use a better error handling once we have the error handing\n // pattern designed\n if (!quizResults) {\n /* eslint-disable-next-line no-console */\n console.warn('Missing quiz results in the data');\n return React.createElement(React.Fragment, null);\n }\n\n const answerLayoutColumns = getAnswerLayoutColumns(answerLayout);\n return React.createElement(MultipleChoice, {\n id: id,\n title: title,\n questionNumber: questionNumber,\n highlightCorrectAnswers: highlightCorrectAnswers,\n numberingEnabled: numberingEnabled,\n answerNoneOfTheAbove: null,\n answerLayoutColumns: answerLayoutColumns,\n spacing: spacing,\n answerOther: answerOther,\n quizResults: quizResults\n });\n};\n\nvar DropdownVisualization$1 = declareVisualization(['dropdown'], ['respondent-quiz-results'], DropdownVisualization);\nvar visualizationList = [MultipleChoiceVisualization$1, CheckBoxVisualization$1, ImageChoiceVisualization$1, DropdownVisualization$1];\nconst ProviderHelper = providerFactory(visualizationList);\n\nconst QuizResultsCapabilityProvider = ({\n settings,\n children\n}) => {\n return React.createElement(ProviderHelper, {\n value: {\n capability: 'respondent-quiz-results',\n upstreamActions: null,\n renderProps: null,\n settings\n }\n }, React.createElement(SurveyThemeWrapper, null, children));\n};\n\nexport { QuizResultsCapabilityProvider, visualizationList as QuizResultsVisualizationList };","import React, { createContext, useContext, useMemo } from 'react';\nimport { r as reactErrorBoundary_umd } from './vendor-4368c290.js';\nimport { getTypeId } from '@sm/question-definitions';\n\nconst filterVisualizationByQuestionType = typeId => qd => {\n const [qts] = qd;\n return qts.includes(typeId);\n};\n\nconst FallbackComponent = ({\n error\n}) => {\n // TODO: temporary fallback ui (RAWR-773)\n return React.createElement(React.Fragment, null, React.createElement(\"h1\", null, \"Sorry.. there was an error\"), React.createElement(\"p\", null, error.message));\n};\n\nconst withErrorBoundary = Component => {\n return props => React.createElement(reactErrorBoundary_umd.exports.ErrorBoundary, {\n FallbackComponent: FallbackComponent\n }, React.createElement(Component, Object.assign({}, props)));\n};\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n\nconst declareVisualization = (questionTypes, capabilities, component) => {\n return [questionTypes, capabilities, component];\n};\n\nconst providerAccessContext = createContext(null);\n\nconst useProviderAccessContext = () => {\n const access = useContext(providerAccessContext);\n\n if (!access) {\n throw new Error('Must call useProviderAccessContext inside a properly setup Capability Provider');\n }\n\n const {\n useUpstreamConfig,\n useVisualizationList\n } = access;\n return {\n useVisualizationList,\n useUpstreamConfig\n };\n};\n/** providerFactory\n * Creates a helper component that enables a CapabilityProvider to store the appropriate configurations,\n * making them available to the visualizations through the generic controllers. It makes sure that all\n * Visualizations have the proper types passed onto them.\n * @param visualizationList list of visualization definitions for all the visualizations that will be\n * supported by this Capability Provider.\n * @returns React Context Provider accepting the appropriate configuration for the CapabilityProvider\n */\n\n\nconst providerFactory = visualizationList => {\n const ctx = React.createContext(null); // TODO: further filter types to match the ones in the right indexes based on capability\n\n const useVisualizationList = capability => visualizationList.filter(([, fs]) => fs.indexOf(capability) >= 0);\n\n const useUpstreamConfig = () => {\n const config = useContext(ctx);\n\n if (!config) {\n throw new Error('Must call useUpstreamConfig inside a properly set up Capability Provider');\n }\n\n return config;\n };\n\n return ({\n children,\n value\n }) => {\n return React.createElement(reactErrorBoundary_umd.exports.ErrorBoundary, {\n FallbackComponent: FallbackComponent\n }, React.createElement(providerAccessContext.Provider, {\n value: {\n useVisualizationList: useVisualizationList,\n useUpstreamConfig: useUpstreamConfig\n }\n }, React.createElement(ctx.Provider, {\n value: value\n }, children)));\n };\n};\n\nconst UnsupportedVisualization = ({\n question: {\n typeId\n }\n}) => React.createElement(\"div\", null, \"Unsupported Visualization for \", typeId);\n\nconst createVisualization = (capability, questionTypeId, visualizationOptions, upstreamActions, settings, renderProps) => {\n const [,, VisualizationComponent] = visualizationOptions.find(filterVisualizationByQuestionType(questionTypeId)) || [];\n\n if (!VisualizationComponent) {\n return ({\n question\n }) => React.createElement(UnsupportedVisualization, {\n question: question\n });\n }\n\n return ({\n question,\n displayOptions,\n namedSlots,\n toExternalQuestion\n }) => React.createElement(VisualizationComponent, {\n capability: capability,\n question: question,\n upstreamActions: upstreamActions,\n settings: settings,\n displayOptions: displayOptions,\n renderProps: renderProps,\n toExternalQuestion: toExternalQuestion,\n namedSlots: namedSlots\n });\n}; // TODO: move to common question utils\n\n\nconst isLocalError = e => (e === null || e === void 0 ? void 0 : e.source) === 'local-error'; // TODO: add to question type definitions\n\n\nconst isRequired = q => {\n var _a;\n\n return ((_a = q.required) === null || _a === void 0 ? void 0 : _a.type) !== undefined;\n};\n/** Finds and attaches a typeId to an `ExternalQuestion` */\n\n\nconst useExternalQuestionAugmentation = (externalQuestion, responseSet) => {\n return useMemo(() => {\n const typeId = getTypeId(externalQuestion);\n\n if (!typeId) {\n throw new Error(`Unsupported Question Type of family ${externalQuestion.family}, variant ${externalQuestion.variant}.`);\n }\n\n if (responseSet !== undefined) {\n return { ...externalQuestion,\n typeId,\n ...responseSet\n };\n }\n\n return { ...externalQuestion,\n typeId\n };\n }, [externalQuestion, responseSet]);\n};\n\nexport { useExternalQuestionAugmentation as a, isRequired as b, createVisualization as c, declareVisualization as d, isLocalError as i, providerFactory as p, useProviderAccessContext as u, withErrorBoundary as w };","import React from 'react';\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar classnames$1 = {\n exports: {}\n};\n/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n\n(function (module) {\n /* global define */\n (function () {\n var hasOwn = {}.hasOwnProperty;\n\n function classNames() {\n var classes = [];\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (!arg) continue;\n var argType = typeof arg;\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg);\n } else if (Array.isArray(arg)) {\n if (arg.length) {\n var inner = classNames.apply(null, arg);\n\n if (inner) {\n classes.push(inner);\n }\n }\n } else if (argType === 'object') {\n if (arg.toString === Object.prototype.toString) {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key);\n }\n }\n } else {\n classes.push(arg.toString());\n }\n }\n }\n\n return classes.join(' ');\n }\n\n if (module.exports) {\n classNames.default = classNames;\n module.exports = classNames;\n } else {\n window.classNames = classNames;\n }\n })();\n})(classnames$1);\n\nvar classnames = classnames$1.exports;\nvar reactErrorBoundary_umd = {\n exports: {}\n};\n\n(function (module, exports) {\n (function (global, factory) {\n factory(exports, React);\n })(commonjsGlobal, function (exports, React) {\n function _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () {\n return e[k];\n }\n });\n }\n });\n }\n\n n['default'] = e;\n return Object.freeze(n);\n }\n\n var React__namespace = /*#__PURE__*/_interopNamespace(React);\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n }\n\n var changedArray = function changedArray(a, b) {\n if (a === void 0) {\n a = [];\n }\n\n if (b === void 0) {\n b = [];\n }\n\n return a.length !== b.length || a.some(function (item, index) {\n return !Object.is(item, b[index]);\n });\n };\n\n var initialState = {\n error: null\n };\n\n var ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n _this.state = initialState;\n _this.updatedWithError = false;\n\n _this.resetErrorBoundary = function () {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);\n\n _this.reset();\n };\n\n return _this;\n }\n\n ErrorBoundary.getDerivedStateFromError = function getDerivedStateFromError(error) {\n return {\n error: error\n };\n };\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.reset = function reset() {\n this.updatedWithError = false;\n this.setState(initialState);\n };\n\n _proto.componentDidCatch = function componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n\n (_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error, info);\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var error = this.state.error;\n\n if (error !== null) {\n this.updatedWithError = true;\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var error = this.state.error;\n var resetKeys = this.props.resetKeys; // There's an edge case where if the thing that triggered the error\n // happens to *also* be in the resetKeys array, we'd end up resetting\n // the error boundary immediately. This would likely trigger a second\n // error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call\n // of cDU after the error is set\n\n if (error !== null && !this.updatedWithError) {\n this.updatedWithError = true;\n return;\n }\n\n if (error !== null && changedArray(prevProps.resetKeys, resetKeys)) {\n var _this$props$onResetKe, _this$props3;\n\n (_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);\n this.reset();\n }\n };\n\n _proto.render = function render() {\n var error = this.state.error;\n var _this$props4 = this.props,\n fallbackRender = _this$props4.fallbackRender,\n FallbackComponent = _this$props4.FallbackComponent,\n fallback = _this$props4.fallback;\n\n if (error !== null) {\n var _props = {\n error: error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n\n if ( /*#__PURE__*/React__namespace.isValidElement(fallback)) {\n return fallback;\n } else if (typeof fallbackRender === 'function') {\n return fallbackRender(_props);\n } else if (FallbackComponent) {\n return /*#__PURE__*/React__namespace.createElement(FallbackComponent, _props);\n } else {\n throw new Error('react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop');\n }\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n }(React__namespace.Component);\n\n function withErrorBoundary(Component, errorBoundaryProps) {\n var Wrapped = function Wrapped(props) {\n return /*#__PURE__*/React__namespace.createElement(ErrorBoundary, errorBoundaryProps, /*#__PURE__*/React__namespace.createElement(Component, props));\n }; // Format for display in DevTools\n\n\n var name = Component.displayName || Component.name || 'Unknown';\n Wrapped.displayName = \"withErrorBoundary(\" + name + \")\";\n return Wrapped;\n }\n\n function useErrorHandler(givenError) {\n var _React$useState = React__namespace.useState(null),\n error = _React$useState[0],\n setError = _React$useState[1];\n\n if (givenError != null) throw givenError;\n if (error != null) throw error;\n return setError;\n }\n /*\n eslint\n @typescript-eslint/no-throw-literal: \"off\",\n @typescript-eslint/prefer-nullish-coalescing: \"off\"\n */\n\n\n exports.ErrorBoundary = ErrorBoundary;\n exports.useErrorHandler = useErrorHandler;\n exports.withErrorBoundary = withErrorBoundary;\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n });\n})(reactErrorBoundary_umd, reactErrorBoundary_umd.exports);\n\nexport { classnames as c, reactErrorBoundary_umd as r };","import React, { useEffect, useRef, useCallback, useContext } from 'react';\nimport { defineMessages, T, L10NContext, t } from '@sm/intl';\nimport { createUseStyles } from 'react-jss';\nimport { visuallyHidden } from '@wds/utils';\nimport { c as classnames, r as reactErrorBoundary_umd } from './vendor-5c6709b4.js';\nimport { sanitizeString } from '@sm/utils';\n\nconst createFieldId = questionId => `question-field-${questionId}`;\n\nconst createLabelId = questionId => `question-title-${questionId}`;\n\nconst createErrorId = questionId => `${questionId}-validation-message`;\n\nconst useStyles$8 = createUseStyles(theme => {\n var _a;\n\n return {\n button: {\n color: theme.nextButton.color,\n backgroundColor: theme.nextButton.backgroundColor,\n fontFamily: (_a = theme.questionBody.fontFamily) !== null && _a !== void 0 ? _a : {},\n fontSize: 15,\n border: [1, 'solid', 'transparent'],\n borderRadius: 2,\n padding: [1, 6],\n maxWidth: '100%',\n minWidth: 60,\n minHeight: 40,\n cursor: 'pointer',\n overflowWrap: 'break-word'\n }\n };\n}); // This might need to be a prop later once confirmed\n\nconst MAX_LENGTH = 20;\n\nconst Button = ({\n text = 'OK',\n type,\n ...props\n}) => {\n const {\n button\n } = useStyles$8();\n const slicedText = text.length <= MAX_LENGTH ? text : text.slice(0, MAX_LENGTH);\n return (// This is disabled instead of creating a trivial ternary operator\n // eslint-disable-next-line react/button-has-type\n React.createElement(\"button\", Object.assign({}, props, {\n className: button,\n type: type\n }), slicedText)\n );\n};\n\nconst useStyles$7 = createUseStyles({\n visuallyHidden: visuallyHidden\n});\n\nconst VisuallyHidden = ({\n children,\n element: Element\n}) => {\n const {\n visuallyHidden\n } = useStyles$7();\n return React.createElement(Element, {\n className: visuallyHidden\n }, children);\n};\n\nconst useStyles$6 = createUseStyles({\n paddingBox: ({\n padding\n }) => {\n return {\n paddingTop: (padding === null || padding === void 0 ? void 0 : padding.top) || 0,\n paddingBottom: (padding === null || padding === void 0 ? void 0 : padding.bottom) || 0,\n paddingLeft: (padding === null || padding === void 0 ? void 0 : padding.left) || 0,\n paddingRight: (padding === null || padding === void 0 ? void 0 : padding.right) || 0\n };\n }\n});\n\nconst QuestionSpacing = ({\n padding,\n children\n}) => {\n const {\n paddingBox\n } = useStyles$6({\n padding\n });\n return React.createElement(\"div\", {\n className: paddingBox\n }, children);\n};\n/**\n * Hook that calls the provided callback function when the ref element is blurred,\n * only if the next focus is outside the ref element\n *\n * @example\n * const ref = useRef(null);\n * useOnFocusLeave(ref, ()=> onLeaveQuestion());\n * \n */\n\n\nfunction useOnFocusLeave(ref, focusCallback) {\n useEffect(() => {\n const ele = ref === null || ref === void 0 ? void 0 : ref.current;\n\n function handleFocus(e) {\n if (!(ele === null || ele === void 0 ? void 0 : ele.contains(e.relatedTarget))) {\n focusCallback(ref);\n }\n }\n\n ele === null || ele === void 0 ? void 0 : ele.addEventListener('focusout', handleFocus);\n return () => {\n ele === null || ele === void 0 ? void 0 : ele.removeEventListener('focusout', handleFocus);\n };\n }, [ref, focusCallback]);\n}\n\nconst useStyles$5 = createUseStyles({\n footerRow: ({\n hasFooterPadding\n }) => ({\n paddingTop: hasFooterPadding ? 20 : 0\n }),\n containerStyles: ({\n clickShield\n }) => ({\n position: 'relative',\n opacity: clickShield ? '0.5' : '1',\n transition: 'opacity 500ms ease-out',\n pointerEvents: clickShield ? 'none' : 'auto'\n }),\n errorRow: {\n marginBottom: 10\n },\n formReset: {\n border: 0,\n minWidth: 0\n },\n headerRow: {\n marginBottom: 24\n }\n});\nconst COPY$2 = defineMessages({\n QUESTION_TITLE: {\n id: 'ResponseQuestion.QUESTION_TITLE',\n defaultMessage: 'Question Title',\n description: '[Type: Label][Vis: low] - question landmark for screen readers only'\n }\n});\n\nconst QuestionFieldLayoutTemplate = ({\n footer,\n hasFooterPadding,\n children,\n clickShield,\n error,\n id,\n padding,\n title,\n onSubmit,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onLeave = () => {},\n ...props\n}) => {\n const {\n footerRow,\n containerStyles,\n formReset,\n errorRow,\n headerRow\n } = useStyles$5({\n hasFooterPadding,\n clickShield\n });\n const containerRef = useRef(null);\n const handleKeydown = useCallback(event => {\n if (event.key === 'Enter') {\n onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();\n }\n }, [onSubmit]);\n const fieldsetRef = useRef(null);\n useOnFocusLeave(fieldsetRef, onLeave);\n useEffect(() => {\n const {\n current: container\n } = containerRef;\n container === null || container === void 0 ? void 0 : container.addEventListener('keydown', handleKeydown);\n return () => {\n return container === null || container === void 0 ? void 0 : container.removeEventListener('keydown', handleKeydown);\n };\n }, [containerRef, handleKeydown]);\n return React.createElement(\"div\", Object.assign({\n ref: containerRef,\n id: id\n }, props, {\n className: containerStyles\n }), React.createElement(VisuallyHidden, {\n element: \"h3\"\n }, React.createElement(T, {\n desc: COPY$2.QUESTION_TITLE\n })), React.createElement(QuestionSpacing, {\n padding: padding\n }, React.createElement(\"fieldset\", {\n ref: fieldsetRef,\n className: formReset\n }, React.createElement(\"legend\", {\n className: headerRow\n }, error && React.createElement(\"div\", {\n className: errorRow\n }, error), title), children), footer && React.createElement(\"div\", {\n className: footerRow\n }, footer)));\n};\n\ncreateUseStyles(theme => ({\n containerVertical: {\n display: 'initial'\n },\n containerHorizontal: {\n display: 'block'\n },\n\n /** shared between horizontal and vertical columns */\n column: {\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'flex-start'\n },\n columnHorizontal: {},\n\n /** Horizontal Column that adjust width to content width */\n columnHorizontalAutoAdjust: {\n width: 'auto'\n },\n [`@media (min-width: ${theme.breakpoints.xs.min})`]: {\n containerVertical: {\n display: 'flex'\n },\n containerHorizontal: {\n display: 'flex',\n flexWrap: 'wrap'\n }\n },\n [`@media only screen and (min-width: ${theme.breakpoints.lg.min})`]: {\n columnHorizontal: {\n width: '19%'\n }\n },\n [`@media (min-width: ${theme.breakpoints.sm.min}) and (max-width: ${theme.breakpoints.md.max})`]: {\n columnHorizontal: {\n width: '24%'\n }\n },\n [`@media only screen and (max-width: ${theme.breakpoints.xxs.max})`]: {\n columnHorizontal: {\n width: '100%',\n display: 'block'\n },\n columnHorizontalAutoAdjust: {\n width: '100%',\n display: 'block'\n }\n },\n answerLayoutCell: {\n flex: [0, 0, 'auto'] // fix for IE11 - images leaking out of label container\n\n }\n}));\nconst textReset = {\n margin: 0\n};\nconst useStyles$4 = createUseStyles(theme => {\n const {\n fontSize,\n ...questionTitleFormatting\n } = theme.questionTitle;\n const questionTitleFontSize = theme.isAccessible ? '22px' : fontSize !== null && fontSize !== void 0 ? fontSize : {};\n return {\n addonContainer: {\n display: 'inline-block',\n margin: [0, 5],\n verticalAlign: 'text-bottom'\n },\n container: {\n position: 'relative'\n },\n questionNumber: ({\n isRTL\n }) => ({\n margin: isRTL ? '0 0 0 0.25em' : '0 0.25em 0 0'\n }),\n questionTitle: ({\n useDefaultFrontSize\n }) => {\n var _a;\n\n return { ...textReset,\n ...questionTitleFormatting,\n color: ((_a = theme.questionTitle) === null || _a === void 0 ? void 0 : _a.color) || theme.questionColor,\n fontSize: useDefaultFrontSize && !theme.isAccessible ? theme.fontSize.body : questionTitleFontSize,\n lineHeight: 1.25,\n whiteSpace: 'normal',\n wordWrap: 'break-word'\n };\n },\n requiredAsterisk: ({\n isRTL\n }) => ({\n display: 'inline-block',\n margin: isRTL ? '0 0 0 0.25em' : '0 0.25em 0 0'\n })\n };\n});\n/* eslint-disable @typescript-eslint/naming-convention */\n\nconst listSpacing = {\n margin: [16, 0],\n padding: [0, 0, 0, 40]\n};\nconst mediaReset = {\n border: 0,\n maxWidth: '100%'\n};\nconst useStyles$3 = createUseStyles({\n richTextContent: {\n // Typography\n '& a': {\n // Links are not themed by default. Users must select a link color in the editor\n color: 'blue',\n textDecoration: 'underline',\n '&:hover': {\n cursor: 'pointer'\n },\n '&:focus': {\n outline: 'currentColor auto 1px'\n }\n },\n '& ol': { ...listSpacing,\n listStyleType: 'decimal'\n },\n '& ul': { ...listSpacing,\n listStyle: 'disc outside none',\n '& ul li': {\n listStyle: 'circle'\n }\n },\n '& p': {\n margin: [13, 0]\n },\n '& b': {\n fontWeight: 'bold'\n },\n '& strong': {\n fontWeight: 'bold'\n },\n '& em': {\n fontStyle: 'italic'\n },\n '& i': {\n fontStyle: 'italic'\n },\n '& big': {\n fontSize: 'larger'\n },\n '& small': {\n fontSize: 'smaller'\n },\n '& sup': {\n fontSize: '75%',\n lineHeight: 0,\n position: 'relative',\n top: '-0.5em',\n verticalAlign: 'baseline'\n },\n // Media embeds\n '& iframe': mediaReset,\n '& img': { ...mediaReset,\n height: 'auto',\n '-ms-interpolation-mode': 'bicubic'\n }\n }\n}); // Support iframe video embeds and their matching attributes\n\nconst sanitizeOptions = {\n ADD_TAGS: ['iframe'],\n ADD_ATTR: ['target', 'allow', 'allowfullscreen', 'frameborder', 'sandbox', 'scrolling']\n};\n\nconst RichText = ({\n element: Element,\n text\n}) => {\n const {\n richTextContent\n } = useStyles$3();\n return React.createElement(Element, {\n className: richTextContent,\n dangerouslySetInnerHTML: {\n __html: sanitizeString(text, sanitizeOptions)\n }\n });\n};\n\nconst QuestionTitle = ({\n addon,\n heading,\n id,\n number,\n numbered,\n required,\n useDefaultFrontSize = false,\n ...props\n}) => {\n const {\n isRTL\n } = useContext(L10NContext);\n const {\n addonContainer,\n container,\n questionNumber,\n questionTitle,\n requiredAsterisk\n } = useStyles$4({\n useDefaultFrontSize,\n isRTL\n });\n return React.createElement(\"h4\", Object.assign({\n id: id,\n className: classnames(container, questionTitle),\n translate: \"no\"\n }, props), required && React.createElement(\"span\", {\n \"aria-hidden\": true,\n className: requiredAsterisk\n }, \"*\"), numbered && React.createElement(\"span\", {\n className: questionNumber\n }, number, \".\"), React.createElement(RichText, {\n element: \"span\",\n text: heading\n }), addon && React.createElement(\"span\", {\n className: addonContainer\n }, addon));\n};\n\nconst useStyles$2 = createUseStyles(theme => {\n var _a;\n\n return {\n icon: {\n backgroundClip: 'padding-box',\n backgroundColor: theme.primaryAccentColor,\n borderRadius: 3,\n color: theme.secondaryAccentColor,\n fontSize: theme.fontSize.body,\n padding: [0, 5]\n },\n iconWrapper: {\n marginRight: 5\n },\n validationMessage: {\n fontFamily: (_a = theme.questionBody.fontFamily) !== null && _a !== void 0 ? _a : {},\n lineHeight: 1.5,\n color: theme.questionBody.color,\n fontWeight: theme.fontWeight.light,\n fontSize: theme.fontSize.body\n }\n };\n});\n\nconst ValidationMessage = ({\n children,\n id,\n ...props\n}) => {\n const {\n icon,\n iconWrapper,\n validationMessage\n } = useStyles$2();\n return React.createElement(\"h4\", Object.assign({\n className: validationMessage,\n \"aria-live\": \"polite\",\n id: id\n }, props), React.createElement(\"span\", {\n className: iconWrapper\n }, React.createElement(\"span\", {\n \"aria-hidden\": \"true\",\n className: icon\n }, \"!\")), React.createElement(\"span\", null, children));\n};\n\nconst useStyles$1 = createUseStyles(theme => {\n var _a;\n\n return {\n textareaStyles: {\n fontFamily: (_a = theme.questionBody.fontFamily) !== null && _a !== void 0 ? _a : {},\n fontSize: '18px',\n lineHeight: '1.15em',\n padding: '6px 60px 6px 6px',\n maxWidth: '100%',\n color: theme.questionBody.color,\n outlineColor: theme.primaryAccentColor,\n transition: 'all 0.1s linear',\n verticalAlign: 'top',\n textSizeAdjust: 'auto',\n ...(theme.isAccessible ? {\n fontWeight: 500,\n opacity: 1,\n border: `1px solid ${theme.answerColor}`,\n backgroundColor: '#fff'\n } : {\n fontWeight: 300,\n backgroundColor: theme.input.bgColor,\n border: '0'\n }),\n '&:focus': {\n borderColor: theme.input.activeColor,\n borderRadius: '2px'\n },\n '&:focus, &:hover': theme.isAccessible ? {\n // should be there but was broken\n // https://code.corp.surveymonkey.com/devmonkeys/smlib.surveytemplates/blob/main/smlib/surveytemplates/themes_v3/base_css.jinja2#L1094-L1097\n boxShadow: '0px 2px 8px rgba(0, 0, 0, 7)'\n } : {},\n '&:disabled, &:read-only': {\n boxShadow: 'none',\n ...(theme.isAccessible ? {} : {\n borderColor: 'transparent',\n opacity: 0.5\n })\n }\n },\n [`@media only screen and (max-width: ${theme.breakpoints.md.max})`]: {\n textareaStyles: {\n fontSize: '16px'\n }\n }\n };\n}); // Custom textarea component for Response.\n\nconst TextArea = ({\n placeholder,\n disabled,\n rows,\n cols,\n id,\n name,\n defaultValue,\n labelId,\n errorId,\n required = false,\n readOnly = false,\n onChange,\n onBlur,\n onFocus\n}) => {\n const {\n textareaStyles\n } = useStyles$1();\n return React.createElement(\"textarea\", {\n className: textareaStyles,\n placeholder: placeholder,\n disabled: disabled,\n rows: rows,\n cols: cols,\n id: id,\n name: name,\n defaultValue: defaultValue,\n \"aria-labelledby\": labelId,\n \"aria-describedby\": errorId,\n \"aria-required\": required,\n onChange: onChange,\n onBlur: onBlur,\n onFocus: onFocus,\n spellCheck: true,\n readOnly: readOnly\n });\n};\n\nconst useStyles = createUseStyles(theme => {\n var _a;\n\n return {\n inputStyles: {\n fontFamily: (_a = theme.questionBody.fontFamily) !== null && _a !== void 0 ? _a : {},\n fontSize: '18px',\n lineHeight: '1.5em',\n height: ({\n autoHeight\n }) => autoHeight ? {} : '50px',\n padding: '6px',\n maxWidth: '100%',\n color: theme.questionBody.color,\n transition: 'all 0.1s linear',\n ...(theme.isAccessible ? {\n fontWeight: 500,\n opacity: 1,\n border: theme.isAccessible ? `1px solid ${theme.answerColor}` : '0',\n backgroundColor: '#fff'\n } : {\n fontWeight: 300,\n backgroundColor: theme.input.bgColor,\n border: '0'\n }),\n '&:focus': {\n outline: 'none',\n borderColor: theme.input.activeColor,\n borderRadius: '2px'\n },\n '&:focus, &:hover': { ...(theme.isAccessible ? {\n // should be there but was broken\n // https://code.corp.surveymonkey.com/devmonkeys/smlib.surveytemplates/blob/main/smlib/surveytemplates/themes_v3/base_css.jinja2#L1094-L1097\n boxShadow: '0px 2px 8px rgba(0, 0, 0, 7)'\n } : {})\n },\n '&:disabled, &:read-only': {\n boxShadow: 'none',\n ...(theme.isAccessible ? {} : {\n borderColor: 'transparent',\n opacity: 0.5\n })\n }\n },\n [`@media only screen and (max-width: ${theme.breakpoints.md.max})`]: {\n inputStyles: {\n fontSize: '16px'\n }\n }\n };\n});\n\nconst TextInput = ({\n disabled,\n errorId,\n id,\n labelId,\n name,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n required = false,\n readOnly = false,\n autoHeight = false,\n value,\n size = 50\n}) => {\n const {\n inputStyles\n } = useStyles({\n autoHeight\n });\n return React.createElement(\"input\", {\n type: \"text\",\n className: inputStyles,\n placeholder: placeholder,\n disabled: disabled,\n size: size,\n id: id,\n name: name,\n value: value,\n onChange: onChange,\n onBlur: onBlur,\n onFocus: onFocus,\n \"aria-labelledby\": labelId,\n \"aria-describedby\": errorId,\n \"aria-required\": required,\n readOnly: readOnly\n });\n};\n\nconst ErrorFallback = ({\n error\n}) => {\n // TODO: temporary fallback ui (RAWR-773)\n return React.createElement(React.Fragment, null, React.createElement(\"h1\", null, \"Sorry.. there was an error\"), React.createElement(\"p\", null, error.message));\n};\n\nconst withErrorBoundary = Component => {\n return props => React.createElement(reactErrorBoundary_umd.exports.ErrorBoundary, {\n FallbackComponent: ErrorFallback\n }, React.createElement(Component, Object.assign({}, props)));\n};\n\nconst COPY$1 = defineMessages({\n OK_LABEL: {\n id: 'SingleTextBox.OK_LABEL',\n defaultMessage: 'OK',\n description: '[Type: button][Vis: high] - question ok label'\n }\n});\n\nconst QuestionField = ({\n active,\n disabled,\n error,\n title,\n onSubmit,\n onChange,\n onLeave,\n padding = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n },\n questionId,\n questionNumber,\n required,\n survey: {\n asteriskEnabled,\n numberingEnabled\n },\n value,\n okLabel = t(COPY$1.OK_LABEL),\n variant,\n ...conditionalProps\n}) => {\n const titleId = createLabelId(questionId);\n const errorId = createErrorId(questionId);\n const fieldId = createFieldId(questionId);\n const isAutoScroll = variant === 'auto-scroll';\n const showClickShield = isAutoScroll && !active; // Requires more conditional logic on integration with RAWR-109 form manager\n\n const showButton = isAutoScroll && active && 'showOkButton' in conditionalProps && conditionalProps.showOkButton;\n return React.createElement(\"div\", null, React.createElement(QuestionFieldLayoutTemplate, {\n footer: showButton && React.createElement(Button, {\n text: okLabel,\n type: \"button\",\n onClick: onSubmit\n }),\n hasFooterPadding: true,\n clickShield: showClickShield,\n error: error && React.createElement(ValidationMessage, {\n id: errorId\n }, error),\n onLeave: onLeave,\n id: fieldId,\n padding: padding,\n title: React.createElement(QuestionTitle, {\n heading: title,\n id: titleId,\n number: questionNumber,\n numbered: numberingEnabled,\n required: asteriskEnabled && required\n })\n }, React.createElement(TextInput, {\n value: value,\n disabled: disabled,\n errorId: error && errorId,\n id: questionId,\n labelId: titleId,\n name: questionId,\n required: required,\n onChange: event => onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value)\n })));\n};\n\nvar SingleTextbox = withErrorBoundary(QuestionField);\nconst COPY = defineMessages({\n OK_LABEL: {\n id: 'CommentBox.OK_LABEL',\n defaultMessage: 'OK',\n description: '[Type: button][Vis: high] - question ok label'\n }\n});\n\nconst CommentBox = ({\n active,\n cols = 50,\n disabled,\n error,\n title,\n onSubmit,\n onChange,\n onLeave,\n padding = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n },\n questionId,\n questionNumber,\n required,\n rows = 3,\n survey: {\n asteriskEnabled,\n numberingEnabled\n },\n value: defaultValue,\n okLabel = t(COPY.OK_LABEL),\n variant,\n ...conditionalProps\n}) => {\n const titleId = createLabelId(questionId);\n const errorId = createErrorId(questionId);\n const fieldId = createFieldId(questionId);\n const isAutoScroll = variant === 'auto-scroll';\n const showClickShield = isAutoScroll && !active; // // Requires more conditional logic on integration with RAWR-109 form manager\n\n const showButton = isAutoScroll && active && 'showOkButton' in conditionalProps && conditionalProps.showOkButton;\n return React.createElement(QuestionFieldLayoutTemplate, {\n footer: showButton && React.createElement(Button, {\n text: okLabel,\n type: \"button\",\n onClick: onSubmit\n }),\n hasFooterPadding: true,\n clickShield: showClickShield,\n error: error && React.createElement(ValidationMessage, {\n id: errorId\n }, error),\n onLeave: onLeave,\n id: fieldId,\n padding: padding,\n title: React.createElement(QuestionTitle, {\n heading: title,\n id: titleId,\n number: questionNumber,\n numbered: numberingEnabled,\n required: asteriskEnabled && required\n })\n }, React.createElement(TextArea, {\n cols: cols,\n defaultValue: defaultValue,\n disabled: disabled,\n errorId: error && errorId,\n id: questionId,\n labelId: titleId,\n name: questionId,\n required: required,\n rows: rows,\n onChange: event => onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value)\n }));\n};\n\nvar CommentBox$1 = withErrorBoundary(CommentBox);\nexport { CommentBox$1 as CommentBox, SingleTextbox };","import React, { useMemo } from 'react';\nimport { selectQuestionTypeDefinition, isExternalQuestionWithTypeId } from '@sm/question-definitions';\nimport { w as withErrorBoundary, u as useProviderAccessContext, a as useExternalQuestionAugmentation, c as createVisualization } from './utils-c442d71f.js';\n\nconst UnsupportedQuestionTypeError = ({\n question\n}) => {\n const typeId = isExternalQuestionWithTypeId(question) && question.typeId;\n return React.createElement(\"div\", null, \"Unsupported Question Type: \", typeId);\n};\n\nconst SingleQuestionController = ({\n question: externalQuestion,\n displayOptions,\n namedSlots,\n responseSet\n}) => {\n const {\n useUpstreamConfig,\n useVisualizationList\n } = useProviderAccessContext();\n const {\n capability,\n upstreamActions,\n renderProps,\n settings\n } = useUpstreamConfig();\n /* NOTE:\n Since Controllers are expected to be capability-independent -- and should not import\n the CapabilityProvider types -- this config is returning the type params as `unknown`s.\n This shouldn't be a problem -- as the Controller doesn't need to know\n any specifics about these types - other than passing them to the compatible\n Visualizations (something that the Visualization Helpers runtime already takes\n care of). However, the consequence is that overall type safety of the Controller\n is not as strict as we would like it to be. We should probably create a task\n to improve this later.\n */\n // TODO: add controller type to the visualization selection -- to allow for different DisplayOptions and better support for nested visualizations\n\n const visualizationOptions = useVisualizationList(capability\n /* , controllerType */\n ); // Augment the external question with the type id\n\n const augmentedExternalQuestion = useExternalQuestionAugmentation(externalQuestion, responseSet);\n const definition = selectQuestionTypeDefinition(augmentedExternalQuestion);\n const ChosenVisualization = useMemo(() => {\n if (!definition) {\n return null;\n } // Is this React.memo necessary?\n\n\n return React.memo(createVisualization(capability, definition.typeId, visualizationOptions, upstreamActions, settings, renderProps)); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [//* * Revisit / Hoist */\n // capability, // causes constant re-renders\n definition === null || definition === void 0 ? void 0 : definition.typeId // settings, // causes constant re-renders\n // renderProps, // causes constant re-renders\n // definition, // causes constant re-renders\n // upstreamActions, // causes constant re-renders\n // visualizationOptions, // causes constant re-renders\n ]);\n\n if (ChosenVisualization === null || !definition) {\n return React.createElement(UnsupportedQuestionTypeError, {\n question: augmentedExternalQuestion\n });\n }\n\n const toExternalQuestion = q => definition.toExternalQuestion(externalQuestion, q, capability);\n /* NOTE:\n Type safety improvement: Currently 'QuestionType' is all the possible question types\n -- while createVisualization will choose a visualization that can render\n question types for a specific capability -- meaning that the resulting question\n type of 'ChosenVisualization' is a subset of all the possible QuestionTypes\n (only those that have viable visualizations for that capability -- and, in the\n future, ControllerType)\n */\n\n\n const question = definition.fromExternalQuestion(augmentedExternalQuestion, capability);\n return React.createElement(ChosenVisualization, {\n question: question,\n displayOptions: displayOptions,\n namedSlots: namedSlots,\n toExternalQuestion: toExternalQuestion\n });\n};\n\nvar SingleQuestionController$1 = withErrorBoundary(SingleQuestionController);\nexport { SingleQuestionController$1 as S };","import React, { useState, useEffect, useMemo, useRef, useCallback } from 'react';\nimport { SurveyThemeWrapper } from '@sm/question-ui/theme-respondent';\nimport { d as declareVisualization, i as isLocalError, b as isRequired, p as providerFactory } from './utils-c442d71f.js';\nimport { pickQuestionTypeDefinition } from '@sm/question-definitions';\nimport { CommentBox, SingleTextbox } from '@sm/question-ui/respondent-survey';\nexport { S as SingleQuestionController } from './controllers-bbf80d91.js';\nimport './vendor-4368c290.js';\n\nconst useShowOkButton = (active, touched) => {\n const [showOkButton, setShowOkButton] = useState(false);\n useEffect(() => {\n if (!active) {\n setShowOkButton(false);\n } else if (touched) {\n setShowOkButton(true);\n }\n }, [active, touched, setShowOkButton]);\n return showOkButton;\n}; // Visualization for Question of type CommentBox\n\n\nconst RespondentCommentBoxVisualization = ({\n // capability,\n upstreamActions,\n question,\n settings: {\n survey\n },\n toExternalQuestion,\n displayOptions\n}) => {\n var _a, _b;\n\n const {\n id,\n typeId,\n questionNumber,\n title,\n layout,\n disabled\n } = question;\n const {\n active,\n errors: upstreamErrors,\n registerValidator,\n unregisterValidator\n } = displayOptions || {};\n const upstreamAnswer = displayOptions === null || displayOptions === void 0 ? void 0 : displayOptions.answer;\n const definition = useMemo(() => pickQuestionTypeDefinition(typeId), [typeId]);\n const padding = (_a = layout === null || layout === void 0 ? void 0 : layout.spacing) !== null && _a !== void 0 ? _a : {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n };\n const error = (upstreamErrors !== null && upstreamErrors !== void 0 ? upstreamErrors : []).find(isLocalError);\n const [answer, setAnswer] = useState({\n value: (_b = upstreamAnswer === null || upstreamAnswer === void 0 ? void 0 : upstreamAnswer.value) !== null && _b !== void 0 ? _b : '',\n touched: !!(upstreamAnswer === null || upstreamAnswer === void 0 ? void 0 : upstreamAnswer.touched),\n isDirty: !!(upstreamAnswer === null || upstreamAnswer === void 0 ? void 0 : upstreamAnswer.isDirty),\n questionId: id\n });\n const validationFunction = useRef();\n validationFunction.current = useCallback(() => {\n var _a, _b;\n\n return (_b = (_a = definition.validate({ ...question,\n answer\n }, 'respondent-survey')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;\n }, [definition, answer, question]);\n useEffect(() => {\n if (registerValidator) {\n registerValidator(id, [() => {\n if (!validationFunction.current) {\n return null;\n }\n\n return validationFunction.current();\n }]);\n }\n\n return () => unregisterValidator === null || unregisterValidator === void 0 ? void 0 : unregisterValidator(id);\n }, [id, registerValidator, unregisterValidator]);\n const showOkButton = useShowOkButton(!!active, answer.touched);\n const onLeaveQuestion = useCallback(() => {\n if (upstreamActions.onLeaveQuestion) {\n upstreamActions.onLeaveQuestion(toExternalQuestion(question), answer);\n }\n }, [question, upstreamActions, answer, toExternalQuestion]);\n const surveyModeOptions = survey.isClassic ? {\n variant: 'classic'\n } : {\n variant: 'auto-scroll',\n active: !!active,\n showOkButton,\n onSubmit: displayOptions === null || displayOptions === void 0 ? void 0 : displayOptions.onSubmit\n };\n return React.createElement(CommentBox, Object.assign({}, surveyModeOptions, {\n title,\n padding,\n disabled,\n survey\n }, {\n questionId: id,\n questionNumber: Number(questionNumber),\n required: isRequired(question),\n error: error === null || error === void 0 ? void 0 : error.message,\n value: answer === null || answer === void 0 ? void 0 : answer.value,\n okLabel: survey.okLabel,\n onLeave: onLeaveQuestion,\n onChange: value => {\n setAnswer({\n touched: true,\n questionId: id,\n value,\n isDirty: value !== (upstreamAnswer === null || upstreamAnswer === void 0 ? void 0 : upstreamAnswer.value)\n });\n }\n }));\n};\n\nvar AnswerCommentBoxVisualization = declareVisualization(['comment_box'], ['respondent-survey'], RespondentCommentBoxVisualization); // Visualization for Question of type SingleTextbox\n\nconst RespondentSingleTextboxVisualization = ({\n // capability,\n upstreamActions,\n question,\n settings: {\n survey\n },\n toExternalQuestion,\n displayOptions\n}) => {\n var _a, _b;\n\n const {\n id,\n typeId,\n questionNumber,\n title,\n layout,\n disabled\n } = question;\n const {\n active,\n errors: upstreamErrors,\n registerValidator,\n unregisterValidator\n } = displayOptions || {};\n const upstreamAnswer = displayOptions === null || displayOptions === void 0 ? void 0 : displayOptions.answer;\n const definition = useMemo(() => pickQuestionTypeDefinition(typeId), [typeId]);\n const padding = (_a = layout === null || layout === void 0 ? void 0 : layout.spacing) !== null && _a !== void 0 ? _a : {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n };\n const error = (upstreamErrors !== null && upstreamErrors !== void 0 ? upstreamErrors : []).find(isLocalError);\n const [answer, setAnswer] = useState({\n value: (_b = upstreamAnswer === null || upstreamAnswer === void 0 ? void 0 : upstreamAnswer.value) !== null && _b !== void 0 ? _b : '',\n touched: !!(upstreamAnswer === null || upstreamAnswer === void 0 ? void 0 : upstreamAnswer.touched),\n isDirty: !!(upstreamAnswer === null || upstreamAnswer === void 0 ? void 0 : upstreamAnswer.isDirty),\n questionId: id\n });\n const validationFunction = useRef();\n validationFunction.current = useCallback(() => {\n var _a, _b;\n\n return (_b = (_a = definition.validate({ ...question,\n answer\n }, 'respondent-survey')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;\n }, [definition, answer, question]);\n useEffect(() => {\n if (registerValidator) {\n registerValidator(id, [() => {\n if (!validationFunction.current) {\n return null;\n }\n\n return validationFunction.current();\n }]);\n }\n\n return () => unregisterValidator === null || unregisterValidator === void 0 ? void 0 : unregisterValidator(id);\n }, [id, registerValidator, unregisterValidator]);\n const showOkButton = useShowOkButton(!!active, answer.touched);\n const onLeaveQuestion = useCallback(() => {\n if (upstreamActions.onLeaveQuestion) {\n upstreamActions.onLeaveQuestion(toExternalQuestion(question), answer);\n }\n }, [question, upstreamActions, answer, toExternalQuestion]);\n const surveyModeOptions = survey.isClassic ? {\n variant: 'classic'\n } : {\n variant: 'auto-scroll',\n active: !!active,\n showOkButton,\n onSubmit: displayOptions === null || displayOptions === void 0 ? void 0 : displayOptions.onSubmit\n };\n return React.createElement(SingleTextbox, Object.assign({}, surveyModeOptions, {\n title,\n padding,\n disabled,\n survey\n }, {\n questionId: id,\n questionNumber: Number(questionNumber),\n required: isRequired(question),\n error: error === null || error === void 0 ? void 0 : error.message,\n value: answer.value,\n okLabel: survey.okLabel,\n onLeave: onLeaveQuestion,\n onChange: value => {\n setAnswer({\n touched: true,\n questionId: id,\n value,\n isDirty: value !== (upstreamAnswer === null || upstreamAnswer === void 0 ? void 0 : upstreamAnswer.value)\n });\n }\n }));\n};\n\nvar AnswerSingleTextboxVisualization = declareVisualization(['single_textbox'], ['respondent-survey'], RespondentSingleTextboxVisualization);\nvar visualizationList = [AnswerSingleTextboxVisualization, AnswerCommentBoxVisualization]; // Creates the helper to store the configuration\n\nconst ProviderHelper = providerFactory(visualizationList); // Declares the Provider Component itself, with the proper API\n\nconst RespondentCapabilityProvider = ({\n upstreamActions,\n settings,\n children,\n renderProps\n}) => {\n // here you can keep capability-specific state, translate actions or make other modifications\n // that are appropriate to your capability-specific behaviour\n return React.createElement(ProviderHelper, {\n value: {\n capability: 'respondent-survey',\n upstreamActions,\n renderProps,\n settings\n }\n }, React.createElement(SurveyThemeWrapper, null, children));\n};\n\nexport { RespondentCapabilityProvider, visualizationList as RespondentVisualizations };","import React from 'react';\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar reactErrorBoundary_umd = {\n exports: {}\n};\n\n(function (module, exports) {\n (function (global, factory) {\n factory(exports, React);\n })(commonjsGlobal, function (exports, React) {\n function _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () {\n return e[k];\n }\n });\n }\n });\n }\n\n n['default'] = e;\n return Object.freeze(n);\n }\n\n var React__namespace = /*#__PURE__*/_interopNamespace(React);\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n }\n\n var changedArray = function changedArray(a, b) {\n if (a === void 0) {\n a = [];\n }\n\n if (b === void 0) {\n b = [];\n }\n\n return a.length !== b.length || a.some(function (item, index) {\n return !Object.is(item, b[index]);\n });\n };\n\n var initialState = {\n error: null\n };\n\n var ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n _this.state = initialState;\n _this.updatedWithError = false;\n\n _this.resetErrorBoundary = function () {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);\n\n _this.reset();\n };\n\n return _this;\n }\n\n ErrorBoundary.getDerivedStateFromError = function getDerivedStateFromError(error) {\n return {\n error: error\n };\n };\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.reset = function reset() {\n this.updatedWithError = false;\n this.setState(initialState);\n };\n\n _proto.componentDidCatch = function componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n\n (_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error, info);\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var error = this.state.error;\n\n if (error !== null) {\n this.updatedWithError = true;\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var error = this.state.error;\n var resetKeys = this.props.resetKeys; // There's an edge case where if the thing that triggered the error\n // happens to *also* be in the resetKeys array, we'd end up resetting\n // the error boundary immediately. This would likely trigger a second\n // error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call\n // of cDU after the error is set\n\n if (error !== null && !this.updatedWithError) {\n this.updatedWithError = true;\n return;\n }\n\n if (error !== null && changedArray(prevProps.resetKeys, resetKeys)) {\n var _this$props$onResetKe, _this$props3;\n\n (_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);\n this.reset();\n }\n };\n\n _proto.render = function render() {\n var error = this.state.error;\n var _this$props4 = this.props,\n fallbackRender = _this$props4.fallbackRender,\n FallbackComponent = _this$props4.FallbackComponent,\n fallback = _this$props4.fallback;\n\n if (error !== null) {\n var _props = {\n error: error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n\n if ( /*#__PURE__*/React__namespace.isValidElement(fallback)) {\n return fallback;\n } else if (typeof fallbackRender === 'function') {\n return fallbackRender(_props);\n } else if (FallbackComponent) {\n return /*#__PURE__*/React__namespace.createElement(FallbackComponent, _props);\n } else {\n throw new Error('react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop');\n }\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n }(React__namespace.Component);\n\n function withErrorBoundary(Component, errorBoundaryProps) {\n var Wrapped = function Wrapped(props) {\n return /*#__PURE__*/React__namespace.createElement(ErrorBoundary, errorBoundaryProps, /*#__PURE__*/React__namespace.createElement(Component, props));\n }; // Format for display in DevTools\n\n\n var name = Component.displayName || Component.name || 'Unknown';\n Wrapped.displayName = \"withErrorBoundary(\" + name + \")\";\n return Wrapped;\n }\n\n function useErrorHandler(givenError) {\n var _React$useState = React__namespace.useState(null),\n error = _React$useState[0],\n setError = _React$useState[1];\n\n if (givenError != null) throw givenError;\n if (error != null) throw error;\n return setError;\n }\n /*\n eslint\n @typescript-eslint/no-throw-literal: \"off\",\n @typescript-eslint/prefer-nullish-coalescing: \"off\"\n */\n\n\n exports.ErrorBoundary = ErrorBoundary;\n exports.useErrorHandler = useErrorHandler;\n exports.withErrorBoundary = withErrorBoundary;\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n });\n})(reactErrorBoundary_umd, reactErrorBoundary_umd.exports);\n\nexport { reactErrorBoundary_umd as r };"],"names":["Object","defineProperty","exports","value","default","createBrowserApolloClient","_ref","fragmentMatcherFn","metadata","pageRequestId","_ref$cacheHydration","cacheHydration","_ref$uri","uri","_ref$linkOptions","linkOptions","_ref$devToolsEnabled","devToolsEnabled","_ref$availableLoggedO","availableLoggedOutPaths","authLink","appName","appVersion","cache","_apolloCacheInmemory","InMemoryCache","fragmentMatcher","restore","_linkOptions$headers","headers","otherLinkOptions","_objectWithoutProperties","source","excluded","key","i","target","_objectWithoutPropertiesLoose","sourceKeys","keys","length","indexOf","getOwnPropertySymbols","sourceSymbolKeys","prototype","propertyIsEnumerable","call","apolloLinkMemoizeCache","link","_apolloLink","ApolloLink","operation","_operation$getContext","_operation$getContext2","targetPath","getContext","graphQLPath","includes","apolloLinkFactory","arguments","undefined","DEFAULT_TARGET_PATH","_apolloLinkBatchHttp","BatchHttpLink","_objectSpread","DEFAULT_LINK_OPTIONS","concat","request","Observable","of","_apolloClient","connectToDevTools","name","version","_interopRequireDefault","obj","__esModule","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","configurable","writable","credentials","batchInterval","module","dateTimeFormat","isBrowser","getClientEnvironmentDetails","numberFormat","reduce","acc","style","currency","timeZone","Intl","DateTimeFormat","resolvedOptions","err","window","setTimeout","_default","number","dateTime","relativeTime","defineMessages","v","t","desc","values","opts","id","defaultMessage","html","getHTML","get","T","FormattedDateTime","props","_options$currentLocal","restProps","_excluded","options","getOptionsObject","currentLocale","_formats","format","_react","_interopRequireWildcard","nodeInterop","_getRequireWildcardCache","has","newObj","hasPropertyDescriptor","hasOwnProperty","set","_propTypes","_intlMessageformat","_escapeHtml","_lodash","_utils","_locale","_intlRelativeformat","_excluded2","WeakMap","cacheBabelInterop","cacheNodeInterop","_defineProperties","descriptor","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","e","_createSuperInternal","result","Super","_getPrototypeOf","NewTarget","this","constructor","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","getPrototypeOf","_slicedToArray","arr","_arrayWithHoles","Array","isArray","_iterableToArrayLimit","_i","Symbol","iterator","_s","_e","_arr","_n","_d","next","done","_unsupportedIterableToArray","_nonIterableRest","TypeError","_toConsumableArray","_arrayWithoutHoles","_arrayLikeToArray","_iterableToArray","iter","from","_nonIterableSpread","minLen","n","toString","slice","test","len","arr2","intlRelativeFormat","INTL_OPT_KEY","INTL_MSG_STORE_KEY","getStore","glob","g","getDefaultOptions","warningHandler","console","warn","bind","escapeHtml","randomStr","N","map","Math","random","join","keysOf","replacer","elements","part","substitute","message","variables","counter","vars","msg","uid","abs","hashInput","input","hash","charCodeAt","JSON","stringify","tokenDelimiter","tokenizedValues","generateToken","isValidElement","token","isString","s","String","formats","context","error","stack","exhausted","runningIndex","match","substr","_ref2","matched","tag","matchIndex","index","popped","pop","content","substring","replace","children","split","element","cloneElement","tokenReplacement","invariant","_getOptionsObject","messages","el","createElement","dangerouslySetInnerHTML","__html","defaultMsg","d","defineIntlRelativeFormat","currentLanguage","ReactIntlLocaleData","localeData","__addLocaleData","initIntl","messageStore","langInited","propTypes","shape","string","isRequired","description","objectOf","any","bool","defaultProps","L10NContext","createContext","isRTL","RTLLanguageCodes","LANGUAGES","l","code","L10nProvider","_React$Component","_inherits","subClass","superClass","create","_super","_this","_classCallCheck","instance","Constructor","state","localeCode","languageCode","getMessages","isNode","_createClass","protoProps","staticProps","componentDidUpdate","prevProps","setState","localeMessages","render","Provider","__self","__source","fileName","lineNumber","columnNumber","Component","node","getDataCenterById","getDataCenterIdFromCurrentUrl","url","dataCenterAffinityCookie","subdomain","parseResult","_parseDomain","parseDomain","fromUrl","dataCenterId","DataCenterIds","US","type","ParseResultType","Listed","subDomains","dcSub","_dataCenters","dataCenterSpecificSubdomains","find","subSpecific","endsWith","CA","getDefaultSubdomainForDataCenter","dc","defaultSubdomain","DC_SPECIFIC_SUBDOMAINS","dataCenters","EU","sanitizeCountryCode","isGDPRCountry","country","_localeSets","GDPRCountryCodes","CountryCodes","GB","isDACHCountry","DASHCountryCodes","isGBCountry","GBCountryCodes","isUSTerritory","USTerritoryCountryCodes","isEUCountry","EUCountryCodes","isEUDC","hostname","isEUSubdomain","getEUCountries","getCookieTransportTLDs","_tlds","tld","enabled","getAudienceSupportedCountries","AU","NZ","SG","IE","getBenchmarksSupportedCountries","getSMSupportedCountries","SMSupportedCountryCodes","getSiteSupportedLanguages","getLanguageCodeFromCountryCode","language","_languages","lang","countries","getLanguageCodeFromSubdomain","LANGUAGES_WITH_SUBDOMAINS","getSubdomainFromLanguageCodeAndDataCenter","LANGUAGES_BY_CODE","getSiteSupportedLanguageCodes","getTldLanguageInfo","data","LANGUAGES_BY_ID","localeSets","GDPR_COUNTRIES","SM_SUPPORTED_COUNTRIES","EU_COUNTRIES","US_TERRITORIES","GB_COUNTRIES","DASH_COUNTRIES","fallBackCountry","isTwoLetterCode","c","toUpperCase","supportLevel","SupportLevels","SITE_WIDE","SURVEY_CREATION","codeIETF","displayName","helplink","displayOrder","LANGUAGES_BY_ID_REC","LANGUAGES_BY_CODE_REC","LANGUAGES_WITH_SUBDOMAINS_REC","freeze","AT","BE","BG","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GR","HR","HU","IM","IT","LT","LU","LV","MC","MT","NL","PL","PT","RO","SE","SI","SK","IS","LI","NO","GG","GI","GS","JE","GU","PR","UM","VI","AE","AR","BR","FO","GL","AD","AL","AX","BA","BY","GF","GP","MD","ME","MF","MK","MQ","PM","RE","RS","RU","SM","TF","TR","UA","VA","YT","HK","IN","JP","KR","MX","TW","AF","AG","AI","AM","AN","AO","AQ","AS","AW","AZ","BB","BD","BF","BH","BI","BJ","BL","BM","BN","BO","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CK","CL","CM","CN","CO","CR","CV","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FK","FM","GA","GD","GE","GH","GM","GN","GQ","GT","GW","GY","HM","HN","HT","ID","IL","IO","IQ","JM","JO","KE","KG","KH","KI","KM","KN","KP","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MY","MZ","NA","NC","NE","NF","NG","NI","NP","NR","NU","OM","PA","PE","PF","PG","PH","PK","PN","PS","PW","PY","QA","RW","SA","SB","SC","SH","SJ","SL","SN","SO","SR","ST","SV","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TV","TZ","UG","UY","UZ","VC","VE","VG","VN","VU","WF","WS","YE","ZM","ZW","ZA","getCleanDigitalData","setupRoot","GLOBAL_KEY","root","subscribers","automaticSubscribers","config","user","isAuthenticated","dataAnalyticsAPIPath","loggingAPIPath","legacyWeb","gtmId","digitalData","getRoot","createMetricsTracker","_enums","_helpers","userId","page","pageInfo","pageId","attributes","pathname","events","components","ep201","ep202","Error","initialize","reset","update","updateUserConfig","userConfigUpdate","getSubscribers","getAutomaticSubscribers","track","event","_event$data","_event$data2","_event$data2$data","maskedEvent","email","maskEmail","COMPONENT_ADD","PAGE_VIEW","VIRTUAL_PAGE_VIEW","pageViewMutation","subscriber","automaticTrack","addSubscriber","addAutomaticSubscriber","getConfig","getDigitalData","generateMetricsAttribute","eventData","ELEMENT_INTERACTION","MetricsTracker","_BaseMetricsTracker","_DataAnalyticsMetricsSubscriber","_LoggingMetricsSubscriber","_GTMMeticsSubscriber","_FacebookPixelSubscriber","_MixPanelSubscriber","_AmplitudeSubscriber","delegatedEvents","setupEvents","on","gce","currentTarget","metricsData","getAttribute","metricsDataJSON","parse","setupAutomaticEvents","clickableLinks","inputTarget","actionType","actionFlow","class","className","text","innerText","checked","cloneDigitalData","newDigitalData","maskString","str","_","a","b","_MetricsTracker","_PageMetricsProvider","_ComponentMetricsProvider","_SPARouteMetricsProvider","ComponentMetricsProvider","_ref$attributes","_ref$disableDA","disableDA","USER_EVENTS","componentName","PageMetricsProvider","GDPR","_GDPR$hasGDPRConsent","hasGDPRConsent","_user$id","_user$package","package","packageId","_user$email","useEffect","SPARouteMetricsProvider","countryCode","amplitudeSubscriber","digitalDataEvent","amplitudeToken","amplitudeEvent","languageId","userPackageId","userPackageName","packageName","userSubscriptionStatus","subscriptionStatus","amplitudeInstance","getInstance","init","setUserId","setUserProperties","logEvent","dataAnalyticsMetricsSubscriber","metricsTrackerConfig","eventMeta","ui_event","ui_goal","origin","legacy_web","location","href","fetch","method","body","meta","facebookPixelSubscriber","ReactPixel","_JSON$parse","isValidURL","whiteListedURLs","some","pattern","USER_METADATA","pageView","gtmMetricsSubscriber","gtmDataLayer","pagePath","dataLayer","gtm","eventObj","loadMarketingContainer","user_id","package_id","country_code","virtualPageUrl","virtualPageTitle","GDPR_ACTION","loggingMetricsSubscriber","logEventData","log","bodyRequestObject","mixPanelSubscriber","mixpanelToken","username","_package","_mixpanelBrowser","identify","people","$name","$email","USER_SUBSCRIPTION_STATUS","getCookieValue","cname","defaultValue","ca","decodeURIComponent","document","cookie","charAt","_construct","Parent","args","Class","Function","_wrapNativeSuper","_cache","Map","_isNativeFunction","fn","Wrapper","idCounter","uniqueId","prefix","visuallyHidden","border","clip","height","margin","overflow","padding","position","width","whiteSpace","wordWrap","_s3upload","DEFAULT_OPTIONS","preprocess","file","onSignedUrl","onProgress","onFinish","onError","signingUrl","scrubFilename","filename","s3path","autoUpload","S3Uploader","myUploader","uploadFile","abort","abortUpload","userAgent","environmentDetails","userAgentTracker","_initialize","isBrowserSupported","supportedBrowsers","browser","_bowser","getParser","browsers","defaultSupportedBrowsers","cfg","vendor","operator","satisfies","SupportedBrowserVendors","isDesktop","isHeadlessChrome","isMobile","isTablet","isIOS","isAndroid","clientWindowSize","ua","__LOAD_PAYLOAD_CACHE__","clientWidth","clientHeight","navigator","inspectAgent","Chrome","Firefox","Safari","Edge","_sanitizeString","_isValidEmail","_createURL","_deepFreeze","_S3Uploader","_environment","SupportedBrowsers","VersionOperators","deepFreeze","getOwnPropertyNames","prop","isFrozen","isValidEmail","toLowerCase","_dompurify","stringSanitize","sanitize","JSDOM","createURL","params","queryString","encodeURIComponent","isNull","u","isNumber","isBoolean","isOptional","guard","isArrayOf","every","isOneOf","list","isFixed","isEither","isNullable","res","typeGuard","guards","entries","typeAssertion","assertGuard","isQuestionError","field","baseQuestionGuards","typeId","family","variant","errors","questionTypeHeaderColumnWidths","isTextLengthValidation","errorMessage","minLength","maxLength","isIntegerValidation","minValue","maxValue","isDecimalValidation","isDateValidation","minDate","maxDate","isEmailValidation","isSumValidation","sum","isFieldValidation","headingGuards","assignments","heading","variable","percent","positionGuard","inPage","inSurvey","label","baseGuards$a","surveyQuestionGuards","hasPiping","createdAt","modifiedAt","externalQuizResultsGuards","feedback","correct","partial","incorrect","answers","answer","visible","points","responded","answerOther","textAnswer","totalPoints","isSurveyQuestion","isQuestionLayoutPlacement","isQuestionLayoutSpacing","left","right","top","bottom","isQuestionLayoutWidth","isQuestionLayoutHeaderColumnWidth","isAnswer","isAnswerOtherCommentNonNullable","layout","linesCount","charsCount","isAnswerOtherChoiceNonNullable","requiredErrorText","isAnswerOther","isAnswerOtherComment","isAnswerNoneOfTheAbove","isFieldSet","isAllAnswerRequired","isWeightedAnswer","weight","isWeightedAnswers","isQuestionSorting","ignoreLast","isQuestionSkipLogicRules","skipType","sourceAnswer","destination","question","isExternalQuestionWithTypeId","isAnswerRangeRequired","min","max","isAnswerCountPredicateRequired","amount","basicExternalAllMultipleChoiceGuards","fieldSet","sorting","required","basicExternalMultipleChoiceAnswersGuard","basicExternalMultipleChoiceValidationGuard","validation","basicExternalMultipleChoiceLayoutGuard","answerLayout","placement","spacing","basicExternalMultipleChoiceAnswerOtherGuard","basicExternalMultipleChoiceAnswerNoneOfTheAboveGuard","answerNoneOfTheAbove","externalRespondentSurveyGuards","isAggregateResponseHeaderItem$1","isAggregateResponseHeader$1","items","externalRespondentQuizResultsGuards","quizResults","externalAggregateResponseDashboardGuards","dashboardType","filterCount","selectedCount","skippedCount","responseData","sentiment","aggregateResponse","columnHeader","rowHeader","groupHeader","columnItem","rowItem","groupItem","percentage","total","stats","across","row","column","group","CAPABILITIES","assertExternalQuestionByCapability","externalQuestion","respondentSurveyMapping","questionNumber","title","disabled","touched","respondentQuizResultsMapping","aggregateResponseDashboardMapping","basicFieldsMapping","assertBasicFields","basicExternalImageChoiceGuards","mapExternalToInternalImageChoice","assertExternalImageChoice","answersImageGuards","answersImage","image","altText","mapRespondentSurveyExternalImageChoice","assertRespondentSurvey$a","skipLogicRules","mapRespondentQuizResultsExternalImageChoice","assertRespondentQuizResults$2","basicExternalCheckBoxGuards","mapExternalToInternalCheckBox","assertExternalCheckBox","mapRespondentSurveyExternalCheckBox","assertRespondentSurvey$9","selected","mapRespondentQuizResultsExternalCheckBox","assertRespondentQuizResults$1","basicExternalDropdownGuards","mapExternalToInternalDropdown","assertExternalDropdown","mapRespondentSurveyExternalDropdown","assertRespondentSurvey$8","mapRespondentQuizResultsExternalDropdown","assertQuizResults","basicExternalFieldSetGuards","basicExternalRequiredGuards","basicExternalOpenEndedLayoutGuards","basicExternalOpenEndedValidationGuards","basicExternalCommentBoxGuards","mapExternalToInternalCommentBox","assertExternalCommentBox","mapRespondentSurveyExternalCommentBox","assertRespondentSurvey$7","basicExternalSingleTextboxGuards","mapExternalToInternalSingleTextbox","assertExternalSingleTextbox","mapRespondentSurveyExternalSingleTextbox","assertRespondentSurvey$6","basicExternalMatrixGuards","mapExternalToInternalMatrix","assertExternalMatrix","mapRespondentSurveyExternalMatrix","assertRespondentSurvey$5","fieldSets","labelWidthPercent","basicExternalMultipleChoiceGuards","mapExternalToInternalMultipleChoice","assertExternalMultipleChoice","mapRespondentSurveyExternalMultipleChoice","assertRespondentSurvey$4","mapRespondentQuizResultsExternalMultipleChoice","assertRespondentQuizResults","basicExternalMultipleTextboxGuards","mapExternalToInternalMultipleTextbox","assertExternalMultipleTextbox","mapRespondentSurveyExternalMultipleTextbox","assertRespondentSurvey$3","basicExternalRankingGuards","mapExternalToInternalRanking","assertExternalRanking","isRankingLayoutOption","mapRespondentSurveyExternalRanking","assertRespondentSurvey$2","answerNA","answersWeighted","isWeighted","isSliderScaleLabels","middle","isScaleOptions","stepSize","startPosition","isCustom","labels","basicExternalSliderGuards","mapExternalToInternalSlider","assertExternalSlider","mapRespondentSurveyExternalSlider","assertRespondentSurvey$1","scaleOptions","hideNumericalInput","instructions","basicExternalStarRatingGuards","mapExternalToInternalStarRating","assertExternalStarRating","isRatingScaleSymbolOptions","color","symbol","mapRespondentSurveyExternalStarRating","assertRespondentSurvey","symbolOptions","invalidCombination","questionTypeAndCapabilityMapping","single_textbox","comment_box","multiple_textbox","check_box","image_choice","multiple_choice","dropdown","slider","star_rating","ranking","matrix","mapDynamic","capability","mapInternalDynamicToExternal","q","cleanExternalQuestion","isCompatible$b","baseGuards$9","isQuestionTypeSingleTextbox","assertQuestionTypeSingleTextbox","typeId$a","isOfQuestionType$a","assertQuestionType$a","makeValidate","validators","valueAccessor","validationErrors","validator","newError","makeErrorId$3","questionId","checkValueTextLength","valueToValidate","isTouched","_a","validateTextLength","DATE_PATTERNS","DATE_INTL","DATE_US","DATE_BUILDERS","dd","mm","yyyy","Date","makeErrorId$2","isDateValidationType","validationType","validateDate","dmin","dmax","date","Number","getTime","checkValueDateFormat","makeErrorId$1","isNumericalValidationType","checkValueNumericalFormat","parsedNumber","parseFloat","isNaN","maybeInteger","isValidInteger","validateNumber","getDefaultExportFromCjs","x","isEmail$1","assertString","_typeof","invalidType","merge","defaults","isByteLength","_assertString","encodeURI","isFQDN","_merge","default_fqdn_options","allow_trailing_dot","parts","require_tld","allow_numeric_tld","allow_underscores","isIP","ipv4Maybe","sort","addressAndZone","blocks","foundOmissionBlock","foundIPv4TransitionBlock","expectedNumberOfBlocks","shift","ipv6Block","isEmail","default_email_options","require_display_name","allow_display_name","display_email","splitNameAddress","display_name","_display_email","validateDisplayName","trim_quotes","display_name_without_quotes","trim","ignore_max_length","domain","lower_domain","domain_specific_validation","_isByteLength","_user_parts","gmailUserPart","_isFQDN","allow_ip_domain","_isIP","startsWith","noBracketdomain","allow_utf8_local_part","quotedEmailUserUtf8","quotedEmailUser","emailUserUtf8Part","emailUserPart","user_parts","_i2","blacklisted_chars","search","RegExp","makeErrorId","checkValueEmailFormat","validateEmail","validate$a","singleTextboxQuestionDefinition","validate","fromExternalQuestion","questionType","mapFromExternalQuestion$a","toExternalQuestion","eq","isOfQuestionType","isCompatible","assertQuestionType","baseGuards$8","isQuestionTypeMultipleTextbox","assertQuestionTypeMultipleTextbox","typeId$9","isOfQuestionType$9","assertQuestionType$9","validate$9","multipleTextboxQuestionDefinition","mapFromExternalQuestion$9","baseGuards$7","isQuestionTypeCommentBox","assertQuestionTypeCommentBox","typeId$8","isOfQuestionType$8","assertQuestionType$8","validate$8","commentBoxQuestionDefinition","mapFromExternalQuestion$8","baseGuards$6","isQuestionTypeMultipleChoice","assertQuestionTypeMultipleChoice","typeId$7","isOfQuestionType$7","assertQuestionType$7","validate$7","multipleChoiceQuestionDefinition","mapFromExternalQuestion$7","baseGuards$5","isQuestionTypeCheckBox","assertQuestionTypeCheckBox","typeId$6","isOfQuestionType$6","assertQuestionType$6","validate$6","checkBoxQuestionDefinition","mapFromExternalQuestion$6","baseGuards$4","isQuestionTypeDropdown","assertQuestionTypeDropdown","typeId$5","isOfQuestionType$5","assertQuestionType$5","validate$5","dropdownQuestionDefinition","mapFromExternalQuestion$5","baseGuards$3","isQuestionTypeImageChoice","assertQuestionTypeImageChoice","typeId$4","isOfQuestionType$4","assertQuestionType$4","validate$4","imageChoiceQuestionDefinition","mapFromExternalQuestion$4","baseGuards$2","isQuestionTypeSlider","assertQuestionTypeSlider","typeId$3","isOfQuestionType$3","assertQuestionType$3","validate$3","sliderQuestionDefinition","mapFromExternalQuestion$3","baseGuards$1","isQuestionTypeStarRating","assertQuestionTypeStarRating","typeId$2","isOfQuestionType$2","assertQuestionType$2","validate$2","starRatingQuestionDefinition","mapFromExternalQuestion$2","baseSingleAnswerGuards","baseManyAnswersGuards","isQuestionTypeMatrixSingleAnswer","isQuestionTypeMatrixManyAnswers","isQuestionTypeMatrix","assertQuestionTypeMatrix","typeId$1","isOfQuestionType$1","assertQuestionType$1","validate$1","matrixQuestionDefinition","mapFromExternalQuestion$1","baseGuards","isQuestionTypeRanking","assertQuestionTypeRanking","questionTypeDefinitionModules","mapFromExternalQuestion","pickQuestionTypeDefinition","qd","findByType","selectQuestionTypeDefinition","getTypeId","isAggregateResponseHeaderItem","isAggregateResponseHeader","isAggregateResponseBasicStats","isOneDimensionalAggregateResponseCell","isTwoDimensionalAggregateResponseCell","isThreeDimensionalAggregateResponseCell","isOneDimensionalChartData","rowID","rowLabel","isTwoDimensionalData","columnID","columnLabel","groupID","groupLabel","smFont","grey","themeAugmentation","fontSize","fontWeight","light","regular","medium","nextButton","backgroundColor","activeColor","bgColor","defaultColor","correctColor","wrongColor","correctAnswerHighlightColor","applySurveyThemeAugmentation","theme","_b","_c","questionHighlightColor","isNps","titleColor","isDark","isAccessible","getQuestionHighlightColor","primaryAccentColor","secondaryAccentColor","answerColor","selectors","useStyles","boxSizing","listStyle","MIN_SAFE_INTEGER","SurveyGlobalStyles","SurveyStylesProvider","generateJssId","assign","generateId","rule","srcSheet","sheet","classNamePrefix","SurveyThemeWrapper","FallbackComponent","declareVisualization","questionTypes","capabilities","component","providerAccessContext","UnsupportedVisualization","commonjsGlobal","globalThis","global","classnames$1","hasOwn","classNames","classes","arg","argType","inner","classnames","symbolTag","reEscapedHtml","reHasEscapedHtml","freeGlobal","freeSelf","unescapeHtmlChar","basePropertyOf","objectToString","symbolProto","symbolToString","baseToString","isSymbol","isObjectLike","lodash_unescape","reactErrorBoundary_umd","React","_interopNamespace","k","React__namespace","_inheritsLoose","changedArray","item","is","initialState","ErrorBoundary","_len","_args","_key","updatedWithError","resetErrorBoundary","_this$props","_len2","_key2","onReset","getDerivedStateFromError","_proto","componentDidCatch","info","_this$props$onError","_this$props2","componentDidMount","_this$props$onResetKe","_this$props3","resetKeys","onResetKeysChange","_this$props4","fallbackRender","fallback","_props","withErrorBoundary","errorBoundaryProps","Wrapped","useErrorHandler","givenError","_React$useState","useState","setError","factory","button","fontFamily","questionBody","borderRadius","maxWidth","minWidth","minHeight","cursor","overflowWrap","useStyles$d","VisuallyHidden","Element","useStyles$c","paddingBox","paddingTop","paddingBottom","paddingLeft","paddingRight","QuestionSpacing","useStyles$b","footerRow","hasFooterPadding","containerStyles","clickShield","opacity","transition","pointerEvents","errorRow","marginBottom","formReset","headerRow","COPY$2","QUESTION_TITLE","QuestionFieldLayoutTemplate","footer","onSubmit","onLeave","containerRef","useRef","handleKeydown","useCallback","fieldsetRef","useOnFocusLeave","ref","focusCallback","ele","current","handleFocus","contains","relatedTarget","addEventListener","removeEventListener","container","useStyles$a","containerVertical","display","containerHorizontal","flexDirection","justifyContent","columnHorizontal","columnHorizontalAutoAdjust","breakpoints","xs","flexWrap","lg","sm","md","xxs","answerLayoutCell","flex","QuestionAnswerLayoutTemplate","columns","other","noneOfTheAbove","adjustToContent","isHorizontal","columnGroups","useMemo","totalChildren","totalColumns","childrenArr","childrenPerSlice","sliceChildren","childrenPerColumn","floor","calculateMaxNumOfChildrenPerColumn","columnClassNames","col","columnIndex","cell","cellIndex","textReset","useStyles$9","questionTitleFormatting","questionTitle","questionTitleFontSize","addonContainer","verticalAlign","useDefaultFrontSize","questionColor","lineHeight","requiredAsterisk","listSpacing","mediaReset","useStyles$8","richTextContent","textDecoration","outline","listStyleType","fontStyle","sanitizeOptions","ADD_TAGS","ADD_ATTR","RichText","sanitizeString","QuestionTitle","addon","numbered","useContext","translate","icon","backgroundClip","iconWrapper","marginRight","validationMessage","useStyles$7","textareaStyles","outlineColor","textSizeAdjust","borderColor","boxShadow","TextArea","placeholder","rows","cols","labelId","errorId","readOnly","onChange","onBlur","onFocus","spellCheck","useStyles$6","inputStyles","autoHeight","TextInput","size","useStyles$5","defaultFontSize","highlightColor","componentContainer","labelContainer","textContainer","wordBreak","textInputContainer","QuizResultComment","optionText","textInputValue","textInputSize","textInputParagraphLines","htmlFor","useStyles$4","srOnly","COPY$1","CORRECT","INCORRECT","SrText","icons","isAriaHidden","viewBox","stroke","strokeWidth","fill","fillRule","transform","wrong","useStyles$3","containerBase","alignItems","getIconContainerBg","highlight","iconName","getIconContainerBorderColor","getIconContainerBackground","primaryBackgroundColor","radioContainer","radioInput","iconContainer","iconContainerBackground","InputIcon","ariaLabelledby","isCorrect","ariaDescribedBy","noScreenReaderText","Icon","useStyles$2","defaultFrontSize","QuizResultChoices","hasTextInput","uniqId","radioButtonId","textInputId","inputId","useStyles$1","imageChoice","iconLabel","zIndex","imageContainer","imageStyle","maxHeight","captionStyle","QuizResultImageChoice","caption","correctMessage","selectedMessage","isManyAnswers","imageChoiceId","captionId","selectedId","highlightedId","src","alt","_f","_g","_h","_j","scoreContainer","feedbackContainer","marginTop","skippedBadge","marginLeft","COPY","POINT","POINTS","SKIPPED","QuizResultScore","score","skipped","getCorrectnessIndicatorIcon","answerOptionPoints","getIconAndHighlight","idToSearch","highlightCorrectAnswers","pickFeedback","userScore","totalScore","getUserScore","quizAnswers","cur","isNotUndefined","isPureQuizAnswer","filterQuizAnswers","idsToFilter","isPureQuizImageAnswer","ErrorFallback","CheckBox$1","numberingEnabled","answerLayoutColumns","regularAnswers","isComment","NoneOfTheAboveOption","parseInt","MultipleChoice$1","answerOption","ImageChoice$1","filterOtherFromQuizImageAnswer","UnsupportedQuestionTypeError","SingleQuestionController$1","displayOptions","namedSlots","responseSet","useUpstreamConfig","useVisualizationList","access","useProviderAccessContext","upstreamActions","renderProps","settings","visualizationOptions","augmentedExternalQuestion","useExternalQuestionAugmentation","definition","ChosenVisualization","questionTypeId","VisualizationComponent","qts","createVisualization","r","getAnswerLayoutColumns","quizAnswersToImageAnswers","ans","maybeAnswer","matchingImageAnswer","ansImg","ProviderHelper","visualizationList","ctx","fs","providerFactory","survey","quizResultsWithImage","getQuizResultsWithImage","QuizResultsCapabilityProvider","isLocalError","createFieldId","createLabelId","createErrorId","Button","slicedText","ValidationMessage","OK_LABEL","SingleTextbox","active","asteriskEnabled","okLabel","conditionalProps","titleId","fieldId","isAutoScroll","showClickShield","showButton","showOkButton","onClick","CommentBox$1","useShowOkButton","setShowOkButton","AnswerCommentBoxVisualization","upstreamErrors","registerValidator","unregisterValidator","upstreamAnswer","setAnswer","isDirty","validationFunction","onLeaveQuestion","surveyModeOptions","isClassic","RespondentCapabilityProvider"],"sourceRoot":""}