浏览代码

remove message kit pod files

cyberta 5 年之前
父节点
当前提交
4d2c5ae87f
共有 98 个文件被更改,包括 0 次插入7040 次删除
  1. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full.png
  2. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full@2x.png
  3. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full@3x.png
  4. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v1.png
  5. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v1@2x.png
  6. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v1@3x.png
  7. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v2.png
  8. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v2@2x.png
  9. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v2@3x.png
  10. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined.png
  11. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined@2x.png
  12. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined@3x.png
  13. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v1.png
  14. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v1@2x.png
  15. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v1@3x.png
  16. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v2.png
  17. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v2@2x.png
  18. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v2@3x.png
  19. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/disclouser.png
  20. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/disclouser@2x.png
  21. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/disclouser@3x.png
  22. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/pause.png
  23. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/pause@2x.png
  24. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/pause@3x.png
  25. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/play.png
  26. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/play@2x.png
  27. 二进制
      Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/play@3x.png
  28. 0 141
      Pods/MessageKit/Sources/Controllers/MessagesViewController+Keyboard.swift
  29. 0 99
      Pods/MessageKit/Sources/Controllers/MessagesViewController+Menu.swift
  30. 0 419
      Pods/MessageKit/Sources/Controllers/MessagesViewController.swift
  31. 0 43
      Pods/MessageKit/Sources/Extensions/Bundle+Extensions.swift
  32. 0 33
      Pods/MessageKit/Sources/Extensions/CGRect+Extensions.swift
  33. 0 36
      Pods/MessageKit/Sources/Extensions/NSAttributedString+Extensions.swift
  34. 0 41
      Pods/MessageKit/Sources/Extensions/UIColor+Extensions.swift
  35. 0 39
      Pods/MessageKit/Sources/Extensions/UIEdgeInsets+Extensions.swift
  36. 0 43
      Pods/MessageKit/Sources/Extensions/UIImage+Extension.swift
  37. 0 130
      Pods/MessageKit/Sources/Extensions/UIView+Extensions.swift
  38. 0 43
      Pods/MessageKit/Sources/Layout/AudioMessageSizeCalculator.swift
  39. 0 50
      Pods/MessageKit/Sources/Layout/CellSizeCalculator.swift
  40. 0 73
      Pods/MessageKit/Sources/Layout/ContactMessageSizeCalculator.swift
  41. 0 43
      Pods/MessageKit/Sources/Layout/LocationMessageSizeCalculator.swift
  42. 0 48
      Pods/MessageKit/Sources/Layout/MediaMessageSizeCalculator.swift
  43. 0 291
      Pods/MessageKit/Sources/Layout/MessageSizeCalculator.swift
  44. 0 328
      Pods/MessageKit/Sources/Layout/MessagesCollectionViewFlowLayout.swift
  45. 0 109
      Pods/MessageKit/Sources/Layout/MessagesCollectionViewLayoutAttributes.swift
  46. 0 90
      Pods/MessageKit/Sources/Layout/TextMessageSizeCalculator.swift
  47. 0 43
      Pods/MessageKit/Sources/Layout/TypingIndicatorCellSizeCalculator.swift
  48. 0 48
      Pods/MessageKit/Sources/Models/AccessoryPosition.swift
  49. 0 47
      Pods/MessageKit/Sources/Models/Avatar.swift
  50. 0 98
      Pods/MessageKit/Sources/Models/AvatarPosition.swift
  51. 0 77
      Pods/MessageKit/Sources/Models/DetectorType.swift
  52. 0 55
      Pods/MessageKit/Sources/Models/HorizontalEdgeInsets.swift
  53. 0 47
      Pods/MessageKit/Sources/Models/LabelAlignment.swift
  54. 0 64
      Pods/MessageKit/Sources/Models/LocationMessageSnapshotOptions.swift
  55. 0 72
      Pods/MessageKit/Sources/Models/MessageKind.swift
  56. 0 66
      Pods/MessageKit/Sources/Models/MessageKitDateFormatter.swift
  57. 0 38
      Pods/MessageKit/Sources/Models/MessageKitError.swift
  58. 0 151
      Pods/MessageKit/Sources/Models/MessageStyle.swift
  59. 0 81
      Pods/MessageKit/Sources/Models/NSConstraintLayoutSet.swift
  60. 0 57
      Pods/MessageKit/Sources/Models/Sender.swift
  61. 0 39
      Pods/MessageKit/Sources/Protocols/AudioItem.swift
  62. 0 41
      Pods/MessageKit/Sources/Protocols/ContactItem.swift
  63. 0 36
      Pods/MessageKit/Sources/Protocols/LocationItem.swift
  64. 0 42
      Pods/MessageKit/Sources/Protocols/MediaItem.swift
  65. 0 180
      Pods/MessageKit/Sources/Protocols/MessageCellDelegate.swift
  66. 0 99
      Pods/MessageKit/Sources/Protocols/MessageLabelDelegate.swift
  67. 0 43
      Pods/MessageKit/Sources/Protocols/MessageType.swift
  68. 0 159
      Pods/MessageKit/Sources/Protocols/MessagesDataSource.swift
  69. 0 314
      Pods/MessageKit/Sources/Protocols/MessagesDisplayDelegate.swift
  70. 0 163
      Pods/MessageKit/Sources/Protocols/MessagesLayoutDelegate.swift
  71. 0 38
      Pods/MessageKit/Sources/Protocols/SenderType.swift
  72. 0 55
      Pods/MessageKit/Sources/Supporting/MessageInputBar.swift
  73. 0 72
      Pods/MessageKit/Sources/Supporting/MessageKit+Availability.swift
  74. 0 197
      Pods/MessageKit/Sources/Views/AvatarView.swift
  75. 0 49
      Pods/MessageKit/Sources/Views/BubbleCircle.swift
  76. 0 130
      Pods/MessageKit/Sources/Views/Cells/AudioMessageCell.swift
  77. 0 142
      Pods/MessageKit/Sources/Views/Cells/ContactMessageCell.swift
  78. 0 111
      Pods/MessageKit/Sources/Views/Cells/LocationMessageCell.swift
  79. 0 84
      Pods/MessageKit/Sources/Views/Cells/MediaMessageCell.swift
  80. 0 45
      Pods/MessageKit/Sources/Views/Cells/MessageCollectionViewCell.swift
  81. 0 343
      Pods/MessageKit/Sources/Views/Cells/MessageContentCell.swift
  82. 0 101
      Pods/MessageKit/Sources/Views/Cells/TextMessageCell.swift
  83. 0 66
      Pods/MessageKit/Sources/Views/Cells/TypingIndicatorCell.swift
  84. 0 39
      Pods/MessageKit/Sources/Views/HeadersFooters/MessageReusableView.swift
  85. 0 38
      Pods/MessageKit/Sources/Views/InsetLabel.swift
  86. 0 88
      Pods/MessageKit/Sources/Views/MessageContainerView.swift
  87. 0 546
      Pods/MessageKit/Sources/Views/MessageLabel.swift
  88. 0 195
      Pods/MessageKit/Sources/Views/MessagesCollectionView.swift
  89. 0 122
      Pods/MessageKit/Sources/Views/PlayButtonView.swift
  90. 0 155
      Pods/MessageKit/Sources/Views/TypingBubble.swift
  91. 0 165
      Pods/MessageKit/Sources/Views/TypingIndicator.swift
  92. 0 26
      Pods/Target Support Files/MessageKit/MessageKit-Info.plist
  93. 0 5
      Pods/Target Support Files/MessageKit/MessageKit-dummy.m
  94. 0 12
      Pods/Target Support Files/MessageKit/MessageKit-prefix.pch
  95. 0 16
      Pods/Target Support Files/MessageKit/MessageKit-umbrella.h
  96. 0 6
      Pods/Target Support Files/MessageKit/MessageKit.modulemap
  97. 0 11
      Pods/Target Support Files/MessageKit/MessageKit.xcconfig
  98. 0 24
      Pods/Target Support Files/MessageKit/ResourceBundle-MessageKitAssets-MessageKit-Info.plist

二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full@2x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full@3x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v1.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v1@2x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v1@3x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v2.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v2@2x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_full_tail_v2@3x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined@2x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined@3x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v1.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v1@2x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v1@3x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v2.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v2@2x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/bubble_outlined_tail_v2@3x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/disclouser.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/disclouser@2x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/disclouser@3x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/pause.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/pause@2x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/pause@3x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/play.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/play@2x.png


二进制
Pods/MessageKit/Assets/MessageKitAssets.bundle/Images/play@3x.png


+ 0 - 141
Pods/MessageKit/Sources/Controllers/MessagesViewController+Keyboard.swift

@@ -1,141 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-import InputBarAccessoryView
-
-internal extension MessagesViewController {
-
-    // MARK: - Register / Unregister Observers
-
-    internal func addKeyboardObservers() {
-        NotificationCenter.default.addObserver(self, selector: #selector(MessagesViewController.handleKeyboardDidChangeState(_:)), name: UIResponder.keyboardWillChangeFrameNotification, object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(MessagesViewController.handleTextViewDidBeginEditing(_:)), name: UITextView.textDidBeginEditingNotification, object: nil)
-        NotificationCenter.default.addObserver(self, selector: #selector(MessagesViewController.adjustScrollViewTopInset), name: UIDevice.orientationDidChangeNotification, object: nil)
-    }
-
-    internal func removeKeyboardObservers() {
-        NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillChangeFrameNotification, object: nil)
-        NotificationCenter.default.removeObserver(self, name: UITextView.textDidBeginEditingNotification, object: nil)
-        NotificationCenter.default.removeObserver(self, name: UIDevice.orientationDidChangeNotification, object: nil)
-    }
-
-    // MARK: - Notification Handlers
-
-    @objc
-    private func handleTextViewDidBeginEditing(_ notification: Notification) {
-        if scrollsToBottomOnKeyboardBeginsEditing {
-            guard let inputTextView = notification.object as? InputTextView, inputTextView === messageInputBar.inputTextView else { return }
-            messagesCollectionView.scrollToBottom(animated: true)
-        }
-    }
-
-    @objc
-    private func handleKeyboardDidChangeState(_ notification: Notification) {
-        guard !isMessagesControllerBeingDismissed else { return }
-
-        guard let keyboardStartFrameInScreenCoords = notification.userInfo?[UIResponder.keyboardFrameBeginUserInfoKey] as? CGRect else { return }
-        guard !keyboardStartFrameInScreenCoords.isEmpty || UIDevice.current.userInterfaceIdiom != .pad else {
-            // WORKAROUND for what seems to be a bug in iPad's keyboard handling in iOS 11: we receive an extra spurious frame change
-            // notification when undocking the keyboard, with a zero starting frame and an incorrect end frame. The workaround is to
-            // ignore this notification.
-            return
-        }
-        
-        // Note that the check above does not exclude all notifications from an undocked keyboard, only the weird ones.
-        //
-        // We've tried following Apple's recommended approach of tracking UIKeyboardWillShow / UIKeyboardDidHide and ignoring frame
-        // change notifications while the keyboard is hidden or undocked (undocked keyboard is considered hidden by those events).
-        // Unfortunately, we do care about the difference between hidden and undocked, because we have an input bar which is at the
-        // bottom when the keyboard is hidden, and is tied to the keyboard when it's undocked.
-        //
-        // If we follow what Apple recommends and ignore notifications while the keyboard is hidden/undocked, we get an extra inset
-        // at the bottom when the undocked keyboard is visible (the inset that tries to compensate for the missing input bar).
-        // (Alternatives like setting newBottomInset to 0 or to the height of the input bar don't work either.)
-        //
-        // We could make it work by adding extra checks for the state of the keyboard and compensating accordingly, but it seems easier
-        // to simply check whether the current keyboard frame, whatever it is (even when undocked), covers the bottom of the collection
-        // view.
-        
-        guard let keyboardEndFrameInScreenCoords = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else { return }
-        let keyboardEndFrame = view.convert(keyboardEndFrameInScreenCoords, from: view.window)
-        
-        let newBottomInset = requiredScrollViewBottomInset(forKeyboardFrame: keyboardEndFrame)
-        let differenceOfBottomInset = newBottomInset - messageCollectionViewBottomInset
-        
-        if maintainPositionOnKeyboardFrameChanged && differenceOfBottomInset != 0 {
-            let contentOffset = CGPoint(x: messagesCollectionView.contentOffset.x, y: messagesCollectionView.contentOffset.y + differenceOfBottomInset)
-            messagesCollectionView.setContentOffset(contentOffset, animated: false)
-        }
-        
-        messageCollectionViewBottomInset = newBottomInset
-    }
-
-    // MARK: - Inset Computation
-
-    @objc
-    internal func adjustScrollViewTopInset() {
-        if #available(iOS 11.0, *) {
-            // No need to add to the top contentInset
-        } else {
-            let navigationBarInset = navigationController?.navigationBar.frame.height ?? 0
-            let statusBarInset: CGFloat = UIApplication.shared.isStatusBarHidden ? 0 : 20
-            let topInset = navigationBarInset + statusBarInset
-            messagesCollectionView.contentInset.top = topInset
-            messagesCollectionView.scrollIndicatorInsets.top = topInset
-        }
-    }
-
-    private func requiredScrollViewBottomInset(forKeyboardFrame keyboardFrame: CGRect) -> CGFloat {
-        // we only need to adjust for the part of the keyboard that covers (i.e. intersects) our collection view;
-        // see https://developer.apple.com/videos/play/wwdc2017/242/ for more details
-        let intersection = messagesCollectionView.frame.intersection(keyboardFrame)
-        
-        if intersection.isNull || (messagesCollectionView.frame.maxY - intersection.maxY) > 0.001 {
-            // The keyboard is hidden, is a hardware one, or is undocked and does not cover the bottom of the collection view.
-            // Note: intersection.maxY may be less than messagesCollectionView.frame.maxY when dealing with undocked keyboards.
-            return max(0, additionalBottomInset - automaticallyAddedBottomInset)
-        } else {
-            return max(0, intersection.height + additionalBottomInset - automaticallyAddedBottomInset)
-        }
-    }
-
-    internal func requiredInitialScrollViewBottomInset() -> CGFloat {
-        guard let inputAccessoryView = inputAccessoryView else { return 0 }
-        return max(0, inputAccessoryView.frame.height + additionalBottomInset - automaticallyAddedBottomInset)
-    }
-
-    /// iOS 11's UIScrollView can automatically add safe area insets to its contentInset,
-    /// which needs to be accounted for when setting the contentInset based on screen coordinates.
-    ///
-    /// - Returns: The distance automatically added to contentInset.bottom, if any.
-    private var automaticallyAddedBottomInset: CGFloat {
-        if #available(iOS 11.0, *) {
-            return messagesCollectionView.adjustedContentInset.bottom - messagesCollectionView.contentInset.bottom
-        } else {
-            return 0
-        }
-    }
-
-}

+ 0 - 99
Pods/MessageKit/Sources/Controllers/MessagesViewController+Menu.swift

@@ -1,99 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-internal extension MessagesViewController {
-
-    // MARK: - Register / Unregister Observers
-
-    internal func addMenuControllerObservers() {
-        NotificationCenter.default.addObserver(self, selector: #selector(MessagesViewController.menuControllerWillShow(_:)), name: UIMenuController.willShowMenuNotification, object: nil)
-    }
-
-    internal func removeMenuControllerObservers() {
-        NotificationCenter.default.removeObserver(self, name: UIMenuController.willShowMenuNotification, object: nil)
-    }
-
-    // MARK: - Notification Handlers
-
-    /// Show menuController and set target rect to selected bubble
-    @objc
-    private func menuControllerWillShow(_ notification: Notification) {
-
-        guard let currentMenuController = notification.object as? UIMenuController,
-            let selectedIndexPath = selectedIndexPathForMenu else { return }
-
-        NotificationCenter.default.removeObserver(self, name: UIMenuController.willShowMenuNotification, object: nil)
-        defer {
-            NotificationCenter.default.addObserver(self,
-                                                   selector: #selector(MessagesViewController.menuControllerWillShow(_:)),
-                                                   name: UIMenuController.willShowMenuNotification, object: nil)
-            selectedIndexPathForMenu = nil
-        }
-
-        currentMenuController.setMenuVisible(false, animated: false)
-
-        guard let selectedCell = messagesCollectionView.cellForItem(at: selectedIndexPath) as? MessageContentCell else { return }
-        let selectedCellMessageBubbleFrame = selectedCell.convert(selectedCell.messageContainerView.frame, to: view)
-
-        var messageInputBarFrame: CGRect = .zero
-        if let messageInputBarSuperview = messageInputBar.superview {
-            messageInputBarFrame = view.convert(messageInputBar.frame, from: messageInputBarSuperview)
-        }
-
-        var topNavigationBarFrame: CGRect = navigationBarFrame
-        if navigationBarFrame != .zero, let navigationBarSuperview = navigationController?.navigationBar.superview {
-            topNavigationBarFrame = view.convert(navigationController!.navigationBar.frame, from: navigationBarSuperview)
-        }
-
-        let menuHeight = currentMenuController.menuFrame.height
-
-        let selectedCellMessageBubblePlusMenuFrame = CGRect(selectedCellMessageBubbleFrame.origin.x, selectedCellMessageBubbleFrame.origin.y - menuHeight, selectedCellMessageBubbleFrame.size.width, selectedCellMessageBubbleFrame.size.height + 2 * menuHeight)
-
-        var targetRect: CGRect = selectedCellMessageBubbleFrame
-        currentMenuController.arrowDirection = .default
-
-        /// Message bubble intersects with navigationBar and keyboard
-        if selectedCellMessageBubblePlusMenuFrame.intersects(topNavigationBarFrame) && selectedCellMessageBubblePlusMenuFrame.intersects(messageInputBarFrame) {
-            let centerY = (selectedCellMessageBubblePlusMenuFrame.intersection(messageInputBarFrame).minY + selectedCellMessageBubblePlusMenuFrame.intersection(topNavigationBarFrame).maxY) / 2
-            targetRect = CGRect(selectedCellMessageBubblePlusMenuFrame.midX, centerY, 1, 1)
-        } /// Message bubble only intersects with navigationBar
-        else if selectedCellMessageBubblePlusMenuFrame.intersects(topNavigationBarFrame) {
-            currentMenuController.arrowDirection = .up
-        }
-
-        currentMenuController.setTargetRect(targetRect, in: view)
-        currentMenuController.setMenuVisible(true, animated: true)
-    }
-
-    // MARK: - Helpers
-
-    private var navigationBarFrame: CGRect {
-        guard let navigationController = navigationController, !navigationController.navigationBar.isHidden else {
-            return .zero
-        }
-        return navigationController.navigationBar.frame
-    }
-}

+ 0 - 419
Pods/MessageKit/Sources/Controllers/MessagesViewController.swift

@@ -1,419 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-import InputBarAccessoryView
-
-/// A subclass of `UIViewController` with a `MessagesCollectionView` object
-/// that is used to display conversation interfaces.
-open class MessagesViewController: UIViewController,
-UICollectionViewDelegateFlowLayout, UICollectionViewDataSource {
-
-    /// The `MessagesCollectionView` managed by the messages view controller object.
-    open var messagesCollectionView = MessagesCollectionView()
-
-    /// The `InputBarAccessoryView` used as the `inputAccessoryView` in the view controller.
-    open var messageInputBar = InputBarAccessoryView()
-
-    /// A Boolean value that determines whether the `MessagesCollectionView` scrolls to the
-    /// bottom whenever the `InputTextView` begins editing.
-    ///
-    /// The default value of this property is `false`.
-    open var scrollsToBottomOnKeyboardBeginsEditing: Bool = false
-    
-    /// A Boolean value that determines whether the `MessagesCollectionView`
-    /// maintains it's current position when the height of the `MessageInputBar` changes.
-    ///
-    /// The default value of this property is `false`.
-    open var maintainPositionOnKeyboardFrameChanged: Bool = false
-
-    open override var canBecomeFirstResponder: Bool {
-        return true
-    }
-
-    open override var inputAccessoryView: UIView? {
-        return messageInputBar
-    }
-
-    open override var shouldAutorotate: Bool {
-        return false
-    }
-
-    /// A CGFloat value that adds to (or, if negative, subtracts from) the automatically
-    /// computed value of `messagesCollectionView.contentInset.bottom`. Meant to be used
-    /// as a measure of last resort when the built-in algorithm does not produce the right
-    /// value for your app. Please let us know when you end up having to use this property.
-    open var additionalBottomInset: CGFloat = 0 {
-        didSet {
-            let delta = additionalBottomInset - oldValue
-            messageCollectionViewBottomInset += delta
-        }
-    }
-
-    public var isTypingIndicatorHidden: Bool {
-        return messagesCollectionView.isTypingIndicatorHidden
-    }
-
-    public var selectedIndexPathForMenu: IndexPath?
-
-    private var isFirstLayout: Bool = true
-    
-    internal var isMessagesControllerBeingDismissed: Bool = false
-
-    internal var messageCollectionViewBottomInset: CGFloat = 0 {
-        didSet {
-            messagesCollectionView.contentInset.bottom = messageCollectionViewBottomInset
-            messagesCollectionView.scrollIndicatorInsets.bottom = messageCollectionViewBottomInset
-        }
-    }
-
-    // MARK: - View Life Cycle
-
-    open override func viewDidLoad() {
-        super.viewDidLoad()
-        setupDefaults()
-        setupSubviews()
-        setupConstraints()
-        setupDelegates()
-        addMenuControllerObservers()
-        addObservers()
-    }
-    
-    open override func viewDidAppear(_ animated: Bool) {
-        super.viewDidAppear(animated)
-        isMessagesControllerBeingDismissed = false
-    }
-    
-    open override func viewWillDisappear(_ animated: Bool) {
-        super.viewWillDisappear(animated)
-        isMessagesControllerBeingDismissed = true
-    }
-    
-    open override func viewDidDisappear(_ animated: Bool) {
-        super.viewDidDisappear(animated)
-        isMessagesControllerBeingDismissed = false
-    }
-    
-    open override func viewDidLayoutSubviews() {
-        // Hack to prevent animation of the contentInset after viewDidAppear
-        if isFirstLayout {
-            defer { isFirstLayout = false }
-            addKeyboardObservers()
-            messageCollectionViewBottomInset = requiredInitialScrollViewBottomInset()
-        }
-        adjustScrollViewTopInset()
-    }
-
-    open override func viewSafeAreaInsetsDidChange() {
-        if #available(iOS 11.0, *) {
-            super.viewSafeAreaInsetsDidChange()
-        }
-        messageCollectionViewBottomInset = requiredInitialScrollViewBottomInset()
-    }
-
-    // MARK: - Initializers
-
-    deinit {
-        removeKeyboardObservers()
-        removeMenuControllerObservers()
-        removeObservers()
-        clearMemoryCache()
-    }
-
-    // MARK: - Methods [Private]
-
-    private func setupDefaults() {
-        extendedLayoutIncludesOpaqueBars = true
-        automaticallyAdjustsScrollViewInsets = false
-        view.backgroundColor = .white
-        messagesCollectionView.keyboardDismissMode = .interactive
-        messagesCollectionView.alwaysBounceVertical = true
-    }
-
-    private func setupDelegates() {
-        messagesCollectionView.delegate = self
-        messagesCollectionView.dataSource = self
-    }
-
-    private func setupSubviews() {
-        view.addSubview(messagesCollectionView)
-    }
-
-    private func setupConstraints() {
-        messagesCollectionView.translatesAutoresizingMaskIntoConstraints = false
-        
-        let top = messagesCollectionView.topAnchor.constraint(equalTo: view.topAnchor, constant: topLayoutGuide.length)
-        let bottom = messagesCollectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
-        if #available(iOS 11.0, *) {
-            let leading = messagesCollectionView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor)
-            let trailing = messagesCollectionView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor)
-            NSLayoutConstraint.activate([top, bottom, trailing, leading])
-        } else {
-            let leading = messagesCollectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor)
-            let trailing = messagesCollectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor)
-            NSLayoutConstraint.activate([top, bottom, trailing, leading])
-        }
-    }
-
-    // MARK: - Typing Indicator API
-
-    /// Sets the typing indicator sate by inserting/deleting the `TypingBubbleCell`
-    ///
-    /// - Parameters:
-    ///   - isHidden: A Boolean value that is to be the new state of the typing indicator
-    ///   - animated: A Boolean value determining if the insertion is to be animated
-    ///   - updates: A block of code that will be executed during `performBatchUpdates`
-    ///              when `animated` is `TRUE` or before the `completion` block executes
-    ///              when `animated` is `FALSE`
-    ///   - completion: A completion block to execute after the insertion/deletion
-    open func setTypingIndicatorViewHidden(_ isHidden: Bool, animated: Bool, whilePerforming updates: (() -> Void)? = nil, completion: ((Bool) -> Void)? = nil) {
-
-        guard isTypingIndicatorHidden != isHidden else {
-            completion?(false)
-            return
-        }
-
-        let section = messagesCollectionView.numberOfSections
-        messagesCollectionView.setTypingIndicatorViewHidden(isHidden)
-
-        if animated {
-            messagesCollectionView.performBatchUpdates({ [weak self] in
-                self?.performUpdatesForTypingIndicatorVisability(at: section)
-                updates?()
-                }, completion: completion)
-        } else {
-            performUpdatesForTypingIndicatorVisability(at: section)
-            updates?()
-            completion?(true)
-        }
-    }
-
-    /// Performs a delete or insert on the `MessagesCollectionView` on the provided section
-    ///
-    /// - Parameter section: The index to modify
-    private func performUpdatesForTypingIndicatorVisability(at section: Int) {
-        if isTypingIndicatorHidden {
-            messagesCollectionView.deleteSections([section - 1])
-        } else {
-            messagesCollectionView.insertSections([section])
-        }
-    }
-
-    /// A method that by default checks if the section is the last in the
-    /// `messagesCollectionView` and that `isTypingIndicatorViewHidden`
-    /// is FALSE
-    ///
-    /// - Parameter section
-    /// - Returns: A Boolean indicating if the TypingIndicator should be presented at the given section
-    public func isSectionReservedForTypingIndicator(_ section: Int) -> Bool {
-        return !messagesCollectionView.isTypingIndicatorHidden && section == self.numberOfSections(in: messagesCollectionView) - 1
-    }
-
-    // MARK: - UICollectionViewDataSource
-
-    open func numberOfSections(in collectionView: UICollectionView) -> Int {
-        guard let collectionView = collectionView as? MessagesCollectionView else {
-            fatalError(MessageKitError.notMessagesCollectionView)
-        }
-        let sections = collectionView.messagesDataSource?.numberOfSections(in: collectionView) ?? 0
-        return collectionView.isTypingIndicatorHidden ? sections : sections + 1
-    }
-
-    open func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        guard let collectionView = collectionView as? MessagesCollectionView else {
-            fatalError(MessageKitError.notMessagesCollectionView)
-        }
-        if isSectionReservedForTypingIndicator(section) {
-            return 1
-        }
-        return collectionView.messagesDataSource?.numberOfItems(inSection: section, in: collectionView) ?? 0
-    }
-
-    /// Notes:
-    /// - If you override this method, remember to call MessagesDataSource's customCell(for:at:in:)
-    /// for MessageKind.custom messages, if necessary.
-    ///
-    /// - If you are using the typing indicator you will need to ensure that the section is not
-    /// reserved for it with `isSectionReservedForTypingIndicator` defined in
-    /// `MessagesCollectionViewFlowLayout`
-    open func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
-
-        guard let messagesCollectionView = collectionView as? MessagesCollectionView else {
-            fatalError(MessageKitError.notMessagesCollectionView)
-        }
-
-        guard let messagesDataSource = messagesCollectionView.messagesDataSource else {
-            fatalError(MessageKitError.nilMessagesDataSource)
-        }
-
-        if isSectionReservedForTypingIndicator(indexPath.section) {
-            return messagesDataSource.typingIndicator(at: indexPath, in: messagesCollectionView)
-        }
-
-        let message = messagesDataSource.messageForItem(at: indexPath, in: messagesCollectionView)
-
-        switch message.kind {
-        case .text, .attributedText, .emoji:
-            let cell = messagesCollectionView.dequeueReusableCell(TextMessageCell.self, for: indexPath)
-            cell.configure(with: message, at: indexPath, and: messagesCollectionView)
-            return cell
-        case .photo, .video:
-            let cell = messagesCollectionView.dequeueReusableCell(MediaMessageCell.self, for: indexPath)
-            cell.configure(with: message, at: indexPath, and: messagesCollectionView)
-            return cell
-        case .location:
-            let cell = messagesCollectionView.dequeueReusableCell(LocationMessageCell.self, for: indexPath)
-            cell.configure(with: message, at: indexPath, and: messagesCollectionView)
-            return cell
-        case .audio:
-            let cell = messagesCollectionView.dequeueReusableCell(AudioMessageCell.self, for: indexPath)
-            cell.configure(with: message, at: indexPath, and: messagesCollectionView)
-            return cell
-        case .contact:
-            let cell = messagesCollectionView.dequeueReusableCell(ContactMessageCell.self, for: indexPath)
-            cell.configure(with: message, at: indexPath, and: messagesCollectionView)
-            return cell
-        case .custom:
-            return messagesDataSource.customCell(for: message, at: indexPath, in: messagesCollectionView)
-        }
-    }
-
-    open func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
-
-        guard let messagesCollectionView = collectionView as? MessagesCollectionView else {
-            fatalError(MessageKitError.notMessagesCollectionView)
-        }
-
-        guard let displayDelegate = messagesCollectionView.messagesDisplayDelegate else {
-            fatalError(MessageKitError.nilMessagesDisplayDelegate)
-        }
-
-        switch kind {
-        case UICollectionView.elementKindSectionHeader:
-            return displayDelegate.messageHeaderView(for: indexPath, in: messagesCollectionView)
-        case UICollectionView.elementKindSectionFooter:
-            return displayDelegate.messageFooterView(for: indexPath, in: messagesCollectionView)
-        default:
-            fatalError(MessageKitError.unrecognizedSectionKind)
-        }
-    }
-
-    // MARK: - UICollectionViewDelegateFlowLayout
-
-    open func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
-        guard let messagesFlowLayout = collectionViewLayout as? MessagesCollectionViewFlowLayout else { return .zero }
-        return messagesFlowLayout.sizeForItem(at: indexPath)
-    }
-
-    open func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
-
-        guard let messagesCollectionView = collectionView as? MessagesCollectionView else {
-            fatalError(MessageKitError.notMessagesCollectionView)
-        }
-        guard let layoutDelegate = messagesCollectionView.messagesLayoutDelegate else {
-            fatalError(MessageKitError.nilMessagesLayoutDelegate)
-        }
-        if isSectionReservedForTypingIndicator(section) {
-            return .zero
-        }
-        return layoutDelegate.headerViewSize(for: section, in: messagesCollectionView)
-    }
-
-    open func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
-        guard let cell = cell as? TypingIndicatorCell else { return }
-        cell.typingBubble.startAnimating()
-    }
-
-    open func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int) -> CGSize {
-        guard let messagesCollectionView = collectionView as? MessagesCollectionView else {
-            fatalError(MessageKitError.notMessagesCollectionView)
-        }
-        guard let layoutDelegate = messagesCollectionView.messagesLayoutDelegate else {
-            fatalError(MessageKitError.nilMessagesLayoutDelegate)
-        }
-        if isSectionReservedForTypingIndicator(section) {
-            return .zero
-        }
-        return layoutDelegate.footerViewSize(for: section, in: messagesCollectionView)
-    }
-
-    open func collectionView(_ collectionView: UICollectionView, shouldShowMenuForItemAt indexPath: IndexPath) -> Bool {
-        guard let messagesDataSource = messagesCollectionView.messagesDataSource else { return false }
-
-        if isSectionReservedForTypingIndicator(indexPath.section) {
-            return false
-        }
-
-        let message = messagesDataSource.messageForItem(at: indexPath, in: messagesCollectionView)
-
-        switch message.kind {
-        case .text, .attributedText, .emoji, .photo:
-            selectedIndexPathForMenu = indexPath
-            return true
-        default:
-            return false
-        }
-    }
-
-    open func collectionView(_ collectionView: UICollectionView, canPerformAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) -> Bool {
-        if isSectionReservedForTypingIndicator(indexPath.section) {
-            return false
-        }
-        return (action == NSSelectorFromString("copy:"))
-    }
-
-    open func collectionView(_ collectionView: UICollectionView, performAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) {
-        guard let messagesDataSource = messagesCollectionView.messagesDataSource else {
-            fatalError(MessageKitError.nilMessagesDataSource)
-        }
-        let pasteBoard = UIPasteboard.general
-        let message = messagesDataSource.messageForItem(at: indexPath, in: messagesCollectionView)
-
-        switch message.kind {
-        case .text(let text), .emoji(let text):
-            pasteBoard.string = text
-        case .attributedText(let attributedText):
-            pasteBoard.string = attributedText.string
-        case .photo(let mediaItem):
-            pasteBoard.image = mediaItem.image ?? mediaItem.placeholderImage
-        default:
-            break
-        }
-    }
-
-    // MARK: - Helpers
-    
-    private func addObservers() {
-        NotificationCenter.default.addObserver(
-            self, selector: #selector(clearMemoryCache), name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
-    }
-    
-    private func removeObservers() {
-        NotificationCenter.default.removeObserver(self, name: UIApplication.didReceiveMemoryWarningNotification, object: nil)
-    }
-    
-    @objc private func clearMemoryCache() {
-        MessageStyle.bubbleImageCache.removeAllObjects()
-    }
-}

