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,cAAc,cAAcM,eAAe,CAAEC,SAAU,SAAUC,MAAO,UAAW,IAE7FxQ,OAAOC,IACNC,QAAQC,IAAIF,GACZwP,EAAQY,eAAc,GACtBZ,EAAQW,UAAU,CAAEvH,OAAQ,CAAC,yDAC7BkH,SAASC,cAAc,QAAQM,eAAe,CAAEC,SAAU,SAAUC,MAAO,UAAW,GACtF,IASAC,GACAvU,EAAAA,cAACoH,EAAeP,OAAA2N,OAAA,GAAKD,EAAW,CAAEhM,KAAMA,EAAMY,UAAWA,GAAe5H,KAEnE,EDzQ8CkT,UAAW,6BAE3DC,SAASC,IAClB,MAAMC,EAAUf,SAASgB,eAAeF,EAAUF,WAClD,GAAgB,OAAZG,EAAkB,OACtB,MAAMvN,EAAYsN,EAAUpP,UACtBhE,EAAQuT,KAAKC,MAAMH,EAAQI,QAAQzT,OACzB,OAAZqT,GACFK,EAAAA,OAAgBjV,EAAAA,cAACqH,EAAc9F,GAAWqT,EAC5C,IAIef,SAASqB,iBAAiB,2BAClCR,SAASE,GAAYA,EAAQO,aAAa,iBAAiB,I","sources":["webpack://marmosetmusic/./app/assets/javascripts/source/shared/icons/CircleX.js","webpack://marmosetmusic/./app/assets/javascripts/source/admin/pages/song_version_form/styles/UploadedFile.module.scss?89fe","webpack://marmosetmusic/./app/assets/javascripts/source/admin/pages/song_version_form/components/UploadedFile.js","webpack://marmosetmusic/./app/assets/javascripts/source/shared/components/CheckboxGroupField.js","webpack://marmosetmusic/./app/assets/javascripts/source/shared/styles/adminButtons.module.scss?0cc2","webpack://marmosetmusic/./app/assets/javascripts/source/admin/pages/song_version_form/styles/VendorCreditsForm.module.scss?0d9b","webpack://marmosetmusic/./app/assets/javascripts/source/admin/pages/song_version_form/components/VendorCreditsForm.js","webpack://marmosetmusic/./app/assets/javascripts/source/admin/pages/song_version_form/components/CurrentAudioFile.js","webpack://marmosetmusic/./app/assets/javascripts/source/admin/pages/song_version_form/components/ContributorForm.js","webpack://marmosetmusic/./app/assets/javascripts/source/admin/pages/song_version_form/components/PublisherForm.js","webpack://marmosetmusic/./app/assets/javascripts/source/admin/pages/song_version_form/components/SongVersionForm.js","webpack://marmosetmusic/./app/assets/javascripts/source/admin.js","webpack://marmosetmusic/./app/assets/javascripts/source/admin/pages/song_version_form/SongVersionFormContainer.js"],"sourcesContent":["import React from \"react\"\n\nconst CircleX = ({ handleOnClick }) => {\n return (\n \n \n \n \n \n \n )\n}\n\nCircleX.defaultProps = {\n handleOnClick: () => false,\n}\n\nexport default CircleX\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"UploadedFile-module_wrapper__K9_lX\",\"fileName\":\"UploadedFile-module_fileName__ZwjOY\"};","import React from \"react\"\nimport CircleX from \"../../../../shared/icons/CircleX\"\nimport styles from \"../styles/UploadedFile.module.scss\"\n\nconst UploadedFile = ({ fileName, removeFile, type }) => {\n const fileUploaded = ![\"\", undefined].includes(fileName)\n\n return (\n \n {`${fileName}`}\n {fileUploaded && removeFile(type)} />}\n \n )\n}\n\nUploadedFile.defaultProps = {\n fileName: \"\",\n type: \"\",\n}\n\nexport default UploadedFile\n","import React from \"react\"\nimport { Field } from \"formik\"\nimport cx from \"classnames\"\nimport styles from \"../styles/CheckboxField.module.scss\"\nimport formStyles from \"../styles/form.module.scss\"\n\nconst CheckboxGroupField = (props) => {\n const { admin, name, disabled, formDataArray, values, arrayHelpers, showToggleAll } = props\n\n const toggleAll = (event) => {\n const { checked } = event.target\n const allOrNothing = checked ? formDataArray.map((f) => f.value) : []\n arrayHelpers.form.setFieldValue(name, allOrNothing)\n }\n\n return (\n
\n {showToggleAll && (\n \n toggleAll(e)}\n checked={arrayHelpers.form.values[name].length === formDataArray.length}\n data-cy=\"toggle-all\"\n />\n toggle all\n \n )}\n\n {formDataArray.map((f, index) => (\n \n {\n const values = arrayHelpers.form.values[name]\n\n if (values.includes(f.value)) {\n const indexPosition = values.indexOf(f.value)\n arrayHelpers.remove(indexPosition)\n } else {\n arrayHelpers.push(f.value)\n }\n }}\n />\n {f.label}\n \n ))}\n
\n )\n}\n\nCheckboxGroupField.defaultProps = {\n admin: false,\n disabled: false,\n showToggleAll: false,\n}\n\nexport default CheckboxGroupField\n","// extracted by mini-css-extract-plugin\nexport default {\"button\":\"adminButtons-module_button__hpaSl\",\"black\":\"adminButtons-module_black__NXenc adminButtons-module_button__hpaSl\"};","// extracted by mini-css-extract-plugin\nexport default {\"form\":\"VendorCreditsForm-module_form__e5jIW\",\"remove\":\"VendorCreditsForm-module_remove__xevNS\",\"cornerLabel\":\"VendorCreditsForm-module_cornerLabel__u0bXE\"};","import React from \"react\"\nimport axios from \"axios\"\nimport cx from \"classnames\"\nimport { Field, ErrorMessage } from \"formik\"\nimport debounce from \"debounce-promise\"\nimport AsyncSelectField from \"../../../../shared/components/AsyncSelectField\"\nimport buttonStyles from \"../../../../shared/styles/adminButtons.module.scss\"\nimport formStyles from \"../../../../shared/styles/form.module.scss\"\nimport styles from \"../styles/VendorCreditsForm.module.scss\"\n\nconst VendorCreditsForm = ({ form, push, remove }) => {\n const searchVendors = async (query) => {\n return await axios\n .get(\"/api/v1/vendors/autocomplete\", { params: { query } })\n .then((response) => response.data)\n .catch((error) => {\n console.log(error)\n return []\n })\n }\n\n const setValueAndSplit = (fieldName, selectedValue) => {\n form.setFieldValue(fieldName, selectedValue)\n const splitInfo = selectedValue.label.match(/\\(split\\:\\s+([\\d\\.]+)/)\n const split = splitInfo !== null ? parseFloat(splitInfo[1]) : \"\"\n\n if (typeof split === \"number\") {\n const splitFieldName = fieldName.replace(\"vendor_id\", \"split\")\n form.setFieldValue(splitFieldName, split)\n }\n }\n\n return (\n
\n {form.values.credits_attributes.length > 0 &&\n form.values.credits_attributes.map((creditAttr, index) => (\n
\n
\n {creditAttr.id === \"\" && (\n remove(index)}\n data-cy={`remove-credit-${index}`}\n >\n X\n \n )}\n
\n \n \n
\n \n \n \n {creditAttr.id !== \"\" && (\n \n )}\n
\n
\n ))}\n push({ id: \"\", vendor_id: \"\", split: \"\", _destroy: false })}\n >\n Add Credit\n \n
\n )\n}\n\nexport default VendorCreditsForm\n","import React from \"react\"\n\nconst CurrentAudioFile = ({ source, filename }) => {\n return (\n
\n File:\n {filename}\n \n
\n )\n}\n\nexport default CurrentAudioFile\n","import React, { useState } from \"react\"\nimport axios from \"axios\"\nimport cx from \"classnames\"\nimport { Field, ErrorMessage } from \"formik\"\nimport debounce from \"debounce-promise\"\nimport AsyncSelectField from \"../../../../shared/components/AsyncSelectField\"\nimport buttonStyles from \"../../../../shared/styles/adminButtons.module.scss\"\nimport formStyles from \"../../../../shared/styles/form.module.scss\"\nimport styles from \"../styles/VendorCreditsForm.module.scss\"\n\nconst ContributorForm = ({ form, push, remove }) => {\n const searchContributors = async (query) => {\n return await axios\n .get(\"/api/v1/contributors/autocomplete\", { params: { query } })\n .then((response) => response.data)\n .catch((error) => {\n console.log(error)\n return []\n })\n }\n\n const setValueAndSplit = (fieldName, selectedValue) => {\n console.log(fieldName, selectedValue)\n form.setFieldValue(fieldName, selectedValue)\n const shareInfo = selectedValue.label.match(/\\(share\\:\\s+([\\d\\.]+)/)\n const share = shareInfo !== null ? parseFloat(shareInfo[1]) : \"\"\n\n if (typeof share === \"number\") {\n const shareFieldName = fieldName.replace(\"contributor_id\", \"share\")\n form.setFieldValue(shareFieldName, share)\n }\n }\n return (\n
\n
\n \n You can{\" \"}\n \n create a New Contributor\n {\" \"}\n here\n \n
\n {form.values.song_version_contributors_attributes.length > 0 &&\n form.values.song_version_contributors_attributes.map((contributorAttr, index) => (\n
\n
\n {contributorAttr.id === \"\" && (\n remove(index)}\n data-cy={`remove-contributor-${index}`}\n >\n X\n \n )}\n
\n \n \n\n
\n \n \n \n
\n\n
\n \n \n \n {contributorAttr.id !== \"\" && (\n \n )}\n
\n
\n ))}\n push({ id: \"\", contributor_id: \"\", share: \"\", _destroy: false })}\n >\n Add Contributor\n \n
\n )\n}\n\nexport default ContributorForm\n","import React from \"react\"\nimport axios from \"axios\"\nimport cx from \"classnames\"\nimport { Field, ErrorMessage } from \"formik\"\nimport debounce from \"debounce-promise\"\nimport AsyncSelectField from \"../../../../shared/components/AsyncSelectField\"\nimport SelectField from \"../../../../shared/components/SelectField\"\nimport styles from \"../styles/VendorCreditsForm.module.scss\"\nimport buttonStyles from \"../../../../shared/styles/adminButtons.module.scss\"\nimport formStyles from \"../../../../shared/styles/form.module.scss\"\n\nconst PublisherForm = ({ form, push, remove }) => {\n const contributorOptions = form.values.song_version_contributors_attributes.map((contributor) =>\n Object({ label: contributor.contributor_id.label, value: contributor.contributor_id.value })\n )\n\n const searchPublishers = async (query) => {\n return await axios\n .get(\"/api/v1/publishers/autocomplete\", { params: { query } })\n .then((response) => response.data)\n .catch((error) => {\n console.log(error)\n return []\n })\n }\n const setValueAndSplit = (fieldName, selectedValue) => {\n form.setFieldValue(fieldName, selectedValue)\n const shareInfo = selectedValue.label.match(/\\(share\\:\\s+([\\d\\.]+)/)\n const share = shareInfo !== null ? parseFloat(shareInfo[1]) : \"\"\n\n if (typeof share === \"number\") {\n const shareFieldName = fieldName.replace(\"publisher_id\", \"share\")\n form.setFieldValue(shareFieldName, share)\n }\n }\n return (\n
\n
\n \n You can{\" \"}\n \n create a New Publisher\n {\" \"}\n here\n \n
\n {form.values.song_version_publishers_attributes.length > 0 &&\n form.values.song_version_publishers_attributes.map((publisherAttr, index) => (\n
\n
\n {publisherAttr.id === \"\" && (\n remove(index)}\n data-cy={`remove-publisher-${index}`}\n >\n X\n \n )}\n
\n \n\n \n \n\n
\n \n \n \n
\n\n
\n \n \n \n {publisherAttr.id !== \"\" && (\n \n )}\n
\n
\n ))}\n \n push({ id: \"\", publisher_id: \"\", contributor_id: \"\", share: \"\", _destroy: false })\n }\n >\n Add Publisher\n \n
\n )\n}\n\nexport default PublisherForm\n","import React, { Component, Fragment } from \"react\"\nimport axios from \"axios\"\nimport debounce from \"debounce-promise\"\nimport AwsS3 from \"@uppy/aws-s3\"\nimport { StatusBar } from \"@uppy/react\"\nimport { DragDrop } from \"@uppy/react\"\nimport { Form, ErrorMessage } from \"formik\"\nimport { Field, FieldArray } from \"formik\"\nimport { clearUrlQuery } from \"../../../../shared/utils/helpers\"\nimport UploadedFile from \"./UploadedFile\"\nimport SelectField from \"../../../../shared/components/SelectField\"\nimport CreatableSelectField from \"../../../../shared/components/CreatableSelectField\"\nimport AsyncSelectField from \"../../../../shared/components/AsyncSelectField\"\nimport TextField from \"../../../../shared/components/TextField\"\nimport TextAreaField from \"../../../../shared/components/TextAreaField\"\nimport CheckboxField from \"../../../../shared/components/CheckboxField\"\nimport CheckboxGroupField from \"../../../../shared/components/CheckboxGroupField\"\nimport VendorCreditsForm from \"./VendorCreditsForm\"\nimport ScrollToError from \"../../../../shared/components/ScrollToError\"\nimport CurrentAudioFile from \"./CurrentAudioFile\"\nimport FormFlashMsg from \"../../../../shared/components/FormFlashMsg\"\nimport buttonStyles from \"../../../../shared/styles/adminButtons.module.scss\"\nimport ContributorForm from \"./ContributorForm\"\nimport PublisherForm from \"./PublisherForm\"\n\nclass SongVersionForm extends Component {\n state = {\n fileName: \"\",\n albumfileName: \"\", // keep \"file\" lowercase for removeFile function\n showAlbumUpload: false,\n allArtistSongs: [],\n allSongSongVersions: [],\n allArtistAlbums: [],\n selectIsLoading: [],\n artistCollabState: this.props.values.artist_collab || false,\n }\n\n componentDidMount = () => {\n if (window.location.search.length > 0) clearUrlQuery()\n\n const presignedPostUrl = \"/admin/s3_presigned_post\"\n const parentScope = this\n\n this.props.uppy\n .use(AwsS3, {\n getUploadParameters(file) {\n parentScope.setState({ fileName: file.name })\n\n return axios\n .get(presignedPostUrl, { params: { bucket: \"song-versions\" } })\n .then(({ data }) => {\n const { url, fields } = data\n return { method: \"post\", url, fields }\n })\n },\n })\n .on(\"upload-success\", (file, response) => {\n parentScope.props.setFieldValue(\"server_filename\", file.name)\n parentScope.props.setFieldValue(\"remote_file_url\", response.body.location)\n })\n .on(\"cancel-all\", () => {\n parentScope.setState({ fileName: \"\" })\n })\n\n this.props.albumUppy\n .use(AwsS3, {\n getUploadParameters(file) {\n parentScope.setState({ albumfileName: file.name })\n\n return axios\n .get(presignedPostUrl, { params: { bucket: \"album-art\" } })\n .then(({ data }) => {\n const { url, fields } = data\n return { method: \"post\", url, fields }\n })\n },\n })\n .on(\"upload-success\", (_, response) => {\n parentScope.props.setFieldValue(\"remote_art_url\", response.body.location)\n })\n .on(\"cancel-all\", () => {\n parentScope.setState({ albumfileName: \"\" })\n })\n }\n\n componentDidUpdate(prevProps) {\n const { album_id, artist_id, song_id } = this.props.values\n\n if (artist_id !== \"\" && artist_id !== prevProps.values.artist_id) {\n this.getAllArtistSongs(artist_id)\n this.getAllArtistAlbums(artist_id)\n }\n if (![\"\", null].includes(song_id) && song_id !== prevProps.values.song_id)\n this.getAllSongSongVersions(song_id)\n if (artist_id !== \"\" && [\"\", null].includes(song_id) && song_id !== prevProps.values.song_id)\n this.getAllArtistSongs(artist_id)\n if (artist_id !== \"\" && [\"\", null].includes(album_id) && album_id !== prevProps.values.album_id)\n this.getAllArtistAlbums(artist_id)\n if ([\"\", null].includes(song_id) && song_id !== prevProps.values.song_id)\n this.setState({ allSongSongVersions: [], artistCollabState: false })\n }\n\n componentWillUnmount() {\n this.props.uppy.close()\n this.props.albumUppy.close()\n }\n\n getAllArtistSongs = (artistId) => {\n this.setState({\n selectIsLoading: [...this.state.selectIsLoading, \"song_id\"],\n })\n\n axios.get(`/api/v1/artists/${artistId.value}/songs_autocomplete`).then((response) => {\n const filteredArr = this.state.selectIsLoading.filter((str) => str !== \"song_id\")\n\n this.setState({\n allArtistSongs: response.data,\n selectIsLoading: filteredArr,\n })\n })\n }\n\n getAllArtistAlbums = (artistId) => {\n this.setState({\n selectIsLoading: [...this.state.selectIsLoading, \"album_id\"],\n })\n\n axios.get(`/api/v1/artists/${artistId.value}/albums_autocomplete`).then((response) => {\n const filteredArr = this.state.selectIsLoading.filter((str) => str !== \"album_id\")\n\n this.setState({\n allArtistAlbums: response.data,\n selectIsLoading: filteredArr,\n })\n })\n }\n\n getAllSongSongVersions = (songId) => {\n if (songId.__isNew__) return false\n this.setState({\n selectIsLoading: [...this.state.selectIsLoading, \"duplicate_song_version_id\"],\n })\n\n axios.get(`/api/v1/songs/${songId.value}/song_versions_autocomplete`).then((response) => {\n const filteredArr = this.state.selectIsLoading.filter(\n (str) => str !== \"duplicate_song_version_id\"\n )\n\n this.setState({\n allSongSongVersions: response.data,\n selectIsLoading: filteredArr,\n })\n })\n }\n searchStation = async (query) => {\n return await axios\n .get(\"/api/v1/stations/autocomplete\", { params: { query } })\n .then((response) => response.data)\n .catch((error) => {\n console.log(error)\n return []\n })\n }\n\n searchArtist = async (query) => {\n return await axios\n .get(\"/api/v1/artists/autocomplete\", { params: { query } })\n .then((response) => response.data)\n .catch((error) => {\n console.log(error)\n return []\n })\n }\n\n searchVendors = async (query) => {\n return await axios\n .get(\"/api/v1/vendors/autocomplete\", { params: { query } })\n .then((response) => response.data)\n .catch((error) => {\n console.log(error)\n return []\n })\n }\n\n genresWithoutPrimary = () => {\n const { values, form_data } = this.props\n const primaryGenre = values.primary_genre_list.value\n return form_data.genres.filter((genre) => genre.value !== primaryGenre)\n }\n\n handleTwoCalls = (field, val) => {\n const { artist_collab } = this.props.values\n if (artist_collab) {\n this.setState({ artistCollabState: artist_collab })\n }\n this.props.setFieldValue(field, val)\n }\n\n handleDuplicate = (field, val) => {\n const safeValue = val || \"\"\n this.props.setFieldValue(field, safeValue)\n if (val === null) return false\n\n axios\n .get(`/api/v1/song_versions/${val.value}/duplicate`)\n .then((response) => {\n // setValues overrides all form values, present or not\n // so these values get merged to prevent that (audio and album file upload)\n const { remote_art_url, remote_file_url, server_filename } = this.props.values\n this.props.setValues({\n ...response.data.song_version,\n remote_art_url,\n remote_file_url,\n server_filename,\n })\n })\n .catch((error) => console.log(error))\n }\n\n handleAlbumCreate = (value) => {\n this.setState({ showAlbumUpload: true })\n this.props.setFieldValue(\"album_id\", {\n __isNew__: true,\n label: value,\n value,\n })\n }\n\n removeFile = (fileType) => {\n const album = fileType === \"album\"\n const uppyInstance = album ? this.props.albumUppy : this.props.uppy\n const remoteUrlKey = album ? \"remote_art_url\" : \"remote_file_url\"\n\n uppyInstance.reset()\n this.setState({ [`${fileType}fileName`]: \"\" })\n this.props.setFieldValue(remoteUrlKey, \"\")\n if (!album) this.props.setFieldValue(\"server_filename\", \"\")\n }\n\n render() {\n const {\n values,\n setFieldValue,\n setFieldTouched,\n isSubmitting,\n form_data,\n status,\n uppy,\n albumUppy,\n errors,\n admin_user,\n } = this.props\n const { album_id, song_id, state } = values\n const { fileName, albumfileName, showAlbumUpload } = this.state\n const disableArtistCollabField = song_id && typeof values.song_id.value === \"number\"\n const showCreateAlbumFields = album_id && album_id.__isNew__ && showAlbumUpload\n const showStateField = (state.value === \"deleted\" && admin_user) || state.value !== \"deleted\"\n const isInExclusivity = [\"partially_exclusive\", \"archived_exclusive\"].includes(state.value)\n\n return (\n
\n {status && status.success && (\n \n {status.message} click here to view it in the portal\n \n )}\n {errors.server && }\n \n\n
\n File Upload\n \n {!form_data.new_record && (\n \n )}\n \n \n \n
\n\n
\n Basic Information\n \n \n\n
\n \n {/* Only shows the song edit link if a song is already associated */}\n

\n {disableArtistCollabField && (\n \n \n To change if artist collab, edit parent \n \n Song\n \n . After updating, refresh this edit form to apply the change.\n \n \n )}\n

\n
\n\n \n \n \n \n \n \n \n \n\n {showCreateAlbumFields && (\n \n \n \n \n \n \n \n )}\n\n \n
\n\n
\n tags\n \n \n {values.cyanite_id != \"\" && (\n
\n \n {values.cyanite_genre_list}\n
\n )}\n \n {values.cyanite_id != \"\" && (\n
\n \n {values.cyanite_instrument_list}\n
\n )}\n \n {values.cyanite_id != \"\" && (\n
\n \n {values.cyanite_keyword_list}\n
\n )}\n \n \n
\n\n
\n flags\n \n \n \n \n \n \n \n \n
\n\n
\n Vendor Credits\n \n
\n\n
\n Contributor Information\n \n
\n\n
\n Publisher Information\n \n
\n\n
\n licensing\n \n {(arrayHelpers) => (\n \n )}\n \n
\n\n
\n other\n \n \n \n {showStateField && (\n \n )}\n
\n\n \n {isSubmitting ? \"saving\" : \"save\"}\n \n \n \n )\n }\n}\n\nexport default SongVersionForm\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport SongVersionFormContainer from \"./admin/pages/song_version_form/SongVersionFormContainer\"\n\nconst containers = [{ component: SongVersionFormContainer, elementId: \"songVersionFormContainer\" }]\n\ncontainers.forEach((container) => {\n const element = document.getElementById(container.elementId)\n if (element === null) return\n const Component = container.component\n const props = JSON.parse(element.dataset.props)\n if (element !== null) {\n ReactDOM.render(, element)\n }\n})\n\n// Disable LastPass extension for React-Select inputs due to rendering quirks\nconst elements = document.querySelectorAll(\"input[id^=react-select]\")\nelements.forEach((element) => element.setAttribute(\"data-lpignore\", true))\n","import React from \"react\"\nimport { Formik } from \"formik\"\nimport Uppy from \"@uppy/core\"\nimport axios from \"axios\"\nimport * as yup from \"yup\"\nimport SongVersionForm from \"./components/SongVersionForm\"\nimport { songVersionParams } from \"../../../shared/utils/paramModifiers\"\n\nconst SongVersionFormContainer = (props) => {\n const { song_version, form_data } = props\n const allLicenseVersionIds = form_data.license_versions.map((l) => l.value)\n const uppy = Uppy({\n autoProceed: true,\n allowMultipleUploads: false,\n restrictions: {\n maxNumberOfFiles: 1,\n allowedFileTypes: [\".mp3\", \".wav\", \".aif\", \".aiff\"],\n },\n onBeforeFileAdded(file) {\n file.name = file.name.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\")\n },\n })\n\n const albumUppy = Uppy({\n autoProceed: true,\n allowMultipleUploads: false,\n restrictions: {\n maxNumberOfFiles: 1,\n allowedFileTypes: [\"image/*\"],\n },\n })\n\n const removeDuplicates = (string) => {\n return [...new Set(string.split(\",\"))].toString()\n }\n\n const initialValues = (songVersion) => {\n return {\n id: songVersion.id || \"\",\n cyanite_id: songVersion.cyanite_id || \"\",\n remote_file_url: \"\",\n server_filename: songVersion.server_filename || \"\",\n title: songVersion.title || \"\",\n composer: songVersion.composer || \"\",\n publisher: songVersion.publisher || \"\",\n work_number: songVersion.work_number || \"\",\n release_year: songVersion.release_year || \"\",\n artist_id: songVersion.artist_id || \"\",\n song_id: songVersion.song_id || \"\",\n duplicate_song_version_id: songVersion.duplicate_song_version_id || \"\",\n album_id: songVersion.album_id || \"\",\n remote_art_url: \"\",\n station_list: songVersion.station_list || [],\n primary_genre_list: songVersion.primary_genre_list || \"\",\n genre_list: songVersion.genre_list || [],\n cyanite_genre_list: songVersion.cyanite_genre_list,\n mp3_genres: songVersion.mp3_genres || \"\",\n instrument_list: songVersion.instrument_list || [],\n cyanite_instrument_list: songVersion.cyanite_instrument_list,\n keyword_list: songVersion.keyword_list || [],\n cyanite_keyword_list: songVersion.cyanite_keyword_list\n ? removeDuplicates(songVersion.cyanite_keyword_list)\n : \"\",\n energy: songVersion.energy || \"\",\n arc: songVersion.arc || \"\",\n top_position: songVersion.top_position || false,\n artist_collab: songVersion.artist_collab || false,\n staff_pick: songVersion.staff_pick || false,\n customizable: songVersion.customizable || false,\n is_pub_admin: songVersion.is_pub_admin || false,\n in_track_club: songVersion.in_track_club || false,\n instrumental: songVersion.instrumental || false,\n male_vocals: songVersion.male_vocals || false,\n female_vocals: songVersion.female_vocals || false,\n license_version_ids: songVersion.license_version_ids || allLicenseVersionIds,\n credits_attributes: songVersion.credits_attributes || [\n { id: \"\", vendor_id: \"\", split: \"\", _destroy: false },\n ],\n notes: songVersion.notes || \"\",\n lyrics: songVersion.lyrics || \"\",\n state: songVersion.state || { label: \"Reviewing\", value: \"reviewing\" },\n song_version_contributors_attributes: songVersion.song_version_contributors_attributes || [],\n song_version_publishers_attributes: songVersion.song_version_publishers_attributes || [],\n }\n }\n\n const validationSchema = yup\n .object({\n title: yup.string().required(\"Title is required.\").typeError(\"Title is required\"),\n artist_id: yup.object().required(\"Artist is required.\"),\n song_id: yup.object().required(\"Song is required.\").typeError(\"Song is required\"),\n primary_genre_list: yup.object().when(\"state\", (state, schema) => {\n return state.value === \"reviewing\"\n ? schema\n : schema.shape({\n label: yup.string(),\n value: yup.string().required(\"Primary Genre is required.\"),\n })\n }),\n energy: yup.object().when(\"state\", (state, schema) => {\n return state.value === \"reviewing\"\n ? schema\n : schema.shape({\n label: yup.string(),\n value: yup.string().required(\"Energy is required.\"),\n })\n }),\n arc: yup.object().when(\"state\", (state, schema) => {\n return state.value === \"reviewing\"\n ? schema\n : schema.shape({\n label: yup.string(),\n value: yup.string().required(\"Arc is required.\"),\n })\n }),\n keyword_list: yup.array().when(\"state\", (state, schema) => {\n return state.value === \"reviewing\"\n ? schema\n : schema.min(1, \"Mood is required.\").typeError(\"Mood is required\")\n }),\n state: yup.object().shape({\n label: yup.string(),\n value: yup.string().required(\"State is required.\"),\n }),\n credits_attributes: yup.array().when(\"state\", (state, schema) => {\n return state.value === \"reviewing\"\n ? schema\n : schema.of(\n yup.object().shape({\n id: yup.string().nullable(),\n vendor_id: yup.object().required(\"Vendor is required.\"),\n /*ipi_number: yup.string().required(\"Must have IPI Number\"),*/ //If we want to create from the form someday\n split: yup\n .number()\n .typeError(\"Split is required.\")\n .min(0, \"Split must be equal to or greater than 0.\")\n .max(100, \"Split cannot exceed 100.\")\n .required(\"Split is required.\"),\n _destroy: yup.boolean(),\n })\n )\n }),\n song_version_contributors_attributes: yup.array().when(\"state\", (state, schema) => {\n return state.value === \"reviewing\"\n ? schema\n : schema.of(\n yup.object().shape({\n id: yup.string().nullable(),\n contributor_id: yup.object().required(\"Contributor is required.\"),\n /*ipi_number: yup.string().required(\"Must have IPI Number\"),*/ //If we want to create from the form someday\n share: yup\n .number()\n .typeError(\"Split is required.\")\n .min(0, \"Split must be equal to or greater than 0.\")\n .max(100, \"Split cannot exceed 100.\")\n .required(\"Split is required.\"),\n _destroy: yup.boolean(),\n })\n )\n }),\n song_version_publishers_attributes: yup.array().when(\"state\", (state, schema) => {\n return state.value === \"reviewing\"\n ? schema\n : schema.of(\n yup.object().shape({\n contributor_id: yup.object().required(\"Publishers need a contributor to represent\"),\n id: yup.string().nullable(),\n publisher_id: yup.object().required(\"Publisher is required.\"),\n share: yup\n .number()\n .typeError(\"Split is required.\")\n .min(0, \"Split must be equal to or greater than 0.\")\n .max(100, \"Split cannot exceed 100.\")\n .required(\"Split is required.\"),\n\n _destroy: yup.boolean(),\n })\n )\n }),\n })\n .test(\n \"instrumentalOrVocalCheck\",\n null,\n ({ instrumental, male_vocals, female_vocals, state }) => {\n if (state.value !== \"reviewing\" && instrumental === (male_vocals || female_vocals)) {\n return new yup.ValidationError(\n \"Instrumental or a vocal is required.\",\n null,\n \"female_vocals\"\n )\n } else {\n return true\n }\n }\n )\n .test(\"fileUploaded\", null, ({ remote_file_url, state }) => {\n const notReviewingOrDeleted = ![\"reviewing\", \"deleted\"].includes(state.value)\n const newOrDeletedRecord = props.form_data.new_record || props.form_data.deleted_record\n const fileMissing = [\"\", undefined].includes(remote_file_url)\n\n if (notReviewingOrDeleted && newOrDeletedRecord && fileMissing) {\n return new yup.ValidationError(\"Audio file is required.\", null, \"remote_file_url\")\n } else {\n return true\n }\n })\n .test(\"albumArtUploaded\", null, ({ remote_art_url, album_id }) => {\n if (!(remote_art_url || album_id)) return true\n const fileMissing = [\"\", undefined].includes(remote_art_url)\n\n if (album_id.__isNew__ && fileMissing) {\n return new yup.ValidationError(\"Image file is required.\", null, \"remote_art_url\")\n } else {\n return true\n }\n })\n\n const handleSubmit = (params, actions) => {\n const newRecord = props.form_data.new_record\n const method = newRecord ? \"post\" : \"patch\"\n const url = newRecord ? \"/admin/song_versions\" : `/admin/song_versions/${props.song_version.id}`\n\n axios\n .request(url, {\n method,\n data: {\n authenticity_token: props.form_data.authenticity_token,\n song_version: songVersionParams(params),\n },\n })\n .then(({ data }) => {\n if (data.success) {\n if (newRecord) {\n actions.resetForm(initialValues({}))\n } else {\n document.querySelector(\".sv-title\").innerText = data.song_version.title\n }\n\n uppy.reset()\n actions.setStatus({\n success: true,\n message: data.message,\n portalPath: data.portal_path,\n })\n } else {\n actions.setErrors({ server: data.errors })\n actions.setStatus({ success: false })\n }\n\n actions.setSubmitting(false)\n document.querySelector(\".flash-msg\").scrollIntoView({ behavior: \"smooth\", block: \"center\" })\n })\n .catch((error) => {\n console.log(error)\n actions.setSubmitting(false)\n actions.setErrors({ server: [\"Cannot submit form at the moment. Please try again.\"] })\n document.querySelector(\"body\").scrollIntoView({ behavior: \"smooth\", block: \"center\" })\n })\n }\n\n return (\n \n {(formikProps) => (\n \n )}\n \n )\n}\n\nexport default SongVersionFormContainer\n"],"names":["CircleX","_ref","handleOnClick","React","onClick","focusable","className","width","height","viewBox","fill","fillRule","cx","cy","r","d","defaultProps","UploadedFile","fileName","removeFile","type","fileUploaded","undefined","includes","styles","CheckboxGroupField","props","admin","name","disabled","formDataArray","values","arrayHelpers","showToggleAll","label","formStyles","onChange","e","event","checked","target","allOrNothing","map","f","value","form","setFieldValue","toggleAll","length","labelText","index","key","Field","indexPosition","indexOf","remove","push","searchVendors","async","axios","params","query","then","response","data","catch","error","console","log","setValueAndSplit","fieldName","selectedValue","splitInfo","match","split","parseFloat","splitFieldName","replace","credits_attributes","creditAttr","id","AsyncSelectField","vendor_id","loadOptions","debounce","onBlur","setFieldTouched","placeholder","step","ErrorMessage","component","style","display","marginTop","_destroy","buttonStyles","source","filename","href","controls","src","searchContributors","shareInfo","share","shareFieldName","song_version_contributors_attributes","contributorAttr","contributor_id","canCreateOption","ipi_number","contributorOptions","contributor","Object","searchPublishers","song_version_publishers_attributes","publisherAttr","SelectField","options","publisher_id","SongVersionForm","Component","state","albumfileName","showAlbumUpload","allArtistSongs","allSongSongVersions","allArtistAlbums","selectIsLoading","artistCollabState","this","artist_collab","componentDidMount","window","location","search","clearUrlQuery","presignedPostUrl","parentScope","uppy","use","AwsS3","getUploadParameters","file","setState","bucket","url","fields","method","on","body","albumUppy","_ref2","_","componentDidUpdate","prevProps","album_id","artist_id","song_id","getAllArtistSongs","getAllArtistAlbums","getAllSongSongVersions","componentWillUnmount","close","artistId","filteredArr","filter","str","songId","__isNew__","searchStation","searchArtist","genresWithoutPrimary","form_data","primaryGenre","primary_genre_list","genres","genre","handleTwoCalls","field","val","handleDuplicate","safeValue","remote_art_url","remote_file_url","server_filename","setValues","song_version","handleAlbumCreate","fileType","album","remoteUrlKey","reset","render","isSubmitting","status","errors","admin_user","disableArtistCollabField","showCreateAlbumFields","showStateField","isInExclusivity","Form","success","FormFlashMsg","message","portalPath","server","messages","ScrollToError","DragDrop","pretty","inputName","note","locale","strings","dropHereOr","new_record","CurrentAudioFile","current_file_url","current_filename","StatusBar","hideAfterFinish","hideCancelButton","showProgressDetails","CreatableSelectField","isDisabled","isClearable","isLoading","CheckboxField","Fragment","duplicate_song_version_id","TextField","release_years","release_year","hint","onCreateOption","htmlFor","isMulti","closeMenuOnSelect","station_list","matchFrom","genre_list","cyanite_id","cyanite_genre_list","instruments","instrument_list","cyanite_instrument_list","moods","keyword_list","cyanite_keyword_list","energies","energy","arcs","arc","top_position","staff_pick","customizable","is_pub_admin","in_track_club","instrumental","male_vocals","female_vocals","FieldArray","VendorCreditsForm","ContributorForm","PublisherForm","license_version_ids","license_versions","TextAreaField","rows","maxLength","states","allLicenseVersionIds","l","Uppy","autoProceed","allowMultipleUploads","restrictions","maxNumberOfFiles","allowedFileTypes","onBeforeFileAdded","normalize","initialValues","songVersion","title","composer","publisher","work_number","mp3_genres","string","Set","toString","notes","lyrics","validationSchema","yup","required","typeError","when","schema","shape","min","of","nullable","max","test","notReviewingOrDeleted","newOrDeletedRecord","deleted_record","fileMissing","_ref3","Formik","onSubmit","handleSubmit","actions","newRecord","authenticity_token","songVersionParams","_ref4","resetForm","document","querySelector","innerText","setStatus","portal_path","setErrors","setSubmitting","scrollIntoView","behavior","block","formikProps","assign","elementId","forEach","container","element","getElementById","JSON","parse","dataset","ReactDOM","querySelectorAll","setAttribute"],"sourceRoot":""}