{ "version": 3, "sources": ["../../javascript/utils/element_i18n.js", "../../javascript/web_components/audio_recorder.js", "../../javascript/utils/time_to_string.js", "../../javascript/web_components/audio_player.js", "../../javascript/web_components/custom_select.js", "../../javascript/web_components/tags_input.js", "../../javascript/web_components/topics_select.js"], "sourcesContent": ["// The copy a web component renders, read from its own `data-i18n` attribute and laid over the\n// Spanish defaults the class ships. A component renders before Rails can reach it, so a missing or\n// malformed attribute must still leave it readable.\nexport default function elementI18n(element, defaults) {\n const attribute = element.getAttribute('data-i18n');\n if (!attribute) return defaults;\n\n try {\n return { ...defaults, ...JSON.parse(attribute) };\n } catch {\n return defaults;\n }\n}\n", "import elementI18n from '../utils/element_i18n';\n\nclass AudioRecorder extends HTMLElement {\n static formAssociated = true;\n\n static isSupported() {\n return (\n typeof window !== \"undefined\" &&\n window.MediaRecorder &&\n MediaRecorder.isTypeSupported(\"audio/webm;codecs=opus\")\n );\n }\n\n static defaultI18n = {\n unsupported: \"Tu navegador no soporta la grabaci\u00F3n de audio. Por favor usa Chrome, Firefox o Edge.\",\n microphoneRequired: \"Se requiere acceso al micr\u00F3fono\",\n microphoneRequiredHelp: \"Por favor permit\u00ED el acceso al micr\u00F3fono en la configuraci\u00F3n de tu navegador y recarg\u00E1 la p\u00E1gina.\",\n microphoneBusy: \"No pudimos usar tu micr\u00F3fono\",\n microphoneBusyHelp: \"Otra aplicaci\u00F3n puede estar us\u00E1ndolo. Cerrala y volv\u00E9 a intentar.\",\n microphoneMissing: \"No encontramos un micr\u00F3fono\",\n microphoneMissingHelp: \"Conect\u00E1 un micr\u00F3fono y volv\u00E9 a intentar.\",\n microphoneFailed: \"No pudimos empezar a grabar\",\n microphoneFailedHelp: \"Volv\u00E9 a intentar. Si sigue fallando, prob\u00E1 con otro navegador.\",\n recordingRequired: \"Por favor grab\u00E1 un audio antes de enviar\",\n record: \"Grabar\",\n cancel: \"Cancelar\",\n stop: \"Detener\",\n discard: \"Descartar\",\n play: \"Reproducir\",\n pause: \"Pausar\",\n reRecord: \"Volver a grabar\"\n };\n\n // getUserMedia rejects with a DOMException whose `name` states the cause. NotReadableError is a\n // device failure and never a permission failure, so sending that student to her browser settings\n // points her at a setting that is already correct.\n // Each value names a copy pair: the title itself and `