+ 0 - 43
Pods/MessageKit/Sources/Extensions/Bundle+Extensions.swift

@@ -1,43 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-internal extension Bundle {
-
-    static func messageKitAssetBundle() -> Bundle { // swiftlint:disable:this explicit_acl
-        let podBundle = Bundle(for: MessagesViewController.self)
-        
-        guard let resourceBundleUrl = podBundle.url(forResource: "MessageKitAssets", withExtension: "bundle") else {
-            fatalError(MessageKitError.couldNotCreateAssetsPath)
-        }
-        
-        guard let resourceBundle = Bundle(url: resourceBundleUrl) else {
-            fatalError(MessageKitError.couldNotLoadAssetsBundle)
-        }
-        
-        return resourceBundle
-    }
-
-}

+ 0 - 33
Pods/MessageKit/Sources/Extensions/CGRect+Extensions.swift

@@ -1,33 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-internal extension CGRect {
-    
-    init(_ x: CGFloat, _ y: CGFloat, _ w: CGFloat, _ h: CGFloat) { // swiftlint:disable:this explicit_acl
-        self.init(x: x, y: y, width: w, height: h)
-    }
-
-}

+ 0 - 36
Pods/MessageKit/Sources/Extensions/NSAttributedString+Extensions.swift

@@ -1,36 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-internal extension NSAttributedString {
-
-    func width(considering height: CGFloat) -> CGFloat { // swiftlint:disable:this explicit_acl
-
-        let constraintBox = CGSize(width: .greatestFiniteMagnitude, height: height)
-        let rect = self.boundingRect(with: constraintBox, options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil)
-        return rect.width
-        
-    }
-}

+ 0 - 41
Pods/MessageKit/Sources/Extensions/UIColor+Extensions.swift

@@ -1,41 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-// swiftlint:disable explicit_acl
-
-internal extension UIColor {
-
-    static let incomingGray = UIColor(red: 230/255, green: 230/255, blue: 235/255, alpha: 1.0)
-
-    static let outgoingGreen = UIColor(red: 69/255, green: 214/255, blue: 93/255, alpha: 1.0)
-
-    static let inputBarGray = UIColor(red: 247/255, green: 247/255, blue: 247/255, alpha: 1.0)
-
-    static let playButtonLightGray = UIColor(red: 230/255, green: 230/255, blue: 230/255, alpha: 1.0)
-
-    static let sendButtonBlue = UIColor(red: 15/255, green: 135/255, blue: 255/255, alpha: 1.0)
-
-}

+ 0 - 39
Pods/MessageKit/Sources/Extensions/UIEdgeInsets+Extensions.swift

@@ -1,39 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-// swiftlint:disable explicit_acl
-
-internal extension UIEdgeInsets {
-
-    var vertical: CGFloat {
-        return top + bottom
-    }
-
-    var horizontal: CGFloat {
-        return left + right
-    }
-
-}

+ 0 - 43
Pods/MessageKit/Sources/Extensions/UIImage+Extension.swift

@@ -1,43 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2018 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-public enum ImageType: String {
-    case play
-    case pause
-    case disclouser
-}
-
-import UIKit
-
-/// This extension provide a way to access image resources with in framework
-public extension UIImage {
-    
-    public class func messageKitImageWith(type: ImageType) -> UIImage? {
-        let assetBundle = Bundle.messageKitAssetBundle()
-        let imagePath = assetBundle.path(forResource: type.rawValue, ofType: "png", inDirectory: "Images")
-        let image = UIImage(contentsOfFile: imagePath ?? "")
-        return image
-    }
-    
-}

+ 0 - 130
Pods/MessageKit/Sources/Extensions/UIView+Extensions.swift

@@ -1,130 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-// swiftlint:disable explicit_acl
-
-internal extension UIView {
-    
-    func fillSuperview() {
-        guard let superview = self.superview else {
-            return
-        }
-        translatesAutoresizingMaskIntoConstraints = false
-
-	    let constraints: [NSLayoutConstraint] = [
-    	    leftAnchor.constraint(equalTo: superview.leftAnchor),
-    	    rightAnchor.constraint(equalTo: superview.rightAnchor),
-    	    topAnchor.constraint(equalTo: superview.topAnchor),
-    	    bottomAnchor.constraint(equalTo: superview.bottomAnchor)
-    	    ]
-	    NSLayoutConstraint.activate(constraints)
-    }
-
-    func centerInSuperview() {
-        guard let superview = self.superview else {
-            return
-        }
-        translatesAutoresizingMaskIntoConstraints = false
-        let constraints: [NSLayoutConstraint] = [
-            centerXAnchor.constraint(equalTo: superview.centerXAnchor),
-            centerYAnchor.constraint(equalTo: superview.centerYAnchor)
-        ]
-        NSLayoutConstraint.activate(constraints)
-    }
-    
-    func constraint(equalTo size: CGSize) {
-        guard superview != nil else { return }
-        translatesAutoresizingMaskIntoConstraints = false
-        let constraints: [NSLayoutConstraint] = [
-            widthAnchor.constraint(equalToConstant: size.width),
-            heightAnchor.constraint(equalToConstant: size.height)
-        ]
-        NSLayoutConstraint.activate(constraints)
-        
-    }
-
-    @discardableResult
-    internal func addConstraints(_ top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil, centerY: NSLayoutYAxisAnchor? = nil, centerX: NSLayoutXAxisAnchor? = nil, topConstant: CGFloat = 0, leftConstant: CGFloat = 0, bottomConstant: CGFloat = 0, rightConstant: CGFloat = 0, centerYConstant: CGFloat = 0, centerXConstant: CGFloat = 0, widthConstant: CGFloat = 0, heightConstant: CGFloat = 0) -> [NSLayoutConstraint] {
-        
-        if self.superview == nil {
-            return []
-        }
-        translatesAutoresizingMaskIntoConstraints = false
-        
-        var constraints = [NSLayoutConstraint]()
-        
-        if let top = top {
-            let constraint = topAnchor.constraint(equalTo: top, constant: topConstant)
-            constraint.identifier = "top"
-            constraints.append(constraint)
-        }
-        
-        if let left = left {
-            let constraint = leftAnchor.constraint(equalTo: left, constant: leftConstant)
-            constraint.identifier = "left"
-            constraints.append(constraint)
-        }
-        
-        if let bottom = bottom {
-            let constraint = bottomAnchor.constraint(equalTo: bottom, constant: -bottomConstant)
-            constraint.identifier = "bottom"
-            constraints.append(constraint)
-        }
-        
-        if let right = right {
-            let constraint = rightAnchor.constraint(equalTo: right, constant: -rightConstant)
-            constraint.identifier = "right"
-            constraints.append(constraint)
-        }
-
-        if let centerY = centerY {
-            let constraint = centerYAnchor.constraint(equalTo: centerY, constant: centerYConstant)
-            constraint.identifier = "centerY"
-            constraints.append(constraint)
-        }
-
-        if let centerX = centerX {
-            let constraint = centerXAnchor.constraint(equalTo: centerX, constant: centerXConstant)
-            constraint.identifier = "centerX"
-            constraints.append(constraint)
-        }
-        
-        if widthConstant > 0 {
-            let constraint = widthAnchor.constraint(equalToConstant: widthConstant)
-            constraint.identifier = "width"
-            constraints.append(constraint)
-        }
-        
-        if heightConstant > 0 {
-            let constraint = heightAnchor.constraint(equalToConstant: heightConstant)
-            constraint.identifier = "height"
-            constraints.append(constraint)
-        }
-        
-        NSLayoutConstraint.activate(constraints)
-        return constraints
-    }
-}

+ 0 - 43
Pods/MessageKit/Sources/Layout/AudioMessageSizeCalculator.swift

@@ -1,43 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-open class AudioMessageSizeCalculator: MessageSizeCalculator {
-
-    open override func messageContainerSize(for message: MessageType) -> CGSize {
-        switch message.kind {
-        case .audio(let item):
-            let maxWidth = messageContainerMaxWidth(for: message)
-            if maxWidth < item.size.width {
-                // Maintain the ratio if width is too great
-                let height = maxWidth * item.size.height / item.size.width
-                return CGSize(width: maxWidth, height: height)
-            }
-            return item.size
-        default:
-            fatalError("messageContainerSize received unhandled MessageDataType: \(message.kind)")
-        }
-    }
-}

+ 0 - 50
Pods/MessageKit/Sources/Layout/CellSizeCalculator.swift

@@ -1,50 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// An object is responsible for
-/// sizing and configuring cells for given `IndexPath`s.
-open class CellSizeCalculator {
-
-    /// The layout object for which the cell size calculator is used.
-    public weak var layout: UICollectionViewFlowLayout?
-
-    /// Used to configure the layout attributes for a given cell.
-    ///
-    /// - Parameters:
-    /// - attributes: The attributes of the cell.
-    /// The default does nothing
-    open func configure(attributes: UICollectionViewLayoutAttributes) {}
-
-    /// Used to size an item at a given `IndexPath`.
-    ///
-    /// - Parameters:
-    /// - indexPath: The `IndexPath` of the item to be displayed.
-    /// The default return .zero
-    open func sizeForItem(at indexPath: IndexPath) -> CGSize { return .zero }
-    
-    public init() {}
-
-}

+ 0 - 73
Pods/MessageKit/Sources/Layout/ContactMessageSizeCalculator.swift

@@ -1,73 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2018 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-open class ContactMessageSizeCalculator: MessageSizeCalculator {
-    
-    public var incomingMessageNameLabelInsets = UIEdgeInsets(top: 7, left: 46, bottom: 7, right: 30)
-    public var outgoingMessageNameLabelInsets = UIEdgeInsets(top: 7, left: 41, bottom: 7, right: 35)
-    public var contactLabelFont = UIFont.preferredFont(forTextStyle: .body)
-    
-    internal func contactLabelInsets(for message: MessageType) -> UIEdgeInsets {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingMessageNameLabelInsets : incomingMessageNameLabelInsets
-    }
-    
-    open override func messageContainerMaxWidth(for message: MessageType) -> CGFloat {
-        let maxWidth = super.messageContainerMaxWidth(for: message)
-        let textInsets = contactLabelInsets(for: message)
-        return maxWidth - textInsets.horizontal
-    }
-    
-    open override func messageContainerSize(for message: MessageType) -> CGSize {
-        let maxWidth = messageContainerMaxWidth(for: message)
-        
-        var messageContainerSize: CGSize
-        let attributedText: NSAttributedString
-        
-        switch message.kind {
-        case .contact(let item):
-            attributedText = NSAttributedString(string: item.displayName, attributes: [.font: contactLabelFont])
-        default:
-            fatalError("messageContainerSize received unhandled MessageDataType: \(message.kind)")
-        }
-        
-        messageContainerSize = labelSize(for: attributedText, considering: maxWidth)
-        
-        let messageInsets = contactLabelInsets(for: message)
-        messageContainerSize.width += messageInsets.horizontal
-        messageContainerSize.height += messageInsets.vertical
-        
-        return messageContainerSize
-    }
-    
-    open override func configure(attributes: UICollectionViewLayoutAttributes) {
-        super.configure(attributes: attributes)
-        guard let attributes = attributes as? MessagesCollectionViewLayoutAttributes else { return }
-        attributes.messageLabelFont = contactLabelFont
-    }
-
-}

+ 0 - 43
Pods/MessageKit/Sources/Layout/LocationMessageSizeCalculator.swift

@@ -1,43 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-open class LocationMessageSizeCalculator: MessageSizeCalculator {
-
-    open override func messageContainerSize(for message: MessageType) -> CGSize {
-        switch message.kind {
-        case .location(let item):
-            let maxWidth = messageContainerMaxWidth(for: message)
-            if maxWidth < item.size.width {
-                // Maintain the ratio if width is too great
-                let height = maxWidth * item.size.height / item.size.width
-                return CGSize(width: maxWidth, height: height)
-            }
-            return item.size
-        default:
-            fatalError("messageContainerSize received unhandled MessageDataType: \(message.kind)")
-        }
-    }
-}

+ 0 - 48
Pods/MessageKit/Sources/Layout/MediaMessageSizeCalculator.swift

@@ -1,48 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-open class MediaMessageSizeCalculator: MessageSizeCalculator {
-
-    open override func messageContainerSize(for message: MessageType) -> CGSize {
-        let maxWidth = messageContainerMaxWidth(for: message)
-        let sizeForMediaItem = { (maxWidth: CGFloat, item: MediaItem) -> CGSize in
-            if maxWidth < item.size.width {
-                // Maintain the ratio if width is too great
-                let height = maxWidth * item.size.height / item.size.width
-                return CGSize(width: maxWidth, height: height)
-            }
-            return item.size
-        }
-        switch message.kind {
-        case .photo(let item):
-            return sizeForMediaItem(maxWidth, item)
-        case .video(let item):
-            return sizeForMediaItem(maxWidth, item)
-        default:
-            fatalError("messageContainerSize received unhandled MessageDataType: \(message.kind)")
-        }
-    }
-}

+ 0 - 291
Pods/MessageKit/Sources/Layout/MessageSizeCalculator.swift

@@ -1,291 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-open class MessageSizeCalculator: CellSizeCalculator {
-
-    public init(layout: MessagesCollectionViewFlowLayout? = nil) {
-        super.init()
-        
-        self.layout = layout
-    }
-
-    public var incomingAvatarSize = CGSize(width: 30, height: 30)
-    public var outgoingAvatarSize = CGSize(width: 30, height: 30)
-
-    public var incomingAvatarPosition = AvatarPosition(vertical: .cellBottom)
-    public var outgoingAvatarPosition = AvatarPosition(vertical: .cellBottom)
-
-    public var avatarLeadingTrailingPadding: CGFloat = 0
-
-    public var incomingMessagePadding = UIEdgeInsets(top: 0, left: 4, bottom: 0, right: 30)
-    public var outgoingMessagePadding = UIEdgeInsets(top: 0, left: 30, bottom: 0, right: 4)
-
-    public var incomingCellTopLabelAlignment = LabelAlignment(textAlignment: .center, textInsets: .zero)
-    public var outgoingCellTopLabelAlignment = LabelAlignment(textAlignment: .center, textInsets: .zero)
-    
-    public var incomingCellBottomLabelAlignment = LabelAlignment(textAlignment: .left, textInsets: UIEdgeInsets(left: 42))
-    public var outgoingCellBottomLabelAlignment = LabelAlignment(textAlignment: .right, textInsets: UIEdgeInsets(right: 42))
-
-    public var incomingMessageTopLabelAlignment = LabelAlignment(textAlignment: .left, textInsets: UIEdgeInsets(left: 42))
-    public var outgoingMessageTopLabelAlignment = LabelAlignment(textAlignment: .right, textInsets: UIEdgeInsets(right: 42))
-
-    public var incomingMessageBottomLabelAlignment = LabelAlignment(textAlignment: .left, textInsets: UIEdgeInsets(left: 42))
-    public var outgoingMessageBottomLabelAlignment = LabelAlignment(textAlignment: .right, textInsets: UIEdgeInsets(right: 42))
-
-    public var incomingAccessoryViewSize = CGSize.zero
-    public var outgoingAccessoryViewSize = CGSize.zero
-
-    public var incomingAccessoryViewPadding = HorizontalEdgeInsets.zero
-    public var outgoingAccessoryViewPadding = HorizontalEdgeInsets.zero
-    
-    public var incomingAccessoryViewPosition: AccessoryPosition = .messageCenter
-    public var outgoingAccessoryViewPosition: AccessoryPosition = .messageCenter
-
-    open override func configure(attributes: UICollectionViewLayoutAttributes) {
-        guard let attributes = attributes as? MessagesCollectionViewLayoutAttributes else { return }
-
-        let dataSource = messagesLayout.messagesDataSource
-        let indexPath = attributes.indexPath
-        let message = dataSource.messageForItem(at: indexPath, in: messagesLayout.messagesCollectionView)
-
-        attributes.avatarSize = avatarSize(for: message)
-        attributes.avatarPosition = avatarPosition(for: message)
-        attributes.avatarLeadingTrailingPadding = avatarLeadingTrailingPadding
-
-        attributes.messageContainerPadding = messageContainerPadding(for: message)
-        attributes.messageContainerSize = messageContainerSize(for: message)
-        attributes.cellTopLabelSize = cellTopLabelSize(for: message, at: indexPath)
-        attributes.cellBottomLabelSize = cellBottomLabelSize(for: message, at: indexPath)
-        attributes.cellBottomLabelAlignment = cellBottomLabelAlignment(for: message)
-        attributes.messageTopLabelSize = messageTopLabelSize(for: message, at: indexPath)
-        attributes.messageTopLabelAlignment = messageTopLabelAlignment(for: message)
-
-        attributes.messageBottomLabelAlignment = messageBottomLabelAlignment(for: message)
-        attributes.messageBottomLabelSize = messageBottomLabelSize(for: message, at: indexPath)
-
-        attributes.accessoryViewSize = accessoryViewSize(for: message)
-        attributes.accessoryViewPadding = accessoryViewPadding(for: message)
-        attributes.accessoryViewPosition = accessoryViewPosition(for: message)
-    }
-
-    open override func sizeForItem(at indexPath: IndexPath) -> CGSize {
-        let dataSource = messagesLayout.messagesDataSource
-        let message = dataSource.messageForItem(at: indexPath, in: messagesLayout.messagesCollectionView)
-        let itemHeight = cellContentHeight(for: message, at: indexPath)
-        return CGSize(width: messagesLayout.itemWidth, height: itemHeight)
-    }
-
-    open func cellContentHeight(for message: MessageType, at indexPath: IndexPath) -> CGFloat {
-
-        let messageContainerHeight = messageContainerSize(for: message).height
-        let cellBottomLabelHeight = cellBottomLabelSize(for: message, at: indexPath).height
-        let messageBottomLabelHeight = messageBottomLabelSize(for: message, at: indexPath).height
-        let cellTopLabelHeight = cellTopLabelSize(for: message, at: indexPath).height
-        let messageTopLabelHeight = messageTopLabelSize(for: message, at: indexPath).height
-        let messageVerticalPadding = messageContainerPadding(for: message).vertical
-        let avatarHeight = avatarSize(for: message).height
-        let avatarVerticalPosition = avatarPosition(for: message).vertical
-        let accessoryViewHeight = accessoryViewSize(for: message).height
-
-        switch avatarVerticalPosition {
-        case .messageCenter:
-            let totalLabelHeight: CGFloat = cellTopLabelHeight + messageTopLabelHeight
-                + messageContainerHeight + messageVerticalPadding + messageBottomLabelHeight + cellBottomLabelHeight
-            let cellHeight = max(avatarHeight, totalLabelHeight)
-            return max(cellHeight, accessoryViewHeight)
-        case .messageBottom:
-            var cellHeight: CGFloat = 0
-            cellHeight += messageBottomLabelHeight
-            cellHeight += cellBottomLabelHeight
-            let labelsHeight = messageContainerHeight + messageVerticalPadding + cellTopLabelHeight + messageTopLabelHeight
-            cellHeight += max(labelsHeight, avatarHeight)
-            return max(cellHeight, accessoryViewHeight)
-        case .messageTop:
-            var cellHeight: CGFloat = 0
-            cellHeight += cellTopLabelHeight
-            cellHeight += messageTopLabelHeight
-            let labelsHeight = messageContainerHeight + messageVerticalPadding + messageBottomLabelHeight + cellBottomLabelHeight
-            cellHeight += max(labelsHeight, avatarHeight)
-            return max(cellHeight, accessoryViewHeight)
-        case .messageLabelTop:
-            var cellHeight: CGFloat = 0
-            cellHeight += cellTopLabelHeight
-            let messageLabelsHeight = messageContainerHeight + messageBottomLabelHeight + messageVerticalPadding + messageTopLabelHeight + cellBottomLabelHeight
-            cellHeight += max(messageLabelsHeight, avatarHeight)
-            return max(cellHeight, accessoryViewHeight)
-        case .cellTop, .cellBottom:
-            let totalLabelHeight: CGFloat = cellTopLabelHeight + messageTopLabelHeight
-                + messageContainerHeight + messageVerticalPadding + messageBottomLabelHeight + cellBottomLabelHeight
-            let cellHeight = max(avatarHeight, totalLabelHeight)
-            return max(cellHeight, accessoryViewHeight)
-        }
-    }
-
-    // MARK: - Avatar
-
-    open func avatarPosition(for message: MessageType) -> AvatarPosition {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        var position = isFromCurrentSender ? outgoingAvatarPosition : incomingAvatarPosition
-
-        switch position.horizontal {
-        case .cellTrailing, .cellLeading:
-            break
-        case .natural:
-            position.horizontal = isFromCurrentSender ? .cellTrailing : .cellLeading
-        }
-        return position
-    }
-
-    open func avatarSize(for message: MessageType) -> CGSize {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingAvatarSize : incomingAvatarSize
-    }
-
-    // MARK: - Top cell Label
-
-    open func cellTopLabelSize(for message: MessageType, at indexPath: IndexPath) -> CGSize {
-        let layoutDelegate = messagesLayout.messagesLayoutDelegate
-        let collectionView = messagesLayout.messagesCollectionView
-        let height = layoutDelegate.cellTopLabelHeight(for: message, at: indexPath, in: collectionView)
-        return CGSize(width: messagesLayout.itemWidth, height: height)
-    }
-
-    open func cellTopLabelAlignment(for message: MessageType) -> LabelAlignment {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingCellTopLabelAlignment : incomingCellTopLabelAlignment
-    }
-    
-    // MARK: - Top message Label
-    
-    open func messageTopLabelSize(for message: MessageType, at indexPath: IndexPath) -> CGSize {
-        let layoutDelegate = messagesLayout.messagesLayoutDelegate
-        let collectionView = messagesLayout.messagesCollectionView
-        let height = layoutDelegate.messageTopLabelHeight(for: message, at: indexPath, in: collectionView)
-        return CGSize(width: messagesLayout.itemWidth, height: height)
-    }
-    
-    open func messageTopLabelAlignment(for message: MessageType) -> LabelAlignment {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingMessageTopLabelAlignment : incomingMessageTopLabelAlignment
-    }
-    
-    // MARK: - Bottom cell Label
-    
-    open func cellBottomLabelSize(for message: MessageType, at indexPath: IndexPath) -> CGSize {
-        let layoutDelegate = messagesLayout.messagesLayoutDelegate
-        let collectionView = messagesLayout.messagesCollectionView
-        let height = layoutDelegate.cellBottomLabelHeight(for: message, at: indexPath, in: collectionView)
-        return CGSize(width: messagesLayout.itemWidth, height: height)
-    }
-    
-    open func cellBottomLabelAlignment(for message: MessageType) -> LabelAlignment {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingCellBottomLabelAlignment : incomingCellBottomLabelAlignment
-    }
-
-    // MARK: - Bottom Message Label
-
-    open func messageBottomLabelSize(for message: MessageType, at indexPath: IndexPath) -> CGSize {
-        let layoutDelegate = messagesLayout.messagesLayoutDelegate
-        let collectionView = messagesLayout.messagesCollectionView
-        let height = layoutDelegate.messageBottomLabelHeight(for: message, at: indexPath, in: collectionView)
-        return CGSize(width: messagesLayout.itemWidth, height: height)
-    }
-
-    open func messageBottomLabelAlignment(for message: MessageType) -> LabelAlignment {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingMessageBottomLabelAlignment : incomingMessageBottomLabelAlignment
-    }
-
-    // MARK: - Accessory View
-
-    public func accessoryViewSize(for message: MessageType) -> CGSize {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingAccessoryViewSize : incomingAccessoryViewSize
-    }
-
-    public func accessoryViewPadding(for message: MessageType) -> HorizontalEdgeInsets {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingAccessoryViewPadding : incomingAccessoryViewPadding
-    }
-    
-    public func accessoryViewPosition(for message: MessageType) -> AccessoryPosition {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingAccessoryViewPosition : incomingAccessoryViewPosition
-    }
-
-    // MARK: - MessageContainer
-
-    open func messageContainerPadding(for message: MessageType) -> UIEdgeInsets {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingMessagePadding : incomingMessagePadding
-    }
-
-    open func messageContainerSize(for message: MessageType) -> CGSize {
-        // Returns .zero by default
-        return .zero
-    }
-
-    open func messageContainerMaxWidth(for message: MessageType) -> CGFloat {
-        let avatarWidth = avatarSize(for: message).width
-        let messagePadding = messageContainerPadding(for: message)
-        let accessoryWidth = accessoryViewSize(for: message).width
-        let accessoryPadding = accessoryViewPadding(for: message)
-        return messagesLayout.itemWidth - avatarWidth - messagePadding.horizontal - accessoryWidth - accessoryPadding.horizontal - avatarLeadingTrailingPadding
-    }
-
-    // MARK: - Helpers
-
-    public var messagesLayout: MessagesCollectionViewFlowLayout {
-        guard let layout = layout as? MessagesCollectionViewFlowLayout else {
-            fatalError("Layout object is missing or is not a MessagesCollectionViewFlowLayout")
-        }
-        return layout
-    }
-
-    internal func labelSize(for attributedText: NSAttributedString, considering maxWidth: CGFloat) -> CGSize {
-        let constraintBox = CGSize(width: maxWidth, height: .greatestFiniteMagnitude)
-        let rect = attributedText.boundingRect(with: constraintBox, options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil).integral
-
-        return rect.size
-    }
-}
-
-fileprivate extension UIEdgeInsets {
-    init(top: CGFloat = 0, bottom: CGFloat = 0, left: CGFloat = 0, right: CGFloat = 0) {
-        self.init(top: top, left: left, bottom: bottom, right: right)
-    }
-}

