dappros/ethora

View on GitHub
client-web/build/static/js/980.27d29068.chunk.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"static/js/980.27d29068.chunk.js","mappings":"mMAIaA,EAAyB,SAACC,GACnC,OAAGA,EACQA,EAAIC,QAAQ,WAAY,OAAOC,cAE/B,uBAEf,EAEaC,EAAiB,yCAAG,WAC7BC,EACAC,EACAC,EACAC,EACAC,GAAgB,oFA8Bf,OA5BKC,EAAwB,CAACL,EAAiBC,GAC3CK,OACAC,KAAK,KAEJC,EAAUH,EAAsBP,cAAgBW,EAAAA,GAChDC,EAAoB,CAACR,EAAaC,GAAgBG,OAAOC,KAAK,SAE9DI,EAAmBC,EAAAA,EAAAA,WAAyBC,cAE9CC,GAAY,EACkD,IAA/DH,EAAiBI,QAAO,SAACC,GAAE,OAAKA,EAAGC,MAAQT,CAAO,IAAEU,SACnDJ,GAAY,EACZK,EAAAA,GAAAA,cAAmBd,EAAsBP,eACzCqB,EAAAA,GAAAA,SAAcd,EAAsBP,eACpCqB,EAAAA,GAAAA,WACId,EAAsBP,cACtB,CAACsB,SAAUV,IAEfS,EAAAA,GAAAA,SAAcX,GACdW,EAAAA,GAAAA,eAAoBX,GAEpBa,YAAW,WACPF,EAAAA,GAAAA,WACIxB,EAAuBK,GACvBQ,EAAQV,cACRH,EAAuBM,GAE/B,GAAG,MACN,kBAEM,CAACO,QAAAA,EAASY,SAAUV,EAAmBI,UAAAA,IAAU,2CAC3D,gBAtC6B,6C,wKCEjBQ,EAA8B,SAAH,GAAwC,IAAlCC,EAAK,EAALA,MAAOC,EAAI,EAAJA,KAAMC,EAAI,EAAJA,KAAMC,EAAO,EAAPA,QAC/D,OACE,UAAC,IAAM,CAACC,UAAU,EAAOH,KAAMA,EAAME,QAASA,EAAQ,YACjDH,IACD,SAAC,IAAW,CAACK,GAAI,CAAEC,QAAS,SAAUC,WAAY,QAAS,SACxDP,KAGL,UAAC,IAAG,CAACK,GAAI,CAAEC,QAAS,QAAS,WAC3B,SAAC,I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qC,EAAwC,SAAH,GAA0B,IAApBlB,EAAY,EAAZA,cACxC7D,EAAAA,EAAAA,MACQzM,EAAAA,EAAAA,IAAc,SAAC+C,GAAK,OAAKA,EAAMD,KAAKiI,aAAa,IAEvE,OADAzE,QAAQwB,IAAI,CAAEwI,aAAAA,KAEZ,SAAC,IAAI,CAACtP,GAAI,CAAEM,MAAO,OAAQkN,QAAS,oBAAqB,SACtD8B,EAAaxC,KAAI,SAACvB,GACjB,OAAO,SAACgG,EAAgB,CAAChG,KAAMA,GAAWA,EAAK4C,IACjD,KAGN,C","sources":["helpers/chat/createPrivateChat.ts","pages/Profile/QrModal.tsx","pages/Profile/ChangeImage.tsx","pages/Profile/EditProfileModal.tsx","pages/Profile/UserCard.tsx","pages/Profile/ItemsTable.tsx","pages/Profile/DocumentsTable.tsx","firebase.ts","pages/Profile/MyProfile.tsx","pages/Profile/OtherProfile.tsx","pages/Profile/index.tsx","pages/Transactions/Transactions.tsx"],"sourcesContent":["import xmpp from \"../../xmpp\";\nimport {useStoreState} from \"../../store\";\nimport { CONFERENCEDOMAIN } from \"../../constants\";\n\nexport const underscoreManipulation = (str:string) => {\n    if(str){\n        return str.replace(/([A-Z])/g, '_$1').toLowerCase()\n    }else{\n        return 'invalid string passed'\n    }\n};\n\nexport const createPrivateChat = async (\n    myWalletAddress: string,\n    otherUserWalletAddress: string,\n    myFirstName: string,\n    otherFirstName: string,\n    userJID?: string\n) => {\n    const combinedWalletAddress = [myWalletAddress, otherUserWalletAddress]\n        .sort()\n        .join('.');\n\n    const roomJid = combinedWalletAddress.toLowerCase() + CONFERENCEDOMAIN;\n    const combinedUsersName = [myFirstName, otherFirstName].sort().join(' and ');\n\n    const currentChatRooms = useStoreState.getState().userChatRooms;\n\n    let isNewRoom = false;\n    if(currentChatRooms.filter((el) => el.jid === roomJid).length === 0){\n        isNewRoom = true;\n        xmpp.createNewRoom(combinedWalletAddress.toLowerCase());\n        xmpp.setOwner(combinedWalletAddress.toLowerCase());\n        xmpp.roomConfig(\n            combinedWalletAddress.toLowerCase(),\n            {roomName: combinedUsersName},\n        );\n        xmpp.subsribe(roomJid);\n        xmpp.presenceInRoom(roomJid);\n\n        setTimeout(() => {\n            xmpp.sendInvite(\n                underscoreManipulation(myWalletAddress),\n                roomJid.toLowerCase(),\n                underscoreManipulation(otherUserWalletAddress),\n            );\n        }, 1000);\n    }\n\n    return {roomJid, roomName: combinedUsersName, isNewRoom};\n};\n","import React from \"react\";\nimport { Button, Dialog, DialogTitle, IconButton } from \"@mui/material\";\nimport { Box } from \"@mui/system\";\nimport QRCode from \"react-qr-code\";\nimport { truncateString } from \"../../utils\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\nexport interface IQrModal {\n  open: boolean;\n  link: string;\n  onClose: () => void;\n  title?: string;\n}\n\nexport const QrModal: React.FC<IQrModal> = ({ title, open, link, onClose }) => {\n  return (\n    <Dialog maxWidth={false} open={open} onClose={onClose}>\n      {!!title && (\n        <DialogTitle sx={{ padding: \"0 24px\", paddingTop: \"20px\" }}>\n          {title}\n        </DialogTitle>\n      )}\n      <Box sx={{ padding: \"20px\" }}>\n        <QRCode\n          size={256}\n          style={{ height: \"50vh\", maxWidth: \"100%\", width: \"100%\" }}\n          value={link}\n          viewBox={`0 0 256 256`}\n        />\n        <Box\n          sx={{\n            boxShadow: \"0px 0px 10px -5px rgba(0,0,0,0.75)\",\n            borderRadius: \"10px\",\n            display: \"flex\",\n            justifyContent: \"space-between\",\n            alignItems: \"center\",\n            pl: \"10px\",\n            my: \"10px\",\n          }}\n        >\n          <span>{truncateString(link, 50)}</span>\n          <Button\n            variant=\"contained\"\n            sx={{ borderRadius: \"10px\", marginLeft: '5px' }}\n            onClick={() => navigator.clipboard.writeText(link)}\n          >\n            Copy\n          </Button>\n        </Box>\n        <IconButton\n          onClick={onClose}\n          sx={{\n            color: \"black\",\n            position: \"absolute\",\n            top: 10,\n            right: 10,\n            fontSize: \"30px\",\n          }}\n        >\n          <CloseIcon fontSize=\"inherit\" />\n        </IconButton>\n      </Box>\n    </Dialog>\n  );\n};\n","import React, { useState, useRef } from \"react\";\nimport Dialog from \"@mui/material/Dialog\";\nimport DialogTitle from \"@mui/material/DialogTitle\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Button } from \"@mui/material\";\nimport ReactCrop, { centerCrop, makeAspectCrop, Crop } from \"react-image-crop\";\nimport * as http from \"../../http\";\nimport { useStoreState } from \"../../store\";\nimport \"react-image-crop/dist/ReactCrop.css\";\n\ntype TProps = {\n  open: boolean;\n  setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n};\n\nfunction centerAspectCrop(\n  mediaWidth: number,\n  mediaHeight: number,\n  aspect: number\n) {\n  return centerCrop(\n    makeAspectCrop(\n      {\n        unit: \"%\",\n        width: 90,\n      },\n      aspect,\n      mediaWidth,\n      mediaHeight\n    ),\n    mediaWidth,\n    mediaHeight\n  );\n}\n\nexport default function ChangeImage({ open, setOpen }: TProps) {\n  const user = useStoreState((state) => state.user);\n  const setUser = useStoreState((state) => state.setUser);\n  const fileRef = useRef<HTMLInputElement>(null);\n  const [imgSrc, setImgSrc] = useState(\"\");\n  const imgRef = useRef<HTMLImageElement>(null);\n  const [crop, setCrop] = useState<Crop>();\n  const [blob, setBlob] = useState<Blob>();\n  const aspect = 2;\n\n  function onSelectFile(e: React.ChangeEvent<HTMLInputElement>) {\n    if (e.target.files && e.target.files.length > 0) {\n      const reader = new FileReader();\n      reader.addEventListener(\"load\", () =>\n        setImgSrc(reader.result?.toString() || \"\")\n      );\n      reader.readAsDataURL(e.target.files[0]);\n    }\n  }\n\n  function onImageLoad(e: React.SyntheticEvent<HTMLImageElement>) {\n    if (aspect) {\n      const { width, height } = e.currentTarget;\n      setCrop(centerAspectCrop(width, height, aspect));\n    }\n  }\n\n  function onSave() {\n    const form = new FormData();\n    form.append(\"file\", blob, \"profileImg\");\n    http\n      .updateProfile(form)\n      .then((response) => {\n        // response.data.user\n        setUser({\n          ...user,\n          profileImage: response.data.user.profileImage,\n        });\n        setOpen(false);\n      })\n      .catch((e) => console.log(e));\n  }\n\n  function onCropComplete(crop) {\n    const canvas = document.createElement(\"canvas\");\n    const pixelRatio = window.devicePixelRatio;\n    const scaleX = imgRef.current.naturalWidth / imgRef.current.width;\n    const scaleY = imgRef.current.naturalHeight / imgRef.current.height;\n    const ctx = canvas.getContext(\"2d\");\n\n    canvas.width = crop.width * pixelRatio * scaleX;\n    canvas.height = crop.height * pixelRatio * scaleY;\n\n    ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n    ctx.imageSmoothingQuality = \"high\";\n\n    ctx.drawImage(\n      imgRef.current,\n      crop.x * scaleX,\n      crop.y * scaleY,\n      crop.width * scaleX,\n      crop.height * scaleY,\n      0,\n      0,\n      crop.width * scaleX,\n      crop.height * scaleY\n    );\n\n    canvas.toBlob(\n      (blob) => {\n        if (!blob) {\n          //reject(new Error('Canvas is empty'));\n          console.error(\"Canvas is empty\");\n          return;\n        }\n\n        setBlob(blob);\n      },\n      \"image/jpeg\",\n      1\n    );\n  }\n\n  return (\n    <Dialog onClose={() => {}} open={open}>\n      <Box>\n        <DialogTitle\n          style={{ display: \"flex\", justifyContent: \"space-between\" }}\n        >\n          Change Image\n          <IconButton\n            onClick={() => {\n              setImgSrc(\"\");\n              setOpen(false);\n            }}\n          >\n            <CloseIcon />\n          </IconButton>\n        </DialogTitle>\n        <Box sx={{ typography: \"body1\", padding: 1 }}>\n          <Box style={{ width: \"400px\" }}>\n            {!imgSrc && (\n              <Box\n                style={{\n                  height: \"200px\",\n                  display: \"flex\",\n                  justifyContent: \"center\",\n                  alignItems: \"center\",\n                }}\n              >\n                <input\n                  type=\"file\"\n                  ref={fileRef}\n                  style={{ display: \"none\" }}\n                  accept=\"image/*\"\n                  onChange={onSelectFile}\n                />\n                <Button onClick={() => fileRef.current.click()}>Upload</Button>\n              </Box>\n            )}\n            {!!imgSrc && (\n              <Box>\n                <ReactCrop\n                  crop={crop}\n                  onChange={(_, percentCrop) => setCrop(percentCrop)}\n                  onComplete={onCropComplete}\n                  minWidth={100}\n                  minHeight={100}\n                >\n                  <img\n                    style={{ width: \"400px\", height: \"auto\" }}\n                    ref={imgRef}\n                    alt=\"Crop me\"\n                    src={imgSrc}\n                    onLoad={onImageLoad}\n                  />\n                </ReactCrop>\n                <Box style={{ display: \"flex\" }}>\n                  <Button onClick={onSave} style={{ marginLeft: \"auto\" }}>\n                    Save\n                  </Button>\n                </Box>\n              </Box>\n            )}\n          </Box>\n        </Box>\n      </Box>\n    </Dialog>\n  );\n}\n","import React, { useEffect, useState } from \"react\";\nimport Dialog from \"@mui/material/Dialog\";\nimport DialogTitle from \"@mui/material/DialogTitle\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport { Button, Tooltip } from \"@mui/material\";\nimport { useFormik } from \"formik\";\nimport TextField from \"@mui/material/TextField\";\nimport { useStoreState } from \"../../store\";\nimport LoadingButton from \"@mui/lab/LoadingButton\";\nimport { httpWithAuth } from \"../../http\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Checkbox from \"@mui/material/Checkbox\";\nimport ChageImage from \"./ChangeImage\";\nimport defUserImage from \"../../assets/images/def-ava.png\";\n\ntype TProps = {\n  open: boolean;\n  setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n  user: any;\n};\n\nexport default function EditProfileModal({ open, setOpen, user }: TProps) {\n  const [change, setChange] = useState(false);\n  const [loading, setLoading] = useState(false);\n  const setUser = useStoreState((state) => state.setUser);\n\n  const formik = useFormik({\n    initialValues: {\n      firstName: user.firstName,\n      lastName: user.lastName,\n      description: user.description ? user.description : \"\",\n      isProfileOpen: user.isProfileOpen,\n      isAssetsOpen: user.isAssetsOpen,\n    },\n    validate: (values) => {\n      const errors: Record<string, string> = {};\n\n      if (!values.firstName) {\n        errors.firstName = \"Required\";\n      }\n\n      if (!values.lastName) {\n        errors.lastName = \"Required\";\n      }\n\n      return errors;\n    },\n    onSubmit: (values) => {\n      const fd = new FormData();\n      fd.append(\"firstName\", values.firstName);\n      fd.append(\"lastName\", values.lastName);\n\n      if (values.description) {\n        fd.append(\"description\", values.description);\n      }\n\n      fd.append(\"isProfileOpen\", values.isProfileOpen);\n      fd.append(\"isAssetsOpen\", values.isAssetsOpen);\n      setLoading(true);\n      httpWithAuth()\n        .put(\"/users\", fd)\n        .then((response) => {\n          const respUser = response.data.user;\n          setUser({\n            ...user,\n            firstName: respUser.firstName,\n            lastName: respUser.lastName,\n            description: respUser.description,\n            isProfileOpen: respUser.isProfileOpen,\n            isAssetsOpen: respUser.isAssetsOpen,\n          });\n          setOpen(false);\n        })\n        .finally(() => setLoading(false));\n    },\n  });\n\n  return (\n    <Dialog onClose={() => {}} open={open}>\n      <Box>\n        <DialogTitle\n          style={{ display: \"flex\", justifyContent: \"space-between\" }}\n        >\n          Edit Profile\n          <IconButton onClick={() => setOpen(false)}>\n            <CloseIcon />\n          </IconButton>\n        </DialogTitle>\n        <Box sx={{ width: \"100%\", typography: \"body1\", padding: 1 }}>\n          <Box style={{ display: \"flex\" }}>\n            <Box\n              sx={{ marginRight: \"10px\" }}\n              style={{\n                display: \"flex\",\n                flexDirection: \"column\",\n                cursor: \"pointer\",\n              }}\n            >\n              <div onClick={() => setChange(true)}>\n                <img\n                  style={{ width: \"150px\", borderRadius: \"10px\" }}\n                  alt=\"\"\n                  src={user.profileImage ? user.profileImage : defUserImage}\n                />\n              </div>\n            </Box>\n            <Box>\n              <form\n                style={{ display: \"flex\", flexDirection: \"column\" }}\n                onSubmit={formik.handleSubmit}\n              >\n                <TextField\n                  margin=\"dense\"\n                  label=\"First Name\"\n                  name=\"firstName\"\n                  variant=\"standard\"\n                  error={\n                    formik.touched.firstName && formik.errors.firstName\n                      ? true\n                      : false\n                  }\n                  helperText={\n                    formik.touched.firstName && formik.errors.firstName\n                      ? (formik.errors.firstName as string)\n                      : \"\"\n                  }\n                  onChange={formik.handleChange}\n                  onBlur={formik.handleBlur}\n                  value={formik.values.firstName}\n                />\n                <TextField\n                  margin=\"dense\"\n                  label=\"Last Name\"\n                  name=\"lastName\"\n                  variant=\"standard\"\n                  error={\n                    formik.touched.lastName && formik.errors.lastName\n                      ? true\n                      : false\n                  }\n                  helperText={\n                    formik.touched.lastName && formik.errors.lastName\n                      ? (formik.errors.lastName as string)\n                      : \"\"\n                  }\n                  onChange={formik.handleChange}\n                  onBlur={formik.handleBlur}\n                  value={formik.values.lastName}\n                />\n                <TextField\n                  margin=\"dense\"\n                  label=\"Profile Description\"\n                  name=\"description\"\n                  variant=\"standard\"\n                  onChange={formik.handleChange}\n                  onBlur={formik.handleBlur}\n                  value={formik.values.description}\n                />\n                <Tooltip\n                  placement={\"top\"}\n                  title={\n                    \"When enabled, your profile and documents will be visible by all visitors. When disabled, your profile will only be seen by those who received a direct sharing link from you.\"\n                  }\n                >\n                  <FormControlLabel\n                    checked={formik.values.isProfileOpen}\n                    name=\"isProfileOpen\"\n                    control={\n                      <Checkbox\n                        onChange={(e) => {\n                          formik.setFieldValue(\n                            \"isProfileOpen\",\n                            e.target.checked\n                          );\n                        }}\n                      />\n                    }\n                    label=\"Profile is public\"\n                    labelPlacement=\"end\"\n                  />\n                </Tooltip>\n                <Tooltip\n                  placement={\"bottom\"}\n                  title={\n                    \"When this is enabled, all of your documents will be visible to those who have access to your profile. When this is disabled, you will need to share your documents individually so others can see them.\"\n                  }\n                >\n                  <FormControlLabel\n                    checked={formik.values.isAssetsOpen || formik.values.isProfileOpen}\n                    name=\"isAssetsOpen\"\n                    control={\n                      <Checkbox\n                        disabled={formik.values.isProfileOpen}\n                        onChange={(e) => {\n                          formik.setFieldValue(\n                            \"isAssetsOpen\",\n                            e.target.checked\n                          );\n                        }}\n                      />\n                    }\n                    label=\"Documents are public\"\n                    labelPlacement=\"end\"\n                  />\n                </Tooltip>\n                <LoadingButton\n                  type=\"submit\"\n                  loading={loading}\n                  variant=\"contained\"\n                >\n                  Save\n                </LoadingButton>\n              </form>\n            </Box>\n          </Box>\n        </Box>\n      </Box>\n      {change && <ChageImage open={change} setOpen={setChange} />}\n    </Dialog>\n  );\n}\n","import React, { useState } from \"react\";\nimport Container from \"@mui/material/Container\";\nimport Card from \"@mui/material/Card\";\nimport Box from \"@mui/material/Box\";\nimport { TProfile } from \"./types\";\nimport defUserImage from \"../../assets/images/def-ava.png\";\nimport { useStoreState } from \"../../store\";\nimport EditProfileModal from \"./EditProfileModal\";\nimport { Button, IconButton } from \"@mui/material\";\nimport { createPrivateChat } from \"../../helpers/chat/createPrivateChat\";\nimport xmpp, { walletToUsername } from \"../../xmpp\";\nimport { useHistory } from \"react-router-dom\";\nimport { CONFERENCEDOMAIN } from \"../../constants\";\nimport { generateProfileLink } from \"../../utils\";\nimport QrCodeIcon from \"@mui/icons-material/QrCode\";\nimport { QrModal } from \"./QrModal\";\n\ntype TProps = {\n  profile?: TProfile;\n  walletAddress?: string;\n};\n\nexport default function UserCard({ profile, walletAddress }: TProps) {\n  const [edit, setEdit] = useState(false);\n  const user = useStoreState((state) => state.user);\n  const [showQrModal, setShowQrModal] = useState(false);\n\n  const history = useHistory();\n  const openDirectChat = () => {\n    createPrivateChat(\n      user.walletAddress,\n      walletAddress,\n      user.firstName,\n      profile.firstName,\n    )\n      .then((result) => {\n        if (result.isNewRoom) {\n          const temporaryRoomData = {\n            jid: result.roomJid,\n            name: result.roomName,\n            room_background: \"none\",\n            room_thumbnail: \"none\",\n            users_cnt: \"2\",\n            unreadMessages: 0,\n            composing: \"\",\n            toUpdate: true,\n            description: \"\",\n          };\n          useStoreState.getState().setNewUserChatRoom(temporaryRoomData);\n          history.push(\"/chat/\" + result.roomJid);\n        } else {\n          history.push(\"/chat/\" + result.roomJid);\n        }\n      })\n      .catch((error) => {\n        console.log(\"openPrivateRoom Error: \", error);\n      });\n  };\n  if (profile) {\n    return (\n      <Box style={{ marginTop: \"10px\", marginRight: \"10px\" }}>\n        <Card\n          sx={{\n            display: \"flex\",\n            padding: \"10px\",\n            flexDirection: \"column\",\n            alignItems: \"center\",\n            width: \"100%\",\n          }}\n        >\n          <Box sx={{ marginRight: \"10px\" }}>\n            {!!profile.firstName && (\n              <img\n                style={{ width: \"150px\", borderRadius: \"10px\" }}\n                alt=\"\"\n                src={profile.profileImage || defUserImage}\n              />\n            )}\n          </Box>\n          <Box>\n            <Box sx={{ fontWeight: \"bold\" }}>\n              {profile?.firstName} {profile?.lastName}\n            </Box>\n            {profile?.description && (\n              <Box>Description: {profile?.description}</Box>\n            )}\n            {!!user.walletAddress && (\n              <Button onClick={openDirectChat} variant=\"contained\" size=\"small\">\n                Direct message\n              </Button>\n            )}\n          </Box>\n        </Card>\n      </Box>\n    );\n  }\n  return (\n    <Box style={{ marginTop: \"10px\", marginRight: \"10px\" }}>\n      <Card\n        sx={{\n          display: \"flex\",\n          padding: \"10px\",\n          flexDirection: \"column\",\n          alignItems: \"center\",\n          width: \"100%\",\n        }}\n      >\n        <Box sx={{ marginRight: \"10px\" }}>\n          <img\n            style={{ width: \"150px\", borderRadius: \"10px\" }}\n            alt=\"\"\n            src={user.profileImage || defUserImage}\n          />\n        </Box>\n        <Box>\n          {!!user.firstName && (\n            <>\n              <Box\n                sx={{\n                  fontWeight: \"bold\",\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  justifyContent: \"space-between\",\n                }}\n              >\n                {user?.firstName} {user?.lastName}\n                <IconButton\n                  sx={{ color: \"black\" }}\n                  onClick={() => setShowQrModal(true)}\n                >\n                  <QrCodeIcon />\n                </IconButton>\n              </Box>\n              {user?.description && <Box>Description: {user?.description}</Box>}\n            </>\n          )}\n        </Box>\n\n        {user.firstName && (\n          <Button\n            onClick={(e) => {\n              setEdit(true);\n            }}\n          >\n            Edit\n          </Button>\n        )}\n      </Card>\n      {edit && <EditProfileModal open={edit} setOpen={setEdit} user={user} />}\n      <QrModal\n        open={showQrModal}\n        link={generateProfileLink({\n          firstName: user.firstName,\n          lastName: user.lastName,\n          walletAddress: user.walletAddress,\n          xmppId: walletToUsername(user.walletAddress) + CONFERENCEDOMAIN,\n        })}\n        onClose={() => setShowQrModal(false)}\n      />\n    </Box>\n  );\n}\n","import React from \"react\";\n\nimport { TBalance } from \"../../store\";\nimport {\n  Avatar,\n  Chip,\n  List,\n  ListItem,\n  ListItemAvatar,\n  ListItemButton,\n  ListItemText,\n  useTheme,\n  Box,\n} from \"@mui/material\";\nimport { produceNfmtItems } from \"../../utils\";\nimport { NFMT_TRAITS } from \"../../constants\";\nimport { useHistory } from \"react-router\";\n\nconst NftItem = ({\n  item,\n  walletAddress,\n}: {\n  item: TBalance;\n  walletAddress: string;\n}) => {\n  const theme = useTheme();\n  const history = useHistory();\n  const onItemClick = () => {\n    history.push({\n      pathname: \"/provenance\",\n      state: { nftItem: item, walletAddress },\n    });\n  };\n  return (\n    <ListItem key={item.nftId}>\n      <ListItemButton onClick={onItemClick}>\n        <ListItemAvatar>\n          <Avatar\n            style={{ backgroundColor: theme.palette.primary.main }}\n            src={item.imagePreview}\n          />\n        </ListItemAvatar>\n        <ListItemText primary={item.tokenName} />\n        <Box\n          sx={{\n            display: \"flex\",\n            justifyContent: \"center\",\n            alignItems: \"center\",\n          }}\n        >\n          <span style={{ textAlign: \"left\", width: 50 }}>\n            {item.balance}/{item.total}\n          </span>\n        </Box>\n      </ListItemButton>\n    </ListItem>\n  );\n};\nconst NfmtItem = ({\n  item,\n  walletAddress,\n}: {\n  item: TBalance;\n  walletAddress: string;\n}) => {\n  const theme = useTheme();\n  const history = useHistory();\n  const onItemClick = () => {\n    history.push({\n      pathname: \"/provenance\",\n      state: { nftItem: item, walletAddress },\n    });\n  };\n  return (\n    <ListItem key={item.nftId}>\n      <ListItemButton onClick={onItemClick}>\n        <ListItemAvatar>\n          <Avatar\n            style={{ backgroundColor: theme.palette.primary.main }}\n            src={item.nftFileUrl}\n          />\n        </ListItemAvatar>\n        <ListItemText primary={item.tokenName} />\n        <Box\n          sx={{\n            display: \"flex\",\n            justifyContent: \"flex-end\",\n            alignItems: \"center\",\n          }}\n        >\n          <Box\n            sx={{\n              // marginRight: \"10px\",\n              display: \"flex\",\n              justifyContent: \"flex-end\",\n              alignItems: \"center\",\n            }}\n          >\n            {item.traits.map((trait) => {\n              if (NFMT_TRAITS[trait]) {\n                return (\n                  <Chip\n                    sx={{\n                      backgroundColor: NFMT_TRAITS[trait].color,\n                      marginRight: \"5px\",\n                    }}\n                    label={trait}\n                    key={trait}\n                  />\n                );\n              } else {\n                return null;\n              }\n            })}\n          </Box>\n          <span style={{ textAlign: \"left\", width: 50 }}>\n            {item.balance}/{item.total}\n          </span>\n        </Box>\n      </ListItemButton>\n    </ListItem>\n  );\n};\n\nexport default function ItemsTable({\n  balance,\n  walletAddress,\n}: {\n  balance: TBalance[];\n  walletAddress: string;\n}) {\n  const nftItems = balance.filter((item) => item.tokenType === \"NFT\");\n  const nfmtItems = produceNfmtItems(balance);\n\n  console.log({ nfmtItems });\n  return (\n    <List sx={{ width: \"100%\", bgcolor: \"background.paper\" }}>\n      {nftItems.map((item, i) => {\n        return (\n          <NftItem walletAddress={walletAddress} item={item} key={item.nftId} />\n        );\n      })}\n      {nfmtItems.map((item, i) => {\n        return (\n          <NfmtItem\n            walletAddress={walletAddress}\n            item={item}\n            key={item.nftId + i}\n          />\n        );\n      })}\n    </List>\n  );\n}\n","import * as React from \"react\";\n\nimport { Box } from \"@mui/system\";\nimport * as http from \"../../http\";\n\nimport QrCodeIcon from \"@mui/icons-material/QrCode\";\nimport {\n  Avatar,\n  Chip,\n  IconButton,\n  List,\n  ListItem,\n  ListItemAvatar,\n  ListItemButton,\n  ListItemText,\n  useTheme,\n} from \"@mui/material\";\nimport { format } from \"date-fns\";\nimport { useHistory } from \"react-router\";\n\nconst DocumentItem = ({\n  item,\n  walletAddress,\n}: {\n  item: http.IDocument;\n  walletAddress: string;\n}) => {\n  const theme = useTheme();\n  const history = useHistory();\n  const onItemClick = () => {\n    history.push({\n      pathname: \"/provenance\",\n      state: { nftItem: item, walletAddress },\n    });\n  };\n  return (\n    <ListItem key={item._id}>\n      <ListItemButton onClick={onItemClick}>\n        <ListItemAvatar>\n          <Avatar\n            style={{ backgroundColor: theme.palette.primary.main }}\n            src={item?.file?.locationPreview || item?.location}\n          />\n        </ListItemAvatar>\n        <ListItemText\n          primary={item.documentName}\n          secondary={format(new Date(item.createdAt), \"pp PP\")}\n        />\n        <Box\n          sx={{\n            display: \"flex\",\n            justifyContent: \"center\",\n            alignItems: \"center\",\n          }}\n        >\n          <IconButton sx={{ color: \"black\" }}>\n            <QrCodeIcon />\n          </IconButton>\n        </Box>\n      </ListItemButton>\n    </ListItem>\n  );\n};\n\nexport default function DocumentsTable({\n  documents,\n  walletAddress,\n}: {\n  documents: http.IDocument[];\n  walletAddress: string;\n}) {\n  return (\n    <List sx={{ width: \"100%\", bgcolor: \"background.paper\" }}>\n      {documents.map((item) => {\n        return (\n          <DocumentItem\n            walletAddress={walletAddress}\n            item={item}\n            key={item._id}\n          />\n        );\n      })}\n    </List>\n  );\n}\n","import { FirebaseApp, initializeApp } from \"firebase/app\";\nimport { getMessaging, getToken as _getToken } from \"firebase/messaging\";\nimport { getAnalytics } from \"firebase/analytics\";\n\nconst firebaseConfig = {\n  apiKey: \"AIzaSyDQdkvvxKKx4-WrjLQoYf08GFARgi_qO4g\",\n  authDomain: \"ethora-668e9.firebaseapp.com\",\n  projectId: \"ethora-668e9\",\n  storageBucket: \"ethora-668e9.appspot.com\",\n  messagingSenderId: \"972933470054\",\n  appId: \"1:972933470054:web:d4682e76ef02fd9b9cdaa7\",\n  measurementId: \"G-WHM7XRZ4C8\",\n};\n\nexport const firebaseApp = initializeApp(firebaseConfig);\nexport const analytics = getAnalytics(firebaseApp);\n\nexport function getToken() {\n  const messaging = getMessaging(firebaseApp);\n  return _getToken(messaging, {\n    vapidKey:\n      \"BCzcT7yzF8F188maOgPAISXqWCTDavGzWW0SWLOBx9vX2mYFjBXMaTMBDR3HXlmXOduyE253sblF9HP6aEBbx38\",\n  });\n}\n","import React, { useState, useEffect } from \"react\";\nimport Container from \"@mui/material/Container\";\nimport Box from \"@mui/material/Box\";\nimport { ExplorerRespose, ITransaction, TProfile } from \"./types\";\nimport UserCard from \"./UserCard\";\nimport { getTransactions, getBalance } from \"../../http\";\nimport { useStoreState } from \"../../store\";\nimport ItemsTable from \"./ItemsTable\";\nimport { Transactions } from \"../Transactions/Transactions\";\nimport { Typography } from \"@mui/material\";\nimport DocumentsTable from \"./DocumentsTable\";\nimport { FullPageSpinner } from \"../../components/FullPageSpinner\";\nimport { filterNftBalances } from \"../../utils\";\nimport { getToken } from \"../../firebase\";\n\nconst styles = {\n  craeteNewLink: {\n    textDecoration: \"none\",\n    color: \"inherit\",\n    fontSize: \"14px\",\n  },\n};\n\nexport function MyProfile() {\n  const [loading, setLoading] = useState(false);\n  const [transactions, setTransactions] =\n    useState<ExplorerRespose<ITransaction[]>>();\n  const user = useStoreState((store) => store.user);\n  const items = useStoreState((state) => state.balance);\n  const documents = useStoreState((state) => state.documents);\n  const setBalance = useStoreState((state) => state.setBalance);\n\n  useEffect(() => {\n    console.log(\"MyProfile init\");\n    setLoading(true);\n    getBalance(user.walletAddress).then((resp) => {\n      setBalance(resp.data.balance);\n    });\n    getTransactions(user.walletAddress)\n      .then((result) => {\n        setTransactions(result.data);\n      })\n      .finally(() => setLoading(false));\n\n    if (Notification.permission === \"denied\") {\n      alert(\"Please enable notifications for this app in your browser\");\n    } else {\n      if (Notification.permission !== \"granted\") {\n        Notification.requestPermission().then((permission) => {\n          if (permission === \"granted\") {\n            console.log(\"geting token\");\n            getToken().then((token) => {\n              console.log(\"my fb token \", token);\n            });\n            return;\n          }\n        });\n      } else {\n        console.log(\"geting token\");\n        getToken().then((token) => {\n          console.log(\"my fb token \", token);\n        });\n        return;\n      }\n    }\n  }, []);\n\n  if (loading) return <FullPageSpinner />;\n  return (\n    <Container maxWidth=\"xl\" style={{ height: \"calc(100vh - 80px)\" }}>\n      <Box sx={{ margin: \"auto\", width: \"200px\" }}>\n        <UserCard />\n      </Box>\n      <Typography\n        variant=\"h6\"\n        style={{\n          margin: \"16px\",\n          display: \"flex\",\n          justifyContent: \"space-between\",\n          alignItems: \"center\",\n        }}\n      >\n        <span>Items</span>\n      </Typography>\n      <ItemsTable\n        balance={items.filter(filterNftBalances)}\n        walletAddress={user.walletAddress}\n      />\n      {!!documents.length && (\n        <>\n          <Typography\n            variant=\"h6\"\n            style={{\n              margin: \"16px\",\n              display: \"flex\",\n              justifyContent: \"space-between\",\n              alignItems: \"center\",\n            }}\n          >\n            <span>Documents</span>\n          </Typography>\n          <DocumentsTable\n            walletAddress={user.walletAddress}\n            documents={documents}\n          />\n        </>\n      )}\n\n      {!!transactions && (\n        <Box>\n          <Typography variant=\"h6\" style={{ margin: \"16px\" }}>\n            Transactions\n          </Typography>\n          <Transactions transactions={transactions.items} />\n        </Box>\n      )}\n    </Container>\n  );\n}\n","import React, { useState, useEffect } from \"react\";\nimport Container from \"@mui/material/Container\";\nimport Box from \"@mui/material/Box\";\nimport { ExplorerRespose, ITransaction, TProfile } from \"./types\";\nimport UserCard from \"./UserCard\";\nimport {\n  getPublicProfile,\n  getTransactions,\n  getBalance,\n  IDocument,\n} from \"../../http\";\nimport { Transactions } from \"../Transactions/Transactions\";\nimport { FullPageSpinner } from \"../../components/FullPageSpinner\";\nimport ItemsTable from \"./ItemsTable\";\nimport { filterNftBalances } from \"../../utils\";\nimport { TBalance } from \"../../store\";\nimport { Typography } from \"@mui/material\";\nimport DocumentsTable from \"./DocumentsTable\";\nimport * as http from \"../../http\";\n\ntype TProps = {\n  walletAddress: string;\n};\n\nexport function OtherProfile(props: TProps) {\n  const [loading, setLoading] = useState(true);\n  const [profile, setProfile] = useState<TProfile>();\n  const [transactions, setTransactions] =\n    useState<ExplorerRespose<ITransaction[]>>();\n  const [balances, setBalances] = useState<TBalance[]>([]);\n  const [documents, setDocuments] = useState<IDocument[]>([]);\n  const getDocuments = async (documents: IDocument[]) => {\n    const mappedDocuments = [];\n    for (const item of documents) {\n      try {\n        // const { data: file } = await http\n        //   .httpWithAuth()\n        //   .get<http.IFile>(\"/files/\" + item.files[0]);\n        // item.file = file;\n        item.location = item.locations[0]\n        mappedDocuments.push(item);\n      } catch (error) {\n        console.log( item.files[0],\"sdjfkls\");\n      }\n    }\n    setDocuments(mappedDocuments);\n  };\n  useEffect(() => {\n    setLoading(true);\n    getPublicProfile(props.walletAddress).then((result) => {\n      setProfile(result.data);\n      setBalances(result.data.balances.balance);\n      getDocuments(result.data.documents);\n    });\n    // .finally(() => setLoading(false));\n    setLoading(false);\n    getTransactions(props.walletAddress).then((result) => {\n      setTransactions(result.data);\n    });\n  }, []);\n\n  if (loading) {\n    return <FullPageSpinner />;\n  }\n  return (\n    <Container maxWidth=\"xl\" style={{ height: \"calc(100vh - 80px)\" }}>\n      <Box>\n        {!!profile?.firstName && (\n          <Box sx={{ width: \"200px\", margin: \"auto\", padding: \"10px\" }}>\n            <UserCard profile={profile} walletAddress={props.walletAddress} />\n          </Box>\n        )}\n        {!!balances.filter(filterNftBalances).length && (\n          <>\n            <Typography variant=\"h6\" style={{ margin: \"16px\" }}>\n              Items\n            </Typography>\n            <ItemsTable\n              balance={balances.filter(filterNftBalances)}\n              walletAddress={props.walletAddress}\n            />\n          </>\n        )}\n      </Box>\n      {!!documents.length && (\n        <>\n          <Typography variant=\"h6\" style={{ margin: \"16px\" }}>\n            Documents\n          </Typography>\n          <DocumentsTable\n            walletAddress={props.walletAddress}\n            documents={documents}\n          />\n        </>\n      )}\n      {!!transactions && (\n        <>\n          <Typography variant=\"h6\" style={{ margin: \"16px\" }}>\n            Transactions\n          </Typography>\n          <Transactions transactions={transactions.items} />\n        </>\n      )}\n      {/* <DocumentsTable walletAddress={props.walletAddress} /> */}\n    </Container>\n  );\n}\n","import React from \"react\";\nimport { useStoreState } from \"../../store\";\nimport { useParams } from \"react-router-dom\";\nimport { MyProfile } from \"./MyProfile\";\nimport { OtherProfile } from \"./OtherProfile\";\n\nexport default function Profile() {\n  const user = useStoreState((state) => state.user);\n  const params: { wallet: string } = useParams();\n\n  if (user.walletAddress === params.wallet) {\n    return <MyProfile />;\n  } else {\n    return <OtherProfile walletAddress={params.wallet} />;\n  }\n}\n","import {\n  Avatar,\n  Box,\n  Collapse,\n  List,\n  ListItem,\n  ListItemAvatar,\n  ListItemButton,\n  ListItemText,\n  useTheme,\n} from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { ITransaction } from \"../Profile/types\";\n\nimport coin from \"../../assets/images/coin.png\";\nimport ArrowDownwardIcon from \"@mui/icons-material/ArrowDownward\";\nimport ArrowUpwardIcon from \"@mui/icons-material/ArrowUpward\";\nimport { format } from \"date-fns\";\nimport { useStoreState } from \"../../store\";\nimport { useHistory } from \"react-router\";\n\nexport interface ITransactions {\n  transactions: ITransaction[];\n}\n\nconst TransactionItems: React.FC<{ item: ITransaction }> = ({ item }) => {\n  const theme = useTheme();\n  const walletAddress = useStoreState((state) => state.user.walletAddress);\n  const isSender = item.from === walletAddress;\n  const [expanded, setExpanded] = useState(false);\n  const history = useHistory();\n\n  if (!item.fromFirstName) {\n    return null;\n  }\n\n  return (\n    <>\n      <ListItem key={item.transactionHash}>\n        <ListItemButton onClick={() => setExpanded((prev) => !prev)}>\n          <ListItemAvatar>\n            <Avatar style={{ backgroundColor: theme.palette.primary.main }}>\n              <p>{item.fromFirstName.slice(0, 2).toUpperCase()}</p>\n            </Avatar>\n          </ListItemAvatar>\n          <ListItemText\n            primary={item.fromFirstName + \" \" + item.fromLastName}\n            secondary={format(new Date(item.timestamp), \"pp PP\")}\n          />\n          <Box\n            sx={{\n              display: \"flex\",\n              justifyContent: \"center\",\n              alignItems: \"center\",\n            }}\n          >\n            {isSender ? (\n              <ArrowUpwardIcon fontSize={\"small\"} color={\"error\"} />\n            ) : (\n              <ArrowDownwardIcon color={\"success\"} fontSize={\"small\"} />\n            )}\n            <span>{item.value}</span>\n            <img src={coin} style={{ width: 20, height: 20 }} alt={\"coin\"} />\n          </Box>\n        </ListItemButton>\n      </ListItem>\n\n      <Collapse in={expanded} timeout=\"auto\" unmountOnExit>\n        <List dense>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Block Number:</span>{\" \"}\n            {item.blockNumber}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>From:</span>{\" \"}\n            <span>\n              <span\n                onClick={() => history.push(\"/explorer/address/\" + item.from)}\n                style={{ textDecoration: \"underline\", cursor: \"pointer\" }}\n              >\n                {item.from}\n              </span>\n            </span>\n          </ListItem>{\" \"}\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>To:</span>\n            <span\n              onClick={() => history.push(\"/explorer/address/\" + item.to)}\n              style={{ textDecoration: \"underline\", cursor: \"pointer\" }}\n            >\n              {item.to}\n            </span>\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Sender First Name:</span>\n            {item.fromFirstName}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Sender Last Name:</span>\n            {item.fromLastName}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Timestamp:</span>{\" \"}\n            {format(new Date(item.timestamp), \"pp PP\")}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Receiver First Name:</span>\n            {item.toFirstName}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Receiver Last Name:</span>\n            {item.toLastName}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Token Name:</span>\n            {item.tokenName}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Transaction Index:</span>\n            {item.transactionIndex}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Type:</span>\n            {item.type}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Value:</span>\n            {item.value}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Transaction Hash:</span>\n            <span\n              onClick={() =>\n                history.push(\"/explorer/transactions/\" + item.transactionHash)\n              }\n              style={{ textDecoration: \"underline\", cursor: \"pointer\" }}\n            >\n              {item.transactionHash}\n            </span>\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>Token Id:</span>\n            {item.tokenId}\n          </ListItem>\n          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>\n            <span style={{ fontWeight: \"bold\" }}>_id:</span>\n            {item._id}\n          </ListItem>\n        </List>\n      </Collapse>\n    </>\n  );\n};\n\nexport const Transactions: React.FC<ITransactions> = ({ transactions }) => {\n  const theme = useTheme();\n  const walletAddress = useStoreState((state) => state.user.walletAddress);\n  console.log({ transactions });\n  return (\n    <List sx={{ width: \"100%\", bgcolor: \"background.paper\" }}>\n      {transactions.map((item) => {\n        return <TransactionItems item={item} key={item._id} />;\n      })}\n    </List>\n  );\n};\n"],"names":["underscoreManipulation","str","replace","toLowerCase","createPrivateChat","myWalletAddress","otherUserWalletAddress","myFirstName","otherFirstName","userJID","combinedWalletAddress","sort","join","roomJid","CONFERENCEDOMAIN","combinedUsersName","currentChatRooms","useStoreState","userChatRooms","isNewRoom","filter","el","jid","length","xmpp","roomName","setTimeout","QrModal","title","open","link","onClose","maxWidth","sx","padding","paddingTop","size","style","height","width","value","viewBox","boxShadow","borderRadius","display","justifyContent","alignItems","pl","my","truncateString","variant","marginLeft","onClick","navigator","clipboard","writeText","color","position","top","right","fontSize","ChangeImage","setOpen","user","state","setUser","fileRef","useRef","useState","imgSrc","setImgSrc","imgRef","crop","setCrop","blob","setBlob","Dialog","Box","DialogTitle","IconButton","Close","typography","type","ref","accept","onChange","e","target","files","reader","FileReader","addEventListener","result","toString","readAsDataURL","Button","current","click","_","percentCrop","onComplete","canvas","document","createElement","pixelRatio","window","devicePixelRatio","scaleX","naturalWidth","scaleY","naturalHeight","ctx","getContext","setTransform","imageSmoothingQuality","drawImage","x","y","toBlob","console","error","minWidth","minHeight","alt","src","onLoad","currentTarget","mediaWidth","mediaHeight","aspect","centerCrop","makeAspectCrop","unit","centerAspectCrop","form","FormData","append","http","then","response","profileImage","data","catch","log","EditProfileModal","change","setChange","loading","setLoading","formik","useFormik","initialValues","firstName","lastName","description","isProfileOpen","isAssetsOpen","validate","values","errors","onSubmit","fd","httpWithAuth","put","respUser","finally","marginRight","flexDirection","cursor","defUserImage","handleSubmit","TextField","margin","label","name","touched","helperText","handleChange","onBlur","handleBlur","Tooltip","placement","FormControlLabel","checked","control","Checkbox","setFieldValue","labelPlacement","disabled","LoadingButton","UserCard","profile","walletAddress","edit","setEdit","showQrModal","setShowQrModal","history","useHistory","marginTop","Card","fontWeight","temporaryRoomData","room_background","room_thumbnail","users_cnt","unreadMessages","composing","toUpdate","setNewUserChatRoom","push","QrCode","generateProfileLink","xmppId","walletToUsername","NftItem","item","theme","useTheme","ListItem","ListItemButton","pathname","nftItem","ListItemAvatar","Avatar","backgroundColor","palette","primary","main","imagePreview","ListItemText","tokenName","textAlign","balance","total","nftId","NfmtItem","nftFileUrl","traits","map","trait","NFMT_TRAITS","Chip","ItemsTable","nftItems","tokenType","nfmtItems","produceNfmtItems","List","bgcolor","i","DocumentItem","file","locationPreview","location","documentName","secondary","format","Date","createdAt","_id","DocumentsTable","documents","firebaseApp","initializeApp","apiKey","authDomain","projectId","storageBucket","messagingSenderId","appId","measurementId","getAnalytics","getToken","messaging","getMessaging","_getToken","vapidKey","MyProfile","transactions","setTransactions","store","items","setBalance","useEffect","getBalance","resp","getTransactions","Notification","permission","alert","token","requestPermission","FullPageSpinner","Container","Typography","filterNftBalances","Transactions","OtherProfile","props","setProfile","balances","setBalances","setDocuments","getDocuments","mappedDocuments","locations","getPublicProfile","Profile","params","useParams","wallet","TransactionItems","isSender","from","expanded","setExpanded","fromFirstName","prev","slice","toUpperCase","fromLastName","timestamp","coin","transactionHash","in","timeout","unmountOnExit","dense","disablePadding","disableGutters","paddingLeft","blockNumber","textDecoration","to","toFirstName","toLastName","transactionIndex","tokenId"],"sourceRoot":""}