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GAAmB,iBAARA,EACV,MAAO,GAGR,GAAIG,MAAMC,QAAQJ,GACjB,OAAON,EAAWW,MAAM,KAAML,GAG/B,GAAIA,EAAIM,WAAaC,OAAOC,UAAUF,WAAaN,EAAIM,SAASA,WAAWG,SAAS,iBACnF,OAAOT,EAAIM,WAGZ,IAAIT,EAAU,GAEd,IAAK,IAAId,KAAOiB,EACXL,EAAOe,KAAKV,EAAKjB,IAAQiB,EAAIjB,KAChCc,EAAUI,EAAYJ,EAASd,IAIjC,OAAOc,CACR,CAEA,SAASI,EAAaU,EAAOC,GAC5B,OAAKA,EAIDD,EACIA,EAAQ,IAAMC,EAGfD,EAAQC,EAPPD,CAQT,CAEqCE,EAAOC,SAC3CpB,EAAWqB,QAAUrB,EACrBmB,EAAOC,QAAUpB,QAKhB,KAFwB,EAAF,WACtB,OAAOA,CACP,UAFoB,OAEpB,YAIH,CArEA","sources":["webpack:///./Scripts/_PandoNexis/Components/GenericLoader.js","webpack:///../node_modules/classnames/index.js"],"sourcesContent":["import React, { Fragment, useMemo, useEffect, useState, useCallback } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport { translate } from '../../Services/translation';\nimport { toggleGenericLoaderList } from '../Actions/GenericLoader.action';\nimport classNames from 'classnames';\nimport {\n maxFileSizeToDownload\n} from '../constants';\nconst GenericLoader = () => {\n const dispatch = useDispatch();\n const [runningLoaderType, setRunningLoaderType] = useState('');\n const [isClosing, setIsClosing] = useState(false);\n const [loaderActive, setLoaderActive] = useState(false);\n const {\n loaderType,\n loaderState,\n loaderCounter,\n genericListLoaded,\n showGenericList,\n genericListItems,\n showText,\n } = useSelector((state) => state.genericLoader);\n\n const closeGenericLoaderList = () => {\n dispatch(toggleGenericLoaderList(false));\n };\n\n useEffect(() => {\n if (loaderCounter > 0) {\n setLoaderActive(true);\n }\n if (loaderCounter === 1) {\n setRunningLoaderType(loaderType);\n } else if (loaderCounter === 0) {\n setIsClosing(true);\n setTimeout(() => { setLoaderActive(false); setIsClosing(false); setRunningLoaderType(''); }, 500);\n \n }\n }, [loaderCounter]);\n const listItems = useMemo(() => (\n genericListItems?.map((item, index) => (\n
  • \n {`${item.text} ${item.errorText || ''}`}\n
  • \n ))\n ), [genericListItems]);\n\n return (\n \n {showGenericList && (\n \n
    \n
    \n
    closeGenericLoaderList()}>\n \n cancel_presentation\n \n
    \n
    \n

    {translate('common.genericloader.uploading')} {genericListItems?.length || 0} {genericListItems?.length > 1 ? translate('common.genericloader.files') : translate('common.genericloader.file')}

    \n
    {translate('common.genericloader.files.maxsizeis')} {maxFileSizeToDownload / 1000000}MB
    \n
    \n {genericListItems?.length > 0 &&\n
      {listItems}
    \n
    \n {genericListLoaded ?\n {translate('common.genericloader.files.filesareuploaded')} :\n {translate('common.genericloader.uploading')}\n }\n
    \n
    \n }\n
    \n
    \n
    \n )}\n {loaderActive && (\n
    \n {loaderState !== 'timeOut' ? (\n
    \n {runningLoaderType === 'ripple' && (\n
    \n
    \n
    \n
    \n
    \n )}\n {showText && {translate('common.loadingtext')}}\n
    ) :\n (\n
    \n {loaderState === 'timeOut' && {translate('common.timeouttext')}}\n
    \n )}\n\n
    \n )}\n
    \n );\n};\n\nexport default GenericLoader;\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"names":["GenericLoader","dispatch","useDispatch","runningLoaderType","setRunningLoaderType","useState","isClosing","setIsClosing","loaderActive","setLoaderActive","loaderType","loaderState","loaderCounter","genericListLoaded","showGenericList","genericListItems","showText","useSelector","state","genericLoader","useEffect","setTimeout","listItems","useMemo","map","item","index","React","key","className","uploadStatus","text","errorText","Fragment","onClick","toggleGenericLoaderList","translate","length","maxFileSizeToDownload","classNames","hasOwn","hasOwnProperty","classes","i","arguments","arg","appendClass","parseValue","Array","isArray","apply","toString","Object","prototype","includes","call","value","newClass","module","exports","default"],"sourceRoot":""}