+ 0 - 328
Pods/MessageKit/Sources/Layout/MessagesCollectionViewFlowLayout.swift

@@ -1,328 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-import AVFoundation
-
-/// The layout object used by `MessagesCollectionView` to determine the size of all
-/// framework provided `MessageCollectionViewCell` subclasses.
-open class MessagesCollectionViewFlowLayout: UICollectionViewFlowLayout {
-
-    open override class var layoutAttributesClass: AnyClass {
-        return MessagesCollectionViewLayoutAttributes.self
-    }
-    
-    /// The `MessagesCollectionView` that owns this layout object.
-    public var messagesCollectionView: MessagesCollectionView {
-        guard let messagesCollectionView = collectionView as? MessagesCollectionView else {
-            fatalError(MessageKitError.layoutUsedOnForeignType)
-        }
-        return messagesCollectionView
-    }
-    
-    /// The `MessagesDataSource` for the layout's collection view.
-    public var messagesDataSource: MessagesDataSource {
-        guard let messagesDataSource = messagesCollectionView.messagesDataSource else {
-            fatalError(MessageKitError.nilMessagesDataSource)
-        }
-        return messagesDataSource
-    }
-    
-    /// The `MessagesLayoutDelegate` for the layout's collection view.
-    public var messagesLayoutDelegate: MessagesLayoutDelegate {
-        guard let messagesLayoutDelegate = messagesCollectionView.messagesLayoutDelegate else {
-            fatalError(MessageKitError.nilMessagesLayoutDelegate)
-        }
-        return messagesLayoutDelegate
-    }
-
-    public var itemWidth: CGFloat {
-        guard let collectionView = collectionView else { return 0 }
-        return collectionView.frame.width - sectionInset.left - sectionInset.right
-    }
-
-    public private(set) var isTypingIndicatorViewHidden: Bool = true
-
-    // MARK: - Initializers
-
-    public override init() {
-        super.init()
-        setupView()
-        setupObserver()
-    }
-
-    required public init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        setupView()
-        setupObserver()
-    }
-
-    deinit {
-        NotificationCenter.default.removeObserver(self)
-    }
-    
-    // MARK: - Methods
-    
-    private func setupView() {
-        sectionInset = UIEdgeInsets(top: 4, left: 8, bottom: 4, right: 8)
-    }
-    
-    private func setupObserver() {
-        NotificationCenter.default.addObserver(self, selector: #selector(MessagesCollectionViewFlowLayout.handleOrientationChange(_:)), name: UIDevice.orientationDidChangeNotification, object: nil)
-    }
-
-    // MARK: - Typing Indicator API
-
-    /// Notifies the layout that the typing indicator will change state
-    ///
-    /// - Parameters:
-    ///   - isHidden: A Boolean value that is to be the new state of the typing indicator
-    internal func setTypingIndicatorViewHidden(_ isHidden: Bool) {
-        isTypingIndicatorViewHidden = isHidden
-    }
-
-    /// A method that by default checks if the section is the last in the
-    /// `messagesCollectionView` and that `isTypingIndicatorViewHidden`
-    /// is FALSE
-    ///
-    /// - Parameter section
-    /// - Returns: A Boolean indicating if the TypingIndicator should be presented at the given section
-    open func isSectionReservedForTypingIndicator(_ section: Int) -> Bool {
-        return !isTypingIndicatorViewHidden && section == messagesCollectionView.numberOfSections - 1
-    }
-
-    // MARK: - Attributes
-
-    open override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
-        guard let attributesArray = super.layoutAttributesForElements(in: rect) as? [MessagesCollectionViewLayoutAttributes] else {
-            return nil
-        }
-        for attributes in attributesArray where attributes.representedElementCategory == .cell {
-            let cellSizeCalculator = cellSizeCalculatorForItem(at: attributes.indexPath)
-            cellSizeCalculator.configure(attributes: attributes)
-        }
-        return attributesArray
-    }
-
-    open override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
-        guard let attributes = super.layoutAttributesForItem(at: indexPath) as? MessagesCollectionViewLayoutAttributes else {
-            return nil
-        }
-        if attributes.representedElementCategory == .cell {
-            let cellSizeCalculator = cellSizeCalculatorForItem(at: attributes.indexPath)
-            cellSizeCalculator.configure(attributes: attributes)
-        }
-        return attributes
-    }
-
-    // MARK: - Layout Invalidation
-
-    open override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {
-        return collectionView?.bounds.width != newBounds.width
-    }
-
-    open override func invalidationContext(forBoundsChange newBounds: CGRect) -> UICollectionViewLayoutInvalidationContext {
-        let context = super.invalidationContext(forBoundsChange: newBounds)
-        guard let flowLayoutContext = context as? UICollectionViewFlowLayoutInvalidationContext else { return context }
-        flowLayoutContext.invalidateFlowLayoutDelegateMetrics = shouldInvalidateLayout(forBoundsChange: newBounds)
-        return flowLayoutContext
-    }
-
-    @objc
-    private func handleOrientationChange(_ notification: Notification) {
-        invalidateLayout()
-    }
-
-    // MARK: - Cell Sizing
-
-    lazy open var textMessageSizeCalculator = TextMessageSizeCalculator(layout: self)
-    lazy open var attributedTextMessageSizeCalculator = TextMessageSizeCalculator(layout: self)
-    lazy open var emojiMessageSizeCalculator: TextMessageSizeCalculator = {
-        let sizeCalculator = TextMessageSizeCalculator(layout: self)
-        sizeCalculator.messageLabelFont = UIFont.systemFont(ofSize: sizeCalculator.messageLabelFont.pointSize * 2)
-        return sizeCalculator
-    }()
-    lazy open var photoMessageSizeCalculator = MediaMessageSizeCalculator(layout: self)
-    lazy open var videoMessageSizeCalculator = MediaMessageSizeCalculator(layout: self)
-    lazy open var locationMessageSizeCalculator = LocationMessageSizeCalculator(layout: self)
-    lazy open var audioMessageSizeCalculator = AudioMessageSizeCalculator(layout: self)
-    lazy open var contactMessageSizeCalculator = ContactMessageSizeCalculator(layout: self)
-    lazy open var typingIndicatorSizeCalculator = TypingCellSizeCalculator(layout: self)
-
-    /// Note:
-    /// - If you override this method, remember to call MessageLayoutDelegate's
-    /// customCellSizeCalculator(for:at:in:) method for MessageKind.custom messages, if necessary
-    /// - If you are using the typing indicator be sure to return the `typingIndicatorSizeCalculator`
-    /// when the section is reserved for it, indicated by `isSectionReservedForTypingIndicator`
-    open func cellSizeCalculatorForItem(at indexPath: IndexPath) -> CellSizeCalculator {
-        if isSectionReservedForTypingIndicator(indexPath.section) {
-            return typingIndicatorSizeCalculator
-        }
-        let message = messagesDataSource.messageForItem(at: indexPath, in: messagesCollectionView)
-        switch message.kind {
-        case .text:
-            return textMessageSizeCalculator
-        case .attributedText:
-            return attributedTextMessageSizeCalculator
-        case .emoji:
-            return emojiMessageSizeCalculator
-        case .photo:
-            return photoMessageSizeCalculator
-        case .video:
-            return videoMessageSizeCalculator
-        case .location:
-            return locationMessageSizeCalculator
-        case .audio:
-            return audioMessageSizeCalculator
-        case .contact:
-            return contactMessageSizeCalculator
-        case .custom:
-            return messagesLayoutDelegate.customCellSizeCalculator(for: message, at: indexPath, in: messagesCollectionView)
-        }
-    }
-
-    open func sizeForItem(at indexPath: IndexPath) -> CGSize {
-        let calculator = cellSizeCalculatorForItem(at: indexPath)
-        return calculator.sizeForItem(at: indexPath)
-    }
-    
-    /// Set `incomingAvatarSize` of all `MessageSizeCalculator`s
-    public func setMessageIncomingAvatarSize(_ newSize: CGSize) {
-        messageSizeCalculators().forEach { $0.incomingAvatarSize = newSize }
-    }
-    
-    /// Set `outgoingAvatarSize` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingAvatarSize(_ newSize: CGSize) {
-        messageSizeCalculators().forEach { $0.outgoingAvatarSize = newSize }
-    }
-    
-    /// Set `incomingAvatarPosition` of all `MessageSizeCalculator`s
-    public func setMessageIncomingAvatarPosition(_ newPosition: AvatarPosition) {
-        messageSizeCalculators().forEach { $0.incomingAvatarPosition = newPosition }
-    }
-    
-    /// Set `outgoingAvatarPosition` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingAvatarPosition(_ newPosition: AvatarPosition) {
-        messageSizeCalculators().forEach { $0.outgoingAvatarPosition = newPosition }
-    }
-
-    /// Set `avatarLeadingTrailingPadding` of all `MessageSizeCalculator`s
-    public func setAvatarLeadingTrailingPadding(_ newPadding: CGFloat) {
-        messageSizeCalculators().forEach { $0.avatarLeadingTrailingPadding = newPadding }
-    }
-    
-    /// Set `incomingMessagePadding` of all `MessageSizeCalculator`s
-    public func setMessageIncomingMessagePadding(_ newPadding: UIEdgeInsets) {
-        messageSizeCalculators().forEach { $0.incomingMessagePadding = newPadding }
-    }
-    
-    /// Set `outgoingMessagePadding` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingMessagePadding(_ newPadding: UIEdgeInsets) {
-        messageSizeCalculators().forEach { $0.outgoingMessagePadding = newPadding }
-    }
-    
-    /// Set `incomingCellTopLabelAlignment` of all `MessageSizeCalculator`s
-    public func setMessageIncomingCellTopLabelAlignment(_ newAlignment: LabelAlignment) {
-        messageSizeCalculators().forEach { $0.incomingCellTopLabelAlignment = newAlignment }
-    }
-    
-    /// Set `outgoingCellTopLabelAlignment` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingCellTopLabelAlignment(_ newAlignment: LabelAlignment) {
-        messageSizeCalculators().forEach { $0.outgoingCellTopLabelAlignment = newAlignment }
-    }
-    
-    /// Set `incomingCellBottomLabelAlignment` of all `MessageSizeCalculator`s
-    public func setMessageIncomingCellBottomLabelAlignment(_ newAlignment: LabelAlignment) {
-        messageSizeCalculators().forEach { $0.incomingCellBottomLabelAlignment = newAlignment }
-    }
-    
-    /// Set `outgoingCellBottomLabelAlignment` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingCellBottomLabelAlignment(_ newAlignment: LabelAlignment) {
-        messageSizeCalculators().forEach { $0.outgoingCellBottomLabelAlignment = newAlignment }
-    }
-    
-    /// Set `incomingMessageTopLabelAlignment` of all `MessageSizeCalculator`s
-    public func setMessageIncomingMessageTopLabelAlignment(_ newAlignment: LabelAlignment) {
-        messageSizeCalculators().forEach { $0.incomingMessageTopLabelAlignment = newAlignment }
-    }
-    
-    /// Set `outgoingMessageTopLabelAlignment` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingMessageTopLabelAlignment(_ newAlignment: LabelAlignment) {
-        messageSizeCalculators().forEach { $0.outgoingMessageTopLabelAlignment = newAlignment }
-    }
-    
-    /// Set `incomingMessageBottomLabelAlignment` of all `MessageSizeCalculator`s
-    public func setMessageIncomingMessageBottomLabelAlignment(_ newAlignment: LabelAlignment) {
-        messageSizeCalculators().forEach { $0.incomingMessageBottomLabelAlignment = newAlignment }
-    }
-    
-    /// Set `outgoingMessageBottomLabelAlignment` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingMessageBottomLabelAlignment(_ newAlignment: LabelAlignment) {
-        messageSizeCalculators().forEach { $0.outgoingMessageBottomLabelAlignment = newAlignment }
-    }
-
-    /// Set `incomingAccessoryViewSize` of all `MessageSizeCalculator`s
-    public func setMessageIncomingAccessoryViewSize(_ newSize: CGSize) {
-        messageSizeCalculators().forEach { $0.incomingAccessoryViewSize = newSize }
-    }
-
-    /// Set `outgoingAccessoryViewSize` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingAccessoryViewSize(_ newSize: CGSize) {
-        messageSizeCalculators().forEach { $0.outgoingAccessoryViewSize = newSize }
-    }
-
-    /// Set `incomingAccessoryViewPadding` of all `MessageSizeCalculator`s
-    public func setMessageIncomingAccessoryViewPadding(_ newPadding: HorizontalEdgeInsets) {
-        messageSizeCalculators().forEach { $0.incomingAccessoryViewPadding = newPadding }
-    }
-
-    /// Set `outgoingAccessoryViewPadding` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingAccessoryViewPadding(_ newPadding: HorizontalEdgeInsets) {
-        messageSizeCalculators().forEach { $0.outgoingAccessoryViewPadding = newPadding }
-    }
-    
-    /// Set `incomingAccessoryViewPosition` of all `MessageSizeCalculator`s
-    public func setMessageIncomingAccessoryViewPosition(_ newPosition: AccessoryPosition) {
-        messageSizeCalculators().forEach { $0.incomingAccessoryViewPosition = newPosition }
-    }
-    
-    /// Set `outgoingAccessoryViewPosition` of all `MessageSizeCalculator`s
-    public func setMessageOutgoingAccessoryViewPosition(_ newPosition: AccessoryPosition) {
-        messageSizeCalculators().forEach { $0.outgoingAccessoryViewPosition = newPosition }
-    }
-
-    /// Get all `MessageSizeCalculator`s
-    open func messageSizeCalculators() -> [MessageSizeCalculator] {
-        return [textMessageSizeCalculator,
-                attributedTextMessageSizeCalculator,
-                emojiMessageSizeCalculator,
-                photoMessageSizeCalculator,
-                videoMessageSizeCalculator,
-                locationMessageSizeCalculator,
-                audioMessageSizeCalculator,
-                contactMessageSizeCalculator
-        ]
-    }
-    
-}

+ 0 - 109
Pods/MessageKit/Sources/Layout/MessagesCollectionViewLayoutAttributes.swift

@@ -1,109 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// The layout attributes used by a `MessageCollectionViewCell` to layout its subviews.
-open class MessagesCollectionViewLayoutAttributes: UICollectionViewLayoutAttributes {
-
-    // MARK: - Properties
-
-    public var avatarSize: CGSize = .zero
-    public var avatarPosition = AvatarPosition(vertical: .cellBottom)
-    public var avatarLeadingTrailingPadding: CGFloat = 0
-
-    public var messageContainerSize: CGSize = .zero
-    public var messageContainerPadding: UIEdgeInsets = .zero
-    public var messageLabelFont: UIFont = UIFont.preferredFont(forTextStyle: .body)
-    public var messageLabelInsets: UIEdgeInsets = .zero
-
-    public var cellTopLabelAlignment = LabelAlignment(textAlignment: .center, textInsets: .zero)
-    public var cellTopLabelSize: CGSize = .zero
-    
-    public var cellBottomLabelAlignment = LabelAlignment(textAlignment: .center, textInsets: .zero)
-    public var cellBottomLabelSize: CGSize = .zero
-    
-    public var messageTopLabelAlignment = LabelAlignment(textAlignment: .center, textInsets: .zero)
-    public var messageTopLabelSize: CGSize = .zero
-
-    public var messageBottomLabelAlignment = LabelAlignment(textAlignment: .center, textInsets: .zero)
-    public var messageBottomLabelSize: CGSize = .zero
-
-    public var accessoryViewSize: CGSize = .zero
-    public var accessoryViewPadding: HorizontalEdgeInsets = .zero
-    public var accessoryViewPosition: AccessoryPosition = .messageCenter
-    
-    // MARK: - Methods
-
-    open override func copy(with zone: NSZone? = nil) -> Any {
-        // swiftlint:disable force_cast
-        let copy = super.copy(with: zone) as! MessagesCollectionViewLayoutAttributes
-        copy.avatarSize = avatarSize
-        copy.avatarPosition = avatarPosition
-        copy.avatarLeadingTrailingPadding = avatarLeadingTrailingPadding
-        copy.messageContainerSize = messageContainerSize
-        copy.messageContainerPadding = messageContainerPadding
-        copy.messageLabelFont = messageLabelFont
-        copy.messageLabelInsets = messageLabelInsets
-        copy.cellTopLabelAlignment = cellTopLabelAlignment
-        copy.cellTopLabelSize = cellTopLabelSize
-        copy.cellBottomLabelAlignment = cellBottomLabelAlignment
-        copy.cellBottomLabelSize = cellBottomLabelSize
-        copy.messageTopLabelAlignment = messageTopLabelAlignment
-        copy.messageTopLabelSize = messageTopLabelSize
-        copy.messageBottomLabelAlignment = messageBottomLabelAlignment
-        copy.messageBottomLabelSize = messageBottomLabelSize
-        copy.accessoryViewSize = accessoryViewSize
-        copy.accessoryViewPadding = accessoryViewPadding
-        copy.accessoryViewPosition = accessoryViewPosition
-        return copy
-        // swiftlint:enable force_cast
-    }
-
-    open override func isEqual(_ object: Any?) -> Bool {
-        // MARK: - LEAVE this as is
-        if let attributes = object as? MessagesCollectionViewLayoutAttributes {
-            return super.isEqual(object) && attributes.avatarSize == avatarSize
-                && attributes.avatarPosition == avatarPosition
-                && attributes.avatarLeadingTrailingPadding == avatarLeadingTrailingPadding
-                && attributes.messageContainerSize == messageContainerSize
-                && attributes.messageContainerPadding == messageContainerPadding
-                && attributes.messageLabelFont == messageLabelFont
-                && attributes.messageLabelInsets == messageLabelInsets
-                && attributes.cellTopLabelAlignment == cellTopLabelAlignment
-                && attributes.cellTopLabelSize == cellTopLabelSize
-                && attributes.cellBottomLabelAlignment == cellBottomLabelAlignment
-                && attributes.cellBottomLabelSize == cellBottomLabelSize
-                && attributes.messageTopLabelAlignment == messageTopLabelAlignment
-                && attributes.messageTopLabelSize == messageTopLabelSize
-                && attributes.messageBottomLabelAlignment == messageBottomLabelAlignment
-                && attributes.messageBottomLabelSize == messageBottomLabelSize
-                && attributes.accessoryViewSize == accessoryViewSize
-                && attributes.accessoryViewPadding == accessoryViewPadding
-                && attributes.accessoryViewPosition == accessoryViewPosition
-        } else {
-            return false
-        }
-    }
-}

+ 0 - 90
Pods/MessageKit/Sources/Layout/TextMessageSizeCalculator.swift

@@ -1,90 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-open class TextMessageSizeCalculator: MessageSizeCalculator {
-
-    public var incomingMessageLabelInsets = UIEdgeInsets(top: 7, left: 18, bottom: 7, right: 14)
-    public var outgoingMessageLabelInsets = UIEdgeInsets(top: 7, left: 14, bottom: 7, right: 18)
-
-    public var messageLabelFont = UIFont.preferredFont(forTextStyle: .body)
-
-    internal func messageLabelInsets(for message: MessageType) -> UIEdgeInsets {
-        let dataSource = messagesLayout.messagesDataSource
-        let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
-        return isFromCurrentSender ? outgoingMessageLabelInsets : incomingMessageLabelInsets
-    }
-
-    open override func messageContainerMaxWidth(for message: MessageType) -> CGFloat {
-        let maxWidth = super.messageContainerMaxWidth(for: message)
-        let textInsets = messageLabelInsets(for: message)
-        return maxWidth - textInsets.horizontal
-    }
-
-    open override func messageContainerSize(for message: MessageType) -> CGSize {
-        let maxWidth = messageContainerMaxWidth(for: message)
-
-        var messageContainerSize: CGSize
-        let attributedText: NSAttributedString
-
-        switch message.kind {
-        case .attributedText(let text):
-            attributedText = text
-        case .text(let text), .emoji(let text):
-            attributedText = NSAttributedString(string: text, attributes: [.font: messageLabelFont])
-        default:
-            fatalError("messageContainerSize received unhandled MessageDataType: \(message.kind)")
-        }
-
-        messageContainerSize = labelSize(for: attributedText, considering: maxWidth)
-
-        let messageInsets = messageLabelInsets(for: message)
-        messageContainerSize.width += messageInsets.horizontal
-        messageContainerSize.height += messageInsets.vertical
-
-        return messageContainerSize
-    }
-
-    open override func configure(attributes: UICollectionViewLayoutAttributes) {
-        super.configure(attributes: attributes)
-        guard let attributes = attributes as? MessagesCollectionViewLayoutAttributes else { return }
-
-        let dataSource = messagesLayout.messagesDataSource
-        let indexPath = attributes.indexPath
-        let message = dataSource.messageForItem(at: indexPath, in: messagesLayout.messagesCollectionView)
-
-        attributes.messageLabelInsets = messageLabelInsets(for: message)
-        attributes.messageLabelFont = messageLabelFont
-
-        switch message.kind {
-        case .attributedText(let text):
-            guard !text.string.isEmpty else { return }
-            guard let font = text.attribute(.font, at: 0, effectiveRange: nil) as? UIFont else { return }
-            attributes.messageLabelFont = font
-        default:
-            break
-        }
-    }
-}

+ 0 - 43
Pods/MessageKit/Sources/Layout/TypingIndicatorCellSizeCalculator.swift

@@ -1,43 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-open class TypingCellSizeCalculator: CellSizeCalculator {
-
-    open var height: CGFloat = 62
-
-    public init(layout: MessagesCollectionViewFlowLayout? = nil) {
-        super.init()
-        self.layout = layout
-    }
-
-    open override func sizeForItem(at indexPath: IndexPath) -> CGSize {
-        guard let layout = layout else { return .zero }
-        let collectionViewWidth = layout.collectionView?.bounds.width ?? 0
-        let contentInset = layout.collectionView?.contentInset ?? .zero
-        let inset = layout.sectionInset.horizontal + contentInset.horizontal
-        return CGSize(width: collectionViewWidth - inset, height: height)
-    }
-}

