1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8280246c-8388-46e0-934f-89cb10e7bfab",e._sentryDebugIdIdentifier="sentry-dbid-8280246c-8388-46e0-934f-89cb10e7bfab");}catch(e){}}(); 2(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([[2501],{ 3 4/***/ 73842: 5/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { 6 7 8 (window.__NEXT_P = window.__NEXT_P || []).push([ 9 "/dashboard/syndication/[id]/upload", 10 function () { 11 return __webpack_require__(99207); 12 } 13 ]); 14 if(false) {} 15 16 17/***/ }), 18 19/***/ 10863: 20/***/ (function(__unused_webpack_module, exports, __webpack_require__) { 21 22"use strict"; 23var __webpack_unused_export__; 24/* __next_internal_client_entry_do_not_use__ cjs */ 25var _interopRequireDefault = __webpack_require__(64836); 26__webpack_unused_export__ = ({ 27 value: true 28}); 29exports.Z = void 0; 30var _createSvgIcon = _interopRequireDefault(__webpack_require__(33651)); 31var _jsxRuntime = __webpack_require__(85893); 32var _default = exports.Z = (0, _createSvgIcon.default)(/*#__PURE__*/ (0, _jsxRuntime.jsx)("path", { 33 d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z" 34}), "CloudUpload"); 35 36 37/***/ }), 38 39/***/ 62134: 40/***/ (function(__unused_webpack_module, exports, __webpack_require__) { 41 42"use strict"; 43var __webpack_unused_export__; 44/* __next_internal_client_entry_do_not_use__ cjs */ 45var _interopRequireDefault = __webpack_require__(64836); 46__webpack_unused_export__ = ({ 47 value: true 48}); 49exports.Z = void 0; 50var _createSvgIcon = _interopRequireDefault(__webpack_require__(33651)); 51var _jsxRuntime = __webpack_require__(85893); 52var _default = exports.Z = (0, _createSvgIcon.default)(/*#__PURE__*/ (0, _jsxRuntime.jsx)("path", { 53 d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" 54}), "Info"); 55 56 57/***/ }), 58 59/***/ 90633: 60/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 61 62"use strict"; 63 64// EXPORTS 65__webpack_require__.d(__webpack_exports__, { 66 Z: function() { return /* binding */ AlertTitle_AlertTitle; } 67}); 68 69// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js 70var esm_extends = __webpack_require__(87462); 71// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js 72var objectWithoutPropertiesLoose = __webpack_require__(63366); 73// EXTERNAL MODULE: ./node_modules/react/index.js 74var react = __webpack_require__(67294); 75// EXTERNAL MODULE: ./node_modules/clsx/dist/clsx.mjs 76var clsx = __webpack_require__(90512); 77// EXTERNAL MODULE: ./node_modules/@mui/utils/esm/composeClasses/composeClasses.js 78var composeClasses = __webpack_require__(94780); 79// EXTERNAL MODULE: ./node_modules/@mui/material/styles/styled.js 80var styled = __webpack_require__(77527); 81// EXTERNAL MODULE: ./node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.js 82var DefaultPropsProvider = __webpack_require__(44001); 83// EXTERNAL MODULE: ./node_modules/@mui/material/Typography/Typography.js 84var Typography = __webpack_require__(21485); 85// EXTERNAL MODULE: ./node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js 86var generateUtilityClasses = __webpack_require__(1588); 87// EXTERNAL MODULE: ./node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js 88var generateUtilityClass = __webpack_require__(34867); 89;// CONCATENATED MODULE: ./node_modules/@mui/material/AlertTitle/alertTitleClasses.js 90 91 92function getAlertTitleUtilityClass(slot) { 93 return (0,generateUtilityClass/* default */.ZP)("MuiAlertTitle", slot); 94} 95const alertTitleClasses = (0,generateUtilityClasses/* default */.Z)("MuiAlertTitle", [ 96 "root" 97]); 98/* harmony default export */ var AlertTitle_alertTitleClasses = ((/* unused pure expression or super */ null && (alertTitleClasses))); 99 100// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js 101var jsx_runtime = __webpack_require__(85893); 102;// CONCATENATED MODULE: ./node_modules/@mui/material/AlertTitle/AlertTitle.js 103/* __next_internal_client_entry_do_not_use__ default auto */ 104 105const _excluded = [ 106 "className" 107]; 108 109 110 111 112 113 114 115 116 117const useUtilityClasses = (ownerState)=>{ 118 const { classes } = ownerState; 119 const slots = { 120 root: [ 121 "root" 122 ] 123 }; 124 return (0,composeClasses/* default */.Z)(slots, getAlertTitleUtilityClass, classes); 125}; 126const AlertTitleRoot = (0,styled/* default */.ZP)(Typography/* default */.Z, { 127 name: "MuiAlertTitle", 128 slot: "Root", 129 overridesResolver: (props, styles)=>styles.root 130})((param)=>{ 131 let { theme } = param; 132 return { 133 fontWeight: theme.typography.fontWeightMedium, 134 marginTop: -2
135 }; 136}); 137const AlertTitle = /*#__PURE__*/ react.forwardRef(function AlertTitle(inProps, ref) { 138 const props = (0,DefaultPropsProvider/* useDefaultProps */.i)({ 139 props: inProps, 140 name: "MuiAlertTitle" 141 }); 142 const { className } = props, other = (0,objectWithoutPropertiesLoose/* default */.Z)(props, _excluded); 143 const ownerState = props; 144 const classes = useUtilityClasses(ownerState); 145 return /*#__PURE__*/ (0,jsx_runtime.jsx)(AlertTitleRoot, (0,esm_extends/* default */.Z)({ 146 gutterBottom: true, 147 component: "div", 148 ownerState: ownerState, 149 ref: ref, 150 className: (0,clsx/* default */.Z)(classes.root, className) 151 }, other)); 152}); 153 false ? 0 : void 0; 154/* harmony default export */ var AlertTitle_AlertTitle = (AlertTitle); 155 156 157/***/ }), 158 159/***/ 94042: 160/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 161 162"use strict"; 163/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85893); 164/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67294); 165/* harmony import */ var _mui_icons_material_PlayCircleOutline__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60006); 166/* harmony import */ var _mui_icons_material_PauseCircleOutline__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50006); 167/* harmony import */ var _mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92608); 168 169 170 171 172 173const AudioPlayer = (param)=>{ 174 let { src, imgSrc, activePlayer, setActivePlayer } = param; 175 const audioRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); 176 const [isPlaying, setIsPlaying] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); 177 const [progress, setProgress] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0); 178 const [hasPlayed, setHasPlayed] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); 179 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ 180 const audio = audioRef.current; 181 if (!audio) return; 182 const handleTimeUpdate = ()=>{ 183 if (audio.duration) { 184 setProgress(audio.currentTime / audio.duration * 100); 185 } 186 }; 187 audio.addEventListener("timeupdate", handleTimeUpdate); 188 return ()=>audio.removeEventListener("timeupdate", handleTimeUpdate); 189 }, []); 190 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ 191 const audio = audioRef.current; 192 const playButton = document.querySelector('.play-button[data-src="'.concat(src, '"]')); 193 if (!audio || !playButton) return; 194 const handleAudioPause = ()=>{ 195 setIsPlaying(false); 196 playButton.classList.remove("pause"); 197 }; 198 audio.addEventListener("pause", handleAudioPause); 199 return ()=>{ 200 audio.removeEventListener("pause", handleAudioPause); 201 }; 202 }, [ 203 src 204 ]); 205 const handlePlayPause = ()=>{ 206 const audio = audioRef.current; 207 if (!audio) return; 208 const previousActivePlayer = activePlayer; 209 if (isPlaying) { 210 audio.pause(); 211 setIsPlaying(false);
212 setActivePlayer(null); 213 } else { 214 if (previousActivePlayer && previousActivePlayer !== src) { 215 const previousAudio = document.querySelector('audio[data-src="'.concat(previousActivePlayer, '"]')); 216 if (previousAudio) { 217 previousAudio.pause(); 218 const previousPlayer = previousAudio.closest(".audio-player"); 219 if (previousPlayer) { 220 const previousPlayButton = previousPlayer.querySelector(".play-button"); 221 if (previousPlayButton) { 222 previousPlayButton.classList.remove("pause"); 223 } 224 } 225 } 226 } 227 setIsPlaying(true); 228 setActivePlayer(src); 229 document.addEventListener("click", playAudio); 230 } 231 }; 232 const playAudio = ()=>{ 233 const audio = audioRef.current; 234 if (audio) { 235 audio.play().catch((error)=>{ 236 // Autoplay was prevented, handle the error or show a play button to manually start playback 237 console.log(error); 238 }); 239 document.removeEventListener("click", playAudio); 240 } 241 }; 242 const handleSeek = (event)=>{ 243 const audio = audioRef.current; 244 if (!audio) return; 245 const rect = event.currentTarget.getBoundingClientRect(); 246 const offsetX = event.clientX - rect.left; 247 const seekPosition = offsetX / rect.width * audio.duration; 248 audio.currentTime = seekPosition; 249 }; 250 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { 251 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 252 className: "audio-player", 253 style: { 254 position: "relative", 255 width: 200, 256 height: 200, 257 backgroundImage: "url(".concat(imgSrc, ")"), 258 backgroundSize: "cover", 259 marginBottom: "10px" 260 }, 261 children: [ 262 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 263 style: { 264 display: "flex", 265 justifyContent: "space-between", 266 position: "absolute", 267 bottom: 10, 268 left: 10, 269 width: "100%" 270 }, 271 children: [ 272 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { 273 className: "play-button ".concat(isPlaying ? "pause" : ""), 274 "data-src": src, 275 onClick: handlePlayPause, 276 style: { 277 backgroundColor: "#fff", 278 borderRadius: "50%", 279 width: 50, 280 height: 50, 281 border: "none", 282 outline: "none" 283 }, 284 children: isPlaying ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_icons_material_PauseCircleOutline__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { 285 fontSize: "large", 286 style: { 287 fontWeight: "bold", 288 fontSize: 50, 289 marginLeft: -6, 290 marginTop: -2, 291 borderRadius: "100%" 292 } 293 }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_icons_material_PlayCircleOutline__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { 294 fontSize: "large", 295 style: { 296 fontWeight: "bold", 297 fontSize: 50, 298 marginLeft: -6, 299 marginTop: -2, 300 borderRadius: "100%" 301 } 302 }) 303 }), 304 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 305 style: { 306 flex: 1, 307 position: "relative", 308 height: "50px", 309 marginLeft: 10, 310 overflow: "hidden" 311 }, 312 children: isPlaying && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { 313 variant: "determinate", 314 value: progress, 315 style: { 316 position: "absolute", 317 bottom: "50%", 318 transform: "translateY(50%)", 319 width: "90%", 320 height: 20, 321 backgroundColor: "#fff", 322 borderRadius: "15px" 323 }, 324 onClick: handleSeek 325 }) 326 }) 327 ] 328 }), 329 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("audio", { 330 src: src, 331 ref: audioRef, 332 "data-src": src, 333 style: { 334 display: "none" 335 } 336 }) 337 ] 338 }) 339 }); 340}; 341/* harmony default export */ __webpack_exports__.Z = (AudioPlayer); 342 343 344/***/ }), 345 346/***/ 68439: 347/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 348 349"use strict"; 350/* harmony export */ __webpack_require__.d(__webpack_exports__, { 351/* harmony export */ Z: function() { return /* binding */ MyEditor; } 352/* harmony export */ }); 353/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85893); 354/* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5152); 355/* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_dynamic__WEBPACK_IMPORTED_MODULE_1__); 356/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67294); 357/* harmony import */ var react_quill_new_dist_quill_snow_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9676); 358/* harmony import */ var react_quill_new_dist_quill_snow_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_quill_new_dist_quill_snow_css__WEBPACK_IMPORTED_MODULE_3__); 359// /src/components/quilljs/editor.js 360 361 362 363 364const QuillNoSSRWrapper = next_dynamic__WEBPACK_IMPORTED_MODULE_1___default()(async ()=>{ 365 const { default: RQ } = await Promise.all(/* import() */[__webpack_require__.e(570), __webpack_require__.e(1240)]).then(__webpack_require__.bind(__webpack_require__, 71240)
365); 366 const DynamicQuill = (param)=>{ 367 let { ...props } = param; 368 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(RQ, { 369 ...props 370 }); 371 }; 372 DynamicQuill.displayName = "DynamicQuill"; 373 return DynamicQuill; 374}, { 375 loadableGenerated: { 376 webpack: ()=>[ 377 /*require.resolve*/(71240) 378 ] 379 }, 380 ssr: false 381}); 382const modules = { 383 toolbar: [ 384 [ 385 "bold", 386 "link" 387 ], 388 [ 389 { 390 list: "ordered" 391 }, 392 { 393 list: "bullet" 394 } 395 ], 396 [ 397 "clean" 398 ] 399 ], 400 clipboard: { 401 matchVisual: false, 402 matchers: [ 403 [ 404 3, 405 (node, delta)=>{ 406 delta.ops = delta.ops.map((op)=>{ 407 if (typeof op.insert === "string") { 408 return { 409 ...op, 410 insert: op.insert.replace(/\u00A0/g, " ") 411 }; 412 } 413 return op; 414 }); 415 return delta; 416 } 417 ] 418 ] 419 } 420}; 421const customStyles = "\n .quill {\n margin-top: 1em;\n margin-bottom: 1em;\n }\n .ql-editor {\n min-height: 200px;\n }\n .ql-editor p {\n margin-bottom: 0.75em;\n }\n"; 422function MyEditor(props) { 423 const qRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null); 424 const [content, setContent] = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""); 425 const [isInitialized, setIsInitialized] = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(false); 426 // Sync from database/parent state exactly once when data asynchronously loads 427 (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(()=>{ 428 if (props.value && !isInitialized) { 429 // Clean up historic database entries that have residual strings 430 const cleanInitial = props.value.replace(/ /gi, " "); 431 setContent(cleanInitial); 432 setIsInitialized(true); 433 } 434 }, [ 435 props.value, 436 isInitialized 437 ]); 438 const handleChange = (newValue)=>{ 439 setContent(newValue); 440 // Directly pass the raw updates back up to the form parent layout 441 if (props.setValue) { 442 props.setValue(newValue); 443 } 444 }; 445 return true ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { 446 children: [ 447 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("style", { 448 children: customStyles 449 }), 450 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(QuillNoSSRWrapper, { 451 ref: qRef, 452 modules: modules, 453 value: content, 454 onChange: handleChange, 455 theme: "snow", 456 placeholder: "Episode Description..." 457 }) 458 ] 459 }) : 0; 460} 461 462 463/***/ }), 464 465/***/ 99207: 466/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 467 468"use strict"; 469__webpack_require__.r(__webpack_exports__); 470/* harmony export */ __webpack_require__.d(__webpack_exports__, { 471/* harmony export */ __N_SSP: function() { return /* binding */ __N_SSP; } 472/* harmony export */ }); 473/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85893); 474/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67294); 475/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11163); 476/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_2__); 477/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(77527); 478/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
478Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3314); 479/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(97182); 480/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21485); 481/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(60762); 482/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(34375); 483/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(71919); 484/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(44723); 485/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(70760); 486/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(90633); 487/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(51015); 488/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(59271); 489/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(32200); 490/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(63257); 491/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
491Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(52857); 492/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(40492); 493/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(21038); 494/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(68573); 495/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(6897); 496/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(94143); 497/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(29346); 498/* harmony import */ var _barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(15972); 499/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(54453); 500/* harmony import */ var _components_player_AudioPlayer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94042); 501/* harmony import */ var _mui_icons_material_CloudUpload__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(10863); 502/* harmony import */ var _mui_icons_material_Info__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(62134); 503/* harmony import */ var _hocs_withTheme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23818); 504/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(87066); 505/* harmony import */ var _components_quilljs_editor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(68439); 506 507 508 509 510 511 512 513 514 515 516 517 518function CircularProgressWithLabel(props) { 519 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { 520 sx: { 521 position: "relative", 522 display: "inline-flex" 523 }, 524 children: [ 525 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, { 526 size: 300, 527 variant: "determinate", 528 ...props, 529 sx: { 530 ".MuiCircularProgress-circle": { 531 strokeLinecap: props.value < 100 ? "round" : "butt" 532 } 533 } 534 }), 535 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
535Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { 536 sx: { 537 top: 0, 538 left: 0, 539 bottom: 0, 540 right: 0, 541 position: "absolute", 542 display: "flex", 543 alignItems: "center", 544 justifyContent: "center" 545 }, 546 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, { 547 variant: "caption", 548 component: "div", 549 sx: { 550 fontSize: "2em" 551 }, 552 color: "text.secondary", 553 children: "".concat(Math.round(props.value), "%") 554 }) 555 }) 556 ] 557 }); 558} 559const Dropzone = (param)=>{ 560 let { onDrop, children, square } = param; 561 const [dragging, setDragging] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); 562 const fileInputRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); // ref for file input 563 const openFileDialog = ()=>{ 564 if (fileInputRef.current) { 565 fileInputRef.current.click(); 566 } 567 }; 568 // Function to handle file input change 569 const onFilesAdded = (event)=>{ 570 if (event.target.files) { 571 const files = Array.from(event.target.files); 572 onDrop(files); 573 } 574 }; 575 const handleDragEnter = (event)=>{ 576 event.preventDefault(); 577 setDragging(true); 578 }; 579 const handleDragLeave = (event)=>{ 580 event.preventDefault(); 581 setDragging(false); 582 }; 583 const handleDragOver = (event)=>{ 584 event.preventDefault(); 585 }; 586 const handleDrop = (event)=>{ 587 event.preventDefault(); 588 setDragging(false); 589 const files = Array.from(event.dataTransfer.files); 590 onDrop(files); 591 }; 592 const dropzoneClass = "dropzone ".concat(dragging ? "dragging" : "", " ").concat(square ? "square" : ""); 593 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 594 className: dropzoneClass, 595 onDragEnter: handleDragEnter, 596 onDragLeave: handleDragLeave, 597 onDragOver: handleDragOver, 598 onDrop: handleDrop, 599 onClick: openFileDialog, 600 children: [ 601 children, 602 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { 603 ref: fileInputRef, 604 type: "file", 605 multiple: true, 606 style: { 607 display: "none" 608 }, 609 onChange: onFilesAdded 610 }) 611 ] 612 }); 613}; 614const UploadPage = (param)=>{ 615 let { minimized, data, SyndicationId, apiData } = param; 616 const contentStyle = { 617 paddingLeft: minimized ? "70px" : "260px", 618 marginRight: "1em", 619 marginBottom: "1em" 620 }; 621 const router = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); 622 const [activePlayer, setActivePlayer] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); 623 //Season section 624 const now = new Date(); 625 /* 626 const currentDate = now.getFullYear(); //.toISOString().substr(0, 10); 627 let hours = now.getHours(); 628 let minutes = now.getMinutes(); 629 let hoursStr = hours < 10 ? `0${hours}` : `${hours}`; 630 let minutesStr = minutes < 10 ? `0${minutes}` : `${minutes}`; 631 const currentTime = `${hoursStr}:${minutesStr}`; 632 const defaultValue = `${currentDate}T${currentTime}`;*/ const year = now.getFullYear();
633 const month = String(now.getMonth() + 1).padStart(2, "0"); // months are 0-based 634 const day = String(now.getDate()).padStart(2, "0"); 635 const hours = String(now.getHours()).padStart(2, "0"); 636 const minutes = String(now.getMinutes()).padStart(2, "0"); 637 const defaultValue = "".concat(year, "-").concat(month, "-").concat(day, "T").concat(hours, ":").concat(minutes); 638 const [uploadProgress, setUploadProgress] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0); 639 const [uploadStatusText, setUploadStatusText] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("Please wait, we are uploading your files."); 640 const [showInfo, setShowInfo] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); 641 const [season, setSeason] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(1); 642 const [episode, setEpisode] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(1); 643 const [title, setTitle] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""); 644 const [pod_pubdate, setPodPubDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(new Date()); 645 const [pubdate, setPubDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(new Date()); 646 const [description, setDescription] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("");
647 const [selectedDate, handleDateChange] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(new Date()); 648 const [selectedTime, handleTimeChange] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(new Date()); 649 const [prevSeason, setPrevSeason] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(season); 650 const [prevEpisode, setPrevEpisode] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(episode); 651 // determine if the user can manually input episode numbers 652 const [isEpisodeEditable, setEpisodeEditable] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(!data || !data.season && !data.episode); 653 let initialSeason = 1; 654 let initialEpisode = 1; 655 // --- INVALID FILE HANDLING --- 656 const [invalidFileNames, setInvalidFileNames] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""); // State for invalid file names 657 const [invalidStationFiles, setInvalidStationFiles] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // station keys 658 const isValidFile = (file)=>{ 659 return new Promise((resolve)=>{ 660 const reader = new FileReader(); 661 reader.onload = ()=>{ 662 resolve(reader.result.byteLength > 0); 663 }; 664 reader.onerror = ()=>{ 665 resolve(false); 666 }; 667 const sliceSize = Math.min(1024, file.size); 668 if (sliceSize === 0) { 669 resolve(false); 670 return; 671 } 672 reader.readAsArrayBuffer(file.slice(0, sliceSize)); 673 }); 674 }; 675 const handleCustomDrop = async (e, index)=>{ 676 e.preventDefault(); 677 const station = stationList[index]; 678 if (station) { 679 const droppedFiles = e.dataTransfer.files; 680 if (droppedFiles && droppedFiles.length > 0) { 681 const file = droppedFiles[0]; 682 const valid = await isValidFile(file); 683 setInvalidStationFiles((prev)=>{ 684 const next = new Set(prev); 685 if (!valid) next.add(station); 686 else next.delete(station); 687 return Array.from(next); 688 }); 689 setStationFileInputs((prevInputs)=>({ 690 ...prevInputs, 691 [station]: valid ? file : null 692 })); 693 } 694 } 695 }; 696 const handleDragOver = (e)=>{ 697 e.preventDefault(); 698 }; 699 /* The following was added on 04-01-2024 to allow episodes to be assigned to a station */ const VisuallyHiddenInput = (0,_mui_material_styles__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP)("input")({ 700 clip: "rect(0 0 0 0)", 701 clipPath: "inset(50%)", 702 height: 1, 703 overflow: "hidden", 704 position: "absolute", 705 bottom: 0, 706 left: 0, 707 whiteSpace: "nowrap", 708 width: 1 709 }); 710 const [selectedRadioStation, setSelectedRadioStation] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); 711 const [stationFileInputs, setStationFileInputs] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({}); 712 const [stationList, setStationList] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); 713 const [customStations, setCustomStations] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); 714 const handleRadioStationChange = (event, station)=>{ 715 const selectedIndex = stationList.indexOf(station); 716 setSelectedRadioStation((prevSelected)=>{ 717 const updatedArray = [ 718 ...prevSelected 719 ]; 720 updatedArray[selectedIndex] = event.target.value; 721 return updatedArray; 722 }); 723 }; 724 const handleFileInputChange = async (event, index)=>{ 725 const station = stationList[index]; 726 if (station) { 727 const file = event.target.files ? event.target.files[0] : null; 728 if (file) { 729 const valid = await isValidFile(file); 730 setInvalidStationFiles((prev)=>{ 731 const next = new Set(prev); 732 if (!valid) next.add(station); 733 else next.delete(station); 734 return Array.from(next); 735 }); 736 setStationFileInputs((prevInputs)=>({ 737 ...prevInputs, 738 [station]: valid ? file : null 739 })); 740 } 741 } 742 }; 743 const handleAddStation = ()=>{ 744 if (stationList.length < customStations.length) { 745 const newStation = "station_".concat(stationList.length + 1); 746 setStationList((prevList)=>[ 747 ...prevList, 748 newStation 749 ]); 750 setStationFileInputs((prevInputs)=>({ 751 ...prevInputs, 752 [newStation]: null 753 })); 754 } 755 }; 756 /* END CODE */ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ 757 setShowInfo(data[0]); 758 const datas = data; 759 if (datas && datas.length > 0 && datas[0].latestEpisode && datas[0].latestEpisode.length > 0) { 760 const newSeason = datas[0].latestEpisode[0].season || 1; 761 initialSeason = datas[0].latestEpisode[0].season || 1; 762 const newEpisode = datas[0].latestEpisode[0].episode_no ? datas[0].latestEpisode[0].episode_no + 1 : 1; 763 initialEpisode = datas[0].latestEpisode[0].episode_no || 1; 764 // This condition will evaluate to false only if both season and episode_no are not undefined or null 765 setEpisodeEditable(!datas[0].latestEpisode[0].episode_no); 766 if (newSeason >= prevSeason && newEpisode >= prevEpisode) { 767 setSeason(newSeason);
768 setEpisode(newEpisode); 769 } 770 } 771 if (datas && datas.length > 0) { 772 const fetchStations = async (id)=>{ 773 try { 774 const response = await fetch("/api/syndicate/stations/customVersion", { 775 method: "GET", 776 headers: { 777 "Content-Type": "application/json", 778 "x-syndicated-id": id // sending the _id as a custom header 779 } 780 }); 781 if (!response.ok) { 782 throw new Error("HTTP error! status: ".concat(response.status)); 783 } 784 const data = await response.json(); 785 setCustomStations(data.result); // Assuming the response has a 'stations' array 786 } catch (error) { 787 console.error("Error fetching stations:", error); 788 } 789 }; 790 fetchStations(data[0]._id); 791 } 792 }, [ 793 data 794 ]); 795 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ 796 setPrevSeason(season); 797 setPrevEpisode(episode); 798 }, [ 799 season, 800 episode 801 ]); 802 const handleSeasonChange = (e)=>{ 803 const newSeason = parseInt(e.target.value); 804 /*if (!isEpisodeEditable && newSeason >= initialSeason && newSeason <= initialSeason + 1) { 805 setSeason(newSeason); 806 if(newSeason === initialSeason) { 807 setEpisode(initialEpisode+1); 808 } else if (newSeason > prevSeason) { 809 setEpisode(1); 810 } 811 } else if (isEpisodeEditable) { 812 setSeason(newSeason); 813 // setEpisode(initialEpisode+1); 814 }*/ setSeason(newSeason); 815 }; 816 const handleEpisodeChange = (e)=>{ 817 const newEpisode = parseInt(e.target.value); 818 //if (isEpisodeEditable) { 819 setEpisode(newEpisode); 820 //} 821 }; 822 //end season section 823 const [isUploading, setIsUploading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); 824 const [isCompleted, setIsComplete] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); 825 const [files, setFiles] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); 826 const [rejectedFileNames, setRejectedFileNames] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""); // State for rejected file names 827 //update 828 // ... 829 const handleDrop = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async (acceptedFiles)=>{ 830 const newFiles = [ 831 ...files 832 ]; 833 const rejectedFiles = []; 834 const newInvalidNames = []; 835 // Define a regex that matches variations of "music only" at the end of the filename (before extension) 836 const musicOnlyRegex = /\(?\s*music\s*[_\s]*only\s*\)?(?=\.[^.]+$)/i; 837 for (const file of acceptedFiles){ 838 const valid = await isValidFile(file); 839 if (!valid) { 840 newInvalidNames.push(file.name); 841 continue; 842 } 843 // Update: Exclude files that are already normalized as _music_only 844 const singleMp3FileIndex = newFiles.findIndex((file)=>file.type === "audio/mpeg" && !file.name.includes("_Segment_") && !/_music_only/i.test(file.name)); 845 const segmentFileIndices = Array(20).fill(-1).map((_, i)=>newFiles.findIndex((file)=>file.type === "audio/mpeg" && file.name.includes("_Segment_".concat(i + 1)))); 846 const mp4FileIndex = newFiles.findIndex((file)=>file.type === "video/mp4"); 847 const imageFileIndex = newFiles.findIndex((file)=>file.type.startsWith("image/")); 848 if ([ 849 "image/jpeg", 850 "image/jpg", 851 "image/png" 852 ].includes(file.type) && imageFileIndex < 2) { 853 const validImage = await isValidImage(file); // Use await to get result from Promise 854 if (validImage) { 855 newFiles.push(file); 856 } else { 857 rejectedFiles.push(file); 858 } 859 } else if (file.type === "video/mp4" && mp4FileIndex === -1) { 860 newFiles.push(file); 861 } else if (file.type === "audio/mpeg" && file.name.endsWith(".mp3")) { 862 // Check if the file name ends with a variation of "music only" 863 if (musicOnlyRegex.test(file.name)) { 864 // Ensure that only one _music_only file is allowed 865 const musicOnlyExists = newFiles.find((f)=>f.type === "audio/mpeg" && /_music_only/i.test(f.name)); 866 if (musicOnlyExists) { 867 rejectedFiles.push(file); 868 continue; 869 } 870 // Replace the matching pattern with _music_only 871 const newName = file.name.replace(musicOnlyRegex, "_music_only"); 872 // Create a new File instance with the new name 873 const musicOnlyFile = new File([ 874 file 875 ], newName, { 876 type: file.type 877 }); 878 newFiles.push(musicOnlyFile); 879 } else { 880 const segmentNumber = parseInt(file.name.split("_Segment_")[1] || "0"); 881 if (file.name.includes("_Segment_") && segmentNumber >= 1 && segmentNumber <= 20 && segmentFileIndices[segmentNumber - 1] === -1) { 882 newFiles.push(file); 883 } else if (!file.name.includes("_Segment_") && singleMp3FileIndex === -1) { 884 newFiles.push(file); 885 } else { 886 rejectedFiles.push(file); 887 } 888 } 889 } else { 890 rejectedFiles.push(file); 891 } 892 } 893 setFiles(newFiles); 894 if (rejectedFiles.length > 0) { 895 const rejectedFileNames = rejectedFiles.map((file)=>file.name).join(", "); 896 setRejectedFileNames(rejectedFileNames); 897 setTimeout(()=>setRejectedFileNames(""), 20000); 898 } 899 if (newInvalidNames.length > 0) { 900 const invalidNamesString = newInvalidNames.join(", "); 901 setInvalidFileNames(invalidNamesString); 902 setTimeout(()=>setInvalidFileNames(""), 20000); 903 } 904 }, [ 905 files 906 ]); 907 const isValidImage = (file)=>{ 908 return new Promise((resolve, reject)=>{ 909 const fileReader = new FileReader();
910 fileReader.readAsDataURL(file); 911 fileReader.onload = function() { 912 const img = new Image(); 913 img.src = fileReader.result; 914 img.onload = function() { 915 // Check for 3000x3000 image 916 if (img.width === 3000 && img.height === 3000) { 917 resolve(true); 918 } else if (img.width >= 1080 && img.width / img.height === 16 / 9) { 919 resolve(true); 920 } else { 921 resolve(false); 922 } 923 }; 924 img.onerror = function() { 925 resolve(false); 926 }; 927 }; 928 fileReader.onerror = function() { 929 resolve(false); 930 }; 931 }); 932 }; 933 const handleDelete = (fileToDelete)=>{ 934 setFiles((prevFiles)=>prevFiles.filter((file)=>file !== fileToDelete)); 935 }; 936 const handleInputChange = (event, stateSetter)=>{ 937 stateSetter(event.target.value); 938 }; 939 const handleDateInputChange = (event, stateSetter)=>{ 940 stateSetter(new Date(event.target.value)); 941 }; 942 //SUBMIT FORM 943 var axiosInstance = axios__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z.create(); 944 axiosInstance.interceptors.request.use(function(config) { 945 // Do something before request is sent 946 console.log("we are uploading your file."); 947 setIsUploading(true); 948 return config; 949 }, function(error) { 950 return Promise.reject(error); 951 }); 952 axiosInstance.interceptors.response.use(function(response) { 953 console.log("We have completed uploading episode."); 954 //setHeadText("Episode Uploaded - Completed.") 955 //setBodyText("<p>Success!</p><p>Your episode will be available soon.</p><p>Please hold while we redirect you</p>"); 956 setTimeout(()=>{ 957 router.push("/dashboard/syndication/".concat(SyndicationId)); 958 }, 1000); 959 setIsComplete(true); 960 setIsUploading(false); 961 //alert(JSON.stringify(response)); 962 return response; 963 }, function(error) { 964 console.log("We have an error creating your show."); 965 setIsUploading(false); 966 // Do something with response error 967 return Promise.reject(error); 968 }); 969 const getImageAspectRatio = (file)=>{ 970 return new Promise((resolve, reject)=>{ 971 const reader = new FileReader(); 972 reader.readAsDataURL(file); 973 reader.onload = ()=>{ 974 const img = new Image(); 975 img.src = reader.result; 976 img.onload = ()=>{ 977 const ratio = img.width / img.height; 978 resolve(ratio); 979 }; 980 img.onerror = ()=>{ 981 reject(new Error("Unable to load image")); 982 }; 983 }; 984 reader.onerror = ()=>{ 985 reject(new Error("File reading failed")); 986 }; 987 }); 988 }; 989 const handleSubmit = async (event)=>{ 990 event.preventDefault(); 991 if (invalidStationFiles.length > 0) { 992 alert("One or more selected files are invalid (unreadable or empty). Please download/sync them locally (e.g., from Dropbox/Drive) and try again."); 993 return; 994 } 995 const formData = new FormData(); 996 /* 997 Object.entries(stationFileInputs).forEach(([station, file]) => { 998 if (file) { 999 const fileCategory = station.replace(/\s+/g, '_').toLowerCase(); 1000 const fileName = `stations_${selectedRadioStation}_${file.name}`; 1001 formData.append('files', file, fileName); 1002 } 1003 }); 1004 */ // Process station files 1005 Object.entries(stationFileInputs).forEach((param)=>{ 1006 let [station, file] = param; 1007 if (file) { 1008 // Get the selected station username for this input 1009 const stationIndex = stationList.indexOf(station); 1010 const stationUsername = selectedRadioStation[stationIndex]; 1011 if (stationUsername) { 1012 // Create a clean filename with just the station username 1013 const fileName = "stations_".concat(stationUsername, "_").concat(file.name.replace(/\s+/g, "-")); 1014 formData.append("files", file, fileName); 1015 } 1016 } 1017 }); 1018 // Append the state variables to the FormData object 1019 formData.append("syndication_id", SyndicationId); 1020 formData.append("title", title); 1021 formData.append("season", season.toString()); // Keeping season as number 1022 formData.append("episode", episode.toString()); // Keeping episode as number 1023 formData.append("description", description); 1024 formData.append("pod_pubdate", pod_pubdate.toISOString()); 1025 formData.append("pubdate", pubdate.toISOString()); 1026 let fullEpisodeFileExists = false;
1027 for (const file of files){ 1028 let fileCategory = ""; 1029 if (file.name.includes("_Segment_")) { 1030 const segmentNumber = file.name.split("_Segment_")[1]; 1031 fileCategory = "segment_".concat(segmentNumber); 1032 const NewfileCategory = fileCategory.split("."); 1033 // Split filename into name and extension 1034 const filenameParts = file.name.split("."); 1035 const extension = filenameParts.pop(); 1036 const filename = filenameParts.join("."); 1037 // Remove original '_Segment_' from the filename and append segment info before filename 1038 const newName = filename.replace("_Segment_".concat(segmentNumber), ""); 1039 formData.append("files", file, "".concat(NewfileCategory[0], "_").concat(newName, ".").concat(extension)); 1040 } else if (file.type === "video/mp4") { 1041 fullEpisodeFileExists = true; 1042 fileCategory = "video"; 1043 formData.append("files", file, "".concat(fileCategory, "_").concat(file.name)); 1044 } else if (file.type.startsWith("image/")) { 1045 try { 1046 const aspectRatio = await getImageAspectRatio(file); 1047 if (Math.abs(aspectRatio - 1) < 0.01) { 1048 fileCategory = "logo"; 1049 } else if (Math.abs(aspectRatio - 16 / 9) < 0.01) { 1050 fileCategory = "banner"; 1051 } 1052 formData.append("files", file, "".concat(fileCategory, "_").concat(file.name)); 1053 } catch (error) { 1054 console.error("Error processing image file ".concat(file.name, ":"), error); 1055 } 1056 } else if (file.type === "audio/mpeg" && file.name.includes("_music_only")) { 1057 // New branch to handle _music_only files separately 1058 fileCategory = "music_only"; 1059 formData.append("files", file, "".concat(fileCategory, "_").concat(file.name)); 1060 } else if (file.type === "audio/mpeg") { 1061 fullEpisodeFileExists = true; 1062 fileCategory = "full_episode"; 1063 formData.append("files", file, "".concat(fileCategory, "_").concat(file.name)); 1064 } 1065 } 1066 if (!fullEpisodeFileExists) { 1067 alert("No Full Episode Audio File Found!"); 1068 return; 1069 } 1070 var config = { 1071 method: "post", 1072 url: "/api/syndicate/upload", 1073 headers: { 1074 "content-type": "multipart/form-data", 1075 "x-user-id": apiData.data._id 1076 }, 1077 onUploadProgress: function(progressEvent) { 1078 const percentCompleted = progressEvent.total ? Math.round(progressEvent.loaded * 95 / progressEvent.total) : 0; // Set to 0 if progressEvent.total is undefined 1079 if (percentCompleted > 90) { 1080 setUploadStatusText("We are now processing the files."); 1081 } 1082 setUploadProgress(percentCompleted); 1083 }, 1084 data: formData 1085 }; 1086 axiosInstance(config).then(function(response) { 1087 console.log(JSON.stringify(response.data)); 1088 }).catch(function(error) { 1089 console.log(error); 1090 if (error.response) { 1091 // The request was made and the server responded with a status code 1092 // that falls out of the range of 2xx 1093 console.log("Server responded with an error:", error.response.status); 1094 alert("Server responded with an error: ".concat(error.response.status, "\n\n").concat(error.response.data.error)); 1095 // Display an error message to the user 1096 // You can use a notification component or update state to show the error message in the UI 1097 } else if (error.request) { 1098 // The request was made but no response was received 1099 console.log("No response received from the server."); 1100 alert("No response received from the server."); 1101 // Display an error message to the user 1102 } else { 1103 // Something happened in setting up the request that triggered an Error 1104 console.log(); 1105 alert("Error occurred while setting up the request:, ".concat(error.message)); 1106 // Display an error message to the user 1107 } 1108 setTimeout(()=>{ 1109 router.push("/dashboard/syndication/".concat(SyndicationId)); 1110 }, 1000); 1111 }); 1112 // Here you can define what happens when the form is submitted 1113 console.log(formData.getAll("files")); 1114 }; 1115 if (isCompleted) { 1116 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1116Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { 1117 pt: 10, 1118 sx: contentStyle, 1119 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, { 1120 children: [ 1121 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, { 1122 title: "Uploaded Completed" 1123 }), 1124 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, { 1125 sx: { 1126 display: "flex", 1127 flexDirection: "column", 1128 alignItems: "center", 1129 justifyContent: "center", 1130 textAlign: "center" 1131 }, 1132 children: [ 1133 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, { 1134 variant: "h4", 1135 gutterBottom: true, 1136 children: "We have successfully uploaded your episode." 1137 }), 1138 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, { 1139 variant: "h4", 1140 gutterBottom: true, 1141 children: "Redirecting you now." 1142 }) 1143 ] 1144 }) 1145 ] 1146 }) 1147 }); 1148 } 1149 if (isUploading) { 1150 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { 1151 pt: 10, 1152 sx: contentStyle, 1153 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, { 1154 children: [ 1155 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1155Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, { 1156 title: "Uploading in Progress" 1157 }), 1158 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, { 1159 sx: { 1160 display: "flex", 1161 flexDirection: "column", 1162 alignItems: "center", 1163 justifyContent: "center", 1164 textAlign: "center" 1165 }, 1166 children: [ 1167 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CircularProgressWithLabel, { 1168 value: uploadProgress 1169 }), 1170 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, { 1171 variant: "h4", 1172 gutterBottom: true, 1173 children: uploadStatusText 1174 }) 1175 ] 1176 }) 1177 ] 1178 }) 1179 }); 1180 } 1181 const submitDisabled = invalidStationFiles.length > 0; 1182 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { 1183 pt: 10, 1184 sx: contentStyle, 1185 children: [ 1186 rejectedFileNames && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, { 1187 severity: "error", 1188 children: [ 1189 "The following files were rejected because they didn", 1190 "'", 1191 "t meet the upload criteria:", 1192 rejectedFileNames 1193 ] 1194 }), 1195 invalidFileNames && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, { 1196 open: !!invalidFileNames, 1197 autoHideDuration: 20000, 1198 anchorOrigin: { 1199 vertical: "top", 1200 horizontal: "center" 1201 }, 1202 onClose: ()=>setInvalidFileNames(""), 1203 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, { 1204 onClose: ()=>setInvalidFileNames(""), 1205 variant: "filled", 1206 severity: "error", 1207 sx: { 1208 marginBottom: "1em" 1209 }, 1210 children: [ 1211 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1211Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z, { 1212 children: "Check File is Local & Not In Cloud" 1213 }), 1214 "The following files were invalid and removed. The most likely reason is that they are stored in the cloud (e.g., Dropbox or iCloud) and not downloaded locally to your computer. Please download them locally and try again:", 1215 invalidFileNames 1216 ] 1217 }) 1218 }), 1219 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, { 1220 children: [ 1221 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, { 1222 title: "Upload Episode" 1223 }), 1224 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, { 1225 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Dropzone, { 1226 onDrop: handleDrop, 1227 square: false, 1228 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 1229 style: { 1230 display: "block" 1231 }, 1232 children: [ 1233 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 1234 style: { 1235 display: "block", 1236 textAlign: "center" 1237 }, 1238 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", { 1239 children: [ 1240 "Drag ", 1241 "'", 1242 "n", 1243 "'", 1244 " drop files here or click to select." 1245 ] 1246 }) 1247 }), 1248 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 1249 style: { 1250 display: "block", 1251 textAlign: "left" 1252 }, 1253 children: [ 1254 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { 1255 children: "For best results, include:" 1256 }), 1257 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("ul", { 1258 style: { 1259 listStyleType: "none", 1260 paddingLeft: 0, 1261 textAlign: "left" 1262 }, 1263 children: [ 1264 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("li", { 1265 style: { 1266 fontWeight: 700 1267 }, 1268 children: "Required: 1 x Full episode (mp3)" 1269 }), 1270 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("li", { 1271 children: "Optional: Segments (_Segment_1, _Segment_2, _Segment_3, _Segment_4 in mp3) - You can have a maximum of 20 segments." 1272 }), 1273 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("li", { 1274 children: "Optional: Music Only version music end with the words Music Only." 1275 }), 1276 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("li", { 1277 children: "Optional: 1 x Banner image (16:9, png/jpg)" 1278 }), 1279 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("li", { 1280 children: "Optional: 1 x Episode image (1:1 recommended 3000 x 3000 pixels (jpg))" 1281 }) 1282 ] 1283 }) 1284 ] 1285 }) 1286 ] 1287 }) 1288 }) 1289 }) 1290 ] 1291 }), 1292 files.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1292Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { 1293 mt: 4, 1294 display: "flex", 1295 flexWrap: "nowrap", 1296 gap: 2, 1297 sx: { 1298 height: "290px !important", 1299 overflowX: "auto" 1300 }, 1301 children: files.map((file, index)=>{ 1302 let preview; 1303 if (file.type.startsWith("audio/")) { 1304 // Handle audio files 1305 preview = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, { 1306 sx: { 1307 display: "flex", 1308 maxWidth: 200, 1309 flexDirection: "column", 1310 alignItems: "center" 1311 }, 1312 children: [ 1313 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_player_AudioPlayer__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { 1314 src: URL.createObjectURL(file), 1315 imgSrc: showInfo.icon, 1316 activePlayer: activePlayer,
1317 setActivePlayer: setActivePlayer 1318 }), 1319 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("small", { 1320 children: file.name 1321 }), 1322 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, { 1323 variant: "contained", 1324 color: "error", 1325 onClick: ()=>handleDelete(file), 1326 children: "Delete" 1327 }) 1328 ] 1329 }); 1330 } else if (file.type.startsWith("video/")) { 1331 // Handle video files 1332 preview = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, { 1333 sx: { 1334 display: "flex", 1335 flexDirection: "column", 1336 alignItems: "center" 1337 }, 1338 children: [ 1339 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("video", { 1340 controls: true, 1341 src: URL.createObjectURL(file), 1342 width: "356", 1343 height: "200" 1344 }), 1345 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, { 1346 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("small", { 1347 children: file.name 1348 }) 1349 }), 1350 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, { 1351 variant: "contained", 1352 color: "error", 1353 onClick: ()=>handleDelete(file), 1354 children: "Delete" 1355 }) 1356 ] 1357 }); 1358 } else if (file.type.startsWith("image/")) { 1359 preview = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, { 1360 sx: { 1361 display: "flex", 1362 flexDirection: "column", 1363 alignItems: "center" 1364 }, 1365 children: [ 1366 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { 1367 src: URL.createObjectURL(file), 1368 alt: file.name, 1369 height: "200" 1370 }), 1371 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1371Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, { 1372 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("small", { 1373 children: file.name 1374 }) 1375 }), 1376 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, { 1377 variant: "contained", 1378 color: "error", 1379 onClick: ()=>handleDelete(file), 1380 children: "Delete" 1381 }) 1382 ] 1383 }, index); 1384 } else if (file.type === "text/plain") { 1385 // Handle text files 1386 preview = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .ZP, { 1387 children: [ 1388 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z, { 1389 primary: file.name, 1390 secondary: file.size + " bytes" 1391 }), 1392 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_20__/* ["default"] */ .Z, { 1393 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, { 1394 edge: "end", 1395 "aria-label": "delete", 1396 onClick: ()=>handleDelete(file), 1397 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_22__/* ["default"] */ .Z, {}) 1398 }) 1399 }) 1400 ] 1401 }, index); 1402 } else { 1403 // Handle other types of files 1404 preview = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .ZP, { 1405 children: [ 1406 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1406Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z, { 1407 primary: file.name, 1408 secondary: file.size + " bytes" 1409 }), 1410 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_20__/* ["default"] */ .Z, { 1411 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, { 1412 edge: "end", 1413 "aria-label": "delete", 1414 onClick: ()=>handleDelete(file), 1415 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_22__/* ["default"] */ .Z, {}) 1416 }) 1417 }) 1418 ] 1419 }, index); 1420 } 1421 return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 1422 children: preview 1423 }, index); 1424 }) 1425 }), 1426 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { 1427 mt: 4, 1428 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, { 1429 children: [ 1430 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, { 1431 title: "Episode Details" 1432 }), 1433 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, { 1434 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { 1435 noValidate: true, 1436 autoComplete: "off", 1437 onSubmit: handleSubmit, 1438 children: [ 1439 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1439Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, { 1440 fullWidth: true, 1441 id: "datetime-local", 1442 label: "Radio Publish Date", 1443 type: "datetime-local", 1444 defaultValue: defaultValue, 1445 InputLabelProps: { 1446 shrink: true 1447 }, 1448 inputProps: { 1449 min: defaultValue 1450 }, 1451 onChange: (event)=>handleDateInputChange(event, setPubDate) 1452 }), 1453 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, { 1454 fullWidth: true, 1455 id: "pod-datetime-local", 1456 label: "Podcast Publish Date", 1457 type: "datetime-local", 1458 defaultValue: defaultValue, 1459 InputLabelProps: { 1460 shrink: true 1461 }, 1462 inputProps: { 1463 min: defaultValue 1464 }, 1465 onChange: (event)=>handleDateInputChange(event, setPodPubDate), 1466 sx: { 1467 marginTop: "1em" 1468 } 1469 }), 1470 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, { 1471 id: "episode-title", 1472 label: "Episode Title", 1473 fullWidth: true, 1474 margin: "normal", 1475 onChange: (event)=>handleInputChange(event, setTitle) 1476 }), 1477 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, { 1478 id: "episode-season", 1479 label: "Season", 1480 type: "number", 1481 fullWidth: true, 1482 margin: "normal", 1483 value: season, 1484 onChange: handleSeasonChange 1485 }), 1486 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1486Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, { 1487 id: "episode-number", 1488 label: "Episode Number", 1489 type: "number", 1490 fullWidth: true, 1491 margin: "normal", 1492 value: episode, 1493 onChange: handleEpisodeChange 1494 }), 1495 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_quilljs_editor__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, { 1496 value: description, 1497 setValue: setDescription 1498 }), 1499 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, { 1500 variant: "contained", 1501 fullWidth: true, 1502 type: "submit", 1503 disabled: submitDisabled, 1504 children: "Submit" 1505 }) 1506 ] 1507 }) 1508 }) 1509 ] 1510 }) 1511 }), 1512 customStations.length > 0 && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { 1513 mt: 4, 1514 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, { 1515 children: [ 1516 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, { 1517 title: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { 1518 children: [ 1519 "Custom Version For Syndication Partners ", 1520 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_24__/* ["default"] */ .Z, { 1521 title: "You can choose the stations that show in the section, by updating the show. The below will only display stations that you have selected to get custom versions.", 1522 arrow: true, 1523 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1523Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, { 1524 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_icons_material_Info__WEBPACK_IMPORTED_MODULE_25__/* ["default"] */ .Z, {}) 1525 }) 1526 }) 1527 ] 1528 }), 1529 action: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { 1530 children: stationList.length < customStations.length && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, { 1531 variant: "outlined", 1532 onClick: ()=>handleAddStation(), 1533 sx: { 1534 marginTop: "1em", 1535 float: "right", 1536 marginBottom: "1em" 1537 }, 1538 children: "Add Station" 1539 }) 1540 }) 1541 }), 1542 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, { 1543 children: stationList.map((station, index)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .ZP, { 1544 container: true, 1545 spacing: 2, 1546 sx: { 1547 mb: "1em" 1548 }, 1549 children: [ 1550 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .ZP, { 1551 item: true, 1552 xs: 10, 1553 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, { 1554 fullWidth: true, 1555 variant: "outlined", 1556 size: "small", 1557 children: [ 1558 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1558Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_28__/* ["default"] */ .Z, { 1559 id: "radio-station-label-".concat(index), 1560 children: "Radio Station" 1561 }), 1562 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_29__/* ["default"] */ .Z, { 1563 labelId: "radio-station-label-".concat(index), 1564 id: "radio-station-".concat(station), 1565 label: "Radio Station", 1566 value: selectedRadioStation[index] || "", 1567 onChange: (e)=>handleRadioStationChange(e, station), 1568 children: customStations.map((station)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_30__/* ["default"] */ .Z, { 1569 value: station.username, 1570 children: station.name 1571 }, station._id)) 1572 }) 1573 ] 1574 }) 1575 }), 1576 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .ZP, { 1577 item: true, 1578 xs: 2, 1579 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, { 1580 fullWidth: true, 1581 variant: "outlined", 1582 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { 1583 onDrop: (e)=>handleCustomDrop(e, index), 1584 onDragOver: handleDragOver, 1585 style: { 1586 display: "inline-block", 1587 cursor: "pointer", 1588 padding: "10px 20px", 1589 color: "white", 1590 borderRadius: "4px", 1591 textAlign: "center" 1592 }, 1593 children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_Form
1593Control_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, { 1594 component: "label", 1595 variant: "contained", 1596 startIcon: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_icons_material_CloudUpload__WEBPACK_IMPORTED_MODULE_31__/* ["default"] */ .Z, { 1597 sx: { 1598 color: "white" 1599 } 1600 }), 1601 children: [ 1602 "Upload file", 1603 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { 1604 id: "custom-file-input-".concat(index), 1605 type: "file", 1606 accept: "audio/*", 1607 onChange: (e)=>handleFileInputChange(e, index), 1608 style: { 1609 display: "none" 1610 } 1611 }) 1612 ] 1613 }) 1614 }) 1615 }) 1616 }), 1617 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .ZP, { 1618 item: true, 1619 xs: 12, 1620 children: [ 1621 Object.entries(stationFileInputs).map((param, idx)=>{ 1622 let [key, file] = param; 1623 let preview = null; 1624 if (key === station && file && file.type.startsWith("audio/")) { 1625 // Handle audio files 1626 preview = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, { 1627 sx: { 1628 display: "flex", 1629 maxWidth: 200, 1630 flexDirection: "column", 1631 alignItems: "center" 1632 }, 1633 children: [ 1634 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_player_AudioPlayer__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { 1635 src: URL.createObjectURL(file), 1636 imgSrc: showInfo.icon, 1637 activePlayer: activePlayer, 1638 setA
1638ctivePlayer: setActivePlayer 1639 }), 1640 /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("small", { 1641 children: file.name 1642 }) 1643 ] 1644 }, "preview_".concat(idx)); 1645 } 1646 return preview; 1647 }), 1648 invalidStationFiles.includes(station) && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_barrel_optimize_names_Alert_AlertTitle_Box_Button_Card_CardContent_CardHeader_CircularProgress_FormControl_Grid_IconButton_InputLabel_ListItem_ListItemSecondaryAction_ListItemText_MenuItem_Select_Snackbar_TextField_Tooltip_Typography_mui_material__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, { 1649 severity: "warning", 1650 sx: { 1651 mt: 1 1652 }, 1653 children: "The selected file for this station is invalid. Please download/sync it locally and re-select." 1654 }) 1655 ] 1656 }) 1657 ] 1658 }, "station_1")) 1659 }) 1660 ] 1661 }) 1662 }) 1663 ] 1664 }); 1665}; 1666var __N_SSP = true; 1667/* harmony default export */ __webpack_exports__["default"] = ((0,_hocs_withTheme__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(UploadPage, "dashboard", true)); 1668 1669 1670/***/ }) 1671 1672}, 1673/******/ function(__webpack_require__) { // webpackRuntimeModules 1674/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } 1675/******/ __webpack_require__.O(0, [7466,1664,301,7066,8999,2978,1038,3063,760,2044,7324,3818,2888,9774,179], function() { return __webpack_exec__(73842); }); 1676/******/ var __webpack_exports__ = __webpack_require__.O(); 1677/******/ _N_E = __webpack_exports__; 1678/******/ } 1679]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.