diff --git a/baselines/BART/.gitignore b/baselines/BART/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/baselines/BART/.gitignore @@ -0,0 +1 @@ + diff --git a/baselines/BART/ans_aft_emo_expla_gen_eval.py b/baselines/BART/ans_aft_emo_expla_gen_eval.py new file mode 100644 index 0000000..748b32e --- /dev/null +++ b/baselines/BART/ans_aft_emo_expla_gen_eval.py @@ -0,0 +1,276 @@ +import os +import json +import random +from tqdm import tqdm +import pickle as pkl +import numpy as np +import pandas as pd +from sklearn.metrics import accuracy_score, precision_recall_fscore_support +import torch +from transformers import ( + AutoModelForSeq2SeqLM, + AutoTokenizer +) +from datasets import load_dataset +import evaluate +from nltk.tokenize import word_tokenize +from BARTScore.bart_score import BARTScorer +device = torch.device('cuda') +print("###################################################################################################") +print("Using {} ".format(device)) +print("###################################################################################################") +SEED = 0 +random.seed(SEED) +np.random.seed(SEED) +torch.manual_seed(SEED) + +data_path = 'data/' +logs_dir = 'logs/' +output_dir = 'EmoDialog/' +subtask = 'ans_aft_expl_gen_emo_gen_emo1_emo2_cap1_cap2_conv_gen_cap_1' + +if(subtask.endswith('gen_cap_1')): + task = 'image_blip_text_' + subtask +else: + task = 'text_only_' + subtask + +modelname = 'facebook/bart-large' + +if(subtask.endswith('gen_cap_1')): + numepochs = 25 +else: + numepochs = 5 + +max_target_length = 50 +if('conv' in subtask): + max_source_length = 350 +else: + max_source_length = 150 + +print("###################################################################################################") +print("Max sentence length {} ".format(max_source_length)) +print("###################################################################################################") + +special_tokens = {'additional_special_tokens': ['
+ It has the ability to do a number of things, like directly access + the contents of task data, view the number of messages so far, and + pretty much anything you make like. We're also able to control other + components as well, as in this example we've made it so that if you + click a message, it will alert with that message idx. +
+The regular task description content will now appear below:
++ It has the ability to do a number of things, like directly access + the contents of task data, view the number of messages so far, and + pretty much anything you make like. We're also able to control other + components as well, as in this example we've made it so that if you + click a message, it will alert with that message idx. +
+The regular task description content will now appear below:
++ In this task, you will be chatting with a fellow Turker about an image. + You will take 10 turns (each is a question and an answer) to complete the task. + You will be either asking questions (Questioner) or answering questions (Answerer). + Stay tuned. The task will start when you have been connected with a fellow Turker. + (Note, it may take up to 3 minutes to get paired with another fellow Turker.) +
+Questioner should keep his/her questions about the content of the image and do not ask the answerer to provide his/her feelings about the image explicitly. ++ In this task, to help you understand the task, imagine that you are a blind person who wants to engage in an emotional experience + about an artwork and form an opinion about it by querying another person. + As a "Questioner ", you do not have access to the art image, but you will have access to two subjective descriptions + reflecting different emotions about the image. You will engage in a dialog with a person (a fellow Turker) + who has access to the artwork image . Your role is to ask questions that are specific to the content of the image + to decide on an emotion that the hidden artwork may trigger for you. At the end of the conversation, + you will be given 9 possible emotions (awe, contentment, excitement, amusement, sadness, anger, disgust, fear, or + something else) to choose from based on your conversation with your fellow Turker. At the end, you will also be + requested to provide a text description that explains based on the conversation why you chose the selected emotion. + Please refer to pieces of information from the conversation that informed your decision. + Very generic questions (e.g., What is the image about?, “you are welcome”, “no more questions?”) are not allowed. +
+ +Common bad examples for the Questioner that leads to HIT rejection:
++ In this task, to help you understand the task, imagine that you are helping a blind person explore and appreciate an artwork that + you only can see by providing answers about the content of the artwork. + As an "Answerer" you will have access to the artwork image as well as two subjective + descriptions reflecting different emotions about the image. You will engage in a dialog with a person + (a fellow Turker) who can not see the artwork image. Imagine if you are helping a blind person to experience + the artwork that you can see but he/she does not. Your role is to help answer questions about the visual content + that is specific to the art piece (not general questions). Also, please help the presumably blind fellow turker + to form his/her own opinion about the art piece without imposing certain emotions, e.g. just saying this image is + sad or joyful in your answers. Please also provide detailed answers (e.g., do not use short answers such as yes/no/maybe). + What is important here is to help him/her create an emotional experience about the artwork. Please focus on describing + the content from an artistic point of view including textures, the colors, peoples, animals, etc. + Please keep the following in mind while chatting with your fellow Turker: +
+Please keep the following in mind while chatting with your fellow Turker:
+Both the Questioner and Answerer should follow the following instructions during the conversation
++ + Please complete one HIT before proceeding to the other. + Please don't open multiple tabs, you cannot chat with yourself. + We may measure the level of engagement in the task and the task may terminate + if a low level of engagement is detected or if instructions are violated. + Your data will be recorded ONLY when the dialog is complete (i.e., reaching a decision after 10 Questions and 10 answers) and no violation of instructions is detected. + Thus, we expect the questioner and answerer to work as a team to fully complete the HIT and receive the payment. + Your participation is voluntary and you can stop at any time, but you will be paid for completed tasks only. + + +
\ No newline at end of file diff --git a/ui/webapp/.babelrc b/ui/webapp/.babelrc new file mode 100644 index 0000000..5507f2e --- /dev/null +++ b/ui/webapp/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["@babel/env", "@babel/preset-react"], + "plugins": ["@babel/plugin-proposal-class-properties"] +} diff --git a/ui/webapp/.eslintrc b/ui/webapp/.eslintrc new file mode 100644 index 0000000..fcf5ef3 --- /dev/null +++ b/ui/webapp/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": ["react-app"] +} diff --git a/ui/webapp/build/bundle.js b/ui/webapp/build/bundle.js new file mode 100644 index 0000000..5af7cd1 --- /dev/null +++ b/ui/webapp/build/bundle.js @@ -0,0 +1,1253 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/assign.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime-corejs2/core-js/object/assign.js ***! + \**********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("module.exports = __webpack_require__(/*! core-js/library/fn/object/assign */ \"./node_modules/core-js/library/fn/object/assign.js\");\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./node_modules/@babel/runtime-corejs2/core-js/object/assign.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/create.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime-corejs2/core-js/object/create.js ***! + \**********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("module.exports = __webpack_require__(/*! core-js/library/fn/object/create */ \"./node_modules/core-js/library/fn/object/create.js\");\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./node_modules/@babel/runtime-corejs2/core-js/object/create.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/entries.js": +/*!***********************************************************************!*\ + !*** ./node_modules/@babel/runtime-corejs2/core-js/object/entries.js ***! + \***********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("module.exports = __webpack_require__(/*! core-js/library/fn/object/entries */ \"./node_modules/core-js/library/fn/object/entries.js\");\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./node_modules/@babel/runtime-corejs2/core-js/object/entries.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/keys.js": +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime-corejs2/core-js/object/keys.js ***! + \********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("module.exports = __webpack_require__(/*! core-js/library/fn/object/keys */ \"./node_modules/core-js/library/fn/object/keys.js\");\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./node_modules/@babel/runtime-corejs2/core-js/object/keys.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/set-prototype-of.js": +/*!********************************************************************************!*\ + !*** ./node_modules/@babel/runtime-corejs2/core-js/object/set-prototype-of.js ***! + \********************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("module.exports = __webpack_require__(/*! core-js/library/fn/object/set-prototype-of */ \"./node_modules/core-js/library/fn/object/set-prototype-of.js\");\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./node_modules/@babel/runtime-corejs2/core-js/object/set-prototype-of.js?"); + +/***/ }), + +/***/ "./node_modules/@babel/runtime-corejs2/core-js/object/values.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime-corejs2/core-js/object/values.js ***! + \**********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("module.exports = __webpack_require__(/*! core-js/library/fn/object/values */ \"./node_modules/core-js/library/fn/object/values.js\");\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./node_modules/@babel/runtime-corejs2/core-js/object/values.js?"); + +/***/ }), + +/***/ "./src/composed/AffectiveChatApp.jsx": +/*!*******************************************!*\ + !*** ./src/composed/AffectiveChatApp.jsx ***! + \*******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AffectiveChatApp\": () => (/* binding */ AffectiveChatApp),\n/* harmony export */ \"AppContext\": () => (/* binding */ AppContext),\n/* harmony export */ \"INPUT_MODE\": () => (/* binding */ INPUT_MODE)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mephisto_task__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mephisto-task */ \"./node_modules/mephisto-task/build/bundle.js\");\n/* harmony import */ var mephisto_task__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(mephisto_task__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _AffectiveFrontend_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AffectiveFrontend.jsx */ \"./src/composed/AffectiveFrontend.jsx\");\nvar _excluded = [\"agent_display_name\", \"live_update_requested\"];\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/*\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n/* ================= Application Components ================= */\n\nvar AppContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});\nvar emptyAppSettings = {};\nvar INPUT_MODE = {\n WAITING: \"waiting\",\n INACTIVE: \"inactive\",\n DONE: \"done\",\n READY_FOR_INPUT: \"ready_for_input\"\n};\n\nfunction AffectiveChatApp(_ref) {\n var renderMessage = _ref.renderMessage,\n renderSidePane = _ref.renderSidePane,\n renderTextResponse = _ref.renderTextResponse,\n renderResponse = _ref.renderResponse,\n onMessagesChange = _ref.onMessagesChange,\n _ref$defaultAppSettin = _ref.defaultAppSettings,\n defaultAppSettings = _ref$defaultAppSettin === void 0 ? emptyAppSettings : _ref$defaultAppSettin;\n\n var _React$useReducer = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(function (oldContext, newContext) {\n return _objectSpread(_objectSpread({}, oldContext), newContext);\n }, {}),\n _React$useReducer2 = _slicedToArray(_React$useReducer, 2),\n taskContext = _React$useReducer2[0],\n updateContext = _React$useReducer2[1];\n\n var _React$useReducer3 = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(function (previousMessages, newMessage) {\n // we clear messages by sending false\n return newMessage === false ? [] : [].concat(_toConsumableArray(previousMessages), [newMessage]);\n }, []),\n _React$useReducer4 = _slicedToArray(_React$useReducer3, 2),\n messages = _React$useReducer4[0],\n addMessage = _React$useReducer4[1];\n\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (onMessagesChange) {\n onMessagesChange(messages);\n }\n }, [messages]);\n\n var initialAppSettings = _objectSpread({\n volume: 1,\n isReview: false,\n isCoverPage: false,\n useTurns: true\n }, defaultAppSettings);\n\n var _React$useReducer5 = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(function (prevSettings, newSettings) {\n return Object.assign(prevSettings, newSettings);\n }, initialAppSettings),\n _React$useReducer6 = _slicedToArray(_React$useReducer5, 2),\n appSettings = _React$useReducer6[0],\n setAppSettings = _React$useReducer6[1];\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__.useState(INPUT_MODE.WAITING),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n inputMode = _React$useState2[0],\n setInputMode = _React$useState2[1];\n\n function playNotifSound() {\n var audio = new Audio(\"./notif.mp3\");\n audio.volume = appSettings.volume;\n\n if (audio.volume != 0) {\n audio.play();\n }\n }\n\n function trackAgentName(agentName) {\n var _newAgentName;\n\n var previouslyTrackedNames = taskContext.currentAgentNames || {};\n var newAgentName = (_newAgentName = {}, _defineProperty(_newAgentName, agentId, agentName), _defineProperty(_newAgentName, agentName, agentName), _newAgentName);\n\n var currentAgentNames = _objectSpread(_objectSpread({}, previouslyTrackedNames), newAgentName);\n\n updateContext({\n currentAgentNames: currentAgentNames\n });\n }\n\n function handleStateUpdate(state) {\n var agent_display_name = state.agent_display_name,\n live_update_requested = state.live_update_requested,\n remainingState = _objectWithoutProperties(state, _excluded);\n\n if (agent_display_name) {\n trackAgentName(agent_display_name);\n }\n\n if (remainingState.task_done) {\n setInputMode(INPUT_MODE.DONE);\n } else if (live_update_requested === true) {\n setInputMode(INPUT_MODE.READY_FOR_INPUT);\n\n if (appSettings.useTurns) {\n playNotifSound();\n }\n } else if (live_update_requested === false) {\n setInputMode(INPUT_MODE.WAITING);\n }\n\n if (Object.keys(remainingState).length > 0) {\n updateContext(remainingState);\n }\n }\n\n var mephistoProps = (0,mephisto_task__WEBPACK_IMPORTED_MODULE_1__.useMephistoLiveTask)({\n onStatusUpdate: function onStatusUpdate(_ref2) {\n var status = _ref2.status;\n\n if ([mephisto_task__WEBPACK_IMPORTED_MODULE_1__.AGENT_STATUS.DISCONNECT, mephisto_task__WEBPACK_IMPORTED_MODULE_1__.AGENT_STATUS.RETURNED, mephisto_task__WEBPACK_IMPORTED_MODULE_1__.AGENT_STATUS.EXPIRED, mephisto_task__WEBPACK_IMPORTED_MODULE_1__.AGENT_STATUS.TIMEOUT, mephisto_task__WEBPACK_IMPORTED_MODULE_1__.AGENT_STATUS.PARTNER_DISCONNECT, mephisto_task__WEBPACK_IMPORTED_MODULE_1__.AGENT_STATUS.MEPHISTO_DISCONNECT].includes(status)) {\n setInputMode(INPUT_MODE.INACTIVE);\n updateContext({\n doneText: mephisto_task__WEBPACK_IMPORTED_MODULE_1__.STATUS_TO_TEXT_MAP[status],\n task_done: status == mephisto_task__WEBPACK_IMPORTED_MODULE_1__.AGENT_STATUS.PARTNER_DISCONNECT\n });\n }\n },\n onLiveUpdate: function onLiveUpdate(message) {\n if (message.task_data !== undefined) {\n handleStateUpdate(message.task_data);\n }\n\n if (message.text !== undefined) {\n addMessage(message);\n } // For handling reconnected packets and properly updating state\n // during turns.\n\n\n if (taskContext.currentAgentNames && message.id in taskContext.currentAgentNames && appSettings.useTurns) {\n // This was our own message, so update to not requesting\n handleStateUpdate({\n live_update_requested: false\n });\n }\n }\n });\n var blockedReason = mephistoProps.blockedReason,\n blockedExplanation = mephistoProps.blockedExplanation,\n taskConfig = mephistoProps.taskConfig,\n isPreview = mephistoProps.isPreview,\n previewHtml = mephistoProps.previewHtml,\n isLoading = mephistoProps.isLoading,\n agentId = mephistoProps.agentId,\n handleSubmit = mephistoProps.handleSubmit,\n connect = mephistoProps.connect,\n destroy = mephistoProps.destroy,\n sendLiveUpdate = mephistoProps.sendLiveUpdate,\n isOnboarding = mephistoProps.isOnboarding,\n agentStatus = mephistoProps.agentStatus;\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (agentId) {\n console.log(\"connecting...\");\n connect(agentId);\n }\n }, [agentId]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (taskContext.is_final) {\n destroy();\n }\n });\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (isOnboarding && agentStatus === mephisto_task__WEBPACK_IMPORTED_MODULE_1__.AGENT_STATUS.WAITING) {\n handleSubmit();\n }\n }, [isOnboarding, agentStatus]);\n var handleMessageSend = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (message) {\n message = _objectSpread(_objectSpread({}, message), {}, {\n id: agentId,\n episode_done: (taskContext === null || taskContext === void 0 ? void 0 : taskContext.task_done) || false\n });\n return sendLiveUpdate(message).then(addMessage).then(function () {\n if (appSettings.useTurns) {\n handleStateUpdate({\n live_update_requested: false\n });\n }\n });\n }, [agentId, taskContext === null || taskContext === void 0 ? void 0 : taskContext.task_done, addMessage, setInputMode]);\n\n if (blockedReason !== null) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h1\", null, blockedExplanation);\n }\n\n if (isLoading) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, \"Initializing...\");\n }\n\n if (isPreview) {\n if (!taskConfig.has_preview) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(TaskPreviewView, {\n description: taskConfig.task_description\n });\n }\n\n if (previewHtml === null) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, \"Loading...\");\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n dangerouslySetInnerHTML: {\n __html: previewHtml\n }\n });\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(mephisto_task__WEBPACK_IMPORTED_MODULE_1__.MephistoContext.Provider, {\n value: mephistoProps\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(AppContext.Provider, {\n value: {\n taskContext: taskContext,\n appSettings: appSettings,\n setAppSettings: setAppSettings,\n onTaskComplete: function onTaskComplete() {\n destroy();\n handleSubmit({});\n }\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"container-fluid\",\n id: \"ui-container\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_AffectiveFrontend_jsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n inputMode: inputMode,\n messages: messages,\n onMessageSend: handleMessageSend,\n renderMessage: renderMessage,\n renderSidePane: renderSidePane,\n renderTextResponse: renderTextResponse,\n renderResponse: renderResponse\n }))));\n}\n\nfunction TaskPreviewView(_ref3) {\n var description = _ref3.description;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"preview-screen\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n dangerouslySetInnerHTML: {\n __html: description\n }\n }));\n}\n\n\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./src/composed/AffectiveChatApp.jsx?"); + +/***/ }), + +/***/ "./src/composed/AffectiveFrontend.jsx": +/*!********************************************!*\ + !*** ./src/composed/AffectiveFrontend.jsx ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var bootstrap_chat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bootstrap-chat */ \"./node_modules/bootstrap-chat/build/bundle.js\");\n/* harmony import */ var bootstrap_chat__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(bootstrap_chat__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mephisto_task__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mephisto-task */ \"./node_modules/mephisto-task/build/bundle.js\");\n/* harmony import */ var mephisto_task__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(mephisto_task__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AffectiveChatApp.jsx */ \"./src/composed/AffectiveChatApp.jsx\");\n/* harmony import */ var _EmojiFormResponse_jsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EmojiFormResponse.jsx */ \"./src/composed/EmojiFormResponse.jsx\");\n/*\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n\n\n\nfunction AffectiveFrontend(_ref) {\n var messages = _ref.messages,\n onMessageSend = _ref.onMessageSend,\n inputMode = _ref.inputMode,\n renderSidePane = _ref.renderSidePane,\n renderMessage = _ref.renderMessage,\n renderTextResponse = _ref.renderTextResponse,\n renderResponse = _ref.renderResponse;\n var mephistoContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(mephisto_task__WEBPACK_IMPORTED_MODULE_2__.MephistoContext);\n var appContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.AppContext);\n var connectionStatus = mephistoContext.connectionStatus,\n agentStatus = mephistoContext.agentStatus,\n taskConfig = mephistoContext.taskConfig;\n var appSettings = appContext.appSettings;\n var sidePaneSize = appSettings.isCoverPage ? \"col-xs-12\" : \"col-xs-4\";\n var heightStyle = taskConfig.frame_height == 0 ? {} : {\n height: taskConfig.frame_height\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(bootstrap_chat__WEBPACK_IMPORTED_MODULE_1__.ConnectionStatusBoundary, {\n status: connectionStatus\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"row\",\n style: heightStyle\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"side-pane \" + sidePaneSize\n }, renderSidePane({\n mephistoContext: mephistoContext,\n appContext: appContext\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"chat-container-pane\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"right-top-pane\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(ChatStatusBar, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(bootstrap_chat__WEBPACK_IMPORTED_MODULE_1__.ChatPane, {\n scrollBottomKey: messages.length + \"-\" + inputMode\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: \"message_thread\",\n style: {\n width: \"100%\"\n }\n }, messages.map(function (message, idx) {\n return renderMessage({\n message: message,\n idx: idx,\n appContext: appContext,\n mephistoContext: mephistoContext\n });\n })), inputMode === _AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.INPUT_MODE.WAITING ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(bootstrap_chat__WEBPACK_IMPORTED_MODULE_1__.SystemMessage, {\n glyphicon: \"hourglass\",\n text: getWaitingMessage(agentStatus)\n }) : null)), renderResponse ? renderResponse({\n onMessageSend: onMessageSend,\n inputMode: inputMode,\n appContext: appContext,\n mephistoContext: mephistoContext\n }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(ResponsePane, {\n inputMode: inputMode,\n onMessageSend: onMessageSend,\n renderTextResponse: renderTextResponse\n }))));\n}\n\nfunction getWaitingMessage(agentStatus) {\n return agentStatus === \"waiting\" ? \"Waiting to pair with a task...\" : \"Waiting for the next person to speak...\";\n}\n\nfunction ChatStatusBar() {\n var _React$useContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(mephisto_task__WEBPACK_IMPORTED_MODULE_2__.MephistoContext),\n connectionStatus = _React$useContext.connectionStatus;\n\n var _React$useContext2 = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.AppContext),\n appSettings = _React$useContext2.appSettings,\n setAppSettings = _React$useContext2.setAppSettings;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"chat-status-bar\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(bootstrap_chat__WEBPACK_IMPORTED_MODULE_1__.ConnectionIndicator, {\n connectionStatus: connectionStatus\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(bootstrap_chat__WEBPACK_IMPORTED_MODULE_1__.VolumeControl, {\n volume: appSettings.volume,\n onVolumeChange: function onVolumeChange(v) {\n return setAppSettings({\n volume: v\n });\n }\n }));\n}\n\nfunction ResponsePane(_ref2) {\n var onMessageSend = _ref2.onMessageSend,\n inputMode = _ref2.inputMode,\n renderTextResponse = _ref2.renderTextResponse;\n var appContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.AppContext);\n var mephistoContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(mephisto_task__WEBPACK_IMPORTED_MODULE_2__.MephistoContext);\n var taskContext = appContext.taskContext,\n onTaskComplete = appContext.onTaskComplete;\n var response_pane = null;\n\n switch (inputMode) {\n case _AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.INPUT_MODE.DONE:\n case _AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.INPUT_MODE.INACTIVE:\n response_pane = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(bootstrap_chat__WEBPACK_IMPORTED_MODULE_1__.DoneResponse, {\n onTaskComplete: onTaskComplete,\n onMessageSend: onMessageSend,\n doneText: taskContext.doneText || null,\n isTaskDone: taskContext.task_done || null\n });\n break;\n\n case _AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.INPUT_MODE.READY_FOR_INPUT:\n case _AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.INPUT_MODE.WAITING:\n if (taskContext && taskContext[\"respond_with_form\"]) {\n response_pane = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_EmojiFormResponse_jsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n onMessageSend: onMessageSend,\n active: inputMode === _AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.INPUT_MODE.READY_FOR_INPUT,\n formOptions: taskContext[\"respond_with_form\"]\n });\n } else {\n response_pane = renderTextResponse ? renderTextResponse({\n onMessageSend: onMessageSend,\n inputMode: inputMode,\n active: inputMode === _AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.INPUT_MODE.READY_FOR_INPUT,\n appContext: appContext,\n mephistoContext: mephistoContext\n }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(bootstrap_chat__WEBPACK_IMPORTED_MODULE_1__.TextResponse, {\n onMessageSend: onMessageSend,\n active: inputMode === _AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_3__.INPUT_MODE.READY_FOR_INPUT\n });\n }\n\n break;\n\n default:\n response_pane = null;\n break;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"right-bottom-pane\"\n }, response_pane);\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AffectiveFrontend);\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./src/composed/AffectiveFrontend.jsx?"); + +/***/ }), + +/***/ "./src/composed/EmojiFormResponse.jsx": +/*!********************************************!*\ + !*** ./src/composed/EmojiFormResponse.jsx ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-bootstrap */ \"./node_modules/react-bootstrap/es/Col.js\");\n/* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-bootstrap */ \"./node_modules/react-bootstrap/es/FormGroup.js\");\n/* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-bootstrap */ \"./node_modules/react-bootstrap/es/FormControl.js\");\n/* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-bootstrap */ \"./node_modules/react-bootstrap/es/Button.js\");\n/* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-bootstrap */ \"./node_modules/react-bootstrap/es/Form.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/*\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\nvar rating_value = null;\nvar emojis = [{\n id: \"00\",\n name: \"emotion\",\n label: \"Anger\",\n value: \"Anger\",\n emoji: \"https://i.imgur.com/zNDm7kE.jpg\",\n isChecked: false\n}, {\n id: \"01\",\n name: \"\",\n label: \"Disgust\",\n value: \"Disgust\",\n emoji: \"https://i.imgur.com/yUvJNUW.png\",\n isChecked: false\n}, {\n id: \"02\",\n name: \"emotion\",\n label: \"Fear\",\n value: \"Fear\",\n emoji: \"https://i.imgur.com/bQsXv2s.png\",\n isChecked: false\n}, {\n id: \"03\",\n name: \"emotion\",\n label: \"Sadness\",\n value: \"Sadness\",\n emoji: \"https://i.imgur.com/bYLyDAs.png\",\n isChecked: false\n}, {\n id: \"04\",\n name: \"emotion\",\n label: \"Excitement\",\n value: \"Excitement\",\n emoji: \"https://i.imgur.com/FBMXWUE.png\",\n isChecked: false\n}, {\n id: \"05\",\n name: \"emotion\",\n label: \"Amusement\",\n value: \"Amusement\",\n emoji: \"https://i.imgur.com/RjnmFuv.png\",\n isChecked: false\n}, {\n id: \"06\",\n name: \"emotion\",\n label: \"Contentment\",\n value: \"Contentment\",\n emoji: \"https://i.imgur.com/fUoaoi1.png\",\n isChecked: false\n}, {\n id: \"07\",\n name: \"emotion\",\n label: \"Awe\",\n value: \"Awe\",\n emoji: \"https://i.imgur.com/T93v73O.png\",\n isChecked: false\n}, {\n id: \"08\",\n name: \"emotion\",\n label: \"Something Else\",\n value: \"Something Else\",\n emoji: \"\",\n isChecked: false\n}];\n\nvar RadioInput = function RadioInput(_ref) {\n var name = _ref.name,\n label = _ref.label,\n value = _ref.value,\n isChecked = _ref.isChecked,\n handleChange = _ref.handleChange;\n\n var handleRadioChange = function handleRadioChange(e) {\n var id = e.currentTarget.id;\n handleChange(id); // Send back id to radio group for comparison\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"input\", {\n type: \"radio\",\n className: \"custom-radio\",\n name: name,\n id: value // htlmlFor targets this id.\n ,\n checked: isChecked,\n onChange: handleRadioChange\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"label\", {\n htmlFor: value\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null, label)));\n};\n\nvar RadioGroupInput = function RadioGroupInput() {\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"),\n _useState2 = _slicedToArray(_useState, 2),\n selectedInput = _useState2[0],\n setSelectedInput = _useState2[1];\n\n var _handleChange = function handleChange(inputValue) {\n emojis.forEach(function (emoji) {\n if (emoji.id === inputValue) {\n emoji.isChecked = true;\n } else {\n emoji.isChecked = false;\n }\n });\n setSelectedInput(inputValue);\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n sm: 11\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n width: \"100%\",\n display: \"grid\",\n gridTemplateColumns: \"auto auto auto auto auto auto auto auto auto\",\n gridColumnGap: \"8x\",\n justifyContent: \"center\",\n alignItems: \"center\",\n fontSize: \"11px\"\n }\n }, emojis.map(function (emoji) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n display: \"flex\",\n flexDirection: \"column\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RadioInput, {\n key: emoji.id,\n name: emoji.name,\n value: emoji.value,\n label: emoji.label,\n isChecked: emoji.isChecked,\n handleChange: function handleChange() {\n return _handleChange(emoji.id);\n }\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"img\", {\n src: emoji.emoji,\n width: \"40\"\n }));\n })));\n};\n\nvar EmojiFormResponse = /*#__PURE__*/function (_React$Component) {\n _inherits(EmojiFormResponse, _React$Component);\n\n var _super = _createSuper(EmojiFormResponse);\n\n // Provide a form-like interface to MTurk interface.\n function EmojiFormResponse(props) {\n var _this;\n\n _classCallCheck(this, EmojiFormResponse);\n\n _this = _super.call(this, props); // At this point it should be assumed that task_data\n // has a field \"respond_with_form\"\n\n var responses = [];\n\n var _iterator = _createForOfIteratorHelper(_this.props.formOptions),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ = _step.value;\n responses.push(\"\");\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n _this.state = {\n responses: responses,\n sending: false\n };\n return _this;\n }\n\n _createClass(EmojiFormResponse, [{\n key: \"tryMessageSend\",\n value: function tryMessageSend() {\n var _this2 = this;\n\n var form_elements = this.props.formOptions;\n var question = form_elements[0][\"question\"];\n var response_data = [];\n var response_text = \"\";\n var all_response_filled = false;\n var answer = \"\";\n\n for (var i = 0; i < emojis.length; i++) {\n var e = emojis[i];\n\n if (e.isChecked) {\n answer = e.value;\n all_response_filled = true;\n }\n }\n\n response_data.push({\n question: question,\n response: answer\n });\n response_data.push({\n question: \"Response Rating\",\n response: \"rating_value\"\n });\n\n for (var ind in form_elements) {\n var _question = form_elements[ind][\"question\"];\n var response = this.state.responses[ind];\n response_data.push({\n question: _question,\n response: response\n });\n response_text += _question + \": \" + response + \"\\n\";\n }\n\n if (!response_data.at(-1).response) {\n all_response_filled = false;\n }\n\n if (all_response_filled && this.props.active && !this.state.sending) {\n this.setState({\n sending: true\n });\n this.props.onMessageSend({\n text: response_text,\n task_data: {\n form_responses: response_data\n }\n }).then(function () {\n return _this2.setState({\n sending: false\n });\n }); // clear answers once sent\n\n this.setState(function (prevState) {\n prevState[\"responses\"].fill(\"\");\n return {\n responses: prevState[\"responses\"]\n };\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var form_elements = this.props.formOptions;\n var listFormElements = form_elements.map(function (form_elem, index) {\n var question = form_elem[\"question\"];\n var form_type = form_elem[\"type\"];\n\n if (form_elem[\"type\"] === \"choices\") {\n var choices = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"option\", {\n key: \"empty_option\"\n })].concat(form_elem[\"choices\"].map(function (option_label, index) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"option\", {\n key: \"option_\" + index.toString()\n }, option_label);\n }));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n key: \"form_el_\" + index\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"p\", null, question), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RadioGroupInput, null));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n key: \"form_el_\" + index\n }, question, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n sm: 11\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n type: \"text\",\n componentClass: \"textarea\",\n placeholder: \"at least 10 words\",\n style: {\n fontSize: \"12px\",\n height: '50px'\n },\n value: _this3.state.responses[index],\n onChange: function onChange(e) {\n var text = e.target.value;\n\n _this3.setState(function (prevState) {\n var new_res = prevState[\"responses\"];\n new_res[index] = text;\n return {\n responses: new_res\n };\n });\n },\n onKeyPress: function onKeyPress(e) {\n if (e.key === \"Enter\") {\n e.preventDefault();\n e.stopPropagation();\n e.nativeEvent.stopImmediatePropagation();\n }\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"hr\", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"hr\", null), question === \"Why/What makes you feel this particular emotion?\" ? \"Please, rate the response of the fellow turker\" : null);\n });\n var submit_button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n className: \"btn btn-primary\",\n style: {\n height: \"30px\",\n width: \"100px\",\n fontSize: \"12px\"\n },\n id: \"id_send_msg_button\",\n disabled: this.state.textval === \"\" || !this.props.active || this.state.sending,\n onClick: function onClick() {\n return _this3.tryMessageSend();\n }\n }, \"Send\");\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n id: \"response-type-text-input\",\n className: \"response-type-module\",\n style: {\n paddingTop: \"15px\",\n \"float\": \"left\",\n width: \"100%\",\n backgroundColor: \"#eeeeee\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n horizontal: true,\n style: {\n backgroundColor: \"#eeeeee\",\n paddingBottom: \"2px\"\n }\n }, listFormElements, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n sm: 6\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n sm: 5\n }, submit_button))));\n }\n }]);\n\n return EmojiFormResponse;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EmojiFormResponse);\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./src/composed/EmojiFormResponse.jsx?"); + +/***/ }), + +/***/ "./src/main.js": +/*!*********************!*\ + !*** ./src/main.js ***! + \*********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var bootstrap_chat_styles_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! bootstrap-chat/styles.css */ \"./node_modules/bootstrap-chat/styles.css\");\n/* harmony import */ var bootstrap_chat_styles_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(bootstrap_chat_styles_css__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _css_custom_styles_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./css/custom-styles.css */ \"./src/css/custom-styles.css\");\n/* harmony import */ var _css_custom_styles_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_css_custom_styles_css__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _composed_AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./composed/AffectiveChatApp.jsx */ \"./src/composed/AffectiveChatApp.jsx\");\n/* harmony import */ var bootstrap_chat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! bootstrap-chat */ \"./node_modules/bootstrap-chat/build/bundle.js\");\n/* harmony import */ var bootstrap_chat__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(bootstrap_chat__WEBPACK_IMPORTED_MODULE_5__);\n/*\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\n\n\n\n\nfunction PrintCaptionData(_ref) {\n var taskContext = _ref.taskContext;\n return taskContext.positive_emoji_url ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"col-lg-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n width: 70,\n height: 70\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"img\", {\n src: taskContext.negative_emoji_url,\n alt: \"Emoji-icon1\",\n style: {\n width: \"100%\",\n height: \"100%\"\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", null, taskContext.negative_emotion_label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h5\", null, taskContext.negative_caption)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"col-lg-6\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n width: 70,\n height: 70\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"img\", {\n src: taskContext.positive_emoji_url,\n alt: \"Emoji-icon2\",\n style: {\n width: \"100%\",\n height: \"100%\"\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h4\", null, taskContext.positive_emotion_label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"h5\", null, taskContext.positive_caption))) : null;\n}\n\nfunction PrintImage(_ref2) {\n var img_src = _ref2.img_src;\n return img_src ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"row\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"col-md-8 offset-md-2\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"img\", {\n src: img_src,\n className: \"mx-auto d-block\",\n alt: \"Image\"\n }))) : null;\n}\n\nfunction ChatMessage(_ref3) {\n var isSelf = _ref3.isSelf,\n idx = _ref3.idx,\n agentName = _ref3.agentName,\n _ref3$message = _ref3.message,\n message = _ref3$message === void 0 ? \"\" : _ref3$message,\n onRadioChange = _ref3.onRadioChange;\n var floatToSide = isSelf ? \"right\" : \"left\";\n var alertStyle = isSelf ? \"alert-info\" : \"alert-warning\";\n\n var handleChange = function handleChange(e) {\n onRadioChange(e.currentTarget.value);\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"row\",\n style: {\n marginLeft: \"0\",\n marginRight: \"0\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n className: \"alert message \" + alertStyle,\n role: \"alert\",\n style: {\n \"float\": floatToSide\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n style: {\n fontSize: \"16px\",\n whiteSpace: \"pre-wrap\"\n }\n }, agentName === \"Chat Agent 1\" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n alignItems: \"center\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n width: 100,\n height: 100\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"img\", {\n src: \"https://affective-dialog.s3.us-west-2.amazonaws.com/assets/Questioner_icon_with_title.png\",\n alt: \"Questioner-icon\",\n style: {\n width: \"100%\",\n height: \"100%\"\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null)), agentName === \"Chat Agent 2\" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n alignItems: \"center\"\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n style: {\n width: 100,\n height: 100\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"img\", {\n src: \"https://affective-dialog.s3.us-west-2.amazonaws.com/assets/Answerer_icon_with_title.png\",\n alt: \"Answerer-icon\",\n style: {\n width: \"100%\",\n height: \"100%\"\n }\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"span\", {\n style: {\n fontSize: \"16px\",\n whiteSpace: \"pre-wrap\"\n },\n dangerouslySetInnerHTML: {\n __html: message\n }\n }))));\n}\n\nfunction RenderChatMessage(_ref4) {\n var message = _ref4.message,\n mephistoContext = _ref4.mephistoContext,\n appContext = _ref4.appContext,\n idx = _ref4.idx;\n var agentId = mephistoContext.agentId;\n var currentAgentNames = appContext.taskContext.currentAgentNames;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n onClick: function onClick() {\n return alert(\"You clicked on message with index \" + idx);\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(ChatMessage, {\n isSelf: message.id === agentId || message.id in currentAgentNames,\n agentName: message.id in currentAgentNames ? currentAgentNames[message.id] : message.id,\n message: message.text,\n taskData: message.task_data,\n messageId: message.update_id\n }));\n}\n\nfunction MainApp() {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_composed_AffectiveChatApp_jsx__WEBPACK_IMPORTED_MODULE_4__.AffectiveChatApp, {\n renderMessage: function renderMessage(_ref5) {\n var message = _ref5.message,\n idx = _ref5.idx,\n mephistoContext = _ref5.mephistoContext,\n appContext = _ref5.appContext;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(RenderChatMessage, {\n message: message,\n mephistoContext: mephistoContext,\n appContext: appContext,\n idx: idx,\n key: message.message_id + \"-\" + idx\n });\n },\n renderSidePane: function renderSidePane(_ref6) {\n var _ref6$mephistoContext = _ref6.mephistoContext,\n taskConfig = _ref6$mephistoContext.taskConfig,\n agentId = _ref6$mephistoContext.agentId,\n taskContext = _ref6.appContext.taskContext;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(bootstrap_chat__WEBPACK_IMPORTED_MODULE_5__.DefaultTaskDescription, {\n chatTitle: taskConfig.chat_title,\n taskDescriptionHtml: taskConfig.task_description\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"br\", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"hr\", null), agentId.includes(\"onboarding\") ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(PrintCaptionData, {\n taskContext: taskContext\n }), agentId.includes(\"onboarding\") ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(PrintImage, {\n img_src: taskContext.image_src\n }));\n }\n });\n}\n\nreact_dom__WEBPACK_IMPORTED_MODULE_1__.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(MainApp, null), document.getElementById(\"app\"));\n\n//# sourceURL=webpack://parlai-mturk-task-compiler/./src/main.js?"); + +/***/ }), + +/***/ "./node_modules/bootstrap-chat/build/bundle.js": +/*!*****************************************************!*\ + !*** ./node_modules/bootstrap-chat/build/bundle.js ***! + \*****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +eval("/*! For license information please see bundle.js.LICENSE.txt */\n!function(e,t){ true?module.exports=t(__webpack_require__(/*! react */ \"./node_modules/react/index.js\"),__webpack_require__(/*! mephisto-task */ \"./node_modules/mephisto-task/build/bundle.js\"),__webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\")):0}(self,(function(e,t,n){return(()=>{var r={1760:(e,t,n)=>{(t=n(1817)(!1)).push([e.id,\".rc-slider {\\n position: relative;\\n height: 14px;\\n padding: 5px 0;\\n width: 100%;\\n border-radius: 6px;\\n touch-action: none;\\n box-sizing: border-box;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n}\\n.rc-slider * {\\n box-sizing: border-box;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n}\\n.rc-slider-rail {\\n position: absolute;\\n width: 100%;\\n background-color: #e9e9e9;\\n height: 4px;\\n border-radius: 6px;\\n}\\n.rc-slider-track {\\n position: absolute;\\n left: 0;\\n height: 4px;\\n border-radius: 6px;\\n background-color: #abe2fb;\\n}\\n.rc-slider-handle {\\n position: absolute;\\n width: 14px;\\n height: 14px;\\n cursor: pointer;\\n cursor: -webkit-grab;\\n margin-top: -5px;\\n cursor: grab;\\n border-radius: 50%;\\n border: solid 2px #96dbfa;\\n background-color: #fff;\\n touch-action: pan-x;\\n}\\n.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging {\\n border-color: #57c5f7;\\n box-shadow: 0 0 0 5px #96dbfa;\\n}\\n.rc-slider-handle:focus {\\n outline: none;\\n}\\n.rc-slider-handle-click-focused:focus {\\n border-color: #96dbfa;\\n box-shadow: unset;\\n}\\n.rc-slider-handle:hover {\\n border-color: #57c5f7;\\n}\\n.rc-slider-handle:active {\\n border-color: #57c5f7;\\n box-shadow: 0 0 5px #57c5f7;\\n cursor: -webkit-grabbing;\\n cursor: grabbing;\\n}\\n.rc-slider-mark {\\n position: absolute;\\n top: 18px;\\n left: 0;\\n width: 100%;\\n font-size: 12px;\\n}\\n.rc-slider-mark-text {\\n position: absolute;\\n display: inline-block;\\n vertical-align: middle;\\n text-align: center;\\n cursor: pointer;\\n color: #999;\\n}\\n.rc-slider-mark-text-active {\\n color: #666;\\n}\\n.rc-slider-step {\\n position: absolute;\\n width: 100%;\\n height: 4px;\\n background: transparent;\\n}\\n.rc-slider-dot {\\n position: absolute;\\n bottom: -2px;\\n margin-left: -4px;\\n width: 8px;\\n height: 8px;\\n border: 2px solid #e9e9e9;\\n background-color: #fff;\\n cursor: pointer;\\n border-radius: 50%;\\n vertical-align: middle;\\n}\\n.rc-slider-dot-active {\\n border-color: #96dbfa;\\n}\\n.rc-slider-dot-reverse {\\n margin-right: -4px;\\n}\\n.rc-slider-disabled {\\n background-color: #e9e9e9;\\n}\\n.rc-slider-disabled .rc-slider-track {\\n background-color: #ccc;\\n}\\n.rc-slider-disabled .rc-slider-handle,\\n.rc-slider-disabled .rc-slider-dot {\\n border-color: #ccc;\\n box-shadow: none;\\n background-color: #fff;\\n cursor: not-allowed;\\n}\\n.rc-slider-disabled .rc-slider-mark-text,\\n.rc-slider-disabled .rc-slider-dot {\\n cursor: not-allowed !important;\\n}\\n.rc-slider-vertical {\\n width: 14px;\\n height: 100%;\\n padding: 0 5px;\\n}\\n.rc-slider-vertical .rc-slider-rail {\\n height: 100%;\\n width: 4px;\\n}\\n.rc-slider-vertical .rc-slider-track {\\n left: 5px;\\n bottom: 0;\\n width: 4px;\\n}\\n.rc-slider-vertical .rc-slider-handle {\\n margin-left: -5px;\\n touch-action: pan-y;\\n}\\n.rc-slider-vertical .rc-slider-mark {\\n top: 0;\\n left: 18px;\\n height: 100%;\\n}\\n.rc-slider-vertical .rc-slider-step {\\n height: 100%;\\n width: 4px;\\n}\\n.rc-slider-vertical .rc-slider-dot {\\n left: 2px;\\n margin-bottom: -4px;\\n}\\n.rc-slider-vertical .rc-slider-dot:first-child {\\n margin-bottom: -4px;\\n}\\n.rc-slider-vertical .rc-slider-dot:last-child {\\n margin-bottom: -4px;\\n}\\n.rc-slider-tooltip-zoom-down-enter,\\n.rc-slider-tooltip-zoom-down-appear {\\n animation-duration: 0.3s;\\n animation-fill-mode: both;\\n display: block !important;\\n animation-play-state: paused;\\n}\\n.rc-slider-tooltip-zoom-down-leave {\\n animation-duration: 0.3s;\\n animation-fill-mode: both;\\n display: block !important;\\n animation-play-state: paused;\\n}\\n.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,\\n.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {\\n animation-name: rcSliderTooltipZoomDownIn;\\n animation-play-state: running;\\n}\\n.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {\\n animation-name: rcSliderTooltipZoomDownOut;\\n animation-play-state: running;\\n}\\n.rc-slider-tooltip-zoom-down-enter,\\n.rc-slider-tooltip-zoom-down-appear {\\n transform: scale(0, 0);\\n animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);\\n}\\n.rc-slider-tooltip-zoom-down-leave {\\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\\n}\\n@keyframes rcSliderTooltipZoomDownIn {\\n 0% {\\n opacity: 0;\\n transform-origin: 50% 100%;\\n transform: scale(0, 0);\\n }\\n 100% {\\n transform-origin: 50% 100%;\\n transform: scale(1, 1);\\n }\\n}\\n@keyframes rcSliderTooltipZoomDownOut {\\n 0% {\\n transform-origin: 50% 100%;\\n transform: scale(1, 1);\\n }\\n 100% {\\n opacity: 0;\\n transform-origin: 50% 100%;\\n transform: scale(0, 0);\\n }\\n}\\n.rc-slider-tooltip {\\n position: absolute;\\n left: -9999px;\\n top: -9999px;\\n visibility: visible;\\n box-sizing: border-box;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n}\\n.rc-slider-tooltip * {\\n box-sizing: border-box;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n}\\n.rc-slider-tooltip-hidden {\\n display: none;\\n}\\n.rc-slider-tooltip-placement-top {\\n padding: 4px 0 8px 0;\\n}\\n.rc-slider-tooltip-inner {\\n padding: 6px 2px;\\n min-width: 24px;\\n height: 24px;\\n font-size: 12px;\\n line-height: 1;\\n color: #fff;\\n text-align: center;\\n text-decoration: none;\\n background-color: #6c6c6c;\\n border-radius: 6px;\\n box-shadow: 0 0 4px #d9d9d9;\\n}\\n.rc-slider-tooltip-arrow {\\n position: absolute;\\n width: 0;\\n height: 0;\\n border-color: transparent;\\n border-style: solid;\\n}\\n.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {\\n bottom: 4px;\\n left: 50%;\\n margin-left: -4px;\\n border-width: 4px 4px 0;\\n border-top-color: #6c6c6c;\\n}\\n\",\"\"]),e.exports=t},1817:e=>{\"use strict\";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,o,i=e[1]||\"\",a=e[3];if(!a)return i;if(t&&\"function\"==typeof btoa){var s=(n=a,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o=\"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(r),\"/*# \".concat(o,\" */\")),u=a.sources.map((function(e){return\"/*# sourceURL=\".concat(a.sourceRoot||\"\").concat(e,\" */\")}));return[i].concat(u).concat([s]).join(\"\\n\")}return[i].join(\"\\n\")}(t,e);return t[2]?\"@media \".concat(t[2],\" {\").concat(n,\"}\"):n})).join(\"\")},t.i=function(e,n,r){\"string\"==typeof e&&(e=[[null,e,\"\"]]);var o={};if(r)for(var i=0;i