{"version":3,"sources":["imgs/profile_pic.jpg","imgs/read-wallpaper.jpg","components/CustomDialogs/PopMenu.tsx","components/Menu/ProfileDropDown.tsx","redux/reducers/toastReducer.ts","redux/reducers/profileReducer.ts","redux/reducers/eventsReducer.ts","redux/reducers/usersNotificationsReducer.ts","services/notificationsService.ts","redux/sagas/usersNotificationSaga.ts","redux/actionTypes.ts","redux/store.ts","auth/AuthenticatedUser.ts","Constants.ts","services/commonServices.ts","services/profileService.ts","redux/actions.ts","services/postsService.ts","services/Helpers.ts","components/NComponents/NCancelIcon.tsx","components/NComponents/NButton.tsx","components/CustomDialogs/PostDialog.tsx","services/searchService.ts","components/Search/LiveSearchItem.tsx","components/Search/SearchBar.tsx","components/Menu/Notifications.tsx","components/Menu/Nav.tsx","services/commentsService.ts","components/TimelinePost/Comments/CommentItem.tsx","components/TimelinePost/PostButtons.tsx","components/Hooks/useComments.tsx","components/TimelinePost/PostFooter.tsx","components/CustomDialogs/ImageDialog.tsx","components/TimelinePost/PostBody.tsx","components/CustomDialogs/AbuseDialog.tsx","components/TimelinePost/PostHeading.tsx","components/TimelinePost/index.tsx","components/TimelinePost/TimelineSkeleton.tsx","components/HOC/withPosts.tsx","components/HOC/withScrollPercentage.tsx","components/Home/index.tsx","components/Read.js","components/Loading.tsx","components/UserProfile/CropImage.js","components/CustomDialogs/EditProfileDialog.tsx","components/UserProfile/ProfileHeading.tsx","components/HOC/withProfile.tsx","components/UserProfile/index.tsx","components/CustomSnackNotification.tsx","components/Search/UserSearchItem.tsx","components/Search/index.tsx","components/Home/SingleThread.tsx","components/LandingPage/Heading.tsx","components/LandingPage/BodyContent.tsx","components/LandingPage/Tiles.tsx","components/LandingPage/Footer.tsx","components/LandingPage/index.tsx","App.tsx","serviceWorker.js","auth/Auth0ProviderWithHistory.js","theme.ts","index.tsx"],"names":["module","exports","PopMenuButton","props","onClick","className","icon","text","PopMenu","closePopOver","popover","document","getElementsByClassName","hideOnScroll","length","classList","contains","style","display","onClose","wrapperRef","useRef","useEffect","ref","handleClickOutside","event","current","target","addEventListener","body","onwheel","removeEventListener","Popper","open","anchorEl","transition","placement","popperOptions","strategy","disablePortal","children","ProfileDropDown","React","useState","setAnchorEl","useAuth0","logout","user","pictureUrl","useSelector","state","profile","picture","handleClose","currentTarget","alt","src","Boolean","id","to","sub","AccountCircleOutlinedIcon","MeetingRoomIcon","sessionStorage","setItem","returnTo","window","location","origin","toastState","show","severity","undefined","message","submitting","profileState","userId","name","title","eventsSlice","createSlice","initialState","postsEvent","reducers","newPostCreated","action","type","payload","postDeleted","postUpdated","clearEvents","actions","notifications","Array","notificationsSlice","fetchSucceded","fetchFailed","getUsersNotificationsAsync","a","callApiWithResponseAsync","method","fetchNotificationsWorker","notificationsSaga","call","put","takeLatest","sagaMiddleware","createSagaMiddleware","store","configureStore","reducer","toast","events","eventsReducer","usersNotifications","usersNotificationsReducer","middleware","getDefaultMiddleware","concat","run","console","log","useAppDispatch","useDispatch","useAppSelector","AccessToken","auth0","userTokensSet","getAccessTokenSilently","dispatch","getSignedInUserInfoThunk","Constants","MAX_TIMELINE_BODY_CHARS","MAX_TIMELINE_BODY_INITIAL_LINES","MAX_POST_TAGS","MAX_POST_CONTENT_CHARS","MAX_IMAGE_FILE_SIZE_MB","MAX_PROFILE_NAME_LENGTH","MAX_PROFILE_TITLE_LENGTH","MAX_PROFILE_ABOUT_LENGTH","MAX_PROFILE_EDUCATION_LENGTH","SESSION_STORAGE_PROFILE_USER_ID","callApiWithOkAsync","path","config","headers","fetch","response","ok","status","error","json","result","callApiWithPaginatedResponseAsync","apiResponse","code","continuationToken","get","getUserInfoAsync","followUserAsync","asynchronous","JSON","stringify","keepalive","updateUserProfileAsync","formData","FormData","append","imageChanged","existingPictureUrl","imageFile","getUserProfileAsync","showSuccessToastAction","showErrorToastAction","showInfoToastAction","hideToastAction","submittingAction","getState","userInfo","getPostsByUserAsync","page","getSinglePostAsync","postId","getTimelinePostsAsync","reportPostAbuseAsync","updatePostLikeAsync","synchronous","createNewPostAsync","content","tags","file","mode","cache","credentials","updatePostAsync","deletePostAsync","isValidHttpUrl","sample","url","URL","_","protocol","handleGenericCounter","originalBool","currentBool","originalCount","currentCount","newBool","newCount","getFriendlyTime","timestamp","date","DateTime","fromISO","diff","local","seconds","Math","round","as","minutes","hours","days","weeks","months","toLocaleString","weekday","TIME_SIMPLE","month","day","DATE_MED","NCancelIcon","NIconButton","size","rest","NButton","PostDialog","handleFileInput","files","from","every","setState","deleteImage","onPost","disablePostButton","getElementById","focus","bodyText","trim","newPost","data","imageUrl","updatePost","updatedPost","onTagsChange","newTags","map","t","startsWith","onBodyInput","e","value","this","submitText","Dialog","TextField","onChange","autoFocus","multiline","fullWidth","required","placeholder","position","createObjectURL","maxTags","editable","removeOnBackspace","click","width","accept","hidden","Component","connect","DialogContent","withStyles","theme","root","padding","spacing","MuiDialogContent","SearchCache","searchAsync","key","max","LiveSearchItem","history","useHistory","stopSearch","push","useStyles","makeStyles","inputInput","paddingLeft","transitions","create","breakpoints","up","searchLoading","getDefaultSearchResult","limit","total","users","SearchBar","classes","fromQuery","URLSearchParams","search","setValue","setData","onFocus","renderSearchPage","blur","searchValue","onDocumentClick","InputBase","onKeyDown","autoComplete","input","inputProps","Paper","Notifications","notificationsAnchor","setNotificationsAnchor","reduxDispatch","n","index","notificationId","hideMenu","NotificationViewItem","fromUserId","postDialogOpen","setPostDialogOpen","updateCommentLikeAsync","getPostCommentsAsync","createCommentAsync","deleteCommentAsync","commentId","CommentItem","handleBeforeUnload","processCommentLike","onLike","updated","comment","likedByViewer","likeComment","likeCount","viewerUserId","like","onReply","onDotMenu","onDotMenuClose","onDelete","onCommentDeleted","onCopyText","navigator","clipboard","writeText","then","err","createdByThisUser","loggedInUser","replyToName","replyToUserId","createdAt","Fragment","PostButtons","processPostLike","likedByCurrentUser","likePost","likesCount","onComment","auth0Sub","Button","startIcon","commentsCount","footerReducer","loading","fetchedFromServer","continueToken","loadingNextSet","comments","unshift","userComment","numberOfCommentsToShow","filter","c","replyingTo","useComments","totalCommentsCount","useReducer","getData","newContinueToken","onCommentSubmit","replyTo","newComment","commentsToShow","slice","getPreviousNumberOfCommentsToShow","hiddenCommentsTotalCount","showMore","onShowMoreComments","reverse","forEach","PostComments","userProfilePicture","onCancelReply","onCommentChange","disabled","ImageDialog","imageSrc","maxWidth","PostBody","onReadMore","cutBodyText","cutBodyLines","onTagClicked","tag","alert","onImageDialogOpen","imageDialogOpen","onImageDialogClose","split","bodytext","join","substring","AbuseDialog","reason","setReason","onReportAbuse","report","aria-labelledby","margin","label","rowsMax","PostHeading","dotMenuClick","dotMenuClose","postCreatedByCurrentUser","onEdit","editDialogOpen","onEditDialogClose","abuseDialogOpen","onAbuseDialogClose","onCopyLink","href","postCreatedByThisUser","edited","IconButton","EditOutlinedIcon","DeleteOutlineIcon","LinkIcon","ReportProblemOutlinedIcon","TimelinePost","PostFooter","card","media","height","TimelineSkeleton","Card","CardHeader","avatar","Skeleton","animation","variant","marginBottom","subheader","CardContent","postsReducer","posts","p","eventsReset","previousProfileUserId","withPosts","postsType","childProps","scrollPercentage","profileUserId","isPersonalProfile","propsLocal","loadingPosts","withScrollPercentage","setScrollPercentage","handleScroll","requestAnimationFrame","calculateScrollDistance","scrollTop","pageYOffset","winHeight","innerHeight","totalDocScrollLength","getDocHeight","scrollPostion","floor","scrollHeight","documentElement","offsetHeight","clientHeight","post","Read","profile_pic","xmlns","viewBox","d","fill","read_wallpaper","data-selectable-paragraph","Loading","createImage","Promise","resolve","reject","image","Image","setAttribute","getRadianAngle","degreeValue","PI","getCroppedImg","pixelCrop","filetype","rotation","canvas","createElement","ctx","getContext","maxSize","safeArea","sqrt","translate","rotate","drawImage","getImageData","putImageData","x","y","toDataURL","urltoFile","filename","mimeType","match","res","arrayBuffer","buf","File","EditProfileDialog","onCropChange","crop","onCropComplete","croppedArea","croppedAreaPixels","initialSet","InitialCroppedAreaPixels","onZoomChange","zoom","readFile","imageDataUrl","originalFileType","reader","FileReader","readAsDataURL","imageUpdateable","includes","cropChanged","updateProfile","originalCrop","currentCrop","compare","Number","misMatchPercentage","postData","updatedProfile","UpdateProfileAction","onNameChange","onTitleChange","aspect","lastIndexOf","isGravatar","maxLength","withAuth0","ProfileHeading","processFollowing","openEditDialog","isFollowing","followUser","follow","handleFollowing","followersCount","postsCount","followingCount","isPersonalAccount","profileReducer","withProfile","isAuthenticated","profileInRedux","useParams","getProfile","hocLocal","loadingProfile","SlideTransition","Slide","direction","CustomSnackNotification","handleToastClose","Snackbar","TransitionComponent","autoHideDuration","elevation","SubmittingIcon","UserSearchItem","loadProfile","final","SearchResults","DOMPurify","sanitize","setLoading","setPage","ErrorMessage","requiredPages","ceil","Pagination","count","color","SingleThread","setPost","Heading","HeadingContainer","NavBarWrapper","rel","onLogin","styled","div","fonts","main","colors","primaryDark","BodyContent","BodyContainer","BodyTitle","BodyText","Tiles","TilesContainer","shadows","soft","Footer","FooterContainer","LandingPage","loginWithRedirect","PageContainer","App","isLoading","sessionAuthenticated","getItem","setTokens","profilePicture","exact","component","Home","Profile","withRouter","hostname","Auth0ProviderWithHistory","domain","process","clientId","redirectUri","onRedirectCallback","appState","pathname","audience","primary","ReactDOM","render","serviceWorker","ready","registration","unregister","catch"],"mappings":"2HAAAA,EAAOC,QAAU,IAA0B,yC,oBCA3CD,EAAOC,QAAU,IAA0B,4C,saCUrCC,G,OAAgB,SAACC,GACnB,OACI,4BAAQC,QAASD,EAAMC,QAASC,UAAU,QACrCF,EAAMG,MAAQ,kBAACH,EAAMG,KAAP,MACf,0BAAMD,UAAU,QAAQF,EAAMI,SAqE3BC,EAxDC,SAACL,GAEb,IAAMM,EAAe,WACjB,IAAIC,EAAUC,SAASC,uBAAuB,kBAE1CT,EAAMU,cAAgBH,EAAQI,SAAWJ,EAAQ,GAAGK,UAAUC,SAAS,WACtEN,EAAQ,GAAsBO,MAAMC,QAAU,QAEnDf,EAAMgB,WAGJC,EAAaC,iBAAO,MA2B1B,OAzBAC,qBAAU,WACN,IAAMC,EAAMH,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QAAQ0gB,UAAW,kBAAO,kBAAC,GAAD,WAI1C,kBAAC,GAAD,QAxBC,kBAAC,GAAD,MALA,kBAAC,GAAD,OAPPT,IACO,kBAAC,GAAD,W,GApBKtmB,IAAM+O,WAoERC,oBANhB,SAAyBxO,GACvB,MAAO,CACLqmB,eAAgBrmB,EAAMC,QAAQC,WAIO,GAAzBsO,CAA6BkY,YAAWhF,YAAUsE,MClF9CzlB,QACW,cAA7BS,OAAOC,SAAS0lB,UAEe,UAA7B3lB,OAAOC,SAAS0lB,UAEhB3lB,OAAOC,SAAS0lB,SAASxH,MACvB,2DCbN,IAwBeyH,GAxBkB,SAAC,GAAkB,IAAhBtnB,EAAe,EAAfA,SAK1B+P,EAAUC,cAMhB,OACI,kBAAC,IAAD,CACIuX,OAZOC,yBAaPC,SAZSD,mCAaTE,YAAahmB,OAAOC,SAASC,OAC7B+lB,mBATmB,SAACC,GACxB7X,EAAQG,MAAa,OAAR0X,QAAQ,IAARA,OAAA,EAAAA,EAAUnmB,WAAYC,OAAOC,SAASkmB,WAS/CC,SAdSN,eAgBRxnB,ICPEqP,GAda,CACxBsW,OAAQ,CACJ5nB,KAAM,kBACNgqB,QAAS,UACTnC,YAAa,WAEjBH,MAAO,CACHC,KAAK,qJAETS,QAAS,CACLC,KAAM,qCCFd4B,IAASC,OACP,kBAAC,IAAD,CAAU7jB,MAAOA,IACf,kBAAC,IAAD,KACE,kBAAC,GAAD,KACE,kBAAC,KAAD,CAAeiL,MAAOA,IACpB,kBAAC,GAAD,UAKRlR,SAAS0O,eAAe,SH8GpB,kBAAmBuH,WACrBA,UAAU8T,cAAcC,MACrB5T,MAAK,SAAA6T,GACJA,EAAaC,gBAEdC,OAAM,SAAAxhB,GACL9B,QAAQ8B,MAAMA,EAAM7E,a","file":"static/js/main.92557317.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/profile_pic.18b60175.jpg\";","module.exports = __webpack_public_path__ + \"static/media/read-wallpaper.924bb182.jpg\";","import React, { useEffect, useRef } from 'react';\nimport Popper from '@material-ui/core/Popper';\nimport '../../styles/popMenu.scss';\n\ntype MenuButtonProps = {\n icon?: any,\n text: string,\n onClick: () => void\n}\n\nconst PopMenuButton = (props: MenuButtonProps) => {\n return (\n \n )\n}\n\ntype PopOverProps = {\n open: boolean,\n anchorEl: any,\n onClose: () => void,\n children: any\n hideOnScroll: boolean\n}\n\nconst PopMenu = (props: PopOverProps) => {\n\n const closePopOver = () => {\n let popover = document.getElementsByClassName(\"simple-popover\");\n\n if (props.hideOnScroll && popover.length && !popover[0].classList.contains(\"fixed\")) {\n (popover[0] as HTMLDivElement).style.display = \"none\";\n }\n props.onClose();\n }\n\n const wrapperRef = useRef(null);\n\n useEffect(() => {\n const ref = wrapperRef as any;\n function handleClickOutside(event: { target: any; }) {\n if (ref.current && !ref.current.contains(event.target)) {\n closePopOver();\n }\n }\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n document.body.addEventListener('touchstart', closePopOver, false);\n\n if (props.hideOnScroll) {\n document.body.onwheel = closePopOver;\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n document.body.removeEventListener('touchstart', closePopOver, false);\n\n if (props.hideOnScroll) {\n document.body.onwheel = null;\n }\n };\n }, [wrapperRef]);\n\n return (\n <>\n \n
\n {props.children}\n
\n
\n \n )\n}\n\nexport default PopMenu;\nexport { PopMenuButton };","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport '../../styles/nav.scss';\nimport '../../styles/read.scss';\nimport { useSelector } from 'react-redux';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport AccountCircleOutlinedIcon from '@material-ui/icons/AccountCircleOutlined';\nimport MeetingRoomIcon from '@material-ui/icons/MeetingRoom';\nimport { RootState } from '../../redux/store';\nimport PopMenu, { PopMenuButton } from '../CustomDialogs/PopMenu';\n\n\nexport default function ProfileDropDown() {\n const [anchorEl, setAnchorEl] = React.useState(null);\n const { logout, user } = useAuth0();\n const pictureUrl = useSelector((state: RootState) => state.profile.picture);\n\n const handleClick = (event: React.MouseEvent) => {\n setAnchorEl(event.currentTarget as any);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const onLogout = () => {\n sessionStorage.setItem('sessionAuthenticated', \"false\");\n logout({\n returnTo: window.location.origin\n });\n }\n\n return (\n
\n \"\"\n\n \n\n
\n \n \n \n \n
\n\n
\n
\n );\n}","import { IAction } from '../actions';\nimport { HideToast, ShowErrorToast, ShowInfoToast, ShowSuccessToast, ShowWarningToast, Submitting } from '../actionTypes';\n\nexport type ToastState = {\n show: boolean,\n severity: \"success\" | \"error\" | \"warning\" | \"info\" | undefined,\n message: string,\n submitting: boolean\n}\n\nconst toastState: ToastState = {\n show: false,\n severity: undefined,\n message: \"\",\n submitting: false\n}\n\nexport default function toastReducer(state = toastState, action: IAction): ToastState {\n\n switch (action.type) {\n case ShowSuccessToast: {\n return { ...state, severity: \"success\", show: true, message: action.payload, submitting: false };\n }\n case ShowErrorToast: {\n return { ...state, severity: \"error\", show: true, message: action.payload, submitting: false };\n }\n case ShowWarningToast: {\n return { ...state, severity: \"warning\", show: true, message: action.payload, submitting: false };\n }\n case ShowInfoToast: {\n return { ...state, severity: \"info\", show: true, message: action.payload, submitting: false };\n }\n case HideToast: {\n return { ...state, show: false, submitting: false };\n }\n case Submitting: {\n return { ...state, severity: \"info\", show: true, message: \"Submitting...\", submitting: true };\n }\n }\n\n return state;\n}\n\n","import { IAction } from '../actions';\n\nexport type ProfileState = {\n userId: null | string,\n name: null | string,\n title: null | string,\n picture: null | string\n}\n\nconst profileState: ProfileState = {\n userId: null,\n name: null,\n title: null,\n picture: null\n}\n\nexport default function profileReducer(state = profileState, action: IAction) {\n\n if (action.type === \"updateProfile\") {\n return { ...state, picture: action.payload.picture, title: action.payload.title, name: action.payload.name, userId: action.payload.userId };\n } \n\n return state;\n}\n\n","import { createSlice } from '@reduxjs/toolkit'\n\nexport interface Event {\n type: string,\n payload: any\n}\n\ninterface EventsState {\n postsEvent: Event | null\n}\n\nconst initialState: EventsState = {\n postsEvent: null\n}\n\nconst eventsSlice = createSlice({\n name: 'events',\n initialState,\n reducers: {\n newPostCreated(state, action) {\n state.postsEvent = {\n type: action.type,\n payload: { ...action.payload }\n };\n },\n postDeleted(state, action) {\n state.postsEvent = {\n type: action.type,\n payload: { ...action.payload }\n };\n },\n postUpdated(state, action) {\n state.postsEvent = {\n type: action.type,\n payload: { ...action.payload }\n };\n },\n clearEvents(state) {\n state.postsEvent = null;\n }\n }\n});\n\n\nconst { newPostCreated, postDeleted, postUpdated, clearEvents } = eventsSlice.actions;\n\nexport default eventsSlice.reducer;\nexport { newPostCreated, postDeleted, postUpdated, clearEvents };","import { createSlice } from '@reduxjs/toolkit'\nimport { NotificationItem } from '../../Types';\n\ninterface UsersNotificationsState {\n notifications: NotificationItem[]\n}\n\nconst initialState: UsersNotificationsState = {\n notifications: new Array()\n}\n\nconst notificationsSlice = createSlice({\n name: \"usersNotifications\",\n initialState,\n reducers: {\n fetchSucceded(state, action) {\n state.notifications = action.payload;\n },\n fetchFailed(state) {\n state.notifications = new Array();\n }\n }\n});\n\nconst { fetchSucceded, fetchFailed } = notificationsSlice.actions;\n\nexport default notificationsSlice.reducer;\nexport { fetchSucceded, fetchFailed };\n","import { NotificationItem } from '../Types';\nimport { callApiWithResponseAsync } from './commonServices';\n\nexport async function getUsersNotificationsAsync(userId: string): Promise {\n return await callApiWithResponseAsync(`getUsersNotifications`, \"/api/v1/metadata/notifications\", {\n method: 'GET' \n });\n}\n","import { call, put, takeEvery, takeLatest } from 'redux-saga/effects';\nimport { getUsersNotificationsAsync } from '../../services/notificationsService';\nimport { IAction } from '../actions';\nimport { FetchUsersNotifications } from '../actionTypes';\nimport { fetchFailed, fetchSucceded } from '../reducers/usersNotificationsReducer';\n\n\nfunction* fetchNotificationsWorker(action: IAction): any {\n try {\n const notifications = yield call(getUsersNotificationsAsync, action.payload);\n yield put(fetchSucceded(notifications));\n } catch (e) {\n yield put(fetchFailed());\n }\n}\n\n/*\n Alternatively you may use takeLatest.\n\n Does not allow concurrent fetches of user. If \"USER_FETCH_REQUESTED\" gets\n dispatched while a fetch is already pending, that pending fetch is cancelled\n and only the latest one will be run.\n*/\nfunction* notificationsSaga() {\n yield takeLatest(FetchUsersNotifications, fetchNotificationsWorker);\n}\n\nexport default notificationsSaga;\n\n\n/*\n Starts fetchUser on each dispatched `FetchUsersNotifications` action.\n Allows concurrent fetches of user.\n*/\n// function* notificationsSaga() {\n// yield takeEvery(FetchUsersNotifications, fetchNotificationsWorker);\n// }\n","export const Loading = \"Loading\";\nexport const LoadingNewProfile = \"LoadingNewProfile\";\nexport const Completed = \"Completed\";\nexport const NewPostCreated = \"NewPostCreated\";\nexport const PostDeleted = \"PostDeleted\";\nexport const PostUpdated = \"PostUpdated\";\nexport const LoadingNextSet = \"LoadingNextSet\";\nexport const EventsReset = \"EventsReset\";\nexport const UpdateFromRedux = \"UpdateFromRedux\";\n\nexport const ShowSuccessToast = \"showSuccessToast\";\nexport const ShowErrorToast = \"showErrorToast\";\nexport const ShowWarningToast = \"showWarningToast\";\nexport const ShowInfoToast = \"showInfoToast\";\nexport const HideToast = \"hideToast\";\nexport const Submitting = \"submitting\";\n\nexport const UpdateProfile = \"updateProfile\";\n\nexport const FetchUsersNotifications =\"fetchUsersNotifications\";\n","\nimport { configureStore } from \"@reduxjs/toolkit\";\nimport toastReducer from \"./reducers/toastReducer\";\nimport profileReducer from \"./reducers/profileReducer\";\nimport eventsReducer from \"./reducers/eventsReducer\";\nimport usersNotificationsReducer from \"./reducers/usersNotificationsReducer\";\nimport { TypedUseSelectorHook, useDispatch, useSelector } from \"react-redux\";\nimport createSagaMiddleware from \"redux-saga\";\nimport notificationsSaga from \"./sagas/usersNotificationSaga\";\n\n// create the saga middleware\nconst sagaMiddleware = createSagaMiddleware();\n\n// https://redux.js.org/tutorials/fundamentals/part-8-modern-redux\nconst store = configureStore({\n reducer: {\n toast: toastReducer,\n profile: profileReducer,\n events: eventsReducer,\n usersNotifications: usersNotificationsReducer\n },\n middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(sagaMiddleware)\n})\n\n\n// then run the saga\nsagaMiddleware.run(notificationsSaga)\n\n\n// store.subscribe(() => console.log('Redux state changed!!'));\nconsole.log(\"\\nRedux store created\");\n\n// Infer the `RootState` and `AppDispatch` types from the store itself\nexport type RootState = ReturnType\n\n// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}\nexport type AppDispatch = typeof store.dispatch\n\n\n// Use throughout your app instead of plain `useDispatch` and `useSelector`\nexport const useAppDispatch = () => useDispatch();\nexport const useAppSelector: TypedUseSelectorHook = useSelector;\n\nexport default store;","import { Auth0ContextInterface } from '@auth0/auth0-react';\nimport { AnyAction } from 'redux';\nimport { ThunkDispatch } from 'redux-thunk';\nimport { getSignedInUserInfoThunk } from '../redux/actions';\nimport store, { RootState } from '../redux/store';\n\nvar AccessToken: string | null = null;\n\nasync function setTokens(auth0: Auth0ContextInterface, userTokensSet: () => void) {\n AccessToken = await auth0.getAccessTokenSilently();\n sessionStorage.setItem('sessionAuthenticated', `${AccessToken != null}`);\n\n (store.dispatch as ThunkDispatch)(getSignedInUserInfoThunk(auth0.user!.sub!))\n userTokensSet();\n}\n\n\nexport { AccessToken, setTokens }","const Constants = {\n MAX_TIMELINE_BODY_CHARS: 300,\n MAX_TIMELINE_BODY_INITIAL_LINES: 5,\n MAX_POST_TAGS: 5,\n MAX_POST_CONTENT_CHARS: 5000,\n MAX_IMAGE_FILE_SIZE_MB: 8,\n MAX_PROFILE_NAME_LENGTH: 50,\n MAX_PROFILE_TITLE_LENGTH: 100,\n MAX_PROFILE_ABOUT_LENGTH: 2000,\n MAX_PROFILE_EDUCATION_LENGTH: 200,\n SESSION_STORAGE_PROFILE_USER_ID: \"profileUserId\"\n}\n\nexport default Constants;\n\nconst ContinuationTokenHeader = \"x-ms-continuation\";\n\nexport { ContinuationTokenHeader }","import { AccessToken } from '../auth/AuthenticatedUser';\nimport { ContinuationTokenHeader } from '../Constants';\n\nconst isDevelopment: boolean = !process.env.NODE_ENV || process.env.NODE_ENV === 'development';\nconst ServerUrl = isDevelopment ? process.env.REACT_APP_BACKEND_API : \"\";\n\nexport interface ApiResponse {\n ok: boolean,\n code?: number,\n result: any,\n continuationToken: string | null\n error?: any\n}\n\nexport async function callApiWithOkAsync(name: string, path: string, config: any = {}): Promise {\n try {\n config.headers = config.headers || {};\n config.headers['Authorization'] = \"Bearer \" + AccessToken;\n\n const response = await fetch(`${ServerUrl}${path}`, config);\n console.log(`\\nName: ${name}, Path: ${path}, Ok: ${response.ok}, Status: ${response.status}`);\n return response.ok;\n } catch (error) {\n console.error(`Error in ${name} api call => Url: ${ServerUrl}${path}, error: ${error}`);\n }\n return false;\n}\n\nexport async function callApiWithResponseAsync(name: string, path: string, config: any = {}, log = true): Promise {\n try {\n config.headers = config.headers || {};\n config.headers['Authorization'] = \"Bearer \" + AccessToken;\n\n const response = await fetch(`${ServerUrl}${path}`, config);\n const result = await response.json();\n\n if (log) {\n console.log(`\\nName: ${name}, Path: ${path}, Ok: ${response.ok}, Status: ${response.status}`);\n console.log(result);\n }\n if (response.ok) {\n return result;\n } else {\n return null;\n }\n } catch (error) {\n console.error(`Error in ${name} api call => Url: ${ServerUrl}${path}, error: ${error}`);\n return null;\n }\n}\n\nexport async function callApiWithPaginatedResponseAsync(name: string, path: string, config: any = {}, log = true): Promise {\n try {\n config.headers = config.headers || {};\n config.headers['Authorization'] = \"Bearer \" + AccessToken;\n\n const response = await fetch(`${ServerUrl}${path}`, config);\n const result = await response.json();\n\n const apiResponse = {\n ok: response.ok,\n code: response.status,\n result,\n continuationToken: response.headers.get(ContinuationTokenHeader)\n };\n\n if (log) {\n console.log(`\\nName: ${name}, Path: ${path}, Ok: ${response.ok}, Status: ${response.status}`);\n console.log(apiResponse);\n }\n\n return apiResponse;\n } catch (error) {\n console.error(`Error in ${name} api call => Url: ${ServerUrl}${path}, error: ${error}`);\n return {\n ok: false,\n error: error,\n continuationToken: null,\n result: null\n };\n }\n}","import { FollowRequest, Profile, UpdateProfileRequest, UserInfo } from '../Types';\nimport { callApiWithOkAsync, callApiWithResponseAsync } from './commonServices';\n\nexport async function getUserInfoAsync(userId: string): Promise {\n return await callApiWithResponseAsync(\"getUserInfo\", `/api/v1/profile/info/${userId}`, {\n method: 'GET'\n });\n}\n\nexport async function followUserAsync(payload: FollowRequest, asynchronous: boolean = false): Promise {\n\n await callApiWithOkAsync(\"followUser\", \"/api/v1/metadata/follow\", {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload),\n keepalive: asynchronous\n });\n}\n\nexport async function updateUserProfileAsync(payload: UpdateProfileRequest): Promise {\n\n const formData = new FormData();\n formData.append(\"imageChanged\", `${payload.imageChanged}`);\n formData.append(\"userId\", payload.userId);\n formData.append(\"name\", payload.name);\n formData.append(\"existingPictureUrl\", payload.existingPictureUrl);\n\n if (payload.title) {\n formData.append(\"title\", payload.title);\n }\n\n if (payload.imageFile && payload.imageChanged) {\n formData.append('formfile', payload.imageFile);\n formData.append('filetype', payload.imageFile.type);\n }\n\n return await callApiWithResponseAsync(\"updateUserProfile\", \"/api/v1/profile\", {\n method: 'POST',\n body: formData\n });\n}\n\nexport async function getUserProfileAsync(userId: string): Promise {\n return callApiWithResponseAsync(\"getUserProfile\", `/api/v1/profile/${userId}`, {\n method: 'GET'\n });\n}","import { UserInfo } from '../Types';\nimport { Action, ActionCreator, Dispatch, AnyAction } from 'redux';\nimport { ThunkAction, ThunkDispatch } from 'redux-thunk';\nimport { getUserInfoAsync } from '../services/profileService';\nimport { AppDispatch, RootState } from './store';\nimport { FetchUsersNotifications, HideToast, ShowErrorToast, ShowInfoToast, ShowSuccessToast, ShowWarningToast, Submitting, UpdateProfile } from './actionTypes';\n\nexport interface IAction {\n type: string,\n payload?: any\n}\n\n//toast\nexport function showSuccessToastAction(payload: any): IAction {\n return { type: ShowSuccessToast, payload }\n}\n\nexport function showErrorToastAction(payload: any): IAction {\n return { type: ShowErrorToast, payload }\n}\n\nexport function showWarningToastAction(payload: any): IAction {\n return { type: ShowWarningToast, payload }\n}\n\nexport function showInfoToastAction(payload: any): IAction {\n return { type: ShowInfoToast, payload }\n}\n\nexport function hideToastAction(): IAction {\n return { type: HideToast }\n}\n\nexport function submittingAction(): IAction {\n return { type: Submitting }\n}\n\n//profile\nexport function UpdateProfileAction(userInfo: UserInfo): AnyAction {\n return { type: UpdateProfile, payload: userInfo }\n}\n\nexport function getSignedInUserInfoThunk(userId: string): ThunkAction, RootState, unknown, IAction> {\n\n return async (dispatch: ThunkDispatch, getState: () => RootState) => {\n const userInfo = await getUserInfoAsync(userId);\n\n if (userInfo) {\n dispatch({ type: UpdateProfile, payload: userInfo });\n }\n }\n}\n\n//users notitifications\nexport function fetchUsersNotificationsAction(userId: string) {\n return { type: FetchUsersNotifications, payload: userId }\n}","import { ContinuationTokenHeader } from '../Constants';\nimport { CreatePostRequest, Post, PostAbuseRequest, UpdatePostLikeRequest, UpdatePostRequest } from '../Types';\nimport { ApiResponse, callApiWithOkAsync, callApiWithPaginatedResponseAsync, callApiWithResponseAsync } from './commonServices';\n\n\nexport async function getPostsByUserAsync(userId: string, continuationToken: string | null, page: number): Promise {\n return await callApiWithPaginatedResponseAsync(`getPostsByUser, Page: ${page}`, `/api/v1/posts/user/${userId}`, {\n method: 'GET',\n headers: continuationToken ? { [ContinuationTokenHeader]: continuationToken } : {}\n });\n}\n\nexport async function getSinglePostAsync(postId: string): Promise {\n return await callApiWithResponseAsync(\"getSinglePost\", `/api/v1/posts/${postId}`, { method: 'GET' });\n}\n\nexport async function getTimelinePostsAsync(continuationToken: string | null, page: number): Promise {\n return await callApiWithPaginatedResponseAsync(`getTimelinePosts, Page: ${page}`, `/api/v1/posts`, {\n method: 'GET',\n headers: continuationToken ? { [ContinuationTokenHeader]: continuationToken } : {}\n });\n}\n\nexport async function reportPostAbuseAsync(payload: PostAbuseRequest): Promise {\n\n return await callApiWithOkAsync('reportPostAbuse', `/api/v1/metadata/abuse`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload)\n });\n}\n\nexport async function updatePostLikeAsync(payload: UpdatePostLikeRequest, synchronous = false): Promise {\n\n await callApiWithOkAsync('updatePostLike', `/api/v1/posts/like`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload),\n keepalive: synchronous\n });\n}\n\nexport async function createNewPostAsync(payload: CreatePostRequest): Promise {\n\n const formData = new FormData();\n formData.append(\"content\", payload.content);\n\n if (payload.tags.length >= 1) {\n formData.append(\"tags\", JSON.stringify(payload.tags));\n }\n\n if (payload.file) {\n formData.append('formfile', payload.file);\n formData.append('filetype', payload.file.type);\n }\n\n return await callApiWithResponseAsync(\"createNewPost\", \"/api/v1/posts\", {\n mode: \"cors\",\n method: 'POST',\n cache: 'no-cache',\n credentials: 'omit',\n body: formData\n });\n}\n\nexport async function updatePostAsync(payload: UpdatePostRequest): Promise {\n\n const formData = new FormData();\n formData.append(\"postId\", payload.postId);\n formData.append(\"content\", payload.content);\n formData.append(\"imageChanged\", `${payload.imageChanged}`);\n\n if (payload.tags.length >= 1) {\n formData.append(\"tags\", JSON.stringify(payload.tags));\n }\n\n if (payload.imageFile && payload.imageChanged) {\n formData.append('formfile', payload.imageFile);\n formData.append('filetype', payload.imageFile.type);\n }\n\n return await callApiWithResponseAsync(\"updatePost\", `/api/v1/posts`, {\n method: 'PUT',\n body: formData\n });\n}\n\nexport async function deletePostAsync(postId: string): Promise {\n return await callApiWithOkAsync(\"deletePost\", `/api/v1/posts?postId=${postId}`, { method: 'Delete' });\n}","import { GenericCounter } from \"../Types\";\nimport { DateTime } from 'luxon';\n\nexport function isValidHttpUrl(sample: string): boolean {\n let url;\n\n try {\n url = new URL(sample);\n } catch (_) {\n return false;\n }\n\n return url.protocol === \"http:\" || url.protocol === \"https:\";\n}\n\nexport function handleGenericCounter(originalBool: boolean, currentBool: boolean, originalCount: number, currentCount: number): GenericCounter {\n var result: GenericCounter;\n\n if (currentBool && originalBool) {\n\n result = { newBool: false, newCount: currentCount - 1 };\n\n } else if (currentBool && !originalBool) {\n\n result = { newBool: false, newCount: originalCount };\n\n } else if (!currentBool && originalBool) {\n\n result = { newBool: true, newCount: originalCount };\n\n } else if (!currentBool && !originalBool) {\n\n result = { newBool: true, newCount: originalCount + 1 };\n\n }\n\n return result!;\n}\n\nexport function getFriendlyTime(timestamp: string): string {\n const date = DateTime.fromISO(timestamp);\n\n var now = DateTime.local();\n var diff = now.diff(date);\n\n let seconds = Math.round(diff.as(\"seconds\"));\n let minutes = Math.round(diff.as(\"minutes\"));\n let hours = Math.round(diff.as(\"hours\"));\n let days = Math.round(diff.as(\"days\"));\n let weeks = Math.round(diff.as(\"weeks\"));\n let months = Math.round(diff.as(\"months\"));\n let years = Math.round(diff.as(\"years\"));\n\n // console.log(`seconds: ${seconds}, minutes: ${minutes}, hours: ${hours}, days: ${days}, weeks: ${weeks}, months: ${months}, years: ${years}`);\n let result = \"\";\n\n if (seconds <= 0) {\n result = `now`;\n } else if (seconds < 60) {\n result = `${seconds}s`;\n } else if (minutes < 60) {\n result = `${minutes}m`;\n } else if (hours < 24) {\n result = `${hours}h`;\n } else if (days < 7) {\n result = `${date.toLocaleString({ weekday: 'short' })} at ${date.toLocaleString(DateTime.TIME_SIMPLE)}`;\n } else if (weeks < 4) {\n result = `${weeks}w`;\n } else if (months < 12) {\n result = `${date.toLocaleString({ month: 'short', day: 'numeric' })}`;\n } else {\n result = `${date.toLocaleString(DateTime.DATE_MED)}`;\n }\n\n return result;\n}","import React from 'react';\nimport ClearIcon from '@material-ui/icons/Clear';\nimport '../../styles/n/nCancelIcon.scss';\n\ninterface Props {\n onClick: any;\n}\n\nconst NCancelIcon = (props: Props) => {\n\n return (\n
\n \n
\n )\n}\n\nexport default NCancelIcon;","import React from 'react';\nimport '../../styles/n/nButton.scss';\n\ninterface Props extends React.DetailedHTMLProps, HTMLButtonElement> {\n mode: \"primary\" | \"secondary\",\n text: string,\n size?: \"small\" | \"standard\"\n}\n\nconst NButton = (props: Props) => {\n\n const { mode, size, text, ...rest } = props;\n\n return (\n \n )\n}\n\n\ninterface NIconButtonProps extends React.DetailedHTMLProps, HTMLButtonElement> {\n mode: \"primary\" | \"secondary\",\n text?: string,\n size?: \"small\" | \"standard\"\n icon: any\n}\n\nconst NIconButton = (props: NIconButtonProps) => {\n\n const { mode, size, icon, text, ...rest } = props;\n\n return (\n \n )\n}\n\nexport default NButton;\nexport { NIconButton };","import React from \"react\";\nimport TextField from '@material-ui/core/TextField';\nimport { withStyles } from '@material-ui/core/styles';\nimport Dialog from '@material-ui/core/Dialog';\nimport MuiDialogContent from '@material-ui/core/DialogContent';\nimport ImageIcon from '@material-ui/icons/Image';\nimport { hideToastAction, showInfoToastAction, showErrorToastAction, showSuccessToastAction, submittingAction, IAction } from '../../redux/actions'\nimport { connect } from 'react-redux';\nimport Constants from '../../Constants';\nimport ReactTagInput from \"@pathofdev/react-tag-input\";\nimport \"@pathofdev/react-tag-input/build/index.css\";\nimport { createNewPostAsync, updatePostAsync } from '../../services/postsService';\nimport { isValidHttpUrl } from '../../services/Helpers';\nimport { Post } from \"../../Types\";\nimport { RootState } from \"../../redux/store\";\nimport { newPostCreated, postUpdated } from '../../redux/reducers/eventsReducer';\nimport { ActionCreatorWithPayload } from \"@reduxjs/toolkit\";\nimport NCancelIcon from \"../NComponents/NCancelIcon\";\nimport '../../styles/dialog.scss';\nimport NButton, { NIconButton } from \"../NComponents/NButton\";\n\n\ntype PostDialogProps = {\n handleClose: () => void,\n mode: \"create\" | \"edit\",\n showErrorToastAction: (message: string) => IAction,\n showInfoToastAction: (message: string) => IAction,\n showSuccessToastAction: (message: string) => IAction,\n submittingAction: () => IAction,\n hideToastAction: () => IAction,\n newPostCreated: ActionCreatorWithPayload,\n postUpdated: ActionCreatorWithPayload,\n userId: string,\n data?: Post,\n open: boolean\n}\n\ntype PostDialogState = {\n content: string\n imageFile: any,\n tags: string[],\n disablePostButton: boolean\n}\n\nclass PostDialog extends React.Component {\n constructor(props: PostDialogProps) {\n super(props);\n\n if (this.props.mode === \"create\") {\n this.state = {\n content: \"\",\n imageFile: null,\n tags: [],\n disablePostButton: true\n }\n } else if (this.props.mode === \"edit\") {\n this.state = {\n content: this.props.data!.content,\n imageFile: this.props.data!.imageUrl,\n tags: !this.props.data!.tags ? [] : this.props.data!.tags,\n disablePostButton: false\n }\n }\n }\n\n handleFileInput = (event: React.ChangeEvent) => {\n const files = Array.from((event.target as any).files);\n if (files.length > 1) {\n this.props.showErrorToastAction(\"Error! Only 1 image can be uploaded.\");\n return;\n }\n\n const file = files[0] as any;\n const allowedTypes = ['image/png', 'image/jpeg'];\n\n if (allowedTypes.every(type => file.type !== type)) {\n this.props.showErrorToastAction(`Error! file type not supported, please select a png or jpg image.`);\n return;\n }\n\n if (file.size > (Constants.MAX_IMAGE_FILE_SIZE_MB * 1024 * 1024)) {\n this.props.showErrorToastAction(`'${file.name}' is too large, please pick a smaller file. Max size is ${Constants.MAX_IMAGE_FILE_SIZE_MB}mb`);\n return;\n }\n\n this.setState({\n imageFile: (event.target as any).files[0]\n });\n }\n\n deleteImage = () => {\n this.setState({ imageFile: null });\n }\n\n onPost = async () => {\n if (this.state.disablePostButton) {\n document.getElementById(\"post-content-input\")?.focus();\n return;\n }\n\n this.props.handleClose();\n let bodyText = this.state.content.trim();\n\n if (bodyText.length === 0) {\n this.props.showErrorToastAction(\"Empty post body not allowed\");\n }\n\n if (this.props.mode === \"create\") {\n let newPost = {\n content: bodyText,\n tags: this.state.tags,\n file: this.state.imageFile\n }\n\n this.props.submittingAction();\n let response = await createNewPostAsync(newPost);\n this.props.hideToastAction();\n\n if (response) {\n this.props.showSuccessToastAction(\"New post created.\");\n this.props.newPostCreated(response);\n } else {\n this.props.showErrorToastAction(\"Failed to create your new post.\");\n }\n } else if (this.props.mode === \"edit\" && this.props.userId === this.props.data!.userId) {\n let changed = this.props.data!.content != bodyText || this.state.tags != this.props.data!.tags || this.state.imageFile != this.props.data!.imageUrl;\n\n if (!changed) {\n return;\n }\n\n let updatePost = {\n postId: this.props.data!.postId,\n content: bodyText,\n tags: this.state.tags,\n imageFile: this.state.imageFile,\n imageChanged: this.state.imageFile != this.props.data!.imageUrl\n }\n\n this.props.submittingAction();\n let updatedPost = await updatePostAsync(updatePost);\n this.props.hideToastAction();\n\n if (updatePost) {\n this.props.postUpdated(updatedPost);\n this.props.showInfoToastAction(\"Post updated.\");\n } else {\n this.props.showErrorToastAction(\"Failed to update post.\");\n }\n }\n }\n\n onTagsChange = (newTags: string[]) => {\n newTags = newTags.map((t) => t.startsWith(\"#\") ? t : \"#\" + t);\n this.setState({ tags: newTags });\n }\n\n onBodyInput = (e: React.ChangeEvent) => {\n if ((e.target as any).value.length <= Constants.MAX_POST_CONTENT_CHARS) {\n this.setState({ content: (e.target as any).value, disablePostButton: (e.target as any).value.trim().length === 0 });\n }\n }\n\n render() {\n let title = this.props.mode === \"edit\" ? \"Edit your post\" : \"Write a post\";\n let submitText = this.props.mode === \"edit\" ? \"Save\" : \"Post\";\n\n return (\n
\n \n
\n
{title}
\n
\n
\n\n \n\n
\n\n
\n\n
\n \n
\n\n {this.state.imageFile &&\n
\n
\n \n\n \n
\n
\n }\n\n \n
\n\n
\n\n
\n\n
\n } size=\"small\" onClick={() => document.getElementById('upload-image-input')!.click()} />\n\n
\n \n \n
\n \n
\n
\n\n
\n );\n }\n}\n\nconst mapStateToProps = (state: RootState) => {\n return {\n userId: state.profile.userId\n }\n}\n\nexport default connect(mapStateToProps, {\n hideToastAction,\n showErrorToastAction,\n showInfoToastAction,\n showSuccessToastAction,\n submittingAction,\n newPostCreated,\n postUpdated\n})(PostDialog)\n\n\nconst DialogContent = withStyles((theme) => ({\n root: {\n padding: theme.spacing(2),\n },\n}))(MuiDialogContent);\n\n","import { SearchRequest, SearchResult } from '../Types';\nimport { callApiWithResponseAsync } from './commonServices';\n\nexport const SearchCache: { [name: string]: SearchResult } = {};\n\nexport async function searchAsync(payload: SearchRequest): Promise {\n\n if (!payload.value || payload.value == null || payload.value.trim() == \"\") {\n return null;\n }\n\n let key = `${payload.value}.${payload.page}.${payload.max}`;\n\n if (SearchCache[key]) {\n return { ...SearchCache[key] };\n }\n\n const result: SearchResult = await callApiWithResponseAsync(`search: ${payload.value}`, \"/api/v1/search\", {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload)\n });\n\n SearchCache[key] = result;\n return result;\n}","import React from \"react\";\nimport { useHistory } from \"react-router-dom\";\nimport { UserInfo } from \"../../Types\";\n\ntype Props = {\n data?: UserInfo,\n message?: string,\n stopSearch?: () => void,\n onClick?: () => void\n}\n\nconst LiveSearchItem = (props: Props) => {\n const data = props.data;\n const history = useHistory();\n\n const loadProfile = (e: React.MouseEvent) => {\n props.stopSearch!();\n history.push(`/profile/${data!.userId}`);\n }\n\n const onMessageClicked = () => {\n if (props.onClick) {\n props.onClick();\n }\n }\n\n if (props.message) {\n return (\n
\n
\n {props.message}\n
\n
\n )\n }\n\n return (\n
\n \n\n
\n
{data!.name}
\n
{data!.title || \"\"}
\n
\n
\n )\n}\n\nexport default LiveSearchItem;\n\n\n","import React, { useEffect, useState } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport InputBase from '@material-ui/core/InputBase';\nimport SearchIcon from '@material-ui/icons/Search';\nimport { useHistory } from 'react-router-dom';\nimport Popper from '@material-ui/core/Popper';\nimport Paper from '@material-ui/core/Paper';\nimport '../../styles/searchBar.scss';\nimport { searchAsync } from '../../services/searchService';\nimport LiveSearchItem from './LiveSearchItem';\nimport { SearchResult, UserInfo } from '../../Types';\n\nconst useStyles = makeStyles((theme) => ({\n inputInput: {\n padding: theme.spacing(1, 1, 1, 0),\n // vertical padding + font size from searchIcon\n paddingLeft: `calc(1em + ${theme.spacing(3)}px)`,\n transition: theme.transitions.create('width'),\n width: '100%',\n [theme.breakpoints.up('md')]: {\n width: '20ch',\n },\n }\n}));\n\nvar searchLoading = false;\n\nexport const getDefaultSearchResult = () => {\n return {\n limit: 0,\n length: 0,\n total: 0,\n users: new Array()\n } as SearchResult\n}\n\nconst MaxSearchBarItems = 8;\n\nfunction SearchBar() {\n const classes = useStyles();\n const history = useHistory();\n\n let fromQuery = new URLSearchParams(history.location.search).get(\"value\");\n const [value, setValue] = useState(fromQuery || \"\");\n const MaxSearchLength = 80;\n\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [data, setData] = useState(getDefaultSearchResult());\n\n const onChange = (e: React.ChangeEvent) => {\n if (e.target.value.length <= MaxSearchLength) {\n setValue(e.target.value);\n\n if (!e.target.value || e.target.value.trim() === \"\") {\n setData(getDefaultSearchResult());\n } else {\n search(e.target.value);\n }\n }\n if (!anchorEl) {\n onFocus(e);\n }\n }\n\n const stopSearch = () => {\n setAnchorEl(null);\n if (document.getElementById(\"dark-overlay\")) {\n (document.getElementById(\"dark-overlay\") as HTMLDivElement).style.display = \"none\";\n }\n }\n\n const onFocus = (e: any) => {\n setAnchorEl(e.currentTarget);\n if (document.getElementById(\"dark-overlay\")) {\n (document.getElementById(\"dark-overlay\") as HTMLDivElement).style.display = \"block\";\n }\n }\n\n const renderSearchPage = () => {\n stopSearch();\n if (value && value.trim().length >= 1) {\n history.push(`/search?value=${value}`);\n }\n\n (document.getElementById(\"search-input\") as HTMLInputElement).blur();\n }\n\n const onKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\") {\n renderSearchPage();\n }\n }\n\n const onShowMore = () => {\n renderSearchPage();\n }\n\n const search = async (searchValue: string) => {\n if (!searchValue || searchLoading) {\n return;\n }\n\n searchLoading = true;\n let payload = {\n value: searchValue,\n page: 0,\n max: MaxSearchBarItems\n }\n\n let data = await searchAsync(payload);\n setData(data || getDefaultSearchResult());\n searchLoading = false;\n };\n\n const onDocumentClick = (e: any) => {\n if (e.target.id !== (\"search-input\")) {\n stopSearch();\n }\n }\n\n useEffect(() => {\n document.addEventListener(\"click\", onDocumentClick);\n return () => document.removeEventListener(\"click\", onDocumentClick);\n }, []);\n\n const message = !value ? \"Try searching\" : \"No results found\";\n\n return (\n
\n
\n \n
\n\n \n\n \n \n
\n {(data == null || data.length == 0) && }\n\n\n {(data && data.length > 0) &&\n
\n {data.users.map((user) => {\n return (\n \n )\n })}\n
\n }\n\n {data && data.total > MaxSearchBarItems && }\n\n
\n
\n
\n\n
\n );\n}\n\nexport default SearchBar;\n","import React, { useEffect, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport '../../styles/nav.scss';\nimport '../../styles/read.scss';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport PopMenu from '../CustomDialogs/PopMenu';\nimport { AiOutlineNotification } from \"react-icons/ai\";\nimport { NIconButton } from '../NComponents/NButton';\nimport { getFriendlyTime } from '../../services/Helpers';\nimport { NotificationItem } from '../../Types';\nimport { useAppDispatch, useAppSelector } from '../../redux/store';\nimport { fetchUsersNotificationsAction } from '../../redux/actions';\n\n\nexport default function Notifications() {\n const { user } = useAuth0();\n const [notificationsAnchor, setNotificationsAnchor] = useState(null);\n\n const handleClick = (event: any) => {\n setNotificationsAnchor(event.currentTarget as any);\n };\n\n const handleClose = () => {\n setNotificationsAnchor(null);\n };\n\n const notifications = useAppSelector(state => state.usersNotifications.notifications);\n const reduxDispatch = useAppDispatch();\n\n useEffect(() => {\n reduxDispatch(fetchUsersNotificationsAction(user!.sub!));\n }, []);\n\n return (\n
\n\n }\n id=\"notifications-btn\"\n mode=\"primary\"\n size=\"small\"\n onClick={handleClick}\n />\n\n \n\n
\n Notifications\n
\n\n {notifications.length > 0 &&\n notifications.map((n, index) => {\n return (\n
\n \n {index != notifications.length - 1 &&
}\n
\n )\n })\n }\n\n {notifications.length == 0 &&
Empty
}\n
\n\n
\n
\n );\n}\n\ninterface Props {\n data: NotificationItem,\n hideMenu: () => void\n}\n\nconst NotificationViewItem = (props: Props) => {\n\n const { picture, name, date, type, fromUserId } = props.data;\n\n let message = \"\";\n\n if (type == \"PostLike\") {\n message = ` liked your post`;\n } else if (type === \"CommentLike\") {\n message = ` liked your comment`;\n }\n\n return (\n
\n\n
\n \n \n \n\n
{name}{message}
\n
\n\n
{getFriendlyTime(date)}
\n
\n )\n}","import React, { useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport '../../styles/nav.scss';\nimport ProfileDropDown from './ProfileDropDown';\nimport { connect } from 'react-redux';\nimport PostDialog from '../CustomDialogs/PostDialog';\nimport SearchBar from '../Search/SearchBar';\nimport { NIconButton } from '../NComponents/NButton';\nimport { AiOutlineMessage } from \"react-icons/ai\";\nimport Notifications from './Notifications';\n\n\nfunction Nav() {\n const [postDialogOpen, setPostDialogOpen] = useState(false);\n\n const handleDialogClickOpen = () => {\n setPostDialogOpen(true);\n };\n\n const handleDialogClose = () => {\n setPostDialogOpen(false);\n };\n\n return (\n
\n\n
\n
\n \n \n Hikmasight\n \n (Preview)\n
\n\n
\n \n
\n
\n\n
\n\n }\n id=\"post-btn\"\n mode=\"primary\"\n size=\"small\"\n onClick={handleDialogClickOpen} />\n\n \n \n\n {postDialogOpen && }\n\n
\n\n
\n );\n}\n\nexport default connect(null, null)(Nav)\n","import { ContinuationTokenHeader } from '../Constants';\nimport { Comment, CreateCommentRequest, UpdateCommentLikeRequest } from '../Types';\nimport { ApiResponse, callApiWithOkAsync, callApiWithPaginatedResponseAsync, callApiWithResponseAsync } from './commonServices';\n\nexport async function updateCommentLikeAsync(payload: UpdateCommentLikeRequest, keepalive = false): Promise {\n\n await callApiWithOkAsync('updateCommentLike', `/api/v1/comments/like`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload),\n keepalive: keepalive\n });\n}\n\nexport async function getPostCommentsAsync(postId: string, continuationToken: string | null, page: number): Promise {\n return await callApiWithPaginatedResponseAsync(`getPostComments, Page: ${page}`, `/api/v1/comments/${postId}`, {\n method: 'GET',\n headers: continuationToken ? { [ContinuationTokenHeader]: continuationToken } : {}\n }, false);\n}\n\n\nexport async function createCommentAsync(payload: CreateCommentRequest): Promise {\n\n return await callApiWithResponseAsync(\"createComment\", \"/api/v1/comments\", {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload)\n });\n}\n\nexport async function deleteCommentAsync(commentId: string): Promise {\n return await callApiWithOkAsync(\"deleteComment\", `/api/v1/comments/${commentId}`, {\n method: 'DELETE'\n });\n}","import React from 'react';\nimport { getFriendlyTime, handleGenericCounter } from '../../../services/Helpers';\nimport ThumbUpAltOutlinedIcon from '@material-ui/icons/ThumbUpAltOutlined';\nimport ThumbUpAltIcon from '@material-ui/icons/ThumbUpAlt';\nimport { Comment, UpdateCommentLikeRequest } from '../../../Types';\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\nimport { connect } from 'react-redux';\nimport { RootState } from '../../../redux/store';\nimport PopMenu, { PopMenuButton } from '../../CustomDialogs/PopMenu';\nimport { deleteCommentAsync, updateCommentLikeAsync } from '../../../services/commentsService';\nimport { ProfileState } from '../../../redux/reducers/profileReducer';\nimport { Link } from 'react-router-dom';\n\ntype CommentItemProps = {\n comment: Comment,\n onReply: (commentId: string) => void,\n viewerUserId: string,\n onCommentDeleted: (commentId: string) => void,\n loggedInUser: ProfileState,\n}\n\ntype CommentItemState = {\n likeComment: boolean,\n likeCount: number,\n anchorEl: any\n}\n\nclass CommentItem extends React.Component {\n\n constructor(props: CommentItemProps) {\n super(props);\n\n this.state = {\n likeComment: this.props.comment.likedByViewer,\n likeCount: this.props.comment.likeCount,\n anchorEl: null\n }\n }\n\n componentDidMount() {\n window.addEventListener(\"beforeunload\", this.handleBeforeUnload, true);\n }\n\n handleBeforeUnload = async () => {\n await this.processCommentLike(true);\n }\n\n async componentWillUnmount() {\n window.removeEventListener(\"beforeunload\", this.handleBeforeUnload, true);\n await this.processCommentLike();\n }\n\n onLike = () => {\n var updated = handleGenericCounter(this.props.comment.likedByViewer, this.state.likeComment, this.props.comment.likeCount, this.state.likeCount);\n this.setState({ likeComment: updated.newBool, likeCount: updated.newCount });\n }\n\n processCommentLike = async (keepalive?: boolean) => {\n let updateLike = this.props.comment.likedByViewer != this.state.likeComment;\n\n if (updateLike) {\n let payload: UpdateCommentLikeRequest = {\n commentId: this.props.comment.commentId,\n userId: this.props.viewerUserId,\n like: this.state.likeComment\n }\n\n await updateCommentLikeAsync(payload, keepalive);\n }\n };\n\n onReply = () => {\n this.props.onReply(this.props.comment.commentId);\n }\n\n onDotMenu = (event: React.MouseEvent) => {\n this.setState({ anchorEl: event?.currentTarget });\n }\n\n onDotMenuClose = () => {\n this.setState({ anchorEl: null });\n }\n\n onDelete = async () => {\n this.onDotMenuClose();\n let commentId = this.props.comment.commentId;\n\n //optimistic delete :)\n this.props.onCommentDeleted(commentId);\n deleteCommentAsync(commentId);\n }\n\n onCopyText = () => {\n this.onDotMenuClose();\n var text = this.props.comment.content;\n\n navigator.clipboard.writeText(text).then(function () {\n // console.log(`Async: Copying ${text} to clipboard was successful!`);\n }, function (err) {\n console.error('Async: Could not copy text: ', err);\n });\n }\n\n render() {\n const comment = this.props.comment;\n const createdByThisUser = comment.userId === this.props.viewerUserId;\n\n const pictureUrl = createdByThisUser ? this.props.loggedInUser.picture! : comment.picture;\n const name = createdByThisUser ? this.props.loggedInUser.name : comment.name;\n\n return (\n
\n \n \"\"\n \n\n
\n
\n\n
\n
\n \n
{name}
\n \n\n {comment.replyToName &&
\n
in reply to
\n\n \n
{comment.replyToName}
\n \n
}\n\n
{getFriendlyTime(comment.createdAt)}
\n
\n\n {createdByThisUser && }\n\n \n \n \n \n
\n\n
{comment.content}
\n
\n\n
\n
\n Like\n\n {this.state.likeCount >= 1 &&\n
\n
\n
\n {this.state.likeComment ? : }\n
\n
{this.state.likeCount}
\n
}\n
\n\n {!createdByThisUser &&
Reply
}\n
\n
\n\n
\n )\n }\n}\n\nfunction mapStateToProps(state: RootState) {\n return {\n viewerUserId: state.profile.userId,\n loggedInUser: state.profile\n };\n}\n\nexport default connect(mapStateToProps, {})(CommentItem)\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport Button from '@material-ui/core/Button';\nimport ThumbUpAltOutlinedIcon from '@material-ui/icons/ThumbUpAltOutlined';\nimport ThumbUpAltIcon from '@material-ui/icons/ThumbUpAlt';\nimport ChatBubbleOutlineOutlinedIcon from '@material-ui/icons/ChatBubbleOutlineOutlined';\nimport { updatePostLikeAsync } from '../../services/postsService';\nimport { handleGenericCounter } from '../../services/Helpers';\nimport { Post } from '../../Types';\nimport { GoComment } from 'react-icons/go';\n\ntype Props = {\n auth0Sub: string,\n data: Post,\n commentsCount: number\n}\n\ntype State = {\n likePost: boolean,\n likesCount: number,\n}\n\nclass PostButtons extends React.Component {\n\n constructor(props: Props) {\n super(props);\n\n this.state = {\n likePost: this.props.data.likedByCurrentUser,\n likesCount: this.props.data.likesCount,\n };\n }\n\n componentDidMount() {\n window.addEventListener(\"beforeunload\", this.handleBeforeUnload, true);\n }\n\n handleBeforeUnload = async () => {\n await this.processPostLike(true);\n }\n\n async componentWillUnmount() {\n window.removeEventListener(\"beforeunload\", this.handleBeforeUnload, true);\n await this.processPostLike();\n }\n\n onLike = () => {\n var updated = handleGenericCounter(this.props.data.likedByCurrentUser, this.state.likePost, this.props.data.likesCount, this.state.likesCount);\n this.setState({ likePost: updated.newBool, likesCount: updated.newCount });\n }\n\n onComment = () => {\n try {\n (document.getElementsByClassName(`user-comment ${this.props.data.postId}`)[0].getElementsByClassName(\"MuiInputBase-input\")[0] as HTMLInputElement).focus();\n } catch (error) { }\n }\n\n processPostLike = async (keepalive?: boolean) => {\n let updateLike = this.props.data.likedByCurrentUser != this.state.likePost;\n\n if (updateLike) {\n let payload = {\n postId: this.props.data.postId,\n userId: this.props.auth0Sub,\n like: this.state.likePost\n }\n\n await updatePostLikeAsync(payload, keepalive);\n }\n };\n\n render() {\n return (\n
\n
\n\n
\n {this.state.likePost ?\n \n :\n \n }\n
\n\n \n
\n
\n
\n );\n }\n}\n\nexport default connect(null, {})(PostButtons);","import { ChangeEvent, useEffect, useReducer } from 'react';\nimport '../../styles/postFooter.scss';\nimport { createCommentAsync, getPostCommentsAsync } from '../../services/commentsService';\nimport { ReplyToComment, Comment } from '../../Types';\nimport { Completed, Loading, LoadingNextSet } from '../../redux/actionTypes';\nimport { IAction } from '../../redux/actions';\n\ntype ReplyTo = ReplyToComment & { name: string };\n\ntype State = {\n loading: boolean,\n userComment: string,\n replyingTo: ReplyTo | null,\n numberOfCommentsToShow: number,\n comments: Comment[],\n commentsCount: number,\n fetchedFromServer: boolean,\n continuationToken: string | null,\n loadingNextSet: boolean,\n page: number\n};\n\nconst MaxInitial = 3;\nconst BlockCount = 10;\nconst MaxPageCount = 5;\nconst MaxCommentCharLength = 2000;\n\nconst UpdateUserComment = \"UpdateUserComment\";\nconst NewComment = \"NewComment\";\nconst DeleteComment = \"DeleteComment\";\nconst SetReplyTo = \"SetReplyTo\";\nconst UpdateNumberOfCommentsToShow = \"UpdateNumberOfCommentsToShow\";\nconst ClearInputs = \"ClearInputs\";\n\nconst footerReducer = (state: State, action: IAction): State => {\n switch (action.type) {\n case Loading: {\n return { ...state, loading: true };\n }\n case Completed: {\n return {\n ...state,\n loading: false,\n fetchedFromServer: true,\n continuationToken: action.payload.continueToken,\n loadingNextSet: false,\n page: state.page + 1,\n comments: [...state.comments, ...action.payload.comments!],\n };\n }\n case NewComment: {\n const updated = { ...state };\n updated.comments.unshift(action.payload);\n return { ...updated, commentsCount: updated.commentsCount + 1, userComment: \"\", numberOfCommentsToShow: updated.numberOfCommentsToShow + 1 };\n }\n case DeleteComment: {\n return { ...state, comments: state.comments.filter(c => c.commentId != action.payload!), commentsCount: state.commentsCount - 1 };\n }\n case LoadingNextSet: {\n return { ...state, loadingNextSet: true };\n }\n case UpdateUserComment: {\n return { ...state, userComment: action.payload! };\n }\n case SetReplyTo: {\n return { ...state, replyingTo: action.payload };\n }\n case UpdateNumberOfCommentsToShow: {\n return { ...state, numberOfCommentsToShow: action.payload };\n }\n case ClearInputs: {\n return { ...state, replyingTo: null, userComment: \"\" };\n }\n default: {\n return state;\n }\n }\n}\n\nfunction useComments(postId: string, totalCommentsCount: number) {\n\n const [state, dispatch] = useReducer(footerReducer, {\n loading: true,\n userComment: \"\",\n replyingTo: null,\n numberOfCommentsToShow: MaxInitial,\n comments: new Array(),\n commentsCount: totalCommentsCount,\n fetchedFromServer: false,\n continuationToken: null,\n loadingNextSet: false,\n page: 0\n });\n\n const { userComment, replyingTo, numberOfCommentsToShow, comments, commentsCount, fetchedFromServer, continuationToken, loadingNextSet, page } = state;\n\n const getData = async () => {\n const { ok, result, continuationToken: newContinueToken } = await getPostCommentsAsync(postId, continuationToken, page)\n\n if (ok) {\n dispatch({\n type: Completed,\n payload: {\n comments: Array.from(result),\n continueToken: newContinueToken\n }\n });\n }\n }\n\n useEffect(() => {\n if (!fetchedFromServer) {\n getData();\n }\n\n if (fetchedFromServer && !loadingNextSet && comments.length < numberOfCommentsToShow && continuationToken && page < MaxPageCount) {\n dispatch({ type: LoadingNextSet });\n getData();\n }\n }, [comments]);\n\n const onCommentChange = (e: ChangeEvent) => {\n if ((e.target as any).value.length <= MaxCommentCharLength) {\n dispatch({ type: UpdateUserComment, payload: (e.target as any).value })\n }\n }\n\n const onCommentSubmit = async () => {\n let payload = {\n postId,\n content: userComment.trim(),\n replyTo: replyingTo ? replyingTo as ReplyToComment : null\n }\n\n let newComment: Comment = await createCommentAsync(payload);\n dispatch({ type: ClearInputs });\n\n if (newComment) {\n dispatch({ type: NewComment, payload: newComment });\n }\n }\n\n const onReply = (commentId: string) => {\n comments.forEach(c => {\n if (c.commentId === commentId) {\n dispatch({ type: SetReplyTo, payload: { userId: c.userId, commentId, name: c.name } });\n }\n });\n\n (document.getElementsByClassName(`user-comment ${postId}`)[0].getElementsByClassName(\"MuiInputBase-input\")[0] as HTMLInputElement).focus();\n }\n\n const onCommentDeleted = (commentId: string) => {\n dispatch({ type: DeleteComment, payload: commentId });\n }\n\n const onCancelReply = () => {\n dispatch({ type: SetReplyTo, payload: null });\n }\n\n //Current comments to show in post\n const commentsToShow = comments.slice(0, numberOfCommentsToShow);\n\n const getPreviousNumberOfCommentsToShow = () => {\n let hiddenCommentsTotalCount = Math.max(commentsCount - numberOfCommentsToShow, 0);\n let showMore = 0;\n\n if (hiddenCommentsTotalCount > 0 && hiddenCommentsTotalCount > BlockCount) {\n showMore = BlockCount;\n } else if (hiddenCommentsTotalCount > 0) {\n showMore = hiddenCommentsTotalCount;\n }\n\n return showMore;\n }\n\n const onShowMoreComments = async () => {\n dispatch({\n type: UpdateNumberOfCommentsToShow,\n payload: numberOfCommentsToShow + getPreviousNumberOfCommentsToShow()\n });\n\n if (continuationToken && !loadingNextSet && page < MaxPageCount) {\n dispatch({ type: LoadingNextSet });\n getData()\n }\n }\n\n const showMore = getPreviousNumberOfCommentsToShow();\n commentsToShow.reverse();\n\n return [\n state,\n showMore,\n commentsToShow,\n onShowMoreComments,\n onCancelReply,\n onCommentDeleted,\n onReply,\n onCommentSubmit,\n onCommentChange\n ] as const;\n}\n\nexport default useComments;\n","import React from 'react';\nimport TextField from '@material-ui/core/TextField';\nimport ClearIcon from '@material-ui/icons/Clear';\nimport CommentItem from './Comments/CommentItem';\nimport '../../styles/postFooter.scss';\nimport { useSelector } from 'react-redux';\nimport { Post } from '../../Types';\nimport { RootState } from '../../redux/store';\nimport PostButtons from './PostButtons';\nimport useComments from '../Hooks/useComments';\nimport NButton from '../NComponents/NButton';\n\ntype Props = {\n data: Post,\n auth0Sub: string\n}\n\nfunction PostComments(props: Props) {\n const userProfilePicture = useSelector((state: RootState) => state.profile.picture);\n const { data, auth0Sub } = props;\n const { postId, totalCommentsCount } = props.data;\n\n const [\n state,\n showMore,\n commentsToShow,\n onShowMoreComments,\n onCancelReply,\n onCommentDeleted,\n onReply,\n onCommentSubmit,\n onCommentChange\n ] = useComments(postId, totalCommentsCount);\n\n const { loading, userComment, replyingTo, numberOfCommentsToShow, comments, commentsCount } = state;\n\n return (\n <>\n \n\n
\n\n {showMore > 0 &&\n
\n Show {showMore} previous comments\n
}\n\n {comments.length != 0 &&\n
\n
\n {commentsToShow.map((c) => )}\n
\n
\n
\n }\n\n
\n {replyingTo &&\n
\n
\n
\n Replying to\n {replyingTo.name}\n
\n
}\n\n
\n \"\"\n\n
\n \n
\n\n
\n {userComment.trim().length > 0 && }\n
\n
\n
\n
\n \n )\n}\n\nexport default PostComments;","import React from \"react\";\nimport { withStyles } from '@material-ui/core/styles';\nimport Dialog from '@material-ui/core/Dialog';\nimport MuiDialogContent from '@material-ui/core/DialogContent';\nimport \"@pathofdev/react-tag-input/build/index.css\";\nimport NCancelIcon from \"../NComponents/NCancelIcon\";\nimport '../../styles/dialog.scss';\n\n\ntype ImageDialogProps = {\n handleClose: () => void,\n open: boolean,\n imageSrc: string\n}\n\ntype ImageDialogState = {\n}\n\nclass ImageDialog extends React.Component {\n constructor(props: ImageDialogProps) {\n super(props);\n }\n\n render() {\n const { open, imageSrc, handleClose } = this.props;\n \n return (\n
\n\n \n
\n
\n
\n\n \n
\n \n
\n
\n
\n\n
\n );\n }\n}\n\nexport default ImageDialog;\n\nconst DialogContent = withStyles((theme) => ({\n root: {\n padding: theme.spacing(2),\n },\n}))(MuiDialogContent);\n\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport Constants from '../../Constants';\nimport { Post } from '../../Types';\nimport ImageDialog from '../CustomDialogs/ImageDialog';\n\ntype Props = {\n data: Post\n}\n\ntype State = {\n cutBodyText: boolean,\n cutBodyLines: boolean,\n imageDialogOpen: boolean\n}\n\nclass PostBody extends React.Component {\n\n constructor(props: Props) {\n super(props);\n\n this.state = {\n cutBodyText: props.data.content.length > Constants.MAX_TIMELINE_BODY_CHARS,\n cutBodyLines: props.data.content.split(/\\r\\n|\\r|\\n/).length > Constants.MAX_TIMELINE_BODY_INITIAL_LINES,\n imageDialogOpen: false\n };\n }\n\n onReadMore = () => {\n this.setState({ cutBodyText: false, cutBodyLines: false });\n }\n\n onTagClicked = (tag: string) => {\n alert(\"coming soon :)\");\n }\n\n onImageDialogOpen = () => {\n this.setState({ imageDialogOpen: true });\n }\n\n onImageDialogClose = () => {\n this.setState({ imageDialogOpen: false });\n }\n\n render() {\n let bodytext = this.props.data.content;\n\n if (this.state.cutBodyLines) {\n bodytext = bodytext.split(/\\r\\n|\\r|\\n/).slice(0, Constants.MAX_TIMELINE_BODY_INITIAL_LINES).join(\"\\n\");\n } else if (this.state.cutBodyText) {\n bodytext = bodytext.substring(0, Constants.MAX_TIMELINE_BODY_CHARS);\n }\n\n return (\n
\n {this.props.data.imageUrl &&\n
\n \"\"\n
}\n\n
\n {bodytext}\n {(this.state.cutBodyText || this.state.cutBodyLines) && (... Read more)}\n
\n\n {this.props.data.tags &&
\n {this.props.data.tags.map((tag, index) => {\n return this.onTagClicked(tag)} className=\"post-tag\" key={index}>{tag}\n })}\n
}\n\n {this.state.imageDialogOpen && }\n
\n );\n }\n}\n\nexport default connect(null, {})(PostBody);","import React, { useState } from 'react';\nimport TextField from '@material-ui/core/TextField';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport { reportPostAbuseAsync } from '../../services/postsService'\nimport { useDispatch } from 'react-redux';\nimport { showInfoToastAction } from '../../redux/actions';\nimport '../../styles/dialog.scss';\nimport NCancelIcon from '../NComponents/NCancelIcon';\nimport NButton from '../NComponents/NButton';\n\n\ntype Props = {\n open: boolean,\n postId: string,\n onClose: () => void\n}\n\nexport default function AbuseDialog(props: Props) {\n\n const { open, onClose, postId } = props;\n const [reason, setReason] = useState(\"\");\n const { user } = useAuth0();\n\n const dispatch = useDispatch()\n\n const onFieldChange = (e: React.ChangeEvent) => {\n setReason((e.target as any).value);\n }\n\n const onReportAbuse = async () => {\n if (reason.trim().length === 0) {\n document.getElementById(\"reason-field\")?.focus();\n return;\n }\n\n let report = {\n postId,\n userId: user!.sub!,\n reason\n }\n\n if (await reportPostAbuseAsync(report)) {\n dispatch(showInfoToastAction(\"Your abuse complaint has been made.\"));\n }\n onClose();\n }\n\n return (\n
\n \n
\n
Report abuse
\n
\n
\n\n \n
\n

\n Please provide a brief explanation as to why you think this post is inappropriate. Your report will be reviewed as soon as possible.\n

\n\n \n
\n\n
\n\n
\n \n \n
\n
\n
\n );\n}\n","import React from 'react';\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\nimport IconButton from '@material-ui/core/IconButton';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport DeleteOutlineIcon from '@material-ui/icons/DeleteOutline';\nimport LinkIcon from '@material-ui/icons/Link';\nimport EditOutlinedIcon from '@material-ui/icons/EditOutlined';\nimport ReportProblemOutlinedIcon from '@material-ui/icons/ReportProblemOutlined';\nimport { deletePostAsync } from '../../services/postsService';\nimport { IAction, showInfoToastAction } from '../../redux/actions';\nimport PostDialog from '../CustomDialogs/PostDialog';\nimport AbuseDialog from '../CustomDialogs/AbuseDialog';\nimport { Post } from '../../Types';\nimport { getFriendlyTime } from '../../services/Helpers';\nimport PopMenu, { PopMenuButton } from '../CustomDialogs/PopMenu';\nimport { postDeleted } from '../../redux/reducers/eventsReducer';\nimport { ActionCreatorWithPayload } from '@reduxjs/toolkit';\nimport { RootState } from '../../redux/store';\nimport { ProfileState } from '../../redux/reducers/profileReducer';\n\ninterface Props {\n auth0Sub: string,\n data: Post\n showInfoToastAction: (payload: any) => IAction,\n postDeleted: ActionCreatorWithPayload,\n loggedInUser: ProfileState\n}\n\ntype State = {\n anchorEl: any | null,\n abuseDialogOpen: boolean,\n editDialogOpen: boolean\n}\n\nclass PostHeading extends React.Component {\n\n constructor(props: Props) {\n super(props);\n\n this.state = {\n anchorEl: null,\n abuseDialogOpen: false,\n editDialogOpen: false\n };\n }\n\n dotMenuClick = (event: React.MouseEvent) => {\n this.setState({ anchorEl: event.currentTarget });\n };\n\n dotMenuClose = (event?: React.MouseEvent) => {\n this.setState({ anchorEl: null });\n };\n\n postCreatedByCurrentUser = () => {\n return this.props.auth0Sub === this.props.data.userId;\n }\n\n onDelete = async () => {\n this.dotMenuClose();\n\n //optimistic delete :)\n if (this.postCreatedByCurrentUser()) {\n this.props.postDeleted(this.props.data);\n deletePostAsync(this.props.data.postId);\n this.props.showInfoToastAction(\"Post deleted.\");\n }\n }\n\n onEdit = () => {\n this.dotMenuClose();\n if (this.postCreatedByCurrentUser()) {\n this.setState({ editDialogOpen: true });\n }\n }\n\n onEditDialogClose = () => {\n this.setState({ editDialogOpen: false });\n };\n\n onReportAbuse = () => {\n this.dotMenuClose();\n this.setState({ abuseDialogOpen: true });\n }\n\n onAbuseDialogClose = () => {\n this.setState({ abuseDialogOpen: false });\n }\n\n onCopyLink = () => {\n this.dotMenuClose();\n const url = new URL(`${window.location.origin}/threads/${this.props.data.postId}`)\n var text = url.href;\n\n navigator.clipboard.writeText(text).then(function () {\n // console.log(`Async: Copying ${text} to clipboard was successful!`);\n }, function (err) {\n console.error('Async: Could not copy text: ', err);\n });\n }\n\n render() {\n const postCreatedByThisUser = this.postCreatedByCurrentUser();\n const pictureUrl = postCreatedByThisUser ? this.props.loggedInUser.picture! : this.props.data.picture;\n const name = postCreatedByThisUser ? this.props.loggedInUser.name : this.props.data.name;\n\n return (\n
\n
\n \n \"\"\n \n\n
\n \n
\n {name}\n
\n \n
\n {getFriendlyTime(this.props.data.createdAt)}\n {this.props.data.edited && Edited}\n
\n
\n\n
\n \n\n \n {postCreatedByThisUser && }\n {postCreatedByThisUser && }\n \n {!postCreatedByThisUser && }\n \n
\n
\n\n {this.state.editDialogOpen && }\n {this.state.abuseDialogOpen && }\n
\n );\n }\n}\n\nfunction mapStateToProps(state: RootState) {\n return {\n loggedInUser: state.profile\n };\n}\n\nexport default connect(mapStateToProps, { showInfoToastAction, postDeleted })(PostHeading);","import React from 'react';\nimport '../../styles/read.scss';\nimport '../../styles/post.scss';\nimport { connect } from 'react-redux';\nimport PostFooter from './PostFooter';\nimport { Post } from '../../Types';\nimport PostBody from './PostBody';\nimport PostHeading from './PostHeading';\n\ntype Props = {\n auth0Sub: string,\n data: Post\n}\n\ntype State = {\n commentsCount: number\n}\n\nclass TimelinePost extends React.Component {\n\n constructor(props: Props) {\n super(props);\n\n this.state = {\n commentsCount: props.data.totalCommentsCount\n };\n }\n\n onCommentDeleted = () => {\n this.setState({ commentsCount: this.state.commentsCount - 1 });\n }\n\n render() {\n\n return (\n
\n \n \n \n
\n );\n }\n}\n\nexport default connect(null, {})(TimelinePost)","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport CardContent from '@material-ui/core/CardContent';\nimport Skeleton from '@material-ui/lab/Skeleton';\n\nconst useStyles = makeStyles((theme) => ({\n card: {\n margin: theme.spacing(2),\n },\n media: {\n height: 200,\n },\n}));\n\nfunction TimelineSkeleton() {\n const classes = useStyles();\n\n return (\n \n }\n title={}\n subheader={}\n />\n\n \n\n \n \n \n \n \n \n \n \n );\n}\n\nexport default TimelineSkeleton;","import React, { useEffect, useReducer, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { getPostsByUserAsync, getTimelinePostsAsync } from '../../services/postsService';\nimport { RootState, useAppDispatch } from '../../redux/store';\nimport { Post } from '../../Types';\nimport { IAction } from '../../redux/actions';\nimport { Completed, Loading, LoadingNextSet, EventsReset, LoadingNewProfile } from '../../redux/actionTypes';\nimport { clearEvents } from '../../redux/reducers/eventsReducer';\n\ntype State = {\n loading: boolean;\n posts: Post[],\n fetchedFromServer: boolean,\n continuationToken: string | null,\n loadingNextSet: boolean,\n page: number,\n eventsReset: boolean\n};\n\nconst postsReducer = (state: State, action: IAction): State => {\n switch (action.type) {\n case Loading: {\n return { ...state, loading: true };\n }\n case LoadingNewProfile: {\n return { ...state, loading: true, posts: new Array(), fetchedFromServer: false, page: 0, continuationToken: null, loadingNextSet: false, };\n }\n case Completed: {\n return {\n ...state,\n loading: false,\n fetchedFromServer: true,\n posts: [...state.posts, ...action.payload.posts!],\n continuationToken: action.payload.continueToken,\n loadingNextSet: false,\n page: state.page + 1\n };\n }\n case LoadingNextSet: {\n return { ...state, loadingNextSet: true };\n }\n case \"events/newPostCreated\": {\n const updated = { ...state };\n updated.posts.unshift(action.payload);\n return updated;\n }\n case \"events/postDeleted\": {\n return { ...state, posts: state.posts.filter(p => p.postId != action.payload.postId) }\n }\n case \"events/postUpdated\": {\n return { ...state, posts: state.posts.map(p => p.postId === action.payload.postId ? action.payload : p) }\n }\n case EventsReset: {\n return { ...state, eventsReset: true }\n }\n default: {\n return state;\n }\n }\n}\n\nconst MaxPageCount = 5;\nvar previousProfileUserId: string | null = null;\n\nconst withPosts = (postsType: \"profile\" | \"timeline\") => (Component: any) => (childProps: any) => {\n const reduxDispatch = useAppDispatch()\n const postsEvent = useSelector((state: RootState) => state.events.postsEvent);\n const { scrollPercentage } = childProps;\n\n const [{ loading, posts, fetchedFromServer, continuationToken, loadingNextSet, page, eventsReset }, dispatch] = useReducer(postsReducer, {\n loading: true,\n posts: new Array(),\n fetchedFromServer: false,\n continuationToken: null,\n loadingNextSet: false,\n page: 0,\n eventsReset: false\n });\n\n const { profileUserId, isPersonalProfile } = childProps;\n\n const getData = async () => {\n const { ok, continuationToken: newContinueToken, result } = postsType === \"timeline\" ? await getTimelinePostsAsync(continuationToken, page) :\n await getPostsByUserAsync(profileUserId, continuationToken, page);\n\n if (ok) {\n dispatch({\n type: Completed,\n payload: {\n posts: Array.from(result),\n continueToken: newContinueToken\n }\n });\n }\n\n if (postsType === \"profile\" && profileUserId) {\n previousProfileUserId = `${profileUserId}`;\n }\n }\n\n if (postsType === \"profile\" && previousProfileUserId && profileUserId != previousProfileUserId) {\n previousProfileUserId = `${profileUserId}`;\n dispatch({ type: LoadingNewProfile });\n }\n\n useEffect(() => {\n reduxDispatch(clearEvents());\n dispatch({ type: EventsReset });\n }, []);\n\n useEffect(() => {\n if (!eventsReset) {\n return;\n }\n\n if (!fetchedFromServer) {\n dispatch({ type: Loading });\n getData();\n }\n\n if (postsEvent && (postsType === \"timeline\" || (postsType === \"profile\" && isPersonalProfile))) {\n dispatch({ type: postsEvent.type, payload: postsEvent.payload })\n }\n\n if (postsEvent) {\n reduxDispatch(clearEvents());\n }\n }, [postsEvent, eventsReset, fetchedFromServer]);\n\n useEffect(() => {\n if (scrollPercentage > 70 && continuationToken && !loadingNextSet && page < MaxPageCount) {\n dispatch({ type: LoadingNextSet });\n getData()\n }\n\n }, [scrollPercentage])\n\n const propsLocal = {\n loadingPosts: loading,\n posts\n }\n\n return \n}\n\nexport default withPosts;\n\n","import React, { useEffect, useState } from 'react';\n\nconst withScrollPercentage = (Component: any) => (childProps: any) => {\n\n const [scrollPercentage, setScrollPercentage] = useState(0);\n\n const handleScroll = () => {\n requestAnimationFrame(() => {\n calculateScrollDistance();\n });\n }\n\n const calculateScrollDistance = () => {\n const scrollTop = window.pageYOffset; // how much the user has scrolled by\n const winHeight = window.innerHeight;\n const docHeight = getDocHeight();\n\n const totalDocScrollLength = docHeight - winHeight;\n const scrollPostion = Math.floor(scrollTop / totalDocScrollLength * 100)\n setScrollPercentage(scrollPostion);\n }\n\n const getDocHeight = () => {\n return Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n }\n\n useEffect(() => {\n document.addEventListener(\"scroll\",handleScroll);\n return () => document.removeEventListener('scroll', handleScroll)\n }, []);\n\n return (\n \n )\n}\n\nexport default withScrollPercentage;","import React from 'react';\nimport '../../styles/home.scss';\nimport TimelinePost from '../TimelinePost';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport TimelineSkeleton from '../TimelinePost/TimelineSkeleton';\nimport { Post } from '../../Types';\nimport withPosts from '../HOC/withPosts';\nimport withScrollPercentage from '../HOC/withScrollPercentage';\n\ntype Props = {\n loadingPosts: boolean,\n posts: Post[]\n}\n\nfunction Timeline(props: Props) {\n const { user } = useAuth0();\n const { loadingPosts, posts } = props;\n\n return (\n
\n
\n\n {loadingPosts ?\n (
)\n :\n posts.length === 0 ?
Posts collection is empty.
:\n posts.map((post) => {\n return \n })\n }\n
\n
\n );\n}\n\nexport default withScrollPercentage(withPosts(\"timeline\")(Timeline));","import React from 'react';\nimport '../styles/read.scss';\nimport profile_pic from '../imgs/profile_pic.jpg';\nimport read_wallpaper from '../imgs/read-wallpaper.jpg';\nimport { connect } from 'react-redux';\n\nclass Read extends React.Component {\n\n state = {}\n \n componentDidMount() {\n }\n\n render() {\n\n return (\n
\n\n
\n\n

Two Books That Turned a 26-Year-Old Programmer Into a Billionaire

\n

Founder of Shopify on books that changed his life

\n\n
\n \"\"\n\n
\n

Najm Dost

\n

August 22 2020

\n

20k reads

\n\n
\n\n
\n
\n \n

10k

\n
\n
\n \n

104

\n
\n
\n \n

200

\n
\n
\n
\n\n
\n \"\"\n

Some of the courses already available on ML University’s

\n
\n\n
\n

What are Neural networks?

\n

Neural networks are set of algorithms inspired by the functioning of human brian. Generally when you open your eyes, what you see is called data and is processed by the Nuerons(data processing cells) in your brain, and recognises what is around you. That’s how similar the Neural Networks works. They takes a large set of data, process the data(draws out the patterns from data), and outputs what it is.

\n\n

What are Neural networks?

\n

Neural networks are set of algorithms inspired by the functioning of human brian. Generally when you open your eyes, what you see is called data and is processed by the Nuerons(data processing cells) in your brain, and recognises what is around you. That’s how similar the Neural Networks works. They takes a large set of data, process the data(draws out the patterns from data), and outputs what it is.

\n

Neural networks are set of algorithms inspired by the functioning of human brian. Generally when you open your eyes, what you see is called data and is processed by the Nuerons(data processing cells) in your brain, and recognises what is around you. That’s how similar the Neural Networks works. They takes a large set of data, process the data(draws out the patterns from data), and outputs what it is.

\n\n

What are Neural networks?

\n

Neural networks are set of algorithms inspired by the functioning of human brian. Generally when you open your eyes, what you see is called data and is processed by the Nuerons(data processing cells) in your brain, and recognises what is around you. That’s how similar the Neural Networks works. They takes a large set of data, process the data(draws out the patterns from data), and outputs what it is.

\n

Neural networks are set of algorithms inspired by the functioning of human brian. Generally when you open your eyes, what you see is called data and is processed by the Nuerons(data processing cells) in your brain, and recognises what is around you. That’s how similar the Neural Networks works. They takes a large set of data, process the data(draws out the patterns from data), and outputs what it is.

\n

Neural networks are set of algorithms inspired by the functioning of human brian. Generally when you open your eyes, what you see is called data and is processed by the Nuerons(data processing cells) in your brain, and recognises what is around you. That’s how similar the Neural Networks works. They takes a large set of data, process the data(draws out the patterns from data), and outputs what it is.

\n
\n\n \n\n\n
\n
\n );\n }\n}\n\nexport default connect(null, { })(Read)","import React from \"react\";\nimport loading from \"./loading.svg\";\n\n// const Loading = () => (\n//
\n// \"Loading\"\n//
\n// );\n\nconst Loading = () => (\n
\n
\n
\n
\n);\n\nexport default Loading;\n","const createImage = url =>\n new Promise((resolve, reject) => {\n const image = new Image()\n image.addEventListener('load', () => resolve(image))\n image.addEventListener('error', error => reject(error))\n image.setAttribute('crossOrigin', 'anonymous') // needed to avoid cross-origin issues on CodeSandbox\n image.src = url\n })\n\nfunction getRadianAngle(degreeValue) {\n return (degreeValue * Math.PI) / 180\n}\n\n/**\n * This function was adapted from the one in the ReadMe of https://github.com/DominicTobias/react-image-crop\n * @param {File} image - Image File url\n * @param {Object} pixelCrop - pixelCrop Object provided by react-easy-crop\n * @param {number} rotation - optional rotation parameter\n */\nexport default async function getCroppedImg(imageSrc, pixelCrop, filetype, rotation = 0) {\n const image = await createImage(imageSrc)\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')\n\n const maxSize = Math.max(image.width, image.height)\n const safeArea = 2 * ((maxSize / 2) * Math.sqrt(2))\n\n // set each dimensions to double largest dimension to allow for a safe area for the\n // image to rotate in without being clipped by canvas context\n canvas.width = safeArea\n canvas.height = safeArea\n\n // translate canvas context to a central location on image to allow rotating around the center.\n ctx.translate(safeArea / 2, safeArea / 2)\n ctx.rotate(getRadianAngle(rotation))\n ctx.translate(-safeArea / 2, -safeArea / 2)\n\n // draw rotated image and store data.\n ctx.drawImage(\n image,\n safeArea / 2 - image.width * 0.5,\n safeArea / 2 - image.height * 0.5\n )\n const data = ctx.getImageData(0, 0, safeArea, safeArea)\n\n // set canvas width to final desired crop size - this will clear existing context\n canvas.width = pixelCrop.width\n canvas.height = pixelCrop.height\n\n // paste generated rotate image with correct offsets for x,y crop values.\n ctx.putImageData(\n data,\n Math.round(0 - safeArea / 2 + image.width * 0.5 - pixelCrop.x),\n Math.round(0 - safeArea / 2 + image.height * 0.5 - pixelCrop.y)\n )\n\n // As Base64 string\n return canvas.toDataURL(filetype);\n\n // As a blob\n // return new Promise(resolve => {\n // canvas.toBlob(file => {\n // resolve(URL.createObjectURL(file))\n // }, 'image/jpeg')\n // })\n}\n\n//return a promise that resolves with a File instance\nexport function urltoFile(url, filename, mimeType) {\n mimeType = mimeType || (url.match(/^data:([^;]+);/) || '')[1];\n return (fetch(url)\n .then(function (res) { return res.arrayBuffer(); })\n .then(function (buf) { return new File([buf], filename, { type: mimeType }); })\n );\n}\n","import React from \"react\";\nimport TextField from '@material-ui/core/TextField';\nimport { withStyles } from '@material-ui/core/styles';\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport MuiDialogContent from '@material-ui/core/DialogContent';\nimport IconButton from '@material-ui/core/IconButton';\nimport ImageIcon from '@material-ui/icons/Image';\nimport {\n hideToastAction, showInfoToastAction,\n showErrorToastAction, showSuccessToastAction, IAction, UpdateProfileAction, submittingAction\n} from '../../redux/actions'\nimport { connect } from 'react-redux';\nimport Constants from '../../Constants';\nimport \"@pathofdev/react-tag-input/build/index.css\";\nimport { updateUserProfileAsync } from '../../services/profileService';\nimport EditIcon from '@material-ui/icons/Edit';\nimport { useAuth0, withAuth0, WithAuth0Props } from '@auth0/auth0-react';\nimport Cropper from 'react-easy-crop';\nimport getCroppedImg, { urltoFile } from '../UserProfile/CropImage';\nimport { Profile, UpdateProfileRequest, UserInfo } from \"../../Types\";\nimport { Area, Point } from \"react-easy-crop/types\";\nimport { compare, ResembleSingleCallbackComparisonResult } from \"resemblejs\";\nimport '../../styles/dialog.scss';\nimport NCancelIcon from \"../NComponents/NCancelIcon\";\nimport NButton from \"../NComponents/NButton\";\n\n\ninterface EditProfileDialogProps extends WithAuth0Props {\n data: Profile,\n viewerUserId: string,\n open: boolean,\n handleClose: () => void,\n hideToastAction: () => void,\n submittingAction: () => void,\n showErrorToastAction: (payload: any) => IAction,\n showInfoToastAction: (payload: any) => IAction,\n showSuccessToastAction: (payload: any) => IAction,\n UpdateProfileAction: (userInfo: UserInfo) => IAction\n}\n\ntype EditProfileDialogState = {\n imageFile: any,\n disablePostButton: boolean,\n name: string,\n title: string,\n crop: any,\n zoom: any,\n aspect: any,\n InitialCroppedAreaPixels: any,\n initialSet: boolean,\n croppedAreaPixels: any,\n originalFileType: string\n}\n\nclass EditProfileDialog extends React.Component {\n constructor(props: EditProfileDialogProps) {\n super(props);\n\n this.state = {\n imageFile: props.data.picture,\n disablePostButton: false,\n name: props.data.name,\n title: props.data.title,\n crop: { x: 0, y: 0 },\n zoom: 1,\n aspect: 1,\n InitialCroppedAreaPixels: null,\n initialSet: false,\n croppedAreaPixels: null,\n originalFileType: 'image/' + this.props.data.picture.substring(this.props.data.picture.lastIndexOf('.') + 1)\n }\n }\n\n onCropChange = (crop: Point) => {\n this.setState({ crop })\n }\n\n onCropComplete = async (croppedArea: Area, croppedAreaPixels: Area) => {\n if (!this.state.initialSet) {\n this.setState({ croppedAreaPixels, InitialCroppedAreaPixels: croppedAreaPixels, initialSet: true });\n } else {\n this.setState({ croppedAreaPixels });\n }\n }\n\n onZoomChange = (zoom: number) => {\n this.setState({ zoom })\n }\n\n handleFileInput = async (event: React.ChangeEvent) => {\n const files = Array.from((event.target as any).files);\n if (files.length > 1) {\n this.props.showErrorToastAction(\"Error! Only 1 image can be uploaded.\");\n return;\n }\n\n const file: any = files[0];\n const allowedTypes = ['image/png', 'image/jpeg'];\n\n if (allowedTypes.every(type => file.type !== type)) {\n this.props.showErrorToastAction(`Error! file type not supported, please select a png or jpg image.`);\n return;\n }\n\n if (file.size > (Constants.MAX_IMAGE_FILE_SIZE_MB * 1024 * 1024)) {\n this.props.showErrorToastAction(`'${file.name}' is too large, please pick a smaller file. Max size is ${Constants.MAX_IMAGE_FILE_SIZE_MB}mb`);\n return;\n }\n\n let imageDataUrl = await this.readFile(file)\n\n this.setState({\n imageFile: imageDataUrl,\n originalFileType: file.type\n });\n }\n\n readFile = (file: Blob) => {\n return new Promise(resolve => {\n const reader = new FileReader()\n reader.addEventListener('load', () => resolve(reader.result), false)\n reader.readAsDataURL(file)\n });\n }\n\n onPost = async () => {\n if (this.state.disablePostButton) {\n document.getElementById(\"name-field\")?.focus();\n return;\n }\n\n this.props.handleClose();\n let imageUpdateable = !this.state.imageFile.includes(\"gravatar\");\n\n let cropChanged = imageUpdateable;\n let file: File | null = null;\n\n if (!imageUpdateable) {\n await this.updateProfile(cropChanged, file);\n return;\n }\n\n this.props.submittingAction();\n\n const originalCrop = await getCroppedImg(\n this.state.imageFile,\n this.state.InitialCroppedAreaPixels,\n this.state.originalFileType\n )\n\n const currentCrop = await getCroppedImg(\n this.state.imageFile,\n this.state.croppedAreaPixels,\n this.state.originalFileType\n )\n\n try {\n compare(currentCrop, originalCrop, {}, async (err: unknown, data: ResembleSingleCallbackComparisonResult) => {\n if (!err) {\n cropChanged = Number(data.misMatchPercentage) != 0;\n file = await urltoFile(currentCrop, this.state.originalFileType);\n await this.updateProfile(cropChanged, file);\n } else {\n await this.updateProfile(cropChanged, file);\n }\n });\n } catch (error) {\n this.props.hideToastAction();\n console.log(error);\n return;\n }\n }\n\n updateProfile = async (cropChanged: boolean, file: any) => {\n const userId = this.props.auth0.user!.sub!;\n if (userId != this.props.viewerUserId) {\n return;\n }\n\n if (this.state.name.length === 0) {\n this.props.showErrorToastAction(\"Empty name not allowed\");\n return;\n } else if (!this.state.imageFile) {\n this.props.showErrorToastAction(\"Profile picture is mandatory\");\n return;\n }\n\n let changed = cropChanged || this.state.imageFile != this.props.data.picture || this.state.name != this.props.data.name || this.state.title != this.props.data.title;\n\n if (changed) {\n let postData: UpdateProfileRequest = {\n userId,\n imageFile: file,\n imageChanged: this.state.imageFile != this.props.data.picture || cropChanged,\n existingPictureUrl: this.props.data.picture,\n name: this.state.name.trim(),\n title: this.state.title ? this.state.title.trim() : this.state.title\n }\n\n let updatedProfile = await updateUserProfileAsync(postData);\n this.props.hideToastAction();\n\n if (updatedProfile) {\n this.props.UpdateProfileAction({\n name: updatedProfile.name,\n picture: updatedProfile.picture,\n title: updatedProfile.title,\n userId\n });\n this.props.showSuccessToastAction(\"Profile updated.\");\n } else {\n this.props.showErrorToastAction(\"Failed to update your profile.\");\n }\n }else{\n this.props.hideToastAction();\n }\n }\n\n onNameChange = (e: React.ChangeEvent) => {\n this.setState({ name: (e.target as any).value, disablePostButton: (e.target as any).value.trim().length === 0 });\n }\n\n onTitleChange = (e: React.ChangeEvent) => {\n this.setState({ title: (e.target as any).value });\n }\n\n\n render() {\n if (this.props.auth0.user!.sub != this.props.viewerUserId) {\n return null;\n }\n\n let isGravatar = this.state.imageFile.includes(\"gravatar\");\n\n return (\n
\n \n
\n
Update profile
\n
\n
\n\n \n\n
\n
\n {!isGravatar && this.state.imageFile ? \n :\n
\n
Please select a profile picture
\n
\n \n
\n
\n }\n\n {!isGravatar &&
\n (document.getElementById('upload-image-input')! as HTMLInputElement).click()} >\n
}\n
\n\n \n \n
\n\n
\n\n
\n \n \n \n
\n
\n\n
\n );\n }\n}\n\nexport default connect(null, {\n hideToastAction,\n submittingAction,\n showErrorToastAction,\n showInfoToastAction,\n showSuccessToastAction,\n UpdateProfileAction\n})(withAuth0(EditProfileDialog))\n\n\nconst DialogContent = withStyles((theme) => ({\n root: {\n padding: theme.spacing(2),\n },\n}))(MuiDialogContent);\n","import React, { Component } from \"react\";\nimport EditProfileDialog from \"../CustomDialogs/EditProfileDialog\";\nimport { followUserAsync } from '../../services/profileService'\nimport { Profile } from \"../../Types\";\nimport NButton from \"../NComponents/NButton\";\nimport { handleGenericCounter } from \"../../services/Helpers\";\n\ntype ProfileHeadingProps = {\n isPersonalAccount: boolean,\n profile: Profile,\n viewerUserId: string,\n profileUserId: string\n}\n\ntype ProfileHeadingState = {\n openEditDialog: boolean,\n followUser: boolean,\n followersCount: number\n}\n\nclass ProfileHeading extends Component {\n constructor(props: ProfileHeadingProps) {\n super(props);\n\n this.state = {\n openEditDialog: false,\n followUser: this.props.profile.isFollowing,\n followersCount: this.props.profile.followersCount\n }\n }\n\n componentDidMount() {\n window.addEventListener(\"beforeunload\", this.handleBeforeUnload, true);\n }\n\n handleBeforeUnload = async () => {\n await this.processFollowing(true);\n }\n\n async componentWillUnmount() {\n window.removeEventListener(\"beforeunload\", this.handleBeforeUnload, true);\n await this.processFollowing();\n }\n\n onEdit = () => {\n this.setState({ openEditDialog: true });\n }\n\n onEditDialogClose = () => {\n this.setState({ openEditDialog: false });\n }\n\n processFollowing = async (keepalive?: boolean) => {\n let updateFollowing = this.props.profile.isFollowing != this.state.followUser;\n\n if (updateFollowing) {\n let payload = {\n from: this.props.viewerUserId,\n target: this.props.profileUserId,\n follow: this.state.followUser\n }\n\n await followUserAsync(payload, keepalive);\n }\n\n }\n\n handleFollowing = () => {\n var updated = handleGenericCounter(this.props.profile.isFollowing, this.state.followUser, this.props.profile.followersCount, this.state.followersCount);\n this.setState({ followUser: updated.newBool, followersCount: updated.newCount });\n }\n\n render() {\n const profile = this.props.profile;\n\n return (\n
\n
\n\n
\n \n
\n\n
\n
{profile.name}
\n
{profile.title || \"\"}
\n\n
\n\n
\n
{profile.postsCount}
\n
Posts
\n
\n\n
\n
\n
{this.state.followersCount}
\n
Followers
\n
\n\n
\n
\n
{profile.followingCount}
\n
Following
\n
\n\n
\n\n
\n\n
\n {this.props.isPersonalAccount ?\n \n :\n \n }\n
\n\n
\n\n {this.state.openEditDialog &&\n }\n\n
\n\n );\n }\n}\n\nexport default ProfileHeading;","import React, { useEffect, useReducer, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { RootState } from '../../redux/store';\nimport { Profile } from '../../Types';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport { getUserProfileAsync } from '../../services/profileService';\nimport { IAction } from '../../redux/actions';\nimport { Completed, Loading, LoadingNewProfile, UpdateFromRedux } from '../../redux/actionTypes';\nimport { useParams } from 'react-router-dom';\n\n\ninterface ExtraProps {\n loading: boolean,\n profile: null | Profile,\n fetchedFromServer: boolean\n}\n\ninterface RouteParamTypes {\n userId: string\n}\n\nconst profileReducer = (state: ExtraProps, action: IAction): ExtraProps => {\n switch (action.type) {\n case Loading: {\n return { ...state, loading: true, fetchedFromServer: true };\n }\n case LoadingNewProfile: {\n return { ...state, loading: true, fetchedFromServer: false, profile: null };\n }\n case Completed: {\n return { ...state, loading: false, profile: action.payload, fetchedFromServer: true };\n }\n case UpdateFromRedux: {\n const { name, title, picture } = action.payload;\n return { ...state, profile: { ...state.profile, name, title, picture } as Profile };\n }\n default: {\n return state;\n }\n }\n}\n\nvar previousProfileUserId: string | null = null;\n\nconst withProfile = () => (Component: any) => (childProps: any) => {\n\n const { user, isAuthenticated } = useAuth0();\n const profileInRedux = useSelector((state: RootState) => state.profile);\n\n const { userId } = useParams();\n const profileUserId: string = userId ? userId : user!.sub!;\n const isPersonalProfile = profileUserId === user!.sub;\n\n const [{ loading, profile, fetchedFromServer }, dispatch] = useReducer(profileReducer, {\n loading: true,\n profile: null,\n fetchedFromServer: false\n });\n\n const getProfile = async () => {\n let data = await getUserProfileAsync(profileUserId);\n if (!data) {\n return;\n }\n\n if (data) {\n dispatch({ type: Completed, payload: data });\n }\n\n if (profileUserId) {\n previousProfileUserId = `${profileUserId}`;\n }\n }\n\n if (previousProfileUserId && profileUserId != previousProfileUserId) {\n previousProfileUserId = `${profileUserId}`;\n dispatch({ type: LoadingNewProfile });\n }\n\n useEffect(() => {\n if (!fetchedFromServer) {\n dispatch({ type: Loading });\n getProfile();\n } else if (profileInRedux) {\n dispatch({ type: UpdateFromRedux, payload: profileInRedux });\n }\n }, [profileInRedux, fetchedFromServer]);\n\n const hocLocal = {\n loadingProfile: loading,\n profile,\n isAuthenticated,\n isPersonalProfile,\n viewerUserId: user!.sub,\n profileUserId\n }\n\n return \n}\n\nexport default withProfile;\n\n","import React from \"react\";\nimport '../../styles/profile.scss'\nimport ProfileHeading from './ProfileHeading';\nimport Loading from '../Loading';\nimport { Post, Profile } from \"../../Types\";\nimport withProfile from \"../HOC/withProfile\";\nimport withScrollPercentage from \"../HOC/withScrollPercentage\";\nimport withPosts from \"../HOC/withPosts\";\nimport TimelinePost from \"../TimelinePost\";\n\ninterface Props {\n loadingProfile: boolean,\n isAuthenticated: boolean,\n profile: null | Profile,\n isPersonalProfile: boolean,\n viewerUserId: string,\n profileUserId: string,\n scrollPercentage: number,\n loadingPosts: boolean,\n posts: Post[]\n}\n\nfunction UserProfile(props: Props) {\n const { loadingProfile, isAuthenticated, profile, isPersonalProfile, viewerUserId, profileUserId, posts } = props;\n\n if (!isAuthenticated) {\n return null;\n } else if (loadingProfile) {\n return \n }\n\n return (\n
\n\n \n\n
\n\n
\n
\n {!posts || posts.length === 0 ?\n
No posts have been uploaded by this user.
\n :\n posts.map((post) => {\n return \n })\n }\n
\n
\n\n
\n\n
\n );\n}\n\nexport default withProfile()(withScrollPercentage(withPosts(\"profile\")(UserProfile)));","import React from 'react';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport MuiAlert from '@material-ui/lab/Alert';\nimport { hideToastAction, IAction } from '../redux/actions';\nimport Slide from '@material-ui/core/Slide';\nimport { connect } from 'react-redux';\nimport { ToastState } from '../redux/reducers/toastReducer';\nimport { RootState } from '../redux/store';\n\nfunction SlideTransition(props: any) {\n return ;\n}\n\ntype SnackProps = {\n hideToastAction: () => IAction,\n toast: ToastState\n}\n\ntype SnackState = {}\n\nclass CustomSnackNotification extends React.Component {\n\n handleToastClose = (reason: any) => {\n if (reason === 'clickaway') {\n return;\n }\n\n if (!this.props.toast.submitting) {\n this.props.hideToastAction();\n }\n };\n\n render() {\n const { show, severity, message, submitting } = this.props.toast;\n\n return (\n \n\n : undefined} elevation={6} variant=\"filled\" severity={severity} onClose={submitting ? undefined : this.handleToastClose} >\n {message}\n \n \n )\n }\n}\n\nconst SubmittingIcon = () => {\n return (\n
\n )\n}\n\nfunction mapStateToProps(state: RootState) {\n return {\n toast: state.toast\n };\n}\n\nexport default connect(mapStateToProps, { hideToastAction })(CustomSnackNotification)\n","import React from \"react\";\nimport { useHistory } from \"react-router-dom\";\nimport IconButton from '@material-ui/core/IconButton';\nimport AccountCircleIcon from '@material-ui/icons/AccountCircle';\nimport { UserInfo } from \"../../Types\";\n\ntype Props = {\n data: UserInfo,\n final: boolean\n}\n\nconst UserSearchItem = (props: Props) => {\n\n const data = props.data;\n const history = useHistory();\n\n const loadProfile = (e: React.MouseEvent) => {\n history.push(`/profile/${data.userId}`);\n }\n\n return (\n
\n
\n\n
\n \n
\n\n
\n
{data.name}
\n
{data.title || \"\"}
\n
\n\n
\n \n
\n\n
\n {!props.final &&
}\n
\n )\n}\n\nexport default UserSearchItem;\n","import React, { useEffect, useState } from \"react\";\nimport Loading from '../Loading';\nimport DOMPurify from 'dompurify';\nimport { searchAsync } from '../../services/searchService';\nimport '../../styles/searchResults.scss';\nimport Pagination from '@material-ui/lab/Pagination';\nimport UserSearchCard from './UserSearchItem';\nimport { RouteComponentProps } from \"react-router-dom\";\nimport { SearchRequest } from \"../../Types\";\nimport { getDefaultSearchResult } from \"./SearchBar\";\n\n\nconst MaxUserSearchItemsPerPage = 20;\nexport default function SearchResults(props: RouteComponentProps) {\n\n const value = DOMPurify.sanitize(new URLSearchParams(props.history.location.search).get(\"value\") || \"\");\n const [loading, setLoading] = useState(true);\n const [page, setPage] = useState(1);\n const [data, setData] = useState(getDefaultSearchResult());\n\n useEffect(() => {\n const getData = async () => {\n let payload: SearchRequest = {\n value,\n page: page - 1,\n max: MaxUserSearchItemsPerPage\n }\n let data = await searchAsync(payload);\n setData(data || getDefaultSearchResult());\n setLoading(false);\n }\n\n getData();\n }, [page, value]);\n\n\n if (loading) {\n return \n }\n\n const ErrorMessage = () => (\n
\n
\n No results found for that search value\n
\n
\n );\n\n const requiredPages = data ? data.total < data.limit ? 1 : Math.ceil(data.total / data.limit) : 0;\n\n const handlePageChange = (event: React.ChangeEvent, value: number) => {\n setPage(value);\n };\n\n return (\n
\n
\n\n {!data ? :\n
\n {data.users.map((user, index) => {\n return (\n \n )\n })}\n\n {data.length === 0 && }\n
\n }\n\n {requiredPages >= 2 &&\n
\n \n
\n }\n\n
\n
\n );\n}\n\n","import React, { useEffect, useState } from 'react';\nimport '../../styles/home.scss';\nimport TimelinePost from '../TimelinePost';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport TimelineSkeleton from '../TimelinePost/TimelineSkeleton';\nimport { Post } from '../../Types';\nimport { getSinglePostAsync } from '../../services/postsService';\nimport { useParams } from 'react-router';\nimport { useAppSelector } from '../../redux/store';\n\ninterface RouteParamTypes {\n postId: string\n}\n\nfunction SingleThread() {\n const { user } = useAuth0();\n const postsEvent = useAppSelector((state) => state.events.postsEvent);\n\n const { postId } = useParams();\n const [post, setPost] = useState(null as (null | Post));\n const [loading, setLoading] = useState(true);\n\n const getData = async () => {\n const data = await getSinglePostAsync(postId);\n if (data) {\n setPost(data);\n }\n setLoading(false);\n }\n\n useEffect(() => {\n getData();\n }, []);\n\n useEffect(() => {\n if (postsEvent && postsEvent.payload.postId === postId) {\n switch (postsEvent.type) {\n case \"events/postDeleted\": {\n setPost(null);\n break;\n }\n case \"events/postUpdated\": {\n setPost(postsEvent.payload);\n break;\n }\n }\n }\n\n }, [postsEvent]);\n\n\n return (\n
\n
\n\n {loading ?\n (
) :\n !post ?
Thread does not exist.
:\n \n }\n
\n
\n );\n}\n\nexport default SingleThread;","import React from \"react\"\nimport { Link } from \"react-router-dom\";\nimport styled from \"styled-components\";\nimport NButton from \"../NComponents/NButton\";\nimport { FaLinkedin } from 'react-icons/fa';\n\n\ninterface Props {\n onLogin: () => void\n}\n\nconst Heading = (props: Props) => {\n\n return (\n \n \n
\n \n \n Hikmasight\n \n (Preview)\n
\n\n \n
\n\n
Making life a meaningful spiritual adventure
\n
A platform dedicated to spreading the Truth in all areas of life and learning from the people of knowledge around the world.\n
\n\n \n
\n )\n}\n\nexport default Heading;\n\n\nconst HeadingContainer = styled.div`\n padding: 40px;\n height: 100%;\n width: 100%;\n width: 100%;\n justify-content: center;\n text-align: center;\n align-items: center;\n display: flex;\n flex-direction: column;\n padding-top: 20px;\n\n .title{\n margin: auto;\n width: 800px;\n font-family: ${props => props.theme.fonts.main};\n font-size: 65px;\n font-weight: 500;\n margin-bottom: 20px;\n margin-top: 100px;\n\n background-image: linear-gradient(81.84deg, #0099ff -9.4%, #a033ff 51.57%, #ff5280 84.07%, #ff7061 90.59%);\n background-size: 100%;\n background-repeat: repeat;\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n\n .subtitle{\n font-family: ${props => props.theme.fonts.main};\n font-size: 18px;\n font-weight: 400;\n line-height: 27px;\n width: 600px;\n margin-top: 15px;\n }\n\n @media only screen and (max-width: 1024px) {\n .title{\n width: auto;\n font-size: 45px;\n }\n .subtitle{\n width: auto;\n }\n }\n`;\n\nconst NavBarWrapper = styled.div`\n width: 100%;\n display: flex;\n justify-content: space-between;\n\n .left-float{\n #logo{\n width: 40px;\n height: 40px;\n cursor: pointer;\n }\n\n #brand-name{\n color: ${props => props.theme.colors.text};\n font-weight: 600;\n font-size: 16px;\n line-height: 48px;\n -webkit-font-smoothing: antialiased;\n margin-left: 10px;\n }\n\n #preview-text{\n font-size: 13px;\n color: black;\n font-weight: 400;\n padding-left: 5px;\n }\n }\n\n .right-float{\n .link{\n color: ${props => props.theme.colors.text};\n font-weight: 500;\n text-align: center;\n align-items: baseline;\n display: flex;\n font-size: 16px;\n -webkit-font-smoothing: antialiased;\n font-weight: 500;\n line-height: 50px;\n transition: 0.2s ease-in-out;\n\n &:hover{\n color: ${props => props.theme.colors.primaryDark};\n }\n\n .icon{\n align-self: center;\n display: flex;\n margin-top: 2px;\n }\n\n .label{\n padding-left: 5px;\n }\n }\n }\n`","import React from \"react\"\nimport styled from \"styled-components\";\n\n\nexport default function BodyContent(){\n\n return(\n \n Why was I ever created?\n\n \n Everyday I meditate upon this, and every night I groan
\n Why is my own existence to myself the least known?


\n\n Whence have I come, why this coming here?
\n Where to must I go, when will my home to me be shown?


\n\n Whatever is of the celestial realm, of that I speak
\n I am ready to go, my clothes are packed to be away thrown.


\n\n Joyous be that day that in search of the beloved
\n I take wing towards that land, upon that air I am flown.


\n\n Where is that ear that can hear my speech and song?
\n Who is the one who puts voice in this mouth of dust and stone?


\n\n I did not come here on my own accord, nor will I thus leave
\n He who brought me here, shall return me to my very own.


\n\n I am a bird of Paradise, I am not of the earthy realm
\n For a few days imprisoned in my cage of flesh and bone.


\n\n My soul is my guide, for my soul is of that abode
\n I will not speak of the earthly, I am of the unknown.


\n
\n\n

Classic poem by Rumi

\n
\n )\n}\n\n\nconst BodyContainer = styled.div`\n padding: 25px;\n width: 100%;\n justify-content: center;\n margin: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: #fafafa;\n\n & p:first-of-type{\n font-size: 15px;\n color: #595959;\n\n & a{\n color: #595959;\n }\n }\n`;\n\nconst BodyTitle = styled(BodyContainer)`\n font-size: 40px;\n font-weight: 600;\n line-height: 1.5;\n`;\n\nconst BodyText = styled(BodyContainer)`\n font-size: 20px;\n font-weight: 400;\n line-height: 34px;\n margin-bottom: 0;\n max-width: 800px;\n text-align: center;\n padding: 0;\n`;","import React from \"react\"\nimport styled from \"styled-components\";\n\n\nconst Tiles = () => {\n\n return (\n\n \n
\n