+ 0 - 48
Pods/MessageKit/Sources/Models/AccessoryPosition.swift

@@ -1,48 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// Used to determine the `Horizontal` and `Vertical` position of
-// an `AccessoryView` in a `MessageCollectionViewCell`.
-public enum AccessoryPosition {
-    
-    /// Aligns the `AccessoryView`'s top edge to the cell's top edge.
-    case cellTop
-    
-    /// Aligns the `AccessoryView`'s top edge to the `messageTopLabel`'s top edge.
-    case messageLabelTop
-    
-    /// Aligns the `AccessoryView`'s top edge to the `MessageContainerView`'s top edge.
-    case messageTop
-    
-    /// Aligns the `AccessoryView` center to the `MessageContainerView` center.
-    case messageCenter
-    
-    /// Aligns the `AccessoryView`'s bottom edge to the `MessageContainerView`s bottom edge.
-    case messageBottom
-    
-    /// Aligns the `AccessoryView`'s bottom edge to the cell's bottom edge.
-    case cellBottom
-}

+ 0 - 47
Pods/MessageKit/Sources/Models/Avatar.swift

@@ -1,47 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// An object used to group the information to be used by an `AvatarView`.
-public struct Avatar {
-    
-    // MARK: - Properties
-    
-    /// The image to be used for an `AvatarView`.
-    public let image: UIImage?
-    
-    /// The placeholder initials to be used in the case where no image is provided.
-    ///
-    /// The default value of this property is "?".
-    public var initials: String = "?"
-    
-    // MARK: - Initializer
-    
-    public init(image: UIImage? = nil, initials: String = "?") {
-        self.image = image
-        self.initials = initials
-    }
-    
-}

+ 0 - 98
Pods/MessageKit/Sources/Models/AvatarPosition.swift

@@ -1,98 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// Used to determine the `Horizontal` and `Vertical` position of
-// an `AvatarView` in a `MessageCollectionViewCell`.
-public struct AvatarPosition: Equatable {
-    
-    /// An enum representing the horizontal alignment of an `AvatarView`.
-    public enum Horizontal {
-        
-        /// Positions the `AvatarView` on the side closest to the cell's leading edge.
-        case cellLeading
-        
-        /// Positions the `AvatarView` on the side closest to the cell's trailing edge.
-        case cellTrailing
-        
-        /// Positions the `AvatarView` based on whether the message is from the current Sender.
-        /// The cell is positioned `.cellTrailling` if `isFromCurrentSender` is true
-        /// and `.cellLeading` if false.
-        case natural
-    }
-    
-    /// An enum representing the verical alignment for an `AvatarView`.
-    public enum Vertical {
-        
-        /// Aligns the `AvatarView`'s top edge to the cell's top edge.
-        case cellTop
-        
-        /// Aligns the `AvatarView`'s top edge to the `messageTopLabel`'s top edge.
-        case messageLabelTop
-        
-        /// Aligns the `AvatarView`'s top edge to the `MessageContainerView`'s top edge.
-        case messageTop
-        
-        /// Aligns the `AvatarView` center to the `MessageContainerView` center.
-        case messageCenter
-        
-        /// Aligns the `AvatarView`'s bottom edge to the `MessageContainerView`s bottom edge.
-        case messageBottom
-        
-        /// Aligns the `AvatarView`'s bottom edge to the cell's bottom edge.
-        case cellBottom
-        
-    }
-    
-    // MARK: - Properties
-    
-    // The vertical position
-    public var vertical: Vertical
-    
-    // The horizontal position
-    public var horizontal: Horizontal
-    
-    // MARK: - Initializers
-    
-    public init(horizontal: Horizontal, vertical: Vertical) {
-        self.horizontal = horizontal
-        self.vertical = vertical
-    }
-
-    public init(vertical: Vertical) {
-        self.init(horizontal: .natural, vertical: vertical)
-    }
-    
-}
-
-// MARK: - Equatable Conformance
-
-public extension AvatarPosition {
-
-    static func == (lhs: AvatarPosition, rhs: AvatarPosition) -> Bool {
-        return lhs.vertical == rhs.vertical && lhs.horizontal == rhs.horizontal
-    }
-
-}

+ 0 - 77
Pods/MessageKit/Sources/Models/DetectorType.swift

@@ -1,77 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-public enum DetectorType: Hashable {
-
-    case address
-    case date
-    case phoneNumber
-    case url
-    case transitInformation
-    case custom(NSRegularExpression)
-
-    // swiftlint:disable force_try
-    public static var hashtag = DetectorType.custom(try! NSRegularExpression(pattern: "#[a-zA-Z0-9]{4,}", options: []))
-    public static var mention = DetectorType.custom(try! NSRegularExpression(pattern: "@[a-zA-Z0-9]{4,}", options: []))
-    // swiftlint:enable force_try
-
-    internal var textCheckingType: NSTextCheckingResult.CheckingType {
-        switch self {
-        case .address: return .address
-        case .date: return .date
-        case .phoneNumber: return .phoneNumber
-        case .url: return .link
-        case .transitInformation: return .transitInformation
-        case .custom: return .regularExpression
-        }
-    }
-
-    /// Simply check if the detector type is a .custom
-    public var isCustom: Bool {
-        switch self {
-        case .custom: return true
-        default: return false
-        }
-    }
-
-    ///The hashValue of the `DetectorType` so we can conform to `Hashable` and be sorted.
-    public func hash(into: inout Hasher) {
-        into.combine(toInt())
-    }
-
-    /// Return an 'Int' value for each `DetectorType` type so `DetectorType` can conform to `Hashable`
-    private func toInt() -> Int {
-        switch self {
-        case .address: return 0
-        case .date: return 1
-        case .phoneNumber: return 2
-        case .url: return 3
-        case .transitInformation: return 4
-        case .custom(let regex): return regex.hashValue
-        }
-    }
-
-}

+ 0 - 55
Pods/MessageKit/Sources/Models/HorizontalEdgeInsets.swift

@@ -1,55 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A varient of `UIEdgeInsets` that only has horizontal inset properties
-public struct HorizontalEdgeInsets: Equatable {
-
-    public var left: CGFloat
-    public var right: CGFloat
-
-    public init(left: CGFloat, right: CGFloat) {
-        self.left = left
-        self.right = right
-    }
-
-    public static var zero: HorizontalEdgeInsets {
-        return HorizontalEdgeInsets(left: 0, right: 0)
-    }
-}
-
-public extension HorizontalEdgeInsets {
-
-    static func == (lhs: HorizontalEdgeInsets, rhs: HorizontalEdgeInsets) -> Bool {
-        return lhs.left == rhs.left && lhs.right == rhs.right
-    }
-}
-
-internal extension HorizontalEdgeInsets {
-
-    internal var horizontal: CGFloat {
-        return left + right
-    }
-}

+ 0 - 47
Pods/MessageKit/Sources/Models/LabelAlignment.swift

@@ -1,47 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-public struct LabelAlignment: Equatable {
-
-    public var textAlignment: NSTextAlignment
-    public var textInsets: UIEdgeInsets
-    
-    public init(textAlignment: NSTextAlignment, textInsets: UIEdgeInsets) {
-        self.textAlignment = textAlignment
-        self.textInsets = textInsets
-    }
-
-}
-
-// MARK: - Equatable Conformance
-
-public extension LabelAlignment {
-
-    static func == (lhs: LabelAlignment, rhs: LabelAlignment) -> Bool {
-        return lhs.textAlignment == rhs.textAlignment && lhs.textInsets == rhs.textInsets
-    }
-
-}

+ 0 - 64
Pods/MessageKit/Sources/Models/LocationMessageSnapshotOptions.swift

@@ -1,64 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import MapKit
-
-/// An object grouping the settings used by the `MKMapSnapshotter` through the `LocationMessageDisplayDelegate`.
-public struct LocationMessageSnapshotOptions {
-
-    /// Initialize LocationMessageSnapshotOptions with given parameters
-    ///
-    /// - Parameters:
-    ///   - showsBuildings: A Boolean value indicating whether the snapshot image should display buildings.
-    ///   - showsPointsOfInterest: A Boolean value indicating whether the snapshot image should display points of interest.
-    ///   - span: The span of the snapshot.
-    ///   - scale: The scale of the snapshot.
-    public init(showsBuildings: Bool = false, showsPointsOfInterest: Bool = false, span: MKCoordinateSpan = MKCoordinateSpan(latitudeDelta: 0, longitudeDelta: 0), scale: CGFloat = UIScreen.main.scale) {
-        self.showsBuildings = showsBuildings
-        self.showsPointsOfInterest = showsPointsOfInterest
-        self.span = span
-        self.scale = scale
-    }
-    
-    /// A Boolean value indicating whether the snapshot image should display buildings.
-    ///
-    /// The default value of this property is `false`.
-    public var showsBuildings: Bool
-    
-    /// A Boolean value indicating whether the snapshot image should display points of interest.
-    ///
-    /// The default value of this property is `false`.
-    public var showsPointsOfInterest: Bool
-    
-    /// The span of the snapshot.
-    ///
-    /// The default value of this property uses a width of `0` and height of `0`.
-    public var span: MKCoordinateSpan
-    
-    /// The scale of the snapshot.
-    ///
-    /// The default value of this property uses the `UIScreen.main.scale`.
-    public var scale: CGFloat
-    
-}

+ 0 - 72
Pods/MessageKit/Sources/Models/MessageKind.swift

@@ -1,72 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// An enum representing the kind of message and its underlying kind.
-public enum MessageKind {
-
-    /// A standard text message.
-    ///
-    /// - Note: The font used for this message will be the value of the
-    /// `messageLabelFont` property in the `MessagesCollectionViewFlowLayout` object.
-    ///
-    /// Using `MessageKind.attributedText(NSAttributedString)` doesn't require you
-    /// to set this property and results in higher performance.
-    case text(String)
-    
-    /// A message with attributed text.
-    case attributedText(NSAttributedString)
-
-    /// A photo message.
-    case photo(MediaItem)
-
-    /// A video message.
-    case video(MediaItem)
-
-    /// A location message.
-    case location(LocationItem)
-
-    /// An emoji message.
-    case emoji(String)
-
-    /// An audio message.
-    case audio(AudioItem)
-    
-    /// A contact message.
-    case contact(ContactItem)
-
-    /// A custom message.
-    /// - Note: Using this case requires that you implement the following methods and handle this case:
-    ///   - MessagesDataSource: customCell(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UICollectionViewCell
-    ///   - MessagesLayoutDelegate: customCellSizeCalculator(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CellSizeCalculator
-    case custom(Any?)
-
-    // MARK: - Not supported yet
-
-//    case system(String)
-//    
-//    case placeholder
-
-}

+ 0 - 66
Pods/MessageKit/Sources/Models/MessageKitDateFormatter.swift

@@ -1,66 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-open class MessageKitDateFormatter {
-
-    // MARK: - Properties
-
-    public static let shared = MessageKitDateFormatter()
-
-    private let formatter = DateFormatter()
-
-    // MARK: - Initializer
-
-    private init() {}
-
-    // MARK: - Methods
-
-    public func string(from date: Date) -> String {
-        configureDateFormatter(for: date)
-        return formatter.string(from: date)
-    }
-
-    public func attributedString(from date: Date, with attributes: [NSAttributedString.Key: Any]) -> NSAttributedString {
-        let dateString = string(from: date)
-        return NSAttributedString(string: dateString, attributes: attributes)
-    }
-
-    open func configureDateFormatter(for date: Date) {
-        switch true {
-        case Calendar.current.isDateInToday(date) || Calendar.current.isDateInYesterday(date):
-            formatter.doesRelativeDateFormatting = true
-            formatter.dateStyle = .short
-            formatter.timeStyle = .short
-        case Calendar.current.isDate(date, equalTo: Date(), toGranularity: .weekOfYear):
-            formatter.dateFormat = "EEEE h:mm a"
-        case Calendar.current.isDate(date, equalTo: Date(), toGranularity: .year):
-            formatter.dateFormat = "E, d MMM, h:mm a"
-        default:
-            formatter.dateFormat = "MMM d, yyyy, h:mm a"
-        }
-    }
-    
-}

+ 0 - 38
Pods/MessageKit/Sources/Models/MessageKitError.swift

@@ -1,38 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-internal enum MessageKitError {
-    internal static let avatarPositionUnresolved = "AvatarPosition Horizontal.natural needs to be resolved."
-    internal static let nilMessagesDataSource = "MessagesDataSource has not been set."
-    internal static let nilMessagesDisplayDelegate = "MessagesDisplayDelegate has not been set."
-    internal static let nilMessagesLayoutDelegate = "MessagesLayoutDelegate has not been set."
-    internal static let notMessagesCollectionView = "The collectionView is not a MessagesCollectionView."
-    internal static let layoutUsedOnForeignType = "MessagesCollectionViewFlowLayout is being used on a foreign type."
-    internal static let unrecognizedSectionKind = "Received unrecognized element kind:"
-    internal static let unrecognizedCheckingResult = "Received an unrecognized NSTextCheckingResult.CheckingType"
-    internal static let couldNotLoadAssetsBundle = "MessageKit: Could not load the assets bundle"
-    internal static let couldNotCreateAssetsPath = "MessageKit: Could not create path to the assets bundle."
-    internal static let customDataUnresolvedCell = "Did not return a cell for MessageKind.custom(Any)."
-    internal static let customDataUnresolvedSize = "Did not return a size for MessageKind.custom(Any)."
-}

+ 0 - 151
Pods/MessageKit/Sources/Models/MessageStyle.swift

@@ -1,151 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-public enum MessageStyle {
-
-    // MARK: - TailCorner
-
-    public enum TailCorner: String {
-
-        case topLeft
-        case bottomLeft
-        case topRight
-        case bottomRight
-
-        internal var imageOrientation: UIImage.Orientation {
-            switch self {
-            case .bottomRight: return .up
-            case .bottomLeft: return .upMirrored
-            case .topLeft: return .down
-            case .topRight: return .downMirrored
-            }
-        }
-    }
-
-    // MARK: - TailStyle
-
-    public enum TailStyle {
-
-        case curved
-        case pointedEdge
-
-        internal var imageNameSuffix: String {
-            switch self {
-            case .curved:
-                return "_tail_v2"
-            case .pointedEdge:
-                return "_tail_v1"
-            }
-        }
-    }
-
-    // MARK: - MessageStyle
-
-    case none
-    case bubble
-    case bubbleOutline(UIColor)
-    case bubbleTail(TailCorner, TailStyle)
-    case bubbleTailOutline(UIColor, TailCorner, TailStyle)
-    case custom((MessageContainerView) -> Void)
-
-    // MARK: - Public
-
-    public var image: UIImage? {
-        
-        guard let imageCacheKey = imageCacheKey, let path = imagePath else { return nil }
-
-        let cache = MessageStyle.bubbleImageCache
-
-        if let cachedImage = cache.object(forKey: imageCacheKey as NSString) {
-            return cachedImage
-        }
-        guard var image = UIImage(contentsOfFile: path) else { return nil }
-        
-        switch self {
-        case .none, .custom:
-            return nil
-        case .bubble, .bubbleOutline:
-            break
-        case .bubbleTail(let corner, _), .bubbleTailOutline(_, let corner, _):
-            guard let cgImage = image.cgImage else { return nil }
-            image = UIImage(cgImage: cgImage, scale: image.scale, orientation: corner.imageOrientation)
-        }
-        
-        let stretchedImage = stretch(image)
-        cache.setObject(stretchedImage, forKey: imageCacheKey as NSString)
-        return stretchedImage
-    }
-
-    // MARK: - Internal
-    
-    internal static let bubbleImageCache: NSCache<NSString, UIImage> = {
-        let cache = NSCache<NSString, UIImage>()
-        cache.name = "com.messagekit.MessageKit.bubbleImageCache"
-        return cache
-    }()
-    
-    // MARK: - Private
-    
-    private var imageCacheKey: String? {
-        guard let imageName = imageName else { return nil }
-        
-        switch self {
-        case .bubble, .bubbleOutline:
-            return imageName
-        case .bubbleTail(let corner, _), .bubbleTailOutline(_, let corner, _):
-            return imageName + "_" + corner.rawValue
-        default:
-            return nil
-        }
-    }
-
-    private var imageName: String? {
-        switch self {
-        case .bubble:
-            return "bubble_full"
-        case .bubbleOutline:
-            return "bubble_outlined"
-        case .bubbleTail(_, let tailStyle):
-            return "bubble_full" + tailStyle.imageNameSuffix
-        case .bubbleTailOutline(_, _, let tailStyle):
-            return "bubble_outlined" + tailStyle.imageNameSuffix
-        case .none, .custom:
-            return nil
-        }
-    }
-
-    private var imagePath: String? {
-        guard let imageName = imageName else { return nil }
-        let assetBundle = Bundle.messageKitAssetBundle()
-        return assetBundle.path(forResource: imageName, ofType: "png", inDirectory: "Images")
-    }
-
-    private func stretch(_ image: UIImage) -> UIImage {
-        let center = CGPoint(x: image.size.width / 2, y: image.size.height / 2)
-        let capInsets = UIEdgeInsets(top: center.y, left: center.x, bottom: center.y, right: center.x)
-        return image.resizableImage(withCapInsets: capInsets, resizingMode: .stretch)
-    }
-}

+ 0 - 81
Pods/MessageKit/Sources/Models/NSConstraintLayoutSet.swift

@@ -1,81 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-internal class NSLayoutConstraintSet {
-    
-    internal var top: NSLayoutConstraint?
-    internal var bottom: NSLayoutConstraint?
-    internal var left: NSLayoutConstraint?
-    internal var right: NSLayoutConstraint?
-    internal var centerX: NSLayoutConstraint?
-    internal var centerY: NSLayoutConstraint?
-    internal var width: NSLayoutConstraint?
-    internal var height: NSLayoutConstraint?
-    
-    internal init(top: NSLayoutConstraint? = nil, bottom: NSLayoutConstraint? = nil,
-                  left: NSLayoutConstraint? = nil, right: NSLayoutConstraint? = nil,
-                  centerX: NSLayoutConstraint? = nil, centerY: NSLayoutConstraint? = nil,
-                  width: NSLayoutConstraint? = nil, height: NSLayoutConstraint? = nil) {
-        self.top = top
-        self.bottom = bottom
-        self.left = left
-        self.right = right
-        self.centerX = centerX
-        self.centerY = centerY
-        self.width = width
-        self.height = height
-    }
-
-    /// All of the currently configured constraints
-    private var availableConstraints: [NSLayoutConstraint] {
-        let constraints = [top, bottom, left, right, centerX, centerY, width, height]
-        var available: [NSLayoutConstraint] = []
-        for constraint in constraints {
-            if let value = constraint {
-                available.append(value)
-            }
-        }
-        return available
-    }
-    
-    /// Activates all of the non-nil constraints
-    ///
-    /// - Returns: Self
-    @discardableResult
-    internal func activate() -> Self {
-        NSLayoutConstraint.activate(availableConstraints)
-        return self
-    }
-    
-    /// Deactivates all of the non-nil constraints
-    ///
-    /// - Returns: Self
-    @discardableResult
-    internal func deactivate() -> Self {
-        NSLayoutConstraint.deactivate(availableConstraints)
-        return self
-    }
-}

+ 0 - 57
Pods/MessageKit/Sources/Models/Sender.swift

@@ -1,57 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// An object that groups the metadata of a messages sender.
-@available(*, deprecated: 3.0.0, message: "`Sender` has been replaced with the `SenderType` protocol in 3.0.0")
-public struct Sender: SenderType {
-
-    /// MARK: - Properties
-
-    /// The unique String identifier for the sender.
-    ///
-    /// Note: This value must be unique across all senders.
-    public let senderId: String
-
-    @available(*, deprecated: 3.0.0, message: "`id` has been renamed `senderId` as defined in the `SenderType` protocol")
-    public var id: String {
-        return senderId
-    }
-
-    /// The display name of a sender.
-    public let displayName: String
-
-    // MARK: - Intializers
-
-    public init(senderId: String, displayName: String) {
-        self.senderId = senderId
-        self.displayName = displayName
-    }
-
-    @available(*, deprecated: 3.0.0, message: "`id` has been renamed `senderId` as defined in the `SenderType` protocol")
-    public init(id: String, displayName: String) {
-        self.init(senderId: id, displayName: displayName)
-    }
-}

+ 0 - 39
Pods/MessageKit/Sources/Protocols/AudioItem.swift

@@ -1,39 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import class AVFoundation.AVAudioPlayer
-
-/// A protocol used to represent the data for an audio message.
-public protocol AudioItem {
-
-    /// The url where the audio file is located.
-    var url: URL { get }
-
-    /// The audio file duration in seconds.
-    var duration: Float { get }
-
-    /// The size of the audio item.
-    var size: CGSize { get }
-
-}

+ 0 - 41
Pods/MessageKit/Sources/Protocols/ContactItem.swift

@@ -1,41 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2018 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A protocol used to represent the data for a contact message.
-public protocol ContactItem {
-    
-    /// contact displayed name
-    var displayName: String { get }
-    
-    /// initials from contact first and last name
-    var initials: String { get }
-    
-    /// contact phone numbers
-    var phoneNumbers: [String] { get }
-    
-    /// contact emails
-    var emails: [String] { get }
-}

+ 0 - 36
Pods/MessageKit/Sources/Protocols/LocationItem.swift

@@ -1,36 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import class CoreLocation.CLLocation
-
-/// A protocol used to represent the data for a location message.
-public protocol LocationItem {
-
-    /// The location.
-    var location: CLLocation { get }
-
-    /// The size of the location item.
-    var size: CGSize { get }
-
-}

+ 0 - 42
Pods/MessageKit/Sources/Protocols/MediaItem.swift

@@ -1,42 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A protocol used to represent the data for a media message.
-public protocol MediaItem {
-
-    /// The url where the media is located.
-    var url: URL? { get }
-
-    /// The image.
-    var image: UIImage? { get }
-
-    /// A placeholder image for when the image is obtained asychronously.
-    var placeholderImage: UIImage { get }
-
-    /// The size of the media item.
-    var size: CGSize { get }
-
-}

+ 0 - 180
Pods/MessageKit/Sources/Protocols/MessageCellDelegate.swift

@@ -1,180 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A protocol used by `MessageContentCell` subclasses to detect taps in the cell's subviews.
-public protocol MessageCellDelegate: MessageLabelDelegate {
-
-    /// Triggered when a tap occurs in the background of the cell.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell where the tap occurred.
-    ///
-    /// - Note:
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didTapBackground(in cell: MessageCollectionViewCell)
-
-    /// Triggered when a tap occurs in the `MessageContainerView`.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell where the tap occurred.
-    ///
-    /// - Note:
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didTapMessage(in cell: MessageCollectionViewCell)
-
-    /// Triggered when a tap occurs in the `AvatarView`.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell where the tap occurred.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didTapAvatar(in cell: MessageCollectionViewCell)
-
-    /// Triggered when a tap occurs in the cellTopLabel.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell tap the touch occurred.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didTapCellTopLabel(in cell: MessageCollectionViewCell)
-    
-    /// Triggered when a tap occurs in the cellBottomLabel.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell tap the touch occurred.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didTapCellBottomLabel(in cell: MessageCollectionViewCell)
-    
-    /// Triggered when a tap occurs in the messageTopLabel.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell tap the touch occurred.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didTapMessageTopLabel(in cell: MessageCollectionViewCell)
-
-    /// Triggered when a tap occurs in the messageBottomLabel.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell where the tap occurred.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didTapMessageBottomLabel(in cell: MessageCollectionViewCell)
-    
-    /// Triggered when a tap occurs in the accessoryView.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell where the tap occurred.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didTapAccessoryView(in cell: MessageCollectionViewCell)
-
-    /// Triggered when a tap occurs on the play button from audio cell.
-    ///
-    /// - Parameters:
-    ///   - cell: The audio cell where the touch occurred.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didTapPlayButton(in cell: AudioMessageCell)
-
-    /// Triggered when audio player start playing audio.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell where the audio sound is playing.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didStartAudio(in cell: AudioMessageCell)
-
-    /// Triggered when audio player pause audio.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell where the audio sound is paused.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didPauseAudio(in cell: AudioMessageCell)
-
-    /// Triggered when audio player stoped audio.
-    ///
-    /// - Parameters:
-    ///   - cell: The cell where the audio sound is stoped.
-    ///
-    /// You can get a reference to the `MessageType` for the cell by using `UICollectionView`'s
-    /// `indexPath(for: cell)` method. Then using the returned `IndexPath` with the `MessagesDataSource`
-    /// method `messageForItem(at:indexPath:messagesCollectionView)`.
-    func didStopAudio(in cell: AudioMessageCell)
-
-}
-
-public extension MessageCellDelegate {
-
-    func didTapBackground(in cell: MessageCollectionViewCell) {}
-
-    func didTapMessage(in cell: MessageCollectionViewCell) {}
-
-    func didTapAvatar(in cell: MessageCollectionViewCell) {}
-
-    func didTapCellTopLabel(in cell: MessageCollectionViewCell) {}
-    
-    func didTapCellBottomLabel(in cell: MessageCollectionViewCell) {}
-
-    func didTapMessageTopLabel(in cell: MessageCollectionViewCell) {}
-
-    func didTapPlayButton(in cell: AudioMessageCell) {}
-
-    func didStartAudio(in cell: AudioMessageCell) {}
-
-    func didPauseAudio(in cell: AudioMessageCell) {}
-
-    func didStopAudio(in cell: AudioMessageCell) {}
-
-    func didTapMessageBottomLabel(in cell: MessageCollectionViewCell) {}
-    
-    func didTapAccessoryView(in cell: MessageCollectionViewCell) {}
-
-}

+ 0 - 99
Pods/MessageKit/Sources/Protocols/MessageLabelDelegate.swift

@@ -1,99 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A protocol used to handle tap events on detected text.
-public protocol MessageLabelDelegate: AnyObject {
-
-    /// Triggered when a tap occurs on a detected address.
-    ///
-    /// - Parameters:
-    ///   - addressComponents: The components of the selected address.
-    func didSelectAddress(_ addressComponents: [String: String])
-
-    /// Triggered when a tap occurs on a detected date.
-    ///
-    /// - Parameters:
-    ///   - date: The selected date.
-    func didSelectDate(_ date: Date)
-
-    /// Triggered when a tap occurs on a detected phone number.
-    ///
-    /// - Parameters:
-    ///   - phoneNumber: The selected phone number.
-    func didSelectPhoneNumber(_ phoneNumber: String)
-
-    /// Triggered when a tap occurs on a detected URL.
-    ///
-    /// - Parameters:
-    ///   - url: The selected URL.
-    func didSelectURL(_ url: URL)
-
-    /// Triggered when a tap occurs on detected transit information.
-    ///
-    /// - Parameters:
-    ///   - transitInformation: The selected transit information.
-    func didSelectTransitInformation(_ transitInformation: [String: String])
-    
-    /// Triggered when a tap occurs on a mention
-    ///
-    /// - Parameters:
-    ///   - mention: The selected mention
-    func didSelectMention(_ mention: String)
-    
-    /// Triggered when a tap occurs on a hashtag
-    ///
-    /// - Parameters:
-    ///   - mention: The selected hashtag
-    func didSelectHashtag(_ hashtag: String)
-
-    /// Triggered when a tap occurs on a custom regular expression
-    ///
-    /// - Parameters:
-    ///   - pattern: the pattern of the regular expression
-    ///   - match: part that match with the regular expression
-    func didSelectCustom(_ pattern: String, match: String?)
-
-}
-
-public extension MessageLabelDelegate {
-
-    func didSelectAddress(_ addressComponents: [String: String]) {}
-
-    func didSelectDate(_ date: Date) {}
-
-    func didSelectPhoneNumber(_ phoneNumber: String) {}
-
-    func didSelectURL(_ url: URL) {}
-    
-    func didSelectTransitInformation(_ transitInformation: [String: String]) {}
-
-    func didSelectMention(_ mention: String) {}
-
-    func didSelectHashtag(_ hashtag: String) {}
-
-    func didSelectCustom(_ pattern: String, match: String?) {}
-
-}

+ 0 - 43
Pods/MessageKit/Sources/Protocols/MessageType.swift

@@ -1,43 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A standard protocol representing a message.
-/// Use this protocol to create your own message object to be used by MessageKit.
-public protocol MessageType {
-
-    /// The sender of the message.
-    var sender: SenderType { get }
-
-    /// The unique identifier for the message.
-    var messageId: String { get }
-
-    /// The date the message was sent.
-    var sentDate: Date { get }
-
-    /// The kind of message and its underlying kind.
-    var kind: MessageKind { get }
-
-}

+ 0 - 159
Pods/MessageKit/Sources/Protocols/MessagesDataSource.swift