\"You wander from room to room, hunting for the diamond necklace, that is already around your neck.\"

\n

Rumi

\n
\n\n
\n

\"In everybody there is a piece of flesh, if it is healthy, the whole body is healthy, and if it is sick, the whole body is sick.\n Beware! it is the heart!\"

\n

Prophet Muhammad pbuh

\n
\n\n
\n

\"The meaning of life is to find your gift. The purpose of life is to give it away.\"

\n

Pablo Picasso

\n
\n
\n )\n}\n\nexport default Tiles;\n\n\nconst TilesContainer = styled.div`\n padding: 25px;\n width: 100%;\n justify-content: center;\n display: flex;\n align-items: center;\n\n .tile{\n padding: 15px;\n width: 350px;\n height: 200px;\n text-align: center;\n font-size: 17px;\n font-weight: 400;\n line-height: 24px;\n box-shadow: ${props => props.theme.shadows.soft};\n background-color: #fff;\n\n &:hover{\n box-shadow: 0 30px 50px rgba(232, 80, 91,0.10);\n }\n\n &:nth-child(2){\n margin-left: 40px;\n margin-right: 40px;\n }\n\n .poem{\n margin-top: 20px;\n }\n\n .author{\n font-size: 15px;\n color:#595959;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n .tile{\n height: auto;\n width: 100%;\n\n &:nth-child(2){\n margin-top: 40px;\n margin-bottom: 40px;\n margin-left: auto;\n margin-right: auto;\n }\n }\n &{\n flex-direction: column;\n }\n }\n`;","import React from \"react\"\nimport styled from \"styled-components\";\n\nconst Footer = () => {\n\n return (\n \n

Created by Najmuddin Dost

\n

.Net and React contractor

\n

Email: nnost@live.com

\n
\n )\n}\n\nexport default Footer;\n\n\nconst FooterContainer = styled.div`\n padding: 20px;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n\n p{\n margin: 0;\n }\n\n & p:nth-child(2){\n margin-left: 40px;\n margin-right: 40px;\n }\n\n @media only screen and (max-width: 1024px) {\n &{\n flex-direction: column;\n }\n\n & p:nth-child(2){\n margin-top: 20px;\n margin-bottom: 20px;\n margin-left:auto;\n margin-right: auto;\n }\n }\n`;","import React from 'react';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport styled from 'styled-components';\nimport Heading from './Heading';\nimport BodyContent from './BodyContent';\nimport Tiles from './Tiles';\nimport Footer from './Footer';\n\n\nconst LandingPage = () => {\n\n const { loginWithRedirect } = useAuth0()\n\n const onLogin = () => {\n loginWithRedirect();\n }\n\n return (\n \n \n \n \n