@@ -1,159 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// An object that adopts the `MessagesDataSource` protocol is responsible for providing
-/// the data required by a `MessagesCollectionView`.
-public protocol MessagesDataSource: AnyObject {
-
-    /// The `SenderType` of new messages in the `MessagesCollectionView`.
-    func currentSender() -> SenderType
-
-    /// A helper method to determine if a given message is from the current `SenderType`.
-    ///
-    /// - Parameters:
-    ///   - message: The message to check if it was sent by the current `SenderType`.
-    ///
-    /// - Note:
-    ///   The default implementation of this method checks for equality between
-    ///   the message's `SenderType` and the current `SenderType`.
-    func isFromCurrentSender(message: MessageType) -> Bool
-
-    /// The message to be used for a `MessageCollectionViewCell` at the given `IndexPath`.
-    ///
-    /// - Parameters:
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which the message will be displayed.
-    func messageForItem(at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> MessageType
-
-    /// The number of sections to be displayed in the `MessagesCollectionView`.
-    ///
-    /// - Parameters:
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which the messages will be displayed.
-    func numberOfSections(in messagesCollectionView: MessagesCollectionView) -> Int
-
-    /// The number of cells to be displayed in the `MessagesCollectionView`.
-    ///
-    /// - Parameters:
-    ///   - section: The number of the section in which the cells will be displayed.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which the messages will be displayed.
-    /// - Note:
-    ///   The default implementation of this method returns 1. Putting each message in its own section.
-    func numberOfItems(inSection section: Int, in messagesCollectionView: MessagesCollectionView) -> Int
-
-    /// The attributed text to be used for cell's top label.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed by this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// The default value returned by this method is `nil`.
-    func cellTopLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString?
-    
-    /// The attributed text to be used for cell's bottom label.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed by this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// The default value returned by this method is `nil`.
-    func cellBottomLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString?
-    
-    /// The attributed text to be used for message bubble's top label.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed by this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// The default value returned by this method is `nil`.
-    func messageTopLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString?
-
-    /// The attributed text to be used for cell's bottom label.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed by this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// The default value returned by this method is `nil`.
-    func messageBottomLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString?
-    
-    /// Custom collectionView cell for message with `custom` message type.
-    ///
-    /// - Parameters:
-    ///   - message: The `custom` message type
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   This method will call fatalError() on default. You must override this method if you are using MessageKind.custom messages.
-    func customCell(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UICollectionViewCell
-
-    /// Typing indicator cell used when the indicator is set to be shown
-    ///
-    /// - Parameters:
-    ///   - indexPath: The index path to dequeue the cell at
-    ///   - messagesCollectionView: The `MessagesCollectionView` the cell is to be rendered in
-    /// - Returns: A `UICollectionViewCell` that indicates a user is typing
-    func typingIndicator(at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UICollectionViewCell
-}
-
-public extension MessagesDataSource {
-
-    func isFromCurrentSender(message: MessageType) -> Bool {
-        return message.sender.senderId == currentSender().senderId
-    }
-
-    func numberOfItems(inSection section: Int, in messagesCollectionView: MessagesCollectionView) -> Int {
-        return 1
-    }
-
-    func cellTopLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString? {
-        return nil
-    }
-    
-    func cellBottomLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString? {
-        return nil
-    }
-    
-    func messageTopLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString? {
-        return nil
-    }
-
-    func messageBottomLabelAttributedText(for message: MessageType, at indexPath: IndexPath) -> NSAttributedString? {
-        return nil
-    }
-    
-    func customCell(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UICollectionViewCell {
-        fatalError(MessageKitError.customDataUnresolvedCell)
-    }
-
-    func typingIndicator(at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UICollectionViewCell {
-        return messagesCollectionView.dequeueReusableCell(TypingIndicatorCell.self, for: indexPath)
-    }
-}

+ 0 - 314
Pods/MessageKit/Sources/Protocols/MessagesDisplayDelegate.swift

@@ -1,314 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-import MapKit
-
-/// A protocol used by the `MessagesViewController` to customize the appearance of a `MessageContentCell`.
-public protocol MessagesDisplayDelegate: AnyObject {
-
-    // MARK: - All Messages
-
-    /// Specifies the `MessageStyle` to be used for a `MessageContainerView`.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed by this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is `MessageStyle.bubble`.
-    func messageStyle(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> MessageStyle
-
-    /// Specifies the background color of the `MessageContainerView`.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed by this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default value is `UIColor.clear` for emoji messages.
-    ///   For all other `MessageKind` cases, the color depends on the `SenderType`.
-    ///
-    ///   Current sender: Green
-    ///
-    ///   All other senders: Gray
-    func backgroundColor(for message: MessageType, at  indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UIColor
-
-    /// The section header to use for a given `IndexPath`.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed for this header.
-    ///   - indexPath: The `IndexPath` of the header.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this header will be displayed.
-    func messageHeaderView(for indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> MessageReusableView
-
-    /// The section footer to use for a given `IndexPath`.
-    ///
-    /// - Parameters:
-    ///   - indexPath: The `IndexPath` of the footer.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this footer will be displayed.
-    func messageFooterView(for indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> MessageReusableView
-    
-    /// Used to configure the `AvatarView`‘s image in a `MessageContentCell` class.
-    ///
-    /// - Parameters:
-    ///   - avatarView: The `AvatarView` of the cell.
-    ///   - message: The `MessageType` that will be displayed by this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default image configured by this method is `?`.
-    func configureAvatarView(_ avatarView: AvatarView, for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView)
-
-    /// Used to configure the `AccessoryView` in a `MessageContentCell` class.
-    ///
-    /// - Parameters:
-    ///   - accessoryView: The `AccessoryView` of the cell.
-    ///   - message: The `MessageType` that will be displayed by this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default image configured by this method is `?`.
-    func configureAccessoryView(_ accessoryView: UIView, for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView)
-
-    // MARK: - Text Messages
-
-    /// Specifies the color of the text for a `TextMessageCell`.
-    ///
-    /// - Parameters:
-    ///   - message: A `MessageType` with a `MessageKind` case of `.text` to which the color will apply.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is determined by the messages `SenderType`.
-    ///
-    ///   Current sender: UIColor.white
-    ///
-    ///   All other senders: UIColor.darkText
-    func textColor(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UIColor
-
-    /// Specifies the `DetectorType`s to check for the `MessageType`'s text against.
-    ///
-    /// - Parameters:
-    ///   - message: A `MessageType` with a `MessageKind` case of `.text` or `.attributedText` to which the detectors will apply.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   This method returns an empty array by default.
-    func enabledDetectors(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> [DetectorType]
-
-    /// Specifies the attributes for a given `DetectorType`
-    ///
-    /// - Parameters:
-    ///   - detector: The `DetectorType` for the applied attributes.
-    ///   - message: A `MessageType` with a `MessageKind` case of `.text` or `.attributedText` to which the detectors will apply.
-    ///   - indexPath: The `IndexPath` of the cell.
-    func detectorAttributes(for detector: DetectorType, and message: MessageType, at indexPath: IndexPath) -> [NSAttributedString.Key: Any]
-
-    // MARK: - Location Messages
-
-    /// Used to configure a `LocationMessageSnapshotOptions` instance to customize the map image on the given location message.
-    ///
-    /// - Parameters:
-    ///   - message: A `MessageType` with a `MessageKind` case of `.location`.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` requesting the information.
-    /// - Returns: The LocationMessageSnapshotOptions instance with the options to customize map style.
-    func snapshotOptionsForLocation(message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> LocationMessageSnapshotOptions
-
-    /// Used to configure the annoation view of the map image on the given location message.
-    ///
-    /// - Parameters:
-    ///   - message: A `MessageType` with a `MessageKind` case of `.location`.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` requesting the information.
-    /// - Returns: The `MKAnnotationView` to use as the annotation view.
-    func annotationViewForLocation(message: MessageType, at indexPath: IndexPath, in messageCollectionView: MessagesCollectionView) -> MKAnnotationView?
-
-    /// Ask the delegate for a custom animation block to run when whe map screenshot is ready to be displaied in the given location message.
-    /// The animation block is called with the `UIImageView` to be animated.
-    ///
-    /// - Parameters:
-    ///   - message: A `MessageType` with a `MessageKind` case of `.location`.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` requesting the information.
-    /// - Returns: The animation block to use to apply the location image.
-    func animationBlockForLocation(message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> ((UIImageView) -> Void)?
-
-    // MARK: - Media Messages
-
-    /// Used to configure the `UIImageView` of a `MediaMessageCell.
-    ///
-    /// - Parameters:
-    ///   - imageView: The `UIImageView` of the cell.
-    ///   - message: The `MessageType` that will be displayed by this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    func configureMediaMessageImageView(_ imageView: UIImageView, for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView)
-
-    // MARK: - Audio Message
-    
-    /// Used to configure the audio cell UI:
-    ///     1. play button selected state;
-    ///     2. progresssView progress;
-    ///     3. durationLabel text;
-    ///
-    /// - Parameters:
-    ///   - cell: The `AudioMessageCell` that needs to be configure.
-    ///   - message: The `MessageType` that configures the cell.
-    ///
-    /// - Note:
-    ///   This protocol method is called by MessageKit every time an audio cell needs to be configure
-    func configureAudioCell(_ cell: AudioMessageCell, message: MessageType)
-
-    /// Specifies the tint color of play button and progress bar for an `AudioMessageCell`.
-    ///
-    /// - Parameters:
-    ///   - message: A `MessageType` with a `MessageKind` case of `.audio` to which the color will apply.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is UIColor.sendButtonBlue
-    func audioTintColor(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UIColor
-
-    /// Used to format the audio sound duration in a readable string
-    ///
-    /// - Parameters:
-    ///   - duration: The audio sound duration is seconds.
-    ///   - audioCell: The `AudioMessageCell` that ask for formated duration.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default value is computed like fallow:
-    ///     1. return the time as 0:ss if duration is up to 59 seconds                         (e.g. 0:03     means 0 minutes and 3 seconds)
-    ///     2. return the time as m:ss if duration is greater than 59 and lower than 3600      (e.g. 12:23    means 12 mintues and 23 seconds)
-    ///     3. return the time as h:mm:ss for anything longer that 3600 seconds                (e.g. 1:19:08  means 1 hour 19 minutes and 8 seconds)
-    func audioProgressTextFormat(_ duration: Float, for audioCell: AudioMessageCell, in messageCollectionView: MessagesCollectionView) -> String
-
-}
-
-public extension MessagesDisplayDelegate {
-
-    // MARK: - All Messages Defaults
-
-    func messageStyle(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> MessageStyle {
-        return .bubble
-    }
-
-    func backgroundColor(for message: MessageType, at  indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UIColor {
-
-        switch message.kind {
-        case .emoji:
-            return .clear
-        default:
-            guard let dataSource = messagesCollectionView.messagesDataSource else { return .white }
-            return dataSource.isFromCurrentSender(message: message) ? .outgoingGreen : .incomingGray
-        }
-    }
-    
-    func messageHeaderView(for indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> MessageReusableView {
-        return messagesCollectionView.dequeueReusableHeaderView(MessageReusableView.self, for: indexPath)
-    }
-
-    func messageFooterView(for indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> MessageReusableView {
-        return messagesCollectionView.dequeueReusableFooterView(MessageReusableView.self, for: indexPath)
-    }
-    
-    func configureAvatarView(_ avatarView: AvatarView, for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) {
-        avatarView.initials = "?"
-    }
-
-    func configureAccessoryView(_ accessoryView: UIView, for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) {}
-
-    // MARK: - Text Messages Defaults
-
-    func textColor(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UIColor {
-        guard let dataSource = messagesCollectionView.messagesDataSource else {
-            fatalError(MessageKitError.nilMessagesDataSource)
-        }
-        return dataSource.isFromCurrentSender(message: message) ? .white : .darkText
-    }
-
-    func enabledDetectors(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> [DetectorType] {
-        return []
-    }
-
-    func detectorAttributes(for detector: DetectorType, and message: MessageType, at indexPath: IndexPath) -> [NSAttributedString.Key: Any] {
-        return MessageLabel.defaultAttributes
-    }
-
-    // MARK: - Location Messages Defaults
-
-    func snapshotOptionsForLocation(message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> LocationMessageSnapshotOptions {
-        return LocationMessageSnapshotOptions()
-    }
-
-    func annotationViewForLocation(message: MessageType, at indexPath: IndexPath, in messageCollectionView: MessagesCollectionView) -> MKAnnotationView? {
-        return MKPinAnnotationView(annotation: nil, reuseIdentifier: nil)
-    }
-
-    func animationBlockForLocation(message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> ((UIImageView) -> Void)? {
-        return nil
-    }
-
-    // MARK: - Media Message Defaults
-
-    func configureMediaMessageImageView(_ imageView: UIImageView, for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) {
-    }
-
-    // MARK: - Audio Message Defaults
-    
-    func configureAudioCell(_ cell: AudioMessageCell, message: MessageType) {
-        
-    }
-
-    func audioTintColor(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UIColor {
-        return UIColor.sendButtonBlue
-    }
-
-    func audioProgressTextFormat(_ duration: Float, for audioCell: AudioMessageCell, in messageCollectionView: MessagesCollectionView) -> String {
-        var retunValue = "0:00"
-        // print the time as 0:ss if duration is up to 59 seconds
-        // print the time as m:ss if duration is up to 59:59 seconds
-        // print the time as h:mm:ss for anything longer
-        if duration < 60 {
-            retunValue = String(format: "0:%.02d", Int(duration.rounded(.up)))
-        } else if duration < 3600 {
-            retunValue = String(format: "%.02d:%.02d", Int(duration/60), Int(duration) % 60)
-        } else {
-            let hours = Int(duration/3600)
-            let remainingMinutsInSeconds = Int(duration) - hours*3600
-            retunValue = String(format: "%.02d:%.02d:%.02d", hours, Int(remainingMinutsInSeconds/60), Int(remainingMinutsInSeconds) % 60)
-        }
-        return retunValue
-    }
-
-}

+ 0 - 163
Pods/MessageKit/Sources/Protocols/MessagesLayoutDelegate.swift

@@ -1,163 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A protocol used by the `MessagesCollectionViewFlowLayout` object to determine
-/// the size and layout of a `MessageCollectionViewCell` and its contents.
-public protocol MessagesLayoutDelegate: AnyObject {
-
-    /// Specifies the size to use for a header view.
-    ///
-    /// - Parameters:
-    ///   - section: The section number of the header.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this header will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is a size of `GGSize.zero`.
-    func headerViewSize(for section: Int, in messagesCollectionView: MessagesCollectionView) -> CGSize
-
-    /// Specifies the size to use for a footer view.
-    ///
-    /// - Parameters:
-    ///   - section: The section number of the footer.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this footer will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is a size of `GGSize.zero`.
-    func footerViewSize(for section: Int, in messagesCollectionView: MessagesCollectionView) -> CGSize
-
-    /// Specifies the size to use for a typing indicator view.
-    ///
-    /// - Parameters:
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this view will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is the width of the `messagesCollectionView` and
-    ///   a height of 52.
-    func typingIndicatorViewSize(in messagesCollectionView: MessagesCollectionView) -> CGSize
-
-    /// Specifies the top inset to use for a typing indicator view.
-    ///
-    /// - Parameters:
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this view will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is a top inset of 15.
-    func typingIndicatorViewTopInset(in messagesCollectionView: MessagesCollectionView) -> CGFloat
-
-    /// Specifies the height for the `MessageContentCell`'s top label.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed for this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is zero.
-    func cellTopLabelHeight(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CGFloat
-    
-    /// Specifies the height for the `MessageContentCell`'s bottom label.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed for this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is zero.
-    func cellBottomLabelHeight(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CGFloat
-    
-    /// Specifies the height for the message bubble's top label.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed for this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is zero.
-    func messageTopLabelHeight(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CGFloat
-
-    /// Specifies the height for the `MessageContentCell`'s bottom label.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` that will be displayed for this cell.
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default value returned by this method is zero.
-    func messageBottomLabelHeight(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CGFloat
-    
-    /// Custom cell size calculator for messages with MessageType.custom.
-    ///
-    /// - Parameters:
-    ///   - message: The custom message
-    ///   - indexPath: The `IndexPath` of the cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
-    ///
-    /// - Note:
-    ///   The default implementation will throw fatalError(). You must override this method if you are using messages with MessageType.custom.
-    func customCellSizeCalculator(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CellSizeCalculator
-}
-
-public extension MessagesLayoutDelegate {
-
-    func headerViewSize(for section: Int, in messagesCollectionView: MessagesCollectionView) -> CGSize {
-        return .zero
-    }
-
-    func footerViewSize(for section: Int, in messagesCollectionView: MessagesCollectionView) -> CGSize {
-        return .zero
-    }
-
-    func typingIndicatorViewSize(in messagesCollectionView: MessagesCollectionView) -> CGSize {
-        return CGSize(width: messagesCollectionView.bounds.width, height: 48)
-    }
-
-    func typingIndicatorViewTopInset(in messagesCollectionView: MessagesCollectionView) -> CGFloat {
-        return 15
-    }
-
-    func cellTopLabelHeight(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CGFloat {
-        return 0
-    }
-    
-    func cellBottomLabelHeight(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CGFloat {
-        return 0
-    }
-    
-    func messageTopLabelHeight(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CGFloat {
-        return 0
-    }
-
-    func messageBottomLabelHeight(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CGFloat {
-        return 0
-    }
-    
-    func customCellSizeCalculator(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CellSizeCalculator {
-        fatalError("Must return a CellSizeCalculator for MessageKind.custom(Any?)")
-    }
-}

+ 0 - 38
Pods/MessageKit/Sources/Protocols/SenderType.swift

@@ -1,38 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-/// A standard protocol representing a sender.
-/// Use this protocol to adhere a object as the sender of a MessageType
-public protocol SenderType {
-
-    /// The unique String identifier for the sender.
-    ///
-    /// Note: This value must be unique across all senders.
-    var senderId: String { get }
-
-    /// The display name of a sender.
-    var displayName: String { get }
-}

+ 0 - 55
Pods/MessageKit/Sources/Supporting/MessageInputBar.swift

@@ -1,55 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-import InputBarAccessoryView
-
-@available(*, obsoleted: 3.0.0, renamed: "InputBarAccessoryView")
-public typealias MessageInputBar = InputBarAccessoryView
-
-@available(*, obsoleted: 3.0.0, renamed: "InputBarAccessoryViewDelegate")
-public typealias MessageInputBarDelegate = InputBarAccessoryViewDelegate
-
-//public extension MessageInputBarDelegate {
-//
-//    @available(*, obsoleted: 3.0.0, message: "`MessageInputBar` has been replaced with `InputBarAccessoryView` in 3.0.0. Use `inputBar(_ inputBar: InputBarAccessoryView, didPressSendButtonWith text: String)` instead.")
-//    func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String) {
-//    }
-//
-//    @available(*, obsoleted: 3.0.0, message: "`MessageInputBar` has been replaced with `InputBarAccessoryView` in 3.0.0. Use `inputBar(_ inputBar: InputBarAccessoryView, textViewTextDidChangeTo text: String)` instead.")
-//    func messageInputBar(_ inputBar: MessageInputBar, textViewTextDidChangeTo text: String) {
-//    }
-//
-//    @available(*, obsoleted: 3.0.0, message: "`MessageInputBar` has been replaced with `InputBarAccessoryView` in 3.0.0. Use `inputBar(_ inputBar: InputBarAccessoryView, didChangeIntrinsicContentTo size: CGSize)` instead.")
-//    func messageInputBar(_ inputBar: MessageInputBar, didChangeIntrinsicContentTo size: CGSize) {
-//    }
-//}
-//
-//extension InputBarButtonItem {
-//
-//    @available(*, renamed: "inputBarAccessoryView")
-//    public var messageInputBar: MessageInputBar? {
-//        return inputBarAccessoryView
-//    }
-//}

+ 0 - 72
Pods/MessageKit/Sources/Supporting/MessageKit+Availability.swift

@@ -1,72 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-public extension MessagesLayoutDelegate {
-
-    func avatarSize(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CGSize {
-        fatalError("avatarSize(for:at:in) has been removed in MessageKit 1.0.")
-    }
-
-    func avatarPosition(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> AvatarPosition {
-        fatalError("avatarPosition(for:at:in) has been removed in MessageKit 1.0.")
-    }
-
-    func messageLabelInset(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UIEdgeInsets {
-        fatalError("messageLabelInset(for:at:in) has been removed in MessageKit 1.0")
-    }
-
-    func messagePadding(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UIEdgeInsets {
-        fatalError("messagePadding(for:at:in) has been removed in MessageKit 1.0.")
-    }
-
-    func cellTopLabelAlignment(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> LabelAlignment {
-        fatalError("cellTopLabelAlignment(for:at:in) has been removed in MessageKit 1.0.")
-    }
-
-    func cellBottomLabelAlignment(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> LabelAlignment {
-        fatalError("cellBottomLabelAlignment(for:at:in) has been removed in MessageKit 1.0.")
-    }
-
-    func widthForMedia(message: MessageType, at indexPath: IndexPath, with maxWidth: CGFloat, in messagesCollectionView: MessagesCollectionView) -> CGFloat {
-        fatalError("widthForMedia(message:at:with:in) has been removed in MessageKit 1.0.")
-    }
-
-    func heightForMedia(message: MessageType, at indexPath: IndexPath, with maxWidth: CGFloat, in messagesCollectionView: MessagesCollectionView) -> CGFloat {
-        fatalError("heightForMedia(message:at:with:in) has been removed in MessageKit 1.0.")
-    }
-
-    func widthForLocation(message: MessageType, at indexPath: IndexPath, with maxWidth: CGFloat, in messagesCollectionView: MessagesCollectionView) -> CGFloat {
-        fatalError("widthForLocation(message:at:with:in) has been removed in MessageKit 1.0.")
-    }
-
-   func heightForLocation(message: MessageType, at indexPath: IndexPath, with maxWidth: CGFloat, in messagesCollectionView: MessagesCollectionView) -> CGFloat {
-        fatalError("heightForLocation(message:at:with:in) has been removed in MessageKit 1.0.")
-    }
-
-    func shouldCacheLayoutAttributes(for message: MessageType) -> Bool {
-        fatalError("shouldCacheLayoutAttributes(for:) has been removed in MessageKit 1.0.")
-    }
-}

+ 0 - 197
Pods/MessageKit/Sources/Views/AvatarView.swift

@@ -1,197 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-open class AvatarView: UIImageView {
-
-    // MARK: - Properties
-    
-    open var initials: String? {
-        didSet {
-            setImageFrom(initials: initials)
-        }
-    }
-
-    open var placeholderFont: UIFont = UIFont.preferredFont(forTextStyle: .caption1) {
-        didSet {
-            setImageFrom(initials: initials)
-        }
-    }
-
-    open var placeholderTextColor: UIColor = .white {
-        didSet {
-            setImageFrom(initials: initials)
-        }
-    }
-
-    open var fontMinimumScaleFactor: CGFloat = 0.5
-
-    open var adjustsFontSizeToFitWidth = true
-
-    private var minimumFontSize: CGFloat {
-        return placeholderFont.pointSize * fontMinimumScaleFactor
-    }
-
-    private var radius: CGFloat?
-
-    // MARK: - Overridden Properties
-    open override var frame: CGRect {
-        didSet {
-            setCorner(radius: self.radius)
-        }
-    }
-
-    open override var bounds: CGRect {
-        didSet {
-            setCorner(radius: self.radius)
-        }
-    }
-
-    // MARK: - Initializers
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-        prepareView()
-    }
-    
-    required public init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        prepareView()
-    }
-
-    convenience public init() {
-        self.init(frame: .zero)
-        prepareView()
-    }
-    
-    private func setImageFrom(initials: String?) {
-        guard let initials = initials else { return }
-        image = getImageFrom(initials: initials)
-    }
-
-    private func getImageFrom(initials: String) -> UIImage {
-        let width = frame.width
-        let height = frame.height
-        if width == 0 || height == 0 {return UIImage()}
-        var font = placeholderFont
-
-        _ = UIGraphicsBeginImageContextWithOptions(CGSize(width: width, height: height), false, UIScreen.main.scale)
-        defer { UIGraphicsEndImageContext() }
-        let context = UIGraphicsGetCurrentContext()!
-
-        //// Text Drawing
-        let textRect = calculateTextRect(outerViewWidth: width, outerViewHeight: height)
-        let initialsText = NSAttributedString(string: initials, attributes: [.font: font])
-        if adjustsFontSizeToFitWidth,
-            initialsText.width(considering: textRect.height) > textRect.width {
-            let newFontSize = calculateFontSize(text: initials, font: font, width: textRect.width, height: textRect.height)
-            font = placeholderFont.withSize(newFontSize)
-        }
-
-        let textStyle = NSMutableParagraphStyle()
-        textStyle.alignment = .center
-        let textFontAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.font: font, NSAttributedString.Key.foregroundColor: placeholderTextColor, NSAttributedString.Key.paragraphStyle: textStyle]
-
-        let textTextHeight: CGFloat = initials.boundingRect(with: CGSize(width: textRect.width, height: CGFloat.infinity), options: .usesLineFragmentOrigin, attributes: textFontAttributes, context: nil).height
-        context.saveGState()
-        context.clip(to: textRect)
-        initials.draw(in: CGRect(textRect.minX, textRect.minY + (textRect.height - textTextHeight) / 2, textRect.width, textTextHeight), withAttributes: textFontAttributes)
-        context.restoreGState()
-        guard let renderedImage = UIGraphicsGetImageFromCurrentImageContext() else { assertionFailure("Could not create image from context"); return UIImage()}
-        return renderedImage
-    }
-
-    /**
-     Recursively find the biggest size to fit the text with a given width and height
-     */
-    private func calculateFontSize(text: String, font: UIFont, width: CGFloat, height: CGFloat) -> CGFloat {
-        let attributedText = NSAttributedString(string: text, attributes: [.font: font])
-        if attributedText.width(considering: height) > width {
-            let newFont = font.withSize(font.pointSize - 1)
-            if newFont.pointSize > minimumFontSize {
-                return font.pointSize
-            } else {
-                return calculateFontSize(text: text, font: newFont, width: width, height: height)
-            }
-        }
-        return font.pointSize
-    }
-
-    /**
-     Calculates the inner circle's width.
-     Note: Assumes corner radius cannot be more than width/2 (this creates circle).
-     */
-    private func calculateTextRect(outerViewWidth: CGFloat, outerViewHeight: CGFloat) -> CGRect {
-        guard outerViewWidth > 0 else {
-            return CGRect.zero
-        }
-        let shortEdge = min(outerViewHeight, outerViewWidth)
-        // Converts degree to radian degree and calculate the
-        // Assumes, it is a perfect circle based on the shorter part of ellipsoid
-        // calculate a rectangle
-        let w = shortEdge * sin(CGFloat(45).degreesToRadians) * 2
-        let h = shortEdge * cos(CGFloat(45).degreesToRadians) * 2
-        let startX = (outerViewWidth - w)/2
-        let startY = (outerViewHeight - h)/2
-        // In case the font exactly fits to the region, put 2 pixel both left and right
-        return CGRect(startX+2, startY, w-4, h)
-    }
-
-    // MARK: - Internal methods
-
-    internal func prepareView() {
-        backgroundColor = .gray
-        contentMode = .scaleAspectFill
-        layer.masksToBounds = true
-        clipsToBounds = true
-        setCorner(radius: nil)
-    }
-
-    // MARK: - Open setters
-    
-    open func set(avatar: Avatar) {
-        if let image = avatar.image {
-            self.image = image
-        } else {
-            initials = avatar.initials
-        }
-    }
-
-    open func setCorner(radius: CGFloat?) {
-        guard let radius = radius else {
-            //if corner radius not set default to Circle
-            let cornerRadius = min(frame.width, frame.height)
-            layer.cornerRadius = cornerRadius/2
-            return
-        }
-        self.radius = radius
-        layer.cornerRadius = radius
-    }
-
-}
-
-fileprivate extension FloatingPoint {
-    var degreesToRadians: Self { return self * .pi / 180 }
-    var radiansToDegrees: Self { return self * 180 / .pi }
-}

+ 0 - 49
Pods/MessageKit/Sources/Views/BubbleCircle.swift

@@ -1,49 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// A `UIView` subclass that maintains a mask to keep it fully circular
-open class BubbleCircle: UIView {
-    
-    /// Lays out subviews and applys a circular mask to the layer
-    open override func layoutSubviews() {
-        super.layoutSubviews()
-        layer.mask = roundedMask(corners: .allCorners, radius: bounds.height / 2)
-    }
-    
-    /// Returns a rounded mask of the view
-    ///
-    /// - Parameters:
-    ///   - corners: The corners to round
-    ///   - radius: The radius of curve
-    /// - Returns: A mask
-    open func roundedMask(corners: UIRectCorner, radius: CGFloat) -> CAShapeLayer {
-        let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
-        let mask = CAShapeLayer()
-        mask.path = path.cgPath
-        return mask
-    }
-    
-}

+ 0 - 130
Pods/MessageKit/Sources/Views/Cells/AudioMessageCell.swift

@@ -1,130 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-import AVFoundation
-
-/// A subclass of `MessageContentCell` used to display video and audio messages.
-open class AudioMessageCell: MessageContentCell {
-
-    /// The play button view to display on audio messages.
-    public lazy var playButton: UIButton = {
-        let playButton = UIButton(type: .custom)
-        let playImage = UIImage.messageKitImageWith(type: .play)
-        let pauseImage = UIImage.messageKitImageWith(type: .pause)
-        playButton.setImage(playImage?.withRenderingMode(.alwaysTemplate), for: .normal)
-        playButton.setImage(pauseImage?.withRenderingMode(.alwaysTemplate), for: .selected)
-        return playButton
-    }()
-
-    /// The time duration lable to display on audio messages.
-    public lazy var durationLabel: UILabel = {
-        let durationLabel = UILabel(frame: CGRect.zero)
-        durationLabel.textAlignment = .right
-        durationLabel.font = UIFont.systemFont(ofSize: 14)
-        durationLabel.text = "0:00"
-        return durationLabel
-    }()
-
-    public lazy var progressView: UIProgressView = {
-        let progressView = UIProgressView(progressViewStyle: .default)
-        progressView.progress = 0.0
-        return progressView
-    }()
-
-    // MARK: - Methods
-
-    /// Responsible for setting up the constraints of the cell's subviews.
-    open func setupConstraints() {
-        playButton.constraint(equalTo: CGSize(width: 25, height: 25))
-        playButton.addConstraints(left: messageContainerView.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 5)
-        durationLabel.addConstraints(right: messageContainerView.rightAnchor, centerY: messageContainerView.centerYAnchor, rightConstant: 15)
-        progressView.addConstraints(left: playButton.rightAnchor, right: durationLabel.leftAnchor, centerY: messageContainerView.centerYAnchor, leftConstant: 5, rightConstant: 5)
-    }
-
-    open override func setupSubviews() {
-        super.setupSubviews()
-        messageContainerView.addSubview(playButton)
-        messageContainerView.addSubview(durationLabel)
-        messageContainerView.addSubview(progressView)
-        setupConstraints()
-    }
-
-    open override func prepareForReuse() {
-        super.prepareForReuse()
-        progressView.progress = 0
-        playButton.isSelected = false
-        durationLabel.text = "0:00"
-    }
-
-    /// Handle tap gesture on contentView and its subviews.
-    open override func handleTapGesture(_ gesture: UIGestureRecognizer) {
-        let touchLocation = gesture.location(in: self)
-        // compute play button touch area, currently play button size is (25, 25) which is hardly touchable
-        // add 10 px around current button frame and test the touch against this new frame
-        let playButtonTouchArea = CGRect(playButton.frame.origin.x - 10.0, playButton.frame.origin.y - 10, playButton.frame.size.width + 20, playButton.frame.size.height + 20)
-        let translateTouchLocation = convert(touchLocation, to: messageContainerView)
-        if playButtonTouchArea.contains(translateTouchLocation) {
-            delegate?.didTapPlayButton(in: self)
-        } else {
-            super.handleTapGesture(gesture)
-        }
-    }
-
-    // MARK: - Configure Cell
-
-    open override func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView) {
-        super.configure(with: message, at: indexPath, and: messagesCollectionView)
-
-        guard let dataSource = messagesCollectionView.messagesDataSource else {
-            fatalError(MessageKitError.nilMessagesDataSource)
-        }
-
-        let playButtonLeftConstraint = messageContainerView.constraints.filter { $0.identifier == "left" }.first
-        let durationLabelRightConstraint = messageContainerView.constraints.filter { $0.identifier == "right" }.first
-
-        if !dataSource.isFromCurrentSender(message: message) {
-            playButtonLeftConstraint?.constant = 12
-            durationLabelRightConstraint?.constant = -8
-        } else {
-            playButtonLeftConstraint?.constant = 5
-            durationLabelRightConstraint?.constant = -15
-        }
-
-        guard let displayDelegate = messagesCollectionView.messagesDisplayDelegate else {
-            fatalError(MessageKitError.nilMessagesDisplayDelegate)
-        }
-
-        let tintColor = displayDelegate.audioTintColor(for: message, at: indexPath, in: messagesCollectionView)
-        playButton.imageView?.tintColor = tintColor
-        durationLabel.textColor = tintColor
-        progressView.tintColor = tintColor
-
-        displayDelegate.configureAudioCell(self, message: message)
-
-        if case let .audio(audioItem) = message.kind {
-            durationLabel.text = displayDelegate.audioProgressTextFormat(audioItem.duration, for: self, in: messagesCollectionView)
-        }
-    }
-}

+ 0 - 142
Pods/MessageKit/Sources/Views/Cells/ContactMessageCell.swift

@@ -1,142 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2018 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-open class ContactMessageCell: MessageContentCell {
-    
-    public enum ConstraintsID: String {
-        case initialsContainerLeftConstraint
-        case disclouserRigtConstraint
-    }
-    
-    /// The view container that holds contact initials
-    public lazy var initialsContainerView: UIView = {
-        let initialsContainer = UIView(frame: CGRect.zero)
-        initialsContainer.backgroundColor = .white
-        return initialsContainer
-    }()
-    
-    /// The label that display the contact initials
-    public lazy var initialsLabel: UILabel = {
-        let initialsLabel = UILabel(frame: CGRect.zero)
-        initialsLabel.textAlignment = .center
-        initialsLabel.textColor = .darkText
-        initialsLabel.font = UIFont.preferredFont(forTextStyle: .footnote)
-        return initialsLabel
-    }()
-    
-    /// The label that display contact name
-    public lazy var nameLabel: UILabel = {
-        let nameLabel = UILabel(frame: CGRect.zero)
-        nameLabel.numberOfLines = 0
-        return nameLabel
-    }()
-    
-    /// The disclouser image view
-    public lazy var disclosureImageView: UIImageView = {
-        let disclouserImage = UIImage.messageKitImageWith(type: .disclouser)?.withRenderingMode(.alwaysTemplate)
-        let disclouser = UIImageView(image: disclouserImage)
-        return disclouser
-    }()
-    
-    // MARK: - Methods
-    open override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) {
-        super.apply(layoutAttributes)
-        guard let attributes = layoutAttributes as? MessagesCollectionViewLayoutAttributes else {
-            return
-        }
-        nameLabel.font = attributes.messageLabelFont
-    }
-
-    open override func setupSubviews() {
-        super.setupSubviews()
-        messageContainerView.addSubview(initialsContainerView)
-        messageContainerView.addSubview(nameLabel)
-        messageContainerView.addSubview(disclosureImageView)
-        initialsContainerView.addSubview(initialsLabel)
-        setupConstraints()
-    }
-    
-    open override func prepareForReuse() {
-        super.prepareForReuse()
-        nameLabel.text = ""
-        initialsLabel.text = ""
-    }
-    
-    open func setupConstraints() {
-        initialsContainerView.constraint(equalTo: CGSize(width: 26, height: 26))
-        let initialsConstraints = initialsContainerView.addConstraints(left: messageContainerView.leftAnchor, centerY: messageContainerView.centerYAnchor,
-                                                        leftConstant: 5)
-        initialsConstraints.first?.identifier = ConstraintsID.initialsContainerLeftConstraint.rawValue
-        initialsContainerView.layer.cornerRadius = 13
-        initialsLabel.fillSuperview()
-        disclosureImageView.constraint(equalTo: CGSize(width: 20, height: 20))
-        let disclosureConstraints = disclosureImageView.addConstraints(right: messageContainerView.rightAnchor, centerY: messageContainerView.centerYAnchor,
-                                           rightConstant: -10)
-        disclosureConstraints.first?.identifier = ConstraintsID.disclouserRigtConstraint.rawValue
-        nameLabel.addConstraints(messageContainerView.topAnchor,
-                                 left: initialsContainerView.rightAnchor,
-                                 bottom: messageContainerView.bottomAnchor,
-                                 right: disclosureImageView.leftAnchor,
-                                 topConstant: 0,
-                                 leftConstant: 10,
-                                 bottomConstant: 0,
-                                 rightConstant: 5)
-    }
-    
-    // MARK: - Configure Cell
-    open override func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView) {
-        super.configure(with: message, at: indexPath, and: messagesCollectionView)
-        // setup data
-        guard case let .contact(contactItem) = message.kind else { fatalError("Failed decorate audio cell") }
-        nameLabel.text = contactItem.displayName
-        initialsLabel.text = contactItem.initials
-        // setup constraints
-        guard let dataSource = messagesCollectionView.messagesDataSource else {
-            fatalError(MessageKitError.nilMessagesDataSource)
-        }
-        let initialsContainerLeftConstraint = messageContainerView.constraints.filter { (constraint) -> Bool in
-            return constraint.identifier == ConstraintsID.initialsContainerLeftConstraint.rawValue
-        }.first
-        let disclouserRightConstraint = messageContainerView.constraints.filter { (constraint) -> Bool in
-            return constraint.identifier == ConstraintsID.disclouserRigtConstraint.rawValue
-        }.first
-        if dataSource.isFromCurrentSender(message: message) { // outgoing message
-            initialsContainerLeftConstraint?.constant = 5
-            disclouserRightConstraint?.constant = -10
-        } else { // incoming message
-            initialsContainerLeftConstraint?.constant = 10
-            disclouserRightConstraint?.constant = -5
-        }
-        // setup colors
-        guard let displayDelegate = messagesCollectionView.messagesDisplayDelegate else {
-            fatalError(MessageKitError.nilMessagesDisplayDelegate)
-        }
-        let textColor = displayDelegate.textColor(for: message, at: indexPath, in: messagesCollectionView)
-        nameLabel.textColor = textColor
-        disclosureImageView.tintColor = textColor
-    }
-    
-}

+ 0 - 111
Pods/MessageKit/Sources/Views/Cells/LocationMessageCell.swift

@@ -1,111 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-import MapKit
-
-/// A subclass of `MessageContentCell` used to display location messages.
-open class LocationMessageCell: MessageContentCell {
-
-    /// The activity indicator to be displayed while the map image is loading.
-    open var activityIndicator = UIActivityIndicatorView(style: .gray)
-
-    /// The image view holding the map image.
-    open var imageView = UIImageView()
-    
-    private weak var snapShotter: MKMapSnapshotter?
-
-    open override func setupSubviews() {
-        super.setupSubviews()
-        imageView.contentMode = .scaleAspectFill
-        messageContainerView.addSubview(imageView)
-        messageContainerView.addSubview(activityIndicator)
-        setupConstraints()
-    }
-
-    /// Responsible for setting up the constraints of the cell's subviews.
-    open func setupConstraints() {
-        imageView.fillSuperview()
-        activityIndicator.centerInSuperview()
-    }
-    
-    open override func prepareForReuse() {
-        super.prepareForReuse()
-        snapShotter?.cancel()
-    }
-
-    open override func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView) {
-        super.configure(with: message, at: indexPath, and: messagesCollectionView)
-        guard let displayDelegate = messagesCollectionView.messagesDisplayDelegate else {
-            fatalError(MessageKitError.nilMessagesDisplayDelegate)
-        }
-        let options = displayDelegate.snapshotOptionsForLocation(message: message, at: indexPath, in: messagesCollectionView)
-        let annotationView = displayDelegate.annotationViewForLocation(message: message, at: indexPath, in: messagesCollectionView)
-        let animationBlock = displayDelegate.animationBlockForLocation(message: message, at: indexPath, in: messagesCollectionView)
-
-        guard case let .location(locationItem) = message.kind else { fatalError("") }
-
-        activityIndicator.startAnimating()
-
-        let snapshotOptions = MKMapSnapshotter.Options()
-        snapshotOptions.region = MKCoordinateRegion(center: locationItem.location.coordinate, span: options.span)
-        snapshotOptions.showsBuildings = options.showsBuildings
-        snapshotOptions.showsPointsOfInterest = options.showsPointsOfInterest
-
-        let snapShotter = MKMapSnapshotter(options: snapshotOptions)
-        self.snapShotter = snapShotter
-        snapShotter.start { (snapshot, error) in
-            defer {
-                self.activityIndicator.stopAnimating()
-            }
-            guard let snapshot = snapshot, error == nil else {
-                //show an error image?
-                return
-            }
-
-            guard let annotationView = annotationView else {
-                self.imageView.image = snapshot.image
-                return
-            }
-
-            UIGraphicsBeginImageContextWithOptions(snapshotOptions.size, true, 0)
-
-            snapshot.image.draw(at: .zero)
-
-            var point = snapshot.point(for: locationItem.location.coordinate)
-            //Move point to reflect annotation anchor
-            point.x -= annotationView.bounds.size.width / 2
-            point.y -= annotationView.bounds.size.height / 2
-            point.x += annotationView.centerOffset.x
-            point.y += annotationView.centerOffset.y
-
-            annotationView.image?.draw(at: point)
-            let composedImage = UIGraphicsGetImageFromCurrentImageContext()
-
-            UIGraphicsEndImageContext()
-            self.imageView.image = composedImage
-            animationBlock?(self.imageView)
-        }
-    }
-}

+ 0 - 84
Pods/MessageKit/Sources/Views/Cells/MediaMessageCell.swift

@@ -1,84 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// A subclass of `MessageContentCell` used to display video and audio messages.
-open class MediaMessageCell: MessageContentCell {
-
-    /// The play button view to display on video messages.
-    open lazy var playButtonView: PlayButtonView = {
-        let playButtonView = PlayButtonView()
-        return playButtonView
-    }()
-
-    /// The image view display the media content.
-    open var imageView: UIImageView = {
-        let imageView = UIImageView()
-        imageView.contentMode = .scaleAspectFill
-        return imageView
-    }()
-
-    // MARK: - Methods
-
-    /// Responsible for setting up the constraints of the cell's subviews.
-    open func setupConstraints() {
-        imageView.fillSuperview()
-        playButtonView.centerInSuperview()
-        playButtonView.constraint(equalTo: CGSize(width: 35, height: 35))
-    }
-
-    open override func setupSubviews() {
-        super.setupSubviews()
-        messageContainerView.addSubview(imageView)
-        messageContainerView.addSubview(playButtonView)
-        setupConstraints()
-    }
-    
-    open override func prepareForReuse() {
-        super.prepareForReuse()
-        self.imageView.image = nil
-    }
-
-    open override func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView) {
-        super.configure(with: message, at: indexPath, and: messagesCollectionView)
-
-        guard let displayDelegate = messagesCollectionView.messagesDisplayDelegate else {
-            fatalError(MessageKitError.nilMessagesDisplayDelegate)
-        }
-        switch message.kind {
-        case .photo(let mediaItem):
-            imageView.image = mediaItem.image ?? mediaItem.placeholderImage
-            playButtonView.isHidden = true
-        case .video(let mediaItem):
-			let image = mediaItem.image ?? mediaItem.placeholderImage
-			imageView.image = image //mediaItem.image ?? mediaItem.placeholderImage
-           // playButtonView.isHidden = false
-        default:
-            break
-        }
-
-        displayDelegate.configureMediaMessageImageView(imageView, for: message, at: indexPath, in: messagesCollectionView)
-    }
-}

+ 0 - 45
Pods/MessageKit/Sources/Views/Cells/MessageCollectionViewCell.swift

@@ -1,45 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// A subclass of `UICollectionViewCell` to be used inside of a `MessagesCollectionView`.
-open class MessageCollectionViewCell: UICollectionViewCell {
-
-    // MARK: - Initializers
-
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-    }
-
-    public required init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-    }
-
-    /// Handle tap gesture on contentView and its subviews.
-    open func handleTapGesture(_ gesture: UIGestureRecognizer) {
-        // Should be overridden
-    }
-
-}

+ 0 - 343
Pods/MessageKit/Sources/Views/Cells/MessageContentCell.swift

@@ -1,343 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// A subclass of `MessageCollectionViewCell` used to display text, media, and location messages.
-open class MessageContentCell: MessageCollectionViewCell {
-
-    /// The image view displaying the avatar.
-    open var avatarView = AvatarView()
-
-    /// The container used for styling and holding the message's content view.
-    open var messageContainerView: MessageContainerView = {
-        let containerView = MessageContainerView()
-        containerView.clipsToBounds = true
-        containerView.layer.masksToBounds = true
-        return containerView
-    }()
-
-    /// The top label of the cell.
-    open var cellTopLabel: InsetLabel = {
-        let label = InsetLabel()
-        label.numberOfLines = 0
-        label.textAlignment = .center
-        return label
-    }()
-    
-    /// The bottom label of the cell.
-    open var cellBottomLabel: InsetLabel = {
-        let label = InsetLabel()
-        label.numberOfLines = 0
-        label.textAlignment = .center
-        return label
-    }()
-    
-    /// The top label of the messageBubble.
-    open var messageTopLabel: InsetLabel = {
-        let label = InsetLabel()
-        label.numberOfLines = 0
-        return label
-    }()
-
-    /// The bottom label of the messageBubble.
-    open var messageBottomLabel: InsetLabel = {
-        let label = InsetLabel()
-        label.numberOfLines = 0
-        return label
-    }()
-
-    // Should only add customized subviews - don't change accessoryView itself.
-    open var accessoryView: UIView = UIView()
-
-    /// The `MessageCellDelegate` for the cell.
-    open weak var delegate: MessageCellDelegate?
-
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-        contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
-        setupSubviews()
-    }
-
-    required public init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
-        setupSubviews()
-    }
-
-    open func setupSubviews() {
-        contentView.addSubview(accessoryView)
-        contentView.addSubview(cellTopLabel)
-        contentView.addSubview(messageTopLabel)
-        contentView.addSubview(messageBottomLabel)
-        contentView.addSubview(cellBottomLabel)
-        contentView.addSubview(messageContainerView)
-        contentView.addSubview(avatarView)
-    }
-
-    open override func prepareForReuse() {
-        super.prepareForReuse()
-        cellTopLabel.text = nil
-        cellBottomLabel.text = nil
-        messageTopLabel.text = nil
-        messageBottomLabel.text = nil
-    }
-
-    // MARK: - Configuration
-
-
-    open override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) {
-        super.apply(layoutAttributes)
-        guard let attributes = layoutAttributes as? MessagesCollectionViewLayoutAttributes else { return }
-        // Call this before other laying out other subviews
-        layoutMessageContainerView(with: attributes)
-        layoutMessageBottomLabel(with: attributes)
-        layoutCellBottomLabel(with: attributes)
-        layoutCellTopLabel(with: attributes)
-        layoutMessageTopLabel(with: attributes)
-        layoutAvatarView(with: attributes)
-        layoutAccessoryView(with: attributes)
-    }
-
-    /// Used to configure the cell.
-    ///
-    /// - Parameters:
-    ///   - message: The `MessageType` this cell displays.
-    ///   - indexPath: The `IndexPath` for this cell.
-    ///   - messagesCollectionView: The `MessagesCollectionView` in which this cell is contained.
-    open func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView) {
-        guard let dataSource = messagesCollectionView.messagesDataSource else {
-            fatalError(MessageKitError.nilMessagesDataSource)
-        }
-        guard let displayDelegate = messagesCollectionView.messagesDisplayDelegate else {
-            fatalError(MessageKitError.nilMessagesDisplayDelegate)
-        }
-
-        delegate = messagesCollectionView.messageCellDelegate
-
-        let messageColor = displayDelegate.backgroundColor(for: message, at: indexPath, in: messagesCollectionView)
-        let messageStyle = displayDelegate.messageStyle(for: message, at: indexPath, in: messagesCollectionView)
-
-        displayDelegate.configureAvatarView(avatarView, for: message, at: indexPath, in: messagesCollectionView)
-
-        displayDelegate.configureAccessoryView(accessoryView, for: message, at: indexPath, in: messagesCollectionView)
-
-        messageContainerView.backgroundColor = messageColor
-        messageContainerView.style = messageStyle
-
-        let topCellLabelText = dataSource.cellTopLabelAttributedText(for: message, at: indexPath)
-        let bottomCellLabelText = dataSource.cellBottomLabelAttributedText(for: message, at: indexPath)
-        let topMessageLabelText = dataSource.messageTopLabelAttributedText(for: message, at: indexPath)
-        let bottomMessageLabelText = dataSource.messageBottomLabelAttributedText(for: message, at: indexPath)
-
-        cellTopLabel.attributedText = topCellLabelText
-        cellBottomLabel.attributedText = bottomCellLabelText
-        messageTopLabel.attributedText = topMessageLabelText
-        messageBottomLabel.attributedText = bottomMessageLabelText
-    }
-
-    /// Handle tap gesture on contentView and its subviews.
-    open override func handleTapGesture(_ gesture: UIGestureRecognizer) {
-        let touchLocation = gesture.location(in: self)
-
-        switch true {
-        case messageContainerView.frame.contains(touchLocation) && !cellContentView(canHandle: convert(touchLocation, to: messageContainerView)):
-            delegate?.didTapMessage(in: self)
-        case avatarView.frame.contains(touchLocation):
-            delegate?.didTapAvatar(in: self)
-        case cellTopLabel.frame.contains(touchLocation):
-            delegate?.didTapCellTopLabel(in: self)
-        case cellBottomLabel.frame.contains(touchLocation):
-            delegate?.didTapCellBottomLabel(in: self)
-        case messageTopLabel.frame.contains(touchLocation):
-            delegate?.didTapMessageTopLabel(in: self)
-        case messageBottomLabel.frame.contains(touchLocation):
-            delegate?.didTapMessageBottomLabel(in: self)
-        case accessoryView.frame.contains(touchLocation):
-            delegate?.didTapAccessoryView(in: self)
-        default:
-            delegate?.didTapBackground(in: self)
-        }
-    }
-
-    /// Handle long press gesture, return true when gestureRecognizer's touch point in `messageContainerView`'s frame
-    open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
-        let touchPoint = gestureRecognizer.location(in: self)
-        guard gestureRecognizer.isKind(of: UILongPressGestureRecognizer.self) else { return false }
-        return messageContainerView.frame.contains(touchPoint)
-    }
-
-    /// Handle `ContentView`'s tap gesture, return false when `ContentView` doesn't needs to handle gesture
-    open func cellContentView(canHandle touchPoint: CGPoint) -> Bool {
-        return false
-    }
-
-    // MARK: - Origin Calculations
-
-    /// Positions the cell's `AvatarView`.
-    /// - attributes: The `MessagesCollectionViewLayoutAttributes` for the cell.
-    open func layoutAvatarView(with attributes: MessagesCollectionViewLayoutAttributes) {
-        var origin: CGPoint = .zero
-        let padding = attributes.avatarLeadingTrailingPadding
-
-        switch attributes.avatarPosition.horizontal {
-        case .cellLeading:
-            origin.x = padding
-        case .cellTrailing:
-            origin.x = attributes.frame.width - attributes.avatarSize.width - padding
-        case .natural:
-            fatalError(MessageKitError.avatarPositionUnresolved)
-        }
-
-        switch attributes.avatarPosition.vertical {
-        case .messageLabelTop:
-            origin.y = messageTopLabel.frame.minY
-        case .messageTop: // Needs messageContainerView frame to be set
-            origin.y = messageContainerView.frame.minY
-        case .messageBottom: // Needs messageContainerView frame to be set
-            origin.y = messageContainerView.frame.maxY - attributes.avatarSize.height
-        case .messageCenter: // Needs messageContainerView frame to be set
-            origin.y = messageContainerView.frame.midY - (attributes.avatarSize.height/2)
-        case .cellBottom:
-            origin.y = attributes.frame.height - attributes.avatarSize.height
-        default:
-            break
-        }
-
-        avatarView.frame = CGRect(origin: origin, size: attributes.avatarSize)
-    }
-
-    /// Positions the cell's `MessageContainerView`.
-    /// - attributes: The `MessagesCollectionViewLayoutAttributes` for the cell.
-    open func layoutMessageContainerView(with attributes: MessagesCollectionViewLayoutAttributes) {
-        var origin: CGPoint = .zero
-
-        switch attributes.avatarPosition.vertical {
-        case .messageBottom:
-            origin.y = attributes.size.height - attributes.messageContainerPadding.bottom - attributes.cellBottomLabelSize.height - attributes.messageBottomLabelSize.height - attributes.messageContainerSize.height - attributes.messageContainerPadding.top
-        case .messageCenter:
-            if attributes.avatarSize.height > attributes.messageContainerSize.height {
-                let messageHeight = attributes.messageContainerSize.height + attributes.messageContainerPadding.vertical
-                origin.y = (attributes.size.height / 2) - (messageHeight / 2)
-            } else {
-                fallthrough
-            }
-        default:
-            if attributes.accessoryViewSize.height > attributes.messageContainerSize.height {
-                let messageHeight = attributes.messageContainerSize.height + attributes.messageContainerPadding.vertical
-                origin.y = (attributes.size.height / 2) - (messageHeight / 2)
-            } else {
-                origin.y = attributes.cellTopLabelSize.height + attributes.messageTopLabelSize.height + attributes.messageContainerPadding.top
-            }
-        }
-
-        let avatarPadding = attributes.avatarLeadingTrailingPadding
-        switch attributes.avatarPosition.horizontal {
-        case .cellLeading:
-            origin.x = attributes.avatarSize.width + attributes.messageContainerPadding.left + avatarPadding
-        case .cellTrailing:
-            origin.x = attributes.frame.width - attributes.avatarSize.width - attributes.messageContainerSize.width - attributes.messageContainerPadding.right - avatarPadding
-        case .natural:
-            fatalError(MessageKitError.avatarPositionUnresolved)
-        }
-		messageContainerView.frame = CGRect(origin: origin, size: attributes.messageContainerSize)
-    }
-
-    /// Positions the cell's top label.
-    /// - attributes: The `MessagesCollectionViewLayoutAttributes` for the cell.
-    open func layoutCellTopLabel(with attributes: MessagesCollectionViewLayoutAttributes) {
-        cellTopLabel.frame = CGRect(origin: .zero, size: attributes.cellTopLabelSize)
-    }
-    
-    /// Positions the cell's bottom label.
-    /// - attributes: The `MessagesCollectionViewLayoutAttributes` for the cell.
-    open func layoutCellBottomLabel(with attributes: MessagesCollectionViewLayoutAttributes) {
-        cellBottomLabel.textAlignment = attributes.cellBottomLabelAlignment.textAlignment
-        cellBottomLabel.textInsets = attributes.cellBottomLabelAlignment.textInsets
-        
-        let y = messageBottomLabel.frame.maxY
-        let origin = CGPoint(x: 0, y: y)
-        
-        cellBottomLabel.frame = CGRect(origin: origin, size: attributes.cellBottomLabelSize)
-    }
-    
-    /// Positions the message bubble's top label.
-    /// - attributes: The `MessagesCollectionViewLayoutAttributes` for the cell.
-    open func layoutMessageTopLabel(with attributes: MessagesCollectionViewLayoutAttributes) {
-        messageTopLabel.textAlignment = attributes.messageTopLabelAlignment.textAlignment
-        messageTopLabel.textInsets = attributes.messageTopLabelAlignment.textInsets
-
-        let y = messageContainerView.frame.minY - attributes.messageContainerPadding.top - attributes.messageTopLabelSize.height
-        let origin = CGPoint(x: 0, y: y)
-        
-        messageTopLabel.frame = CGRect(origin: origin, size: attributes.messageTopLabelSize)
-    }
-
-    /// Positions the message bubble's bottom label.
-    /// - attributes: The `MessagesCollectionViewLayoutAttributes` for the cell.
-    open func layoutMessageBottomLabel(with attributes: MessagesCollectionViewLayoutAttributes) {
-        messageBottomLabel.textAlignment = attributes.messageBottomLabelAlignment.textAlignment
-        messageBottomLabel.textInsets = attributes.messageBottomLabelAlignment.textInsets
-
-        let y = messageContainerView.frame.maxY + attributes.messageContainerPadding.bottom
-        let origin = CGPoint(x: 0, y: y)
-
-        messageBottomLabel.frame = CGRect(origin: origin, size: attributes.messageBottomLabelSize)
-    }
-
-    /// Positions the cell's accessory view.
-    /// - attributes: The `MessagesCollectionViewLayoutAttributes` for the cell.
-    open func layoutAccessoryView(with attributes: MessagesCollectionViewLayoutAttributes) {
-        
-        var origin: CGPoint = .zero
-        
-        // Accessory view is set at the side space of the messageContainerView
-        switch attributes.accessoryViewPosition {
-        case .messageLabelTop:
-            origin.y = messageTopLabel.frame.minY
-        case .messageTop:
-            origin.y = messageContainerView.frame.minY
-        case .messageBottom:
-            origin.y = messageContainerView.frame.maxY - attributes.accessoryViewSize.height
-        case .messageCenter:
-            origin.y = messageContainerView.frame.midY - (attributes.accessoryViewSize.height / 2)
-        case .cellBottom:
-            origin.y = attributes.frame.height - attributes.accessoryViewSize.height
-        default:
-            break
-        }
-
-        // Accessory view is always on the opposite side of avatar
-        switch attributes.avatarPosition.horizontal {
-        case .cellLeading:
-            origin.x = messageContainerView.frame.maxX + attributes.accessoryViewPadding.left
-        case .cellTrailing:
-            origin.x = messageContainerView.frame.minX - attributes.accessoryViewPadding.right - attributes.accessoryViewSize.width
-        case .natural:
-            fatalError(MessageKitError.avatarPositionUnresolved)
-        }
-
-        accessoryView.frame = CGRect(origin: origin, size: attributes.accessoryViewSize)
-    }
-}

+ 0 - 101
Pods/MessageKit/Sources/Views/Cells/TextMessageCell.swift

@@ -1,101 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// A subclass of `MessageContentCell` used to display text messages.
-open class TextMessageCell: MessageContentCell {
-
-    // MARK: - Properties
-
-    /// The `MessageCellDelegate` for the cell.
-    open override weak var delegate: MessageCellDelegate? {
-        didSet {
-            messageLabel.delegate = delegate
-        }
-    }
-
-    /// The label used to display the message's text.
-    open var messageLabel = MessageLabel()
-
-    // MARK: - Methods
-
-    open override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) {
-        super.apply(layoutAttributes)
-        if let attributes = layoutAttributes as? MessagesCollectionViewLayoutAttributes {
-            messageLabel.textInsets = attributes.messageLabelInsets
-            messageLabel.messageLabelFont = attributes.messageLabelFont
-            messageLabel.frame = messageContainerView.bounds
-        }
-    }
-
-    open override func prepareForReuse() {
-        super.prepareForReuse()
-        messageLabel.attributedText = nil
-        messageLabel.text = nil
-    }
-
-    open override func setupSubviews() {
-        super.setupSubviews()
-        messageContainerView.addSubview(messageLabel)
-    }
-
-    open override func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView) {
-        super.configure(with: message, at: indexPath, and: messagesCollectionView)
-
-        guard let displayDelegate = messagesCollectionView.messagesDisplayDelegate else {
-            fatalError(MessageKitError.nilMessagesDisplayDelegate)
-        }
-
-        let enabledDetectors = displayDelegate.enabledDetectors(for: message, at: indexPath, in: messagesCollectionView)
-
-        messageLabel.configure {
-            messageLabel.enabledDetectors = enabledDetectors
-            for detector in enabledDetectors {
-                let attributes = displayDelegate.detectorAttributes(for: detector, and: message, at: indexPath)
-                messageLabel.setAttributes(attributes, detector: detector)
-            }
-            switch message.kind {
-            case .text(let text), .emoji(let text):
-                let textColor = displayDelegate.textColor(for: message, at: indexPath, in: messagesCollectionView)
-                messageLabel.text = text
-                messageLabel.textColor = textColor
-                if let font = messageLabel.messageLabelFont {
-                    messageLabel.font = font
-                }
-            case .attributedText(let text):
-                messageLabel.attributedText = text
-            default:
-                break
-            }
-        }
-    }
-    
-    /// Used to handle the cell's contentView's tap gesture.
-    /// Return false when the contentView does not need to handle the gesture.
-    open override func cellContentView(canHandle touchPoint: CGPoint) -> Bool {
-        return messageLabel.handleGesture(touchPoint)
-    }
-
-}

+ 0 - 66
Pods/MessageKit/Sources/Views/Cells/TypingIndicatorCell.swift

@@ -1,66 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// A subclass of `MessageCollectionViewCell` used to display the typing indicator.
-open class TypingIndicatorCell: MessageCollectionViewCell {
-    
-    // MARK: - Subviews
-
-    public var insets = UIEdgeInsets(top: 15, left: 0, bottom: 0, right: 0)
-    
-    public let typingBubble = TypingBubble()
-    
-    // MARK: - Initialization
-    
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-        setupSubviews()
-    }
-    
-    required public init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        setupSubviews()
-    }
-    
-    open func setupSubviews() {
-        addSubview(typingBubble)
-    }
-    
-    open override func prepareForReuse() {
-        super.prepareForReuse()
-        if typingBubble.isAnimating {
-            typingBubble.stopAnimating()
-        }
-    }
-    
-    // MARK: - Layout
-    
-    open override func layoutSubviews() {
-        super.layoutSubviews()
-        typingBubble.frame = bounds.inset(by: insets)
-    }
-    
-}

+ 0 - 39
Pods/MessageKit/Sources/Views/HeadersFooters/MessageReusableView.swift

@@ -1,39 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import Foundation
-
-open class MessageReusableView: UICollectionReusableView {
-
-    // MARK: - Initializers
-
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-    }
-
-    public required init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-    }
-
-}

+ 0 - 38
Pods/MessageKit/Sources/Views/InsetLabel.swift

@@ -1,38 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-open class InsetLabel: UILabel {
-
-    open var textInsets: UIEdgeInsets = .zero {
-        didSet { setNeedsDisplay() }
-    }
-
-    open override func drawText(in rect: CGRect) {
-        let insetRect = rect.inset(by: textInsets)
-        super.drawText(in: insetRect)
-    }
-
-}

+ 0 - 88
Pods/MessageKit/Sources/Views/MessageContainerView.swift

@@ -1,88 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-open class MessageContainerView: UIImageView {
-
-    // MARK: - Properties
-
-    private let imageMask = UIImageView()
-
-    open var style: MessageStyle = .none {
-        didSet {
-            applyMessageStyle()
-        }
-    }
-
-    open override var frame: CGRect {
-        didSet {
-            sizeMaskToView()
-        }
-    }
-
-    // MARK: - Methods
-
-    private func sizeMaskToView() {
-        switch style {
-        case .none, .custom:
-            break
-        case .bubble, .bubbleTail, .bubbleOutline, .bubbleTailOutline:
-            imageMask.frame = bounds
-        }
-    }
-
-    private func applyMessageStyle() {
-        switch style {
-        case .bubble, .bubbleTail:
-            imageMask.image = style.image
-            sizeMaskToView()
-            mask = imageMask
-            image = nil
-        case .bubbleOutline(let color):
-            let bubbleStyle: MessageStyle = .bubble
-            imageMask.image = bubbleStyle.image
-            sizeMaskToView()
-            mask = imageMask
-            image = style.image?.withRenderingMode(.alwaysTemplate)
-            tintColor = color
-        case .bubbleTailOutline(let color, let tail, let corner):
-            let bubbleStyle: MessageStyle = .bubbleTail(tail, corner)
-            imageMask.image = bubbleStyle.image
-            sizeMaskToView()
-            mask = imageMask
-            image = style.image?.withRenderingMode(.alwaysTemplate)
-            tintColor = color
-        case .none:
-            mask = nil
-            image = nil
-            tintColor = nil
-        case .custom(let configurationClosure):
-            mask = nil
-            image = nil
-            tintColor = nil
-            configurationClosure(self)
-        }
-    }
-}

+ 0 - 546
Pods/MessageKit/Sources/Views/MessageLabel.swift

@@ -1,546 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-open class MessageLabel: UILabel {
-
-    // MARK: - Private Properties
-
-    private lazy var layoutManager: NSLayoutManager = {
-        let layoutManager = NSLayoutManager()
-        layoutManager.addTextContainer(self.textContainer)
-        return layoutManager
-    }()
-
-    private lazy var textContainer: NSTextContainer = {
-        let textContainer = NSTextContainer()
-        textContainer.lineFragmentPadding = 0
-        textContainer.maximumNumberOfLines = self.numberOfLines
-        textContainer.lineBreakMode = self.lineBreakMode
-        textContainer.size = self.bounds.size
-        return textContainer
-    }()
-
-    private lazy var textStorage: NSTextStorage = {
-        let textStorage = NSTextStorage()
-        textStorage.addLayoutManager(self.layoutManager)
-        return textStorage
-    }()
-
-    internal lazy var rangesForDetectors: [DetectorType: [(NSRange, MessageTextCheckingType)]] = [:]
-    
-    private var isConfiguring: Bool = false
-
-    // MARK: - Public Properties
-
-    open weak var delegate: MessageLabelDelegate?
-
-    open var enabledDetectors: [DetectorType] = [] {
-        didSet {
-            setTextStorage(attributedText, shouldParse: true)
-        }
-    }
-
-    open override var attributedText: NSAttributedString? {
-        didSet {
-            setTextStorage(attributedText, shouldParse: true)
-        }
-    }
-
-    open override var text: String? {
-        didSet {
-            setTextStorage(attributedText, shouldParse: true)
-        }
-    }
-
-    open override var font: UIFont! {
-        didSet {
-            setTextStorage(attributedText, shouldParse: false)
-        }
-    }
-
-    open override var textColor: UIColor! {
-        didSet {
-            setTextStorage(attributedText, shouldParse: false)
-        }
-    }
-
-    open override var lineBreakMode: NSLineBreakMode {
-        didSet {
-            textContainer.lineBreakMode = lineBreakMode
-            if !isConfiguring { setNeedsDisplay() }
-        }
-    }
-
-    open override var numberOfLines: Int {
-        didSet {
-            textContainer.maximumNumberOfLines = numberOfLines
-            if !isConfiguring { setNeedsDisplay() }
-        }
-    }
-
-    open override var textAlignment: NSTextAlignment {
-        didSet {
-            setTextStorage(attributedText, shouldParse: false)
-        }
-    }
-
-    open var textInsets: UIEdgeInsets = .zero {
-        didSet {
-            if !isConfiguring { setNeedsDisplay() }
-        }
-    }
-
-    open override var intrinsicContentSize: CGSize {
-        var size = super.intrinsicContentSize
-        size.width += textInsets.horizontal
-        size.height += textInsets.vertical
-        return size
-    }
-    
-    internal var messageLabelFont: UIFont?
-
-    private var attributesNeedUpdate = false
-
-    public static var defaultAttributes: [NSAttributedString.Key: Any] = {
-        return [
-            NSAttributedString.Key.foregroundColor: UIColor.darkText,
-            NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue,
-            NSAttributedString.Key.underlineColor: UIColor.darkText
-        ]
-    }()
-
-    open internal(set) var addressAttributes: [NSAttributedString.Key: Any] = defaultAttributes
-
-    open internal(set) var dateAttributes: [NSAttributedString.Key: Any] = defaultAttributes
-
-    open internal(set) var phoneNumberAttributes: [NSAttributedString.Key: Any] = defaultAttributes
-
-    open internal(set) var urlAttributes: [NSAttributedString.Key: Any] = defaultAttributes
-    
-    open internal(set) var transitInformationAttributes: [NSAttributedString.Key: Any] = defaultAttributes
-    
-    open internal(set) var hashtagAttributes: [NSAttributedString.Key: Any] = defaultAttributes
-    
-    open internal(set) var mentionAttributes: [NSAttributedString.Key: Any] = defaultAttributes
-
-    open internal(set) var customAttributes: [NSRegularExpression: [NSAttributedString.Key: Any]] = [:]
-
-    public func setAttributes(_ attributes: [NSAttributedString.Key: Any], detector: DetectorType) {
-        switch detector {
-        case .phoneNumber:
-            phoneNumberAttributes = attributes
-        case .address:
-            addressAttributes = attributes
-        case .date:
-            dateAttributes = attributes
-        case .url:
-            urlAttributes = attributes
-        case .transitInformation:
-            transitInformationAttributes = attributes
-        case .mention:
-            mentionAttributes = attributes
-        case .hashtag:
-            hashtagAttributes = attributes
-        case .custom(let regex):
-            customAttributes[regex] = attributes
-        }
-        if isConfiguring {
-            attributesNeedUpdate = true
-        } else {
-            updateAttributes(for: [detector])
-        }
-    }
-
-    // MARK: - Initializers
-
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-        setupView()
-    }
-
-    public required init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        setupView()
-    }
-
-    // MARK: - Open Methods
-
-    open override func drawText(in rect: CGRect) {
-
-        let insetRect = rect.inset(by: textInsets)
-        textContainer.size = CGSize(width: insetRect.width, height: rect.height)
-
-        let origin = insetRect.origin
-        let range = layoutManager.glyphRange(for: textContainer)
-
-        layoutManager.drawBackground(forGlyphRange: range, at: origin)
-        layoutManager.drawGlyphs(forGlyphRange: range, at: origin)
-    }
-
-    // MARK: - Public Methods
-    
-    public func configure(block: () -> Void) {
-        isConfiguring = true
-        block()
-        if attributesNeedUpdate {
-            updateAttributes(for: enabledDetectors)
-        }
-        attributesNeedUpdate = false
-        isConfiguring = false
-        setNeedsDisplay()
-    }
-
-    // MARK: - Private Methods
-
-    private func setTextStorage(_ newText: NSAttributedString?, shouldParse: Bool) {
-
-        guard let newText = newText, newText.length > 0 else {
-            textStorage.setAttributedString(NSAttributedString())
-            setNeedsDisplay()
-            return
-        }
-        
-        let style = paragraphStyle(for: newText)
-        let range = NSRange(location: 0, length: newText.length)
-        
-        let mutableText = NSMutableAttributedString(attributedString: newText)
-        mutableText.addAttribute(.paragraphStyle, value: style, range: range)
-        
-        if shouldParse {
-            rangesForDetectors.removeAll()
-            let results = parse(text: mutableText)
-            setRangesForDetectors(in: results)
-        }
-        
-        for (detector, rangeTuples) in rangesForDetectors {
-            if enabledDetectors.contains(detector) {
-                let attributes = detectorAttributes(for: detector)
-                rangeTuples.forEach { (range, _) in
-                    mutableText.addAttributes(attributes, range: range)
-                }
-            }
-        }
-
-        let modifiedText = NSAttributedString(attributedString: mutableText)
-        textStorage.setAttributedString(modifiedText)
-
-        if !isConfiguring { setNeedsDisplay() }
-
-    }
-    
-    private func paragraphStyle(for text: NSAttributedString) -> NSParagraphStyle {
-        guard text.length > 0 else { return NSParagraphStyle() }
-        
-        var range = NSRange(location: 0, length: text.length)
-        let existingStyle = text.attribute(.paragraphStyle, at: 0, effectiveRange: &range) as? NSMutableParagraphStyle
-        let style = existingStyle ?? NSMutableParagraphStyle()
-        
-        style.lineBreakMode = lineBreakMode
-        style.alignment = textAlignment
-        
-        return style
-    }
-
-    private func updateAttributes(for detectors: [DetectorType]) {
-
-        guard let attributedText = attributedText, attributedText.length > 0 else { return }
-        let mutableAttributedString = NSMutableAttributedString(attributedString: attributedText)
-
-        for detector in detectors {
-            guard let rangeTuples = rangesForDetectors[detector] else { continue }
-
-            for (range, _)  in rangeTuples {
-                let attributes = detectorAttributes(for: detector)
-                mutableAttributedString.addAttributes(attributes, range: range)
-            }
-
-            let updatedString = NSAttributedString(attributedString: mutableAttributedString)
-            textStorage.setAttributedString(updatedString)
-        }
-    }
-
-    private func detectorAttributes(for detectorType: DetectorType) -> [NSAttributedString.Key: Any] {
-
-        switch detectorType {
-        case .address:
-            return addressAttributes
-        case .date:
-            return dateAttributes
-        case .phoneNumber:
-            return phoneNumberAttributes
-        case .url:
-            return urlAttributes
-        case .transitInformation:
-            return transitInformationAttributes
-        case .mention:
-            return mentionAttributes
-        case .hashtag:
-            return hashtagAttributes
-        case .custom(let regex):
-            return customAttributes[regex] ?? MessageLabel.defaultAttributes
-        }
-
-    }
-
-    private func detectorAttributes(for checkingResultType: NSTextCheckingResult.CheckingType) -> [NSAttributedString.Key: Any] {
-        switch checkingResultType {
-        case .address:
-            return addressAttributes
-        case .date:
-            return dateAttributes
-        case .phoneNumber:
-            return phoneNumberAttributes
-        case .link:
-            return urlAttributes
-        case .transitInformation:
-            return transitInformationAttributes
-        default:
-            fatalError(MessageKitError.unrecognizedCheckingResult)
-        }
-    }
-    
-    private func setupView() {
-        numberOfLines = 0
-        lineBreakMode = .byWordWrapping
-    }
-
-    // MARK: - Parsing Text
-
-    private func parse(text: NSAttributedString) -> [NSTextCheckingResult] {
-        guard enabledDetectors.isEmpty == false else { return [] }
-        let range = NSRange(location: 0, length: text.length)
-        var matches = [NSTextCheckingResult]()
-
-        // Get matches of all .custom DetectorType and add it to matches array
-        let regexs = enabledDetectors
-            .filter { $0.isCustom }
-            .map { parseForMatches(with: $0, in: text, for: range) }
-            .joined()
-        matches.append(contentsOf: regexs)
-
-        // Get all Checking Types of detectors, except for .custom because they contain their own regex
-        let detectorCheckingTypes = enabledDetectors
-            .filter { !$0.isCustom }
-            .reduce(0) { $0 | $1.textCheckingType.rawValue }
-        if detectorCheckingTypes > 0, let detector = try? NSDataDetector(types: detectorCheckingTypes) {
-            let detectorMatches = detector.matches(in: text.string, options: [], range: range)
-            matches.append(contentsOf: detectorMatches)
-        }
-
-        guard enabledDetectors.contains(.url) else {
-            return matches
-        }
-
-        // Enumerate NSAttributedString NSLinks and append ranges
-        var results: [NSTextCheckingResult] = matches
-
-        text.enumerateAttribute(NSAttributedString.Key.link, in: range, options: []) { value, range, _ in
-            guard let url = value as? URL else { return }
-            let result = NSTextCheckingResult.linkCheckingResult(range: range, url: url)
-            results.append(result)
-        }
-
-        return results
-    }
-
-    private func parseForMatches(with detector: DetectorType, in text: NSAttributedString, for range: NSRange) -> [NSTextCheckingResult] {
-        switch detector {
-        case .custom(let regex):
-            return regex.matches(in: text.string, options: [], range: range)
-        default:
-            fatalError("You must pass a .custom DetectorType")
-        }
-    }
-
-    private func setRangesForDetectors(in checkingResults: [NSTextCheckingResult]) {
-
-        guard checkingResults.isEmpty == false else { return }
-        
-        for result in checkingResults {
-
-            switch result.resultType {
-            case .address:
-                var ranges = rangesForDetectors[.address] ?? []
-                let tuple: (NSRange, MessageTextCheckingType) = (result.range, .addressComponents(result.addressComponents))
-                ranges.append(tuple)
-                rangesForDetectors.updateValue(ranges, forKey: .address)
-            case .date:
-                var ranges = rangesForDetectors[.date] ?? []
-                let tuple: (NSRange, MessageTextCheckingType) = (result.range, .date(result.date))
-                ranges.append(tuple)
-                rangesForDetectors.updateValue(ranges, forKey: .date)
-            case .phoneNumber:
-                var ranges = rangesForDetectors[.phoneNumber] ?? []
-                let tuple: (NSRange, MessageTextCheckingType) = (result.range, .phoneNumber(result.phoneNumber))
-                ranges.append(tuple)
-                rangesForDetectors.updateValue(ranges, forKey: .phoneNumber)
-            case .link:
-                var ranges = rangesForDetectors[.url] ?? []
-                let tuple: (NSRange, MessageTextCheckingType) = (result.range, .link(result.url))
-                ranges.append(tuple)
-                rangesForDetectors.updateValue(ranges, forKey: .url)
-            case .transitInformation:
-                var ranges = rangesForDetectors[.transitInformation] ?? []
-                let tuple: (NSRange, MessageTextCheckingType) = (result.range, .transitInfoComponents(result.components))
-                ranges.append(tuple)
-                rangesForDetectors.updateValue(ranges, forKey: .transitInformation)
-            case .regularExpression:
-                guard let text = text, let regex = result.regularExpression, let range = Range(result.range, in: text) else { return }
-                let detector = DetectorType.custom(regex)
-                var ranges = rangesForDetectors[detector] ?? []
-                let tuple: (NSRange, MessageTextCheckingType) = (result.range, .custom(pattern: regex.pattern, match: String(text[range])))
-                ranges.append(tuple)
-                rangesForDetectors.updateValue(ranges, forKey: detector)
-            default:
-                fatalError("Received an unrecognized NSTextCheckingResult.CheckingType")
-            }
-
-        }
-
-    }
-
-    // MARK: - Gesture Handling
-
-    private func stringIndex(at location: CGPoint) -> Int? {
-        guard textStorage.length > 0 else { return nil }
-
-        var location = location
-
-        location.x -= textInsets.left
-        location.y -= textInsets.top
-
-        let index = layoutManager.glyphIndex(for: location, in: textContainer)
-
-        let lineRect = layoutManager.lineFragmentUsedRect(forGlyphAt: index, effectiveRange: nil)
-        
-        var characterIndex: Int?
-        
-        if lineRect.contains(location) {
-            characterIndex = layoutManager.characterIndexForGlyph(at: index)
-        }
-        
-        return characterIndex
-
-    }
-
-  open func handleGesture(_ touchLocation: CGPoint) -> Bool {
-
-        guard let index = stringIndex(at: touchLocation) else { return false }
-
-        for (detectorType, ranges) in rangesForDetectors {
-            for (range, value) in ranges {
-                if range.contains(index) {
-                    handleGesture(for: detectorType, value: value)
-                    return true
-                }
-            }
-        }
-        return false
-    }
-
-    // swiftlint:disable cyclomatic_complexity
-    private func handleGesture(for detectorType: DetectorType, value: MessageTextCheckingType) {
-        
-        switch value {
-        case let .addressComponents(addressComponents):
-            var transformedAddressComponents = [String: String]()
-            guard let addressComponents = addressComponents else { return }
-            addressComponents.forEach { (key, value) in
-                transformedAddressComponents[key.rawValue] = value
-            }
-            handleAddress(transformedAddressComponents)
-        case let .phoneNumber(phoneNumber):
-            guard let phoneNumber = phoneNumber else { return }
-            handlePhoneNumber(phoneNumber)
-        case let .date(date):
-            guard let date = date else { return }
-            handleDate(date)
-        case let .link(url):
-            guard let url = url else { return }
-            handleURL(url)
-        case let .transitInfoComponents(transitInformation):
-            var transformedTransitInformation = [String: String]()
-            guard let transitInformation = transitInformation else { return }
-            transitInformation.forEach { (key, value) in
-                transformedTransitInformation[key.rawValue] = value
-            }
-            handleTransitInformation(transformedTransitInformation)
-        case let .custom(pattern, match):
-            guard let match = match else { return }
-            switch detectorType {
-            case .hashtag:
-                handleHashtag(match)
-            case .mention:
-                handleMention(match)
-            default:
-                handleCustom(pattern, match: match)
-            }
-        }
-    }
-    // swiftlint:enable cyclomatic_complexity
-    
-    private func handleAddress(_ addressComponents: [String: String]) {
-        delegate?.didSelectAddress(addressComponents)
-    }
-    
-    private func handleDate(_ date: Date) {
-        delegate?.didSelectDate(date)
-    }
-    
-    private func handleURL(_ url: URL) {
-        delegate?.didSelectURL(url)
-    }
-    
-    private func handlePhoneNumber(_ phoneNumber: String) {
-        delegate?.didSelectPhoneNumber(phoneNumber)
-    }
-    
-    private func handleTransitInformation(_ components: [String: String]) {
-        delegate?.didSelectTransitInformation(components)
-    }
-
-    private func handleHashtag(_ hashtag: String) {
-        delegate?.didSelectHashtag(hashtag)
-    }
-
-    private func handleMention(_ mention: String) {
-        delegate?.didSelectMention(mention)
-    }
-
-    private func handleCustom(_ pattern: String, match: String) {
-        delegate?.didSelectCustom(pattern, match: match)
-    }
-
-}
-
-internal enum MessageTextCheckingType {
-    case addressComponents([NSTextCheckingKey: String]?)
-    case date(Date?)
-    case phoneNumber(String?)
-    case link(URL?)
-    case transitInfoComponents([NSTextCheckingKey: String]?)
-    case custom(pattern: String, match: String?)
-}

+ 0 - 195
Pods/MessageKit/Sources/Views/MessagesCollectionView.swift

@@ -1,195 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-open class MessagesCollectionView: UICollectionView {
-
-    // MARK: - Properties
-
-    open weak var messagesDataSource: MessagesDataSource?
-
-    open weak var messagesDisplayDelegate: MessagesDisplayDelegate?
-
-    open weak var messagesLayoutDelegate: MessagesLayoutDelegate?
-
-    open weak var messageCellDelegate: MessageCellDelegate?
-
-    open var isTypingIndicatorHidden: Bool {
-        return messagesCollectionViewFlowLayout.isTypingIndicatorViewHidden
-    }
-
-    private var indexPathForLastItem: IndexPath? {
-        let lastSection = numberOfSections - 1
-        guard lastSection >= 0, numberOfItems(inSection: lastSection) > 0 else { return nil }
-        return IndexPath(item: numberOfItems(inSection: lastSection) - 1, section: lastSection)
-    }
-
-    open var messagesCollectionViewFlowLayout: MessagesCollectionViewFlowLayout {
-        guard let layout = collectionViewLayout as? MessagesCollectionViewFlowLayout else {
-            fatalError(MessageKitError.layoutUsedOnForeignType)
-        }
-        return layout
-    }
-
-    // MARK: - Initializers
-
-    public override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
-        super.init(frame: frame, collectionViewLayout: layout)
-        backgroundColor = .white
-        registerReusableViews()
-        setupGestureRecognizers()
-    }
-    
-    required public init?(coder aDecoder: NSCoder) {
-        super.init(frame: .zero, collectionViewLayout: MessagesCollectionViewFlowLayout())
-    }
-
-    public convenience init() {
-        self.init(frame: .zero, collectionViewLayout: MessagesCollectionViewFlowLayout())
-    }
-
-    // MARK: - Methods
-    
-    private func registerReusableViews() {
-        register(TextMessageCell.self)
-        register(MediaMessageCell.self)
-        register(LocationMessageCell.self)
-        register(AudioMessageCell.self)
-        register(ContactMessageCell.self)
-        register(TypingIndicatorCell.self)
-        register(MessageReusableView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader)
-        register(MessageReusableView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter)
-    }
-    
-    private func setupGestureRecognizers() {
-        let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleTapGesture(_:)))
-        tapGesture.delaysTouchesBegan = true
-        addGestureRecognizer(tapGesture)
-    }
-    
-    @objc
-    open func handleTapGesture(_ gesture: UIGestureRecognizer) {
-        guard gesture.state == .ended else { return }
-        
-        let touchLocation = gesture.location(in: self)
-        guard let indexPath = indexPathForItem(at: touchLocation) else { return }
-        
-        let cell = cellForItem(at: indexPath) as? MessageCollectionViewCell
-        cell?.handleTapGesture(gesture)
-    }
-
-    public func scrollToBottom(animated: Bool = false) {
-        let collectionViewContentHeight = collectionViewLayout.collectionViewContentSize.height
-
-        performBatchUpdates(nil) { _ in
-            self.scrollRectToVisible(CGRect(0.0, collectionViewContentHeight - 1.0, 1.0, 1.0), animated: animated)
-        }
-    }
-    
-    public func reloadDataAndKeepOffset() {
-        // stop scrolling
-        setContentOffset(contentOffset, animated: false)
-        
-        // calculate the offset and reloadData
-        let beforeContentSize = contentSize
-        reloadData()
-        layoutIfNeeded()
-        let afterContentSize = contentSize
-        
-        // reset the contentOffset after data is updated
-        let newOffset = CGPoint(
-            x: contentOffset.x + (afterContentSize.width - beforeContentSize.width),
-            y: contentOffset.y + (afterContentSize.height - beforeContentSize.height))
-        setContentOffset(newOffset, animated: false)
-    }
-
-    // MARK: - Typing Indicator API
-
-    /// Notifies the layout that the typing indicator will change state
-    ///
-    /// - Parameters:
-    ///   - isHidden: A Boolean value that is to be the new state of the typing indicator
-    internal func setTypingIndicatorViewHidden(_ isHidden: Bool) {
-        messagesCollectionViewFlowLayout.setTypingIndicatorViewHidden(isHidden)
-    }
-    
-    /// A method that by default checks if the section is the last in the
-    /// `messagesCollectionView` and that `isTypingIndicatorViewHidden`
-    /// is FALSE
-    ///
-    /// - Parameter section
-    /// - Returns: A Boolean indicating if the TypingIndicator should be presented at the given section
-    public func isSectionReservedForTypingIndicator(_ section: Int) -> Bool {
-        return messagesCollectionViewFlowLayout.isSectionReservedForTypingIndicator(section)
-    }
-
-    // MARK: View Register/Dequeue
-
-    /// Registers a particular cell using its reuse-identifier
-    public func register<T: UICollectionViewCell>(_ cellClass: T.Type) {
-        register(cellClass, forCellWithReuseIdentifier: String(describing: T.self))
-    }
-
-    /// Registers a reusable view for a specific SectionKind
-    public func register<T: UICollectionReusableView>(_ reusableViewClass: T.Type, forSupplementaryViewOfKind kind: String) {
-        register(reusableViewClass,
-                 forSupplementaryViewOfKind: kind,
-                 withReuseIdentifier: String(describing: T.self))
-    }
-    
-    /// Registers a nib with reusable view for a specific SectionKind
-    public func register<T: UICollectionReusableView>(_ nib: UINib? = UINib(nibName: String(describing: T.self), bundle: nil), headerFooterClassOfNib headerFooterClass: T.Type, forSupplementaryViewOfKind kind: String) {
-        register(nib,
-                 forSupplementaryViewOfKind: kind,
-                 withReuseIdentifier: String(describing: T.self))        
-    }
-
-    /// Generically dequeues a cell of the correct type allowing you to avoid scattering your code with guard-let-else-fatal
-    public func dequeueReusableCell<T: UICollectionViewCell>(_ cellClass: T.Type, for indexPath: IndexPath) -> T {
-        guard let cell = dequeueReusableCell(withReuseIdentifier: String(describing: T.self), for: indexPath) as? T else {
-            fatalError("Unable to dequeue \(String(describing: cellClass)) with reuseId of \(String(describing: T.self))")
-        }
-        return cell
-    }
-
-    /// Generically dequeues a header of the correct type allowing you to avoid scattering your code with guard-let-else-fatal
-    public func dequeueReusableHeaderView<T: UICollectionReusableView>(_ viewClass: T.Type, for indexPath: IndexPath) -> T {
-        let view = dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: String(describing: T.self), for: indexPath)
-        guard let viewType = view as? T else {
-            fatalError("Unable to dequeue \(String(describing: viewClass)) with reuseId of \(String(describing: T.self))")
-        }
-        return viewType
-    }
-
-    /// Generically dequeues a footer of the correct type allowing you to avoid scattering your code with guard-let-else-fatal
-    public func dequeueReusableFooterView<T: UICollectionReusableView>(_ viewClass: T.Type, for indexPath: IndexPath) -> T {
-        let view = dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: String(describing: T.self), for: indexPath)
-        guard let viewType = view as? T else {
-            fatalError("Unable to dequeue \(String(describing: viewClass)) with reuseId of \(String(describing: T.self))")
-        }
-        return viewType
-    }
-
-}

+ 0 - 122
Pods/MessageKit/Sources/Views/PlayButtonView.swift

@@ -1,122 +0,0 @@
-/*
- MIT License
-
- Copyright (c) 2017-2019 MessageKit
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-open class PlayButtonView: UIView {
-
-    // MARK: - Properties
-
-    public let triangleView = UIView()
-
-    private var triangleCenterXConstraint: NSLayoutConstraint?
-    private var cacheFrame: CGRect = .zero
-
-    // MARK: - Initializers
-
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-
-        setupSubviews()
-        setupConstraints()
-        setupView()
-    }
-
-    required public init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        
-        setupSubviews()
-        setupConstraints()
-        setupView()
-    }
-
-    // MARK: - Methods
-    
-    open override func layoutSubviews() {
-        super.layoutSubviews()
-        
-        guard !cacheFrame.equalTo(frame) else { return }
-        cacheFrame = frame
-        
-        updateTriangleConstraints()
-        applyCornerRadius()
-        applyTriangleMask()
-    }
-
-    private func setupSubviews() {
-        addSubview(triangleView)
-    }
-    
-    private func setupView() {
-        triangleView.clipsToBounds = true
-        triangleView.backgroundColor = .black
-        
-        backgroundColor = .playButtonLightGray
-    }
-
-    private func setupConstraints() {
-        triangleView.translatesAutoresizingMaskIntoConstraints = false
-
-        let centerX = triangleView.centerXAnchor.constraint(equalTo: centerXAnchor)
-        let centerY = triangleView.centerYAnchor.constraint(equalTo: centerYAnchor)
-        let width = triangleView.widthAnchor.constraint(equalTo: widthAnchor, multiplier: 0.5)
-        let height = triangleView.heightAnchor.constraint(equalTo: heightAnchor, multiplier: 0.5)
-
-        triangleCenterXConstraint = centerX
-
-        NSLayoutConstraint.activate([centerX, centerY, width, height])
-    }
-
-    private func triangleMask(for frame: CGRect) -> CAShapeLayer {
-        let shapeLayer = CAShapeLayer()
-        let trianglePath = UIBezierPath()
-
-        let point1 = CGPoint(x: frame.minX, y: frame.minY)
-        let point2 = CGPoint(x: frame.maxX, y: frame.maxY/2)
-        let point3 = CGPoint(x: frame.minX, y: frame.maxY)
-
-        trianglePath .move(to: point1)
-        trianglePath .addLine(to: point2)
-        trianglePath .addLine(to: point3)
-        trianglePath .close()
-
-        shapeLayer.path = trianglePath.cgPath
-
-        return shapeLayer
-    }
-
-    private func updateTriangleConstraints() {
-        triangleCenterXConstraint?.constant = frame.width/8
-    }
-
-    private func applyTriangleMask() {
-        let rect = CGRect(origin: .zero, size: triangleView.bounds.size)
-        triangleView.layer.mask = triangleMask(for: rect)
-    }
-
-    private func applyCornerRadius() {
-        layer.cornerRadius = frame.width / 2
-    }
-    
-}

+ 0 - 155
Pods/MessageKit/Sources/Views/TypingBubble.swift

@@ -1,155 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// A subclass of `UIView` that mimics the iMessage typing bubble
-open class TypingBubble: UIView {
-    
-    // MARK: - Properties
-    
-    open var isPulseEnabled: Bool = true
-    
-    public private(set) var isAnimating: Bool = false
-    
-    open override var backgroundColor: UIColor? {
-        set {
-            [contentBubble, cornerBubble, tinyBubble].forEach { $0.backgroundColor = newValue }
-        }
-        get {
-            return contentBubble.backgroundColor
-        }
-    }
-    
-    private struct AnimationKeys {
-        static let pulse = "typingBubble.pulse"
-    }
-    
-    // MARK: - Subviews
-    
-    /// The indicator used to display the typing animation.
-    public let typingIndicator = TypingIndicator()
-    
-    public let contentBubble = UIView()
-    
-    public let cornerBubble = BubbleCircle()
-    
-    public let tinyBubble = BubbleCircle()
-    
-    // MARK: - Animation Layers
-    
-    open var contentPulseAnimationLayer: CABasicAnimation {
-        let animation = CABasicAnimation(keyPath: "transform.scale")
-        animation.fromValue = 1
-        animation.toValue = 1.04
-        animation.duration = 1
-        animation.repeatCount = .infinity
-        animation.autoreverses = true
-        return animation
-    }
-    
-    open var circlePulseAnimationLayer: CABasicAnimation {
-        let animation = CABasicAnimation(keyPath: "transform.scale")
-        animation.fromValue = 1
-        animation.toValue = 1.1
-        animation.duration = 0.5
-        animation.repeatCount = .infinity
-        animation.autoreverses = true
-        return animation
-    }
-    
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-        setupSubviews()
-    }
-    
-    public required init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        setupSubviews()
-    }
-    
-    open func setupSubviews() {
-        addSubview(tinyBubble)
-        addSubview(cornerBubble)
-        addSubview(contentBubble)
-        contentBubble.addSubview(typingIndicator)
-        backgroundColor = .incomingGray
-    }
-    
-    // MARK: - Layout
-    
-    open override func layoutSubviews() {
-        super.layoutSubviews()
-        
-        // To maintain the iMessage like bubble the width:height ratio of the frame
-        // must be close to 1.65
-        let ratio = bounds.width / bounds.height
-        let extraRightInset = bounds.width - 1.65/ratio*bounds.width
-        
-        let tinyBubbleRadius: CGFloat = bounds.height / 6
-        tinyBubble.frame = CGRect(x: 0,
-                                  y: bounds.height - tinyBubbleRadius,
-                                  width: tinyBubbleRadius,
-                                  height: tinyBubbleRadius)
-        
-        let cornerBubbleRadius = tinyBubbleRadius * 2
-        let offset: CGFloat = tinyBubbleRadius / 6
-        cornerBubble.frame = CGRect(x: tinyBubbleRadius - offset,
-                                    y: bounds.height - (1.5 * cornerBubbleRadius) + offset,
-                                    width: cornerBubbleRadius,
-                                    height: cornerBubbleRadius)
-        
-        let contentBubbleFrame = CGRect(x: tinyBubbleRadius + offset,
-                              y: 0,
-                              width: bounds.width - (tinyBubbleRadius + offset) - extraRightInset,
-                              height: bounds.height - (tinyBubbleRadius + offset))
-        let contentBubbleFrameCornerRadius = contentBubbleFrame.height / 2
-        
-        contentBubble.frame = contentBubbleFrame
-        contentBubble.layer.cornerRadius = contentBubbleFrameCornerRadius
-            
-        let insets = UIEdgeInsets(top: offset, left: contentBubbleFrameCornerRadius / 1.25, bottom: offset, right: contentBubbleFrameCornerRadius / 1.25)
-        typingIndicator.frame = contentBubble.bounds.inset(by: insets)
-    }
-    
-    // MARK: - Animation API
-    
-    open func startAnimating() {
-        defer { isAnimating = true }
-        guard !isAnimating else { return }
-        typingIndicator.startAnimating()
-        if isPulseEnabled {
-            contentBubble.layer.add(contentPulseAnimationLayer, forKey: AnimationKeys.pulse)
-            [cornerBubble, tinyBubble].forEach { $0.layer.add(circlePulseAnimationLayer, forKey: AnimationKeys.pulse) }
-        }
-    }
-    
-    open func stopAnimating() {
-        defer { isAnimating = false }
-        guard isAnimating else { return }
-        typingIndicator.stopAnimating()
-        [contentBubble, cornerBubble, tinyBubble].forEach { $0.layer.removeAnimation(forKey: AnimationKeys.pulse) }
-    }
-    
-}

+ 0 - 165
Pods/MessageKit/Sources/Views/TypingIndicator.swift

@@ -1,165 +0,0 @@
-/*
- MIT License
- 
- Copyright (c) 2017-2019 MessageKit
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-import UIKit
-
-/// A `UIView` subclass that holds 3 dots which can be animated
-open class TypingIndicator: UIView {
-    
-    // MARK: - Properties
-    
-    /// The offset that each dot will transform by during the bounce animation
-    public var bounceOffset: CGFloat = 2.5
-    
-    /// A convenience accessor for the `backgroundColor` of each dot
-    open var dotColor: UIColor = UIColor.lightGray {
-        didSet {
-            dots.forEach { $0.backgroundColor = dotColor }
-        }
-    }
-    
-    /// A flag that determines if the bounce animation is added in `startAnimating()`
-    public var isBounceEnabled: Bool = false
-    
-    /// A flag that determines if the opacity animation is added in `startAnimating()`
-    public var isFadeEnabled: Bool = true
-    
-    /// A flag indicating the animation state
-    public private(set) var isAnimating: Bool = false
-    
-    /// Keys for each animation layer
-    private struct AnimationKeys {
-        static let offset = "typingIndicator.offset"
-        static let bounce = "typingIndicator.bounce"
-        static let opacity = "typingIndicator.opacity"
-    }
-    
-    /// The `CABasicAnimation` applied when `isBounceEnabled` is TRUE to move the dot to the correct
-    /// initial offset
-    open var initialOffsetAnimationLayer: CABasicAnimation {
-        let animation = CABasicAnimation(keyPath: "transform.translation.y")
-        animation.byValue = -bounceOffset
-        animation.duration = 0.5
-        animation.isRemovedOnCompletion = true
-        return animation
-    }
-    
-    /// The `CABasicAnimation` applied when `isBounceEnabled` is TRUE
-    open var bounceAnimationLayer: CABasicAnimation {
-        let animation = CABasicAnimation(keyPath: "transform.translation.y")
-        animation.toValue = -bounceOffset
-        animation.fromValue = bounceOffset
-        animation.duration = 0.5
-        animation.repeatCount = .infinity
-        animation.autoreverses = true
-        return animation
-    }
-    
-    /// The `CABasicAnimation` applied when `isFadeEnabled` is TRUE
-    open var opacityAnimationLayer: CABasicAnimation {
-        let animation = CABasicAnimation(keyPath: "opacity")
-        animation.fromValue = 1
-        animation.toValue = 0.5
-        animation.duration = 0.5
-        animation.repeatCount = .infinity
-        animation.autoreverses = true
-        return animation
-    }
-    
-    // MARK: - Subviews
-    
-    public let stackView = UIStackView()
-    
-    public let dots: [BubbleCircle] = {
-        return [BubbleCircle(), BubbleCircle(), BubbleCircle()]
-    }()
-    
-    // MARK: - Initialization
-    
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-        setupView()
-    }
-    
-    public required init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        setupView()
-    }
-    
-    /// Sets up the view
-    private func setupView() {
-        dots.forEach {
-            $0.backgroundColor = dotColor
-            $0.heightAnchor.constraint(equalTo: $0.widthAnchor).isActive = true
-            stackView.addArrangedSubview($0)
-        }
-        stackView.axis = .horizontal
-        stackView.alignment = .center
-        stackView.distribution = .fillEqually
-        addSubview(stackView)
-    }
-    
-    // MARK: - Layout
-    
-    open override func layoutSubviews() {
-        super.layoutSubviews()
-        stackView.frame = bounds
-        stackView.spacing = bounds.width > 0 ? 5 : 0
-    }
-    
-    // MARK: - Animation API
-    
-    /// Sets the state of the `TypingIndicator` to animating and applies animation layers
-    open func startAnimating() {
-        defer { isAnimating = true }
-        guard !isAnimating else { return }
-        var delay: TimeInterval = 0
-        for dot in dots {
-            DispatchQueue.main.asyncAfter(deadline: .now() + delay) { [weak self] in
-                guard let `self` = self else { return }
-                if self.isBounceEnabled {
-                    dot.layer.add(self.initialOffsetAnimationLayer, forKey: AnimationKeys.offset)
-                    let bounceLayer = self.bounceAnimationLayer
-                    bounceLayer.timeOffset = delay + 0.33
-                    dot.layer.add(bounceLayer, forKey: AnimationKeys.bounce)
-                }
-                if self.isFadeEnabled {
-                    dot.layer.add(self.opacityAnimationLayer, forKey: AnimationKeys.opacity)
-                }
-            }
-            delay += 0.33
-        }
-    }
-    
-    /// Sets the state of the `TypingIndicator` to not animating and removes animation layers
-    open func stopAnimating() {
-        defer { isAnimating = false }
-        guard isAnimating else { return }
-        dots.forEach {
-            $0.layer.removeAnimation(forKey: AnimationKeys.bounce)
-            $0.layer.removeAnimation(forKey: AnimationKeys.opacity)
-        }
-    }
-    
-}

+ 0 - 26
Pods/Target Support Files/MessageKit/MessageKit-Info.plist

@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-  <key>CFBundleDevelopmentRegion</key>
-  <string>en</string>
-  <key>CFBundleExecutable</key>
-  <string>${EXECUTABLE_NAME}</string>
-  <key>CFBundleIdentifier</key>
-  <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
-  <key>CFBundleInfoDictionaryVersion</key>
-  <string>6.0</string>
-  <key>CFBundleName</key>
-  <string>${PRODUCT_NAME}</string>
-  <key>CFBundlePackageType</key>
-  <string>FMWK</string>
-  <key>CFBundleShortVersionString</key>
-  <string>3.0.0</string>
-  <key>CFBundleSignature</key>
-  <string>????</string>
-  <key>CFBundleVersion</key>
-  <string>${CURRENT_PROJECT_VERSION}</string>
-  <key>NSPrincipalClass</key>
-  <string></string>
-</dict>
-</plist>

+ 0 - 5
Pods/Target Support Files/MessageKit/MessageKit-dummy.m

@@ -1,5 +0,0 @@
-#import <Foundation/Foundation.h>
-@interface PodsDummy_MessageKit : NSObject
-@end
-@implementation PodsDummy_MessageKit
-@end

+ 0 - 12
Pods/Target Support Files/MessageKit/MessageKit-prefix.pch

@@ -1,12 +0,0 @@
-#ifdef __OBJC__
-#import <UIKit/UIKit.h>
-#else
-#ifndef FOUNDATION_EXPORT
-#if defined(__cplusplus)
-#define FOUNDATION_EXPORT extern "C"
-#else
-#define FOUNDATION_EXPORT extern
-#endif
-#endif
-#endif
-

+ 0 - 16
Pods/Target Support Files/MessageKit/MessageKit-umbrella.h

@@ -1,16 +0,0 @@
-#ifdef __OBJC__
-#import <UIKit/UIKit.h>
-#else
-#ifndef FOUNDATION_EXPORT
-#if defined(__cplusplus)
-#define FOUNDATION_EXPORT extern "C"
-#else
-#define FOUNDATION_EXPORT extern
-#endif
-#endif
-#endif
-
-
-FOUNDATION_EXPORT double MessageKitVersionNumber;
-FOUNDATION_EXPORT const unsigned char MessageKitVersionString[];
-

+ 0 - 6
Pods/Target Support Files/MessageKit/MessageKit.modulemap

@@ -1,6 +0,0 @@
-framework module MessageKit {
-  umbrella header "MessageKit-umbrella.h"
-
-  export *
-  module * { export * }
-}

+ 0 - 11
Pods/Target Support Files/MessageKit/MessageKit.xcconfig

@@ -1,11 +0,0 @@
-CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MessageKit
-FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/InputBarAccessoryView"
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
-PODS_BUILD_DIR = ${BUILD_DIR}
-PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_ROOT = ${SRCROOT}
-PODS_TARGET_SRCROOT = ${PODS_ROOT}/MessageKit
-PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
-SKIP_INSTALL = YES
-SWIFT_VERSION = 4.2

+ 0 - 24
Pods/Target Support Files/MessageKit/ResourceBundle-MessageKitAssets-MessageKit-Info.plist

@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-  <key>CFBundleDevelopmentRegion</key>
-  <string>en</string>
-  <key>CFBundleIdentifier</key>
-  <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
-  <key>CFBundleInfoDictionaryVersion</key>
-  <string>6.0</string>
-  <key>CFBundleName</key>
-  <string>${PRODUCT_NAME}</string>
-  <key>CFBundlePackageType</key>
-  <string>BNDL</string>
-  <key>CFBundleShortVersionString</key>
-  <string>3.0.0</string>
-  <key>CFBundleSignature</key>
-  <string>????</string>
-  <key>CFBundleVersion</key>
-  <string>1</string>
-  <key>NSPrincipalClass</key>
-  <string></string>
-</dict>
-</plist>