Ver Fonte

1.删除无用的 pod
2.增加 logo

100Years há 3 meses atrás
pai
commit
8cb1ce8eeb
100 ficheiros alterados com 538 adições e 22478 exclusões
  1. 1 10
      Podfile
  2. 1 21
      Podfile.lock
  3. 0 19
      Pods/Alamofire/LICENSE
  4. 0 227
      Pods/Alamofire/README.md
  5. 0 870
      Pods/Alamofire/Source/AFError.swift
  6. 0 40
      Pods/Alamofire/Source/Alamofire.swift
  7. 0 61
      Pods/Alamofire/Source/AlamofireExtended.swift
  8. 0 403
      Pods/Alamofire/Source/AuthenticationInterceptor.swift
  9. 0 109
      Pods/Alamofire/Source/CachedResponseHandler.swift
  10. 0 655
      Pods/Alamofire/Source/Combine.swift
  11. 0 704
      Pods/Alamofire/Source/Concurrency.swift
  12. 0 37
      Pods/Alamofire/Source/DispatchQueue+Alamofire.swift
  13. 0 892
      Pods/Alamofire/Source/EventMonitor.swift
  14. 0 447
      Pods/Alamofire/Source/HTTPHeaders.swift
  15. 0 56
      Pods/Alamofire/Source/HTTPMethod.swift
  16. 0 584
      Pods/Alamofire/Source/MultipartFormData.swift
  17. 0 89
      Pods/Alamofire/Source/MultipartUpload.swift
  18. 0 267
      Pods/Alamofire/Source/NetworkReachabilityManager.swift
  19. 0 115
      Pods/Alamofire/Source/Notifications.swift
  20. 0 49
      Pods/Alamofire/Source/OperationQueue+Alamofire.swift
  21. 0 217
      Pods/Alamofire/Source/ParameterEncoder.swift
  22. 0 342
      Pods/Alamofire/Source/ParameterEncoding.swift
  23. 0 161
      Pods/Alamofire/Source/Protected.swift
  24. 0 113
      Pods/Alamofire/Source/RedirectHandler.swift
  25. 0 1912
      Pods/Alamofire/Source/Request.swift
  26. 0 357
      Pods/Alamofire/Source/RequestInterceptor.swift
  27. 0 149
      Pods/Alamofire/Source/RequestTaskMap.swift
  28. 0 453
      Pods/Alamofire/Source/Response.swift
  29. 0 1282
      Pods/Alamofire/Source/ResponseSerialization.swift
  30. 0 120
      Pods/Alamofire/Source/Result+Alamofire.swift
  31. 0 434
      Pods/Alamofire/Source/RetryPolicy.swift
  32. 0 743
      Pods/Alamofire/Source/ServerTrustEvaluation.swift
  33. 0 1264
      Pods/Alamofire/Source/Session.swift
  34. 0 336
      Pods/Alamofire/Source/SessionDelegate.swift
  35. 0 55
      Pods/Alamofire/Source/StringEncoding+Alamofire.swift
  36. 0 105
      Pods/Alamofire/Source/URLConvertible+URLRequestConvertible.swift
  37. 0 982
      Pods/Alamofire/Source/URLEncodedFormEncoder.swift
  38. 0 39
      Pods/Alamofire/Source/URLRequest+Alamofire.swift
  39. 0 46
      Pods/Alamofire/Source/URLSessionConfiguration+Alamofire.swift
  40. 0 302
      Pods/Alamofire/Source/Validation.swift
  41. 1 21
      Pods/Manifest.lock
  42. 0 19
      Pods/Masonry/LICENSE
  43. 0 26
      Pods/Masonry/Masonry/MASCompositeConstraint.h
  44. 0 183
      Pods/Masonry/Masonry/MASCompositeConstraint.m
  45. 0 66
      Pods/Masonry/Masonry/MASConstraint+Private.h
  46. 0 272
      Pods/Masonry/Masonry/MASConstraint.h
  47. 0 301
      Pods/Masonry/Masonry/MASConstraint.m
  48. 0 146
      Pods/Masonry/Masonry/MASConstraintMaker.h
  49. 0 273
      Pods/Masonry/Masonry/MASConstraintMaker.m
  50. 0 22
      Pods/Masonry/Masonry/MASLayoutConstraint.h
  51. 0 13
      Pods/Masonry/Masonry/MASLayoutConstraint.m
  52. 0 136
      Pods/Masonry/Masonry/MASUtilities.h
  53. 0 49
      Pods/Masonry/Masonry/MASViewAttribute.h
  54. 0 46
      Pods/Masonry/Masonry/MASViewAttribute.m
  55. 0 48
      Pods/Masonry/Masonry/MASViewConstraint.h
  56. 0 401
      Pods/Masonry/Masonry/MASViewConstraint.m
  57. 0 29
      Pods/Masonry/Masonry/Masonry.h
  58. 0 72
      Pods/Masonry/Masonry/NSArray+MASAdditions.h
  59. 0 162
      Pods/Masonry/Masonry/NSArray+MASAdditions.m
  60. 0 41
      Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h
  61. 0 16
      Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h
  62. 0 146
      Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m
  63. 0 111
      Pods/Masonry/Masonry/View+MASAdditions.h
  64. 0 186
      Pods/Masonry/Masonry/View+MASAdditions.m
  65. 0 133
      Pods/Masonry/Masonry/View+MASShorthandAdditions.h
  66. 0 30
      Pods/Masonry/Masonry/ViewController+MASAdditions.h
  67. 0 39
      Pods/Masonry/Masonry/ViewController+MASAdditions.m
  68. 0 415
      Pods/Masonry/README.md
  69. 524 800
      Pods/Pods.xcodeproj/project.pbxproj
  70. 0 58
      Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/Alamofire.xcscheme
  71. 0 58
      Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/Masonry.xcscheme
  72. 0 58
      Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/TZImagePickerController.xcscheme
  73. 0 58
      Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/WARangeSlider.xcscheme
  74. 11 39
      Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/xcschememanagement.plist
  75. 0 22
      Pods/TZImagePickerController/LICENSE
  76. 0 176
      Pods/TZImagePickerController/README.md
  77. 0 27
      Pods/TZImagePickerController/TZImagePickerController/Location/TZLocationManager.h
  78. 0 90
      Pods/TZImagePickerController/TZImagePickerController/Location/TZLocationManager.m
  79. 0 19
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/NSBundle+TZImagePicker.h
  80. 0 35
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/NSBundle+TZImagePicker.m
  81. 0 61
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetCell.h
  82. 0 548
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetCell.m
  83. 0 56
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetModel.h
  84. 0 79
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetModel.m
  85. 0 16
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAuthLimitedFooterTipView.h
  86. 0 87
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAuthLimitedFooterTipView.m
  87. 0 16
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZGifPhotoPreviewController.h
  88. 0 173
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZGifPhotoPreviewController.m
  89. 0 39
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageCropManager.h
  90. 0 199
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageCropManager.m
  91. 0 140
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageManager.h
  92. 0 1077
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageManager.m
  93. BIN
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/MMVideoPreviewPlay@2x.png
  94. BIN
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/MMVideoPreviewPlayHL@2x.png
  95. BIN
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/VideoSendIcon@2x.png
  96. BIN
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/addMore@2x.png
  97. 0 26
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/ar.lproj/Localizable.strings
  98. 0 26
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/de.lproj/Localizable.strings
  99. BIN
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/en.lproj/Localizable.strings
  100. 0 26
      Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/es.lproj/Localizable.strings

+ 1 - 10
Podfile

@@ -14,20 +14,11 @@ target 'TSLiveWallpaper' do
 
   pod 'Toast-Swift'
   pod 'Kingfisher', '7.10.0'
-  pod 'Alamofire', '5.6.4'
-  pod 'Masonry'
-
-#  pod 'SOZOChromoplast'
-  pod 'TZImagePickerController'
-
+#  pod 'Alamofire', '5.6.4'
 
   pod 'MJRefresh', '3.7.5'
   pod 'IQKeyboardManagerSwift', '6.5.12'
   pod 'TYCyclePagerView'
-  # pod 'YYModel'
-# banner
-  ##pod 'SDCycleScrollView','>= 1.82'
-  pod "WARangeSlider"
 
 end
 

+ 1 - 21
Podfile.lock

@@ -1,60 +1,40 @@
 PODS:
-  - Alamofire (5.6.4)
   - IQKeyboardManagerSwift (6.5.12)
   - Kingfisher (7.10.0)
-  - Masonry (1.1.0)
   - MJRefresh (3.7.5)
   - ObjectMapper (4.2.0)
   - SnapKit (5.7.1)
   - Toast-Swift (5.1.1)
   - TYCyclePagerView (1.2.0)
-  - TZImagePickerController (3.8.8):
-    - TZImagePickerController/Basic (= 3.8.8)
-    - TZImagePickerController/Location (= 3.8.8)
-  - TZImagePickerController/Basic (3.8.8)
-  - TZImagePickerController/Location (3.8.8)
-  - WARangeSlider (1.2.0)
 
 DEPENDENCIES:
-  - Alamofire (= 5.6.4)
   - IQKeyboardManagerSwift (= 6.5.12)
   - Kingfisher (= 7.10.0)
-  - Masonry
   - MJRefresh (= 3.7.5)
   - ObjectMapper (= 4.2)
   - SnapKit
   - Toast-Swift
   - TYCyclePagerView
-  - TZImagePickerController
-  - WARangeSlider
 
 SPEC REPOS:
   trunk:
-    - Alamofire
     - IQKeyboardManagerSwift
     - Kingfisher
-    - Masonry
     - MJRefresh
     - ObjectMapper
     - SnapKit
     - Toast-Swift
     - TYCyclePagerView
-    - TZImagePickerController
-    - WARangeSlider
 
 SPEC CHECKSUMS:
-  Alamofire: 4e95d97098eacb88856099c4fc79b526a299e48c
   IQKeyboardManagerSwift: 371b08cb39664fb56030f5345c815a4ffc74bbc0
   Kingfisher: a18f05d3b6d37d8650ee4a3e61d57a28fc6207f6
-  Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   MJRefresh: fdf5e979eb406a0341468932d1dfc8b7f9fce961
   ObjectMapper: 1eb41f610210777375fa806bf161dc39fb832b81
   SnapKit: d612e99e678a2d3b95bf60b0705ed0a35c03484a
   Toast-Swift: 7a03a532afe3a560d4044bc7c237e2864d295173
   TYCyclePagerView: 2b051dade0615c70784aa34f40c646feeddb7344
-  TZImagePickerController: d084a7b97c82d387e7669dd86dc9a9057500aacf
-  WARangeSlider: 03f195d4dc5419e6b0d9043cc94fdf418dfe804d
 
-PODFILE CHECKSUM: 2b76774c2c825040601161b5ceaa0e459a7f8c05
+PODFILE CHECKSUM: d845390dcb5d2a1807fc43839de70d8677485883
 
 COCOAPODS: 1.16.2

+ 0 - 19
Pods/Alamofire/LICENSE

@@ -1,19 +0,0 @@
-Copyright (c) 2014-2022 Alamofire Software Foundation (http://alamofire.org/)
-
-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.

+ 0 - 227
Pods/Alamofire/README.md

@@ -1,227 +0,0 @@
-![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/master/Resources/AlamofireLogo.png)
-
-[![Swift](https://img.shields.io/badge/Swift-5.3_5.4_5.5_5.6-orange?style=flat-square)](https://img.shields.io/badge/Swift-5.3_5.4_5.5_5.6-Orange?style=flat-square)
-[![Platforms](https://img.shields.io/badge/Platforms-macOS_iOS_tvOS_watchOS_Linux_Windows-yellowgreen?style=flat-square)](https://img.shields.io/badge/Platforms-macOS_iOS_tvOS_watchOS_Linux_Windows-Green?style=flat-square)
-[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg?style=flat-square)](https://img.shields.io/cocoapods/v/Alamofire.svg)
-[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat-square)](https://github.com/Carthage/Carthage)
-[![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)
-[![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat-square)](https://twitter.com/AlamofireSF)
-[![Swift Forums](https://img.shields.io/badge/Swift_Forums-Alamofire-orange?style=flat-square)](https://forums.swift.org/c/related-projects/alamofire/37)
-
-Alamofire is an HTTP networking library written in Swift.
-
-- [Features](#features)
-- [Component Libraries](#component-libraries)
-- [Requirements](#requirements)
-- [Migration Guides](#migration-guides)
-- [Communication](#communication)
-- [Installation](#installation)
-- [Contributing](#contributing)
-- [Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#using-alamofire)
-  - [**Introduction -**](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#introduction) [Making Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#making-requests), [Response Handling](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-handling), [Response Validation](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-validation), [Response Caching](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-caching)
-  - **HTTP -** [HTTP Methods](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-methods), [Parameters and Parameter Encoder](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md##request-parameters-and-parameter-encoders), [HTTP Headers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-headers), [Authentication](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#authentication)
-  - **Large Data -** [Downloading Data to a File](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#downloading-data-to-a-file), [Uploading Data to a Server](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#uploading-data-to-a-server)
-  - **Tools -** [Statistical Metrics](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#statistical-metrics), [cURL Command Output](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#curl-command-output)
-- [Advanced Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md)
-  - **URL Session -** [Session Manager](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session), [Session Delegate](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#sessiondelegate), [Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#request)
-  - **Routing -** [Routing Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#routing-requests), [Adapting and Retrying Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#adapting-and-retrying-requests-with-requestinterceptor)
-  - **Model Objects -** [Custom Response Handlers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#customizing-response-handlers)
-  - **Advanced Concurrency -** [Swift Concurrency](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#using-alamofire-with-swift-concurrency) and [Combine](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#using-alamofire-with-combine)
-  - **Connection -** [Security](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#security), [Network Reachability](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#network-reachability)
-- [Open Radars](#open-radars)
-- [FAQ](#faq)
-- [Credits](#credits)
-- [Donations](#donations)
-- [License](#license)
-
-## Features
-
-- [x] Chainable Request / Response Methods
-- [x] Swift Concurrency Support Back to iOS 13, macOS 10.15, tvOS 13, and watchOS 6.
-- [x] Combine Support
-- [x] URL / JSON Parameter Encoding
-- [x] Upload File / Data / Stream / MultipartFormData
-- [x] Download File using Request or Resume Data
-- [x] Authentication with `URLCredential`
-- [x] HTTP Response Validation
-- [x] Upload and Download Progress Closures with Progress
-- [x] cURL Command Output
-- [x] Dynamically Adapt and Retry Requests
-- [x] TLS Certificate and Public Key Pinning
-- [x] Network Reachability
-- [x] Comprehensive Unit and Integration Test Coverage
-- [x] [Complete Documentation](https://alamofire.github.io/Alamofire)
-
-## Component Libraries
-
-In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem.
-
-- [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache, and a priority-based image downloading system.
-- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `URLSession` instances not managed by Alamofire.
-
-## Requirements
-
-| Platform | Minimum Swift Version | Installation | Status |
-| --- | --- | --- | --- |
-| iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+ | 5.3 | [CocoaPods](#cocoapods), [Carthage](#carthage), [Swift Package Manager](#swift-package-manager), [Manual](#manually) | Fully Tested |
-| Linux | Latest Only | [Swift Package Manager](#swift-package-manager) | Building But Unsupported |
-| Windows | Latest Only | [Swift Package Manager](#swift-package-manager) | Building But Unsupported |
-
-#### Known Issues on Linux and Windows
-
-Alamofire builds on Linux and Windows but there are missing features and many issues in the underlying `swift-corelibs-foundation` that prevent full functionality and may cause crashes. These include:
-- `ServerTrustManager` and associated certificate functionality is unavailable, so there is no certificate pinning and no client certificate support.
-- Various methods of HTTP authentication may crash, including HTTP Basic and HTTP Digest. Crashes may occur if responses contain server challenges.
-- Cache control through `CachedResponseHandler` and associated APIs is unavailable, as the underlying delegate methods aren't called.
-- `URLSessionTaskMetrics` are never gathered.
-
-Due to these issues, Alamofire is unsupported on Linux and Windows. Please report any crashes to the [Swift bug reporter](https://bugs.swift.org).
-
-## Migration Guides
-
-- [Alamofire 5.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%205.0%20Migration%20Guide.md)
-- [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md)
-- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md)
-- [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md)
-
-## Communication
-- If you **need help with making network requests** using Alamofire, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire) and tag `alamofire`.
-- If you need to **find or understand an API**, check [our documentation](http://alamofire.github.io/Alamofire/) or [Apple's documentation for `URLSession`](https://developer.apple.com/documentation/foundation/url_loading_system), on top of which Alamofire is built.
-- If you need **help with an Alamofire feature**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire).
-- If you'd like to **discuss Alamofire best practices**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire).
-- If you'd like to **discuss a feature request**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). 
-- If you **found a bug**, open an issue here on GitHub and follow the guide. The more detail the better!
-
-## Installation
-
-### CocoaPods
-
-[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`:
-
-```ruby
-pod 'Alamofire'
-```
-
-### Carthage
-
-[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`:
-
-```ogdl
-github "Alamofire/Alamofire"
-```
-
-### Swift Package Manager
-
-The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. 
-
-Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
-
-```swift
-dependencies: [
-    .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.6.1"))
-]
-```
-
-### Manually
-
-If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually.
-
-#### Embedded Framework
-
-- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:
-
-  ```bash
-  $ git init
-  ```
-
-- Add Alamofire as a git [submodule](https://git-scm.com/docs/git-submodule) by running the following command:
-
-  ```bash
-  $ git submodule add https://github.com/Alamofire/Alamofire.git
-  ```
-
-- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project.
-
-    > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter.
-
-- Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target.
-- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.
-- In the tab bar at the top of that window, open the "General" panel.
-- Click on the `+` button under the "Embedded Binaries" section.
-- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder.
-
-    > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`.
-
-- Select the top `Alamofire.framework` for iOS and the bottom one for macOS.
-
-    > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS`, or `Alamofire watchOS`.
-
-- And that's it!
-
-  > The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.
-
-## Contributing
-
-Before contributing to Alamofire, please read the instructions detailed in our [contribution guide](https://github.com/Alamofire/Alamofire/blob/master/CONTRIBUTING.md).
-
-## Open Radars
-
-The following radars have some effect on the current implementation of Alamofire.
-
-- [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in the test case
-- `rdar://26870455` - Background URL Session Configurations do not work in the simulator
-- `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest`
-
-## Resolved Radars
-
-The following radars have been resolved over time after being filed against the Alamofire project.
-
-- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage.
-  - (Resolved): 9/1/17 in Xcode 9 beta 6.
-- [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+
-  - (Resolved): Just add `CFNetwork` to your linked frameworks.
-- `FB7624529` - `urlSession(_:task:didFinishCollecting:)` never called on watchOS
-  - (Resolved): Metrics now collected on watchOS 7+.
-
-## FAQ
-
-### What's the origin of the name Alamofire?
-
-Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas.
-
-## Credits
-
-Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases.
-
-### Security Disclosure
-
-If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker.
-
-## Sponsorship
-
-The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially stay registered as a federal non-profit organization.
-Registering will allow Foundation members to gain some legal protections and also allow us to put donations to use, tax-free.
-Sponsoring the ASF will enable us to:
-
-- Pay our yearly legal fees to keep the non-profit in good status
-- Pay for our mail servers to help us stay on top of all questions and security issues
-- Potentially fund test servers to make it easier for us to test the edge cases
-- Potentially fund developers to work on one of our projects full-time
-
-The community adoption of the ASF libraries has been amazing.
-We are greatly humbled by your enthusiasm around the projects and want to continue to do everything we can to move the needle forward.
-With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members.
-If you use any of our libraries for work, see if your employers would be interested in donating.
-Any amount you can donate, whether once or monthly, to help us reach our goal would be greatly appreciated.
-
-[Sponsor Alamofire](https://github.com/sponsors/Alamofire)
-
-## Supporters
-
-[MacStadium](https://macstadium.com) provides Alamofire with a free, hosted Mac mini.
-
-![Powered by MacStadium](https://raw.githubusercontent.com/Alamofire/Alamofire/master/Resources/MacStadiumLogo.png)
-
-## License
-
-Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details.

+ 0 - 870
Pods/Alamofire/Source/AFError.swift

@@ -1,870 +0,0 @@
-//
-//  AFError.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// `AFError` is the error type returned by Alamofire. It encompasses a few different types of errors, each with
-/// their own associated reasons.
-public enum AFError: Error {
-    /// The underlying reason the `.multipartEncodingFailed` error occurred.
-    public enum MultipartEncodingFailureReason {
-        /// The `fileURL` provided for reading an encodable body part isn't a file `URL`.
-        case bodyPartURLInvalid(url: URL)
-        /// The filename of the `fileURL` provided has either an empty `lastPathComponent` or `pathExtension.
-        case bodyPartFilenameInvalid(in: URL)
-        /// The file at the `fileURL` provided was not reachable.
-        case bodyPartFileNotReachable(at: URL)
-        /// Attempting to check the reachability of the `fileURL` provided threw an error.
-        case bodyPartFileNotReachableWithError(atURL: URL, error: Error)
-        /// The file at the `fileURL` provided is actually a directory.
-        case bodyPartFileIsDirectory(at: URL)
-        /// The size of the file at the `fileURL` provided was not returned by the system.
-        case bodyPartFileSizeNotAvailable(at: URL)
-        /// The attempt to find the size of the file at the `fileURL` provided threw an error.
-        case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: Error)
-        /// An `InputStream` could not be created for the provided `fileURL`.
-        case bodyPartInputStreamCreationFailed(for: URL)
-        /// An `OutputStream` could not be created when attempting to write the encoded data to disk.
-        case outputStreamCreationFailed(for: URL)
-        /// The encoded body data could not be written to disk because a file already exists at the provided `fileURL`.
-        case outputStreamFileAlreadyExists(at: URL)
-        /// The `fileURL` provided for writing the encoded body data to disk is not a file `URL`.
-        case outputStreamURLInvalid(url: URL)
-        /// The attempt to write the encoded body data to disk failed with an underlying error.
-        case outputStreamWriteFailed(error: Error)
-        /// The attempt to read an encoded body part `InputStream` failed with underlying system error.
-        case inputStreamReadFailed(error: Error)
-    }
-
-    /// Represents unexpected input stream length that occur when encoding the `MultipartFormData`. Instances will be
-    /// embedded within an `AFError.multipartEncodingFailed` `.inputStreamReadFailed` case.
-    public struct UnexpectedInputStreamLength: Error {
-        /// The expected byte count to read.
-        public var bytesExpected: UInt64
-        /// The actual byte count read.
-        public var bytesRead: UInt64
-    }
-
-    /// The underlying reason the `.parameterEncodingFailed` error occurred.
-    public enum ParameterEncodingFailureReason {
-        /// The `URLRequest` did not have a `URL` to encode.
-        case missingURL
-        /// JSON serialization failed with an underlying system error during the encoding process.
-        case jsonEncodingFailed(error: Error)
-        /// Custom parameter encoding failed due to the associated `Error`.
-        case customEncodingFailed(error: Error)
-    }
-
-    /// The underlying reason the `.parameterEncoderFailed` error occurred.
-    public enum ParameterEncoderFailureReason {
-        /// Possible missing components.
-        public enum RequiredComponent {
-            /// The `URL` was missing or unable to be extracted from the passed `URLRequest` or during encoding.
-            case url
-            /// The `HTTPMethod` could not be extracted from the passed `URLRequest`.
-            case httpMethod(rawValue: String)
-        }
-
-        /// A `RequiredComponent` was missing during encoding.
-        case missingRequiredComponent(RequiredComponent)
-        /// The underlying encoder failed with the associated error.
-        case encoderFailed(error: Error)
-    }
-
-    /// The underlying reason the `.responseValidationFailed` error occurred.
-    public enum ResponseValidationFailureReason {
-        /// The data file containing the server response did not exist.
-        case dataFileNil
-        /// The data file containing the server response at the associated `URL` could not be read.
-        case dataFileReadFailed(at: URL)
-        /// The response did not contain a `Content-Type` and the `acceptableContentTypes` provided did not contain a
-        /// wildcard type.
-        case missingContentType(acceptableContentTypes: [String])
-        /// The response `Content-Type` did not match any type in the provided `acceptableContentTypes`.
-        case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String)
-        /// The response status code was not acceptable.
-        case unacceptableStatusCode(code: Int)
-        /// Custom response validation failed due to the associated `Error`.
-        case customValidationFailed(error: Error)
-    }
-
-    /// The underlying reason the response serialization error occurred.
-    public enum ResponseSerializationFailureReason {
-        /// The server response contained no data or the data was zero length.
-        case inputDataNilOrZeroLength
-        /// The file containing the server response did not exist.
-        case inputFileNil
-        /// The file containing the server response could not be read from the associated `URL`.
-        case inputFileReadFailed(at: URL)
-        /// String serialization failed using the provided `String.Encoding`.
-        case stringSerializationFailed(encoding: String.Encoding)
-        /// JSON serialization failed with an underlying system error.
-        case jsonSerializationFailed(error: Error)
-        /// A `DataDecoder` failed to decode the response due to the associated `Error`.
-        case decodingFailed(error: Error)
-        /// A custom response serializer failed due to the associated `Error`.
-        case customSerializationFailed(error: Error)
-        /// Generic serialization failed for an empty response that wasn't type `Empty` but instead the associated type.
-        case invalidEmptyResponse(type: String)
-    }
-
-    #if !(os(Linux) || os(Windows))
-    /// Underlying reason a server trust evaluation error occurred.
-    public enum ServerTrustFailureReason {
-        /// The output of a server trust evaluation.
-        public struct Output {
-            /// The host for which the evaluation was performed.
-            public let host: String
-            /// The `SecTrust` value which was evaluated.
-            public let trust: SecTrust
-            /// The `OSStatus` of evaluation operation.
-            public let status: OSStatus
-            /// The result of the evaluation operation.
-            public let result: SecTrustResultType
-
-            /// Creates an `Output` value from the provided values.
-            init(_ host: String, _ trust: SecTrust, _ status: OSStatus, _ result: SecTrustResultType) {
-                self.host = host
-                self.trust = trust
-                self.status = status
-                self.result = result
-            }
-        }
-
-        /// No `ServerTrustEvaluator` was found for the associated host.
-        case noRequiredEvaluator(host: String)
-        /// No certificates were found with which to perform the trust evaluation.
-        case noCertificatesFound
-        /// No public keys were found with which to perform the trust evaluation.
-        case noPublicKeysFound
-        /// During evaluation, application of the associated `SecPolicy` failed.
-        case policyApplicationFailed(trust: SecTrust, policy: SecPolicy, status: OSStatus)
-        /// During evaluation, setting the associated anchor certificates failed.
-        case settingAnchorCertificatesFailed(status: OSStatus, certificates: [SecCertificate])
-        /// During evaluation, creation of the revocation policy failed.
-        case revocationPolicyCreationFailed
-        /// `SecTrust` evaluation failed with the associated `Error`, if one was produced.
-        case trustEvaluationFailed(error: Error?)
-        /// Default evaluation failed with the associated `Output`.
-        case defaultEvaluationFailed(output: Output)
-        /// Host validation failed with the associated `Output`.
-        case hostValidationFailed(output: Output)
-        /// Revocation check failed with the associated `Output` and options.
-        case revocationCheckFailed(output: Output, options: RevocationTrustEvaluator.Options)
-        /// Certificate pinning failed.
-        case certificatePinningFailed(host: String, trust: SecTrust, pinnedCertificates: [SecCertificate], serverCertificates: [SecCertificate])
-        /// Public key pinning failed.
-        case publicKeyPinningFailed(host: String, trust: SecTrust, pinnedKeys: [SecKey], serverKeys: [SecKey])
-        /// Custom server trust evaluation failed due to the associated `Error`.
-        case customEvaluationFailed(error: Error)
-    }
-    #endif
-
-    /// The underlying reason the `.urlRequestValidationFailed`
-    public enum URLRequestValidationFailureReason {
-        /// URLRequest with GET method had body data.
-        case bodyDataInGETRequest(Data)
-    }
-
-    ///  `UploadableConvertible` threw an error in `createUploadable()`.
-    case createUploadableFailed(error: Error)
-    ///  `URLRequestConvertible` threw an error in `asURLRequest()`.
-    case createURLRequestFailed(error: Error)
-    /// `SessionDelegate` threw an error while attempting to move downloaded file to destination URL.
-    case downloadedFileMoveFailed(error: Error, source: URL, destination: URL)
-    /// `Request` was explicitly cancelled.
-    case explicitlyCancelled
-    /// `URLConvertible` type failed to create a valid `URL`.
-    case invalidURL(url: URLConvertible)
-    /// Multipart form encoding failed.
-    case multipartEncodingFailed(reason: MultipartEncodingFailureReason)
-    /// `ParameterEncoding` threw an error during the encoding process.
-    case parameterEncodingFailed(reason: ParameterEncodingFailureReason)
-    /// `ParameterEncoder` threw an error while running the encoder.
-    case parameterEncoderFailed(reason: ParameterEncoderFailureReason)
-    /// `RequestAdapter` threw an error during adaptation.
-    case requestAdaptationFailed(error: Error)
-    /// `RequestRetrier` threw an error during the request retry process.
-    case requestRetryFailed(retryError: Error, originalError: Error)
-    /// Response validation failed.
-    case responseValidationFailed(reason: ResponseValidationFailureReason)
-    /// Response serialization failed.
-    case responseSerializationFailed(reason: ResponseSerializationFailureReason)
-    #if !(os(Linux) || os(Windows))
-    /// `ServerTrustEvaluating` instance threw an error during trust evaluation.
-    case serverTrustEvaluationFailed(reason: ServerTrustFailureReason)
-    #endif
-    /// `Session` which issued the `Request` was deinitialized, most likely because its reference went out of scope.
-    case sessionDeinitialized
-    /// `Session` was explicitly invalidated, possibly with the `Error` produced by the underlying `URLSession`.
-    case sessionInvalidated(error: Error?)
-    /// `URLSessionTask` completed with error.
-    case sessionTaskFailed(error: Error)
-    /// `URLRequest` failed validation.
-    case urlRequestValidationFailed(reason: URLRequestValidationFailureReason)
-}
-
-extension Error {
-    /// Returns the instance cast as an `AFError`.
-    public var asAFError: AFError? {
-        self as? AFError
-    }
-
-    /// Returns the instance cast as an `AFError`. If casting fails, a `fatalError` with the specified `message` is thrown.
-    public func asAFError(orFailWith message: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> AFError {
-        guard let afError = self as? AFError else {
-            fatalError(message(), file: file, line: line)
-        }
-        return afError
-    }
-
-    /// Casts the instance as `AFError` or returns `defaultAFError`
-    func asAFError(or defaultAFError: @autoclosure () -> AFError) -> AFError {
-        self as? AFError ?? defaultAFError()
-    }
-}
-
-// MARK: - Error Booleans
-
-extension AFError {
-    /// Returns whether the instance is `.sessionDeinitialized`.
-    public var isSessionDeinitializedError: Bool {
-        if case .sessionDeinitialized = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `.sessionInvalidated`.
-    public var isSessionInvalidatedError: Bool {
-        if case .sessionInvalidated = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `.explicitlyCancelled`.
-    public var isExplicitlyCancelledError: Bool {
-        if case .explicitlyCancelled = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `.invalidURL`.
-    public var isInvalidURLError: Bool {
-        if case .invalidURL = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `.parameterEncodingFailed`. When `true`, the `underlyingError` property will
-    /// contain the associated value.
-    public var isParameterEncodingError: Bool {
-        if case .parameterEncodingFailed = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `.parameterEncoderFailed`. When `true`, the `underlyingError` property will
-    /// contain the associated value.
-    public var isParameterEncoderError: Bool {
-        if case .parameterEncoderFailed = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `.multipartEncodingFailed`. When `true`, the `url` and `underlyingError`
-    /// properties will contain the associated values.
-    public var isMultipartEncodingError: Bool {
-        if case .multipartEncodingFailed = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `.requestAdaptationFailed`. When `true`, the `underlyingError` property will
-    /// contain the associated value.
-    public var isRequestAdaptationError: Bool {
-        if case .requestAdaptationFailed = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `.responseValidationFailed`. When `true`, the `acceptableContentTypes`,
-    /// `responseContentType`,  `responseCode`, and `underlyingError` properties will contain the associated values.
-    public var isResponseValidationError: Bool {
-        if case .responseValidationFailed = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `.responseSerializationFailed`. When `true`, the `failedStringEncoding` and
-    /// `underlyingError` properties will contain the associated values.
-    public var isResponseSerializationError: Bool {
-        if case .responseSerializationFailed = self { return true }
-        return false
-    }
-
-    #if !(os(Linux) || os(Windows))
-    /// Returns whether the instance is `.serverTrustEvaluationFailed`. When `true`, the `underlyingError` property will
-    /// contain the associated value.
-    public var isServerTrustEvaluationError: Bool {
-        if case .serverTrustEvaluationFailed = self { return true }
-        return false
-    }
-    #endif
-
-    /// Returns whether the instance is `requestRetryFailed`. When `true`, the `underlyingError` property will
-    /// contain the associated value.
-    public var isRequestRetryError: Bool {
-        if case .requestRetryFailed = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `createUploadableFailed`. When `true`, the `underlyingError` property will
-    /// contain the associated value.
-    public var isCreateUploadableError: Bool {
-        if case .createUploadableFailed = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `createURLRequestFailed`. When `true`, the `underlyingError` property will
-    /// contain the associated value.
-    public var isCreateURLRequestError: Bool {
-        if case .createURLRequestFailed = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `downloadedFileMoveFailed`. When `true`, the `destination` and `underlyingError` properties will
-    /// contain the associated values.
-    public var isDownloadedFileMoveError: Bool {
-        if case .downloadedFileMoveFailed = self { return true }
-        return false
-    }
-
-    /// Returns whether the instance is `createURLRequestFailed`. When `true`, the `underlyingError` property will
-    /// contain the associated value.
-    public var isSessionTaskError: Bool {
-        if case .sessionTaskFailed = self { return true }
-        return false
-    }
-}
-
-// MARK: - Convenience Properties
-
-extension AFError {
-    /// The `URLConvertible` associated with the error.
-    public var urlConvertible: URLConvertible? {
-        guard case let .invalidURL(url) = self else { return nil }
-        return url
-    }
-
-    /// The `URL` associated with the error.
-    public var url: URL? {
-        guard case let .multipartEncodingFailed(reason) = self else { return nil }
-        return reason.url
-    }
-
-    /// The underlying `Error` responsible for generating the failure associated with `.sessionInvalidated`,
-    /// `.parameterEncodingFailed`, `.parameterEncoderFailed`, `.multipartEncodingFailed`, `.requestAdaptationFailed`,
-    /// `.responseSerializationFailed`, `.requestRetryFailed` errors.
-    public var underlyingError: Error? {
-        switch self {
-        case let .multipartEncodingFailed(reason):
-            return reason.underlyingError
-        case let .parameterEncodingFailed(reason):
-            return reason.underlyingError
-        case let .parameterEncoderFailed(reason):
-            return reason.underlyingError
-        case let .requestAdaptationFailed(error):
-            return error
-        case let .requestRetryFailed(retryError, _):
-            return retryError
-        case let .responseValidationFailed(reason):
-            return reason.underlyingError
-        case let .responseSerializationFailed(reason):
-            return reason.underlyingError
-        #if !(os(Linux) || os(Windows))
-        case let .serverTrustEvaluationFailed(reason):
-            return reason.underlyingError
-        #endif
-        case let .sessionInvalidated(error):
-            return error
-        case let .createUploadableFailed(error):
-            return error
-        case let .createURLRequestFailed(error):
-            return error
-        case let .downloadedFileMoveFailed(error, _, _):
-            return error
-        case let .sessionTaskFailed(error):
-            return error
-        case .explicitlyCancelled,
-             .invalidURL,
-             .sessionDeinitialized,
-             .urlRequestValidationFailed:
-            return nil
-        }
-    }
-
-    /// The acceptable `Content-Type`s of a `.responseValidationFailed` error.
-    public var acceptableContentTypes: [String]? {
-        guard case let .responseValidationFailed(reason) = self else { return nil }
-        return reason.acceptableContentTypes
-    }
-
-    /// The response `Content-Type` of a `.responseValidationFailed` error.
-    public var responseContentType: String? {
-        guard case let .responseValidationFailed(reason) = self else { return nil }
-        return reason.responseContentType
-    }
-
-    /// The response code of a `.responseValidationFailed` error.
-    public var responseCode: Int? {
-        guard case let .responseValidationFailed(reason) = self else { return nil }
-        return reason.responseCode
-    }
-
-    /// The `String.Encoding` associated with a failed `.stringResponse()` call.
-    public var failedStringEncoding: String.Encoding? {
-        guard case let .responseSerializationFailed(reason) = self else { return nil }
-        return reason.failedStringEncoding
-    }
-
-    /// The `source` URL of a `.downloadedFileMoveFailed` error.
-    public var sourceURL: URL? {
-        guard case let .downloadedFileMoveFailed(_, source, _) = self else { return nil }
-        return source
-    }
-
-    /// The `destination` URL of a `.downloadedFileMoveFailed` error.
-    public var destinationURL: URL? {
-        guard case let .downloadedFileMoveFailed(_, _, destination) = self else { return nil }
-        return destination
-    }
-
-    #if !(os(Linux) || os(Windows))
-    /// The download resume data of any underlying network error. Only produced by `DownloadRequest`s.
-    public var downloadResumeData: Data? {
-        (underlyingError as? URLError)?.userInfo[NSURLSessionDownloadTaskResumeData] as? Data
-    }
-    #endif
-}
-
-extension AFError.ParameterEncodingFailureReason {
-    var underlyingError: Error? {
-        switch self {
-        case let .jsonEncodingFailed(error),
-             let .customEncodingFailed(error):
-            return error
-        case .missingURL:
-            return nil
-        }
-    }
-}
-
-extension AFError.ParameterEncoderFailureReason {
-    var underlyingError: Error? {
-        switch self {
-        case let .encoderFailed(error):
-            return error
-        case .missingRequiredComponent:
-            return nil
-        }
-    }
-}
-
-extension AFError.MultipartEncodingFailureReason {
-    var url: URL? {
-        switch self {
-        case let .bodyPartURLInvalid(url),
-             let .bodyPartFilenameInvalid(url),
-             let .bodyPartFileNotReachable(url),
-             let .bodyPartFileIsDirectory(url),
-             let .bodyPartFileSizeNotAvailable(url),
-             let .bodyPartInputStreamCreationFailed(url),
-             let .outputStreamCreationFailed(url),
-             let .outputStreamFileAlreadyExists(url),
-             let .outputStreamURLInvalid(url),
-             let .bodyPartFileNotReachableWithError(url, _),
-             let .bodyPartFileSizeQueryFailedWithError(url, _):
-            return url
-        case .outputStreamWriteFailed,
-             .inputStreamReadFailed:
-            return nil
-        }
-    }
-
-    var underlyingError: Error? {
-        switch self {
-        case let .bodyPartFileNotReachableWithError(_, error),
-             let .bodyPartFileSizeQueryFailedWithError(_, error),
-             let .outputStreamWriteFailed(error),
-             let .inputStreamReadFailed(error):
-            return error
-        case .bodyPartURLInvalid,
-             .bodyPartFilenameInvalid,
-             .bodyPartFileNotReachable,
-             .bodyPartFileIsDirectory,
-             .bodyPartFileSizeNotAvailable,
-             .bodyPartInputStreamCreationFailed,
-             .outputStreamCreationFailed,
-             .outputStreamFileAlreadyExists,
-             .outputStreamURLInvalid:
-            return nil
-        }
-    }
-}
-
-extension AFError.ResponseValidationFailureReason {
-    var acceptableContentTypes: [String]? {
-        switch self {
-        case let .missingContentType(types),
-             let .unacceptableContentType(types, _):
-            return types
-        case .dataFileNil,
-             .dataFileReadFailed,
-             .unacceptableStatusCode,
-             .customValidationFailed:
-            return nil
-        }
-    }
-
-    var responseContentType: String? {
-        switch self {
-        case let .unacceptableContentType(_, responseType):
-            return responseType
-        case .dataFileNil,
-             .dataFileReadFailed,
-             .missingContentType,
-             .unacceptableStatusCode,
-             .customValidationFailed:
-            return nil
-        }
-    }
-
-    var responseCode: Int? {
-        switch self {
-        case let .unacceptableStatusCode(code):
-            return code
-        case .dataFileNil,
-             .dataFileReadFailed,
-             .missingContentType,
-             .unacceptableContentType,
-             .customValidationFailed:
-            return nil
-        }
-    }
-
-    var underlyingError: Error? {
-        switch self {
-        case let .customValidationFailed(error):
-            return error
-        case .dataFileNil,
-             .dataFileReadFailed,
-             .missingContentType,
-             .unacceptableContentType,
-             .unacceptableStatusCode:
-            return nil
-        }
-    }
-}
-
-extension AFError.ResponseSerializationFailureReason {
-    var failedStringEncoding: String.Encoding? {
-        switch self {
-        case let .stringSerializationFailed(encoding):
-            return encoding
-        case .inputDataNilOrZeroLength,
-             .inputFileNil,
-             .inputFileReadFailed(_),
-             .jsonSerializationFailed(_),
-             .decodingFailed(_),
-             .customSerializationFailed(_),
-             .invalidEmptyResponse:
-            return nil
-        }
-    }
-
-    var underlyingError: Error? {
-        switch self {
-        case let .jsonSerializationFailed(error),
-             let .decodingFailed(error),
-             let .customSerializationFailed(error):
-            return error
-        case .inputDataNilOrZeroLength,
-             .inputFileNil,
-             .inputFileReadFailed,
-             .stringSerializationFailed,
-             .invalidEmptyResponse:
-            return nil
-        }
-    }
-}
-
-#if !(os(Linux) || os(Windows))
-extension AFError.ServerTrustFailureReason {
-    var output: AFError.ServerTrustFailureReason.Output? {
-        switch self {
-        case let .defaultEvaluationFailed(output),
-             let .hostValidationFailed(output),
-             let .revocationCheckFailed(output, _):
-            return output
-        case .noRequiredEvaluator,
-             .noCertificatesFound,
-             .noPublicKeysFound,
-             .policyApplicationFailed,
-             .settingAnchorCertificatesFailed,
-             .revocationPolicyCreationFailed,
-             .trustEvaluationFailed,
-             .certificatePinningFailed,
-             .publicKeyPinningFailed,
-             .customEvaluationFailed:
-            return nil
-        }
-    }
-
-    var underlyingError: Error? {
-        switch self {
-        case let .customEvaluationFailed(error):
-            return error
-        case let .trustEvaluationFailed(error):
-            return error
-        case .noRequiredEvaluator,
-             .noCertificatesFound,
-             .noPublicKeysFound,
-             .policyApplicationFailed,
-             .settingAnchorCertificatesFailed,
-             .revocationPolicyCreationFailed,
-             .defaultEvaluationFailed,
-             .hostValidationFailed,
-             .revocationCheckFailed,
-             .certificatePinningFailed,
-             .publicKeyPinningFailed:
-            return nil
-        }
-    }
-}
-#endif
-
-// MARK: - Error Descriptions
-
-extension AFError: LocalizedError {
-    public var errorDescription: String? {
-        switch self {
-        case .explicitlyCancelled:
-            return "Request explicitly cancelled."
-        case let .invalidURL(url):
-            return "URL is not valid: \(url)"
-        case let .parameterEncodingFailed(reason):
-            return reason.localizedDescription
-        case let .parameterEncoderFailed(reason):
-            return reason.localizedDescription
-        case let .multipartEncodingFailed(reason):
-            return reason.localizedDescription
-        case let .requestAdaptationFailed(error):
-            return "Request adaption failed with error: \(error.localizedDescription)"
-        case let .responseValidationFailed(reason):
-            return reason.localizedDescription
-        case let .responseSerializationFailed(reason):
-            return reason.localizedDescription
-        case let .requestRetryFailed(retryError, originalError):
-            return """
-            Request retry failed with retry error: \(retryError.localizedDescription), \
-            original error: \(originalError.localizedDescription)
-            """
-        case .sessionDeinitialized:
-            return """
-            Session was invalidated without error, so it was likely deinitialized unexpectedly. \
-            Be sure to retain a reference to your Session for the duration of your requests.
-            """
-        case let .sessionInvalidated(error):
-            return "Session was invalidated with error: \(error?.localizedDescription ?? "No description.")"
-        #if !(os(Linux) || os(Windows))
-        case let .serverTrustEvaluationFailed(reason):
-            return "Server trust evaluation failed due to reason: \(reason.localizedDescription)"
-        #endif
-        case let .urlRequestValidationFailed(reason):
-            return "URLRequest validation failed due to reason: \(reason.localizedDescription)"
-        case let .createUploadableFailed(error):
-            return "Uploadable creation failed with error: \(error.localizedDescription)"
-        case let .createURLRequestFailed(error):
-            return "URLRequest creation failed with error: \(error.localizedDescription)"
-        case let .downloadedFileMoveFailed(error, source, destination):
-            return "Moving downloaded file from: \(source) to: \(destination) failed with error: \(error.localizedDescription)"
-        case let .sessionTaskFailed(error):
-            return "URLSessionTask failed with error: \(error.localizedDescription)"
-        }
-    }
-}
-
-extension AFError.ParameterEncodingFailureReason {
-    var localizedDescription: String {
-        switch self {
-        case .missingURL:
-            return "URL request to encode was missing a URL"
-        case let .jsonEncodingFailed(error):
-            return "JSON could not be encoded because of error:\n\(error.localizedDescription)"
-        case let .customEncodingFailed(error):
-            return "Custom parameter encoder failed with error: \(error.localizedDescription)"
-        }
-    }
-}
-
-extension AFError.ParameterEncoderFailureReason {
-    var localizedDescription: String {
-        switch self {
-        case let .missingRequiredComponent(component):
-            return "Encoding failed due to a missing request component: \(component)"
-        case let .encoderFailed(error):
-            return "The underlying encoder failed with the error: \(error)"
-        }
-    }
-}
-
-extension AFError.MultipartEncodingFailureReason {
-    var localizedDescription: String {
-        switch self {
-        case let .bodyPartURLInvalid(url):
-            return "The URL provided is not a file URL: \(url)"
-        case let .bodyPartFilenameInvalid(url):
-            return "The URL provided does not have a valid filename: \(url)"
-        case let .bodyPartFileNotReachable(url):
-            return "The URL provided is not reachable: \(url)"
-        case let .bodyPartFileNotReachableWithError(url, error):
-            return """
-            The system returned an error while checking the provided URL for reachability.
-            URL: \(url)
-            Error: \(error)
-            """
-        case let .bodyPartFileIsDirectory(url):
-            return "The URL provided is a directory: \(url)"
-        case let .bodyPartFileSizeNotAvailable(url):
-            return "Could not fetch the file size from the provided URL: \(url)"
-        case let .bodyPartFileSizeQueryFailedWithError(url, error):
-            return """
-            The system returned an error while attempting to fetch the file size from the provided URL.
-            URL: \(url)
-            Error: \(error)
-            """
-        case let .bodyPartInputStreamCreationFailed(url):
-            return "Failed to create an InputStream for the provided URL: \(url)"
-        case let .outputStreamCreationFailed(url):
-            return "Failed to create an OutputStream for URL: \(url)"
-        case let .outputStreamFileAlreadyExists(url):
-            return "A file already exists at the provided URL: \(url)"
-        case let .outputStreamURLInvalid(url):
-            return "The provided OutputStream URL is invalid: \(url)"
-        case let .outputStreamWriteFailed(error):
-            return "OutputStream write failed with error: \(error)"
-        case let .inputStreamReadFailed(error):
-            return "InputStream read failed with error: \(error)"
-        }
-    }
-}
-
-extension AFError.ResponseSerializationFailureReason {
-    var localizedDescription: String {
-        switch self {
-        case .inputDataNilOrZeroLength:
-            return "Response could not be serialized, input data was nil or zero length."
-        case .inputFileNil:
-            return "Response could not be serialized, input file was nil."
-        case let .inputFileReadFailed(url):
-            return "Response could not be serialized, input file could not be read: \(url)."
-        case let .stringSerializationFailed(encoding):
-            return "String could not be serialized with encoding: \(encoding)."
-        case let .jsonSerializationFailed(error):
-            return "JSON could not be serialized because of error:\n\(error.localizedDescription)"
-        case let .invalidEmptyResponse(type):
-            return """
-            Empty response could not be serialized to type: \(type). \
-            Use Empty as the expected type for such responses.
-            """
-        case let .decodingFailed(error):
-            return "Response could not be decoded because of error:\n\(error.localizedDescription)"
-        case let .customSerializationFailed(error):
-            return "Custom response serializer failed with error:\n\(error.localizedDescription)"
-        }
-    }
-}
-
-extension AFError.ResponseValidationFailureReason {
-    var localizedDescription: String {
-        switch self {
-        case .dataFileNil:
-            return "Response could not be validated, data file was nil."
-        case let .dataFileReadFailed(url):
-            return "Response could not be validated, data file could not be read: \(url)."
-        case let .missingContentType(types):
-            return """
-            Response Content-Type was missing and acceptable content types \
-            (\(types.joined(separator: ","))) do not match "*/*".
-            """
-        case let .unacceptableContentType(acceptableTypes, responseType):
-            return """
-            Response Content-Type "\(responseType)" does not match any acceptable types: \
-            \(acceptableTypes.joined(separator: ",")).
-            """
-        case let .unacceptableStatusCode(code):
-            return "Response status code was unacceptable: \(code)."
-        case let .customValidationFailed(error):
-            return "Custom response validation failed with error: \(error.localizedDescription)"
-        }
-    }
-}
-
-#if !(os(Linux) || os(Windows))
-extension AFError.ServerTrustFailureReason {
-    var localizedDescription: String {
-        switch self {
-        case let .noRequiredEvaluator(host):
-            return "A ServerTrustEvaluating value is required for host \(host) but none was found."
-        case .noCertificatesFound:
-            return "No certificates were found or provided for evaluation."
-        case .noPublicKeysFound:
-            return "No public keys were found or provided for evaluation."
-        case .policyApplicationFailed:
-            return "Attempting to set a SecPolicy failed."
-        case .settingAnchorCertificatesFailed:
-            return "Attempting to set the provided certificates as anchor certificates failed."
-        case .revocationPolicyCreationFailed:
-            return "Attempting to create a revocation policy failed."
-        case let .trustEvaluationFailed(error):
-            return "SecTrust evaluation failed with error: \(error?.localizedDescription ?? "None")"
-        case let .defaultEvaluationFailed(output):
-            return "Default evaluation failed for host \(output.host)."
-        case let .hostValidationFailed(output):
-            return "Host validation failed for host \(output.host)."
-        case let .revocationCheckFailed(output, _):
-            return "Revocation check failed for host \(output.host)."
-        case let .certificatePinningFailed(host, _, _, _):
-            return "Certificate pinning failed for host \(host)."
-        case let .publicKeyPinningFailed(host, _, _, _):
-            return "Public key pinning failed for host \(host)."
-        case let .customEvaluationFailed(error):
-            return "Custom trust evaluation failed with error: \(error.localizedDescription)"
-        }
-    }
-}
-#endif
-
-extension AFError.URLRequestValidationFailureReason {
-    var localizedDescription: String {
-        switch self {
-        case let .bodyDataInGETRequest(data):
-            return """
-            Invalid URLRequest: Requests with GET method cannot have body data:
-            \(String(decoding: data, as: UTF8.self))
-            """
-        }
-    }
-}

+ 0 - 40
Pods/Alamofire/Source/Alamofire.swift

@@ -1,40 +0,0 @@
-//
-//  Alamofire.swift
-//
-//  Copyright (c) 2014-2021 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 Dispatch
-import Foundation
-#if canImport(FoundationNetworking)
-@_exported import FoundationNetworking
-#endif
-
-// Enforce minimum Swift version for all platforms and build systems.
-#if swift(<5.3)
-#error("Alamofire doesn't support Swift versions below 5.3.")
-#endif
-
-/// Reference to `Session.default` for quick bootstrapping and examples.
-public let AF = Session.default
-
-/// Current Alamofire version. Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate.
-let version = "5.6.4"

+ 0 - 61
Pods/Alamofire/Source/AlamofireExtended.swift

@@ -1,61 +0,0 @@
-//
-//  AlamofireExtended.swift
-//
-//  Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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.
-//
-
-/// Type that acts as a generic extension point for all `AlamofireExtended` types.
-public struct AlamofireExtension<ExtendedType> {
-    /// Stores the type or meta-type of any extended type.
-    public private(set) var type: ExtendedType
-
-    /// Create an instance from the provided value.
-    ///
-    /// - Parameter type: Instance being extended.
-    public init(_ type: ExtendedType) {
-        self.type = type
-    }
-}
-
-/// Protocol describing the `af` extension points for Alamofire extended types.
-public protocol AlamofireExtended {
-    /// Type being extended.
-    associatedtype ExtendedType
-
-    /// Static Alamofire extension point.
-    static var af: AlamofireExtension<ExtendedType>.Type { get set }
-    /// Instance Alamofire extension point.
-    var af: AlamofireExtension<ExtendedType> { get set }
-}
-
-extension AlamofireExtended {
-    /// Static Alamofire extension point.
-    public static var af: AlamofireExtension<Self>.Type {
-        get { AlamofireExtension<Self>.self }
-        set {}
-    }
-
-    /// Instance Alamofire extension point.
-    public var af: AlamofireExtension<Self> {
-        get { AlamofireExtension(self) }
-        set {}
-    }
-}

+ 0 - 403
Pods/Alamofire/Source/AuthenticationInterceptor.swift

@@ -1,403 +0,0 @@
-//
-//  AuthenticationInterceptor.swift
-//
-//  Copyright (c) 2020 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// Types adopting the `AuthenticationCredential` protocol can be used to authenticate `URLRequest`s.
-///
-/// One common example of an `AuthenticationCredential` is an OAuth2 credential containing an access token used to
-/// authenticate all requests on behalf of a user. The access token generally has an expiration window of 60 minutes
-/// which will then require a refresh of the credential using the refresh token to generate a new access token.
-public protocol AuthenticationCredential {
-    /// Whether the credential requires a refresh. This property should always return `true` when the credential is
-    /// expired. It is also wise to consider returning `true` when the credential will expire in several seconds or
-    /// minutes depending on the expiration window of the credential.
-    ///
-    /// For example, if the credential is valid for 60 minutes, then it would be wise to return `true` when the
-    /// credential is only valid for 5 minutes or less. That ensures the credential will not expire as it is passed
-    /// around backend services.
-    var requiresRefresh: Bool { get }
-}
-
-// MARK: -
-
-/// Types adopting the `Authenticator` protocol can be used to authenticate `URLRequest`s with an
-/// `AuthenticationCredential` as well as refresh the `AuthenticationCredential` when required.
-public protocol Authenticator: AnyObject {
-    /// The type of credential associated with the `Authenticator` instance.
-    associatedtype Credential: AuthenticationCredential
-
-    /// Applies the `Credential` to the `URLRequest`.
-    ///
-    /// In the case of OAuth2, the access token of the `Credential` would be added to the `URLRequest` as a Bearer
-    /// token to the `Authorization` header.
-    ///
-    /// - Parameters:
-    ///   - credential: The `Credential`.
-    ///   - urlRequest: The `URLRequest`.
-    func apply(_ credential: Credential, to urlRequest: inout URLRequest)
-
-    /// Refreshes the `Credential` and executes the `completion` closure with the `Result` once complete.
-    ///
-    /// Refresh can be called in one of two ways. It can be called before the `Request` is actually executed due to
-    /// a `requiresRefresh` returning `true` during the adapt portion of the `Request` creation process. It can also
-    /// be triggered by a failed `Request` where the authentication server denied access due to an expired or
-    /// invalidated access token.
-    ///
-    /// In the case of OAuth2, this method would use the refresh token of the `Credential` to generate a new
-    /// `Credential` using the authentication service. Once complete, the `completion` closure should be called with
-    /// the new `Credential`, or the error that occurred.
-    ///
-    /// In general, if the refresh call fails with certain status codes from the authentication server (commonly a 401),
-    /// the refresh token in the `Credential` can no longer be used to generate a valid `Credential`. In these cases,
-    /// you will need to reauthenticate the user with their username / password.
-    ///
-    /// Please note, these are just general examples of common use cases. They are not meant to solve your specific
-    /// authentication server challenges. Please work with your authentication server team to ensure your
-    /// `Authenticator` logic matches their expectations.
-    ///
-    /// - Parameters:
-    ///   - credential: The `Credential` to refresh.
-    ///   - session:    The `Session` requiring the refresh.
-    ///   - completion: The closure to be executed once the refresh is complete.
-    func refresh(_ credential: Credential, for session: Session, completion: @escaping (Result<Credential, Error>) -> Void)
-
-    /// Determines whether the `URLRequest` failed due to an authentication error based on the `HTTPURLResponse`.
-    ///
-    /// If the authentication server **CANNOT** invalidate credentials after they are issued, then simply return `false`
-    /// for this method. If the authentication server **CAN** invalidate credentials due to security breaches, then you
-    /// will need to work with your authentication server team to understand how to identify when this occurs.
-    ///
-    /// In the case of OAuth2, where an authentication server can invalidate credentials, you will need to inspect the
-    /// `HTTPURLResponse` or possibly the `Error` for when this occurs. This is commonly handled by the authentication
-    /// server returning a 401 status code and some additional header to indicate an OAuth2 failure occurred.
-    ///
-    /// It is very important to understand how your authentication server works to be able to implement this correctly.
-    /// For example, if your authentication server returns a 401 when an OAuth2 error occurs, and your downstream
-    /// service also returns a 401 when you are not authorized to perform that operation, how do you know which layer
-    /// of the backend returned you a 401? You do not want to trigger a refresh unless you know your authentication
-    /// server is actually the layer rejecting the request. Again, work with your authentication server team to understand
-    /// how to identify an OAuth2 401 error vs. a downstream 401 error to avoid endless refresh loops.
-    ///
-    /// - Parameters:
-    ///   - urlRequest: The `URLRequest`.
-    ///   - response:   The `HTTPURLResponse`.
-    ///   - error:      The `Error`.
-    ///
-    /// - Returns: `true` if the `URLRequest` failed due to an authentication error, `false` otherwise.
-    func didRequest(_ urlRequest: URLRequest, with response: HTTPURLResponse, failDueToAuthenticationError error: Error) -> Bool
-
-    /// Determines whether the `URLRequest` is authenticated with the `Credential`.
-    ///
-    /// If the authentication server **CANNOT** invalidate credentials after they are issued, then simply return `true`
-    /// for this method. If the authentication server **CAN** invalidate credentials due to security breaches, then
-    /// read on.
-    ///
-    /// When an authentication server can invalidate credentials, it means that you may have a non-expired credential
-    /// that appears to be valid, but will be rejected by the authentication server when used. Generally when this
-    /// happens, a number of requests are all sent when the application is foregrounded, and all of them will be
-    /// rejected by the authentication server in the order they are received. The first failed request will trigger a
-    /// refresh internally, which will update the credential, and then retry all the queued requests with the new
-    /// credential. However, it is possible that some of the original requests will not return from the authentication
-    /// server until the refresh has completed. This is where this method comes in.
-    ///
-    /// When the authentication server rejects a credential, we need to check to make sure we haven't refreshed the
-    /// credential while the request was in flight. If it has already refreshed, then we don't need to trigger an
-    /// additional refresh. If it hasn't refreshed, then we need to refresh.
-    ///
-    /// Now that it is understood how the result of this method is used in the refresh lifecyle, let's walk through how
-    /// to implement it. You should return `true` in this method if the `URLRequest` is authenticated in a way that
-    /// matches the values in the `Credential`. In the case of OAuth2, this would mean that the Bearer token in the
-    /// `Authorization` header of the `URLRequest` matches the access token in the `Credential`. If it matches, then we
-    /// know the `Credential` was used to authenticate the `URLRequest` and should return `true`. If the Bearer token
-    /// did not match the access token, then you should return `false`.
-    ///
-    /// - Parameters:
-    ///   - urlRequest: The `URLRequest`.
-    ///   - credential: The `Credential`.
-    ///
-    /// - Returns: `true` if the `URLRequest` is authenticated with the `Credential`, `false` otherwise.
-    func isRequest(_ urlRequest: URLRequest, authenticatedWith credential: Credential) -> Bool
-}
-
-// MARK: -
-
-/// Represents various authentication failures that occur when using the `AuthenticationInterceptor`. All errors are
-/// still vended from Alamofire as `AFError` types. The `AuthenticationError` instances will be embedded within
-/// `AFError` `.requestAdaptationFailed` or `.requestRetryFailed` cases.
-public enum AuthenticationError: Error {
-    /// The credential was missing so the request could not be authenticated.
-    case missingCredential
-    /// The credential was refreshed too many times within the `RefreshWindow`.
-    case excessiveRefresh
-}
-
-// MARK: -
-
-/// The `AuthenticationInterceptor` class manages the queuing and threading complexity of authenticating requests.
-/// It relies on an `Authenticator` type to handle the actual `URLRequest` authentication and `Credential` refresh.
-public class AuthenticationInterceptor<AuthenticatorType>: RequestInterceptor where AuthenticatorType: Authenticator {
-    // MARK: Typealiases
-
-    /// Type of credential used to authenticate requests.
-    public typealias Credential = AuthenticatorType.Credential
-
-    // MARK: Helper Types
-
-    /// Type that defines a time window used to identify excessive refresh calls. When enabled, prior to executing a
-    /// refresh, the `AuthenticationInterceptor` compares the timestamp history of previous refresh calls against the
-    /// `RefreshWindow`. If more refreshes have occurred within the refresh window than allowed, the refresh is
-    /// cancelled and an `AuthorizationError.excessiveRefresh` error is thrown.
-    public struct RefreshWindow {
-        /// `TimeInterval` defining the duration of the time window before the current time in which the number of
-        /// refresh attempts is compared against `maximumAttempts`. For example, if `interval` is 30 seconds, then the
-        /// `RefreshWindow` represents the past 30 seconds. If more attempts occurred in the past 30 seconds than
-        /// `maximumAttempts`, an `.excessiveRefresh` error will be thrown.
-        public let interval: TimeInterval
-
-        /// Total refresh attempts allowed within `interval` before throwing an `.excessiveRefresh` error.
-        public let maximumAttempts: Int
-
-        /// Creates a `RefreshWindow` instance from the specified `interval` and `maximumAttempts`.
-        ///
-        /// - Parameters:
-        ///   - interval:        `TimeInterval` defining the duration of the time window before the current time.
-        ///   - maximumAttempts: The maximum attempts allowed within the `TimeInterval`.
-        public init(interval: TimeInterval = 30.0, maximumAttempts: Int = 5) {
-            self.interval = interval
-            self.maximumAttempts = maximumAttempts
-        }
-    }
-
-    private struct AdaptOperation {
-        let urlRequest: URLRequest
-        let session: Session
-        let completion: (Result<URLRequest, Error>) -> Void
-    }
-
-    private enum AdaptResult {
-        case adapt(Credential)
-        case doNotAdapt(AuthenticationError)
-        case adaptDeferred
-    }
-
-    private struct MutableState {
-        var credential: Credential?
-
-        var isRefreshing = false
-        var refreshTimestamps: [TimeInterval] = []
-        var refreshWindow: RefreshWindow?
-
-        var adaptOperations: [AdaptOperation] = []
-        var requestsToRetry: [(RetryResult) -> Void] = []
-    }
-
-    // MARK: Properties
-
-    /// The `Credential` used to authenticate requests.
-    public var credential: Credential? {
-        get { $mutableState.credential }
-        set { $mutableState.credential = newValue }
-    }
-
-    let authenticator: AuthenticatorType
-    let queue = DispatchQueue(label: "org.alamofire.authentication.inspector")
-
-    @Protected
-    private var mutableState: MutableState
-
-    // MARK: Initialization
-
-    /// Creates an `AuthenticationInterceptor` instance from the specified parameters.
-    ///
-    /// A `nil` `RefreshWindow` will result in the `AuthenticationInterceptor` not checking for excessive refresh calls.
-    /// It is recommended to always use a `RefreshWindow` to avoid endless refresh cycles.
-    ///
-    /// - Parameters:
-    ///   - authenticator: The `Authenticator` type.
-    ///   - credential:    The `Credential` if it exists. `nil` by default.
-    ///   - refreshWindow: The `RefreshWindow` used to identify excessive refresh calls. `RefreshWindow()` by default.
-    public init(authenticator: AuthenticatorType,
-                credential: Credential? = nil,
-                refreshWindow: RefreshWindow? = RefreshWindow()) {
-        self.authenticator = authenticator
-        mutableState = MutableState(credential: credential, refreshWindow: refreshWindow)
-    }
-
-    // MARK: Adapt
-
-    public func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result<URLRequest, Error>) -> Void) {
-        let adaptResult: AdaptResult = $mutableState.write { mutableState in
-            // Queue the adapt operation if a refresh is already in place.
-            guard !mutableState.isRefreshing else {
-                let operation = AdaptOperation(urlRequest: urlRequest, session: session, completion: completion)
-                mutableState.adaptOperations.append(operation)
-                return .adaptDeferred
-            }
-
-            // Throw missing credential error is the credential is missing.
-            guard let credential = mutableState.credential else {
-                let error = AuthenticationError.missingCredential
-                return .doNotAdapt(error)
-            }
-
-            // Queue the adapt operation and trigger refresh operation if credential requires refresh.
-            guard !credential.requiresRefresh else {
-                let operation = AdaptOperation(urlRequest: urlRequest, session: session, completion: completion)
-                mutableState.adaptOperations.append(operation)
-                refresh(credential, for: session, insideLock: &mutableState)
-                return .adaptDeferred
-            }
-
-            return .adapt(credential)
-        }
-
-        switch adaptResult {
-        case let .adapt(credential):
-            var authenticatedRequest = urlRequest
-            authenticator.apply(credential, to: &authenticatedRequest)
-            completion(.success(authenticatedRequest))
-
-        case let .doNotAdapt(adaptError):
-            completion(.failure(adaptError))
-
-        case .adaptDeferred:
-            // No-op: adapt operation captured during refresh.
-            break
-        }
-    }
-
-    // MARK: Retry
-
-    public func retry(_ request: Request, for session: Session, dueTo error: Error, completion: @escaping (RetryResult) -> Void) {
-        // Do not attempt retry if there was not an original request and response from the server.
-        guard let urlRequest = request.request, let response = request.response else {
-            completion(.doNotRetry)
-            return
-        }
-
-        // Do not attempt retry unless the `Authenticator` verifies failure was due to authentication error (i.e. 401 status code).
-        guard authenticator.didRequest(urlRequest, with: response, failDueToAuthenticationError: error) else {
-            completion(.doNotRetry)
-            return
-        }
-
-        // Do not attempt retry if there is no credential.
-        guard let credential = credential else {
-            let error = AuthenticationError.missingCredential
-            completion(.doNotRetryWithError(error))
-            return
-        }
-
-        // Retry the request if the `Authenticator` verifies it was authenticated with a previous credential.
-        guard authenticator.isRequest(urlRequest, authenticatedWith: credential) else {
-            completion(.retry)
-            return
-        }
-
-        $mutableState.write { mutableState in
-            mutableState.requestsToRetry.append(completion)
-
-            guard !mutableState.isRefreshing else { return }
-
-            refresh(credential, for: session, insideLock: &mutableState)
-        }
-    }
-
-    // MARK: Refresh
-
-    private func refresh(_ credential: Credential, for session: Session, insideLock mutableState: inout MutableState) {
-        guard !isRefreshExcessive(insideLock: &mutableState) else {
-            let error = AuthenticationError.excessiveRefresh
-            handleRefreshFailure(error, insideLock: &mutableState)
-            return
-        }
-
-        mutableState.refreshTimestamps.append(ProcessInfo.processInfo.systemUptime)
-        mutableState.isRefreshing = true
-
-        // Dispatch to queue to hop out of the lock in case authenticator.refresh is implemented synchronously.
-        queue.async {
-            self.authenticator.refresh(credential, for: session) { result in
-                self.$mutableState.write { mutableState in
-                    switch result {
-                    case let .success(credential):
-                        self.handleRefreshSuccess(credential, insideLock: &mutableState)
-                    case let .failure(error):
-                        self.handleRefreshFailure(error, insideLock: &mutableState)
-                    }
-                }
-            }
-        }
-    }
-
-    private func isRefreshExcessive(insideLock mutableState: inout MutableState) -> Bool {
-        guard let refreshWindow = mutableState.refreshWindow else { return false }
-
-        let refreshWindowMin = ProcessInfo.processInfo.systemUptime - refreshWindow.interval
-
-        let refreshAttemptsWithinWindow = mutableState.refreshTimestamps.reduce(into: 0) { attempts, refreshTimestamp in
-            guard refreshWindowMin <= refreshTimestamp else { return }
-            attempts += 1
-        }
-
-        let isRefreshExcessive = refreshAttemptsWithinWindow >= refreshWindow.maximumAttempts
-
-        return isRefreshExcessive
-    }
-
-    private func handleRefreshSuccess(_ credential: Credential, insideLock mutableState: inout MutableState) {
-        mutableState.credential = credential
-
-        let adaptOperations = mutableState.adaptOperations
-        let requestsToRetry = mutableState.requestsToRetry
-
-        mutableState.adaptOperations.removeAll()
-        mutableState.requestsToRetry.removeAll()
-
-        mutableState.isRefreshing = false
-
-        // Dispatch to queue to hop out of the mutable state lock
-        queue.async {
-            adaptOperations.forEach { self.adapt($0.urlRequest, for: $0.session, completion: $0.completion) }
-            requestsToRetry.forEach { $0(.retry) }
-        }
-    }
-
-    private func handleRefreshFailure(_ error: Error, insideLock mutableState: inout MutableState) {
-        let adaptOperations = mutableState.adaptOperations
-        let requestsToRetry = mutableState.requestsToRetry
-
-        mutableState.adaptOperations.removeAll()
-        mutableState.requestsToRetry.removeAll()
-
-        mutableState.isRefreshing = false
-
-        // Dispatch to queue to hop out of the mutable state lock
-        queue.async {
-            adaptOperations.forEach { $0.completion(.failure(error)) }
-            requestsToRetry.forEach { $0(.doNotRetryWithError(error)) }
-        }
-    }
-}

+ 0 - 109
Pods/Alamofire/Source/CachedResponseHandler.swift

@@ -1,109 +0,0 @@
-//
-//  CachedResponseHandler.swift
-//
-//  Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 type that handles whether the data task should store the HTTP response in the cache.
-public protocol CachedResponseHandler {
-    /// Determines whether the HTTP response should be stored in the cache.
-    ///
-    /// The `completion` closure should be passed one of three possible options:
-    ///
-    ///   1. The cached response provided by the server (this is the most common use case).
-    ///   2. A modified version of the cached response (you may want to modify it in some way before caching).
-    ///   3. A `nil` value to prevent the cached response from being stored in the cache.
-    ///
-    /// - Parameters:
-    ///   - task:       The data task whose request resulted in the cached response.
-    ///   - response:   The cached response to potentially store in the cache.
-    ///   - completion: The closure to execute containing cached response, a modified response, or `nil`.
-    func dataTask(_ task: URLSessionDataTask,
-                  willCacheResponse response: CachedURLResponse,
-                  completion: @escaping (CachedURLResponse?) -> Void)
-}
-
-// MARK: -
-
-/// `ResponseCacher` is a convenience `CachedResponseHandler` making it easy to cache, not cache, or modify a cached
-/// response.
-public struct ResponseCacher {
-    /// Defines the behavior of the `ResponseCacher` type.
-    public enum Behavior {
-        /// Stores the cached response in the cache.
-        case cache
-        /// Prevents the cached response from being stored in the cache.
-        case doNotCache
-        /// Modifies the cached response before storing it in the cache.
-        case modify((URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)
-    }
-
-    /// Returns a `ResponseCacher` with a `.cache` `Behavior`.
-    public static let cache = ResponseCacher(behavior: .cache)
-    /// Returns a `ResponseCacher` with a `.doNotCache` `Behavior`.
-    public static let doNotCache = ResponseCacher(behavior: .doNotCache)
-
-    /// The `Behavior` of the `ResponseCacher`.
-    public let behavior: Behavior
-
-    /// Creates a `ResponseCacher` instance from the `Behavior`.
-    ///
-    /// - Parameter behavior: The `Behavior`.
-    public init(behavior: Behavior) {
-        self.behavior = behavior
-    }
-}
-
-extension ResponseCacher: CachedResponseHandler {
-    public func dataTask(_ task: URLSessionDataTask,
-                         willCacheResponse response: CachedURLResponse,
-                         completion: @escaping (CachedURLResponse?) -> Void) {
-        switch behavior {
-        case .cache:
-            completion(response)
-        case .doNotCache:
-            completion(nil)
-        case let .modify(closure):
-            let response = closure(task, response)
-            completion(response)
-        }
-    }
-}
-
-#if swift(>=5.5)
-extension CachedResponseHandler where Self == ResponseCacher {
-    /// Provides a `ResponseCacher` which caches the response, if allowed. Equivalent to `ResponseCacher.cache`.
-    public static var cache: ResponseCacher { .cache }
-
-    /// Provides a `ResponseCacher` which does not cache the response. Equivalent to `ResponseCacher.doNotCache`.
-    public static var doNotCache: ResponseCacher { .doNotCache }
-
-    /// Creates a `ResponseCacher` which modifies the proposed `CachedURLResponse` using the provided closure.
-    ///
-    /// - Parameter closure: Closure used to modify the `CachedURLResponse`.
-    /// - Returns:           The `ResponseCacher`.
-    public static func modify(using closure: @escaping ((URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)) -> ResponseCacher {
-        ResponseCacher(behavior: .modify(closure))
-    }
-}
-#endif

+ 0 - 655
Pods/Alamofire/Source/Combine.swift

@@ -1,655 +0,0 @@
-//
-//  Combine.swift
-//
-//  Copyright (c) 2020 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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.
-//
-
-#if !((os(iOS) && (arch(i386) || arch(arm))) || os(Windows) || os(Linux))
-
-import Combine
-import Dispatch
-import Foundation
-
-// MARK: - DataRequest / UploadRequest
-
-/// A Combine `Publisher` that publishes the `DataResponse<Value, AFError>` of the provided `DataRequest`.
-@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-public struct DataResponsePublisher<Value>: Publisher {
-    public typealias Output = DataResponse<Value, AFError>
-    public typealias Failure = Never
-
-    private typealias Handler = (@escaping (_ response: DataResponse<Value, AFError>) -> Void) -> DataRequest
-
-    private let request: DataRequest
-    private let responseHandler: Handler
-
-    /// Creates an instance which will serialize responses using the provided `ResponseSerializer`.
-    ///
-    /// - Parameters:
-    ///   - request:    `DataRequest` for which to publish the response.
-    ///   - queue:      `DispatchQueue` on which the `DataResponse` value will be published. `.main` by default.
-    ///   - serializer: `ResponseSerializer` used to produce the published `DataResponse`.
-    public init<Serializer: ResponseSerializer>(_ request: DataRequest, queue: DispatchQueue, serializer: Serializer)
-        where Value == Serializer.SerializedObject {
-        self.request = request
-        responseHandler = { request.response(queue: queue, responseSerializer: serializer, completionHandler: $0) }
-    }
-
-    /// Creates an instance which will serialize responses using the provided `DataResponseSerializerProtocol`.
-    ///
-    /// - Parameters:
-    ///   - request:    `DataRequest` for which to publish the response.
-    ///   - queue:      `DispatchQueue` on which the `DataResponse` value will be published. `.main` by default.
-    ///   - serializer: `DataResponseSerializerProtocol` used to produce the published `DataResponse`.
-    public init<Serializer: DataResponseSerializerProtocol>(_ request: DataRequest,
-                                                            queue: DispatchQueue,
-                                                            serializer: Serializer)
-        where Value == Serializer.SerializedObject {
-        self.request = request
-        responseHandler = { request.response(queue: queue, responseSerializer: serializer, completionHandler: $0) }
-    }
-
-    /// Publishes only the `Result` of the `DataResponse` value.
-    ///
-    /// - Returns: The `AnyPublisher` publishing the `Result<Value, AFError>` value.
-    public func result() -> AnyPublisher<Result<Value, AFError>, Never> {
-        map(\.result).eraseToAnyPublisher()
-    }
-
-    /// Publishes the `Result` of the `DataResponse` as a single `Value` or fail with the `AFError` instance.
-    ///
-    /// - Returns: The `AnyPublisher<Value, AFError>` publishing the stream.
-    public func value() -> AnyPublisher<Value, AFError> {
-        setFailureType(to: AFError.self).flatMap(\.result.publisher).eraseToAnyPublisher()
-    }
-
-    public func receive<S>(subscriber: S) where S: Subscriber, DataResponsePublisher.Failure == S.Failure, DataResponsePublisher.Output == S.Input {
-        subscriber.receive(subscription: Inner(request: request,
-                                               responseHandler: responseHandler,
-                                               downstream: subscriber))
-    }
-
-    private final class Inner<Downstream: Subscriber>: Subscription
-        where Downstream.Input == Output {
-        typealias Failure = Downstream.Failure
-
-        @Protected
-        private var downstream: Downstream?
-        private let request: DataRequest
-        private let responseHandler: Handler
-
-        init(request: DataRequest, responseHandler: @escaping Handler, downstream: Downstream) {
-            self.request = request
-            self.responseHandler = responseHandler
-            self.downstream = downstream
-        }
-
-        func request(_ demand: Subscribers.Demand) {
-            assert(demand > 0)
-
-            guard let downstream = downstream else { return }
-
-            self.downstream = nil
-            responseHandler { response in
-                _ = downstream.receive(response)
-                downstream.receive(completion: .finished)
-            }.resume()
-        }
-
-        func cancel() {
-            request.cancel()
-            downstream = nil
-        }
-    }
-}
-
-@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-extension DataResponsePublisher where Value == Data? {
-    /// Creates an instance which publishes a `DataResponse<Data?, AFError>` value without serialization.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public init(_ request: DataRequest, queue: DispatchQueue) {
-        self.request = request
-        responseHandler = { request.response(queue: queue, completionHandler: $0) }
-    }
-}
-
-extension DataRequest {
-    /// Creates a `DataResponsePublisher` for this instance using the given `ResponseSerializer` and `DispatchQueue`.
-    ///
-    /// - Parameters:
-    ///   - serializer: `ResponseSerializer` used to serialize response `Data`.
-    ///   - queue:      `DispatchQueue` on which the `DataResponse` will be published. `.main` by default.
-    ///
-    /// - Returns:      The `DataResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishResponse<Serializer: ResponseSerializer, T>(using serializer: Serializer, on queue: DispatchQueue = .main) -> DataResponsePublisher<T>
-        where Serializer.SerializedObject == T {
-        DataResponsePublisher(self, queue: queue, serializer: serializer)
-    }
-
-    /// Creates a `DataResponsePublisher` for this instance and uses a `DataResponseSerializer` to serialize the
-    /// response.
-    ///
-    /// - Parameters:
-    ///   - queue:               `DispatchQueue` on which the `DataResponse` will be published. `.main` by default.
-    ///   - preprocessor:        `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()`
-    ///                          by default.
-    ///   - emptyResponseCodes:  `Set<Int>` of HTTP status codes for which empty responses are allowed. `[204, 205]` by
-    ///                          default.
-    ///   - emptyRequestMethods: `Set<HTTPMethod>` of `HTTPMethod`s for which empty responses are allowed, regardless of
-    ///                          status code. `[.head]` by default.
-    /// - Returns:               The `DataResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishData(queue: DispatchQueue = .main,
-                            preprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor,
-                            emptyResponseCodes: Set<Int> = DataResponseSerializer.defaultEmptyResponseCodes,
-                            emptyRequestMethods: Set<HTTPMethod> = DataResponseSerializer.defaultEmptyRequestMethods) -> DataResponsePublisher<Data> {
-        publishResponse(using: DataResponseSerializer(dataPreprocessor: preprocessor,
-                                                      emptyResponseCodes: emptyResponseCodes,
-                                                      emptyRequestMethods: emptyRequestMethods),
-                        on: queue)
-    }
-
-    /// Creates a `DataResponsePublisher` for this instance and uses a `StringResponseSerializer` to serialize the
-    /// response.
-    ///
-    /// - Parameters:
-    ///   - queue:               `DispatchQueue` on which the `DataResponse` will be published. `.main` by default.
-    ///   - preprocessor:        `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()`
-    ///                          by default.
-    ///   - encoding:            `String.Encoding` to parse the response. `nil` by default, in which case the encoding
-    ///                          will be determined by the server response, falling back to the default HTTP character
-    ///                          set, `ISO-8859-1`.
-    ///   - emptyResponseCodes:  `Set<Int>` of HTTP status codes for which empty responses are allowed. `[204, 205]` by
-    ///                          default.
-    ///   - emptyRequestMethods: `Set<HTTPMethod>` of `HTTPMethod`s for which empty responses are allowed, regardless of
-    ///                          status code. `[.head]` by default.
-    ///
-    /// - Returns:               The `DataResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishString(queue: DispatchQueue = .main,
-                              preprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor,
-                              encoding: String.Encoding? = nil,
-                              emptyResponseCodes: Set<Int> = StringResponseSerializer.defaultEmptyResponseCodes,
-                              emptyRequestMethods: Set<HTTPMethod> = StringResponseSerializer.defaultEmptyRequestMethods) -> DataResponsePublisher<String> {
-        publishResponse(using: StringResponseSerializer(dataPreprocessor: preprocessor,
-                                                        encoding: encoding,
-                                                        emptyResponseCodes: emptyResponseCodes,
-                                                        emptyRequestMethods: emptyRequestMethods),
-                        on: queue)
-    }
-
-    @_disfavoredOverload
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    @available(*, deprecated, message: "Renamed publishDecodable(type:queue:preprocessor:decoder:emptyResponseCodes:emptyRequestMethods).")
-    public func publishDecodable<T: Decodable>(type: T.Type = T.self,
-                                               queue: DispatchQueue = .main,
-                                               preprocessor: DataPreprocessor = DecodableResponseSerializer<T>.defaultDataPreprocessor,
-                                               decoder: DataDecoder = JSONDecoder(),
-                                               emptyResponseCodes: Set<Int> = DecodableResponseSerializer<T>.defaultEmptyResponseCodes,
-                                               emptyResponseMethods: Set<HTTPMethod> = DecodableResponseSerializer<T>.defaultEmptyRequestMethods) -> DataResponsePublisher<T> {
-        publishResponse(using: DecodableResponseSerializer(dataPreprocessor: preprocessor,
-                                                           decoder: decoder,
-                                                           emptyResponseCodes: emptyResponseCodes,
-                                                           emptyRequestMethods: emptyResponseMethods),
-                        on: queue)
-    }
-
-    /// Creates a `DataResponsePublisher` for this instance and uses a `DecodableResponseSerializer` to serialize the
-    /// response.
-    ///
-    /// - Parameters:
-    ///   - type:                `Decodable` type to which to decode response `Data`. Inferred from the context by
-    ///                          default.
-    ///   - queue:               `DispatchQueue` on which the `DataResponse` will be published. `.main` by default.
-    ///   - preprocessor:        `DataPreprocessor` which filters the `Data` before serialization.
-    ///                          `PassthroughPreprocessor()` by default.
-    ///   - decoder:             `DataDecoder` instance used to decode response `Data`. `JSONDecoder()` by default.
-    ///   - emptyResponseCodes:  `Set<Int>` of HTTP status codes for which empty responses are allowed. `[204, 205]` by
-    ///                          default.
-    ///   - emptyRequestMethods: `Set<HTTPMethod>` of `HTTPMethod`s for which empty responses are allowed, regardless of
-    ///                          status code. `[.head]` by default.
-    ///
-    /// - Returns:               The `DataResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishDecodable<T: Decodable>(type: T.Type = T.self,
-                                               queue: DispatchQueue = .main,
-                                               preprocessor: DataPreprocessor = DecodableResponseSerializer<T>.defaultDataPreprocessor,
-                                               decoder: DataDecoder = JSONDecoder(),
-                                               emptyResponseCodes: Set<Int> = DecodableResponseSerializer<T>.defaultEmptyResponseCodes,
-                                               emptyRequestMethods: Set<HTTPMethod> = DecodableResponseSerializer<T>.defaultEmptyRequestMethods) -> DataResponsePublisher<T> {
-        publishResponse(using: DecodableResponseSerializer(dataPreprocessor: preprocessor,
-                                                           decoder: decoder,
-                                                           emptyResponseCodes: emptyResponseCodes,
-                                                           emptyRequestMethods: emptyRequestMethods),
-                        on: queue)
-    }
-
-    /// Creates a `DataResponsePublisher` for this instance which does not serialize the response before publishing.
-    ///
-    ///   - queue: `DispatchQueue` on which the `DataResponse` will be published. `.main` by default.
-    ///
-    /// - Returns: The `DataResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishUnserialized(queue: DispatchQueue = .main) -> DataResponsePublisher<Data?> {
-        DataResponsePublisher(self, queue: queue)
-    }
-}
-
-// A Combine `Publisher` that publishes a sequence of `Stream<Value, AFError>` values received by the provided `DataStreamRequest`.
-@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-public struct DataStreamPublisher<Value>: Publisher {
-    public typealias Output = DataStreamRequest.Stream<Value, AFError>
-    public typealias Failure = Never
-
-    private typealias Handler = (@escaping DataStreamRequest.Handler<Value, AFError>) -> DataStreamRequest
-
-    private let request: DataStreamRequest
-    private let streamHandler: Handler
-
-    /// Creates an instance which will serialize responses using the provided `DataStreamSerializer`.
-    ///
-    /// - Parameters:
-    ///   - request:    `DataStreamRequest` for which to publish the response.
-    ///   - queue:      `DispatchQueue` on which the `Stream<Value, AFError>` values will be published. `.main` by
-    ///                 default.
-    ///   - serializer: `DataStreamSerializer` used to produce the published `Stream<Value, AFError>` values.
-    public init<Serializer: DataStreamSerializer>(_ request: DataStreamRequest, queue: DispatchQueue, serializer: Serializer)
-        where Value == Serializer.SerializedObject {
-        self.request = request
-        streamHandler = { request.responseStream(using: serializer, on: queue, stream: $0) }
-    }
-
-    /// Publishes only the `Result` of the `DataStreamRequest.Stream`'s `Event`s.
-    ///
-    /// - Returns: The `AnyPublisher` publishing the `Result<Value, AFError>` value.
-    public func result() -> AnyPublisher<Result<Value, AFError>, Never> {
-        compactMap { stream in
-            switch stream.event {
-            case let .stream(result):
-                return result
-            // If the stream has completed with an error, send the error value downstream as a `.failure`.
-            case let .complete(completion):
-                return completion.error.map(Result.failure)
-            }
-        }
-        .eraseToAnyPublisher()
-    }
-
-    /// Publishes the streamed values of the `DataStreamRequest.Stream` as a sequence of `Value` or fail with the
-    /// `AFError` instance.
-    ///
-    /// - Returns: The `AnyPublisher<Value, AFError>` publishing the stream.
-    public func value() -> AnyPublisher<Value, AFError> {
-        result().setFailureType(to: AFError.self).flatMap(\.publisher).eraseToAnyPublisher()
-    }
-
-    public func receive<S>(subscriber: S) where S: Subscriber, DataStreamPublisher.Failure == S.Failure, DataStreamPublisher.Output == S.Input {
-        subscriber.receive(subscription: Inner(request: request,
-                                               streamHandler: streamHandler,
-                                               downstream: subscriber))
-    }
-
-    private final class Inner<Downstream: Subscriber>: Subscription
-        where Downstream.Input == Output {
-        typealias Failure = Downstream.Failure
-
-        @Protected
-        private var downstream: Downstream?
-        private let request: DataStreamRequest
-        private let streamHandler: Handler
-
-        init(request: DataStreamRequest, streamHandler: @escaping Handler, downstream: Downstream) {
-            self.request = request
-            self.streamHandler = streamHandler
-            self.downstream = downstream
-        }
-
-        func request(_ demand: Subscribers.Demand) {
-            assert(demand > 0)
-
-            guard let downstream = downstream else { return }
-
-            self.downstream = nil
-            streamHandler { stream in
-                _ = downstream.receive(stream)
-                if case .complete = stream.event {
-                    downstream.receive(completion: .finished)
-                }
-            }.resume()
-        }
-
-        func cancel() {
-            request.cancel()
-            downstream = nil
-        }
-    }
-}
-
-extension DataStreamRequest {
-    /// Creates a `DataStreamPublisher` for this instance using the given `DataStreamSerializer` and `DispatchQueue`.
-    ///
-    /// - Parameters:
-    ///   - serializer: `DataStreamSerializer` used to serialize the streamed `Data`.
-    ///   - queue:      `DispatchQueue` on which the `DataRequest.Stream` values will be published. `.main` by default.
-    /// - Returns:      The `DataStreamPublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishStream<Serializer: DataStreamSerializer>(using serializer: Serializer,
-                                                                on queue: DispatchQueue = .main) -> DataStreamPublisher<Serializer.SerializedObject> {
-        DataStreamPublisher(self, queue: queue, serializer: serializer)
-    }
-
-    /// Creates a `DataStreamPublisher` for this instance which uses a `PassthroughStreamSerializer` to stream `Data`
-    /// unserialized.
-    ///
-    /// - Parameters:
-    ///   - queue:      `DispatchQueue` on which the `DataRequest.Stream` values will be published. `.main` by default.
-    /// - Returns:      The `DataStreamPublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishData(queue: DispatchQueue = .main) -> DataStreamPublisher<Data> {
-        publishStream(using: PassthroughStreamSerializer(), on: queue)
-    }
-
-    /// Creates a `DataStreamPublisher` for this instance which uses a `StringStreamSerializer` to serialize stream
-    /// `Data` values into `String` values.
-    ///
-    /// - Parameters:
-    ///   - queue:      `DispatchQueue` on which the `DataRequest.Stream` values will be published. `.main` by default.
-    /// - Returns:      The `DataStreamPublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishString(queue: DispatchQueue = .main) -> DataStreamPublisher<String> {
-        publishStream(using: StringStreamSerializer(), on: queue)
-    }
-
-    /// Creates a `DataStreamPublisher` for this instance which uses a `DecodableStreamSerializer` with the provided
-    /// parameters to serialize stream `Data` values into the provided type.
-    ///
-    /// - Parameters:
-    ///   - type:         `Decodable` type to which to decode stream `Data`. Inferred from the context by default.
-    ///   - queue:        `DispatchQueue` on which the `DataRequest.Stream` values will be published. `.main` by default.
-    ///   - decoder:      `DataDecoder` instance used to decode stream `Data`. `JSONDecoder()` by default.
-    ///   - preprocessor: `DataPreprocessor` which filters incoming stream `Data` before serialization.
-    ///                   `PassthroughPreprocessor()` by default.
-    /// - Returns:        The `DataStreamPublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishDecodable<T: Decodable>(type: T.Type = T.self,
-                                               queue: DispatchQueue = .main,
-                                               decoder: DataDecoder = JSONDecoder(),
-                                               preprocessor: DataPreprocessor = PassthroughPreprocessor()) -> DataStreamPublisher<T> {
-        publishStream(using: DecodableStreamSerializer(decoder: decoder,
-                                                       dataPreprocessor: preprocessor),
-                      on: queue)
-    }
-}
-
-/// A Combine `Publisher` that publishes the `DownloadResponse<Value, AFError>` of the provided `DownloadRequest`.
-@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-public struct DownloadResponsePublisher<Value>: Publisher {
-    public typealias Output = DownloadResponse<Value, AFError>
-    public typealias Failure = Never
-
-    private typealias Handler = (@escaping (_ response: DownloadResponse<Value, AFError>) -> Void) -> DownloadRequest
-
-    private let request: DownloadRequest
-    private let responseHandler: Handler
-
-    /// Creates an instance which will serialize responses using the provided `ResponseSerializer`.
-    ///
-    /// - Parameters:
-    ///   - request:    `DownloadRequest` for which to publish the response.
-    ///   - queue:      `DispatchQueue` on which the `DownloadResponse` value will be published. `.main` by default.
-    ///   - serializer: `ResponseSerializer` used to produce the published `DownloadResponse`.
-    public init<Serializer: ResponseSerializer>(_ request: DownloadRequest, queue: DispatchQueue, serializer: Serializer)
-        where Value == Serializer.SerializedObject {
-        self.request = request
-        responseHandler = { request.response(queue: queue, responseSerializer: serializer, completionHandler: $0) }
-    }
-
-    /// Creates an instance which will serialize responses using the provided `DownloadResponseSerializerProtocol` value.
-    ///
-    /// - Parameters:
-    ///   - request:    `DownloadRequest` for which to publish the response.
-    ///   - queue:      `DispatchQueue` on which the `DataResponse` value will be published. `.main` by default.
-    ///   - serializer: `DownloadResponseSerializerProtocol` used to produce the published `DownloadResponse`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public init<Serializer: DownloadResponseSerializerProtocol>(_ request: DownloadRequest,
-                                                                queue: DispatchQueue,
-                                                                serializer: Serializer)
-        where Value == Serializer.SerializedObject {
-        self.request = request
-        responseHandler = { request.response(queue: queue, responseSerializer: serializer, completionHandler: $0) }
-    }
-
-    /// Publishes only the `Result` of the `DownloadResponse` value.
-    ///
-    /// - Returns: The `AnyPublisher` publishing the `Result<Value, AFError>` value.
-    public func result() -> AnyPublisher<Result<Value, AFError>, Never> {
-        map(\.result).eraseToAnyPublisher()
-    }
-
-    /// Publishes the `Result` of the `DownloadResponse` as a single `Value` or fail with the `AFError` instance.
-    ///
-    /// - Returns: The `AnyPublisher<Value, AFError>` publishing the stream.
-    public func value() -> AnyPublisher<Value, AFError> {
-        setFailureType(to: AFError.self).flatMap(\.result.publisher).eraseToAnyPublisher()
-    }
-
-    public func receive<S>(subscriber: S) where S: Subscriber, DownloadResponsePublisher.Failure == S.Failure, DownloadResponsePublisher.Output == S.Input {
-        subscriber.receive(subscription: Inner(request: request,
-                                               responseHandler: responseHandler,
-                                               downstream: subscriber))
-    }
-
-    private final class Inner<Downstream: Subscriber>: Subscription
-        where Downstream.Input == Output {
-        typealias Failure = Downstream.Failure
-
-        @Protected
-        private var downstream: Downstream?
-        private let request: DownloadRequest
-        private let responseHandler: Handler
-
-        init(request: DownloadRequest, responseHandler: @escaping Handler, downstream: Downstream) {
-            self.request = request
-            self.responseHandler = responseHandler
-            self.downstream = downstream
-        }
-
-        func request(_ demand: Subscribers.Demand) {
-            assert(demand > 0)
-
-            guard let downstream = downstream else { return }
-
-            self.downstream = nil
-            responseHandler { response in
-                _ = downstream.receive(response)
-                downstream.receive(completion: .finished)
-            }.resume()
-        }
-
-        func cancel() {
-            request.cancel()
-            downstream = nil
-        }
-    }
-}
-
-extension DownloadRequest {
-    /// Creates a `DownloadResponsePublisher` for this instance using the given `ResponseSerializer` and `DispatchQueue`.
-    ///
-    /// - Parameters:
-    ///   - serializer: `ResponseSerializer` used to serialize the response `Data` from disk.
-    ///   - queue:      `DispatchQueue` on which the `DownloadResponse` will be published.`.main` by default.
-    ///
-    /// - Returns:      The `DownloadResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishResponse<Serializer: ResponseSerializer, T>(using serializer: Serializer, on queue: DispatchQueue = .main) -> DownloadResponsePublisher<T>
-        where Serializer.SerializedObject == T {
-        DownloadResponsePublisher(self, queue: queue, serializer: serializer)
-    }
-
-    /// Creates a `DownloadResponsePublisher` for this instance using the given `DownloadResponseSerializerProtocol` and
-    /// `DispatchQueue`.
-    ///
-    /// - Parameters:
-    ///   - serializer: `DownloadResponseSerializer` used to serialize the response `Data` from disk.
-    ///   - queue:      `DispatchQueue` on which the `DownloadResponse` will be published.`.main` by default.
-    ///
-    /// - Returns:      The `DownloadResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishResponse<Serializer: DownloadResponseSerializerProtocol, T>(using serializer: Serializer, on queue: DispatchQueue = .main) -> DownloadResponsePublisher<T>
-        where Serializer.SerializedObject == T {
-        DownloadResponsePublisher(self, queue: queue, serializer: serializer)
-    }
-
-    /// Creates a `DownloadResponsePublisher` for this instance and uses a `URLResponseSerializer` to serialize the
-    /// response.
-    ///
-    /// - Parameter queue: `DispatchQueue` on which the `DownloadResponse` will be published. `.main` by default.
-    ///
-    /// - Returns:         The `DownloadResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishURL(queue: DispatchQueue = .main) -> DownloadResponsePublisher<URL> {
-        publishResponse(using: URLResponseSerializer(), on: queue)
-    }
-
-    /// Creates a `DownloadResponsePublisher` for this instance and uses a `DataResponseSerializer` to serialize the
-    /// response.
-    ///
-    /// - Parameters:
-    ///   - queue:               `DispatchQueue` on which the `DownloadResponse` will be published. `.main` by default.
-    ///   - preprocessor:        `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()`
-    ///                          by default.
-    ///   - emptyResponseCodes:  `Set<Int>` of HTTP status codes for which empty responses are allowed. `[204, 205]` by
-    ///                          default.
-    ///   - emptyRequestMethods: `Set<HTTPMethod>` of `HTTPMethod`s for which empty responses are allowed, regardless of
-    ///                          status code. `[.head]` by default.
-    ///
-    /// - Returns:               The `DownloadResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishData(queue: DispatchQueue = .main,
-                            preprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor,
-                            emptyResponseCodes: Set<Int> = DataResponseSerializer.defaultEmptyResponseCodes,
-                            emptyRequestMethods: Set<HTTPMethod> = DataResponseSerializer.defaultEmptyRequestMethods) -> DownloadResponsePublisher<Data> {
-        publishResponse(using: DataResponseSerializer(dataPreprocessor: preprocessor,
-                                                      emptyResponseCodes: emptyResponseCodes,
-                                                      emptyRequestMethods: emptyRequestMethods),
-                        on: queue)
-    }
-
-    /// Creates a `DownloadResponsePublisher` for this instance and uses a `StringResponseSerializer` to serialize the
-    /// response.
-    ///
-    /// - Parameters:
-    ///   - queue:               `DispatchQueue` on which the `DataResponse` will be published. `.main` by default.
-    ///   - preprocessor:        `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()`
-    ///                          by default.
-    ///   - encoding:            `String.Encoding` to parse the response. `nil` by default, in which case the encoding
-    ///                          will be determined by the server response, falling back to the default HTTP character
-    ///                          set, `ISO-8859-1`.
-    ///   - emptyResponseCodes:  `Set<Int>` of HTTP status codes for which empty responses are allowed. `[204, 205]` by
-    ///                          default.
-    ///   - emptyRequestMethods: `Set<HTTPMethod>` of `HTTPMethod`s for which empty responses are allowed, regardless of
-    ///                          status code. `[.head]` by default.
-    ///
-    /// - Returns:               The `DownloadResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishString(queue: DispatchQueue = .main,
-                              preprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor,
-                              encoding: String.Encoding? = nil,
-                              emptyResponseCodes: Set<Int> = StringResponseSerializer.defaultEmptyResponseCodes,
-                              emptyRequestMethods: Set<HTTPMethod> = StringResponseSerializer.defaultEmptyRequestMethods) -> DownloadResponsePublisher<String> {
-        publishResponse(using: StringResponseSerializer(dataPreprocessor: preprocessor,
-                                                        encoding: encoding,
-                                                        emptyResponseCodes: emptyResponseCodes,
-                                                        emptyRequestMethods: emptyRequestMethods),
-                        on: queue)
-    }
-
-    @_disfavoredOverload
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    @available(*, deprecated, message: "Renamed publishDecodable(type:queue:preprocessor:decoder:emptyResponseCodes:emptyRequestMethods).")
-    public func publishDecodable<T: Decodable>(type: T.Type = T.self,
-                                               queue: DispatchQueue = .main,
-                                               preprocessor: DataPreprocessor = DecodableResponseSerializer<T>.defaultDataPreprocessor,
-                                               decoder: DataDecoder = JSONDecoder(),
-                                               emptyResponseCodes: Set<Int> = DecodableResponseSerializer<T>.defaultEmptyResponseCodes,
-                                               emptyResponseMethods: Set<HTTPMethod> = DecodableResponseSerializer<T>.defaultEmptyRequestMethods) -> DownloadResponsePublisher<T> {
-        publishResponse(using: DecodableResponseSerializer(dataPreprocessor: preprocessor,
-                                                           decoder: decoder,
-                                                           emptyResponseCodes: emptyResponseCodes,
-                                                           emptyRequestMethods: emptyResponseMethods),
-                        on: queue)
-    }
-
-    /// Creates a `DownloadResponsePublisher` for this instance and uses a `DecodableResponseSerializer` to serialize
-    /// the response.
-    ///
-    /// - Parameters:
-    ///   - type:                `Decodable` type to which to decode response `Data`. Inferred from the context by default.
-    ///   - queue:               `DispatchQueue` on which the `DataResponse` will be published. `.main` by default.
-    ///   - preprocessor:        `DataPreprocessor` which filters the `Data` before serialization.
-    ///                          `PassthroughPreprocessor()` by default.
-    ///   - decoder:             `DataDecoder` instance used to decode response `Data`. `JSONDecoder()` by default.
-    ///   - emptyResponseCodes:  `Set<Int>` of HTTP status codes for which empty responses are allowed. `[204, 205]` by
-    ///                          default.
-    ///   - emptyRequestMethods: `Set<HTTPMethod>` of `HTTPMethod`s for which empty responses are allowed, regardless
-    ///                          of status code. `[.head]` by default.
-    ///
-    /// - Returns:               The `DownloadResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishDecodable<T: Decodable>(type: T.Type = T.self,
-                                               queue: DispatchQueue = .main,
-                                               preprocessor: DataPreprocessor = DecodableResponseSerializer<T>.defaultDataPreprocessor,
-                                               decoder: DataDecoder = JSONDecoder(),
-                                               emptyResponseCodes: Set<Int> = DecodableResponseSerializer<T>.defaultEmptyResponseCodes,
-                                               emptyRequestMethods: Set<HTTPMethod> = DecodableResponseSerializer<T>.defaultEmptyRequestMethods) -> DownloadResponsePublisher<T> {
-        publishResponse(using: DecodableResponseSerializer(dataPreprocessor: preprocessor,
-                                                           decoder: decoder,
-                                                           emptyResponseCodes: emptyResponseCodes,
-                                                           emptyRequestMethods: emptyRequestMethods),
-                        on: queue)
-    }
-}
-
-@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-extension DownloadResponsePublisher where Value == URL? {
-    /// Creates an instance which publishes a `DownloadResponse<URL?, AFError>` value without serialization.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public init(_ request: DownloadRequest, queue: DispatchQueue) {
-        self.request = request
-        responseHandler = { request.response(queue: queue, completionHandler: $0) }
-    }
-}
-
-extension DownloadRequest {
-    /// Creates a `DownloadResponsePublisher` for this instance which does not serialize the response before publishing.
-    ///
-    /// - Parameter queue: `DispatchQueue` on which the `DownloadResponse` will be published. `.main` by default.
-    ///
-    /// - Returns:         The `DownloadResponsePublisher`.
-    @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
-    public func publishUnserialized(on queue: DispatchQueue = .main) -> DownloadResponsePublisher<URL?> {
-        DownloadResponsePublisher(self, queue: queue)
-    }
-}
-
-#endif

+ 0 - 704
Pods/Alamofire/Source/Concurrency.swift

@@ -1,704 +0,0 @@
-//
-//  Concurrency.swift
-//
-//  Copyright (c) 2021 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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.
-//
-
-#if compiler(>=5.6.0) && canImport(_Concurrency)
-
-import Foundation
-
-// MARK: - Request Event Streams
-
-@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
-extension Request {
-    /// Creates a `StreamOf<Progress>` for the instance's upload progress.
-    ///
-    /// - Parameter bufferingPolicy: `BufferingPolicy` that determines the stream's buffering behavior.`.unbounded` by default.
-    ///
-    /// - Returns:                   The `StreamOf<Progress>`.
-    public func uploadProgress(bufferingPolicy: StreamOf<Progress>.BufferingPolicy = .unbounded) -> StreamOf<Progress> {
-        stream(bufferingPolicy: bufferingPolicy) { [unowned self] continuation in
-            uploadProgress(queue: .singleEventQueue) { progress in
-                continuation.yield(progress)
-            }
-        }
-    }
-
-    /// Creates a `StreamOf<Progress>` for the instance's download progress.
-    ///
-    /// - Parameter bufferingPolicy: `BufferingPolicy` that determines the stream's buffering behavior.`.unbounded` by default.
-    ///
-    /// - Returns:                   The `StreamOf<Progress>`.
-    public func downloadProgress(bufferingPolicy: StreamOf<Progress>.BufferingPolicy = .unbounded) -> StreamOf<Progress> {
-        stream(bufferingPolicy: bufferingPolicy) { [unowned self] continuation in
-            downloadProgress(queue: .singleEventQueue) { progress in
-                continuation.yield(progress)
-            }
-        }
-    }
-
-    /// Creates a `StreamOf<URLRequest>` for the `URLRequest`s produced for the instance.
-    ///
-    /// - Parameter bufferingPolicy: `BufferingPolicy` that determines the stream's buffering behavior.`.unbounded` by default.
-    ///
-    /// - Returns:                   The `StreamOf<URLRequest>`.
-    public func urlRequests(bufferingPolicy: StreamOf<URLRequest>.BufferingPolicy = .unbounded) -> StreamOf<URLRequest> {
-        stream(bufferingPolicy: bufferingPolicy) { [unowned self] continuation in
-            onURLRequestCreation(on: .singleEventQueue) { request in
-                continuation.yield(request)
-            }
-        }
-    }
-
-    /// Creates a `StreamOf<URLSessionTask>` for the `URLSessionTask`s produced for the instance.
-    ///
-    /// - Parameter bufferingPolicy: `BufferingPolicy` that determines the stream's buffering behavior.`.unbounded` by default.
-    ///
-    /// - Returns:                   The `StreamOf<URLSessionTask>`.
-    public func urlSessionTasks(bufferingPolicy: StreamOf<URLSessionTask>.BufferingPolicy = .unbounded) -> StreamOf<URLSessionTask> {
-        stream(bufferingPolicy: bufferingPolicy) { [unowned self] continuation in
-            onURLSessionTaskCreation(on: .singleEventQueue) { task in
-                continuation.yield(task)
-            }
-        }
-    }
-
-    /// Creates a `StreamOf<String>` for the cURL descriptions produced for the instance.
-    ///
-    /// - Parameter bufferingPolicy: `BufferingPolicy` that determines the stream's buffering behavior.`.unbounded` by default.
-    ///
-    /// - Returns:                   The `StreamOf<String>`.
-    public func cURLDescriptions(bufferingPolicy: StreamOf<String>.BufferingPolicy = .unbounded) -> StreamOf<String> {
-        stream(bufferingPolicy: bufferingPolicy) { [unowned self] continuation in
-            cURLDescription(on: .singleEventQueue) { description in
-                continuation.yield(description)
-            }
-        }
-    }
-
-    private func stream<T>(of type: T.Type = T.self,
-                           bufferingPolicy: StreamOf<T>.BufferingPolicy = .unbounded,
-                           yielder: @escaping (StreamOf<T>.Continuation) -> Void) -> StreamOf<T> {
-        StreamOf<T>(bufferingPolicy: bufferingPolicy) { [unowned self] continuation in
-            yielder(continuation)
-            // Must come after serializers run in order to catch retry progress.
-            onFinish {
-                continuation.finish()
-            }
-        }
-    }
-}
-
-// MARK: - DataTask
-
-/// Value used to `await` a `DataResponse` and associated values.
-@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
-public struct DataTask<Value> {
-    /// `DataResponse` produced by the `DataRequest` and its response handler.
-    public var response: DataResponse<Value, AFError> {
-        get async {
-            if shouldAutomaticallyCancel {
-                return await withTaskCancellationHandler {
-                    await task.value
-                } onCancel: {
-                    self.cancel()
-                }
-            } else {
-                return await task.value
-            }
-        }
-    }
-
-    /// `Result` of any response serialization performed for the `response`.
-    public var result: Result<Value, AFError> {
-        get async { await response.result }
-    }
-
-    /// `Value` returned by the `response`.
-    public var value: Value {
-        get async throws {
-            try await result.get()
-        }
-    }
-
-    private let request: DataRequest
-    private let task: Task<DataResponse<Value, AFError>, Never>
-    private let shouldAutomaticallyCancel: Bool
-
-    fileprivate init(request: DataRequest, task: Task<DataResponse<Value, AFError>, Never>, shouldAutomaticallyCancel: Bool) {
-        self.request = request
-        self.task = task
-        self.shouldAutomaticallyCancel = shouldAutomaticallyCancel
-    }
-
-    /// Cancel the underlying `DataRequest` and `Task`.
-    public func cancel() {
-        task.cancel()
-    }
-
-    /// Resume the underlying `DataRequest`.
-    public func resume() {
-        request.resume()
-    }
-
-    /// Suspend the underlying `DataRequest`.
-    public func suspend() {
-        request.suspend()
-    }
-}
-
-@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
-extension DataRequest {
-    /// Creates a `DataTask` to `await` a `Data` value.
-    ///
-    /// - Parameters:
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DataTask`'s async
-    ///                                properties. `false` by default.
-    ///   - dataPreprocessor:          `DataPreprocessor` which processes the received `Data` before completion.
-    ///   - emptyResponseCodes:        HTTP response codes for which empty responses are allowed. `[204, 205]` by default.
-    ///   - emptyRequestMethods:       `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///
-    /// - Returns: The `DataTask`.
-    public func serializingData(automaticallyCancelling shouldAutomaticallyCancel: Bool = false,
-                                dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor,
-                                emptyResponseCodes: Set<Int> = DataResponseSerializer.defaultEmptyResponseCodes,
-                                emptyRequestMethods: Set<HTTPMethod> = DataResponseSerializer.defaultEmptyRequestMethods) -> DataTask<Data> {
-        serializingResponse(using: DataResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                          emptyResponseCodes: emptyResponseCodes,
-                                                          emptyRequestMethods: emptyRequestMethods),
-                            automaticallyCancelling: shouldAutomaticallyCancel)
-    }
-
-    /// Creates a `DataTask` to `await` serialization of a `Decodable` value.
-    ///
-    /// - Parameters:
-    ///   - type:                      `Decodable` type to decode from response data.
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DataTask`'s async
-    ///                                properties. `false` by default.
-    ///   - dataPreprocessor:          `DataPreprocessor` which processes the received `Data` before calling the serializer.
-    ///                                `PassthroughPreprocessor()` by default.
-    ///   - decoder:                   `DataDecoder` to use to decode the response. `JSONDecoder()` by default.
-    ///   - emptyResponseCodes:        HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods:       `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///
-    /// - Returns: The `DataTask`.
-    public func serializingDecodable<Value: Decodable>(_ type: Value.Type = Value.self,
-                                                       automaticallyCancelling shouldAutomaticallyCancel: Bool = false,
-                                                       dataPreprocessor: DataPreprocessor = DecodableResponseSerializer<Value>.defaultDataPreprocessor,
-                                                       decoder: DataDecoder = JSONDecoder(),
-                                                       emptyResponseCodes: Set<Int> = DecodableResponseSerializer<Value>.defaultEmptyResponseCodes,
-                                                       emptyRequestMethods: Set<HTTPMethod> = DecodableResponseSerializer<Value>.defaultEmptyRequestMethods) -> DataTask<Value> {
-        serializingResponse(using: DecodableResponseSerializer<Value>(dataPreprocessor: dataPreprocessor,
-                                                                      decoder: decoder,
-                                                                      emptyResponseCodes: emptyResponseCodes,
-                                                                      emptyRequestMethods: emptyRequestMethods),
-                            automaticallyCancelling: shouldAutomaticallyCancel)
-    }
-
-    /// Creates a `DataTask` to `await` serialization of a `String` value.
-    ///
-    /// - Parameters:
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DataTask`'s async
-    ///                                properties. `false` by default.
-    ///   - dataPreprocessor:          `DataPreprocessor` which processes the received `Data` before calling the serializer.
-    ///                                `PassthroughPreprocessor()` by default.
-    ///   - encoding:                  `String.Encoding` to use during serialization. Defaults to `nil`, in which case
-    ///                                the encoding will be determined from the server response, falling back to the
-    ///                                default HTTP character set, `ISO-8859-1`.
-    ///   - emptyResponseCodes:        HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods:       `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///
-    /// - Returns: The `DataTask`.
-    public func serializingString(automaticallyCancelling shouldAutomaticallyCancel: Bool = false,
-                                  dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor,
-                                  encoding: String.Encoding? = nil,
-                                  emptyResponseCodes: Set<Int> = StringResponseSerializer.defaultEmptyResponseCodes,
-                                  emptyRequestMethods: Set<HTTPMethod> = StringResponseSerializer.defaultEmptyRequestMethods) -> DataTask<String> {
-        serializingResponse(using: StringResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                            encoding: encoding,
-                                                            emptyResponseCodes: emptyResponseCodes,
-                                                            emptyRequestMethods: emptyRequestMethods),
-                            automaticallyCancelling: shouldAutomaticallyCancel)
-    }
-
-    /// Creates a `DataTask` to `await` serialization using the provided `ResponseSerializer` instance.
-    ///
-    /// - Parameters:
-    ///   - serializer:                `ResponseSerializer` responsible for serializing the request, response, and data.
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DataTask`'s async
-    ///                                properties. `false` by default.
-    ///
-    /// - Returns: The `DataTask`.
-    public func serializingResponse<Serializer: ResponseSerializer>(using serializer: Serializer,
-                                                                    automaticallyCancelling shouldAutomaticallyCancel: Bool = false)
-        -> DataTask<Serializer.SerializedObject> {
-        dataTask(automaticallyCancelling: shouldAutomaticallyCancel) {
-            self.response(queue: .singleEventQueue,
-                          responseSerializer: serializer,
-                          completionHandler: $0)
-        }
-    }
-
-    /// Creates a `DataTask` to `await` serialization using the provided `DataResponseSerializerProtocol` instance.
-    ///
-    /// - Parameters:
-    ///   - serializer:                `DataResponseSerializerProtocol` responsible for serializing the request,
-    ///                                response, and data.
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DataTask`'s async
-    ///                                properties. `false` by default.
-    ///
-    /// - Returns: The `DataTask`.
-    public func serializingResponse<Serializer: DataResponseSerializerProtocol>(using serializer: Serializer,
-                                                                                automaticallyCancelling shouldAutomaticallyCancel: Bool = false)
-        -> DataTask<Serializer.SerializedObject> {
-        dataTask(automaticallyCancelling: shouldAutomaticallyCancel) {
-            self.response(queue: .singleEventQueue,
-                          responseSerializer: serializer,
-                          completionHandler: $0)
-        }
-    }
-
-    private func dataTask<Value>(automaticallyCancelling shouldAutomaticallyCancel: Bool,
-                                 forResponse onResponse: @escaping (@escaping (DataResponse<Value, AFError>) -> Void) -> Void)
-        -> DataTask<Value> {
-        let task = Task {
-            await withTaskCancellationHandler {
-                await withCheckedContinuation { continuation in
-                    onResponse {
-                        continuation.resume(returning: $0)
-                    }
-                }
-            } onCancel: {
-                self.cancel()
-            }
-        }
-
-        return DataTask<Value>(request: self, task: task, shouldAutomaticallyCancel: shouldAutomaticallyCancel)
-    }
-}
-
-// MARK: - DownloadTask
-
-/// Value used to `await` a `DownloadResponse` and associated values.
-@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
-public struct DownloadTask<Value> {
-    /// `DownloadResponse` produced by the `DownloadRequest` and its response handler.
-    public var response: DownloadResponse<Value, AFError> {
-        get async {
-            if shouldAutomaticallyCancel {
-                return await withTaskCancellationHandler {
-                    await task.value
-                } onCancel: {
-                    self.cancel()
-                }
-            } else {
-                return await task.value
-            }
-        }
-    }
-
-    /// `Result` of any response serialization performed for the `response`.
-    public var result: Result<Value, AFError> {
-        get async { await response.result }
-    }
-
-    /// `Value` returned by the `response`.
-    public var value: Value {
-        get async throws {
-            try await result.get()
-        }
-    }
-
-    private let task: Task<AFDownloadResponse<Value>, Never>
-    private let request: DownloadRequest
-    private let shouldAutomaticallyCancel: Bool
-
-    fileprivate init(request: DownloadRequest, task: Task<AFDownloadResponse<Value>, Never>, shouldAutomaticallyCancel: Bool) {
-        self.request = request
-        self.task = task
-        self.shouldAutomaticallyCancel = shouldAutomaticallyCancel
-    }
-
-    /// Cancel the underlying `DownloadRequest` and `Task`.
-    public func cancel() {
-        task.cancel()
-    }
-
-    /// Resume the underlying `DownloadRequest`.
-    public func resume() {
-        request.resume()
-    }
-
-    /// Suspend the underlying `DownloadRequest`.
-    public func suspend() {
-        request.suspend()
-    }
-}
-
-@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
-extension DownloadRequest {
-    /// Creates a `DownloadTask` to `await` a `Data` value.
-    ///
-    /// - Parameters:
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DownloadTask`'s async
-    ///                                properties. `false` by default.
-    ///   - dataPreprocessor:          `DataPreprocessor` which processes the received `Data` before completion.
-    ///   - emptyResponseCodes:        HTTP response codes for which empty responses are allowed. `[204, 205]` by default.
-    ///   - emptyRequestMethods:       `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///
-    /// - Returns:                   The `DownloadTask`.
-    public func serializingData(automaticallyCancelling shouldAutomaticallyCancel: Bool = false,
-                                dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor,
-                                emptyResponseCodes: Set<Int> = DataResponseSerializer.defaultEmptyResponseCodes,
-                                emptyRequestMethods: Set<HTTPMethod> = DataResponseSerializer.defaultEmptyRequestMethods) -> DownloadTask<Data> {
-        serializingDownload(using: DataResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                          emptyResponseCodes: emptyResponseCodes,
-                                                          emptyRequestMethods: emptyRequestMethods),
-                            automaticallyCancelling: shouldAutomaticallyCancel)
-    }
-
-    /// Creates a `DownloadTask` to `await` serialization of a `Decodable` value.
-    ///
-    /// - Note: This serializer reads the entire response into memory before parsing.
-    ///
-    /// - Parameters:
-    ///   - type:                      `Decodable` type to decode from response data.
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DownloadTask`'s async
-    ///                                properties. `false` by default.
-    ///   - dataPreprocessor:          `DataPreprocessor` which processes the received `Data` before calling the serializer.
-    ///                                `PassthroughPreprocessor()` by default.
-    ///   - decoder:                   `DataDecoder` to use to decode the response. `JSONDecoder()` by default.
-    ///   - emptyResponseCodes:        HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods:       `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///
-    /// - Returns:                   The `DownloadTask`.
-    public func serializingDecodable<Value: Decodable>(_ type: Value.Type = Value.self,
-                                                       automaticallyCancelling shouldAutomaticallyCancel: Bool = false,
-                                                       dataPreprocessor: DataPreprocessor = DecodableResponseSerializer<Value>.defaultDataPreprocessor,
-                                                       decoder: DataDecoder = JSONDecoder(),
-                                                       emptyResponseCodes: Set<Int> = DecodableResponseSerializer<Value>.defaultEmptyResponseCodes,
-                                                       emptyRequestMethods: Set<HTTPMethod> = DecodableResponseSerializer<Value>.defaultEmptyRequestMethods) -> DownloadTask<Value> {
-        serializingDownload(using: DecodableResponseSerializer<Value>(dataPreprocessor: dataPreprocessor,
-                                                                      decoder: decoder,
-                                                                      emptyResponseCodes: emptyResponseCodes,
-                                                                      emptyRequestMethods: emptyRequestMethods),
-                            automaticallyCancelling: shouldAutomaticallyCancel)
-    }
-
-    /// Creates a `DownloadTask` to `await` serialization of the downloaded file's `URL` on disk.
-    ///
-    /// - Parameters:
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DownloadTask`'s async
-    ///                                properties. `false` by default.
-    ///
-    /// - Returns: The `DownloadTask`.
-    public func serializingDownloadedFileURL(automaticallyCancelling shouldAutomaticallyCancel: Bool = false) -> DownloadTask<URL> {
-        serializingDownload(using: URLResponseSerializer(),
-                            automaticallyCancelling: shouldAutomaticallyCancel)
-    }
-
-    /// Creates a `DownloadTask` to `await` serialization of a `String` value.
-    ///
-    /// - Parameters:
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DownloadTask`'s async
-    ///                                properties. `false` by default.
-    ///   - dataPreprocessor:          `DataPreprocessor` which processes the received `Data` before calling the
-    ///                                serializer. `PassthroughPreprocessor()` by default.
-    ///   - encoding:                  `String.Encoding` to use during serialization. Defaults to `nil`, in which case
-    ///                                the encoding will be determined from the server response, falling back to the
-    ///                                default HTTP character set, `ISO-8859-1`.
-    ///   - emptyResponseCodes:        HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods:       `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///
-    /// - Returns:                   The `DownloadTask`.
-    public func serializingString(automaticallyCancelling shouldAutomaticallyCancel: Bool = false,
-                                  dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor,
-                                  encoding: String.Encoding? = nil,
-                                  emptyResponseCodes: Set<Int> = StringResponseSerializer.defaultEmptyResponseCodes,
-                                  emptyRequestMethods: Set<HTTPMethod> = StringResponseSerializer.defaultEmptyRequestMethods) -> DownloadTask<String> {
-        serializingDownload(using: StringResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                            encoding: encoding,
-                                                            emptyResponseCodes: emptyResponseCodes,
-                                                            emptyRequestMethods: emptyRequestMethods),
-                            automaticallyCancelling: shouldAutomaticallyCancel)
-    }
-
-    /// Creates a `DownloadTask` to `await` serialization using the provided `ResponseSerializer` instance.
-    ///
-    /// - Parameters:
-    ///   - serializer:                `ResponseSerializer` responsible for serializing the request, response, and data.
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DownloadTask`'s async
-    ///                                properties. `false` by default.
-    ///
-    /// - Returns: The `DownloadTask`.
-    public func serializingDownload<Serializer: ResponseSerializer>(using serializer: Serializer,
-                                                                    automaticallyCancelling shouldAutomaticallyCancel: Bool = false)
-        -> DownloadTask<Serializer.SerializedObject> {
-        downloadTask(automaticallyCancelling: shouldAutomaticallyCancel) {
-            self.response(queue: .singleEventQueue,
-                          responseSerializer: serializer,
-                          completionHandler: $0)
-        }
-    }
-
-    /// Creates a `DownloadTask` to `await` serialization using the provided `DownloadResponseSerializerProtocol`
-    /// instance.
-    ///
-    /// - Parameters:
-    ///   - serializer:                `DownloadResponseSerializerProtocol` responsible for serializing the request,
-    ///                                response, and data.
-    ///   - shouldAutomaticallyCancel: `Bool` determining whether or not the request should be cancelled when the
-    ///                                enclosing async context is cancelled. Only applies to `DownloadTask`'s async
-    ///                                properties. `false` by default.
-    ///
-    /// - Returns: The `DownloadTask`.
-    public func serializingDownload<Serializer: DownloadResponseSerializerProtocol>(using serializer: Serializer,
-                                                                                    automaticallyCancelling shouldAutomaticallyCancel: Bool = false)
-        -> DownloadTask<Serializer.SerializedObject> {
-        downloadTask(automaticallyCancelling: shouldAutomaticallyCancel) {
-            self.response(queue: .singleEventQueue,
-                          responseSerializer: serializer,
-                          completionHandler: $0)
-        }
-    }
-
-    private func downloadTask<Value>(automaticallyCancelling shouldAutomaticallyCancel: Bool,
-                                     forResponse onResponse: @escaping (@escaping (DownloadResponse<Value, AFError>) -> Void) -> Void)
-        -> DownloadTask<Value> {
-        let task = Task {
-            await withTaskCancellationHandler {
-                await withCheckedContinuation { continuation in
-                    onResponse {
-                        continuation.resume(returning: $0)
-                    }
-                }
-            } onCancel: {
-                self.cancel()
-            }
-        }
-
-        return DownloadTask<Value>(request: self, task: task, shouldAutomaticallyCancel: shouldAutomaticallyCancel)
-    }
-}
-
-// MARK: - DataStreamTask
-
-@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
-public struct DataStreamTask {
-    // Type of created streams.
-    public typealias Stream<Success, Failure: Error> = StreamOf<DataStreamRequest.Stream<Success, Failure>>
-
-    private let request: DataStreamRequest
-
-    fileprivate init(request: DataStreamRequest) {
-        self.request = request
-    }
-
-    /// Creates a `Stream` of `Data` values from the underlying `DataStreamRequest`.
-    ///
-    /// - Parameters:
-    ///   - shouldAutomaticallyCancel: `Bool` indicating whether the underlying `DataStreamRequest` should be canceled
-    ///                                which observation of the stream stops. `true` by default.
-    ///   - bufferingPolicy: `         BufferingPolicy` that determines the stream's buffering behavior.`.unbounded` by default.
-    ///
-    /// - Returns:                   The `Stream`.
-    public func streamingData(automaticallyCancelling shouldAutomaticallyCancel: Bool = true, bufferingPolicy: Stream<Data, Never>.BufferingPolicy = .unbounded) -> Stream<Data, Never> {
-        createStream(automaticallyCancelling: shouldAutomaticallyCancel, bufferingPolicy: bufferingPolicy) { onStream in
-            self.request.responseStream(on: .streamCompletionQueue(forRequestID: request.id), stream: onStream)
-        }
-    }
-
-    /// Creates a `Stream` of `UTF-8` `String`s from the underlying `DataStreamRequest`.
-    ///
-    /// - Parameters:
-    ///   - shouldAutomaticallyCancel: `Bool` indicating whether the underlying `DataStreamRequest` should be canceled
-    ///                                which observation of the stream stops. `true` by default.
-    ///   - bufferingPolicy: `         BufferingPolicy` that determines the stream's buffering behavior.`.unbounded` by default.
-    /// - Returns:
-    public func streamingStrings(automaticallyCancelling shouldAutomaticallyCancel: Bool = true, bufferingPolicy: Stream<String, Never>.BufferingPolicy = .unbounded) -> Stream<String, Never> {
-        createStream(automaticallyCancelling: shouldAutomaticallyCancel, bufferingPolicy: bufferingPolicy) { onStream in
-            self.request.responseStreamString(on: .streamCompletionQueue(forRequestID: request.id), stream: onStream)
-        }
-    }
-
-    /// Creates a `Stream` of `Decodable` values from the underlying `DataStreamRequest`.
-    ///
-    /// - Parameters:
-    ///   - type:                      `Decodable` type to be serialized from stream payloads.
-    ///   - shouldAutomaticallyCancel: `Bool` indicating whether the underlying `DataStreamRequest` should be canceled
-    ///                                which observation of the stream stops. `true` by default.
-    ///   - bufferingPolicy:           `BufferingPolicy` that determines the stream's buffering behavior.`.unbounded` by default.
-    ///
-    /// - Returns:            The `Stream`.
-    public func streamingDecodables<T>(_ type: T.Type = T.self,
-                                       automaticallyCancelling shouldAutomaticallyCancel: Bool = true,
-                                       bufferingPolicy: Stream<T, AFError>.BufferingPolicy = .unbounded)
-        -> Stream<T, AFError> where T: Decodable {
-        streamingResponses(serializedUsing: DecodableStreamSerializer<T>(),
-                           automaticallyCancelling: shouldAutomaticallyCancel,
-                           bufferingPolicy: bufferingPolicy)
-    }
-
-    /// Creates a `Stream` of values using the provided `DataStreamSerializer` from the underlying `DataStreamRequest`.
-    ///
-    /// - Parameters:
-    ///   - serializer:                `DataStreamSerializer` to use to serialize incoming `Data`.
-    ///   - shouldAutomaticallyCancel: `Bool` indicating whether the underlying `DataStreamRequest` should be canceled
-    ///                                which observation of the stream stops. `true` by default.
-    ///   - bufferingPolicy:           `BufferingPolicy` that determines the stream's buffering behavior.`.unbounded` by default.
-    ///
-    /// - Returns:           The `Stream`.
-    public func streamingResponses<Serializer: DataStreamSerializer>(serializedUsing serializer: Serializer,
-                                                                     automaticallyCancelling shouldAutomaticallyCancel: Bool = true,
-                                                                     bufferingPolicy: Stream<Serializer.SerializedObject, AFError>.BufferingPolicy = .unbounded)
-        -> Stream<Serializer.SerializedObject, AFError> {
-        createStream(automaticallyCancelling: shouldAutomaticallyCancel, bufferingPolicy: bufferingPolicy) { onStream in
-            self.request.responseStream(using: serializer,
-                                        on: .streamCompletionQueue(forRequestID: request.id),
-                                        stream: onStream)
-        }
-    }
-
-    private func createStream<Success, Failure: Error>(automaticallyCancelling shouldAutomaticallyCancel: Bool = true,
-                                                       bufferingPolicy: Stream<Success, Failure>.BufferingPolicy = .unbounded,
-                                                       forResponse onResponse: @escaping (@escaping (DataStreamRequest.Stream<Success, Failure>) -> Void) -> Void)
-        -> Stream<Success, Failure> {
-        StreamOf(bufferingPolicy: bufferingPolicy) {
-            guard shouldAutomaticallyCancel,
-                  request.isInitialized || request.isResumed || request.isSuspended else { return }
-
-            cancel()
-        } builder: { continuation in
-            onResponse { stream in
-                continuation.yield(stream)
-                if case .complete = stream.event {
-                    continuation.finish()
-                }
-            }
-        }
-    }
-
-    /// Cancel the underlying `DataStreamRequest`.
-    public func cancel() {
-        request.cancel()
-    }
-
-    /// Resume the underlying `DataStreamRequest`.
-    public func resume() {
-        request.resume()
-    }
-
-    /// Suspend the underlying `DataStreamRequest`.
-    public func suspend() {
-        request.suspend()
-    }
-}
-
-@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
-extension DataStreamRequest {
-    /// Creates a `DataStreamTask` used to `await` streams of serialized values.
-    ///
-    /// - Returns: The `DataStreamTask`.
-    public func streamTask() -> DataStreamTask {
-        DataStreamTask(request: self)
-    }
-}
-
-extension DispatchQueue {
-    fileprivate static let singleEventQueue = DispatchQueue(label: "org.alamofire.concurrencySingleEventQueue",
-                                                            attributes: .concurrent)
-
-    fileprivate static func streamCompletionQueue(forRequestID id: UUID) -> DispatchQueue {
-        DispatchQueue(label: "org.alamofire.concurrencyStreamCompletionQueue-\(id)", target: .singleEventQueue)
-    }
-}
-
-/// An asynchronous sequence generated from an underlying `AsyncStream`. Only produced by Alamofire.
-@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
-public struct StreamOf<Element>: AsyncSequence {
-    public typealias AsyncIterator = Iterator
-    public typealias BufferingPolicy = AsyncStream<Element>.Continuation.BufferingPolicy
-    fileprivate typealias Continuation = AsyncStream<Element>.Continuation
-
-    private let bufferingPolicy: BufferingPolicy
-    private let onTermination: (() -> Void)?
-    private let builder: (Continuation) -> Void
-
-    fileprivate init(bufferingPolicy: BufferingPolicy = .unbounded,
-                     onTermination: (() -> Void)? = nil,
-                     builder: @escaping (Continuation) -> Void) {
-        self.bufferingPolicy = bufferingPolicy
-        self.onTermination = onTermination
-        self.builder = builder
-    }
-
-    public func makeAsyncIterator() -> Iterator {
-        var continuation: AsyncStream<Element>.Continuation?
-        let stream = AsyncStream<Element> { innerContinuation in
-            continuation = innerContinuation
-            builder(innerContinuation)
-        }
-
-        return Iterator(iterator: stream.makeAsyncIterator()) {
-            continuation?.finish()
-            self.onTermination?()
-        }
-    }
-
-    public struct Iterator: AsyncIteratorProtocol {
-        private final class Token {
-            private let onDeinit: () -> Void
-
-            init(onDeinit: @escaping () -> Void) {
-                self.onDeinit = onDeinit
-            }
-
-            deinit {
-                onDeinit()
-            }
-        }
-
-        private var iterator: AsyncStream<Element>.AsyncIterator
-        private let token: Token
-
-        init(iterator: AsyncStream<Element>.AsyncIterator, onCancellation: @escaping () -> Void) {
-            self.iterator = iterator
-            token = Token(onDeinit: onCancellation)
-        }
-
-        public mutating func next() async -> Element? {
-            await iterator.next()
-        }
-    }
-}
-
-#endif

+ 0 - 37
Pods/Alamofire/Source/DispatchQueue+Alamofire.swift

@@ -1,37 +0,0 @@
-//
-//  DispatchQueue+Alamofire.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 Dispatch
-import Foundation
-
-extension DispatchQueue {
-    /// Execute the provided closure after a `TimeInterval`.
-    ///
-    /// - Parameters:
-    ///   - delay:   `TimeInterval` to delay execution.
-    ///   - closure: Closure to execute.
-    func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) {
-        asyncAfter(deadline: .now() + delay, execute: closure)
-    }
-}

+ 0 - 892
Pods/Alamofire/Source/EventMonitor.swift

@@ -1,892 +0,0 @@
-//
-//  EventMonitor.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// Protocol outlining the lifetime events inside Alamofire. It includes both events received from the various
-/// `URLSession` delegate protocols as well as various events from the lifetime of `Request` and its subclasses.
-public protocol EventMonitor {
-    /// The `DispatchQueue` onto which Alamofire's root `CompositeEventMonitor` will dispatch events. `.main` by default.
-    var queue: DispatchQueue { get }
-
-    // MARK: - URLSession Events
-
-    // MARK: URLSessionDelegate Events
-
-    /// Event called during `URLSessionDelegate`'s `urlSession(_:didBecomeInvalidWithError:)` method.
-    func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?)
-
-    // MARK: URLSessionTaskDelegate Events
-
-    /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:didReceive:completionHandler:)` method.
-    func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge)
-
-    /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)` method.
-    func urlSession(_ session: URLSession,
-                    task: URLSessionTask,
-                    didSendBodyData bytesSent: Int64,
-                    totalBytesSent: Int64,
-                    totalBytesExpectedToSend: Int64)
-
-    /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:needNewBodyStream:)` method.
-    func urlSession(_ session: URLSession, taskNeedsNewBodyStream task: URLSessionTask)
-
-    /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` method.
-    func urlSession(_ session: URLSession,
-                    task: URLSessionTask,
-                    willPerformHTTPRedirection response: HTTPURLResponse,
-                    newRequest request: URLRequest)
-
-    /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:didFinishCollecting:)` method.
-    func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics)
-
-    /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:didCompleteWithError:)` method.
-    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?)
-
-    /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:taskIsWaitingForConnectivity:)` method.
-    @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *)
-    func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask)
-
-    // MARK: URLSessionDataDelegate Events
-
-    /// Event called during `URLSessionDataDelegate`'s `urlSession(_:dataTask:didReceive:)` method.
-    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data)
-
-    /// Event called during `URLSessionDataDelegate`'s `urlSession(_:dataTask:willCacheResponse:completionHandler:)` method.
-    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse)
-
-    // MARK: URLSessionDownloadDelegate Events
-
-    /// Event called during `URLSessionDownloadDelegate`'s `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)` method.
-    func urlSession(_ session: URLSession,
-                    downloadTask: URLSessionDownloadTask,
-                    didResumeAtOffset fileOffset: Int64,
-                    expectedTotalBytes: Int64)
-
-    /// Event called during `URLSessionDownloadDelegate`'s `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)` method.
-    func urlSession(_ session: URLSession,
-                    downloadTask: URLSessionDownloadTask,
-                    didWriteData bytesWritten: Int64,
-                    totalBytesWritten: Int64,
-                    totalBytesExpectedToWrite: Int64)
-
-    /// Event called during `URLSessionDownloadDelegate`'s `urlSession(_:downloadTask:didFinishDownloadingTo:)` method.
-    func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL)
-
-    // MARK: - Request Events
-
-    /// Event called when a `URLRequest` is first created for a `Request`. If a `RequestAdapter` is active, the
-    /// `URLRequest` will be adapted before being issued.
-    func request(_ request: Request, didCreateInitialURLRequest urlRequest: URLRequest)
-
-    /// Event called when the attempt to create a `URLRequest` from a `Request`'s original `URLRequestConvertible` value fails.
-    func request(_ request: Request, didFailToCreateURLRequestWithError error: AFError)
-
-    /// Event called when a `RequestAdapter` adapts the `Request`'s initial `URLRequest`.
-    func request(_ request: Request, didAdaptInitialRequest initialRequest: URLRequest, to adaptedRequest: URLRequest)
-
-    /// Event called when a `RequestAdapter` fails to adapt the `Request`'s initial `URLRequest`.
-    func request(_ request: Request, didFailToAdaptURLRequest initialRequest: URLRequest, withError error: AFError)
-
-    /// Event called when a final `URLRequest` is created for a `Request`.
-    func request(_ request: Request, didCreateURLRequest urlRequest: URLRequest)
-
-    /// Event called when a `URLSessionTask` subclass instance is created for a `Request`.
-    func request(_ request: Request, didCreateTask task: URLSessionTask)
-
-    /// Event called when a `Request` receives a `URLSessionTaskMetrics` value.
-    func request(_ request: Request, didGatherMetrics metrics: URLSessionTaskMetrics)
-
-    /// Event called when a `Request` fails due to an error created by Alamofire. e.g. When certificate pinning fails.
-    func request(_ request: Request, didFailTask task: URLSessionTask, earlyWithError error: AFError)
-
-    /// Event called when a `Request`'s task completes, possibly with an error. A `Request` may receive this event
-    /// multiple times if it is retried.
-    func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?)
-
-    /// Event called when a `Request` is about to be retried.
-    func requestIsRetrying(_ request: Request)
-
-    /// Event called when a `Request` finishes and response serializers are being called.
-    func requestDidFinish(_ request: Request)
-
-    /// Event called when a `Request` receives a `resume` call.
-    func requestDidResume(_ request: Request)
-
-    /// Event called when a `Request`'s associated `URLSessionTask` is resumed.
-    func request(_ request: Request, didResumeTask task: URLSessionTask)
-
-    /// Event called when a `Request` receives a `suspend` call.
-    func requestDidSuspend(_ request: Request)
-
-    /// Event called when a `Request`'s associated `URLSessionTask` is suspended.
-    func request(_ request: Request, didSuspendTask task: URLSessionTask)
-
-    /// Event called when a `Request` receives a `cancel` call.
-    func requestDidCancel(_ request: Request)
-
-    /// Event called when a `Request`'s associated `URLSessionTask` is cancelled.
-    func request(_ request: Request, didCancelTask task: URLSessionTask)
-
-    // MARK: DataRequest Events
-
-    /// Event called when a `DataRequest` calls a `Validation`.
-    func request(_ request: DataRequest,
-                 didValidateRequest urlRequest: URLRequest?,
-                 response: HTTPURLResponse,
-                 data: Data?,
-                 withResult result: Request.ValidationResult)
-
-    /// Event called when a `DataRequest` creates a `DataResponse<Data?>` value without calling a `ResponseSerializer`.
-    func request(_ request: DataRequest, didParseResponse response: DataResponse<Data?, AFError>)
-
-    /// Event called when a `DataRequest` calls a `ResponseSerializer` and creates a generic `DataResponse<Value, AFError>`.
-    func request<Value>(_ request: DataRequest, didParseResponse response: DataResponse<Value, AFError>)
-
-    // MARK: DataStreamRequest Events
-
-    /// Event called when a `DataStreamRequest` calls a `Validation` closure.
-    ///
-    /// - Parameters:
-    ///   - request:    `DataStreamRequest` which is calling the `Validation`.
-    ///   - urlRequest: `URLRequest` of the request being validated.
-    ///   - response:   `HTTPURLResponse` of the request being validated.
-    ///   - result:      Produced `ValidationResult`.
-    func request(_ request: DataStreamRequest,
-                 didValidateRequest urlRequest: URLRequest?,
-                 response: HTTPURLResponse,
-                 withResult result: Request.ValidationResult)
-
-    /// Event called when a `DataStreamSerializer` produces a value from streamed `Data`.
-    ///
-    /// - Parameters:
-    ///   - request: `DataStreamRequest` for which the value was serialized.
-    ///   - result:  `Result` of the serialization attempt.
-    func request<Value>(_ request: DataStreamRequest, didParseStream result: Result<Value, AFError>)
-
-    // MARK: UploadRequest Events
-
-    /// Event called when an `UploadRequest` creates its `Uploadable` value, indicating the type of upload it represents.
-    func request(_ request: UploadRequest, didCreateUploadable uploadable: UploadRequest.Uploadable)
-
-    /// Event called when an `UploadRequest` failed to create its `Uploadable` value due to an error.
-    func request(_ request: UploadRequest, didFailToCreateUploadableWithError error: AFError)
-
-    /// Event called when an `UploadRequest` provides the `InputStream` from its `Uploadable` value. This only occurs if
-    /// the `InputStream` does not wrap a `Data` value or file `URL`.
-    func request(_ request: UploadRequest, didProvideInputStream stream: InputStream)
-
-    // MARK: DownloadRequest Events
-
-    /// Event called when a `DownloadRequest`'s `URLSessionDownloadTask` finishes and the temporary file has been moved.
-    func request(_ request: DownloadRequest, didFinishDownloadingUsing task: URLSessionTask, with result: Result<URL, AFError>)
-
-    /// Event called when a `DownloadRequest`'s `Destination` closure is called and creates the destination URL the
-    /// downloaded file will be moved to.
-    func request(_ request: DownloadRequest, didCreateDestinationURL url: URL)
-
-    /// Event called when a `DownloadRequest` calls a `Validation`.
-    func request(_ request: DownloadRequest,
-                 didValidateRequest urlRequest: URLRequest?,
-                 response: HTTPURLResponse,
-                 fileURL: URL?,
-                 withResult result: Request.ValidationResult)
-
-    /// Event called when a `DownloadRequest` creates a `DownloadResponse<URL?, AFError>` without calling a `ResponseSerializer`.
-    func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse<URL?, AFError>)
-
-    /// Event called when a `DownloadRequest` calls a `DownloadResponseSerializer` and creates a generic `DownloadResponse<Value, AFError>`
-    func request<Value>(_ request: DownloadRequest, didParseResponse response: DownloadResponse<Value, AFError>)
-}
-
-extension EventMonitor {
-    /// The default queue on which `CompositeEventMonitor`s will call the `EventMonitor` methods. `.main` by default.
-    public var queue: DispatchQueue { .main }
-
-    // MARK: Default Implementations
-
-    public func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) {}
-    public func urlSession(_ session: URLSession,
-                           task: URLSessionTask,
-                           didReceive challenge: URLAuthenticationChallenge) {}
-    public func urlSession(_ session: URLSession,
-                           task: URLSessionTask,
-                           didSendBodyData bytesSent: Int64,
-                           totalBytesSent: Int64,
-                           totalBytesExpectedToSend: Int64) {}
-    public func urlSession(_ session: URLSession, taskNeedsNewBodyStream task: URLSessionTask) {}
-    public func urlSession(_ session: URLSession,
-                           task: URLSessionTask,
-                           willPerformHTTPRedirection response: HTTPURLResponse,
-                           newRequest request: URLRequest) {}
-    public func urlSession(_ session: URLSession,
-                           task: URLSessionTask,
-                           didFinishCollecting metrics: URLSessionTaskMetrics) {}
-    public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {}
-    public func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) {}
-    public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {}
-    public func urlSession(_ session: URLSession,
-                           dataTask: URLSessionDataTask,
-                           willCacheResponse proposedResponse: CachedURLResponse) {}
-    public func urlSession(_ session: URLSession,
-                           downloadTask: URLSessionDownloadTask,
-                           didResumeAtOffset fileOffset: Int64,
-                           expectedTotalBytes: Int64) {}
-    public func urlSession(_ session: URLSession,
-                           downloadTask: URLSessionDownloadTask,
-                           didWriteData bytesWritten: Int64,
-                           totalBytesWritten: Int64,
-                           totalBytesExpectedToWrite: Int64) {}
-    public func urlSession(_ session: URLSession,
-                           downloadTask: URLSessionDownloadTask,
-                           didFinishDownloadingTo location: URL) {}
-    public func request(_ request: Request, didCreateInitialURLRequest urlRequest: URLRequest) {}
-    public func request(_ request: Request, didFailToCreateURLRequestWithError error: AFError) {}
-    public func request(_ request: Request,
-                        didAdaptInitialRequest initialRequest: URLRequest,
-                        to adaptedRequest: URLRequest) {}
-    public func request(_ request: Request,
-                        didFailToAdaptURLRequest initialRequest: URLRequest,
-                        withError error: AFError) {}
-    public func request(_ request: Request, didCreateURLRequest urlRequest: URLRequest) {}
-    public func request(_ request: Request, didCreateTask task: URLSessionTask) {}
-    public func request(_ request: Request, didGatherMetrics metrics: URLSessionTaskMetrics) {}
-    public func request(_ request: Request, didFailTask task: URLSessionTask, earlyWithError error: AFError) {}
-    public func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) {}
-    public func requestIsRetrying(_ request: Request) {}
-    public func requestDidFinish(_ request: Request) {}
-    public func requestDidResume(_ request: Request) {}
-    public func request(_ request: Request, didResumeTask task: URLSessionTask) {}
-    public func requestDidSuspend(_ request: Request) {}
-    public func request(_ request: Request, didSuspendTask task: URLSessionTask) {}
-    public func requestDidCancel(_ request: Request) {}
-    public func request(_ request: Request, didCancelTask task: URLSessionTask) {}
-    public func request(_ request: DataRequest,
-                        didValidateRequest urlRequest: URLRequest?,
-                        response: HTTPURLResponse,
-                        data: Data?,
-                        withResult result: Request.ValidationResult) {}
-    public func request(_ request: DataRequest, didParseResponse response: DataResponse<Data?, AFError>) {}
-    public func request<Value>(_ request: DataRequest, didParseResponse response: DataResponse<Value, AFError>) {}
-    public func request(_ request: DataStreamRequest,
-                        didValidateRequest urlRequest: URLRequest?,
-                        response: HTTPURLResponse,
-                        withResult result: Request.ValidationResult) {}
-    public func request<Value>(_ request: DataStreamRequest, didParseStream result: Result<Value, AFError>) {}
-    public func request(_ request: UploadRequest, didCreateUploadable uploadable: UploadRequest.Uploadable) {}
-    public func request(_ request: UploadRequest, didFailToCreateUploadableWithError error: AFError) {}
-    public func request(_ request: UploadRequest, didProvideInputStream stream: InputStream) {}
-    public func request(_ request: DownloadRequest, didFinishDownloadingUsing task: URLSessionTask, with result: Result<URL, AFError>) {}
-    public func request(_ request: DownloadRequest, didCreateDestinationURL url: URL) {}
-    public func request(_ request: DownloadRequest,
-                        didValidateRequest urlRequest: URLRequest?,
-                        response: HTTPURLResponse,
-                        fileURL: URL?,
-                        withResult result: Request.ValidationResult) {}
-    public func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse<URL?, AFError>) {}
-    public func request<Value>(_ request: DownloadRequest, didParseResponse response: DownloadResponse<Value, AFError>) {}
-}
-
-/// An `EventMonitor` which can contain multiple `EventMonitor`s and calls their methods on their queues.
-public final class CompositeEventMonitor: EventMonitor {
-    public let queue = DispatchQueue(label: "org.alamofire.compositeEventMonitor", qos: .utility)
-
-    let monitors: [EventMonitor]
-
-    init(monitors: [EventMonitor]) {
-        self.monitors = monitors
-    }
-
-    func performEvent(_ event: @escaping (EventMonitor) -> Void) {
-        queue.async {
-            for monitor in self.monitors {
-                monitor.queue.async { event(monitor) }
-            }
-        }
-    }
-
-    public func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) {
-        performEvent { $0.urlSession(session, didBecomeInvalidWithError: error) }
-    }
-
-    public func urlSession(_ session: URLSession,
-                           task: URLSessionTask,
-                           didReceive challenge: URLAuthenticationChallenge) {
-        performEvent { $0.urlSession(session, task: task, didReceive: challenge) }
-    }
-
-    public func urlSession(_ session: URLSession,
-                           task: URLSessionTask,
-                           didSendBodyData bytesSent: Int64,
-                           totalBytesSent: Int64,
-                           totalBytesExpectedToSend: Int64) {
-        performEvent {
-            $0.urlSession(session,
-                          task: task,
-                          didSendBodyData: bytesSent,
-                          totalBytesSent: totalBytesSent,
-                          totalBytesExpectedToSend: totalBytesExpectedToSend)
-        }
-    }
-
-    public func urlSession(_ session: URLSession, taskNeedsNewBodyStream task: URLSessionTask) {
-        performEvent {
-            $0.urlSession(session, taskNeedsNewBodyStream: task)
-        }
-    }
-
-    public func urlSession(_ session: URLSession,
-                           task: URLSessionTask,
-                           willPerformHTTPRedirection response: HTTPURLResponse,
-                           newRequest request: URLRequest) {
-        performEvent {
-            $0.urlSession(session,
-                          task: task,
-                          willPerformHTTPRedirection: response,
-                          newRequest: request)
-        }
-    }
-
-    public func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) {
-        performEvent { $0.urlSession(session, task: task, didFinishCollecting: metrics) }
-    }
-
-    public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
-        performEvent { $0.urlSession(session, task: task, didCompleteWithError: error) }
-    }
-
-    @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *)
-    public func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) {
-        performEvent { $0.urlSession(session, taskIsWaitingForConnectivity: task) }
-    }
-
-    public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
-        performEvent { $0.urlSession(session, dataTask: dataTask, didReceive: data) }
-    }
-
-    public func urlSession(_ session: URLSession,
-                           dataTask: URLSessionDataTask,
-                           willCacheResponse proposedResponse: CachedURLResponse) {
-        performEvent { $0.urlSession(session, dataTask: dataTask, willCacheResponse: proposedResponse) }
-    }
-
-    public func urlSession(_ session: URLSession,
-                           downloadTask: URLSessionDownloadTask,
-                           didResumeAtOffset fileOffset: Int64,
-                           expectedTotalBytes: Int64) {
-        performEvent {
-            $0.urlSession(session,
-                          downloadTask: downloadTask,
-                          didResumeAtOffset: fileOffset,
-                          expectedTotalBytes: expectedTotalBytes)
-        }
-    }
-
-    public func urlSession(_ session: URLSession,
-                           downloadTask: URLSessionDownloadTask,
-                           didWriteData bytesWritten: Int64,
-                           totalBytesWritten: Int64,
-                           totalBytesExpectedToWrite: Int64) {
-        performEvent {
-            $0.urlSession(session,
-                          downloadTask: downloadTask,
-                          didWriteData: bytesWritten,
-                          totalBytesWritten: totalBytesWritten,
-                          totalBytesExpectedToWrite: totalBytesExpectedToWrite)
-        }
-    }
-
-    public func urlSession(_ session: URLSession,
-                           downloadTask: URLSessionDownloadTask,
-                           didFinishDownloadingTo location: URL) {
-        performEvent { $0.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) }
-    }
-
-    public func request(_ request: Request, didCreateInitialURLRequest urlRequest: URLRequest) {
-        performEvent { $0.request(request, didCreateInitialURLRequest: urlRequest) }
-    }
-
-    public func request(_ request: Request, didFailToCreateURLRequestWithError error: AFError) {
-        performEvent { $0.request(request, didFailToCreateURLRequestWithError: error) }
-    }
-
-    public func request(_ request: Request, didAdaptInitialRequest initialRequest: URLRequest, to adaptedRequest: URLRequest) {
-        performEvent { $0.request(request, didAdaptInitialRequest: initialRequest, to: adaptedRequest) }
-    }
-
-    public func request(_ request: Request, didFailToAdaptURLRequest initialRequest: URLRequest, withError error: AFError) {
-        performEvent { $0.request(request, didFailToAdaptURLRequest: initialRequest, withError: error) }
-    }
-
-    public func request(_ request: Request, didCreateURLRequest urlRequest: URLRequest) {
-        performEvent { $0.request(request, didCreateURLRequest: urlRequest) }
-    }
-
-    public func request(_ request: Request, didCreateTask task: URLSessionTask) {
-        performEvent { $0.request(request, didCreateTask: task) }
-    }
-
-    public func request(_ request: Request, didGatherMetrics metrics: URLSessionTaskMetrics) {
-        performEvent { $0.request(request, didGatherMetrics: metrics) }
-    }
-
-    public func request(_ request: Request, didFailTask task: URLSessionTask, earlyWithError error: AFError) {
-        performEvent { $0.request(request, didFailTask: task, earlyWithError: error) }
-    }
-
-    public func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) {
-        performEvent { $0.request(request, didCompleteTask: task, with: error) }
-    }
-
-    public func requestIsRetrying(_ request: Request) {
-        performEvent { $0.requestIsRetrying(request) }
-    }
-
-    public func requestDidFinish(_ request: Request) {
-        performEvent { $0.requestDidFinish(request) }
-    }
-
-    public func requestDidResume(_ request: Request) {
-        performEvent { $0.requestDidResume(request) }
-    }
-
-    public func request(_ request: Request, didResumeTask task: URLSessionTask) {
-        performEvent { $0.request(request, didResumeTask: task) }
-    }
-
-    public func requestDidSuspend(_ request: Request) {
-        performEvent { $0.requestDidSuspend(request) }
-    }
-
-    public func request(_ request: Request, didSuspendTask task: URLSessionTask) {
-        performEvent { $0.request(request, didSuspendTask: task) }
-    }
-
-    public func requestDidCancel(_ request: Request) {
-        performEvent { $0.requestDidCancel(request) }
-    }
-
-    public func request(_ request: Request, didCancelTask task: URLSessionTask) {
-        performEvent { $0.request(request, didCancelTask: task) }
-    }
-
-    public func request(_ request: DataRequest,
-                        didValidateRequest urlRequest: URLRequest?,
-                        response: HTTPURLResponse,
-                        data: Data?,
-                        withResult result: Request.ValidationResult) {
-        performEvent { $0.request(request,
-                                  didValidateRequest: urlRequest,
-                                  response: response,
-                                  data: data,
-                                  withResult: result)
-        }
-    }
-
-    public func request(_ request: DataRequest, didParseResponse response: DataResponse<Data?, AFError>) {
-        performEvent { $0.request(request, didParseResponse: response) }
-    }
-
-    public func request<Value>(_ request: DataRequest, didParseResponse response: DataResponse<Value, AFError>) {
-        performEvent { $0.request(request, didParseResponse: response) }
-    }
-
-    public func request(_ request: DataStreamRequest,
-                        didValidateRequest urlRequest: URLRequest?,
-                        response: HTTPURLResponse,
-                        withResult result: Request.ValidationResult) {
-        performEvent { $0.request(request,
-                                  didValidateRequest: urlRequest,
-                                  response: response,
-                                  withResult: result)
-        }
-    }
-
-    public func request<Value>(_ request: DataStreamRequest, didParseStream result: Result<Value, AFError>) {
-        performEvent { $0.request(request, didParseStream: result) }
-    }
-
-    public func request(_ request: UploadRequest, didCreateUploadable uploadable: UploadRequest.Uploadable) {
-        performEvent { $0.request(request, didCreateUploadable: uploadable) }
-    }
-
-    public func request(_ request: UploadRequest, didFailToCreateUploadableWithError error: AFError) {
-        performEvent { $0.request(request, didFailToCreateUploadableWithError: error) }
-    }
-
-    public func request(_ request: UploadRequest, didProvideInputStream stream: InputStream) {
-        performEvent { $0.request(request, didProvideInputStream: stream) }
-    }
-
-    public func request(_ request: DownloadRequest, didFinishDownloadingUsing task: URLSessionTask, with result: Result<URL, AFError>) {
-        performEvent { $0.request(request, didFinishDownloadingUsing: task, with: result) }
-    }
-
-    public func request(_ request: DownloadRequest, didCreateDestinationURL url: URL) {
-        performEvent { $0.request(request, didCreateDestinationURL: url) }
-    }
-
-    public func request(_ request: DownloadRequest,
-                        didValidateRequest urlRequest: URLRequest?,
-                        response: HTTPURLResponse,
-                        fileURL: URL?,
-                        withResult result: Request.ValidationResult) {
-        performEvent { $0.request(request,
-                                  didValidateRequest: urlRequest,
-                                  response: response,
-                                  fileURL: fileURL,
-                                  withResult: result) }
-    }
-
-    public func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse<URL?, AFError>) {
-        performEvent { $0.request(request, didParseResponse: response) }
-    }
-
-    public func request<Value>(_ request: DownloadRequest, didParseResponse response: DownloadResponse<Value, AFError>) {
-        performEvent { $0.request(request, didParseResponse: response) }
-    }
-}
-
-/// `EventMonitor` that allows optional closures to be set to receive events.
-open class ClosureEventMonitor: EventMonitor {
-    /// Closure called on the `urlSession(_:didBecomeInvalidWithError:)` event.
-    open var sessionDidBecomeInvalidWithError: ((URLSession, Error?) -> Void)?
-
-    /// Closure called on the `urlSession(_:task:didReceive:completionHandler:)`.
-    open var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> Void)?
-
-    /// Closure that receives `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)` event.
-    open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)?
-
-    /// Closure called on the `urlSession(_:task:needNewBodyStream:)` event.
-    open var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> Void)?
-
-    /// Closure called on the `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` event.
-    open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> Void)?
-
-    /// Closure called on the `urlSession(_:task:didFinishCollecting:)` event.
-    open var taskDidFinishCollectingMetrics: ((URLSession, URLSessionTask, URLSessionTaskMetrics) -> Void)?
-
-    /// Closure called on the `urlSession(_:task:didCompleteWithError:)` event.
-    open var taskDidComplete: ((URLSession, URLSessionTask, Error?) -> Void)?
-
-    /// Closure called on the `urlSession(_:taskIsWaitingForConnectivity:)` event.
-    open var taskIsWaitingForConnectivity: ((URLSession, URLSessionTask) -> Void)?
-
-    /// Closure that receives the `urlSession(_:dataTask:didReceive:)` event.
-    open var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)?
-
-    /// Closure called on the `urlSession(_:dataTask:willCacheResponse:completionHandler:)` event.
-    open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> Void)?
-
-    /// Closure called on the `urlSession(_:downloadTask:didFinishDownloadingTo:)` event.
-    open var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> Void)?
-
-    /// Closure called on the `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)`
-    /// event.
-    open var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)?
-
-    /// Closure called on the `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)` event.
-    open var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)?
-
-    // MARK: - Request Events
-
-    /// Closure called on the `request(_:didCreateInitialURLRequest:)` event.
-    open var requestDidCreateInitialURLRequest: ((Request, URLRequest) -> Void)?
-
-    /// Closure called on the `request(_:didFailToCreateURLRequestWithError:)` event.
-    open var requestDidFailToCreateURLRequestWithError: ((Request, AFError) -> Void)?
-
-    /// Closure called on the `request(_:didAdaptInitialRequest:to:)` event.
-    open var requestDidAdaptInitialRequestToAdaptedRequest: ((Request, URLRequest, URLRequest) -> Void)?
-
-    /// Closure called on the `request(_:didFailToAdaptURLRequest:withError:)` event.
-    open var requestDidFailToAdaptURLRequestWithError: ((Request, URLRequest, AFError) -> Void)?
-
-    /// Closure called on the `request(_:didCreateURLRequest:)` event.
-    open var requestDidCreateURLRequest: ((Request, URLRequest) -> Void)?
-
-    /// Closure called on the `request(_:didCreateTask:)` event.
-    open var requestDidCreateTask: ((Request, URLSessionTask) -> Void)?
-
-    /// Closure called on the `request(_:didGatherMetrics:)` event.
-    open var requestDidGatherMetrics: ((Request, URLSessionTaskMetrics) -> Void)?
-
-    /// Closure called on the `request(_:didFailTask:earlyWithError:)` event.
-    open var requestDidFailTaskEarlyWithError: ((Request, URLSessionTask, AFError) -> Void)?
-
-    /// Closure called on the `request(_:didCompleteTask:with:)` event.
-    open var requestDidCompleteTaskWithError: ((Request, URLSessionTask, AFError?) -> Void)?
-
-    /// Closure called on the `requestIsRetrying(_:)` event.
-    open var requestIsRetrying: ((Request) -> Void)?
-
-    /// Closure called on the `requestDidFinish(_:)` event.
-    open var requestDidFinish: ((Request) -> Void)?
-
-    /// Closure called on the `requestDidResume(_:)` event.
-    open var requestDidResume: ((Request) -> Void)?
-
-    /// Closure called on the `request(_:didResumeTask:)` event.
-    open var requestDidResumeTask: ((Request, URLSessionTask) -> Void)?
-
-    /// Closure called on the `requestDidSuspend(_:)` event.
-    open var requestDidSuspend: ((Request) -> Void)?
-
-    /// Closure called on the `request(_:didSuspendTask:)` event.
-    open var requestDidSuspendTask: ((Request, URLSessionTask) -> Void)?
-
-    /// Closure called on the `requestDidCancel(_:)` event.
-    open var requestDidCancel: ((Request) -> Void)?
-
-    /// Closure called on the `request(_:didCancelTask:)` event.
-    open var requestDidCancelTask: ((Request, URLSessionTask) -> Void)?
-
-    /// Closure called on the `request(_:didValidateRequest:response:data:withResult:)` event.
-    open var requestDidValidateRequestResponseDataWithResult: ((DataRequest, URLRequest?, HTTPURLResponse, Data?, Request.ValidationResult) -> Void)?
-
-    /// Closure called on the `request(_:didParseResponse:)` event.
-    open var requestDidParseResponse: ((DataRequest, DataResponse<Data?, AFError>) -> Void)?
-
-    /// Closure called on the `request(_:didValidateRequest:response:withResult:)` event.
-    open var requestDidValidateRequestResponseWithResult: ((DataStreamRequest, URLRequest?, HTTPURLResponse, Request.ValidationResult) -> Void)?
-
-    /// Closure called on the `request(_:didCreateUploadable:)` event.
-    open var requestDidCreateUploadable: ((UploadRequest, UploadRequest.Uploadable) -> Void)?
-
-    /// Closure called on the `request(_:didFailToCreateUploadableWithError:)` event.
-    open var requestDidFailToCreateUploadableWithError: ((UploadRequest, AFError) -> Void)?
-
-    /// Closure called on the `request(_:didProvideInputStream:)` event.
-    open var requestDidProvideInputStream: ((UploadRequest, InputStream) -> Void)?
-
-    /// Closure called on the `request(_:didFinishDownloadingUsing:with:)` event.
-    open var requestDidFinishDownloadingUsingTaskWithResult: ((DownloadRequest, URLSessionTask, Result<URL, AFError>) -> Void)?
-
-    /// Closure called on the `request(_:didCreateDestinationURL:)` event.
-    open var requestDidCreateDestinationURL: ((DownloadRequest, URL) -> Void)?
-
-    /// Closure called on the `request(_:didValidateRequest:response:temporaryURL:destinationURL:withResult:)` event.
-    open var requestDidValidateRequestResponseFileURLWithResult: ((DownloadRequest, URLRequest?, HTTPURLResponse, URL?, Request.ValidationResult) -> Void)?
-
-    /// Closure called on the `request(_:didParseResponse:)` event.
-    open var requestDidParseDownloadResponse: ((DownloadRequest, DownloadResponse<URL?, AFError>) -> Void)?
-
-    public let queue: DispatchQueue
-
-    /// Creates an instance using the provided queue.
-    ///
-    /// - Parameter queue: `DispatchQueue` on which events will fired. `.main` by default.
-    public init(queue: DispatchQueue = .main) {
-        self.queue = queue
-    }
-
-    open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) {
-        sessionDidBecomeInvalidWithError?(session, error)
-    }
-
-    open func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge) {
-        taskDidReceiveChallenge?(session, task, challenge)
-    }
-
-    open func urlSession(_ session: URLSession,
-                         task: URLSessionTask,
-                         didSendBodyData bytesSent: Int64,
-                         totalBytesSent: Int64,
-                         totalBytesExpectedToSend: Int64) {
-        taskDidSendBodyData?(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend)
-    }
-
-    open func urlSession(_ session: URLSession, taskNeedsNewBodyStream task: URLSessionTask) {
-        taskNeedNewBodyStream?(session, task)
-    }
-
-    open func urlSession(_ session: URLSession,
-                         task: URLSessionTask,
-                         willPerformHTTPRedirection response: HTTPURLResponse,
-                         newRequest request: URLRequest) {
-        taskWillPerformHTTPRedirection?(session, task, response, request)
-    }
-
-    open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) {
-        taskDidFinishCollectingMetrics?(session, task, metrics)
-    }
-
-    open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
-        taskDidComplete?(session, task, error)
-    }
-
-    open func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) {
-        taskIsWaitingForConnectivity?(session, task)
-    }
-
-    open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
-        dataTaskDidReceiveData?(session, dataTask, data)
-    }
-
-    open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse) {
-        dataTaskWillCacheResponse?(session, dataTask, proposedResponse)
-    }
-
-    open func urlSession(_ session: URLSession,
-                         downloadTask: URLSessionDownloadTask,
-                         didResumeAtOffset fileOffset: Int64,
-                         expectedTotalBytes: Int64) {
-        downloadTaskDidResumeAtOffset?(session, downloadTask, fileOffset, expectedTotalBytes)
-    }
-
-    open func urlSession(_ session: URLSession,
-                         downloadTask: URLSessionDownloadTask,
-                         didWriteData bytesWritten: Int64,
-                         totalBytesWritten: Int64,
-                         totalBytesExpectedToWrite: Int64) {
-        downloadTaskDidWriteData?(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite)
-    }
-
-    open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) {
-        downloadTaskDidFinishDownloadingToURL?(session, downloadTask, location)
-    }
-
-    // MARK: Request Events
-
-    open func request(_ request: Request, didCreateInitialURLRequest urlRequest: URLRequest) {
-        requestDidCreateInitialURLRequest?(request, urlRequest)
-    }
-
-    open func request(_ request: Request, didFailToCreateURLRequestWithError error: AFError) {
-        requestDidFailToCreateURLRequestWithError?(request, error)
-    }
-
-    open func request(_ request: Request, didAdaptInitialRequest initialRequest: URLRequest, to adaptedRequest: URLRequest) {
-        requestDidAdaptInitialRequestToAdaptedRequest?(request, initialRequest, adaptedRequest)
-    }
-
-    open func request(_ request: Request, didFailToAdaptURLRequest initialRequest: URLRequest, withError error: AFError) {
-        requestDidFailToAdaptURLRequestWithError?(request, initialRequest, error)
-    }
-
-    open func request(_ request: Request, didCreateURLRequest urlRequest: URLRequest) {
-        requestDidCreateURLRequest?(request, urlRequest)
-    }
-
-    open func request(_ request: Request, didCreateTask task: URLSessionTask) {
-        requestDidCreateTask?(request, task)
-    }
-
-    open func request(_ request: Request, didGatherMetrics metrics: URLSessionTaskMetrics) {
-        requestDidGatherMetrics?(request, metrics)
-    }
-
-    open func request(_ request: Request, didFailTask task: URLSessionTask, earlyWithError error: AFError) {
-        requestDidFailTaskEarlyWithError?(request, task, error)
-    }
-
-    open func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) {
-        requestDidCompleteTaskWithError?(request, task, error)
-    }
-
-    open func requestIsRetrying(_ request: Request) {
-        requestIsRetrying?(request)
-    }
-
-    open func requestDidFinish(_ request: Request) {
-        requestDidFinish?(request)
-    }
-
-    open func requestDidResume(_ request: Request) {
-        requestDidResume?(request)
-    }
-
-    public func request(_ request: Request, didResumeTask task: URLSessionTask) {
-        requestDidResumeTask?(request, task)
-    }
-
-    open func requestDidSuspend(_ request: Request) {
-        requestDidSuspend?(request)
-    }
-
-    public func request(_ request: Request, didSuspendTask task: URLSessionTask) {
-        requestDidSuspendTask?(request, task)
-    }
-
-    open func requestDidCancel(_ request: Request) {
-        requestDidCancel?(request)
-    }
-
-    public func request(_ request: Request, didCancelTask task: URLSessionTask) {
-        requestDidCancelTask?(request, task)
-    }
-
-    open func request(_ request: DataRequest,
-                      didValidateRequest urlRequest: URLRequest?,
-                      response: HTTPURLResponse,
-                      data: Data?,
-                      withResult result: Request.ValidationResult) {
-        requestDidValidateRequestResponseDataWithResult?(request, urlRequest, response, data, result)
-    }
-
-    open func request(_ request: DataRequest, didParseResponse response: DataResponse<Data?, AFError>) {
-        requestDidParseResponse?(request, response)
-    }
-
-    public func request(_ request: DataStreamRequest, didValidateRequest urlRequest: URLRequest?, response: HTTPURLResponse, withResult result: Request.ValidationResult) {
-        requestDidValidateRequestResponseWithResult?(request, urlRequest, response, result)
-    }
-
-    open func request(_ request: UploadRequest, didCreateUploadable uploadable: UploadRequest.Uploadable) {
-        requestDidCreateUploadable?(request, uploadable)
-    }
-
-    open func request(_ request: UploadRequest, didFailToCreateUploadableWithError error: AFError) {
-        requestDidFailToCreateUploadableWithError?(request, error)
-    }
-
-    open func request(_ request: UploadRequest, didProvideInputStream stream: InputStream) {
-        requestDidProvideInputStream?(request, stream)
-    }
-
-    open func request(_ request: DownloadRequest, didFinishDownloadingUsing task: URLSessionTask, with result: Result<URL, AFError>) {
-        requestDidFinishDownloadingUsingTaskWithResult?(request, task, result)
-    }
-
-    open func request(_ request: DownloadRequest, didCreateDestinationURL url: URL) {
-        requestDidCreateDestinationURL?(request, url)
-    }
-
-    open func request(_ request: DownloadRequest,
-                      didValidateRequest urlRequest: URLRequest?,
-                      response: HTTPURLResponse,
-                      fileURL: URL?,
-                      withResult result: Request.ValidationResult) {
-        requestDidValidateRequestResponseFileURLWithResult?(request,
-                                                            urlRequest,
-                                                            response,
-                                                            fileURL,
-                                                            result)
-    }
-
-    open func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse<URL?, AFError>) {
-        requestDidParseDownloadResponse?(request, response)
-    }
-}

+ 0 - 447
Pods/Alamofire/Source/HTTPHeaders.swift

@@ -1,447 +0,0 @@
-//
-//  HTTPHeaders.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 order-preserving and case-insensitive representation of HTTP headers.
-public struct HTTPHeaders {
-    private var headers: [HTTPHeader] = []
-
-    /// Creates an empty instance.
-    public init() {}
-
-    /// Creates an instance from an array of `HTTPHeader`s. Duplicate case-insensitive names are collapsed into the last
-    /// name and value encountered.
-    public init(_ headers: [HTTPHeader]) {
-        self.init()
-
-        headers.forEach { update($0) }
-    }
-
-    /// Creates an instance from a `[String: String]`. Duplicate case-insensitive names are collapsed into the last name
-    /// and value encountered.
-    public init(_ dictionary: [String: String]) {
-        self.init()
-
-        dictionary.forEach { update(HTTPHeader(name: $0.key, value: $0.value)) }
-    }
-
-    /// Case-insensitively updates or appends an `HTTPHeader` into the instance using the provided `name` and `value`.
-    ///
-    /// - Parameters:
-    ///   - name:  The `HTTPHeader` name.
-    ///   - value: The `HTTPHeader value.
-    public mutating func add(name: String, value: String) {
-        update(HTTPHeader(name: name, value: value))
-    }
-
-    /// Case-insensitively updates or appends the provided `HTTPHeader` into the instance.
-    ///
-    /// - Parameter header: The `HTTPHeader` to update or append.
-    public mutating func add(_ header: HTTPHeader) {
-        update(header)
-    }
-
-    /// Case-insensitively updates or appends an `HTTPHeader` into the instance using the provided `name` and `value`.
-    ///
-    /// - Parameters:
-    ///   - name:  The `HTTPHeader` name.
-    ///   - value: The `HTTPHeader value.
-    public mutating func update(name: String, value: String) {
-        update(HTTPHeader(name: name, value: value))
-    }
-
-    /// Case-insensitively updates or appends the provided `HTTPHeader` into the instance.
-    ///
-    /// - Parameter header: The `HTTPHeader` to update or append.
-    public mutating func update(_ header: HTTPHeader) {
-        guard let index = headers.index(of: header.name) else {
-            headers.append(header)
-            return
-        }
-
-        headers.replaceSubrange(index...index, with: [header])
-    }
-
-    /// Case-insensitively removes an `HTTPHeader`, if it exists, from the instance.
-    ///
-    /// - Parameter name: The name of the `HTTPHeader` to remove.
-    public mutating func remove(name: String) {
-        guard let index = headers.index(of: name) else { return }
-
-        headers.remove(at: index)
-    }
-
-    /// Sort the current instance by header name, case insensitively.
-    public mutating func sort() {
-        headers.sort { $0.name.lowercased() < $1.name.lowercased() }
-    }
-
-    /// Returns an instance sorted by header name.
-    ///
-    /// - Returns: A copy of the current instance sorted by name.
-    public func sorted() -> HTTPHeaders {
-        var headers = self
-        headers.sort()
-
-        return headers
-    }
-
-    /// Case-insensitively find a header's value by name.
-    ///
-    /// - Parameter name: The name of the header to search for, case-insensitively.
-    ///
-    /// - Returns:        The value of header, if it exists.
-    public func value(for name: String) -> String? {
-        guard let index = headers.index(of: name) else { return nil }
-
-        return headers[index].value
-    }
-
-    /// Case-insensitively access the header with the given name.
-    ///
-    /// - Parameter name: The name of the header.
-    public subscript(_ name: String) -> String? {
-        get { value(for: name) }
-        set {
-            if let value = newValue {
-                update(name: name, value: value)
-            } else {
-                remove(name: name)
-            }
-        }
-    }
-
-    /// The dictionary representation of all headers.
-    ///
-    /// This representation does not preserve the current order of the instance.
-    public var dictionary: [String: String] {
-        let namesAndValues = headers.map { ($0.name, $0.value) }
-
-        return Dictionary(namesAndValues, uniquingKeysWith: { _, last in last })
-    }
-}
-
-extension HTTPHeaders: ExpressibleByDictionaryLiteral {
-    public init(dictionaryLiteral elements: (String, String)...) {
-        self.init()
-
-        elements.forEach { update(name: $0.0, value: $0.1) }
-    }
-}
-
-extension HTTPHeaders: ExpressibleByArrayLiteral {
-    public init(arrayLiteral elements: HTTPHeader...) {
-        self.init(elements)
-    }
-}
-
-extension HTTPHeaders: Sequence {
-    public func makeIterator() -> IndexingIterator<[HTTPHeader]> {
-        headers.makeIterator()
-    }
-}
-
-extension HTTPHeaders: Collection {
-    public var startIndex: Int {
-        headers.startIndex
-    }
-
-    public var endIndex: Int {
-        headers.endIndex
-    }
-
-    public subscript(position: Int) -> HTTPHeader {
-        headers[position]
-    }
-
-    public func index(after i: Int) -> Int {
-        headers.index(after: i)
-    }
-}
-
-extension HTTPHeaders: CustomStringConvertible {
-    public var description: String {
-        headers.map(\.description)
-            .joined(separator: "\n")
-    }
-}
-
-// MARK: - HTTPHeader
-
-/// A representation of a single HTTP header's name / value pair.
-public struct HTTPHeader: Hashable {
-    /// Name of the header.
-    public let name: String
-
-    /// Value of the header.
-    public let value: String
-
-    /// Creates an instance from the given `name` and `value`.
-    ///
-    /// - Parameters:
-    ///   - name:  The name of the header.
-    ///   - value: The value of the header.
-    public init(name: String, value: String) {
-        self.name = name
-        self.value = value
-    }
-}
-
-extension HTTPHeader: CustomStringConvertible {
-    public var description: String {
-        "\(name): \(value)"
-    }
-}
-
-extension HTTPHeader {
-    /// Returns an `Accept` header.
-    ///
-    /// - Parameter value: The `Accept` value.
-    /// - Returns:         The header.
-    public static func accept(_ value: String) -> HTTPHeader {
-        HTTPHeader(name: "Accept", value: value)
-    }
-
-    /// Returns an `Accept-Charset` header.
-    ///
-    /// - Parameter value: The `Accept-Charset` value.
-    /// - Returns:         The header.
-    public static func acceptCharset(_ value: String) -> HTTPHeader {
-        HTTPHeader(name: "Accept-Charset", value: value)
-    }
-
-    /// Returns an `Accept-Language` header.
-    ///
-    /// Alamofire offers a default Accept-Language header that accumulates and encodes the system's preferred languages.
-    /// Use `HTTPHeader.defaultAcceptLanguage`.
-    ///
-    /// - Parameter value: The `Accept-Language` value.
-    ///
-    /// - Returns:         The header.
-    public static func acceptLanguage(_ value: String) -> HTTPHeader {
-        HTTPHeader(name: "Accept-Language", value: value)
-    }
-
-    /// Returns an `Accept-Encoding` header.
-    ///
-    /// Alamofire offers a default accept encoding value that provides the most common values. Use
-    /// `HTTPHeader.defaultAcceptEncoding`.
-    ///
-    /// - Parameter value: The `Accept-Encoding` value.
-    ///
-    /// - Returns:         The header
-    public static func acceptEncoding(_ value: String) -> HTTPHeader {
-        HTTPHeader(name: "Accept-Encoding", value: value)
-    }
-
-    /// Returns a `Basic` `Authorization` header using the `username` and `password` provided.
-    ///
-    /// - Parameters:
-    ///   - username: The username of the header.
-    ///   - password: The password of the header.
-    ///
-    /// - Returns:    The header.
-    public static func authorization(username: String, password: String) -> HTTPHeader {
-        let credential = Data("\(username):\(password)".utf8).base64EncodedString()
-
-        return authorization("Basic \(credential)")
-    }
-
-    /// Returns a `Bearer` `Authorization` header using the `bearerToken` provided
-    ///
-    /// - Parameter bearerToken: The bearer token.
-    ///
-    /// - Returns:               The header.
-    public static func authorization(bearerToken: String) -> HTTPHeader {
-        authorization("Bearer \(bearerToken)")
-    }
-
-    /// Returns an `Authorization` header.
-    ///
-    /// Alamofire provides built-in methods to produce `Authorization` headers. For a Basic `Authorization` header use
-    /// `HTTPHeader.authorization(username:password:)`. For a Bearer `Authorization` header, use
-    /// `HTTPHeader.authorization(bearerToken:)`.
-    ///
-    /// - Parameter value: The `Authorization` value.
-    ///
-    /// - Returns:         The header.
-    public static func authorization(_ value: String) -> HTTPHeader {
-        HTTPHeader(name: "Authorization", value: value)
-    }
-
-    /// Returns a `Content-Disposition` header.
-    ///
-    /// - Parameter value: The `Content-Disposition` value.
-    ///
-    /// - Returns:         The header.
-    public static func contentDisposition(_ value: String) -> HTTPHeader {
-        HTTPHeader(name: "Content-Disposition", value: value)
-    }
-
-    /// Returns a `Content-Type` header.
-    ///
-    /// All Alamofire `ParameterEncoding`s and `ParameterEncoder`s set the `Content-Type` of the request, so it may not be necessary to manually
-    /// set this value.
-    ///
-    /// - Parameter value: The `Content-Type` value.
-    ///
-    /// - Returns:         The header.
-    public static func contentType(_ value: String) -> HTTPHeader {
-        HTTPHeader(name: "Content-Type", value: value)
-    }
-
-    /// Returns a `User-Agent` header.
-    ///
-    /// - Parameter value: The `User-Agent` value.
-    ///
-    /// - Returns:         The header.
-    public static func userAgent(_ value: String) -> HTTPHeader {
-        HTTPHeader(name: "User-Agent", value: value)
-    }
-}
-
-extension Array where Element == HTTPHeader {
-    /// Case-insensitively finds the index of an `HTTPHeader` with the provided name, if it exists.
-    func index(of name: String) -> Int? {
-        let lowercasedName = name.lowercased()
-        return firstIndex { $0.name.lowercased() == lowercasedName }
-    }
-}
-
-// MARK: - Defaults
-
-extension HTTPHeaders {
-    /// The default set of `HTTPHeaders` used by Alamofire. Includes `Accept-Encoding`, `Accept-Language`, and
-    /// `User-Agent`.
-    public static let `default`: HTTPHeaders = [.defaultAcceptEncoding,
-                                                .defaultAcceptLanguage,
-                                                .defaultUserAgent]
-}
-
-extension HTTPHeader {
-    /// Returns Alamofire's default `Accept-Encoding` header, appropriate for the encodings supported by particular OS
-    /// versions.
-    ///
-    /// See the [Accept-Encoding HTTP header documentation](https://tools.ietf.org/html/rfc7230#section-4.2.3) .
-    public static let defaultAcceptEncoding: HTTPHeader = {
-        let encodings: [String]
-        if #available(iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0, *) {
-            encodings = ["br", "gzip", "deflate"]
-        } else {
-            encodings = ["gzip", "deflate"]
-        }
-
-        return .acceptEncoding(encodings.qualityEncoded())
-    }()
-
-    /// Returns Alamofire's default `Accept-Language` header, generated by querying `Locale` for the user's
-    /// `preferredLanguages`.
-    ///
-    /// See the [Accept-Language HTTP header documentation](https://tools.ietf.org/html/rfc7231#section-5.3.5).
-    public static let defaultAcceptLanguage: HTTPHeader = .acceptLanguage(Locale.preferredLanguages.prefix(6).qualityEncoded())
-
-    /// Returns Alamofire's default `User-Agent` header.
-    ///
-    /// See the [User-Agent header documentation](https://tools.ietf.org/html/rfc7231#section-5.5.3).
-    ///
-    /// Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 13.0.0) Alamofire/5.0.0`
-    public static let defaultUserAgent: HTTPHeader = {
-        let info = Bundle.main.infoDictionary
-        let executable = (info?["CFBundleExecutable"] as? String) ??
-            (ProcessInfo.processInfo.arguments.first?.split(separator: "/").last.map(String.init)) ??
-            "Unknown"
-        let bundle = info?["CFBundleIdentifier"] as? String ?? "Unknown"
-        let appVersion = info?["CFBundleShortVersionString"] as? String ?? "Unknown"
-        let appBuild = info?["CFBundleVersion"] as? String ?? "Unknown"
-
-        let osNameVersion: String = {
-            let version = ProcessInfo.processInfo.operatingSystemVersion
-            let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)"
-            let osName: String = {
-                #if os(iOS)
-                #if targetEnvironment(macCatalyst)
-                return "macOS(Catalyst)"
-                #else
-                return "iOS"
-                #endif
-                #elseif os(watchOS)
-                return "watchOS"
-                #elseif os(tvOS)
-                return "tvOS"
-                #elseif os(macOS)
-                return "macOS"
-                #elseif os(Linux)
-                return "Linux"
-                #elseif os(Windows)
-                return "Windows"
-                #else
-                return "Unknown"
-                #endif
-            }()
-
-            return "\(osName) \(versionString)"
-        }()
-
-        let alamofireVersion = "Alamofire/\(version)"
-
-        let userAgent = "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)"
-
-        return .userAgent(userAgent)
-    }()
-}
-
-extension Collection where Element == String {
-    func qualityEncoded() -> String {
-        enumerated().map { index, encoding in
-            let quality = 1.0 - (Double(index) * 0.1)
-            return "\(encoding);q=\(quality)"
-        }.joined(separator: ", ")
-    }
-}
-
-// MARK: - System Type Extensions
-
-extension URLRequest {
-    /// Returns `allHTTPHeaderFields` as `HTTPHeaders`.
-    public var headers: HTTPHeaders {
-        get { allHTTPHeaderFields.map(HTTPHeaders.init) ?? HTTPHeaders() }
-        set { allHTTPHeaderFields = newValue.dictionary }
-    }
-}
-
-extension HTTPURLResponse {
-    /// Returns `allHeaderFields` as `HTTPHeaders`.
-    public var headers: HTTPHeaders {
-        (allHeaderFields as? [String: String]).map(HTTPHeaders.init) ?? HTTPHeaders()
-    }
-}
-
-extension URLSessionConfiguration {
-    /// Returns `httpAdditionalHeaders` as `HTTPHeaders`.
-    public var headers: HTTPHeaders {
-        get { (httpAdditionalHeaders as? [String: String]).map(HTTPHeaders.init) ?? HTTPHeaders() }
-        set { httpAdditionalHeaders = newValue.dictionary }
-    }
-}

+ 0 - 56
Pods/Alamofire/Source/HTTPMethod.swift

@@ -1,56 +0,0 @@
-//
-//  HTTPMethod.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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.
-//
-
-/// Type representing HTTP methods. Raw `String` value is stored and compared case-sensitively, so
-/// `HTTPMethod.get != HTTPMethod(rawValue: "get")`.
-///
-/// See https://tools.ietf.org/html/rfc7231#section-4.3
-public struct HTTPMethod: RawRepresentable, Equatable, Hashable {
-    /// `CONNECT` method.
-    public static let connect = HTTPMethod(rawValue: "CONNECT")
-    /// `DELETE` method.
-    public static let delete = HTTPMethod(rawValue: "DELETE")
-    /// `GET` method.
-    public static let get = HTTPMethod(rawValue: "GET")
-    /// `HEAD` method.
-    public static let head = HTTPMethod(rawValue: "HEAD")
-    /// `OPTIONS` method.
-    public static let options = HTTPMethod(rawValue: "OPTIONS")
-    /// `PATCH` method.
-    public static let patch = HTTPMethod(rawValue: "PATCH")
-    /// `POST` method.
-    public static let post = HTTPMethod(rawValue: "POST")
-    /// `PUT` method.
-    public static let put = HTTPMethod(rawValue: "PUT")
-    /// `QUERY` method.
-    public static let query = HTTPMethod(rawValue: "QUERY")
-    /// `TRACE` method.
-    public static let trace = HTTPMethod(rawValue: "TRACE")
-
-    public let rawValue: String
-
-    public init(rawValue: String) {
-        self.rawValue = rawValue
-    }
-}

+ 0 - 584
Pods/Alamofire/Source/MultipartFormData.swift

@@ -1,584 +0,0 @@
-//
-//  MultipartFormData.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-#if os(iOS) || os(watchOS) || os(tvOS)
-import MobileCoreServices
-#elseif os(macOS)
-import CoreServices
-#endif
-
-/// Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode
-/// multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead
-/// to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the
-/// data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for
-/// larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset.
-///
-/// For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well
-/// and the w3 form documentation.
-///
-/// - https://www.ietf.org/rfc/rfc2388.txt
-/// - https://www.ietf.org/rfc/rfc2045.txt
-/// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13
-open class MultipartFormData {
-    // MARK: - Helper Types
-
-    enum EncodingCharacters {
-        static let crlf = "\r\n"
-    }
-
-    enum BoundaryGenerator {
-        enum BoundaryType {
-            case initial, encapsulated, final
-        }
-
-        static func randomBoundary() -> String {
-            let first = UInt32.random(in: UInt32.min...UInt32.max)
-            let second = UInt32.random(in: UInt32.min...UInt32.max)
-
-            return String(format: "alamofire.boundary.%08x%08x", first, second)
-        }
-
-        static func boundaryData(forBoundaryType boundaryType: BoundaryType, boundary: String) -> Data {
-            let boundaryText: String
-
-            switch boundaryType {
-            case .initial:
-                boundaryText = "--\(boundary)\(EncodingCharacters.crlf)"
-            case .encapsulated:
-                boundaryText = "\(EncodingCharacters.crlf)--\(boundary)\(EncodingCharacters.crlf)"
-            case .final:
-                boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)"
-            }
-
-            return Data(boundaryText.utf8)
-        }
-    }
-
-    class BodyPart {
-        let headers: HTTPHeaders
-        let bodyStream: InputStream
-        let bodyContentLength: UInt64
-        var hasInitialBoundary = false
-        var hasFinalBoundary = false
-
-        init(headers: HTTPHeaders, bodyStream: InputStream, bodyContentLength: UInt64) {
-            self.headers = headers
-            self.bodyStream = bodyStream
-            self.bodyContentLength = bodyContentLength
-        }
-    }
-
-    // MARK: - Properties
-
-    /// Default memory threshold used when encoding `MultipartFormData`, in bytes.
-    public static let encodingMemoryThreshold: UInt64 = 10_000_000
-
-    /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`.
-    open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)"
-
-    /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries.
-    public var contentLength: UInt64 { bodyParts.reduce(0) { $0 + $1.bodyContentLength } }
-
-    /// The boundary used to separate the body parts in the encoded form data.
-    public let boundary: String
-
-    let fileManager: FileManager
-
-    private var bodyParts: [BodyPart]
-    private var bodyPartError: AFError?
-    private let streamBufferSize: Int
-
-    // MARK: - Lifecycle
-
-    /// Creates an instance.
-    ///
-    /// - Parameters:
-    ///   - fileManager: `FileManager` to use for file operations, if needed.
-    ///   - boundary: Boundary `String` used to separate body parts.
-    public init(fileManager: FileManager = .default, boundary: String? = nil) {
-        self.fileManager = fileManager
-        self.boundary = boundary ?? BoundaryGenerator.randomBoundary()
-        bodyParts = []
-
-        //
-        // The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more
-        // information, please refer to the following article:
-        //   - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html
-        //
-        streamBufferSize = 1024
-    }
-
-    // MARK: - Body Parts
-
-    /// Creates a body part from the data and appends it to the instance.
-    ///
-    /// The body part data will be encoded using the following format:
-    ///
-    /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header)
-    /// - `Content-Type: #{mimeType}` (HTTP Header)
-    /// - Encoded file data
-    /// - Multipart form boundary
-    ///
-    /// - Parameters:
-    ///   - data:     `Data` to encoding into the instance.
-    ///   - name:     Name to associate with the `Data` in the `Content-Disposition` HTTP header.
-    ///   - fileName: Filename to associate with the `Data` in the `Content-Disposition` HTTP header.
-    ///   - mimeType: MIME type to associate with the data in the `Content-Type` HTTP header.
-    public func append(_ data: Data, withName name: String, fileName: String? = nil, mimeType: String? = nil) {
-        let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType)
-        let stream = InputStream(data: data)
-        let length = UInt64(data.count)
-
-        append(stream, withLength: length, headers: headers)
-    }
-
-    /// Creates a body part from the file and appends it to the instance.
-    ///
-    /// The body part data will be encoded using the following format:
-    ///
-    /// - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header)
-    /// - `Content-Type: #{generated mimeType}` (HTTP Header)
-    /// - Encoded file data
-    /// - Multipart form boundary
-    ///
-    /// The filename in the `Content-Disposition` HTTP header is generated from the last path component of the
-    /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the
-    /// system associated MIME type.
-    ///
-    /// - Parameters:
-    ///   - fileURL: `URL` of the file whose content will be encoded into the instance.
-    ///   - name:    Name to associate with the file content in the `Content-Disposition` HTTP header.
-    public func append(_ fileURL: URL, withName name: String) {
-        let fileName = fileURL.lastPathComponent
-        let pathExtension = fileURL.pathExtension
-
-        if !fileName.isEmpty && !pathExtension.isEmpty {
-            let mime = mimeType(forPathExtension: pathExtension)
-            append(fileURL, withName: name, fileName: fileName, mimeType: mime)
-        } else {
-            setBodyPartError(withReason: .bodyPartFilenameInvalid(in: fileURL))
-        }
-    }
-
-    /// Creates a body part from the file and appends it to the instance.
-    ///
-    /// The body part data will be encoded using the following format:
-    ///
-    /// - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header)
-    /// - Content-Type: #{mimeType} (HTTP Header)
-    /// - Encoded file data
-    /// - Multipart form boundary
-    ///
-    /// - Parameters:
-    ///   - fileURL:  `URL` of the file whose content will be encoded into the instance.
-    ///   - name:     Name to associate with the file content in the `Content-Disposition` HTTP header.
-    ///   - fileName: Filename to associate with the file content in the `Content-Disposition` HTTP header.
-    ///   - mimeType: MIME type to associate with the file content in the `Content-Type` HTTP header.
-    public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) {
-        let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType)
-
-        //============================================================
-        //                 Check 1 - is file URL?
-        //============================================================
-
-        guard fileURL.isFileURL else {
-            setBodyPartError(withReason: .bodyPartURLInvalid(url: fileURL))
-            return
-        }
-
-        //============================================================
-        //              Check 2 - is file URL reachable?
-        //============================================================
-
-        #if !(os(Linux) || os(Windows))
-        do {
-            let isReachable = try fileURL.checkPromisedItemIsReachable()
-            guard isReachable else {
-                setBodyPartError(withReason: .bodyPartFileNotReachable(at: fileURL))
-                return
-            }
-        } catch {
-            setBodyPartError(withReason: .bodyPartFileNotReachableWithError(atURL: fileURL, error: error))
-            return
-        }
-        #endif
-
-        //============================================================
-        //            Check 3 - is file URL a directory?
-        //============================================================
-
-        var isDirectory: ObjCBool = false
-        let path = fileURL.path
-
-        guard fileManager.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else {
-            setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL))
-            return
-        }
-
-        //============================================================
-        //          Check 4 - can the file size be extracted?
-        //============================================================
-
-        let bodyContentLength: UInt64
-
-        do {
-            guard let fileSize = try fileManager.attributesOfItem(atPath: path)[.size] as? NSNumber else {
-                setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL))
-                return
-            }
-
-            bodyContentLength = fileSize.uint64Value
-        } catch {
-            setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error))
-            return
-        }
-
-        //============================================================
-        //       Check 5 - can a stream be created from file URL?
-        //============================================================
-
-        guard let stream = InputStream(url: fileURL) else {
-            setBodyPartError(withReason: .bodyPartInputStreamCreationFailed(for: fileURL))
-            return
-        }
-
-        append(stream, withLength: bodyContentLength, headers: headers)
-    }
-
-    /// Creates a body part from the stream and appends it to the instance.
-    ///
-    /// The body part data will be encoded using the following format:
-    ///
-    /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header)
-    /// - `Content-Type: #{mimeType}` (HTTP Header)
-    /// - Encoded stream data
-    /// - Multipart form boundary
-    ///
-    /// - Parameters:
-    ///   - stream:   `InputStream` to encode into the instance.
-    ///   - length:   Length, in bytes, of the stream.
-    ///   - name:     Name to associate with the stream content in the `Content-Disposition` HTTP header.
-    ///   - fileName: Filename to associate with the stream content in the `Content-Disposition` HTTP header.
-    ///   - mimeType: MIME type to associate with the stream content in the `Content-Type` HTTP header.
-    public func append(_ stream: InputStream,
-                       withLength length: UInt64,
-                       name: String,
-                       fileName: String,
-                       mimeType: String) {
-        let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType)
-        append(stream, withLength: length, headers: headers)
-    }
-
-    /// Creates a body part with the stream, length, and headers and appends it to the instance.
-    ///
-    /// The body part data will be encoded using the following format:
-    ///
-    /// - HTTP headers
-    /// - Encoded stream data
-    /// - Multipart form boundary
-    ///
-    /// - Parameters:
-    ///   - stream:  `InputStream` to encode into the instance.
-    ///   - length:  Length, in bytes, of the stream.
-    ///   - headers: `HTTPHeaders` for the body part.
-    public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) {
-        let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length)
-        bodyParts.append(bodyPart)
-    }
-
-    // MARK: - Data Encoding
-
-    /// Encodes all appended body parts into a single `Data` value.
-    ///
-    /// - Note: This method will load all the appended body parts into memory all at the same time. This method should
-    ///         only be used when the encoded data will have a small memory footprint. For large data cases, please use
-    ///         the `writeEncodedData(to:))` method.
-    ///
-    /// - Returns: The encoded `Data`, if encoding is successful.
-    /// - Throws:  An `AFError` if encoding encounters an error.
-    public func encode() throws -> Data {
-        if let bodyPartError = bodyPartError {
-            throw bodyPartError
-        }
-
-        var encoded = Data()
-
-        bodyParts.first?.hasInitialBoundary = true
-        bodyParts.last?.hasFinalBoundary = true
-
-        for bodyPart in bodyParts {
-            let encodedData = try encode(bodyPart)
-            encoded.append(encodedData)
-        }
-
-        return encoded
-    }
-
-    /// Writes all appended body parts to the given file `URL`.
-    ///
-    /// This process is facilitated by reading and writing with input and output streams, respectively. Thus,
-    /// this approach is very memory efficient and should be used for large body part data.
-    ///
-    /// - Parameter fileURL: File `URL` to which to write the form data.
-    /// - Throws:            An `AFError` if encoding encounters an error.
-    public func writeEncodedData(to fileURL: URL) throws {
-        if let bodyPartError = bodyPartError {
-            throw bodyPartError
-        }
-
-        if fileManager.fileExists(atPath: fileURL.path) {
-            throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL))
-        } else if !fileURL.isFileURL {
-            throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL))
-        }
-
-        guard let outputStream = OutputStream(url: fileURL, append: false) else {
-            throw AFError.multipartEncodingFailed(reason: .outputStreamCreationFailed(for: fileURL))
-        }
-
-        outputStream.open()
-        defer { outputStream.close() }
-
-        bodyParts.first?.hasInitialBoundary = true
-        bodyParts.last?.hasFinalBoundary = true
-
-        for bodyPart in bodyParts {
-            try write(bodyPart, to: outputStream)
-        }
-    }
-
-    // MARK: - Private - Body Part Encoding
-
-    private func encode(_ bodyPart: BodyPart) throws -> Data {
-        var encoded = Data()
-
-        let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData()
-        encoded.append(initialData)
-
-        let headerData = encodeHeaders(for: bodyPart)
-        encoded.append(headerData)
-
-        let bodyStreamData = try encodeBodyStream(for: bodyPart)
-        encoded.append(bodyStreamData)
-
-        if bodyPart.hasFinalBoundary {
-            encoded.append(finalBoundaryData())
-        }
-
-        return encoded
-    }
-
-    private func encodeHeaders(for bodyPart: BodyPart) -> Data {
-        let headerText = bodyPart.headers.map { "\($0.name): \($0.value)\(EncodingCharacters.crlf)" }
-            .joined()
-            + EncodingCharacters.crlf
-
-        return Data(headerText.utf8)
-    }
-
-    private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data {
-        let inputStream = bodyPart.bodyStream
-        inputStream.open()
-        defer { inputStream.close() }
-
-        var encoded = Data()
-
-        while inputStream.hasBytesAvailable {
-            var buffer = [UInt8](repeating: 0, count: streamBufferSize)
-            let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize)
-
-            if let error = inputStream.streamError {
-                throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error))
-            }
-
-            if bytesRead > 0 {
-                encoded.append(buffer, count: bytesRead)
-            } else {
-                break
-            }
-        }
-
-        guard UInt64(encoded.count) == bodyPart.bodyContentLength else {
-            let error = AFError.UnexpectedInputStreamLength(bytesExpected: bodyPart.bodyContentLength,
-                                                            bytesRead: UInt64(encoded.count))
-            throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error))
-        }
-
-        return encoded
-    }
-
-    // MARK: - Private - Writing Body Part to Output Stream
-
-    private func write(_ bodyPart: BodyPart, to outputStream: OutputStream) throws {
-        try writeInitialBoundaryData(for: bodyPart, to: outputStream)
-        try writeHeaderData(for: bodyPart, to: outputStream)
-        try writeBodyStream(for: bodyPart, to: outputStream)
-        try writeFinalBoundaryData(for: bodyPart, to: outputStream)
-    }
-
-    private func writeInitialBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws {
-        let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData()
-        return try write(initialData, to: outputStream)
-    }
-
-    private func writeHeaderData(for bodyPart: BodyPart, to outputStream: OutputStream) throws {
-        let headerData = encodeHeaders(for: bodyPart)
-        return try write(headerData, to: outputStream)
-    }
-
-    private func writeBodyStream(for bodyPart: BodyPart, to outputStream: OutputStream) throws {
-        let inputStream = bodyPart.bodyStream
-
-        inputStream.open()
-        defer { inputStream.close() }
-
-        while inputStream.hasBytesAvailable {
-            var buffer = [UInt8](repeating: 0, count: streamBufferSize)
-            let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize)
-
-            if let streamError = inputStream.streamError {
-                throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: streamError))
-            }
-
-            if bytesRead > 0 {
-                if buffer.count != bytesRead {
-                    buffer = Array(buffer[0..<bytesRead])
-                }
-
-                try write(&buffer, to: outputStream)
-            } else {
-                break
-            }
-        }
-    }
-
-    private func writeFinalBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws {
-        if bodyPart.hasFinalBoundary {
-            return try write(finalBoundaryData(), to: outputStream)
-        }
-    }
-
-    // MARK: - Private - Writing Buffered Data to Output Stream
-
-    private func write(_ data: Data, to outputStream: OutputStream) throws {
-        var buffer = [UInt8](repeating: 0, count: data.count)
-        data.copyBytes(to: &buffer, count: data.count)
-
-        return try write(&buffer, to: outputStream)
-    }
-
-    private func write(_ buffer: inout [UInt8], to outputStream: OutputStream) throws {
-        var bytesToWrite = buffer.count
-
-        while bytesToWrite > 0, outputStream.hasSpaceAvailable {
-            let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite)
-
-            if let error = outputStream.streamError {
-                throw AFError.multipartEncodingFailed(reason: .outputStreamWriteFailed(error: error))
-            }
-
-            bytesToWrite -= bytesWritten
-
-            if bytesToWrite > 0 {
-                buffer = Array(buffer[bytesWritten..<buffer.count])
-            }
-        }
-    }
-
-    // MARK: - Private - Content Headers
-
-    private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> HTTPHeaders {
-        var disposition = "form-data; name=\"\(name)\""
-        if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" }
-
-        var headers: HTTPHeaders = [.contentDisposition(disposition)]
-        if let mimeType = mimeType { headers.add(.contentType(mimeType)) }
-
-        return headers
-    }
-
-    // MARK: - Private - Boundary Encoding
-
-    private func initialBoundaryData() -> Data {
-        BoundaryGenerator.boundaryData(forBoundaryType: .initial, boundary: boundary)
-    }
-
-    private func encapsulatedBoundaryData() -> Data {
-        BoundaryGenerator.boundaryData(forBoundaryType: .encapsulated, boundary: boundary)
-    }
-
-    private func finalBoundaryData() -> Data {
-        BoundaryGenerator.boundaryData(forBoundaryType: .final, boundary: boundary)
-    }
-
-    // MARK: - Private - Errors
-
-    private func setBodyPartError(withReason reason: AFError.MultipartEncodingFailureReason) {
-        guard bodyPartError == nil else { return }
-        bodyPartError = AFError.multipartEncodingFailed(reason: reason)
-    }
-}
-
-#if canImport(UniformTypeIdentifiers)
-import UniformTypeIdentifiers
-
-extension MultipartFormData {
-    // MARK: - Private - Mime Type
-
-    private func mimeType(forPathExtension pathExtension: String) -> String {
-        if #available(iOS 14, macOS 11, tvOS 14, watchOS 7, *) {
-            return UTType(filenameExtension: pathExtension)?.preferredMIMEType ?? "application/octet-stream"
-        } else {
-            if
-                let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(),
-                let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() {
-                return contentType as String
-            }
-
-            return "application/octet-stream"
-        }
-    }
-}
-
-#else
-
-extension MultipartFormData {
-    // MARK: - Private - Mime Type
-
-    private func mimeType(forPathExtension pathExtension: String) -> String {
-        #if !(os(Linux) || os(Windows))
-        if
-            let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(),
-            let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() {
-            return contentType as String
-        }
-        #endif
-
-        return "application/octet-stream"
-    }
-}
-
-#endif

+ 0 - 89
Pods/Alamofire/Source/MultipartUpload.swift

@@ -1,89 +0,0 @@
-//
-//  MultipartUpload.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 type which encapsulates a `MultipartFormData` upload.
-final class MultipartUpload {
-    lazy var result = Result { try build() }
-
-    @Protected
-    private(set) var multipartFormData: MultipartFormData
-    let encodingMemoryThreshold: UInt64
-    let request: URLRequestConvertible
-    let fileManager: FileManager
-
-    init(encodingMemoryThreshold: UInt64,
-         request: URLRequestConvertible,
-         multipartFormData: MultipartFormData) {
-        self.encodingMemoryThreshold = encodingMemoryThreshold
-        self.request = request
-        fileManager = multipartFormData.fileManager
-        self.multipartFormData = multipartFormData
-    }
-
-    func build() throws -> UploadRequest.Uploadable {
-        let uploadable: UploadRequest.Uploadable
-        if $multipartFormData.contentLength < encodingMemoryThreshold {
-            let data = try $multipartFormData.read { try $0.encode() }
-
-            uploadable = .data(data)
-        } else {
-            let tempDirectoryURL = fileManager.temporaryDirectory
-            let directoryURL = tempDirectoryURL.appendingPathComponent("org.alamofire.manager/multipart.form.data")
-            let fileName = UUID().uuidString
-            let fileURL = directoryURL.appendingPathComponent(fileName)
-
-            try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil)
-
-            do {
-                try $multipartFormData.read { try $0.writeEncodedData(to: fileURL) }
-            } catch {
-                // Cleanup after attempted write if it fails.
-                try? fileManager.removeItem(at: fileURL)
-                throw error
-            }
-
-            uploadable = .file(fileURL, shouldRemove: true)
-        }
-
-        return uploadable
-    }
-}
-
-extension MultipartUpload: UploadConvertible {
-    func asURLRequest() throws -> URLRequest {
-        var urlRequest = try request.asURLRequest()
-
-        $multipartFormData.read { multipartFormData in
-            urlRequest.headers.add(.contentType(multipartFormData.contentType))
-        }
-
-        return urlRequest
-    }
-
-    func createUploadable() throws -> UploadRequest.Uploadable {
-        try result.get()
-    }
-}

+ 0 - 267
Pods/Alamofire/Source/NetworkReachabilityManager.swift

@@ -1,267 +0,0 @@
-//
-//  NetworkReachabilityManager.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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.
-//
-
-#if !(os(watchOS) || os(Linux) || os(Windows))
-
-import Foundation
-import SystemConfiguration
-
-/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both cellular and
-/// WiFi network interfaces.
-///
-/// Reachability can be used to determine background information about why a network operation failed, or to retry
-/// network requests when a connection is established. It should not be used to prevent a user from initiating a network
-/// request, as it's possible that an initial request may be required to establish reachability.
-open class NetworkReachabilityManager {
-    /// Defines the various states of network reachability.
-    public enum NetworkReachabilityStatus {
-        /// It is unknown whether the network is reachable.
-        case unknown
-        /// The network is not reachable.
-        case notReachable
-        /// The network is reachable on the associated `ConnectionType`.
-        case reachable(ConnectionType)
-
-        init(_ flags: SCNetworkReachabilityFlags) {
-            guard flags.isActuallyReachable else { self = .notReachable; return }
-
-            var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi)
-
-            if flags.isCellular { networkStatus = .reachable(.cellular) }
-
-            self = networkStatus
-        }
-
-        /// Defines the various connection types detected by reachability flags.
-        public enum ConnectionType {
-            /// The connection type is either over Ethernet or WiFi.
-            case ethernetOrWiFi
-            /// The connection type is a cellular connection.
-            case cellular
-        }
-    }
-
-    /// A closure executed when the network reachability status changes. The closure takes a single argument: the
-    /// network reachability status.
-    public typealias Listener = (NetworkReachabilityStatus) -> Void
-
-    /// Default `NetworkReachabilityManager` for the zero address and a `listenerQueue` of `.main`.
-    public static let `default` = NetworkReachabilityManager()
-
-    // MARK: - Properties
-
-    /// Whether the network is currently reachable.
-    open var isReachable: Bool { isReachableOnCellular || isReachableOnEthernetOrWiFi }
-
-    /// Whether the network is currently reachable over the cellular interface.
-    ///
-    /// - Note: Using this property to decide whether to make a high or low bandwidth request is not recommended.
-    ///         Instead, set the `allowsCellularAccess` on any `URLRequest`s being issued.
-    ///
-    open var isReachableOnCellular: Bool { status == .reachable(.cellular) }
-
-    /// Whether the network is currently reachable over Ethernet or WiFi interface.
-    open var isReachableOnEthernetOrWiFi: Bool { status == .reachable(.ethernetOrWiFi) }
-
-    /// `DispatchQueue` on which reachability will update.
-    public let reachabilityQueue = DispatchQueue(label: "org.alamofire.reachabilityQueue")
-
-    /// Flags of the current reachability type, if any.
-    open var flags: SCNetworkReachabilityFlags? {
-        var flags = SCNetworkReachabilityFlags()
-
-        return (SCNetworkReachabilityGetFlags(reachability, &flags)) ? flags : nil
-    }
-
-    /// The current network reachability status.
-    open var status: NetworkReachabilityStatus {
-        flags.map(NetworkReachabilityStatus.init) ?? .unknown
-    }
-
-    /// Mutable state storage.
-    struct MutableState {
-        /// A closure executed when the network reachability status changes.
-        var listener: Listener?
-        /// `DispatchQueue` on which listeners will be called.
-        var listenerQueue: DispatchQueue?
-        /// Previously calculated status.
-        var previousStatus: NetworkReachabilityStatus?
-    }
-
-    /// `SCNetworkReachability` instance providing notifications.
-    private let reachability: SCNetworkReachability
-
-    /// Protected storage for mutable state.
-    @Protected
-    private var mutableState = MutableState()
-
-    // MARK: - Initialization
-
-    /// Creates an instance with the specified host.
-    ///
-    /// - Note: The `host` value must *not* contain a scheme, just the hostname.
-    ///
-    /// - Parameters:
-    ///   - host:          Host used to evaluate network reachability. Must *not* include the scheme (e.g. `https`).
-    public convenience init?(host: String) {
-        guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil }
-
-        self.init(reachability: reachability)
-    }
-
-    /// Creates an instance that monitors the address 0.0.0.0.
-    ///
-    /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing
-    /// status of the device, both IPv4 and IPv6.
-    public convenience init?() {
-        var zero = sockaddr()
-        zero.sa_len = UInt8(MemoryLayout<sockaddr>.size)
-        zero.sa_family = sa_family_t(AF_INET)
-
-        guard let reachability = SCNetworkReachabilityCreateWithAddress(nil, &zero) else { return nil }
-
-        self.init(reachability: reachability)
-    }
-
-    private init(reachability: SCNetworkReachability) {
-        self.reachability = reachability
-    }
-
-    deinit {
-        stopListening()
-    }
-
-    // MARK: - Listening
-
-    /// Starts listening for changes in network reachability status.
-    ///
-    /// - Note: Stops and removes any existing listener.
-    ///
-    /// - Parameters:
-    ///   - queue:    `DispatchQueue` on which to call the `listener` closure. `.main` by default.
-    ///   - listener: `Listener` closure called when reachability changes.
-    ///
-    /// - Returns: `true` if listening was started successfully, `false` otherwise.
-    @discardableResult
-    open func startListening(onQueue queue: DispatchQueue = .main,
-                             onUpdatePerforming listener: @escaping Listener) -> Bool {
-        stopListening()
-
-        $mutableState.write { state in
-            state.listenerQueue = queue
-            state.listener = listener
-        }
-
-        var context = SCNetworkReachabilityContext(version: 0,
-                                                   info: Unmanaged.passUnretained(self).toOpaque(),
-                                                   retain: nil,
-                                                   release: nil,
-                                                   copyDescription: nil)
-        let callback: SCNetworkReachabilityCallBack = { _, flags, info in
-            guard let info = info else { return }
-
-            let instance = Unmanaged<NetworkReachabilityManager>.fromOpaque(info).takeUnretainedValue()
-            instance.notifyListener(flags)
-        }
-
-        let queueAdded = SCNetworkReachabilitySetDispatchQueue(reachability, reachabilityQueue)
-        let callbackAdded = SCNetworkReachabilitySetCallback(reachability, callback, &context)
-
-        // Manually call listener to give initial state, since the framework may not.
-        if let currentFlags = flags {
-            reachabilityQueue.async {
-                self.notifyListener(currentFlags)
-            }
-        }
-
-        return callbackAdded && queueAdded
-    }
-
-    /// Stops listening for changes in network reachability status.
-    open func stopListening() {
-        SCNetworkReachabilitySetCallback(reachability, nil, nil)
-        SCNetworkReachabilitySetDispatchQueue(reachability, nil)
-        $mutableState.write { state in
-            state.listener = nil
-            state.listenerQueue = nil
-            state.previousStatus = nil
-        }
-    }
-
-    // MARK: - Internal - Listener Notification
-
-    /// Calls the `listener` closure of the `listenerQueue` if the computed status hasn't changed.
-    ///
-    /// - Note: Should only be called from the `reachabilityQueue`.
-    ///
-    /// - Parameter flags: `SCNetworkReachabilityFlags` to use to calculate the status.
-    func notifyListener(_ flags: SCNetworkReachabilityFlags) {
-        let newStatus = NetworkReachabilityStatus(flags)
-
-        $mutableState.write { state in
-            guard state.previousStatus != newStatus else { return }
-
-            state.previousStatus = newStatus
-
-            let listener = state.listener
-            state.listenerQueue?.async { listener?(newStatus) }
-        }
-    }
-}
-
-// MARK: -
-
-extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {}
-
-extension SCNetworkReachabilityFlags {
-    var isReachable: Bool { contains(.reachable) }
-    var isConnectionRequired: Bool { contains(.connectionRequired) }
-    var canConnectAutomatically: Bool { contains(.connectionOnDemand) || contains(.connectionOnTraffic) }
-    var canConnectWithoutUserInteraction: Bool { canConnectAutomatically && !contains(.interventionRequired) }
-    var isActuallyReachable: Bool { isReachable && (!isConnectionRequired || canConnectWithoutUserInteraction) }
-    var isCellular: Bool {
-        #if os(iOS) || os(tvOS)
-        return contains(.isWWAN)
-        #else
-        return false
-        #endif
-    }
-
-    /// Human readable `String` for all states, to help with debugging.
-    var readableDescription: String {
-        let W = isCellular ? "W" : "-"
-        let R = isReachable ? "R" : "-"
-        let c = isConnectionRequired ? "c" : "-"
-        let t = contains(.transientConnection) ? "t" : "-"
-        let i = contains(.interventionRequired) ? "i" : "-"
-        let C = contains(.connectionOnTraffic) ? "C" : "-"
-        let D = contains(.connectionOnDemand) ? "D" : "-"
-        let l = contains(.isLocalAddress) ? "l" : "-"
-        let d = contains(.isDirect) ? "d" : "-"
-        let a = contains(.connectionAutomatic) ? "a" : "-"
-
-        return "\(W)\(R) \(c)\(t)\(i)\(C)\(D)\(l)\(d)\(a)"
-    }
-}
-#endif

+ 0 - 115
Pods/Alamofire/Source/Notifications.swift

@@ -1,115 +0,0 @@
-//
-//  Notifications.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-extension Request {
-    /// Posted when a `Request` is resumed. The `Notification` contains the resumed `Request`.
-    public static let didResumeNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didResume")
-    /// Posted when a `Request` is suspended. The `Notification` contains the suspended `Request`.
-    public static let didSuspendNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didSuspend")
-    /// Posted when a `Request` is cancelled. The `Notification` contains the cancelled `Request`.
-    public static let didCancelNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCancel")
-    /// Posted when a `Request` is finished. The `Notification` contains the completed `Request`.
-    public static let didFinishNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didFinish")
-
-    /// Posted when a `URLSessionTask` is resumed. The `Notification` contains the `Request` associated with the `URLSessionTask`.
-    public static let didResumeTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didResumeTask")
-    /// Posted when a `URLSessionTask` is suspended. The `Notification` contains the `Request` associated with the `URLSessionTask`.
-    public static let didSuspendTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didSuspendTask")
-    /// Posted when a `URLSessionTask` is cancelled. The `Notification` contains the `Request` associated with the `URLSessionTask`.
-    public static let didCancelTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCancelTask")
-    /// Posted when a `URLSessionTask` is completed. The `Notification` contains the `Request` associated with the `URLSessionTask`.
-    public static let didCompleteTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCompleteTask")
-}
-
-// MARK: -
-
-extension Notification {
-    /// The `Request` contained by the instance's `userInfo`, `nil` otherwise.
-    public var request: Request? {
-        userInfo?[String.requestKey] as? Request
-    }
-
-    /// Convenience initializer for a `Notification` containing a `Request` payload.
-    ///
-    /// - Parameters:
-    ///   - name:    The name of the notification.
-    ///   - request: The `Request` payload.
-    init(name: Notification.Name, request: Request) {
-        self.init(name: name, object: nil, userInfo: [String.requestKey: request])
-    }
-}
-
-extension NotificationCenter {
-    /// Convenience function for posting notifications with `Request` payloads.
-    ///
-    /// - Parameters:
-    ///   - name:    The name of the notification.
-    ///   - request: The `Request` payload.
-    func postNotification(named name: Notification.Name, with request: Request) {
-        let notification = Notification(name: name, request: request)
-        post(notification)
-    }
-}
-
-extension String {
-    /// User info dictionary key representing the `Request` associated with the notification.
-    fileprivate static let requestKey = "org.alamofire.notification.key.request"
-}
-
-/// `EventMonitor` that provides Alamofire's notifications.
-public final class AlamofireNotifications: EventMonitor {
-    public func requestDidResume(_ request: Request) {
-        NotificationCenter.default.postNotification(named: Request.didResumeNotification, with: request)
-    }
-
-    public func requestDidSuspend(_ request: Request) {
-        NotificationCenter.default.postNotification(named: Request.didSuspendNotification, with: request)
-    }
-
-    public func requestDidCancel(_ request: Request) {
-        NotificationCenter.default.postNotification(named: Request.didCancelNotification, with: request)
-    }
-
-    public func requestDidFinish(_ request: Request) {
-        NotificationCenter.default.postNotification(named: Request.didFinishNotification, with: request)
-    }
-
-    public func request(_ request: Request, didResumeTask task: URLSessionTask) {
-        NotificationCenter.default.postNotification(named: Request.didResumeTaskNotification, with: request)
-    }
-
-    public func request(_ request: Request, didSuspendTask task: URLSessionTask) {
-        NotificationCenter.default.postNotification(named: Request.didSuspendTaskNotification, with: request)
-    }
-
-    public func request(_ request: Request, didCancelTask task: URLSessionTask) {
-        NotificationCenter.default.postNotification(named: Request.didCancelTaskNotification, with: request)
-    }
-
-    public func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) {
-        NotificationCenter.default.postNotification(named: Request.didCompleteTaskNotification, with: request)
-    }
-}

+ 0 - 49
Pods/Alamofire/Source/OperationQueue+Alamofire.swift

@@ -1,49 +0,0 @@
-//
-//  OperationQueue+Alamofire.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-extension OperationQueue {
-    /// Creates an instance using the provided parameters.
-    ///
-    /// - Parameters:
-    ///   - qualityOfService:            `QualityOfService` to be applied to the queue. `.default` by default.
-    ///   - maxConcurrentOperationCount: Maximum concurrent operations.
-    ///                                  `OperationQueue.defaultMaxConcurrentOperationCount` by default.
-    ///   - underlyingQueue: Underlying  `DispatchQueue`. `nil` by default.
-    ///   - name:                        Name for the queue. `nil` by default.
-    ///   - startSuspended:              Whether the queue starts suspended. `false` by default.
-    convenience init(qualityOfService: QualityOfService = .default,
-                     maxConcurrentOperationCount: Int = OperationQueue.defaultMaxConcurrentOperationCount,
-                     underlyingQueue: DispatchQueue? = nil,
-                     name: String? = nil,
-                     startSuspended: Bool = false) {
-        self.init()
-        self.qualityOfService = qualityOfService
-        self.maxConcurrentOperationCount = maxConcurrentOperationCount
-        self.underlyingQueue = underlyingQueue
-        self.name = name
-        isSuspended = startSuspended
-    }
-}

+ 0 - 217
Pods/Alamofire/Source/ParameterEncoder.swift

@@ -1,217 +0,0 @@
-//
-//  ParameterEncoder.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 type that can encode any `Encodable` type into a `URLRequest`.
-public protocol ParameterEncoder {
-    /// Encode the provided `Encodable` parameters into `request`.
-    ///
-    /// - Parameters:
-    ///   - parameters: The `Encodable` parameter value.
-    ///   - request:    The `URLRequest` into which to encode the parameters.
-    ///
-    /// - Returns:      A `URLRequest` with the result of the encoding.
-    /// - Throws:       An `Error` when encoding fails. For Alamofire provided encoders, this will be an instance of
-    ///                 `AFError.parameterEncoderFailed` with an associated `ParameterEncoderFailureReason`.
-    func encode<Parameters: Encodable>(_ parameters: Parameters?, into request: URLRequest) throws -> URLRequest
-}
-
-/// A `ParameterEncoder` that encodes types as JSON body data.
-///
-/// If no `Content-Type` header is already set on the provided `URLRequest`s, it's set to `application/json`.
-open class JSONParameterEncoder: ParameterEncoder {
-    /// Returns an encoder with default parameters.
-    public static var `default`: JSONParameterEncoder { JSONParameterEncoder() }
-
-    /// Returns an encoder with `JSONEncoder.outputFormatting` set to `.prettyPrinted`.
-    public static var prettyPrinted: JSONParameterEncoder {
-        let encoder = JSONEncoder()
-        encoder.outputFormatting = .prettyPrinted
-
-        return JSONParameterEncoder(encoder: encoder)
-    }
-
-    /// Returns an encoder with `JSONEncoder.outputFormatting` set to `.sortedKeys`.
-    @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *)
-    public static var sortedKeys: JSONParameterEncoder {
-        let encoder = JSONEncoder()
-        encoder.outputFormatting = .sortedKeys
-
-        return JSONParameterEncoder(encoder: encoder)
-    }
-
-    /// `JSONEncoder` used to encode parameters.
-    public let encoder: JSONEncoder
-
-    /// Creates an instance with the provided `JSONEncoder`.
-    ///
-    /// - Parameter encoder: The `JSONEncoder`. `JSONEncoder()` by default.
-    public init(encoder: JSONEncoder = JSONEncoder()) {
-        self.encoder = encoder
-    }
-
-    open func encode<Parameters: Encodable>(_ parameters: Parameters?,
-                                            into request: URLRequest) throws -> URLRequest {
-        guard let parameters = parameters else { return request }
-
-        var request = request
-
-        do {
-            let data = try encoder.encode(parameters)
-            request.httpBody = data
-            if request.headers["Content-Type"] == nil {
-                request.headers.update(.contentType("application/json"))
-            }
-        } catch {
-            throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error))
-        }
-
-        return request
-    }
-}
-
-#if swift(>=5.5)
-extension ParameterEncoder where Self == JSONParameterEncoder {
-    /// Provides a default `JSONParameterEncoder` instance.
-    public static var json: JSONParameterEncoder { JSONParameterEncoder() }
-
-    /// Creates a `JSONParameterEncoder` using the provided `JSONEncoder`.
-    ///
-    /// - Parameter encoder: `JSONEncoder` used to encode parameters. `JSONEncoder()` by default.
-    /// - Returns:           The `JSONParameterEncoder`.
-    public static func json(encoder: JSONEncoder = JSONEncoder()) -> JSONParameterEncoder {
-        JSONParameterEncoder(encoder: encoder)
-    }
-}
-#endif
-
-/// A `ParameterEncoder` that encodes types as URL-encoded query strings to be set on the URL or as body data, depending
-/// on the `Destination` set.
-///
-/// If no `Content-Type` header is already set on the provided `URLRequest`s, it will be set to
-/// `application/x-www-form-urlencoded; charset=utf-8`.
-///
-/// Encoding behavior can be customized by passing an instance of `URLEncodedFormEncoder` to the initializer.
-open class URLEncodedFormParameterEncoder: ParameterEncoder {
-    /// Defines where the URL-encoded string should be set for each `URLRequest`.
-    public enum Destination {
-        /// Applies the encoded query string to any existing query string for `.get`, `.head`, and `.delete` request.
-        /// Sets it to the `httpBody` for all other methods.
-        case methodDependent
-        /// Applies the encoded query string to any existing query string from the `URLRequest`.
-        case queryString
-        /// Applies the encoded query string to the `httpBody` of the `URLRequest`.
-        case httpBody
-
-        /// Determines whether the URL-encoded string should be applied to the `URLRequest`'s `url`.
-        ///
-        /// - Parameter method: The `HTTPMethod`.
-        ///
-        /// - Returns:          Whether the URL-encoded string should be applied to a `URL`.
-        func encodesParametersInURL(for method: HTTPMethod) -> Bool {
-            switch self {
-            case .methodDependent: return [.get, .head, .delete].contains(method)
-            case .queryString: return true
-            case .httpBody: return false
-            }
-        }
-    }
-
-    /// Returns an encoder with default parameters.
-    public static var `default`: URLEncodedFormParameterEncoder { URLEncodedFormParameterEncoder() }
-
-    /// The `URLEncodedFormEncoder` to use.
-    public let encoder: URLEncodedFormEncoder
-
-    /// The `Destination` for the URL-encoded string.
-    public let destination: Destination
-
-    /// Creates an instance with the provided `URLEncodedFormEncoder` instance and `Destination` value.
-    ///
-    /// - Parameters:
-    ///   - encoder:     The `URLEncodedFormEncoder`. `URLEncodedFormEncoder()` by default.
-    ///   - destination: The `Destination`. `.methodDependent` by default.
-    public init(encoder: URLEncodedFormEncoder = URLEncodedFormEncoder(), destination: Destination = .methodDependent) {
-        self.encoder = encoder
-        self.destination = destination
-    }
-
-    open func encode<Parameters: Encodable>(_ parameters: Parameters?,
-                                            into request: URLRequest) throws -> URLRequest {
-        guard let parameters = parameters else { return request }
-
-        var request = request
-
-        guard let url = request.url else {
-            throw AFError.parameterEncoderFailed(reason: .missingRequiredComponent(.url))
-        }
-
-        guard let method = request.method else {
-            let rawValue = request.method?.rawValue ?? "nil"
-            throw AFError.parameterEncoderFailed(reason: .missingRequiredComponent(.httpMethod(rawValue: rawValue)))
-        }
-
-        if destination.encodesParametersInURL(for: method),
-           var components = URLComponents(url: url, resolvingAgainstBaseURL: false) {
-            let query: String = try Result<String, Error> { try encoder.encode(parameters) }
-                .mapError { AFError.parameterEncoderFailed(reason: .encoderFailed(error: $0)) }.get()
-            let newQueryString = [components.percentEncodedQuery, query].compactMap { $0 }.joinedWithAmpersands()
-            components.percentEncodedQuery = newQueryString.isEmpty ? nil : newQueryString
-
-            guard let newURL = components.url else {
-                throw AFError.parameterEncoderFailed(reason: .missingRequiredComponent(.url))
-            }
-
-            request.url = newURL
-        } else {
-            if request.headers["Content-Type"] == nil {
-                request.headers.update(.contentType("application/x-www-form-urlencoded; charset=utf-8"))
-            }
-
-            request.httpBody = try Result<Data, Error> { try encoder.encode(parameters) }
-                .mapError { AFError.parameterEncoderFailed(reason: .encoderFailed(error: $0)) }.get()
-        }
-
-        return request
-    }
-}
-
-#if swift(>=5.5)
-extension ParameterEncoder where Self == URLEncodedFormParameterEncoder {
-    /// Provides a default `URLEncodedFormParameterEncoder` instance.
-    public static var urlEncodedForm: URLEncodedFormParameterEncoder { URLEncodedFormParameterEncoder() }
-
-    /// Creates a `URLEncodedFormParameterEncoder` with the provided encoder and destination.
-    ///
-    /// - Parameters:
-    ///   - encoder:     `URLEncodedFormEncoder` used to encode the parameters. `URLEncodedFormEncoder()` by default.
-    ///   - destination: `Destination` to which to encode the parameters. `.methodDependent` by default.
-    /// - Returns:       The `URLEncodedFormParameterEncoder`.
-    public static func urlEncodedForm(encoder: URLEncodedFormEncoder = URLEncodedFormEncoder(),
-                                      destination: URLEncodedFormParameterEncoder.Destination = .methodDependent) -> URLEncodedFormParameterEncoder {
-        URLEncodedFormParameterEncoder(encoder: encoder, destination: destination)
-    }
-}
-#endif

+ 0 - 342
Pods/Alamofire/Source/ParameterEncoding.swift

@@ -1,342 +0,0 @@
-//
-//  ParameterEncoding.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 dictionary of parameters to apply to a `URLRequest`.
-public typealias Parameters = [String: Any]
-
-/// A type used to define how a set of parameters are applied to a `URLRequest`.
-public protocol ParameterEncoding {
-    /// Creates a `URLRequest` by encoding parameters and applying them on the passed request.
-    ///
-    /// - Parameters:
-    ///   - urlRequest: `URLRequestConvertible` value onto which parameters will be encoded.
-    ///   - parameters: `Parameters` to encode onto the request.
-    ///
-    /// - Returns:      The encoded `URLRequest`.
-    /// - Throws:       Any `Error` produced during parameter encoding.
-    func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest
-}
-
-// MARK: -
-
-/// Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP
-/// body of the URL request. Whether the query string is set or appended to any existing URL query string or set as
-/// the HTTP body depends on the destination of the encoding.
-///
-/// The `Content-Type` HTTP header field of an encoded request with HTTP body is set to
-/// `application/x-www-form-urlencoded; charset=utf-8`.
-///
-/// There is no published specification for how to encode collection types. By default the convention of appending
-/// `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for
-/// nested dictionary values (`foo[bar]=baz`) is used. Optionally, `ArrayEncoding` can be used to omit the
-/// square brackets appended to array keys.
-///
-/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode
-/// `true` as 1 and `false` as 0.
-public struct URLEncoding: ParameterEncoding {
-    // MARK: Helper Types
-
-    /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the
-    /// resulting URL request.
-    public enum Destination {
-        /// Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` requests and
-        /// sets as the HTTP body for requests with any other HTTP method.
-        case methodDependent
-        /// Sets or appends encoded query string result to existing query string.
-        case queryString
-        /// Sets encoded query string result as the HTTP body of the URL request.
-        case httpBody
-
-        func encodesParametersInURL(for method: HTTPMethod) -> Bool {
-            switch self {
-            case .methodDependent: return [.get, .head, .delete].contains(method)
-            case .queryString: return true
-            case .httpBody: return false
-            }
-        }
-    }
-
-    /// Configures how `Array` parameters are encoded.
-    public enum ArrayEncoding {
-        /// An empty set of square brackets is appended to the key for every value. This is the default behavior.
-        case brackets
-        /// No brackets are appended. The key is encoded as is.
-        case noBrackets
-        /// Brackets containing the item index are appended. This matches the jQuery and Node.js behavior.
-        case indexInBrackets
-
-        func encode(key: String, atIndex index: Int) -> String {
-            switch self {
-            case .brackets:
-                return "\(key)[]"
-            case .noBrackets:
-                return key
-            case .indexInBrackets:
-                return "\(key)[\(index)]"
-            }
-        }
-    }
-
-    /// Configures how `Bool` parameters are encoded.
-    public enum BoolEncoding {
-        /// Encode `true` as `1` and `false` as `0`. This is the default behavior.
-        case numeric
-        /// Encode `true` and `false` as string literals.
-        case literal
-
-        func encode(value: Bool) -> String {
-            switch self {
-            case .numeric:
-                return value ? "1" : "0"
-            case .literal:
-                return value ? "true" : "false"
-            }
-        }
-    }
-
-    // MARK: Properties
-
-    /// Returns a default `URLEncoding` instance with a `.methodDependent` destination.
-    public static var `default`: URLEncoding { URLEncoding() }
-
-    /// Returns a `URLEncoding` instance with a `.queryString` destination.
-    public static var queryString: URLEncoding { URLEncoding(destination: .queryString) }
-
-    /// Returns a `URLEncoding` instance with an `.httpBody` destination.
-    public static var httpBody: URLEncoding { URLEncoding(destination: .httpBody) }
-
-    /// The destination defining where the encoded query string is to be applied to the URL request.
-    public let destination: Destination
-
-    /// The encoding to use for `Array` parameters.
-    public let arrayEncoding: ArrayEncoding
-
-    /// The encoding to use for `Bool` parameters.
-    public let boolEncoding: BoolEncoding
-
-    // MARK: Initialization
-
-    /// Creates an instance using the specified parameters.
-    ///
-    /// - Parameters:
-    ///   - destination:   `Destination` defining where the encoded query string will be applied. `.methodDependent` by
-    ///                    default.
-    ///   - arrayEncoding: `ArrayEncoding` to use. `.brackets` by default.
-    ///   - boolEncoding:  `BoolEncoding` to use. `.numeric` by default.
-    public init(destination: Destination = .methodDependent,
-                arrayEncoding: ArrayEncoding = .brackets,
-                boolEncoding: BoolEncoding = .numeric) {
-        self.destination = destination
-        self.arrayEncoding = arrayEncoding
-        self.boolEncoding = boolEncoding
-    }
-
-    // MARK: Encoding
-
-    public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
-        var urlRequest = try urlRequest.asURLRequest()
-
-        guard let parameters = parameters else { return urlRequest }
-
-        if let method = urlRequest.method, destination.encodesParametersInURL(for: method) {
-            guard let url = urlRequest.url else {
-                throw AFError.parameterEncodingFailed(reason: .missingURL)
-            }
-
-            if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty {
-                let percentEncodedQuery = (urlComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters)
-                urlComponents.percentEncodedQuery = percentEncodedQuery
-                urlRequest.url = urlComponents.url
-            }
-        } else {
-            if urlRequest.headers["Content-Type"] == nil {
-                urlRequest.headers.update(.contentType("application/x-www-form-urlencoded; charset=utf-8"))
-            }
-
-            urlRequest.httpBody = Data(query(parameters).utf8)
-        }
-
-        return urlRequest
-    }
-
-    /// Creates a percent-escaped, URL encoded query string components from the given key-value pair recursively.
-    ///
-    /// - Parameters:
-    ///   - key:   Key of the query component.
-    ///   - value: Value of the query component.
-    ///
-    /// - Returns: The percent-escaped, URL encoded query string components.
-    public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] {
-        var components: [(String, String)] = []
-        switch value {
-        case let dictionary as [String: Any]:
-            for (nestedKey, value) in dictionary {
-                components += queryComponents(fromKey: "\(key)[\(nestedKey)]", value: value)
-            }
-        case let array as [Any]:
-            for (index, value) in array.enumerated() {
-                components += queryComponents(fromKey: arrayEncoding.encode(key: key, atIndex: index), value: value)
-            }
-        case let number as NSNumber:
-            if number.isBool {
-                components.append((escape(key), escape(boolEncoding.encode(value: number.boolValue))))
-            } else {
-                components.append((escape(key), escape("\(number)")))
-            }
-        case let bool as Bool:
-            components.append((escape(key), escape(boolEncoding.encode(value: bool))))
-        default:
-            components.append((escape(key), escape("\(value)")))
-        }
-        return components
-    }
-
-    /// Creates a percent-escaped string following RFC 3986 for a query string key or value.
-    ///
-    /// - Parameter string: `String` to be percent-escaped.
-    ///
-    /// - Returns:          The percent-escaped `String`.
-    public func escape(_ string: String) -> String {
-        string.addingPercentEncoding(withAllowedCharacters: .afURLQueryAllowed) ?? string
-    }
-
-    private func query(_ parameters: [String: Any]) -> String {
-        var components: [(String, String)] = []
-
-        for key in parameters.keys.sorted(by: <) {
-            let value = parameters[key]!
-            components += queryComponents(fromKey: key, value: value)
-        }
-        return components.map { "\($0)=\($1)" }.joined(separator: "&")
-    }
-}
-
-// MARK: -
-
-/// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the
-/// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`.
-public struct JSONEncoding: ParameterEncoding {
-    public enum Error: Swift.Error {
-        case invalidJSONObject
-    }
-
-    // MARK: Properties
-
-    /// Returns a `JSONEncoding` instance with default writing options.
-    public static var `default`: JSONEncoding { JSONEncoding() }
-
-    /// Returns a `JSONEncoding` instance with `.prettyPrinted` writing options.
-    public static var prettyPrinted: JSONEncoding { JSONEncoding(options: .prettyPrinted) }
-
-    /// The options for writing the parameters as JSON data.
-    public let options: JSONSerialization.WritingOptions
-
-    // MARK: Initialization
-
-    /// Creates an instance using the specified `WritingOptions`.
-    ///
-    /// - Parameter options: `JSONSerialization.WritingOptions` to use.
-    public init(options: JSONSerialization.WritingOptions = []) {
-        self.options = options
-    }
-
-    // MARK: Encoding
-
-    public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
-        var urlRequest = try urlRequest.asURLRequest()
-
-        guard let parameters = parameters else { return urlRequest }
-
-        guard JSONSerialization.isValidJSONObject(parameters) else {
-            throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: Error.invalidJSONObject))
-        }
-
-        do {
-            let data = try JSONSerialization.data(withJSONObject: parameters, options: options)
-
-            if urlRequest.headers["Content-Type"] == nil {
-                urlRequest.headers.update(.contentType("application/json"))
-            }
-
-            urlRequest.httpBody = data
-        } catch {
-            throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error))
-        }
-
-        return urlRequest
-    }
-
-    /// Encodes any JSON compatible object into a `URLRequest`.
-    ///
-    /// - Parameters:
-    ///   - urlRequest: `URLRequestConvertible` value into which the object will be encoded.
-    ///   - jsonObject: `Any` value (must be JSON compatible` to be encoded into the `URLRequest`. `nil` by default.
-    ///
-    /// - Returns:      The encoded `URLRequest`.
-    /// - Throws:       Any `Error` produced during encoding.
-    public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest {
-        var urlRequest = try urlRequest.asURLRequest()
-
-        guard let jsonObject = jsonObject else { return urlRequest }
-
-        guard JSONSerialization.isValidJSONObject(jsonObject) else {
-            throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: Error.invalidJSONObject))
-        }
-
-        do {
-            let data = try JSONSerialization.data(withJSONObject: jsonObject, options: options)
-
-            if urlRequest.headers["Content-Type"] == nil {
-                urlRequest.headers.update(.contentType("application/json"))
-            }
-
-            urlRequest.httpBody = data
-        } catch {
-            throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error))
-        }
-
-        return urlRequest
-    }
-}
-
-extension JSONEncoding.Error {
-    public var localizedDescription: String {
-        """
-        Invalid JSON object provided for parameter or object encoding. \
-        This is most likely due to a value which can't be represented in Objective-C.
-        """
-    }
-}
-
-// MARK: -
-
-extension NSNumber {
-    fileprivate var isBool: Bool {
-        // Use Obj-C type encoding to check whether the underlying type is a `Bool`, as it's guaranteed as part of
-        // swift-corelibs-foundation, per [this discussion on the Swift forums](https://forums.swift.org/t/alamofire-on-linux-possible-but-not-release-ready/34553/22).
-        String(cString: objCType) == "c"
-    }
-}

+ 0 - 161
Pods/Alamofire/Source/Protected.swift

@@ -1,161 +0,0 @@
-//
-//  Protected.swift
-//
-//  Copyright (c) 2014-2020 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-private protocol Lock {
-    func lock()
-    func unlock()
-}
-
-extension Lock {
-    /// Executes a closure returning a value while acquiring the lock.
-    ///
-    /// - Parameter closure: The closure to run.
-    ///
-    /// - Returns:           The value the closure generated.
-    func around<T>(_ closure: () throws -> T) rethrows -> T {
-        lock(); defer { unlock() }
-        return try closure()
-    }
-
-    /// Execute a closure while acquiring the lock.
-    ///
-    /// - Parameter closure: The closure to run.
-    func around(_ closure: () throws -> Void) rethrows {
-        lock(); defer { unlock() }
-        try closure()
-    }
-}
-
-#if os(Linux) || os(Windows)
-
-extension NSLock: Lock {}
-
-#endif
-
-#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
-/// An `os_unfair_lock` wrapper.
-final class UnfairLock: Lock {
-    private let unfairLock: os_unfair_lock_t
-
-    init() {
-        unfairLock = .allocate(capacity: 1)
-        unfairLock.initialize(to: os_unfair_lock())
-    }
-
-    deinit {
-        unfairLock.deinitialize(count: 1)
-        unfairLock.deallocate()
-    }
-
-    fileprivate func lock() {
-        os_unfair_lock_lock(unfairLock)
-    }
-
-    fileprivate func unlock() {
-        os_unfair_lock_unlock(unfairLock)
-    }
-}
-#endif
-
-/// A thread-safe wrapper around a value.
-@propertyWrapper
-@dynamicMemberLookup
-final class Protected<T> {
-    #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
-    private let lock = UnfairLock()
-    #elseif os(Linux) || os(Windows)
-    private let lock = NSLock()
-    #endif
-    private var value: T
-
-    init(_ value: T) {
-        self.value = value
-    }
-
-    /// The contained value. Unsafe for anything more than direct read or write.
-    var wrappedValue: T {
-        get { lock.around { value } }
-        set { lock.around { value = newValue } }
-    }
-
-    var projectedValue: Protected<T> { self }
-
-    init(wrappedValue: T) {
-        value = wrappedValue
-    }
-
-    /// Synchronously read or transform the contained value.
-    ///
-    /// - Parameter closure: The closure to execute.
-    ///
-    /// - Returns:           The return value of the closure passed.
-    func read<U>(_ closure: (T) throws -> U) rethrows -> U {
-        try lock.around { try closure(self.value) }
-    }
-
-    /// Synchronously modify the protected value.
-    ///
-    /// - Parameter closure: The closure to execute.
-    ///
-    /// - Returns:           The modified value.
-    @discardableResult
-    func write<U>(_ closure: (inout T) throws -> U) rethrows -> U {
-        try lock.around { try closure(&self.value) }
-    }
-
-    subscript<Property>(dynamicMember keyPath: WritableKeyPath<T, Property>) -> Property {
-        get { lock.around { value[keyPath: keyPath] } }
-        set { lock.around { value[keyPath: keyPath] = newValue } }
-    }
-
-    subscript<Property>(dynamicMember keyPath: KeyPath<T, Property>) -> Property {
-        lock.around { value[keyPath: keyPath] }
-    }
-}
-
-extension Protected where T == Request.MutableState {
-    /// Attempts to transition to the passed `State`.
-    ///
-    /// - Parameter state: The `State` to attempt transition to.
-    ///
-    /// - Returns:         Whether the transition occurred.
-    func attemptToTransitionTo(_ state: Request.State) -> Bool {
-        lock.around {
-            guard value.state.canTransitionTo(state) else { return false }
-
-            value.state = state
-
-            return true
-        }
-    }
-
-    /// Perform a closure while locked with the provided `Request.State`.
-    ///
-    /// - Parameter perform: The closure to perform while locked.
-    func withState(perform: (Request.State) -> Void) {
-        lock.around { perform(value.state) }
-    }
-}

+ 0 - 113
Pods/Alamofire/Source/RedirectHandler.swift

@@ -1,113 +0,0 @@
-//
-//  RedirectHandler.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 type that handles how an HTTP redirect response from a remote server should be redirected to the new request.
-public protocol RedirectHandler {
-    /// Determines how the HTTP redirect response should be redirected to the new request.
-    ///
-    /// The `completion` closure should be passed one of three possible options:
-    ///
-    ///   1. The new request specified by the redirect (this is the most common use case).
-    ///   2. A modified version of the new request (you may want to route it somewhere else).
-    ///   3. A `nil` value to deny the redirect request and return the body of the redirect response.
-    ///
-    /// - Parameters:
-    ///   - task:       The `URLSessionTask` whose request resulted in a redirect.
-    ///   - request:    The `URLRequest` to the new location specified by the redirect response.
-    ///   - response:   The `HTTPURLResponse` containing the server's response to the original request.
-    ///   - completion: The closure to execute containing the new `URLRequest`, a modified `URLRequest`, or `nil`.
-    func task(_ task: URLSessionTask,
-              willBeRedirectedTo request: URLRequest,
-              for response: HTTPURLResponse,
-              completion: @escaping (URLRequest?) -> Void)
-}
-
-// MARK: -
-
-/// `Redirector` is a convenience `RedirectHandler` making it easy to follow, not follow, or modify a redirect.
-public struct Redirector {
-    /// Defines the behavior of the `Redirector` type.
-    public enum Behavior {
-        /// Follow the redirect as defined in the response.
-        case follow
-        /// Do not follow the redirect defined in the response.
-        case doNotFollow
-        /// Modify the redirect request defined in the response.
-        case modify((URLSessionTask, URLRequest, HTTPURLResponse) -> URLRequest?)
-    }
-
-    /// Returns a `Redirector` with a `.follow` `Behavior`.
-    public static let follow = Redirector(behavior: .follow)
-    /// Returns a `Redirector` with a `.doNotFollow` `Behavior`.
-    public static let doNotFollow = Redirector(behavior: .doNotFollow)
-
-    /// The `Behavior` of the `Redirector`.
-    public let behavior: Behavior
-
-    /// Creates a `Redirector` instance from the `Behavior`.
-    ///
-    /// - Parameter behavior: The `Behavior`.
-    public init(behavior: Behavior) {
-        self.behavior = behavior
-    }
-}
-
-// MARK: -
-
-extension Redirector: RedirectHandler {
-    public func task(_ task: URLSessionTask,
-                     willBeRedirectedTo request: URLRequest,
-                     for response: HTTPURLResponse,
-                     completion: @escaping (URLRequest?) -> Void) {
-        switch behavior {
-        case .follow:
-            completion(request)
-        case .doNotFollow:
-            completion(nil)
-        case let .modify(closure):
-            let request = closure(task, request, response)
-            completion(request)
-        }
-    }
-}
-
-#if swift(>=5.5)
-extension RedirectHandler where Self == Redirector {
-    /// Provides a `Redirector` which follows redirects. Equivalent to `Redirector.follow`.
-    public static var follow: Redirector { .follow }
-
-    /// Provides a `Redirector` which does not follow redirects. Equivalent to `Redirector.doNotFollow`.
-    public static var doNotFollow: Redirector { .doNotFollow }
-
-    /// Creates a `Redirector` which modifies the redirected `URLRequest` using the provided closure.
-    ///
-    /// - Parameter closure: Closure used to modify the redirect.
-    /// - Returns:           The `Redirector`.
-    public static func modify(using closure: @escaping (URLSessionTask, URLRequest, HTTPURLResponse) -> URLRequest?) -> Redirector {
-        Redirector(behavior: .modify(closure))
-    }
-}
-#endif

+ 0 - 1912
Pods/Alamofire/Source/Request.swift

@@ -1,1912 +0,0 @@
-//
-//  Request.swift
-//
-//  Copyright (c) 2014-2020 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// `Request` is the common superclass of all Alamofire request types and provides common state, delegate, and callback
-/// handling.
-public class Request {
-    /// State of the `Request`, with managed transitions between states set when calling `resume()`, `suspend()`, or
-    /// `cancel()` on the `Request`.
-    public enum State {
-        /// Initial state of the `Request`.
-        case initialized
-        /// `State` set when `resume()` is called. Any tasks created for the `Request` will have `resume()` called on
-        /// them in this state.
-        case resumed
-        /// `State` set when `suspend()` is called. Any tasks created for the `Request` will have `suspend()` called on
-        /// them in this state.
-        case suspended
-        /// `State` set when `cancel()` is called. Any tasks created for the `Request` will have `cancel()` called on
-        /// them. Unlike `resumed` or `suspended`, once in the `cancelled` state, the `Request` can no longer transition
-        /// to any other state.
-        case cancelled
-        /// `State` set when all response serialization completion closures have been cleared on the `Request` and
-        /// enqueued on their respective queues.
-        case finished
-
-        /// Determines whether `self` can be transitioned to the provided `State`.
-        func canTransitionTo(_ state: State) -> Bool {
-            switch (self, state) {
-            case (.initialized, _):
-                return true
-            case (_, .initialized), (.cancelled, _), (.finished, _):
-                return false
-            case (.resumed, .cancelled), (.suspended, .cancelled), (.resumed, .suspended), (.suspended, .resumed):
-                return true
-            case (.suspended, .suspended), (.resumed, .resumed):
-                return false
-            case (_, .finished):
-                return true
-            }
-        }
-    }
-
-    // MARK: - Initial State
-
-    /// `UUID` providing a unique identifier for the `Request`, used in the `Hashable` and `Equatable` conformances.
-    public let id: UUID
-    /// The serial queue for all internal async actions.
-    public let underlyingQueue: DispatchQueue
-    /// The queue used for all serialization actions. By default it's a serial queue that targets `underlyingQueue`.
-    public let serializationQueue: DispatchQueue
-    /// `EventMonitor` used for event callbacks.
-    public let eventMonitor: EventMonitor?
-    /// The `Request`'s interceptor.
-    public let interceptor: RequestInterceptor?
-    /// The `Request`'s delegate.
-    public private(set) weak var delegate: RequestDelegate?
-
-    // MARK: - Mutable State
-
-    /// Type encapsulating all mutable state that may need to be accessed from anything other than the `underlyingQueue`.
-    struct MutableState {
-        /// State of the `Request`.
-        var state: State = .initialized
-        /// `ProgressHandler` and `DispatchQueue` provided for upload progress callbacks.
-        var uploadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)?
-        /// `ProgressHandler` and `DispatchQueue` provided for download progress callbacks.
-        var downloadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)?
-        /// `RedirectHandler` provided for to handle request redirection.
-        var redirectHandler: RedirectHandler?
-        /// `CachedResponseHandler` provided to handle response caching.
-        var cachedResponseHandler: CachedResponseHandler?
-        /// Queue and closure called when the `Request` is able to create a cURL description of itself.
-        var cURLHandler: (queue: DispatchQueue, handler: (String) -> Void)?
-        /// Queue and closure called when the `Request` creates a `URLRequest`.
-        var urlRequestHandler: (queue: DispatchQueue, handler: (URLRequest) -> Void)?
-        /// Queue and closure called when the `Request` creates a `URLSessionTask`.
-        var urlSessionTaskHandler: (queue: DispatchQueue, handler: (URLSessionTask) -> Void)?
-        /// Response serialization closures that handle response parsing.
-        var responseSerializers: [() -> Void] = []
-        /// Response serialization completion closures executed once all response serializers are complete.
-        var responseSerializerCompletions: [() -> Void] = []
-        /// Whether response serializer processing is finished.
-        var responseSerializerProcessingFinished = false
-        /// `URLCredential` used for authentication challenges.
-        var credential: URLCredential?
-        /// All `URLRequest`s created by Alamofire on behalf of the `Request`.
-        var requests: [URLRequest] = []
-        /// All `URLSessionTask`s created by Alamofire on behalf of the `Request`.
-        var tasks: [URLSessionTask] = []
-        /// All `URLSessionTaskMetrics` values gathered by Alamofire on behalf of the `Request`. Should correspond
-        /// exactly the the `tasks` created.
-        var metrics: [URLSessionTaskMetrics] = []
-        /// Number of times any retriers provided retried the `Request`.
-        var retryCount = 0
-        /// Final `AFError` for the `Request`, whether from various internal Alamofire calls or as a result of a `task`.
-        var error: AFError?
-        /// Whether the instance has had `finish()` called and is running the serializers. Should be replaced with a
-        /// representation in the state machine in the future.
-        var isFinishing = false
-        /// Actions to run when requests are finished. Use for concurrency support.
-        var finishHandlers: [() -> Void] = []
-    }
-
-    /// Protected `MutableState` value that provides thread-safe access to state values.
-    @Protected
-    fileprivate var mutableState = MutableState()
-
-    /// `State` of the `Request`.
-    public var state: State { $mutableState.state }
-    /// Returns whether `state` is `.initialized`.
-    public var isInitialized: Bool { state == .initialized }
-    /// Returns whether `state is `.resumed`.
-    public var isResumed: Bool { state == .resumed }
-    /// Returns whether `state` is `.suspended`.
-    public var isSuspended: Bool { state == .suspended }
-    /// Returns whether `state` is `.cancelled`.
-    public var isCancelled: Bool { state == .cancelled }
-    /// Returns whether `state` is `.finished`.
-    public var isFinished: Bool { state == .finished }
-
-    // MARK: Progress
-
-    /// Closure type executed when monitoring the upload or download progress of a request.
-    public typealias ProgressHandler = (Progress) -> Void
-
-    /// `Progress` of the upload of the body of the executed `URLRequest`. Reset to `0` if the `Request` is retried.
-    public let uploadProgress = Progress(totalUnitCount: 0)
-    /// `Progress` of the download of any response data. Reset to `0` if the `Request` is retried.
-    public let downloadProgress = Progress(totalUnitCount: 0)
-    /// `ProgressHandler` called when `uploadProgress` is updated, on the provided `DispatchQueue`.
-    private var uploadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? {
-        get { $mutableState.uploadProgressHandler }
-        set { $mutableState.uploadProgressHandler = newValue }
-    }
-
-    /// `ProgressHandler` called when `downloadProgress` is updated, on the provided `DispatchQueue`.
-    fileprivate var downloadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? {
-        get { $mutableState.downloadProgressHandler }
-        set { $mutableState.downloadProgressHandler = newValue }
-    }
-
-    // MARK: Redirect Handling
-
-    /// `RedirectHandler` set on the instance.
-    public private(set) var redirectHandler: RedirectHandler? {
-        get { $mutableState.redirectHandler }
-        set { $mutableState.redirectHandler = newValue }
-    }
-
-    // MARK: Cached Response Handling
-
-    /// `CachedResponseHandler` set on the instance.
-    public private(set) var cachedResponseHandler: CachedResponseHandler? {
-        get { $mutableState.cachedResponseHandler }
-        set { $mutableState.cachedResponseHandler = newValue }
-    }
-
-    // MARK: URLCredential
-
-    /// `URLCredential` used for authentication challenges. Created by calling one of the `authenticate` methods.
-    public private(set) var credential: URLCredential? {
-        get { $mutableState.credential }
-        set { $mutableState.credential = newValue }
-    }
-
-    // MARK: Validators
-
-    /// `Validator` callback closures that store the validation calls enqueued.
-    @Protected
-    fileprivate var validators: [() -> Void] = []
-
-    // MARK: URLRequests
-
-    /// All `URLRequests` created on behalf of the `Request`, including original and adapted requests.
-    public var requests: [URLRequest] { $mutableState.requests }
-    /// First `URLRequest` created on behalf of the `Request`. May not be the first one actually executed.
-    public var firstRequest: URLRequest? { requests.first }
-    /// Last `URLRequest` created on behalf of the `Request`.
-    public var lastRequest: URLRequest? { requests.last }
-    /// Current `URLRequest` created on behalf of the `Request`.
-    public var request: URLRequest? { lastRequest }
-
-    /// `URLRequest`s from all of the `URLSessionTask`s executed on behalf of the `Request`. May be different from
-    /// `requests` due to `URLSession` manipulation.
-    public var performedRequests: [URLRequest] { $mutableState.read { $0.tasks.compactMap(\.currentRequest) } }
-
-    // MARK: HTTPURLResponse
-
-    /// `HTTPURLResponse` received from the server, if any. If the `Request` was retried, this is the response of the
-    /// last `URLSessionTask`.
-    public var response: HTTPURLResponse? { lastTask?.response as? HTTPURLResponse }
-
-    // MARK: Tasks
-
-    /// All `URLSessionTask`s created on behalf of the `Request`.
-    public var tasks: [URLSessionTask] { $mutableState.tasks }
-    /// First `URLSessionTask` created on behalf of the `Request`.
-    public var firstTask: URLSessionTask? { tasks.first }
-    /// Last `URLSessionTask` crated on behalf of the `Request`.
-    public var lastTask: URLSessionTask? { tasks.last }
-    /// Current `URLSessionTask` created on behalf of the `Request`.
-    public var task: URLSessionTask? { lastTask }
-
-    // MARK: Metrics
-
-    /// All `URLSessionTaskMetrics` gathered on behalf of the `Request`. Should correspond to the `tasks` created.
-    public var allMetrics: [URLSessionTaskMetrics] { $mutableState.metrics }
-    /// First `URLSessionTaskMetrics` gathered on behalf of the `Request`.
-    public var firstMetrics: URLSessionTaskMetrics? { allMetrics.first }
-    /// Last `URLSessionTaskMetrics` gathered on behalf of the `Request`.
-    public var lastMetrics: URLSessionTaskMetrics? { allMetrics.last }
-    /// Current `URLSessionTaskMetrics` gathered on behalf of the `Request`.
-    public var metrics: URLSessionTaskMetrics? { lastMetrics }
-
-    // MARK: Retry Count
-
-    /// Number of times the `Request` has been retried.
-    public var retryCount: Int { $mutableState.retryCount }
-
-    // MARK: Error
-
-    /// `Error` returned from Alamofire internally, from the network request directly, or any validators executed.
-    public fileprivate(set) var error: AFError? {
-        get { $mutableState.error }
-        set { $mutableState.error = newValue }
-    }
-
-    /// Default initializer for the `Request` superclass.
-    ///
-    /// - Parameters:
-    ///   - id:                 `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default.
-    ///   - underlyingQueue:    `DispatchQueue` on which all internal `Request` work is performed.
-    ///   - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets
-    ///                         `underlyingQueue`, but can be passed another queue from a `Session`.
-    ///   - eventMonitor:       `EventMonitor` called for event callbacks from internal `Request` actions.
-    ///   - interceptor:        `RequestInterceptor` used throughout the request lifecycle.
-    ///   - delegate:           `RequestDelegate` that provides an interface to actions not performed by the `Request`.
-    init(id: UUID = UUID(),
-         underlyingQueue: DispatchQueue,
-         serializationQueue: DispatchQueue,
-         eventMonitor: EventMonitor?,
-         interceptor: RequestInterceptor?,
-         delegate: RequestDelegate) {
-        self.id = id
-        self.underlyingQueue = underlyingQueue
-        self.serializationQueue = serializationQueue
-        self.eventMonitor = eventMonitor
-        self.interceptor = interceptor
-        self.delegate = delegate
-    }
-
-    // MARK: - Internal Event API
-
-    // All API must be called from underlyingQueue.
-
-    /// Called when an initial `URLRequest` has been created on behalf of the instance. If a `RequestAdapter` is active,
-    /// the `URLRequest` will be adapted before being issued.
-    ///
-    /// - Parameter request: The `URLRequest` created.
-    func didCreateInitialURLRequest(_ request: URLRequest) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        $mutableState.write { $0.requests.append(request) }
-
-        eventMonitor?.request(self, didCreateInitialURLRequest: request)
-    }
-
-    /// Called when initial `URLRequest` creation has failed, typically through a `URLRequestConvertible`.
-    ///
-    /// - Note: Triggers retry.
-    ///
-    /// - Parameter error: `AFError` thrown from the failed creation.
-    func didFailToCreateURLRequest(with error: AFError) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        self.error = error
-
-        eventMonitor?.request(self, didFailToCreateURLRequestWithError: error)
-
-        callCURLHandlerIfNecessary()
-
-        retryOrFinish(error: error)
-    }
-
-    /// Called when a `RequestAdapter` has successfully adapted a `URLRequest`.
-    ///
-    /// - Parameters:
-    ///   - initialRequest: The `URLRequest` that was adapted.
-    ///   - adaptedRequest: The `URLRequest` returned by the `RequestAdapter`.
-    func didAdaptInitialRequest(_ initialRequest: URLRequest, to adaptedRequest: URLRequest) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        $mutableState.write { $0.requests.append(adaptedRequest) }
-
-        eventMonitor?.request(self, didAdaptInitialRequest: initialRequest, to: adaptedRequest)
-    }
-
-    /// Called when a `RequestAdapter` fails to adapt a `URLRequest`.
-    ///
-    /// - Note: Triggers retry.
-    ///
-    /// - Parameters:
-    ///   - request: The `URLRequest` the adapter was called with.
-    ///   - error:   The `AFError` returned by the `RequestAdapter`.
-    func didFailToAdaptURLRequest(_ request: URLRequest, withError error: AFError) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        self.error = error
-
-        eventMonitor?.request(self, didFailToAdaptURLRequest: request, withError: error)
-
-        callCURLHandlerIfNecessary()
-
-        retryOrFinish(error: error)
-    }
-
-    /// Final `URLRequest` has been created for the instance.
-    ///
-    /// - Parameter request: The `URLRequest` created.
-    func didCreateURLRequest(_ request: URLRequest) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        $mutableState.read { state in
-            state.urlRequestHandler?.queue.async { state.urlRequestHandler?.handler(request) }
-        }
-
-        eventMonitor?.request(self, didCreateURLRequest: request)
-
-        callCURLHandlerIfNecessary()
-    }
-
-    /// Asynchronously calls any stored `cURLHandler` and then removes it from `mutableState`.
-    private func callCURLHandlerIfNecessary() {
-        $mutableState.write { mutableState in
-            guard let cURLHandler = mutableState.cURLHandler else { return }
-
-            cURLHandler.queue.async { cURLHandler.handler(self.cURLDescription()) }
-
-            mutableState.cURLHandler = nil
-        }
-    }
-
-    /// Called when a `URLSessionTask` is created on behalf of the instance.
-    ///
-    /// - Parameter task: The `URLSessionTask` created.
-    func didCreateTask(_ task: URLSessionTask) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        $mutableState.write { state in
-            state.tasks.append(task)
-
-            guard let urlSessionTaskHandler = state.urlSessionTaskHandler else { return }
-
-            urlSessionTaskHandler.queue.async { urlSessionTaskHandler.handler(task) }
-        }
-
-        eventMonitor?.request(self, didCreateTask: task)
-    }
-
-    /// Called when resumption is completed.
-    func didResume() {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        eventMonitor?.requestDidResume(self)
-    }
-
-    /// Called when a `URLSessionTask` is resumed on behalf of the instance.
-    ///
-    /// - Parameter task: The `URLSessionTask` resumed.
-    func didResumeTask(_ task: URLSessionTask) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        eventMonitor?.request(self, didResumeTask: task)
-    }
-
-    /// Called when suspension is completed.
-    func didSuspend() {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        eventMonitor?.requestDidSuspend(self)
-    }
-
-    /// Called when a `URLSessionTask` is suspended on behalf of the instance.
-    ///
-    /// - Parameter task: The `URLSessionTask` suspended.
-    func didSuspendTask(_ task: URLSessionTask) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        eventMonitor?.request(self, didSuspendTask: task)
-    }
-
-    /// Called when cancellation is completed, sets `error` to `AFError.explicitlyCancelled`.
-    func didCancel() {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        error = error ?? AFError.explicitlyCancelled
-
-        eventMonitor?.requestDidCancel(self)
-    }
-
-    /// Called when a `URLSessionTask` is cancelled on behalf of the instance.
-    ///
-    /// - Parameter task: The `URLSessionTask` cancelled.
-    func didCancelTask(_ task: URLSessionTask) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        eventMonitor?.request(self, didCancelTask: task)
-    }
-
-    /// Called when a `URLSessionTaskMetrics` value is gathered on behalf of the instance.
-    ///
-    /// - Parameter metrics: The `URLSessionTaskMetrics` gathered.
-    func didGatherMetrics(_ metrics: URLSessionTaskMetrics) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        $mutableState.write { $0.metrics.append(metrics) }
-
-        eventMonitor?.request(self, didGatherMetrics: metrics)
-    }
-
-    /// Called when a `URLSessionTask` fails before it is finished, typically during certificate pinning.
-    ///
-    /// - Parameters:
-    ///   - task:  The `URLSessionTask` which failed.
-    ///   - error: The early failure `AFError`.
-    func didFailTask(_ task: URLSessionTask, earlyWithError error: AFError) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        self.error = error
-
-        // Task will still complete, so didCompleteTask(_:with:) will handle retry.
-        eventMonitor?.request(self, didFailTask: task, earlyWithError: error)
-    }
-
-    /// Called when a `URLSessionTask` completes. All tasks will eventually call this method.
-    ///
-    /// - Note: Response validation is synchronously triggered in this step.
-    ///
-    /// - Parameters:
-    ///   - task:  The `URLSessionTask` which completed.
-    ///   - error: The `AFError` `task` may have completed with. If `error` has already been set on the instance, this
-    ///            value is ignored.
-    func didCompleteTask(_ task: URLSessionTask, with error: AFError?) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        self.error = self.error ?? error
-
-        validators.forEach { $0() }
-
-        eventMonitor?.request(self, didCompleteTask: task, with: error)
-
-        retryOrFinish(error: self.error)
-    }
-
-    /// Called when the `RequestDelegate` is going to retry this `Request`. Calls `reset()`.
-    func prepareForRetry() {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        $mutableState.write { $0.retryCount += 1 }
-
-        reset()
-
-        eventMonitor?.requestIsRetrying(self)
-    }
-
-    /// Called to determine whether retry will be triggered for the particular error, or whether the instance should
-    /// call `finish()`.
-    ///
-    /// - Parameter error: The possible `AFError` which may trigger retry.
-    func retryOrFinish(error: AFError?) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        guard !isCancelled, let error = error, let delegate = delegate else { finish(); return }
-
-        delegate.retryResult(for: self, dueTo: error) { retryResult in
-            switch retryResult {
-            case .doNotRetry:
-                self.finish()
-            case let .doNotRetryWithError(retryError):
-                self.finish(error: retryError.asAFError(orFailWith: "Received retryError was not already AFError"))
-            case .retry, .retryWithDelay:
-                delegate.retryRequest(self, withDelay: retryResult.delay)
-            }
-        }
-    }
-
-    /// Finishes this `Request` and starts the response serializers.
-    ///
-    /// - Parameter error: The possible `Error` with which the instance will finish.
-    func finish(error: AFError? = nil) {
-        dispatchPrecondition(condition: .onQueue(underlyingQueue))
-
-        guard !$mutableState.isFinishing else { return }
-
-        $mutableState.isFinishing = true
-
-        if let error = error { self.error = error }
-
-        // Start response handlers
-        processNextResponseSerializer()
-
-        eventMonitor?.requestDidFinish(self)
-    }
-
-    /// Appends the response serialization closure to the instance.
-    ///
-    ///  - Note: This method will also `resume` the instance if `delegate.startImmediately` returns `true`.
-    ///
-    /// - Parameter closure: The closure containing the response serialization call.
-    func appendResponseSerializer(_ closure: @escaping () -> Void) {
-        $mutableState.write { mutableState in
-            mutableState.responseSerializers.append(closure)
-
-            if mutableState.state == .finished {
-                mutableState.state = .resumed
-            }
-
-            if mutableState.responseSerializerProcessingFinished {
-                underlyingQueue.async { self.processNextResponseSerializer() }
-            }
-
-            if mutableState.state.canTransitionTo(.resumed) {
-                underlyingQueue.async { if self.delegate?.startImmediately == true { self.resume() } }
-            }
-        }
-    }
-
-    /// Returns the next response serializer closure to execute if there's one left.
-    ///
-    /// - Returns: The next response serialization closure, if there is one.
-    func nextResponseSerializer() -> (() -> Void)? {
-        var responseSerializer: (() -> Void)?
-
-        $mutableState.write { mutableState in
-            let responseSerializerIndex = mutableState.responseSerializerCompletions.count
-
-            if responseSerializerIndex < mutableState.responseSerializers.count {
-                responseSerializer = mutableState.responseSerializers[responseSerializerIndex]
-            }
-        }
-
-        return responseSerializer
-    }
-
-    /// Processes the next response serializer and calls all completions if response serialization is complete.
-    func processNextResponseSerializer() {
-        guard let responseSerializer = nextResponseSerializer() else {
-            // Execute all response serializer completions and clear them
-            var completions: [() -> Void] = []
-
-            $mutableState.write { mutableState in
-                completions = mutableState.responseSerializerCompletions
-
-                // Clear out all response serializers and response serializer completions in mutable state since the
-                // request is complete. It's important to do this prior to calling the completion closures in case
-                // the completions call back into the request triggering a re-processing of the response serializers.
-                // An example of how this can happen is by calling cancel inside a response completion closure.
-                mutableState.responseSerializers.removeAll()
-                mutableState.responseSerializerCompletions.removeAll()
-
-                if mutableState.state.canTransitionTo(.finished) {
-                    mutableState.state = .finished
-                }
-
-                mutableState.responseSerializerProcessingFinished = true
-                mutableState.isFinishing = false
-            }
-
-            completions.forEach { $0() }
-
-            // Cleanup the request
-            cleanup()
-
-            return
-        }
-
-        serializationQueue.async { responseSerializer() }
-    }
-
-    /// Notifies the `Request` that the response serializer is complete.
-    ///
-    /// - Parameter completion: The completion handler provided with the response serializer, called when all serializers
-    ///                         are complete.
-    func responseSerializerDidComplete(completion: @escaping () -> Void) {
-        $mutableState.write { $0.responseSerializerCompletions.append(completion) }
-        processNextResponseSerializer()
-    }
-
-    /// Resets all task and response serializer related state for retry.
-    func reset() {
-        error = nil
-
-        uploadProgress.totalUnitCount = 0
-        uploadProgress.completedUnitCount = 0
-        downloadProgress.totalUnitCount = 0
-        downloadProgress.completedUnitCount = 0
-
-        $mutableState.write { state in
-            state.isFinishing = false
-            state.responseSerializerCompletions = []
-        }
-    }
-
-    /// Called when updating the upload progress.
-    ///
-    /// - Parameters:
-    ///   - totalBytesSent: Total bytes sent so far.
-    ///   - totalBytesExpectedToSend: Total bytes expected to send.
-    func updateUploadProgress(totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
-        uploadProgress.totalUnitCount = totalBytesExpectedToSend
-        uploadProgress.completedUnitCount = totalBytesSent
-
-        uploadProgressHandler?.queue.async { self.uploadProgressHandler?.handler(self.uploadProgress) }
-    }
-
-    /// Perform a closure on the current `state` while locked.
-    ///
-    /// - Parameter perform: The closure to perform.
-    func withState(perform: (State) -> Void) {
-        $mutableState.withState(perform: perform)
-    }
-
-    // MARK: Task Creation
-
-    /// Called when creating a `URLSessionTask` for this `Request`. Subclasses must override.
-    ///
-    /// - Parameters:
-    ///   - request: `URLRequest` to use to create the `URLSessionTask`.
-    ///   - session: `URLSession` which creates the `URLSessionTask`.
-    ///
-    /// - Returns:   The `URLSessionTask` created.
-    func task(for request: URLRequest, using session: URLSession) -> URLSessionTask {
-        fatalError("Subclasses must override.")
-    }
-
-    // MARK: - Public API
-
-    // These APIs are callable from any queue.
-
-    // MARK: State
-
-    /// Cancels the instance. Once cancelled, a `Request` can no longer be resumed or suspended.
-    ///
-    /// - Returns: The instance.
-    @discardableResult
-    public func cancel() -> Self {
-        $mutableState.write { mutableState in
-            guard mutableState.state.canTransitionTo(.cancelled) else { return }
-
-            mutableState.state = .cancelled
-
-            underlyingQueue.async { self.didCancel() }
-
-            guard let task = mutableState.tasks.last, task.state != .completed else {
-                underlyingQueue.async { self.finish() }
-                return
-            }
-
-            // Resume to ensure metrics are gathered.
-            task.resume()
-            task.cancel()
-            underlyingQueue.async { self.didCancelTask(task) }
-        }
-
-        return self
-    }
-
-    /// Suspends the instance.
-    ///
-    /// - Returns: The instance.
-    @discardableResult
-    public func suspend() -> Self {
-        $mutableState.write { mutableState in
-            guard mutableState.state.canTransitionTo(.suspended) else { return }
-
-            mutableState.state = .suspended
-
-            underlyingQueue.async { self.didSuspend() }
-
-            guard let task = mutableState.tasks.last, task.state != .completed else { return }
-
-            task.suspend()
-            underlyingQueue.async { self.didSuspendTask(task) }
-        }
-
-        return self
-    }
-
-    /// Resumes the instance.
-    ///
-    /// - Returns: The instance.
-    @discardableResult
-    public func resume() -> Self {
-        $mutableState.write { mutableState in
-            guard mutableState.state.canTransitionTo(.resumed) else { return }
-
-            mutableState.state = .resumed
-
-            underlyingQueue.async { self.didResume() }
-
-            guard let task = mutableState.tasks.last, task.state != .completed else { return }
-
-            task.resume()
-            underlyingQueue.async { self.didResumeTask(task) }
-        }
-
-        return self
-    }
-
-    // MARK: - Closure API
-
-    /// Associates a credential using the provided values with the instance.
-    ///
-    /// - Parameters:
-    ///   - username:    The username.
-    ///   - password:    The password.
-    ///   - persistence: The `URLCredential.Persistence` for the created `URLCredential`. `.forSession` by default.
-    ///
-    /// - Returns:       The instance.
-    @discardableResult
-    public func authenticate(username: String, password: String, persistence: URLCredential.Persistence = .forSession) -> Self {
-        let credential = URLCredential(user: username, password: password, persistence: persistence)
-
-        return authenticate(with: credential)
-    }
-
-    /// Associates the provided credential with the instance.
-    ///
-    /// - Parameter credential: The `URLCredential`.
-    ///
-    /// - Returns:              The instance.
-    @discardableResult
-    public func authenticate(with credential: URLCredential) -> Self {
-        $mutableState.credential = credential
-
-        return self
-    }
-
-    /// Sets a closure to be called periodically during the lifecycle of the instance as data is read from the server.
-    ///
-    /// - Note: Only the last closure provided is used.
-    ///
-    /// - Parameters:
-    ///   - queue:   The `DispatchQueue` to execute the closure on. `.main` by default.
-    ///   - closure: The closure to be executed periodically as data is read from the server.
-    ///
-    /// - Returns:   The instance.
-    @discardableResult
-    public func downloadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self {
-        $mutableState.downloadProgressHandler = (handler: closure, queue: queue)
-
-        return self
-    }
-
-    /// Sets a closure to be called periodically during the lifecycle of the instance as data is sent to the server.
-    ///
-    /// - Note: Only the last closure provided is used.
-    ///
-    /// - Parameters:
-    ///   - queue:   The `DispatchQueue` to execute the closure on. `.main` by default.
-    ///   - closure: The closure to be executed periodically as data is sent to the server.
-    ///
-    /// - Returns:   The instance.
-    @discardableResult
-    public func uploadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self {
-        $mutableState.uploadProgressHandler = (handler: closure, queue: queue)
-
-        return self
-    }
-
-    // MARK: Redirects
-
-    /// Sets the redirect handler for the instance which will be used if a redirect response is encountered.
-    ///
-    /// - Note: Attempting to set the redirect handler more than once is a logic error and will crash.
-    ///
-    /// - Parameter handler: The `RedirectHandler`.
-    ///
-    /// - Returns:           The instance.
-    @discardableResult
-    public func redirect(using handler: RedirectHandler) -> Self {
-        $mutableState.write { mutableState in
-            precondition(mutableState.redirectHandler == nil, "Redirect handler has already been set.")
-            mutableState.redirectHandler = handler
-        }
-
-        return self
-    }
-
-    // MARK: Cached Responses
-
-    /// Sets the cached response handler for the `Request` which will be used when attempting to cache a response.
-    ///
-    /// - Note: Attempting to set the cache handler more than once is a logic error and will crash.
-    ///
-    /// - Parameter handler: The `CachedResponseHandler`.
-    ///
-    /// - Returns:           The instance.
-    @discardableResult
-    public func cacheResponse(using handler: CachedResponseHandler) -> Self {
-        $mutableState.write { mutableState in
-            precondition(mutableState.cachedResponseHandler == nil, "Cached response handler has already been set.")
-            mutableState.cachedResponseHandler = handler
-        }
-
-        return self
-    }
-
-    // MARK: - Lifetime APIs
-
-    /// Sets a handler to be called when the cURL description of the request is available.
-    ///
-    /// - Note: When waiting for a `Request`'s `URLRequest` to be created, only the last `handler` will be called.
-    ///
-    /// - Parameters:
-    ///   - queue:   `DispatchQueue` on which `handler` will be called.
-    ///   - handler: Closure to be called when the cURL description is available.
-    ///
-    /// - Returns:           The instance.
-    @discardableResult
-    public func cURLDescription(on queue: DispatchQueue, calling handler: @escaping (String) -> Void) -> Self {
-        $mutableState.write { mutableState in
-            if mutableState.requests.last != nil {
-                queue.async { handler(self.cURLDescription()) }
-            } else {
-                mutableState.cURLHandler = (queue, handler)
-            }
-        }
-
-        return self
-    }
-
-    /// Sets a handler to be called when the cURL description of the request is available.
-    ///
-    /// - Note: When waiting for a `Request`'s `URLRequest` to be created, only the last `handler` will be called.
-    ///
-    /// - Parameter handler: Closure to be called when the cURL description is available. Called on the instance's
-    ///                      `underlyingQueue` by default.
-    ///
-    /// - Returns:           The instance.
-    @discardableResult
-    public func cURLDescription(calling handler: @escaping (String) -> Void) -> Self {
-        $mutableState.write { mutableState in
-            if mutableState.requests.last != nil {
-                underlyingQueue.async { handler(self.cURLDescription()) }
-            } else {
-                mutableState.cURLHandler = (underlyingQueue, handler)
-            }
-        }
-
-        return self
-    }
-
-    /// Sets a closure to called whenever Alamofire creates a `URLRequest` for this instance.
-    ///
-    /// - Note: This closure will be called multiple times if the instance adapts incoming `URLRequest`s or is retried.
-    ///
-    /// - Parameters:
-    ///   - queue:   `DispatchQueue` on which `handler` will be called. `.main` by default.
-    ///   - handler: Closure to be called when a `URLRequest` is available.
-    ///
-    /// - Returns:   The instance.
-    @discardableResult
-    public func onURLRequestCreation(on queue: DispatchQueue = .main, perform handler: @escaping (URLRequest) -> Void) -> Self {
-        $mutableState.write { state in
-            if let request = state.requests.last {
-                queue.async { handler(request) }
-            }
-
-            state.urlRequestHandler = (queue, handler)
-        }
-
-        return self
-    }
-
-    /// Sets a closure to be called whenever the instance creates a `URLSessionTask`.
-    ///
-    /// - Note: This API should only be used to provide `URLSessionTask`s to existing API, like `NSFileProvider`. It
-    ///         **SHOULD NOT** be used to interact with tasks directly, as that may be break Alamofire features.
-    ///         Additionally, this closure may be called multiple times if the instance is retried.
-    ///
-    /// - Parameters:
-    ///   - queue:   `DispatchQueue` on which `handler` will be called. `.main` by default.
-    ///   - handler: Closure to be called when the `URLSessionTask` is available.
-    ///
-    /// - Returns:   The instance.
-    @discardableResult
-    public func onURLSessionTaskCreation(on queue: DispatchQueue = .main, perform handler: @escaping (URLSessionTask) -> Void) -> Self {
-        $mutableState.write { state in
-            if let task = state.tasks.last {
-                queue.async { handler(task) }
-            }
-
-            state.urlSessionTaskHandler = (queue, handler)
-        }
-
-        return self
-    }
-
-    // MARK: Cleanup
-
-    /// Adds a `finishHandler` closure to be called when the request completes.
-    ///
-    /// - Parameter closure: Closure to be called when the request finishes.
-    func onFinish(perform finishHandler: @escaping () -> Void) {
-        guard !isFinished else { finishHandler(); return }
-
-        $mutableState.write { state in
-            state.finishHandlers.append(finishHandler)
-        }
-    }
-
-    /// Final cleanup step executed when the instance finishes response serialization.
-    func cleanup() {
-        delegate?.cleanup(after: self)
-        let handlers = $mutableState.finishHandlers
-        handlers.forEach { $0() }
-        $mutableState.write { state in
-            state.finishHandlers.removeAll()
-        }
-    }
-}
-
-// MARK: - Protocol Conformances
-
-extension Request: Equatable {
-    public static func ==(lhs: Request, rhs: Request) -> Bool {
-        lhs.id == rhs.id
-    }
-}
-
-extension Request: Hashable {
-    public func hash(into hasher: inout Hasher) {
-        hasher.combine(id)
-    }
-}
-
-extension Request: CustomStringConvertible {
-    /// A textual representation of this instance, including the `HTTPMethod` and `URL` if the `URLRequest` has been
-    /// created, as well as the response status code, if a response has been received.
-    public var description: String {
-        guard let request = performedRequests.last ?? lastRequest,
-              let url = request.url,
-              let method = request.httpMethod else { return "No request created yet." }
-
-        let requestDescription = "\(method) \(url.absoluteString)"
-
-        return response.map { "\(requestDescription) (\($0.statusCode))" } ?? requestDescription
-    }
-}
-
-extension Request {
-    /// cURL representation of the instance.
-    ///
-    /// - Returns: The cURL equivalent of the instance.
-    public func cURLDescription() -> String {
-        guard
-            let request = lastRequest,
-            let url = request.url,
-            let host = url.host,
-            let method = request.httpMethod else { return "$ curl command could not be created" }
-
-        var components = ["$ curl -v"]
-
-        components.append("-X \(method)")
-
-        if let credentialStorage = delegate?.sessionConfiguration.urlCredentialStorage {
-            let protectionSpace = URLProtectionSpace(host: host,
-                                                     port: url.port ?? 0,
-                                                     protocol: url.scheme,
-                                                     realm: host,
-                                                     authenticationMethod: NSURLAuthenticationMethodHTTPBasic)
-
-            if let credentials = credentialStorage.credentials(for: protectionSpace)?.values {
-                for credential in credentials {
-                    guard let user = credential.user, let password = credential.password else { continue }
-                    components.append("-u \(user):\(password)")
-                }
-            } else {
-                if let credential = credential, let user = credential.user, let password = credential.password {
-                    components.append("-u \(user):\(password)")
-                }
-            }
-        }
-
-        if let configuration = delegate?.sessionConfiguration, configuration.httpShouldSetCookies {
-            if
-                let cookieStorage = configuration.httpCookieStorage,
-                let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty {
-                let allCookies = cookies.map { "\($0.name)=\($0.value)" }.joined(separator: ";")
-
-                components.append("-b \"\(allCookies)\"")
-            }
-        }
-
-        var headers = HTTPHeaders()
-
-        if let sessionHeaders = delegate?.sessionConfiguration.headers {
-            for header in sessionHeaders where header.name != "Cookie" {
-                headers[header.name] = header.value
-            }
-        }
-
-        for header in request.headers where header.name != "Cookie" {
-            headers[header.name] = header.value
-        }
-
-        for header in headers {
-            let escapedValue = header.value.replacingOccurrences(of: "\"", with: "\\\"")
-            components.append("-H \"\(header.name): \(escapedValue)\"")
-        }
-
-        if let httpBodyData = request.httpBody {
-            let httpBody = String(decoding: httpBodyData, as: UTF8.self)
-            var escapedBody = httpBody.replacingOccurrences(of: "\\\"", with: "\\\\\"")
-            escapedBody = escapedBody.replacingOccurrences(of: "\"", with: "\\\"")
-
-            components.append("-d \"\(escapedBody)\"")
-        }
-
-        components.append("\"\(url.absoluteString)\"")
-
-        return components.joined(separator: " \\\n\t")
-    }
-}
-
-/// Protocol abstraction for `Request`'s communication back to the `SessionDelegate`.
-public protocol RequestDelegate: AnyObject {
-    /// `URLSessionConfiguration` used to create the underlying `URLSessionTask`s.
-    var sessionConfiguration: URLSessionConfiguration { get }
-
-    /// Determines whether the `Request` should automatically call `resume()` when adding the first response handler.
-    var startImmediately: Bool { get }
-
-    /// Notifies the delegate the `Request` has reached a point where it needs cleanup.
-    ///
-    /// - Parameter request: The `Request` to cleanup after.
-    func cleanup(after request: Request)
-
-    /// Asynchronously ask the delegate whether a `Request` will be retried.
-    ///
-    /// - Parameters:
-    ///   - request:    `Request` which failed.
-    ///   - error:      `Error` which produced the failure.
-    ///   - completion: Closure taking the `RetryResult` for evaluation.
-    func retryResult(for request: Request, dueTo error: AFError, completion: @escaping (RetryResult) -> Void)
-
-    /// Asynchronously retry the `Request`.
-    ///
-    /// - Parameters:
-    ///   - request:   `Request` which will be retried.
-    ///   - timeDelay: `TimeInterval` after which the retry will be triggered.
-    func retryRequest(_ request: Request, withDelay timeDelay: TimeInterval?)
-}
-
-// MARK: - Subclasses
-
-// MARK: - DataRequest
-
-/// `Request` subclass which handles in-memory `Data` download using `URLSessionDataTask`.
-public class DataRequest: Request {
-    /// `URLRequestConvertible` value used to create `URLRequest`s for this instance.
-    public let convertible: URLRequestConvertible
-    /// `Data` read from the server so far.
-    public var data: Data? { mutableData }
-
-    /// Protected storage for the `Data` read by the instance.
-    @Protected
-    private var mutableData: Data? = nil
-
-    /// Creates a `DataRequest` using the provided parameters.
-    ///
-    /// - Parameters:
-    ///   - id:                 `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default.
-    ///   - convertible:        `URLRequestConvertible` value used to create `URLRequest`s for this instance.
-    ///   - underlyingQueue:    `DispatchQueue` on which all internal `Request` work is performed.
-    ///   - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets
-    ///                         `underlyingQueue`, but can be passed another queue from a `Session`.
-    ///   - eventMonitor:       `EventMonitor` called for event callbacks from internal `Request` actions.
-    ///   - interceptor:        `RequestInterceptor` used throughout the request lifecycle.
-    ///   - delegate:           `RequestDelegate` that provides an interface to actions not performed by the `Request`.
-    init(id: UUID = UUID(),
-         convertible: URLRequestConvertible,
-         underlyingQueue: DispatchQueue,
-         serializationQueue: DispatchQueue,
-         eventMonitor: EventMonitor?,
-         interceptor: RequestInterceptor?,
-         delegate: RequestDelegate) {
-        self.convertible = convertible
-
-        super.init(id: id,
-                   underlyingQueue: underlyingQueue,
-                   serializationQueue: serializationQueue,
-                   eventMonitor: eventMonitor,
-                   interceptor: interceptor,
-                   delegate: delegate)
-    }
-
-    override func reset() {
-        super.reset()
-
-        mutableData = nil
-    }
-
-    /// Called when `Data` is received by this instance.
-    ///
-    /// - Note: Also calls `updateDownloadProgress`.
-    ///
-    /// - Parameter data: The `Data` received.
-    func didReceive(data: Data) {
-        if self.data == nil {
-            mutableData = data
-        } else {
-            $mutableData.write { $0?.append(data) }
-        }
-
-        updateDownloadProgress()
-    }
-
-    override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask {
-        let copiedRequest = request
-        return session.dataTask(with: copiedRequest)
-    }
-
-    /// Called to update the `downloadProgress` of the instance.
-    func updateDownloadProgress() {
-        let totalBytesReceived = Int64(data?.count ?? 0)
-        let totalBytesExpected = task?.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown
-
-        downloadProgress.totalUnitCount = totalBytesExpected
-        downloadProgress.completedUnitCount = totalBytesReceived
-
-        downloadProgressHandler?.queue.async { self.downloadProgressHandler?.handler(self.downloadProgress) }
-    }
-
-    /// Validates the request, using the specified closure.
-    ///
-    /// - Note: If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - Parameter validation: `Validation` closure used to validate the response.
-    ///
-    /// - Returns:              The instance.
-    @discardableResult
-    public func validate(_ validation: @escaping Validation) -> Self {
-        let validator: () -> Void = { [unowned self] in
-            guard self.error == nil, let response = self.response else { return }
-
-            let result = validation(self.request, response, self.data)
-
-            if case let .failure(error) = result { self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error))) }
-
-            self.eventMonitor?.request(self,
-                                       didValidateRequest: self.request,
-                                       response: response,
-                                       data: self.data,
-                                       withResult: result)
-        }
-
-        $validators.write { $0.append(validator) }
-
-        return self
-    }
-}
-
-// MARK: - DataStreamRequest
-
-/// `Request` subclass which streams HTTP response `Data` through a `Handler` closure.
-public final class DataStreamRequest: Request {
-    /// Closure type handling `DataStreamRequest.Stream` values.
-    public typealias Handler<Success, Failure: Error> = (Stream<Success, Failure>) throws -> Void
-
-    /// Type encapsulating an `Event` as it flows through the stream, as well as a `CancellationToken` which can be used
-    /// to stop the stream at any time.
-    public struct Stream<Success, Failure: Error> {
-        /// Latest `Event` from the stream.
-        public let event: Event<Success, Failure>
-        /// Token used to cancel the stream.
-        public let token: CancellationToken
-
-        /// Cancel the ongoing stream by canceling the underlying `DataStreamRequest`.
-        public func cancel() {
-            token.cancel()
-        }
-    }
-
-    /// Type representing an event flowing through the stream. Contains either the `Result` of processing streamed
-    /// `Data` or the completion of the stream.
-    public enum Event<Success, Failure: Error> {
-        /// Output produced every time the instance receives additional `Data`. The associated value contains the
-        /// `Result` of processing the incoming `Data`.
-        case stream(Result<Success, Failure>)
-        /// Output produced when the instance has completed, whether due to stream end, cancellation, or an error.
-        /// Associated `Completion` value contains the final state.
-        case complete(Completion)
-    }
-
-    /// Value containing the state of a `DataStreamRequest` when the stream was completed.
-    public struct Completion {
-        /// Last `URLRequest` issued by the instance.
-        public let request: URLRequest?
-        /// Last `HTTPURLResponse` received by the instance.
-        public let response: HTTPURLResponse?
-        /// Last `URLSessionTaskMetrics` produced for the instance.
-        public let metrics: URLSessionTaskMetrics?
-        /// `AFError` produced for the instance, if any.
-        public let error: AFError?
-    }
-
-    /// Type used to cancel an ongoing stream.
-    public struct CancellationToken {
-        weak var request: DataStreamRequest?
-
-        init(_ request: DataStreamRequest) {
-            self.request = request
-        }
-
-        /// Cancel the ongoing stream by canceling the underlying `DataStreamRequest`.
-        public func cancel() {
-            request?.cancel()
-        }
-    }
-
-    /// `URLRequestConvertible` value used to create `URLRequest`s for this instance.
-    public let convertible: URLRequestConvertible
-    /// Whether or not the instance will be cancelled if stream parsing encounters an error.
-    public let automaticallyCancelOnStreamError: Bool
-
-    /// Internal mutable state specific to this type.
-    struct StreamMutableState {
-        /// `OutputStream` bound to the `InputStream` produced by `asInputStream`, if it has been called.
-        var outputStream: OutputStream?
-        /// Stream closures called as `Data` is received.
-        var streams: [(_ data: Data) -> Void] = []
-        /// Number of currently executing streams. Used to ensure completions are only fired after all streams are
-        /// enqueued.
-        var numberOfExecutingStreams = 0
-        /// Completion calls enqueued while streams are still executing.
-        var enqueuedCompletionEvents: [() -> Void] = []
-    }
-
-    @Protected
-    var streamMutableState = StreamMutableState()
-
-    /// Creates a `DataStreamRequest` using the provided parameters.
-    ///
-    /// - Parameters:
-    ///   - id:                               `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()`
-    ///                                        by default.
-    ///   - convertible:                      `URLRequestConvertible` value used to create `URLRequest`s for this
-    ///                                        instance.
-    ///   - automaticallyCancelOnStreamError: `Bool` indicating whether the instance will be cancelled when an `Error`
-    ///                                       is thrown while serializing stream `Data`.
-    ///   - underlyingQueue:                  `DispatchQueue` on which all internal `Request` work is performed.
-    ///   - serializationQueue:               `DispatchQueue` on which all serialization work is performed. By default
-    ///                                       targets
-    ///                                       `underlyingQueue`, but can be passed another queue from a `Session`.
-    ///   - eventMonitor:                     `EventMonitor` called for event callbacks from internal `Request` actions.
-    ///   - interceptor:                      `RequestInterceptor` used throughout the request lifecycle.
-    ///   - delegate:                         `RequestDelegate` that provides an interface to actions not performed by
-    ///                                       the `Request`.
-    init(id: UUID = UUID(),
-         convertible: URLRequestConvertible,
-         automaticallyCancelOnStreamError: Bool,
-         underlyingQueue: DispatchQueue,
-         serializationQueue: DispatchQueue,
-         eventMonitor: EventMonitor?,
-         interceptor: RequestInterceptor?,
-         delegate: RequestDelegate) {
-        self.convertible = convertible
-        self.automaticallyCancelOnStreamError = automaticallyCancelOnStreamError
-
-        super.init(id: id,
-                   underlyingQueue: underlyingQueue,
-                   serializationQueue: serializationQueue,
-                   eventMonitor: eventMonitor,
-                   interceptor: interceptor,
-                   delegate: delegate)
-    }
-
-    override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask {
-        let copiedRequest = request
-        return session.dataTask(with: copiedRequest)
-    }
-
-    override func finish(error: AFError? = nil) {
-        $streamMutableState.write { state in
-            state.outputStream?.close()
-        }
-
-        super.finish(error: error)
-    }
-
-    func didReceive(data: Data) {
-        $streamMutableState.write { state in
-            #if !(os(Linux) || os(Windows))
-            if let stream = state.outputStream {
-                underlyingQueue.async {
-                    var bytes = Array(data)
-                    stream.write(&bytes, maxLength: bytes.count)
-                }
-            }
-            #endif
-            state.numberOfExecutingStreams += state.streams.count
-            let localState = state
-            underlyingQueue.async { localState.streams.forEach { $0(data) } }
-        }
-    }
-
-    /// Validates the `URLRequest` and `HTTPURLResponse` received for the instance using the provided `Validation` closure.
-    ///
-    /// - Parameter validation: `Validation` closure used to validate the request and response.
-    ///
-    /// - Returns:              The `DataStreamRequest`.
-    @discardableResult
-    public func validate(_ validation: @escaping Validation) -> Self {
-        let validator: () -> Void = { [unowned self] in
-            guard self.error == nil, let response = self.response else { return }
-
-            let result = validation(self.request, response)
-
-            if case let .failure(error) = result {
-                self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error)))
-            }
-
-            self.eventMonitor?.request(self,
-                                       didValidateRequest: self.request,
-                                       response: response,
-                                       withResult: result)
-        }
-
-        $validators.write { $0.append(validator) }
-
-        return self
-    }
-
-    #if !(os(Linux) || os(Windows))
-    /// Produces an `InputStream` that receives the `Data` received by the instance.
-    ///
-    /// - Note: The `InputStream` produced by this method must have `open()` called before being able to read `Data`.
-    ///         Additionally, this method will automatically call `resume()` on the instance, regardless of whether or
-    ///         not the creating session has `startRequestsImmediately` set to `true`.
-    ///
-    /// - Parameter bufferSize: Size, in bytes, of the buffer between the `OutputStream` and `InputStream`.
-    ///
-    /// - Returns:              The `InputStream` bound to the internal `OutboundStream`.
-    public func asInputStream(bufferSize: Int = 1024) -> InputStream? {
-        defer { resume() }
-
-        var inputStream: InputStream?
-        $streamMutableState.write { state in
-            Foundation.Stream.getBoundStreams(withBufferSize: bufferSize,
-                                              inputStream: &inputStream,
-                                              outputStream: &state.outputStream)
-            state.outputStream?.open()
-        }
-
-        return inputStream
-    }
-    #endif
-
-    func capturingError(from closure: () throws -> Void) {
-        do {
-            try closure()
-        } catch {
-            self.error = error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error)))
-            cancel()
-        }
-    }
-
-    func appendStreamCompletion<Success, Failure>(on queue: DispatchQueue,
-                                                  stream: @escaping Handler<Success, Failure>) {
-        appendResponseSerializer {
-            self.underlyingQueue.async {
-                self.responseSerializerDidComplete {
-                    self.$streamMutableState.write { state in
-                        guard state.numberOfExecutingStreams == 0 else {
-                            state.enqueuedCompletionEvents.append {
-                                self.enqueueCompletion(on: queue, stream: stream)
-                            }
-
-                            return
-                        }
-
-                        self.enqueueCompletion(on: queue, stream: stream)
-                    }
-                }
-            }
-        }
-    }
-
-    func enqueueCompletion<Success, Failure>(on queue: DispatchQueue,
-                                             stream: @escaping Handler<Success, Failure>) {
-        queue.async {
-            do {
-                let completion = Completion(request: self.request,
-                                            response: self.response,
-                                            metrics: self.metrics,
-                                            error: self.error)
-                try stream(.init(event: .complete(completion), token: .init(self)))
-            } catch {
-                // Ignore error, as errors on Completion can't be handled anyway.
-            }
-        }
-    }
-}
-
-extension DataStreamRequest.Stream {
-    /// Incoming `Result` values from `Event.stream`.
-    public var result: Result<Success, Failure>? {
-        guard case let .stream(result) = event else { return nil }
-
-        return result
-    }
-
-    /// `Success` value of the instance, if any.
-    public var value: Success? {
-        guard case let .success(value) = result else { return nil }
-
-        return value
-    }
-
-    /// `Failure` value of the instance, if any.
-    public var error: Failure? {
-        guard case let .failure(error) = result else { return nil }
-
-        return error
-    }
-
-    /// `Completion` value of the instance, if any.
-    public var completion: DataStreamRequest.Completion? {
-        guard case let .complete(completion) = event else { return nil }
-
-        return completion
-    }
-}
-
-// MARK: - DownloadRequest
-
-/// `Request` subclass which downloads `Data` to a file on disk using `URLSessionDownloadTask`.
-public class DownloadRequest: Request {
-    /// A set of options to be executed prior to moving a downloaded file from the temporary `URL` to the destination
-    /// `URL`.
-    public struct Options: OptionSet {
-        /// Specifies that intermediate directories for the destination URL should be created.
-        public static let createIntermediateDirectories = Options(rawValue: 1 << 0)
-        /// Specifies that any previous file at the destination `URL` should be removed.
-        public static let removePreviousFile = Options(rawValue: 1 << 1)
-
-        public let rawValue: Int
-
-        public init(rawValue: Int) {
-            self.rawValue = rawValue
-        }
-    }
-
-    // MARK: Destination
-
-    /// A closure executed once a `DownloadRequest` has successfully completed in order to determine where to move the
-    /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL
-    /// and the `HTTPURLResponse`, and returns two values: the file URL where the temporary file should be moved and
-    /// the options defining how the file should be moved.
-    ///
-    /// - Note: Downloads from a local `file://` `URL`s do not use the `Destination` closure, as those downloads do not
-    ///         return an `HTTPURLResponse`. Instead the file is merely moved within the temporary directory.
-    public typealias Destination = (_ temporaryURL: URL,
-                                    _ response: HTTPURLResponse) -> (destinationURL: URL, options: Options)
-
-    /// Creates a download file destination closure which uses the default file manager to move the temporary file to a
-    /// file URL in the first available directory with the specified search path directory and search path domain mask.
-    ///
-    /// - Parameters:
-    ///   - directory: The search path directory. `.documentDirectory` by default.
-    ///   - domain:    The search path domain mask. `.userDomainMask` by default.
-    ///   - options:   `DownloadRequest.Options` used when moving the downloaded file to its destination. None by
-    ///                default.
-    /// - Returns: The `Destination` closure.
-    public class func suggestedDownloadDestination(for directory: FileManager.SearchPathDirectory = .documentDirectory,
-                                                   in domain: FileManager.SearchPathDomainMask = .userDomainMask,
-                                                   options: Options = []) -> Destination {
-        { temporaryURL, response in
-            let directoryURLs = FileManager.default.urls(for: directory, in: domain)
-            let url = directoryURLs.first?.appendingPathComponent(response.suggestedFilename!) ?? temporaryURL
-
-            return (url, options)
-        }
-    }
-
-    /// Default `Destination` used by Alamofire to ensure all downloads persist. This `Destination` prepends
-    /// `Alamofire_` to the automatically generated download name and moves it within the temporary directory. Files
-    /// with this destination must be additionally moved if they should survive the system reclamation of temporary
-    /// space.
-    static let defaultDestination: Destination = { url, _ in
-        (defaultDestinationURL(url), [])
-    }
-
-    /// Default `URL` creation closure. Creates a `URL` in the temporary directory with `Alamofire_` prepended to the
-    /// provided file name.
-    static let defaultDestinationURL: (URL) -> URL = { url in
-        let filename = "Alamofire_\(url.lastPathComponent)"
-        let destination = url.deletingLastPathComponent().appendingPathComponent(filename)
-
-        return destination
-    }
-
-    // MARK: Downloadable
-
-    /// Type describing the source used to create the underlying `URLSessionDownloadTask`.
-    public enum Downloadable {
-        /// Download should be started from the `URLRequest` produced by the associated `URLRequestConvertible` value.
-        case request(URLRequestConvertible)
-        /// Download should be started from the associated resume `Data` value.
-        case resumeData(Data)
-    }
-
-    // MARK: Mutable State
-
-    /// Type containing all mutable state for `DownloadRequest` instances.
-    private struct DownloadRequestMutableState {
-        /// Possible resume `Data` produced when cancelling the instance.
-        var resumeData: Data?
-        /// `URL` to which `Data` is being downloaded.
-        var fileURL: URL?
-    }
-
-    /// Protected mutable state specific to `DownloadRequest`.
-    @Protected
-    private var mutableDownloadState = DownloadRequestMutableState()
-
-    /// If the download is resumable and is eventually cancelled or fails, this value may be used to resume the download
-    /// using the `download(resumingWith data:)` API.
-    ///
-    /// - Note: For more information about `resumeData`, see [Apple's documentation](https://developer.apple.com/documentation/foundation/urlsessiondownloadtask/1411634-cancel).
-    public var resumeData: Data? {
-        #if !(os(Linux) || os(Windows))
-        return $mutableDownloadState.resumeData ?? error?.downloadResumeData
-        #else
-        return $mutableDownloadState.resumeData
-        #endif
-    }
-
-    /// If the download is successful, the `URL` where the file was downloaded.
-    public var fileURL: URL? { $mutableDownloadState.fileURL }
-
-    // MARK: Initial State
-
-    /// `Downloadable` value used for this instance.
-    public let downloadable: Downloadable
-    /// The `Destination` to which the downloaded file is moved.
-    let destination: Destination
-
-    /// Creates a `DownloadRequest` using the provided parameters.
-    ///
-    /// - Parameters:
-    ///   - id:                 `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default.
-    ///   - downloadable:       `Downloadable` value used to create `URLSessionDownloadTasks` for the instance.
-    ///   - underlyingQueue:    `DispatchQueue` on which all internal `Request` work is performed.
-    ///   - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets
-    ///                         `underlyingQueue`, but can be passed another queue from a `Session`.
-    ///   - eventMonitor:       `EventMonitor` called for event callbacks from internal `Request` actions.
-    ///   - interceptor:        `RequestInterceptor` used throughout the request lifecycle.
-    ///   - delegate:           `RequestDelegate` that provides an interface to actions not performed by the `Request`
-    ///   - destination:        `Destination` closure used to move the downloaded file to its final location.
-    init(id: UUID = UUID(),
-         downloadable: Downloadable,
-         underlyingQueue: DispatchQueue,
-         serializationQueue: DispatchQueue,
-         eventMonitor: EventMonitor?,
-         interceptor: RequestInterceptor?,
-         delegate: RequestDelegate,
-         destination: @escaping Destination) {
-        self.downloadable = downloadable
-        self.destination = destination
-
-        super.init(id: id,
-                   underlyingQueue: underlyingQueue,
-                   serializationQueue: serializationQueue,
-                   eventMonitor: eventMonitor,
-                   interceptor: interceptor,
-                   delegate: delegate)
-    }
-
-    override func reset() {
-        super.reset()
-
-        $mutableDownloadState.write {
-            $0.resumeData = nil
-            $0.fileURL = nil
-        }
-    }
-
-    /// Called when a download has finished.
-    ///
-    /// - Parameters:
-    ///   - task:   `URLSessionTask` that finished the download.
-    ///   - result: `Result` of the automatic move to `destination`.
-    func didFinishDownloading(using task: URLSessionTask, with result: Result<URL, AFError>) {
-        eventMonitor?.request(self, didFinishDownloadingUsing: task, with: result)
-
-        switch result {
-        case let .success(url): $mutableDownloadState.fileURL = url
-        case let .failure(error): self.error = error
-        }
-    }
-
-    /// Updates the `downloadProgress` using the provided values.
-    ///
-    /// - Parameters:
-    ///   - bytesWritten:              Total bytes written so far.
-    ///   - totalBytesExpectedToWrite: Total bytes expected to write.
-    func updateDownloadProgress(bytesWritten: Int64, totalBytesExpectedToWrite: Int64) {
-        downloadProgress.totalUnitCount = totalBytesExpectedToWrite
-        downloadProgress.completedUnitCount += bytesWritten
-
-        downloadProgressHandler?.queue.async { self.downloadProgressHandler?.handler(self.downloadProgress) }
-    }
-
-    override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask {
-        session.downloadTask(with: request)
-    }
-
-    /// Creates a `URLSessionTask` from the provided resume data.
-    ///
-    /// - Parameters:
-    ///   - data:    `Data` used to resume the download.
-    ///   - session: `URLSession` used to create the `URLSessionTask`.
-    ///
-    /// - Returns:   The `URLSessionTask` created.
-    public func task(forResumeData data: Data, using session: URLSession) -> URLSessionTask {
-        session.downloadTask(withResumeData: data)
-    }
-
-    /// Cancels the instance. Once cancelled, a `DownloadRequest` can no longer be resumed or suspended.
-    ///
-    /// - Note: This method will NOT produce resume data. If you wish to cancel and produce resume data, use
-    ///         `cancel(producingResumeData:)` or `cancel(byProducingResumeData:)`.
-    ///
-    /// - Returns: The instance.
-    @discardableResult
-    override public func cancel() -> Self {
-        cancel(producingResumeData: false)
-    }
-
-    /// Cancels the instance, optionally producing resume data. Once cancelled, a `DownloadRequest` can no longer be
-    /// resumed or suspended.
-    ///
-    /// - Note: If `producingResumeData` is `true`, the `resumeData` property will be populated with any resume data, if
-    ///         available.
-    ///
-    /// - Returns: The instance.
-    @discardableResult
-    public func cancel(producingResumeData shouldProduceResumeData: Bool) -> Self {
-        cancel(optionallyProducingResumeData: shouldProduceResumeData ? { _ in } : nil)
-    }
-
-    /// Cancels the instance while producing resume data. Once cancelled, a `DownloadRequest` can no longer be resumed
-    /// or suspended.
-    ///
-    /// - Note: The resume data passed to the completion handler will also be available on the instance's `resumeData`
-    ///         property.
-    ///
-    /// - Parameter completionHandler: The completion handler that is called when the download has been successfully
-    ///                                cancelled. It is not guaranteed to be called on a particular queue, so you may
-    ///                                want use an appropriate queue to perform your work.
-    ///
-    /// - Returns:                     The instance.
-    @discardableResult
-    public func cancel(byProducingResumeData completionHandler: @escaping (_ data: Data?) -> Void) -> Self {
-        cancel(optionallyProducingResumeData: completionHandler)
-    }
-
-    /// Internal implementation of cancellation that optionally takes a resume data handler. If no handler is passed,
-    /// cancellation is performed without producing resume data.
-    ///
-    /// - Parameter completionHandler: Optional resume data handler.
-    ///
-    /// - Returns:                     The instance.
-    private func cancel(optionallyProducingResumeData completionHandler: ((_ resumeData: Data?) -> Void)?) -> Self {
-        $mutableState.write { mutableState in
-            guard mutableState.state.canTransitionTo(.cancelled) else { return }
-
-            mutableState.state = .cancelled
-
-            underlyingQueue.async { self.didCancel() }
-
-            guard let task = mutableState.tasks.last as? URLSessionDownloadTask, task.state != .completed else {
-                underlyingQueue.async { self.finish() }
-                return
-            }
-
-            if let completionHandler = completionHandler {
-                // Resume to ensure metrics are gathered.
-                task.resume()
-                task.cancel { resumeData in
-                    self.$mutableDownloadState.resumeData = resumeData
-                    self.underlyingQueue.async { self.didCancelTask(task) }
-                    completionHandler(resumeData)
-                }
-            } else {
-                // Resume to ensure metrics are gathered.
-                task.resume()
-                task.cancel()
-                self.underlyingQueue.async { self.didCancelTask(task) }
-            }
-        }
-
-        return self
-    }
-
-    /// Validates the request, using the specified closure.
-    ///
-    /// - Note: If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - Parameter validation: `Validation` closure to validate the response.
-    ///
-    /// - Returns:              The instance.
-    @discardableResult
-    public func validate(_ validation: @escaping Validation) -> Self {
-        let validator: () -> Void = { [unowned self] in
-            guard self.error == nil, let response = self.response else { return }
-
-            let result = validation(self.request, response, self.fileURL)
-
-            if case let .failure(error) = result {
-                self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error)))
-            }
-
-            self.eventMonitor?.request(self,
-                                       didValidateRequest: self.request,
-                                       response: response,
-                                       fileURL: self.fileURL,
-                                       withResult: result)
-        }
-
-        $validators.write { $0.append(validator) }
-
-        return self
-    }
-}
-
-// MARK: - UploadRequest
-
-/// `DataRequest` subclass which handles `Data` upload from memory, file, or stream using `URLSessionUploadTask`.
-public class UploadRequest: DataRequest {
-    /// Type describing the origin of the upload, whether `Data`, file, or stream.
-    public enum Uploadable {
-        /// Upload from the provided `Data` value.
-        case data(Data)
-        /// Upload from the provided file `URL`, as well as a `Bool` determining whether the source file should be
-        /// automatically removed once uploaded.
-        case file(URL, shouldRemove: Bool)
-        /// Upload from the provided `InputStream`.
-        case stream(InputStream)
-    }
-
-    // MARK: Initial State
-
-    /// The `UploadableConvertible` value used to produce the `Uploadable` value for this instance.
-    public let upload: UploadableConvertible
-
-    /// `FileManager` used to perform cleanup tasks, including the removal of multipart form encoded payloads written
-    /// to disk.
-    public let fileManager: FileManager
-
-    // MARK: Mutable State
-
-    /// `Uploadable` value used by the instance.
-    public var uploadable: Uploadable?
-
-    /// Creates an `UploadRequest` using the provided parameters.
-    ///
-    /// - Parameters:
-    ///   - id:                 `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default.
-    ///   - convertible:        `UploadConvertible` value used to determine the type of upload to be performed.
-    ///   - underlyingQueue:    `DispatchQueue` on which all internal `Request` work is performed.
-    ///   - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets
-    ///                         `underlyingQueue`, but can be passed another queue from a `Session`.
-    ///   - eventMonitor:       `EventMonitor` called for event callbacks from internal `Request` actions.
-    ///   - interceptor:        `RequestInterceptor` used throughout the request lifecycle.
-    ///   - fileManager:        `FileManager` used to perform cleanup tasks, including the removal of multipart form
-    ///                         encoded payloads written to disk.
-    ///   - delegate:           `RequestDelegate` that provides an interface to actions not performed by the `Request`.
-    init(id: UUID = UUID(),
-         convertible: UploadConvertible,
-         underlyingQueue: DispatchQueue,
-         serializationQueue: DispatchQueue,
-         eventMonitor: EventMonitor?,
-         interceptor: RequestInterceptor?,
-         fileManager: FileManager,
-         delegate: RequestDelegate) {
-        upload = convertible
-        self.fileManager = fileManager
-
-        super.init(id: id,
-                   convertible: convertible,
-                   underlyingQueue: underlyingQueue,
-                   serializationQueue: serializationQueue,
-                   eventMonitor: eventMonitor,
-                   interceptor: interceptor,
-                   delegate: delegate)
-    }
-
-    /// Called when the `Uploadable` value has been created from the `UploadConvertible`.
-    ///
-    /// - Parameter uploadable: The `Uploadable` that was created.
-    func didCreateUploadable(_ uploadable: Uploadable) {
-        self.uploadable = uploadable
-
-        eventMonitor?.request(self, didCreateUploadable: uploadable)
-    }
-
-    /// Called when the `Uploadable` value could not be created.
-    ///
-    /// - Parameter error: `AFError` produced by the failure.
-    func didFailToCreateUploadable(with error: AFError) {
-        self.error = error
-
-        eventMonitor?.request(self, didFailToCreateUploadableWithError: error)
-
-        retryOrFinish(error: error)
-    }
-
-    override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask {
-        guard let uploadable = uploadable else {
-            fatalError("Attempting to create a URLSessionUploadTask when Uploadable value doesn't exist.")
-        }
-
-        switch uploadable {
-        case let .data(data): return session.uploadTask(with: request, from: data)
-        case let .file(url, _): return session.uploadTask(with: request, fromFile: url)
-        case .stream: return session.uploadTask(withStreamedRequest: request)
-        }
-    }
-
-    override func reset() {
-        // Uploadable must be recreated on every retry.
-        uploadable = nil
-
-        super.reset()
-    }
-
-    /// Produces the `InputStream` from `uploadable`, if it can.
-    ///
-    /// - Note: Calling this method with a non-`.stream` `Uploadable` is a logic error and will crash.
-    ///
-    /// - Returns: The `InputStream`.
-    func inputStream() -> InputStream {
-        guard let uploadable = uploadable else {
-            fatalError("Attempting to access the input stream but the uploadable doesn't exist.")
-        }
-
-        guard case let .stream(stream) = uploadable else {
-            fatalError("Attempted to access the stream of an UploadRequest that wasn't created with one.")
-        }
-
-        eventMonitor?.request(self, didProvideInputStream: stream)
-
-        return stream
-    }
-
-    override public func cleanup() {
-        defer { super.cleanup() }
-
-        guard
-            let uploadable = uploadable,
-            case let .file(url, shouldRemove) = uploadable,
-            shouldRemove
-        else { return }
-
-        try? fileManager.removeItem(at: url)
-    }
-}
-
-/// A type that can produce an `UploadRequest.Uploadable` value.
-public protocol UploadableConvertible {
-    /// Produces an `UploadRequest.Uploadable` value from the instance.
-    ///
-    /// - Returns: The `UploadRequest.Uploadable`.
-    /// - Throws:  Any `Error` produced during creation.
-    func createUploadable() throws -> UploadRequest.Uploadable
-}
-
-extension UploadRequest.Uploadable: UploadableConvertible {
-    public func createUploadable() throws -> UploadRequest.Uploadable {
-        self
-    }
-}
-
-/// A type that can be converted to an upload, whether from an `UploadRequest.Uploadable` or `URLRequestConvertible`.
-public protocol UploadConvertible: UploadableConvertible & URLRequestConvertible {}

+ 0 - 357
Pods/Alamofire/Source/RequestInterceptor.swift

@@ -1,357 +0,0 @@
-//
-//  RequestInterceptor.swift
-//
-//  Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// Stores all state associated with a `URLRequest` being adapted.
-public struct RequestAdapterState {
-    /// The `UUID` of the `Request` associated with the `URLRequest` to adapt.
-    public let requestID: UUID
-
-    /// The `Session` associated with the `URLRequest` to adapt.
-    public let session: Session
-}
-
-// MARK: -
-
-/// A type that can inspect and optionally adapt a `URLRequest` in some manner if necessary.
-public protocol RequestAdapter {
-    /// Inspects and adapts the specified `URLRequest` in some manner and calls the completion handler with the Result.
-    ///
-    /// - Parameters:
-    ///   - urlRequest: The `URLRequest` to adapt.
-    ///   - session:    The `Session` that will execute the `URLRequest`.
-    ///   - completion: The completion handler that must be called when adaptation is complete.
-    func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result<URLRequest, Error>) -> Void)
-
-    /// Inspects and adapts the specified `URLRequest` in some manner and calls the completion handler with the Result.
-    ///
-    /// - Parameters:
-    ///   - urlRequest: The `URLRequest` to adapt.
-    ///   - state:      The `RequestAdapterState` associated with the `URLRequest`.
-    ///   - completion: The completion handler that must be called when adaptation is complete.
-    func adapt(_ urlRequest: URLRequest, using state: RequestAdapterState, completion: @escaping (Result<URLRequest, Error>) -> Void)
-}
-
-extension RequestAdapter {
-    public func adapt(_ urlRequest: URLRequest, using state: RequestAdapterState, completion: @escaping (Result<URLRequest, Error>) -> Void) {
-        adapt(urlRequest, for: state.session, completion: completion)
-    }
-}
-
-// MARK: -
-
-/// Outcome of determination whether retry is necessary.
-public enum RetryResult {
-    /// Retry should be attempted immediately.
-    case retry
-    /// Retry should be attempted after the associated `TimeInterval`.
-    case retryWithDelay(TimeInterval)
-    /// Do not retry.
-    case doNotRetry
-    /// Do not retry due to the associated `Error`.
-    case doNotRetryWithError(Error)
-}
-
-extension RetryResult {
-    var retryRequired: Bool {
-        switch self {
-        case .retry, .retryWithDelay: return true
-        default: return false
-        }
-    }
-
-    var delay: TimeInterval? {
-        switch self {
-        case let .retryWithDelay(delay): return delay
-        default: return nil
-        }
-    }
-
-    var error: Error? {
-        guard case let .doNotRetryWithError(error) = self else { return nil }
-        return error
-    }
-}
-
-/// A type that determines whether a request should be retried after being executed by the specified session manager
-/// and encountering an error.
-public protocol RequestRetrier {
-    /// Determines whether the `Request` should be retried by calling the `completion` closure.
-    ///
-    /// This operation is fully asynchronous. Any amount of time can be taken to determine whether the request needs
-    /// to be retried. The one requirement is that the completion closure is called to ensure the request is properly
-    /// cleaned up after.
-    ///
-    /// - Parameters:
-    ///   - request:    `Request` that failed due to the provided `Error`.
-    ///   - session:    `Session` that produced the `Request`.
-    ///   - error:      `Error` encountered while executing the `Request`.
-    ///   - completion: Completion closure to be executed when a retry decision has been determined.
-    func retry(_ request: Request, for session: Session, dueTo error: Error, completion: @escaping (RetryResult) -> Void)
-}
-
-// MARK: -
-
-/// Type that provides both `RequestAdapter` and `RequestRetrier` functionality.
-public protocol RequestInterceptor: RequestAdapter, RequestRetrier {}
-
-extension RequestInterceptor {
-    public func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result<URLRequest, Error>) -> Void) {
-        completion(.success(urlRequest))
-    }
-
-    public func retry(_ request: Request,
-                      for session: Session,
-                      dueTo error: Error,
-                      completion: @escaping (RetryResult) -> Void) {
-        completion(.doNotRetry)
-    }
-}
-
-/// `RequestAdapter` closure definition.
-public typealias AdaptHandler = (URLRequest, Session, _ completion: @escaping (Result<URLRequest, Error>) -> Void) -> Void
-/// `RequestRetrier` closure definition.
-public typealias RetryHandler = (Request, Session, Error, _ completion: @escaping (RetryResult) -> Void) -> Void
-
-// MARK: -
-
-/// Closure-based `RequestAdapter`.
-open class Adapter: RequestInterceptor {
-    private let adaptHandler: AdaptHandler
-
-    /// Creates an instance using the provided closure.
-    ///
-    /// - Parameter adaptHandler: `AdaptHandler` closure to be executed when handling request adaptation.
-    public init(_ adaptHandler: @escaping AdaptHandler) {
-        self.adaptHandler = adaptHandler
-    }
-
-    open func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result<URLRequest, Error>) -> Void) {
-        adaptHandler(urlRequest, session, completion)
-    }
-
-    open func adapt(_ urlRequest: URLRequest, using state: RequestAdapterState, completion: @escaping (Result<URLRequest, Error>) -> Void) {
-        adaptHandler(urlRequest, state.session, completion)
-    }
-}
-
-#if swift(>=5.5)
-extension RequestAdapter where Self == Adapter {
-    /// Creates an `Adapter` using the provided `AdaptHandler` closure.
-    ///
-    /// - Parameter closure: `AdaptHandler` to use to adapt the request.
-    /// - Returns:           The `Adapter`.
-    public static func adapter(using closure: @escaping AdaptHandler) -> Adapter {
-        Adapter(closure)
-    }
-}
-#endif
-
-// MARK: -
-
-/// Closure-based `RequestRetrier`.
-open class Retrier: RequestInterceptor {
-    private let retryHandler: RetryHandler
-
-    /// Creates an instance using the provided closure.
-    ///
-    /// - Parameter retryHandler: `RetryHandler` closure to be executed when handling request retry.
-    public init(_ retryHandler: @escaping RetryHandler) {
-        self.retryHandler = retryHandler
-    }
-
-    open func retry(_ request: Request,
-                    for session: Session,
-                    dueTo error: Error,
-                    completion: @escaping (RetryResult) -> Void) {
-        retryHandler(request, session, error, completion)
-    }
-}
-
-#if swift(>=5.5)
-extension RequestRetrier where Self == Retrier {
-    /// Creates a `Retrier` using the provided `RetryHandler` closure.
-    ///
-    /// - Parameter closure: `RetryHandler` to use to retry the request.
-    /// - Returns:           The `Retrier`.
-    public static func retrier(using closure: @escaping RetryHandler) -> Retrier {
-        Retrier(closure)
-    }
-}
-#endif
-
-// MARK: -
-
-/// `RequestInterceptor` which can use multiple `RequestAdapter` and `RequestRetrier` values.
-open class Interceptor: RequestInterceptor {
-    /// All `RequestAdapter`s associated with the instance. These adapters will be run until one fails.
-    public let adapters: [RequestAdapter]
-    /// All `RequestRetrier`s associated with the instance. These retriers will be run one at a time until one triggers retry.
-    public let retriers: [RequestRetrier]
-
-    /// Creates an instance from `AdaptHandler` and `RetryHandler` closures.
-    ///
-    /// - Parameters:
-    ///   - adaptHandler: `AdaptHandler` closure to be used.
-    ///   - retryHandler: `RetryHandler` closure to be used.
-    public init(adaptHandler: @escaping AdaptHandler, retryHandler: @escaping RetryHandler) {
-        adapters = [Adapter(adaptHandler)]
-        retriers = [Retrier(retryHandler)]
-    }
-
-    /// Creates an instance from `RequestAdapter` and `RequestRetrier` values.
-    ///
-    /// - Parameters:
-    ///   - adapter: `RequestAdapter` value to be used.
-    ///   - retrier: `RequestRetrier` value to be used.
-    public init(adapter: RequestAdapter, retrier: RequestRetrier) {
-        adapters = [adapter]
-        retriers = [retrier]
-    }
-
-    /// Creates an instance from the arrays of `RequestAdapter` and `RequestRetrier` values.
-    ///
-    /// - Parameters:
-    ///   - adapters:     `RequestAdapter` values to be used.
-    ///   - retriers:     `RequestRetrier` values to be used.
-    ///   - interceptors: `RequestInterceptor`s to be used.
-    public init(adapters: [RequestAdapter] = [], retriers: [RequestRetrier] = [], interceptors: [RequestInterceptor] = []) {
-        self.adapters = adapters + interceptors
-        self.retriers = retriers + interceptors
-    }
-
-    open func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result<URLRequest, Error>) -> Void) {
-        adapt(urlRequest, for: session, using: adapters, completion: completion)
-    }
-
-    private func adapt(_ urlRequest: URLRequest,
-                       for session: Session,
-                       using adapters: [RequestAdapter],
-                       completion: @escaping (Result<URLRequest, Error>) -> Void) {
-        var pendingAdapters = adapters
-
-        guard !pendingAdapters.isEmpty else { completion(.success(urlRequest)); return }
-
-        let adapter = pendingAdapters.removeFirst()
-
-        adapter.adapt(urlRequest, for: session) { result in
-            switch result {
-            case let .success(urlRequest):
-                self.adapt(urlRequest, for: session, using: pendingAdapters, completion: completion)
-            case .failure:
-                completion(result)
-            }
-        }
-    }
-
-    open func adapt(_ urlRequest: URLRequest, using state: RequestAdapterState, completion: @escaping (Result<URLRequest, Error>) -> Void) {
-        adapt(urlRequest, using: state, adapters: adapters, completion: completion)
-    }
-
-    private func adapt(_ urlRequest: URLRequest,
-                       using state: RequestAdapterState,
-                       adapters: [RequestAdapter],
-                       completion: @escaping (Result<URLRequest, Error>) -> Void) {
-        var pendingAdapters = adapters
-
-        guard !pendingAdapters.isEmpty else { completion(.success(urlRequest)); return }
-
-        let adapter = pendingAdapters.removeFirst()
-
-        adapter.adapt(urlRequest, using: state) { result in
-            switch result {
-            case let .success(urlRequest):
-                self.adapt(urlRequest, using: state, adapters: pendingAdapters, completion: completion)
-            case .failure:
-                completion(result)
-            }
-        }
-    }
-
-    open func retry(_ request: Request,
-                    for session: Session,
-                    dueTo error: Error,
-                    completion: @escaping (RetryResult) -> Void) {
-        retry(request, for: session, dueTo: error, using: retriers, completion: completion)
-    }
-
-    private func retry(_ request: Request,
-                       for session: Session,
-                       dueTo error: Error,
-                       using retriers: [RequestRetrier],
-                       completion: @escaping (RetryResult) -> Void) {
-        var pendingRetriers = retriers
-
-        guard !pendingRetriers.isEmpty else { completion(.doNotRetry); return }
-
-        let retrier = pendingRetriers.removeFirst()
-
-        retrier.retry(request, for: session, dueTo: error) { result in
-            switch result {
-            case .retry, .retryWithDelay, .doNotRetryWithError:
-                completion(result)
-            case .doNotRetry:
-                // Only continue to the next retrier if retry was not triggered and no error was encountered
-                self.retry(request, for: session, dueTo: error, using: pendingRetriers, completion: completion)
-            }
-        }
-    }
-}
-
-#if swift(>=5.5)
-extension RequestInterceptor where Self == Interceptor {
-    /// Creates an `Interceptor` using the provided `AdaptHandler` and `RetryHandler` closures.
-    ///
-    /// - Parameters:
-    ///   - adapter: `AdapterHandler`to use to adapt the request.
-    ///   - retrier: `RetryHandler` to use to retry the request.
-    /// - Returns:   The `Interceptor`.
-    public static func interceptor(adapter: @escaping AdaptHandler, retrier: @escaping RetryHandler) -> Interceptor {
-        Interceptor(adaptHandler: adapter, retryHandler: retrier)
-    }
-
-    /// Creates an `Interceptor` using the provided `RequestAdapter` and `RequestRetrier` instances.
-    /// - Parameters:
-    ///   - adapter: `RequestAdapter` to use to adapt the request
-    ///   - retrier: `RequestRetrier` to use to retry the request.
-    /// - Returns:   The `Interceptor`.
-    public static func interceptor(adapter: RequestAdapter, retrier: RequestRetrier) -> Interceptor {
-        Interceptor(adapter: adapter, retrier: retrier)
-    }
-
-    /// Creates an `Interceptor` using the provided `RequestAdapter`s, `RequestRetrier`s, and `RequestInterceptor`s.
-    /// - Parameters:
-    ///   - adapters:     `RequestAdapter`s to use to adapt the request. These adapters will be run until one fails.
-    ///   - retriers:     `RequestRetrier`s to use to retry the request. These retriers will be run one at a time until
-    ///                   a retry is triggered.
-    ///   - interceptors: `RequestInterceptor`s to use to intercept the request.
-    /// - Returns:        The `Interceptor`.
-    public static func interceptor(adapters: [RequestAdapter] = [],
-                                   retriers: [RequestRetrier] = [],
-                                   interceptors: [RequestInterceptor] = []) -> Interceptor {
-        Interceptor(adapters: adapters, retriers: retriers, interceptors: interceptors)
-    }
-}
-#endif

+ 0 - 149
Pods/Alamofire/Source/RequestTaskMap.swift

@@ -1,149 +0,0 @@
-//
-//  RequestTaskMap.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 type that maintains a two way, one to one map of `URLSessionTask`s to `Request`s.
-struct RequestTaskMap {
-    private typealias Events = (completed: Bool, metricsGathered: Bool)
-
-    private var tasksToRequests: [URLSessionTask: Request]
-    private var requestsToTasks: [Request: URLSessionTask]
-    private var taskEvents: [URLSessionTask: Events]
-
-    var requests: [Request] {
-        Array(tasksToRequests.values)
-    }
-
-    init(tasksToRequests: [URLSessionTask: Request] = [:],
-         requestsToTasks: [Request: URLSessionTask] = [:],
-         taskEvents: [URLSessionTask: (completed: Bool, metricsGathered: Bool)] = [:]) {
-        self.tasksToRequests = tasksToRequests
-        self.requestsToTasks = requestsToTasks
-        self.taskEvents = taskEvents
-    }
-
-    subscript(_ request: Request) -> URLSessionTask? {
-        get { requestsToTasks[request] }
-        set {
-            guard let newValue = newValue else {
-                guard let task = requestsToTasks[request] else {
-                    fatalError("RequestTaskMap consistency error: no task corresponding to request found.")
-                }
-
-                requestsToTasks.removeValue(forKey: request)
-                tasksToRequests.removeValue(forKey: task)
-                taskEvents.removeValue(forKey: task)
-
-                return
-            }
-
-            requestsToTasks[request] = newValue
-            tasksToRequests[newValue] = request
-            taskEvents[newValue] = (completed: false, metricsGathered: false)
-        }
-    }
-
-    subscript(_ task: URLSessionTask) -> Request? {
-        get { tasksToRequests[task] }
-        set {
-            guard let newValue = newValue else {
-                guard let request = tasksToRequests[task] else {
-                    fatalError("RequestTaskMap consistency error: no request corresponding to task found.")
-                }
-
-                tasksToRequests.removeValue(forKey: task)
-                requestsToTasks.removeValue(forKey: request)
-                taskEvents.removeValue(forKey: task)
-
-                return
-            }
-
-            tasksToRequests[task] = newValue
-            requestsToTasks[newValue] = task
-            taskEvents[task] = (completed: false, metricsGathered: false)
-        }
-    }
-
-    var count: Int {
-        precondition(tasksToRequests.count == requestsToTasks.count,
-                     "RequestTaskMap.count invalid, requests.count: \(tasksToRequests.count) != tasks.count: \(requestsToTasks.count)")
-
-        return tasksToRequests.count
-    }
-
-    var eventCount: Int {
-        precondition(taskEvents.count == count, "RequestTaskMap.eventCount invalid, count: \(count) != taskEvents.count: \(taskEvents.count)")
-
-        return taskEvents.count
-    }
-
-    var isEmpty: Bool {
-        precondition(tasksToRequests.isEmpty == requestsToTasks.isEmpty,
-                     "RequestTaskMap.isEmpty invalid, requests.isEmpty: \(tasksToRequests.isEmpty) != tasks.isEmpty: \(requestsToTasks.isEmpty)")
-
-        return tasksToRequests.isEmpty
-    }
-
-    var isEventsEmpty: Bool {
-        precondition(taskEvents.isEmpty == isEmpty, "RequestTaskMap.isEventsEmpty invalid, isEmpty: \(isEmpty) != taskEvents.isEmpty: \(taskEvents.isEmpty)")
-
-        return taskEvents.isEmpty
-    }
-
-    mutating func disassociateIfNecessaryAfterGatheringMetricsForTask(_ task: URLSessionTask) -> Bool {
-        guard let events = taskEvents[task] else {
-            fatalError("RequestTaskMap consistency error: no events corresponding to task found.")
-        }
-
-        switch (events.completed, events.metricsGathered) {
-        case (_, true): fatalError("RequestTaskMap consistency error: duplicate metricsGatheredForTask call.")
-        case (false, false): taskEvents[task] = (completed: false, metricsGathered: true); return false
-        case (true, false): self[task] = nil; return true
-        }
-    }
-
-    mutating func disassociateIfNecessaryAfterCompletingTask(_ task: URLSessionTask) -> Bool {
-        guard let events = taskEvents[task] else {
-            fatalError("RequestTaskMap consistency error: no events corresponding to task found.")
-        }
-
-        switch (events.completed, events.metricsGathered) {
-        case (true, _): fatalError("RequestTaskMap consistency error: duplicate completionReceivedForTask call.")
-        #if os(Linux) // Linux doesn't gather metrics, so unconditionally remove the reference and return true.
-        default: self[task] = nil; return true
-        #else
-        case (false, false):
-            if #available(macOS 10.12, iOS 10, watchOS 7, tvOS 10, *) {
-                taskEvents[task] = (completed: true, metricsGathered: false); return false
-            } else {
-                // watchOS < 7 doesn't gather metrics, so unconditionally remove the reference and return true.
-                self[task] = nil; return true
-            }
-        case (false, true):
-            self[task] = nil; return true
-        #endif
-        }
-    }
-}

+ 0 - 453
Pods/Alamofire/Source/Response.swift

@@ -1,453 +0,0 @@
-//
-//  Response.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// Default type of `DataResponse` returned by Alamofire, with an `AFError` `Failure` type.
-public typealias AFDataResponse<Success> = DataResponse<Success, AFError>
-/// Default type of `DownloadResponse` returned by Alamofire, with an `AFError` `Failure` type.
-public typealias AFDownloadResponse<Success> = DownloadResponse<Success, AFError>
-
-/// Type used to store all values associated with a serialized response of a `DataRequest` or `UploadRequest`.
-public struct DataResponse<Success, Failure: Error> {
-    /// The URL request sent to the server.
-    public let request: URLRequest?
-
-    /// The server's response to the URL request.
-    public let response: HTTPURLResponse?
-
-    /// The data returned by the server.
-    public let data: Data?
-
-    /// The final metrics of the response.
-    ///
-    /// - Note: Due to `FB7624529`, collection of `URLSessionTaskMetrics` on watchOS is currently disabled.`
-    ///
-    public let metrics: URLSessionTaskMetrics?
-
-    /// The time taken to serialize the response.
-    public let serializationDuration: TimeInterval
-
-    /// The result of response serialization.
-    public let result: Result<Success, Failure>
-
-    /// Returns the associated value of the result if it is a success, `nil` otherwise.
-    public var value: Success? { result.success }
-
-    /// Returns the associated error value if the result if it is a failure, `nil` otherwise.
-    public var error: Failure? { result.failure }
-
-    /// Creates a `DataResponse` instance with the specified parameters derived from the response serialization.
-    ///
-    /// - Parameters:
-    ///   - request:               The `URLRequest` sent to the server.
-    ///   - response:              The `HTTPURLResponse` from the server.
-    ///   - data:                  The `Data` returned by the server.
-    ///   - metrics:               The `URLSessionTaskMetrics` of the `DataRequest` or `UploadRequest`.
-    ///   - serializationDuration: The duration taken by serialization.
-    ///   - result:                The `Result` of response serialization.
-    public init(request: URLRequest?,
-                response: HTTPURLResponse?,
-                data: Data?,
-                metrics: URLSessionTaskMetrics?,
-                serializationDuration: TimeInterval,
-                result: Result<Success, Failure>) {
-        self.request = request
-        self.response = response
-        self.data = data
-        self.metrics = metrics
-        self.serializationDuration = serializationDuration
-        self.result = result
-    }
-}
-
-// MARK: -
-
-extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible {
-    /// The textual representation used when written to an output stream, which includes whether the result was a
-    /// success or failure.
-    public var description: String {
-        "\(result)"
-    }
-
-    /// The debug textual representation used when written to an output stream, which includes (if available) a summary
-    /// of the `URLRequest`, the request's headers and body (if decodable as a `String` below 100KB); the
-    /// `HTTPURLResponse`'s status code, headers, and body; the duration of the network and serialization actions; and
-    /// the `Result` of serialization.
-    public var debugDescription: String {
-        guard let urlRequest = request else { return "[Request]: None\n[Result]: \(result)" }
-
-        let requestDescription = DebugDescription.description(of: urlRequest)
-
-        let responseDescription = response.map { response in
-            let responseBodyDescription = DebugDescription.description(for: data, headers: response.headers)
-
-            return """
-            \(DebugDescription.description(of: response))
-                \(responseBodyDescription.indentingNewlines())
-            """
-        } ?? "[Response]: None"
-
-        let networkDuration = metrics.map { "\($0.taskInterval.duration)s" } ?? "None"
-
-        return """
-        \(requestDescription)
-        \(responseDescription)
-        [Network Duration]: \(networkDuration)
-        [Serialization Duration]: \(serializationDuration)s
-        [Result]: \(result)
-        """
-    }
-}
-
-// MARK: -
-
-extension DataResponse {
-    /// Evaluates the specified closure when the result of this `DataResponse` is a success, passing the unwrapped
-    /// result value as a parameter.
-    ///
-    /// Use the `map` method with a closure that does not throw. For example:
-    ///
-    ///     let possibleData: DataResponse<Data> = ...
-    ///     let possibleInt = possibleData.map { $0.count }
-    ///
-    /// - parameter transform: A closure that takes the success value of the instance's result.
-    ///
-    /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's
-    ///            result is a failure, returns a response wrapping the same failure.
-    public func map<NewSuccess>(_ transform: (Success) -> NewSuccess) -> DataResponse<NewSuccess, Failure> {
-        DataResponse<NewSuccess, Failure>(request: request,
-                                          response: response,
-                                          data: data,
-                                          metrics: metrics,
-                                          serializationDuration: serializationDuration,
-                                          result: result.map(transform))
-    }
-
-    /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result
-    /// value as a parameter.
-    ///
-    /// Use the `tryMap` method with a closure that may throw an error. For example:
-    ///
-    ///     let possibleData: DataResponse<Data> = ...
-    ///     let possibleObject = possibleData.tryMap {
-    ///         try JSONSerialization.jsonObject(with: $0)
-    ///     }
-    ///
-    /// - parameter transform: A closure that takes the success value of the instance's result.
-    ///
-    /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's
-    ///            result is a failure, returns the same failure.
-    public func tryMap<NewSuccess>(_ transform: (Success) throws -> NewSuccess) -> DataResponse<NewSuccess, Error> {
-        DataResponse<NewSuccess, Error>(request: request,
-                                        response: response,
-                                        data: data,
-                                        metrics: metrics,
-                                        serializationDuration: serializationDuration,
-                                        result: result.tryMap(transform))
-    }
-
-    /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter.
-    ///
-    /// Use the `mapError` function with a closure that does not throw. For example:
-    ///
-    ///     let possibleData: DataResponse<Data> = ...
-    ///     let withMyError = possibleData.mapError { MyError.error($0) }
-    ///
-    /// - Parameter transform: A closure that takes the error of the instance.
-    ///
-    /// - Returns: A `DataResponse` instance containing the result of the transform.
-    public func mapError<NewFailure: Error>(_ transform: (Failure) -> NewFailure) -> DataResponse<Success, NewFailure> {
-        DataResponse<Success, NewFailure>(request: request,
-                                          response: response,
-                                          data: data,
-                                          metrics: metrics,
-                                          serializationDuration: serializationDuration,
-                                          result: result.mapError(transform))
-    }
-
-    /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter.
-    ///
-    /// Use the `tryMapError` function with a closure that may throw an error. For example:
-    ///
-    ///     let possibleData: DataResponse<Data> = ...
-    ///     let possibleObject = possibleData.tryMapError {
-    ///         try someFailableFunction(taking: $0)
-    ///     }
-    ///
-    /// - Parameter transform: A throwing closure that takes the error of the instance.
-    ///
-    /// - Returns: A `DataResponse` instance containing the result of the transform.
-    public func tryMapError<NewFailure: Error>(_ transform: (Failure) throws -> NewFailure) -> DataResponse<Success, Error> {
-        DataResponse<Success, Error>(request: request,
-                                     response: response,
-                                     data: data,
-                                     metrics: metrics,
-                                     serializationDuration: serializationDuration,
-                                     result: result.tryMapError(transform))
-    }
-}
-
-// MARK: -
-
-/// Used to store all data associated with a serialized response of a download request.
-public struct DownloadResponse<Success, Failure: Error> {
-    /// The URL request sent to the server.
-    public let request: URLRequest?
-
-    /// The server's response to the URL request.
-    public let response: HTTPURLResponse?
-
-    /// The final destination URL of the data returned from the server after it is moved.
-    public let fileURL: URL?
-
-    /// The resume data generated if the request was cancelled.
-    public let resumeData: Data?
-
-    /// The final metrics of the response.
-    ///
-    /// - Note: Due to `FB7624529`, collection of `URLSessionTaskMetrics` on watchOS is currently disabled.`
-    ///
-    public let metrics: URLSessionTaskMetrics?
-
-    /// The time taken to serialize the response.
-    public let serializationDuration: TimeInterval
-
-    /// The result of response serialization.
-    public let result: Result<Success, Failure>
-
-    /// Returns the associated value of the result if it is a success, `nil` otherwise.
-    public var value: Success? { result.success }
-
-    /// Returns the associated error value if the result if it is a failure, `nil` otherwise.
-    public var error: Failure? { result.failure }
-
-    /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization.
-    ///
-    /// - Parameters:
-    ///   - request:               The `URLRequest` sent to the server.
-    ///   - response:              The `HTTPURLResponse` from the server.
-    ///   - fileURL:               The final destination URL of the data returned from the server after it is moved.
-    ///   - resumeData:            The resume `Data` generated if the request was cancelled.
-    ///   - metrics:               The `URLSessionTaskMetrics` of the `DownloadRequest`.
-    ///   - serializationDuration: The duration taken by serialization.
-    ///   - result:                The `Result` of response serialization.
-    public init(request: URLRequest?,
-                response: HTTPURLResponse?,
-                fileURL: URL?,
-                resumeData: Data?,
-                metrics: URLSessionTaskMetrics?,
-                serializationDuration: TimeInterval,
-                result: Result<Success, Failure>) {
-        self.request = request
-        self.response = response
-        self.fileURL = fileURL
-        self.resumeData = resumeData
-        self.metrics = metrics
-        self.serializationDuration = serializationDuration
-        self.result = result
-    }
-}
-
-// MARK: -
-
-extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertible {
-    /// The textual representation used when written to an output stream, which includes whether the result was a
-    /// success or failure.
-    public var description: String {
-        "\(result)"
-    }
-
-    /// The debug textual representation used when written to an output stream, which includes the URL request, the URL
-    /// response, the temporary and destination URLs, the resume data, the durations of the network and serialization
-    /// actions, and the response serialization result.
-    public var debugDescription: String {
-        guard let urlRequest = request else { return "[Request]: None\n[Result]: \(result)" }
-
-        let requestDescription = DebugDescription.description(of: urlRequest)
-        let responseDescription = response.map(DebugDescription.description(of:)) ?? "[Response]: None"
-        let networkDuration = metrics.map { "\($0.taskInterval.duration)s" } ?? "None"
-        let resumeDataDescription = resumeData.map { "\($0)" } ?? "None"
-
-        return """
-        \(requestDescription)
-        \(responseDescription)
-        [File URL]: \(fileURL?.path ?? "None")
-        [Resume Data]: \(resumeDataDescription)
-        [Network Duration]: \(networkDuration)
-        [Serialization Duration]: \(serializationDuration)s
-        [Result]: \(result)
-        """
-    }
-}
-
-// MARK: -
-
-extension DownloadResponse {
-    /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped
-    /// result value as a parameter.
-    ///
-    /// Use the `map` method with a closure that does not throw. For example:
-    ///
-    ///     let possibleData: DownloadResponse<Data> = ...
-    ///     let possibleInt = possibleData.map { $0.count }
-    ///
-    /// - parameter transform: A closure that takes the success value of the instance's result.
-    ///
-    /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's
-    ///            result is a failure, returns a response wrapping the same failure.
-    public func map<NewSuccess>(_ transform: (Success) -> NewSuccess) -> DownloadResponse<NewSuccess, Failure> {
-        DownloadResponse<NewSuccess, Failure>(request: request,
-                                              response: response,
-                                              fileURL: fileURL,
-                                              resumeData: resumeData,
-                                              metrics: metrics,
-                                              serializationDuration: serializationDuration,
-                                              result: result.map(transform))
-    }
-
-    /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped
-    /// result value as a parameter.
-    ///
-    /// Use the `tryMap` method with a closure that may throw an error. For example:
-    ///
-    ///     let possibleData: DownloadResponse<Data> = ...
-    ///     let possibleObject = possibleData.tryMap {
-    ///         try JSONSerialization.jsonObject(with: $0)
-    ///     }
-    ///
-    /// - parameter transform: A closure that takes the success value of the instance's result.
-    ///
-    /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this
-    /// instance's result is a failure, returns the same failure.
-    public func tryMap<NewSuccess>(_ transform: (Success) throws -> NewSuccess) -> DownloadResponse<NewSuccess, Error> {
-        DownloadResponse<NewSuccess, Error>(request: request,
-                                            response: response,
-                                            fileURL: fileURL,
-                                            resumeData: resumeData,
-                                            metrics: metrics,
-                                            serializationDuration: serializationDuration,
-                                            result: result.tryMap(transform))
-    }
-
-    /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter.
-    ///
-    /// Use the `mapError` function with a closure that does not throw. For example:
-    ///
-    ///     let possibleData: DownloadResponse<Data> = ...
-    ///     let withMyError = possibleData.mapError { MyError.error($0) }
-    ///
-    /// - Parameter transform: A closure that takes the error of the instance.
-    ///
-    /// - Returns: A `DownloadResponse` instance containing the result of the transform.
-    public func mapError<NewFailure: Error>(_ transform: (Failure) -> NewFailure) -> DownloadResponse<Success, NewFailure> {
-        DownloadResponse<Success, NewFailure>(request: request,
-                                              response: response,
-                                              fileURL: fileURL,
-                                              resumeData: resumeData,
-                                              metrics: metrics,
-                                              serializationDuration: serializationDuration,
-                                              result: result.mapError(transform))
-    }
-
-    /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter.
-    ///
-    /// Use the `tryMapError` function with a closure that may throw an error. For example:
-    ///
-    ///     let possibleData: DownloadResponse<Data> = ...
-    ///     let possibleObject = possibleData.tryMapError {
-    ///         try someFailableFunction(taking: $0)
-    ///     }
-    ///
-    /// - Parameter transform: A throwing closure that takes the error of the instance.
-    ///
-    /// - Returns: A `DownloadResponse` instance containing the result of the transform.
-    public func tryMapError<NewFailure: Error>(_ transform: (Failure) throws -> NewFailure) -> DownloadResponse<Success, Error> {
-        DownloadResponse<Success, Error>(request: request,
-                                         response: response,
-                                         fileURL: fileURL,
-                                         resumeData: resumeData,
-                                         metrics: metrics,
-                                         serializationDuration: serializationDuration,
-                                         result: result.tryMapError(transform))
-    }
-}
-
-private enum DebugDescription {
-    static func description(of request: URLRequest) -> String {
-        let requestSummary = "\(request.httpMethod!) \(request)"
-        let requestHeadersDescription = DebugDescription.description(for: request.headers)
-        let requestBodyDescription = DebugDescription.description(for: request.httpBody, headers: request.headers)
-
-        return """
-        [Request]: \(requestSummary)
-            \(requestHeadersDescription.indentingNewlines())
-            \(requestBodyDescription.indentingNewlines())
-        """
-    }
-
-    static func description(of response: HTTPURLResponse) -> String {
-        """
-        [Response]:
-            [Status Code]: \(response.statusCode)
-            \(DebugDescription.description(for: response.headers).indentingNewlines())
-        """
-    }
-
-    static func description(for headers: HTTPHeaders) -> String {
-        guard !headers.isEmpty else { return "[Headers]: None" }
-
-        let headerDescription = "\(headers.sorted())".indentingNewlines()
-        return """
-        [Headers]:
-            \(headerDescription)
-        """
-    }
-
-    static func description(for data: Data?,
-                            headers: HTTPHeaders,
-                            allowingPrintableTypes printableTypes: [String] = ["json", "xml", "text"],
-                            maximumLength: Int = 100_000) -> String {
-        guard let data = data, !data.isEmpty else { return "[Body]: None" }
-
-        guard
-            data.count <= maximumLength,
-            printableTypes.compactMap({ headers["Content-Type"]?.contains($0) }).contains(true)
-        else { return "[Body]: \(data.count) bytes" }
-
-        return """
-        [Body]:
-            \(String(decoding: data, as: UTF8.self)
-            .trimmingCharacters(in: .whitespacesAndNewlines)
-            .indentingNewlines())
-        """
-    }
-}
-
-extension String {
-    fileprivate func indentingNewlines(by spaceCount: Int = 4) -> String {
-        let spaces = String(repeating: " ", count: spaceCount)
-        return replacingOccurrences(of: "\n", with: "\n\(spaces)")
-    }
-}

+ 0 - 1282
Pods/Alamofire/Source/ResponseSerialization.swift

@@ -1,1282 +0,0 @@
-//
-//  ResponseSerialization.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-// MARK: Protocols
-
-/// The type to which all data response serializers must conform in order to serialize a response.
-public protocol DataResponseSerializerProtocol {
-    /// The type of serialized object to be created.
-    associatedtype SerializedObject
-
-    /// Serialize the response `Data` into the provided type..
-    ///
-    /// - Parameters:
-    ///   - request:  `URLRequest` which was used to perform the request, if any.
-    ///   - response: `HTTPURLResponse` received from the server, if any.
-    ///   - data:     `Data` returned from the server, if any.
-    ///   - error:    `Error` produced by Alamofire or the underlying `URLSession` during the request.
-    ///
-    /// - Returns:    The `SerializedObject`.
-    /// - Throws:     Any `Error` produced during serialization.
-    func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> SerializedObject
-}
-
-/// The type to which all download response serializers must conform in order to serialize a response.
-public protocol DownloadResponseSerializerProtocol {
-    /// The type of serialized object to be created.
-    associatedtype SerializedObject
-
-    /// Serialize the downloaded response `Data` from disk into the provided type..
-    ///
-    /// - Parameters:
-    ///   - request:  `URLRequest` which was used to perform the request, if any.
-    ///   - response: `HTTPURLResponse` received from the server, if any.
-    ///   - fileURL:  File `URL` to which the response data was downloaded.
-    ///   - error:    `Error` produced by Alamofire or the underlying `URLSession` during the request.
-    ///
-    /// - Returns:    The `SerializedObject`.
-    /// - Throws:     Any `Error` produced during serialization.
-    func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> SerializedObject
-}
-
-/// A serializer that can handle both data and download responses.
-public protocol ResponseSerializer: DataResponseSerializerProtocol & DownloadResponseSerializerProtocol {
-    /// `DataPreprocessor` used to prepare incoming `Data` for serialization.
-    var dataPreprocessor: DataPreprocessor { get }
-    /// `HTTPMethod`s for which empty response bodies are considered appropriate.
-    var emptyRequestMethods: Set<HTTPMethod> { get }
-    /// HTTP response codes for which empty response bodies are considered appropriate.
-    var emptyResponseCodes: Set<Int> { get }
-}
-
-/// Type used to preprocess `Data` before it handled by a serializer.
-public protocol DataPreprocessor {
-    /// Process           `Data` before it's handled by a serializer.
-    /// - Parameter data: The raw `Data` to process.
-    func preprocess(_ data: Data) throws -> Data
-}
-
-/// `DataPreprocessor` that returns passed `Data` without any transform.
-public struct PassthroughPreprocessor: DataPreprocessor {
-    public init() {}
-
-    public func preprocess(_ data: Data) throws -> Data { data }
-}
-
-/// `DataPreprocessor` that trims Google's typical `)]}',\n` XSSI JSON header.
-public struct GoogleXSSIPreprocessor: DataPreprocessor {
-    public init() {}
-
-    public func preprocess(_ data: Data) throws -> Data {
-        (data.prefix(6) == Data(")]}',\n".utf8)) ? data.dropFirst(6) : data
-    }
-}
-
-#if swift(>=5.5)
-extension DataPreprocessor where Self == PassthroughPreprocessor {
-    /// Provides a `PassthroughPreprocessor` instance.
-    public static var passthrough: PassthroughPreprocessor { PassthroughPreprocessor() }
-}
-
-extension DataPreprocessor where Self == GoogleXSSIPreprocessor {
-    /// Provides a `GoogleXSSIPreprocessor` instance.
-    public static var googleXSSI: GoogleXSSIPreprocessor { GoogleXSSIPreprocessor() }
-}
-#endif
-
-extension ResponseSerializer {
-    /// Default `DataPreprocessor`. `PassthroughPreprocessor` by default.
-    public static var defaultDataPreprocessor: DataPreprocessor { PassthroughPreprocessor() }
-    /// Default `HTTPMethod`s for which empty response bodies are considered appropriate. `[.head]` by default.
-    public static var defaultEmptyRequestMethods: Set<HTTPMethod> { [.head] }
-    /// HTTP response codes for which empty response bodies are considered appropriate. `[204, 205]` by default.
-    public static var defaultEmptyResponseCodes: Set<Int> { [204, 205] }
-
-    public var dataPreprocessor: DataPreprocessor { Self.defaultDataPreprocessor }
-    public var emptyRequestMethods: Set<HTTPMethod> { Self.defaultEmptyRequestMethods }
-    public var emptyResponseCodes: Set<Int> { Self.defaultEmptyResponseCodes }
-
-    /// Determines whether the `request` allows empty response bodies, if `request` exists.
-    ///
-    /// - Parameter request: `URLRequest` to evaluate.
-    ///
-    /// - Returns:           `Bool` representing the outcome of the evaluation, or `nil` if `request` was `nil`.
-    public func requestAllowsEmptyResponseData(_ request: URLRequest?) -> Bool? {
-        request.flatMap(\.httpMethod)
-            .flatMap(HTTPMethod.init)
-            .map { emptyRequestMethods.contains($0) }
-    }
-
-    /// Determines whether the `response` allows empty response bodies, if `response` exists`.
-    ///
-    /// - Parameter response: `HTTPURLResponse` to evaluate.
-    ///
-    /// - Returns:            `Bool` representing the outcome of the evaluation, or `nil` if `response` was `nil`.
-    public func responseAllowsEmptyResponseData(_ response: HTTPURLResponse?) -> Bool? {
-        response.map(\.statusCode)
-            .map { emptyResponseCodes.contains($0) }
-    }
-
-    /// Determines whether `request` and `response` allow empty response bodies.
-    ///
-    /// - Parameters:
-    ///   - request:  `URLRequest` to evaluate.
-    ///   - response: `HTTPURLResponse` to evaluate.
-    ///
-    /// - Returns:    `true` if `request` or `response` allow empty bodies, `false` otherwise.
-    public func emptyResponseAllowed(forRequest request: URLRequest?, response: HTTPURLResponse?) -> Bool {
-        (requestAllowsEmptyResponseData(request) == true) || (responseAllowsEmptyResponseData(response) == true)
-    }
-}
-
-/// By default, any serializer declared to conform to both types will get file serialization for free, as it just feeds
-/// the data read from disk into the data response serializer.
-extension DownloadResponseSerializerProtocol where Self: DataResponseSerializerProtocol {
-    public func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> Self.SerializedObject {
-        guard error == nil else { throw error! }
-
-        guard let fileURL = fileURL else {
-            throw AFError.responseSerializationFailed(reason: .inputFileNil)
-        }
-
-        let data: Data
-        do {
-            data = try Data(contentsOf: fileURL)
-        } catch {
-            throw AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))
-        }
-
-        do {
-            return try serialize(request: request, response: response, data: data, error: error)
-        } catch {
-            throw error
-        }
-    }
-}
-
-// MARK: - Default
-
-extension DataRequest {
-    /// Adds a handler to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:             The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - completionHandler: The code to be executed once the request has finished.
-    ///
-    /// - Returns:             The request.
-    @discardableResult
-    public func response(queue: DispatchQueue = .main, completionHandler: @escaping (AFDataResponse<Data?>) -> Void) -> Self {
-        appendResponseSerializer {
-            // Start work that should be on the serialization queue.
-            let result = AFResult<Data?>(value: self.data, error: self.error)
-            // End work that should be on the serialization queue.
-
-            self.underlyingQueue.async {
-                let response = DataResponse(request: self.request,
-                                            response: self.response,
-                                            data: self.data,
-                                            metrics: self.metrics,
-                                            serializationDuration: 0,
-                                            result: result)
-
-                self.eventMonitor?.request(self, didParseResponse: response)
-
-                self.responseSerializerDidComplete { queue.async { completionHandler(response) } }
-            }
-        }
-
-        return self
-    }
-
-    private func _response<Serializer: DataResponseSerializerProtocol>(queue: DispatchQueue = .main,
-                                                                       responseSerializer: Serializer,
-                                                                       completionHandler: @escaping (AFDataResponse<Serializer.SerializedObject>) -> Void)
-        -> Self {
-        appendResponseSerializer {
-            // Start work that should be on the serialization queue.
-            let start = ProcessInfo.processInfo.systemUptime
-            let result: AFResult<Serializer.SerializedObject> = Result {
-                try responseSerializer.serialize(request: self.request,
-                                                 response: self.response,
-                                                 data: self.data,
-                                                 error: self.error)
-            }.mapError { error in
-                error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error)))
-            }
-
-            let end = ProcessInfo.processInfo.systemUptime
-            // End work that should be on the serialization queue.
-
-            self.underlyingQueue.async {
-                let response = DataResponse(request: self.request,
-                                            response: self.response,
-                                            data: self.data,
-                                            metrics: self.metrics,
-                                            serializationDuration: end - start,
-                                            result: result)
-
-                self.eventMonitor?.request(self, didParseResponse: response)
-
-                guard !self.isCancelled, let serializerError = result.failure, let delegate = self.delegate else {
-                    self.responseSerializerDidComplete { queue.async { completionHandler(response) } }
-                    return
-                }
-
-                delegate.retryResult(for: self, dueTo: serializerError) { retryResult in
-                    var didComplete: (() -> Void)?
-
-                    defer {
-                        if let didComplete = didComplete {
-                            self.responseSerializerDidComplete { queue.async { didComplete() } }
-                        }
-                    }
-
-                    switch retryResult {
-                    case .doNotRetry:
-                        didComplete = { completionHandler(response) }
-
-                    case let .doNotRetryWithError(retryError):
-                        let result: AFResult<Serializer.SerializedObject> = .failure(retryError.asAFError(orFailWith: "Received retryError was not already AFError"))
-
-                        let response = DataResponse(request: self.request,
-                                                    response: self.response,
-                                                    data: self.data,
-                                                    metrics: self.metrics,
-                                                    serializationDuration: end - start,
-                                                    result: result)
-
-                        didComplete = { completionHandler(response) }
-
-                    case .retry, .retryWithDelay:
-                        delegate.retryRequest(self, withDelay: retryResult.delay)
-                    }
-                }
-            }
-        }
-
-        return self
-    }
-
-    /// Adds a handler to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:              The queue on which the completion handler is dispatched. `.main` by default
-    ///   - responseSerializer: The response serializer responsible for serializing the request, response, and data.
-    ///   - completionHandler:  The code to be executed once the request has finished.
-    ///
-    /// - Returns:              The request.
-    @discardableResult
-    public func response<Serializer: DataResponseSerializerProtocol>(queue: DispatchQueue = .main,
-                                                                     responseSerializer: Serializer,
-                                                                     completionHandler: @escaping (AFDataResponse<Serializer.SerializedObject>) -> Void)
-        -> Self {
-        _response(queue: queue, responseSerializer: responseSerializer, completionHandler: completionHandler)
-    }
-
-    /// Adds a handler to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:              The queue on which the completion handler is dispatched. `.main` by default
-    ///   - responseSerializer: The response serializer responsible for serializing the request, response, and data.
-    ///   - completionHandler:  The code to be executed once the request has finished.
-    ///
-    /// - Returns:              The request.
-    @discardableResult
-    public func response<Serializer: ResponseSerializer>(queue: DispatchQueue = .main,
-                                                         responseSerializer: Serializer,
-                                                         completionHandler: @escaping (AFDataResponse<Serializer.SerializedObject>) -> Void)
-        -> Self {
-        _response(queue: queue, responseSerializer: responseSerializer, completionHandler: completionHandler)
-    }
-}
-
-extension DownloadRequest {
-    /// Adds a handler to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:             The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - completionHandler: The code to be executed once the request has finished.
-    ///
-    /// - Returns:             The request.
-    @discardableResult
-    public func response(queue: DispatchQueue = .main,
-                         completionHandler: @escaping (AFDownloadResponse<URL?>) -> Void)
-        -> Self {
-        appendResponseSerializer {
-            // Start work that should be on the serialization queue.
-            let result = AFResult<URL?>(value: self.fileURL, error: self.error)
-            // End work that should be on the serialization queue.
-
-            self.underlyingQueue.async {
-                let response = DownloadResponse(request: self.request,
-                                                response: self.response,
-                                                fileURL: self.fileURL,
-                                                resumeData: self.resumeData,
-                                                metrics: self.metrics,
-                                                serializationDuration: 0,
-                                                result: result)
-
-                self.eventMonitor?.request(self, didParseResponse: response)
-
-                self.responseSerializerDidComplete { queue.async { completionHandler(response) } }
-            }
-        }
-
-        return self
-    }
-
-    private func _response<Serializer: DownloadResponseSerializerProtocol>(queue: DispatchQueue = .main,
-                                                                           responseSerializer: Serializer,
-                                                                           completionHandler: @escaping (AFDownloadResponse<Serializer.SerializedObject>) -> Void)
-        -> Self {
-        appendResponseSerializer {
-            // Start work that should be on the serialization queue.
-            let start = ProcessInfo.processInfo.systemUptime
-            let result: AFResult<Serializer.SerializedObject> = Result {
-                try responseSerializer.serializeDownload(request: self.request,
-                                                         response: self.response,
-                                                         fileURL: self.fileURL,
-                                                         error: self.error)
-            }.mapError { error in
-                error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error)))
-            }
-            let end = ProcessInfo.processInfo.systemUptime
-            // End work that should be on the serialization queue.
-
-            self.underlyingQueue.async {
-                let response = DownloadResponse(request: self.request,
-                                                response: self.response,
-                                                fileURL: self.fileURL,
-                                                resumeData: self.resumeData,
-                                                metrics: self.metrics,
-                                                serializationDuration: end - start,
-                                                result: result)
-
-                self.eventMonitor?.request(self, didParseResponse: response)
-
-                guard let serializerError = result.failure, let delegate = self.delegate else {
-                    self.responseSerializerDidComplete { queue.async { completionHandler(response) } }
-                    return
-                }
-
-                delegate.retryResult(for: self, dueTo: serializerError) { retryResult in
-                    var didComplete: (() -> Void)?
-
-                    defer {
-                        if let didComplete = didComplete {
-                            self.responseSerializerDidComplete { queue.async { didComplete() } }
-                        }
-                    }
-
-                    switch retryResult {
-                    case .doNotRetry:
-                        didComplete = { completionHandler(response) }
-
-                    case let .doNotRetryWithError(retryError):
-                        let result: AFResult<Serializer.SerializedObject> = .failure(retryError.asAFError(orFailWith: "Received retryError was not already AFError"))
-
-                        let response = DownloadResponse(request: self.request,
-                                                        response: self.response,
-                                                        fileURL: self.fileURL,
-                                                        resumeData: self.resumeData,
-                                                        metrics: self.metrics,
-                                                        serializationDuration: end - start,
-                                                        result: result)
-
-                        didComplete = { completionHandler(response) }
-
-                    case .retry, .retryWithDelay:
-                        delegate.retryRequest(self, withDelay: retryResult.delay)
-                    }
-                }
-            }
-        }
-
-        return self
-    }
-
-    /// Adds a handler to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:              The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - responseSerializer: The response serializer responsible for serializing the request, response, and data
-    ///                         contained in the destination `URL`.
-    ///   - completionHandler:  The code to be executed once the request has finished.
-    ///
-    /// - Returns:              The request.
-    @discardableResult
-    public func response<Serializer: DownloadResponseSerializerProtocol>(queue: DispatchQueue = .main,
-                                                                         responseSerializer: Serializer,
-                                                                         completionHandler: @escaping (AFDownloadResponse<Serializer.SerializedObject>) -> Void)
-        -> Self {
-        _response(queue: queue, responseSerializer: responseSerializer, completionHandler: completionHandler)
-    }
-
-    /// Adds a handler to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:              The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - responseSerializer: The response serializer responsible for serializing the request, response, and data
-    ///                         contained in the destination `URL`.
-    ///   - completionHandler:  The code to be executed once the request has finished.
-    ///
-    /// - Returns:              The request.
-    @discardableResult
-    public func response<Serializer: ResponseSerializer>(queue: DispatchQueue = .main,
-                                                         responseSerializer: Serializer,
-                                                         completionHandler: @escaping (AFDownloadResponse<Serializer.SerializedObject>) -> Void)
-        -> Self {
-        _response(queue: queue, responseSerializer: responseSerializer, completionHandler: completionHandler)
-    }
-}
-
-// MARK: - URL
-
-/// A `DownloadResponseSerializerProtocol` that performs only `Error` checking and ensures that a downloaded `fileURL`
-/// is present.
-public struct URLResponseSerializer: DownloadResponseSerializerProtocol {
-    /// Creates an instance.
-    public init() {}
-
-    public func serializeDownload(request: URLRequest?,
-                                  response: HTTPURLResponse?,
-                                  fileURL: URL?,
-                                  error: Error?) throws -> URL {
-        guard error == nil else { throw error! }
-
-        guard let url = fileURL else {
-            throw AFError.responseSerializationFailed(reason: .inputFileNil)
-        }
-
-        return url
-    }
-}
-
-#if swift(>=5.5)
-extension DownloadResponseSerializerProtocol where Self == URLResponseSerializer {
-    /// Provides a `URLResponseSerializer` instance.
-    public static var url: URLResponseSerializer { URLResponseSerializer() }
-}
-#endif
-
-extension DownloadRequest {
-    /// Adds a handler using a `URLResponseSerializer` to be called once the request is finished.
-    ///
-    /// - Parameters:
-    ///   - queue:             The queue on which the completion handler is called. `.main` by default.
-    ///   - completionHandler: A closure to be executed once the request has finished.
-    ///
-    /// - Returns:             The request.
-    @discardableResult
-    public func responseURL(queue: DispatchQueue = .main,
-                            completionHandler: @escaping (AFDownloadResponse<URL>) -> Void) -> Self {
-        response(queue: queue, responseSerializer: URLResponseSerializer(), completionHandler: completionHandler)
-    }
-}
-
-// MARK: - Data
-
-/// A `ResponseSerializer` that performs minimal response checking and returns any response `Data` as-is. By default, a
-/// request returning `nil` or no data is considered an error. However, if the request has an `HTTPMethod` or the
-/// response has an  HTTP status code valid for empty responses, then an empty `Data` value is returned.
-public final class DataResponseSerializer: ResponseSerializer {
-    public let dataPreprocessor: DataPreprocessor
-    public let emptyResponseCodes: Set<Int>
-    public let emptyRequestMethods: Set<HTTPMethod>
-
-    /// Creates a `DataResponseSerializer` using the provided parameters.
-    ///
-    /// - Parameters:
-    ///   - dataPreprocessor:    `DataPreprocessor` used to prepare the received `Data` for serialization.
-    ///   - emptyResponseCodes:  The HTTP response codes for which empty responses are allowed. `[204, 205]` by default.
-    ///   - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default.
-    public init(dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor,
-                emptyResponseCodes: Set<Int> = DataResponseSerializer.defaultEmptyResponseCodes,
-                emptyRequestMethods: Set<HTTPMethod> = DataResponseSerializer.defaultEmptyRequestMethods) {
-        self.dataPreprocessor = dataPreprocessor
-        self.emptyResponseCodes = emptyResponseCodes
-        self.emptyRequestMethods = emptyRequestMethods
-    }
-
-    public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> Data {
-        guard error == nil else { throw error! }
-
-        guard var data = data, !data.isEmpty else {
-            guard emptyResponseAllowed(forRequest: request, response: response) else {
-                throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)
-            }
-
-            return Data()
-        }
-
-        data = try dataPreprocessor.preprocess(data)
-
-        return data
-    }
-}
-
-#if swift(>=5.5)
-extension ResponseSerializer where Self == DataResponseSerializer {
-    /// Provides a default `DataResponseSerializer` instance.
-    public static var data: DataResponseSerializer { DataResponseSerializer() }
-
-    /// Creates a `DataResponseSerializer` using the provided parameters.
-    ///
-    /// - Parameters:
-    ///   - dataPreprocessor:    `DataPreprocessor` used to prepare the received `Data` for serialization.
-    ///   - emptyResponseCodes:  The HTTP response codes for which empty responses are allowed. `[204, 205]` by default.
-    ///   - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default.
-    ///
-    /// - Returns:               The `DataResponseSerializer`.
-    public static func data(dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor,
-                            emptyResponseCodes: Set<Int> = DataResponseSerializer.defaultEmptyResponseCodes,
-                            emptyRequestMethods: Set<HTTPMethod> = DataResponseSerializer.defaultEmptyRequestMethods) -> DataResponseSerializer {
-        DataResponseSerializer(dataPreprocessor: dataPreprocessor,
-                               emptyResponseCodes: emptyResponseCodes,
-                               emptyRequestMethods: emptyRequestMethods)
-    }
-}
-#endif
-
-extension DataRequest {
-    /// Adds a handler using a `DataResponseSerializer` to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:               The queue on which the completion handler is called. `.main` by default.
-    ///   - dataPreprocessor:    `DataPreprocessor` which processes the received `Data` before calling the
-    ///                          `completionHandler`. `PassthroughPreprocessor()` by default.
-    ///   - emptyResponseCodes:  HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///   - completionHandler:   A closure to be executed once the request has finished.
-    ///
-    /// - Returns:               The request.
-    @discardableResult
-    public func responseData(queue: DispatchQueue = .main,
-                             dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor,
-                             emptyResponseCodes: Set<Int> = DataResponseSerializer.defaultEmptyResponseCodes,
-                             emptyRequestMethods: Set<HTTPMethod> = DataResponseSerializer.defaultEmptyRequestMethods,
-                             completionHandler: @escaping (AFDataResponse<Data>) -> Void) -> Self {
-        response(queue: queue,
-                 responseSerializer: DataResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                            emptyResponseCodes: emptyResponseCodes,
-                                                            emptyRequestMethods: emptyRequestMethods),
-                 completionHandler: completionHandler)
-    }
-}
-
-extension DownloadRequest {
-    /// Adds a handler using a `DataResponseSerializer` to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:               The queue on which the completion handler is called. `.main` by default.
-    ///   - dataPreprocessor:    `DataPreprocessor` which processes the received `Data` before calling the
-    ///                          `completionHandler`. `PassthroughPreprocessor()` by default.
-    ///   - emptyResponseCodes:  HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///   - completionHandler:   A closure to be executed once the request has finished.
-    ///
-    /// - Returns:               The request.
-    @discardableResult
-    public func responseData(queue: DispatchQueue = .main,
-                             dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor,
-                             emptyResponseCodes: Set<Int> = DataResponseSerializer.defaultEmptyResponseCodes,
-                             emptyRequestMethods: Set<HTTPMethod> = DataResponseSerializer.defaultEmptyRequestMethods,
-                             completionHandler: @escaping (AFDownloadResponse<Data>) -> Void) -> Self {
-        response(queue: queue,
-                 responseSerializer: DataResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                            emptyResponseCodes: emptyResponseCodes,
-                                                            emptyRequestMethods: emptyRequestMethods),
-                 completionHandler: completionHandler)
-    }
-}
-
-// MARK: - String
-
-/// A `ResponseSerializer` that decodes the response data as a `String`. By default, a request returning `nil` or no
-/// data is considered an error. However, if the request has an `HTTPMethod` or the response has an  HTTP status code
-/// valid for empty responses, then an empty `String` is returned.
-public final class StringResponseSerializer: ResponseSerializer {
-    public let dataPreprocessor: DataPreprocessor
-    /// Optional string encoding used to validate the response.
-    public let encoding: String.Encoding?
-    public let emptyResponseCodes: Set<Int>
-    public let emptyRequestMethods: Set<HTTPMethod>
-
-    /// Creates an instance with the provided values.
-    ///
-    /// - Parameters:
-    ///   - dataPreprocessor:    `DataPreprocessor` used to prepare the received `Data` for serialization.
-    ///   - encoding:            A string encoding. Defaults to `nil`, in which case the encoding will be determined
-    ///                          from the server response, falling back to the default HTTP character set, `ISO-8859-1`.
-    ///   - emptyResponseCodes:  The HTTP response codes for which empty responses are allowed. `[204, 205]` by default.
-    ///   - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default.
-    public init(dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor,
-                encoding: String.Encoding? = nil,
-                emptyResponseCodes: Set<Int> = StringResponseSerializer.defaultEmptyResponseCodes,
-                emptyRequestMethods: Set<HTTPMethod> = StringResponseSerializer.defaultEmptyRequestMethods) {
-        self.dataPreprocessor = dataPreprocessor
-        self.encoding = encoding
-        self.emptyResponseCodes = emptyResponseCodes
-        self.emptyRequestMethods = emptyRequestMethods
-    }
-
-    public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> String {
-        guard error == nil else { throw error! }
-
-        guard var data = data, !data.isEmpty else {
-            guard emptyResponseAllowed(forRequest: request, response: response) else {
-                throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)
-            }
-
-            return ""
-        }
-
-        data = try dataPreprocessor.preprocess(data)
-
-        var convertedEncoding = encoding
-
-        if let encodingName = response?.textEncodingName, convertedEncoding == nil {
-            convertedEncoding = String.Encoding(ianaCharsetName: encodingName)
-        }
-
-        let actualEncoding = convertedEncoding ?? .isoLatin1
-
-        guard let string = String(data: data, encoding: actualEncoding) else {
-            throw AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding))
-        }
-
-        return string
-    }
-}
-
-#if swift(>=5.5)
-extension ResponseSerializer where Self == StringResponseSerializer {
-    /// Provides a default `StringResponseSerializer` instance.
-    public static var string: StringResponseSerializer { StringResponseSerializer() }
-
-    /// Creates a `StringResponseSerializer` with the provided values.
-    ///
-    /// - Parameters:
-    ///   - dataPreprocessor:    `DataPreprocessor` used to prepare the received `Data` for serialization.
-    ///   - encoding:            A string encoding. Defaults to `nil`, in which case the encoding will be determined
-    ///                          from the server response, falling back to the default HTTP character set, `ISO-8859-1`.
-    ///   - emptyResponseCodes:  The HTTP response codes for which empty responses are allowed. `[204, 205]` by default.
-    ///   - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default.
-    ///
-    /// - Returns:               The `StringResponseSerializer`.
-    public static func string(dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor,
-                              encoding: String.Encoding? = nil,
-                              emptyResponseCodes: Set<Int> = StringResponseSerializer.defaultEmptyResponseCodes,
-                              emptyRequestMethods: Set<HTTPMethod> = StringResponseSerializer.defaultEmptyRequestMethods) -> StringResponseSerializer {
-        StringResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                 encoding: encoding,
-                                 emptyResponseCodes: emptyResponseCodes,
-                                 emptyRequestMethods: emptyRequestMethods)
-    }
-}
-#endif
-
-extension DataRequest {
-    /// Adds a handler using a `StringResponseSerializer` to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:               The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - dataPreprocessor:    `DataPreprocessor` which processes the received `Data` before calling the
-    ///                          `completionHandler`. `PassthroughPreprocessor()` by default.
-    ///   - encoding:            The string encoding. Defaults to `nil`, in which case the encoding will be determined
-    ///                          from the server response, falling back to the default HTTP character set, `ISO-8859-1`.
-    ///   - emptyResponseCodes:  HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///   - completionHandler:   A closure to be executed once the request has finished.
-    ///
-    /// - Returns:               The request.
-    @discardableResult
-    public func responseString(queue: DispatchQueue = .main,
-                               dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor,
-                               encoding: String.Encoding? = nil,
-                               emptyResponseCodes: Set<Int> = StringResponseSerializer.defaultEmptyResponseCodes,
-                               emptyRequestMethods: Set<HTTPMethod> = StringResponseSerializer.defaultEmptyRequestMethods,
-                               completionHandler: @escaping (AFDataResponse<String>) -> Void) -> Self {
-        response(queue: queue,
-                 responseSerializer: StringResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                              encoding: encoding,
-                                                              emptyResponseCodes: emptyResponseCodes,
-                                                              emptyRequestMethods: emptyRequestMethods),
-                 completionHandler: completionHandler)
-    }
-}
-
-extension DownloadRequest {
-    /// Adds a handler using a `StringResponseSerializer` to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:               The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - dataPreprocessor:    `DataPreprocessor` which processes the received `Data` before calling the
-    ///                          `completionHandler`. `PassthroughPreprocessor()` by default.
-    ///   - encoding:            The string encoding. Defaults to `nil`, in which case the encoding will be determined
-    ///                          from the server response, falling back to the default HTTP character set, `ISO-8859-1`.
-    ///   - emptyResponseCodes:  HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///   - completionHandler:   A closure to be executed once the request has finished.
-    ///
-    /// - Returns:               The request.
-    @discardableResult
-    public func responseString(queue: DispatchQueue = .main,
-                               dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor,
-                               encoding: String.Encoding? = nil,
-                               emptyResponseCodes: Set<Int> = StringResponseSerializer.defaultEmptyResponseCodes,
-                               emptyRequestMethods: Set<HTTPMethod> = StringResponseSerializer.defaultEmptyRequestMethods,
-                               completionHandler: @escaping (AFDownloadResponse<String>) -> Void) -> Self {
-        response(queue: queue,
-                 responseSerializer: StringResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                              encoding: encoding,
-                                                              emptyResponseCodes: emptyResponseCodes,
-                                                              emptyRequestMethods: emptyRequestMethods),
-                 completionHandler: completionHandler)
-    }
-}
-
-// MARK: - JSON
-
-/// A `ResponseSerializer` that decodes the response data using `JSONSerialization`. By default, a request returning
-/// `nil` or no data is considered an error. However, if the request has an `HTTPMethod` or the response has an
-/// HTTP status code valid for empty responses, then an `NSNull` value is returned.
-@available(*, deprecated, message: "JSONResponseSerializer deprecated and will be removed in Alamofire 6. Use DecodableResponseSerializer instead.")
-public final class JSONResponseSerializer: ResponseSerializer {
-    public let dataPreprocessor: DataPreprocessor
-    public let emptyResponseCodes: Set<Int>
-    public let emptyRequestMethods: Set<HTTPMethod>
-    /// `JSONSerialization.ReadingOptions` used when serializing a response.
-    public let options: JSONSerialization.ReadingOptions
-
-    /// Creates an instance with the provided values.
-    ///
-    /// - Parameters:
-    ///   - dataPreprocessor:    `DataPreprocessor` used to prepare the received `Data` for serialization.
-    ///   - emptyResponseCodes:  The HTTP response codes for which empty responses are allowed. `[204, 205]` by default.
-    ///   - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default.
-    ///   - options:             The options to use. `.allowFragments` by default.
-    public init(dataPreprocessor: DataPreprocessor = JSONResponseSerializer.defaultDataPreprocessor,
-                emptyResponseCodes: Set<Int> = JSONResponseSerializer.defaultEmptyResponseCodes,
-                emptyRequestMethods: Set<HTTPMethod> = JSONResponseSerializer.defaultEmptyRequestMethods,
-                options: JSONSerialization.ReadingOptions = .allowFragments) {
-        self.dataPreprocessor = dataPreprocessor
-        self.emptyResponseCodes = emptyResponseCodes
-        self.emptyRequestMethods = emptyRequestMethods
-        self.options = options
-    }
-
-    public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> Any {
-        guard error == nil else { throw error! }
-
-        guard var data = data, !data.isEmpty else {
-            guard emptyResponseAllowed(forRequest: request, response: response) else {
-                throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)
-            }
-
-            return NSNull()
-        }
-
-        data = try dataPreprocessor.preprocess(data)
-
-        do {
-            return try JSONSerialization.jsonObject(with: data, options: options)
-        } catch {
-            throw AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error))
-        }
-    }
-}
-
-extension DataRequest {
-    /// Adds a handler using a `JSONResponseSerializer` to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:               The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - dataPreprocessor:    `DataPreprocessor` which processes the received `Data` before calling the
-    ///                          `completionHandler`. `PassthroughPreprocessor()` by default.
-    ///   - emptyResponseCodes:  HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///   - options:             `JSONSerialization.ReadingOptions` used when parsing the response. `.allowFragments`
-    ///                          by default.
-    ///   - completionHandler:   A closure to be executed once the request has finished.
-    ///
-    /// - Returns:               The request.
-    @available(*, deprecated, message: "responseJSON deprecated and will be removed in Alamofire 6. Use responseDecodable instead.")
-    @discardableResult
-    public func responseJSON(queue: DispatchQueue = .main,
-                             dataPreprocessor: DataPreprocessor = JSONResponseSerializer.defaultDataPreprocessor,
-                             emptyResponseCodes: Set<Int> = JSONResponseSerializer.defaultEmptyResponseCodes,
-                             emptyRequestMethods: Set<HTTPMethod> = JSONResponseSerializer.defaultEmptyRequestMethods,
-                             options: JSONSerialization.ReadingOptions = .allowFragments,
-                             completionHandler: @escaping (AFDataResponse<Any>) -> Void) -> Self {
-        response(queue: queue,
-                 responseSerializer: JSONResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                            emptyResponseCodes: emptyResponseCodes,
-                                                            emptyRequestMethods: emptyRequestMethods,
-                                                            options: options),
-                 completionHandler: completionHandler)
-    }
-}
-
-extension DownloadRequest {
-    /// Adds a handler using a `JSONResponseSerializer` to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - queue:               The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - dataPreprocessor:    `DataPreprocessor` which processes the received `Data` before calling the
-    ///                          `completionHandler`. `PassthroughPreprocessor()` by default.
-    ///   - emptyResponseCodes:  HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///   - options:             `JSONSerialization.ReadingOptions` used when parsing the response. `.allowFragments`
-    ///                          by default.
-    ///   - completionHandler:   A closure to be executed once the request has finished.
-    ///
-    /// - Returns:               The request.
-    @available(*, deprecated, message: "responseJSON deprecated and will be removed in Alamofire 6. Use responseDecodable instead.")
-    @discardableResult
-    public func responseJSON(queue: DispatchQueue = .main,
-                             dataPreprocessor: DataPreprocessor = JSONResponseSerializer.defaultDataPreprocessor,
-                             emptyResponseCodes: Set<Int> = JSONResponseSerializer.defaultEmptyResponseCodes,
-                             emptyRequestMethods: Set<HTTPMethod> = JSONResponseSerializer.defaultEmptyRequestMethods,
-                             options: JSONSerialization.ReadingOptions = .allowFragments,
-                             completionHandler: @escaping (AFDownloadResponse<Any>) -> Void) -> Self {
-        response(queue: queue,
-                 responseSerializer: JSONResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                            emptyResponseCodes: emptyResponseCodes,
-                                                            emptyRequestMethods: emptyRequestMethods,
-                                                            options: options),
-                 completionHandler: completionHandler)
-    }
-}
-
-// MARK: - Empty
-
-/// Protocol representing an empty response. Use `T.emptyValue()` to get an instance.
-public protocol EmptyResponse {
-    /// Empty value for the conforming type.
-    ///
-    /// - Returns: Value of `Self` to use for empty values.
-    static func emptyValue() -> Self
-}
-
-/// Type representing an empty value. Use `Empty.value` to get the static instance.
-public struct Empty: Codable {
-    /// Static `Empty` instance used for all `Empty` responses.
-    public static let value = Empty()
-}
-
-extension Empty: EmptyResponse {
-    public static func emptyValue() -> Empty {
-        value
-    }
-}
-
-// MARK: - DataDecoder Protocol
-
-/// Any type which can decode `Data` into a `Decodable` type.
-public protocol DataDecoder {
-    /// Decode `Data` into the provided type.
-    ///
-    /// - Parameters:
-    ///   - type:  The `Type` to be decoded.
-    ///   - data:  The `Data` to be decoded.
-    ///
-    /// - Returns: The decoded value of type `D`.
-    /// - Throws:  Any error that occurs during decode.
-    func decode<D: Decodable>(_ type: D.Type, from data: Data) throws -> D
-}
-
-/// `JSONDecoder` automatically conforms to `DataDecoder`.
-extension JSONDecoder: DataDecoder {}
-/// `PropertyListDecoder` automatically conforms to `DataDecoder`.
-extension PropertyListDecoder: DataDecoder {}
-
-// MARK: - Decodable
-
-/// A `ResponseSerializer` that decodes the response data as a generic value using any type that conforms to
-/// `DataDecoder`. By default, this is an instance of `JSONDecoder`. Additionally, a request returning `nil` or no data
-/// is considered an error. However, if the request has an `HTTPMethod` or the response has an HTTP status code valid
-/// for empty responses then an empty value will be returned. If the decoded type conforms to `EmptyResponse`, the
-/// type's `emptyValue()` will be returned. If the decoded type is `Empty`, the `.value` instance is returned. If the
-/// decoded type *does not* conform to `EmptyResponse` and isn't `Empty`, an error will be produced.
-public final class DecodableResponseSerializer<T: Decodable>: ResponseSerializer {
-    public let dataPreprocessor: DataPreprocessor
-    /// The `DataDecoder` instance used to decode responses.
-    public let decoder: DataDecoder
-    public let emptyResponseCodes: Set<Int>
-    public let emptyRequestMethods: Set<HTTPMethod>
-
-    /// Creates an instance using the values provided.
-    ///
-    /// - Parameters:
-    ///   - dataPreprocessor:    `DataPreprocessor` used to prepare the received `Data` for serialization.
-    ///   - decoder:             The `DataDecoder`. `JSONDecoder()` by default.
-    ///   - emptyResponseCodes:  The HTTP response codes for which empty responses are allowed. `[204, 205]` by default.
-    ///   - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default.
-    public init(dataPreprocessor: DataPreprocessor = DecodableResponseSerializer.defaultDataPreprocessor,
-                decoder: DataDecoder = JSONDecoder(),
-                emptyResponseCodes: Set<Int> = DecodableResponseSerializer.defaultEmptyResponseCodes,
-                emptyRequestMethods: Set<HTTPMethod> = DecodableResponseSerializer.defaultEmptyRequestMethods) {
-        self.dataPreprocessor = dataPreprocessor
-        self.decoder = decoder
-        self.emptyResponseCodes = emptyResponseCodes
-        self.emptyRequestMethods = emptyRequestMethods
-    }
-
-    public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> T {
-        guard error == nil else { throw error! }
-
-        guard var data = data, !data.isEmpty else {
-            guard emptyResponseAllowed(forRequest: request, response: response) else {
-                throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)
-            }
-
-            guard let emptyResponseType = T.self as? EmptyResponse.Type, let emptyValue = emptyResponseType.emptyValue() as? T else {
-                throw AFError.responseSerializationFailed(reason: .invalidEmptyResponse(type: "\(T.self)"))
-            }
-
-            return emptyValue
-        }
-
-        data = try dataPreprocessor.preprocess(data)
-
-        do {
-            return try decoder.decode(T.self, from: data)
-        } catch {
-            throw AFError.responseSerializationFailed(reason: .decodingFailed(error: error))
-        }
-    }
-}
-
-#if swift(>=5.5)
-extension ResponseSerializer {
-    /// Creates a `DecodableResponseSerializer` using the values provided.
-    ///
-    /// - Parameters:
-    ///   - type:                `Decodable` type to decode from response data.
-    ///   - dataPreprocessor:    `DataPreprocessor` used to prepare the received `Data` for serialization.
-    ///   - decoder:             The `DataDecoder`. `JSONDecoder()` by default.
-    ///   - emptyResponseCodes:  The HTTP response codes for which empty responses are allowed. `[204, 205]` by default.
-    ///   - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default.
-    ///
-    /// - Returns:               The `DecodableResponseSerializer`.
-    public static func decodable<T: Decodable>(of type: T.Type,
-                                               dataPreprocessor: DataPreprocessor = DecodableResponseSerializer<T>.defaultDataPreprocessor,
-                                               decoder: DataDecoder = JSONDecoder(),
-                                               emptyResponseCodes: Set<Int> = DecodableResponseSerializer<T>.defaultEmptyResponseCodes,
-                                               emptyRequestMethods: Set<HTTPMethod> = DecodableResponseSerializer<T>.defaultEmptyRequestMethods) -> DecodableResponseSerializer<T> where Self == DecodableResponseSerializer<T> {
-        DecodableResponseSerializer<T>(dataPreprocessor: dataPreprocessor,
-                                       decoder: decoder,
-                                       emptyResponseCodes: emptyResponseCodes,
-                                       emptyRequestMethods: emptyRequestMethods)
-    }
-}
-#endif
-
-extension DataRequest {
-    /// Adds a handler using a `DecodableResponseSerializer` to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - type:                `Decodable` type to decode from response data.
-    ///   - queue:               The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - dataPreprocessor:    `DataPreprocessor` which processes the received `Data` before calling the
-    ///                          `completionHandler`. `PassthroughPreprocessor()` by default.
-    ///   - decoder:             `DataDecoder` to use to decode the response. `JSONDecoder()` by default.
-    ///   - emptyResponseCodes:  HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///   - completionHandler:   A closure to be executed once the request has finished.
-    ///
-    /// - Returns:               The request.
-    @discardableResult
-    public func responseDecodable<T: Decodable>(of type: T.Type = T.self,
-                                                queue: DispatchQueue = .main,
-                                                dataPreprocessor: DataPreprocessor = DecodableResponseSerializer<T>.defaultDataPreprocessor,
-                                                decoder: DataDecoder = JSONDecoder(),
-                                                emptyResponseCodes: Set<Int> = DecodableResponseSerializer<T>.defaultEmptyResponseCodes,
-                                                emptyRequestMethods: Set<HTTPMethod> = DecodableResponseSerializer<T>.defaultEmptyRequestMethods,
-                                                completionHandler: @escaping (AFDataResponse<T>) -> Void) -> Self {
-        response(queue: queue,
-                 responseSerializer: DecodableResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                                 decoder: decoder,
-                                                                 emptyResponseCodes: emptyResponseCodes,
-                                                                 emptyRequestMethods: emptyRequestMethods),
-                 completionHandler: completionHandler)
-    }
-}
-
-extension DownloadRequest {
-    /// Adds a handler using a `DecodableResponseSerializer` to be called once the request has finished.
-    ///
-    /// - Parameters:
-    ///   - type:                `Decodable` type to decode from response data.
-    ///   - queue:               The queue on which the completion handler is dispatched. `.main` by default.
-    ///   - dataPreprocessor:    `DataPreprocessor` which processes the received `Data` before calling the
-    ///                          `completionHandler`. `PassthroughPreprocessor()` by default.
-    ///   - decoder:             `DataDecoder` to use to decode the response. `JSONDecoder()` by default.
-    ///   - emptyResponseCodes:  HTTP status codes for which empty responses are always valid. `[204, 205]` by default.
-    ///   - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default.
-    ///   - completionHandler:   A closure to be executed once the request has finished.
-    ///
-    /// - Returns:               The request.
-    @discardableResult
-    public func responseDecodable<T: Decodable>(of type: T.Type = T.self,
-                                                queue: DispatchQueue = .main,
-                                                dataPreprocessor: DataPreprocessor = DecodableResponseSerializer<T>.defaultDataPreprocessor,
-                                                decoder: DataDecoder = JSONDecoder(),
-                                                emptyResponseCodes: Set<Int> = DecodableResponseSerializer<T>.defaultEmptyResponseCodes,
-                                                emptyRequestMethods: Set<HTTPMethod> = DecodableResponseSerializer<T>.defaultEmptyRequestMethods,
-                                                completionHandler: @escaping (AFDownloadResponse<T>) -> Void) -> Self {
-        response(queue: queue,
-                 responseSerializer: DecodableResponseSerializer(dataPreprocessor: dataPreprocessor,
-                                                                 decoder: decoder,
-                                                                 emptyResponseCodes: emptyResponseCodes,
-                                                                 emptyRequestMethods: emptyRequestMethods),
-                 completionHandler: completionHandler)
-    }
-}
-
-// MARK: - DataStreamRequest
-
-/// A type which can serialize incoming `Data`.
-public protocol DataStreamSerializer {
-    /// Type produced from the serialized `Data`.
-    associatedtype SerializedObject
-
-    /// Serializes incoming `Data` into a `SerializedObject` value.
-    ///
-    /// - Parameter data: `Data` to be serialized.
-    ///
-    /// - Throws: Any error produced during serialization.
-    func serialize(_ data: Data) throws -> SerializedObject
-}
-
-/// `DataStreamSerializer` which uses the provided `DataPreprocessor` and `DataDecoder` to serialize the incoming `Data`.
-public struct DecodableStreamSerializer<T: Decodable>: DataStreamSerializer {
-    /// `DataDecoder` used to decode incoming `Data`.
-    public let decoder: DataDecoder
-    /// `DataPreprocessor` incoming `Data` is passed through before being passed to the `DataDecoder`.
-    public let dataPreprocessor: DataPreprocessor
-
-    /// Creates an instance with the provided `DataDecoder` and `DataPreprocessor`.
-    /// - Parameters:
-    ///   - decoder: `        DataDecoder` used to decode incoming `Data`. `JSONDecoder()` by default.
-    ///   - dataPreprocessor: `DataPreprocessor` used to process incoming `Data` before it's passed through the
-    ///                       `decoder`. `PassthroughPreprocessor()` by default.
-    public init(decoder: DataDecoder = JSONDecoder(), dataPreprocessor: DataPreprocessor = PassthroughPreprocessor()) {
-        self.decoder = decoder
-        self.dataPreprocessor = dataPreprocessor
-    }
-
-    public func serialize(_ data: Data) throws -> T {
-        let processedData = try dataPreprocessor.preprocess(data)
-        do {
-            return try decoder.decode(T.self, from: processedData)
-        } catch {
-            throw AFError.responseSerializationFailed(reason: .decodingFailed(error: error))
-        }
-    }
-}
-
-/// `DataStreamSerializer` which performs no serialization on incoming `Data`.
-public struct PassthroughStreamSerializer: DataStreamSerializer {
-    /// Creates an instance.
-    public init() {}
-
-    public func serialize(_ data: Data) throws -> Data { data }
-}
-
-/// `DataStreamSerializer` which serializes incoming stream `Data` into `UTF8`-decoded `String` values.
-public struct StringStreamSerializer: DataStreamSerializer {
-    /// Creates an instance.
-    public init() {}
-
-    public func serialize(_ data: Data) throws -> String {
-        String(decoding: data, as: UTF8.self)
-    }
-}
-
-#if swift(>=5.5)
-extension DataStreamSerializer {
-    /// Creates a `DecodableStreamSerializer` instance with the provided `DataDecoder` and `DataPreprocessor`.
-    ///
-    /// - Parameters:
-    ///   - type:             `Decodable` type to decode from stream data.
-    ///   - decoder: `        DataDecoder` used to decode incoming `Data`. `JSONDecoder()` by default.
-    ///   - dataPreprocessor: `DataPreprocessor` used to process incoming `Data` before it's passed through the
-    ///                       `decoder`. `PassthroughPreprocessor()` by default.
-    public static func decodable<T: Decodable>(of type: T.Type,
-                                               decoder: DataDecoder = JSONDecoder(),
-                                               dataPreprocessor: DataPreprocessor = PassthroughPreprocessor()) -> Self where Self == DecodableStreamSerializer<T> {
-        DecodableStreamSerializer<T>(decoder: decoder, dataPreprocessor: dataPreprocessor)
-    }
-}
-
-extension DataStreamSerializer where Self == PassthroughStreamSerializer {
-    /// Provides a `PassthroughStreamSerializer` instance.
-    public static var passthrough: PassthroughStreamSerializer { PassthroughStreamSerializer() }
-}
-
-extension DataStreamSerializer where Self == StringStreamSerializer {
-    /// Provides a `StringStreamSerializer` instance.
-    public static var string: StringStreamSerializer { StringStreamSerializer() }
-}
-#endif
-
-extension DataStreamRequest {
-    /// Adds a `StreamHandler` which performs no parsing on incoming `Data`.
-    ///
-    /// - Parameters:
-    ///   - queue:  `DispatchQueue` on which to perform `StreamHandler` closure.
-    ///   - stream: `StreamHandler` closure called as `Data` is received. May be called multiple times.
-    ///
-    /// - Returns:  The `DataStreamRequest`.
-    @discardableResult
-    public func responseStream(on queue: DispatchQueue = .main, stream: @escaping Handler<Data, Never>) -> Self {
-        let parser = { [unowned self] (data: Data) in
-            queue.async {
-                self.capturingError {
-                    try stream(.init(event: .stream(.success(data)), token: .init(self)))
-                }
-
-                self.updateAndCompleteIfPossible()
-            }
-        }
-
-        $streamMutableState.write { $0.streams.append(parser) }
-        appendStreamCompletion(on: queue, stream: stream)
-
-        return self
-    }
-
-    /// Adds a `StreamHandler` which uses the provided `DataStreamSerializer` to process incoming `Data`.
-    ///
-    /// - Parameters:
-    ///   - serializer: `DataStreamSerializer` used to process incoming `Data`. Its work is done on the `serializationQueue`.
-    ///   - queue:      `DispatchQueue` on which to perform `StreamHandler` closure.
-    ///   - stream:     `StreamHandler` closure called as `Data` is received. May be called multiple times.
-    ///
-    /// - Returns:      The `DataStreamRequest`.
-    @discardableResult
-    public func responseStream<Serializer: DataStreamSerializer>(using serializer: Serializer,
-                                                                 on queue: DispatchQueue = .main,
-                                                                 stream: @escaping Handler<Serializer.SerializedObject, AFError>) -> Self {
-        let parser = { [unowned self] (data: Data) in
-            self.serializationQueue.async {
-                // Start work on serialization queue.
-                let result = Result { try serializer.serialize(data) }
-                    .mapError { $0.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: $0))) }
-                // End work on serialization queue.
-                self.underlyingQueue.async {
-                    self.eventMonitor?.request(self, didParseStream: result)
-
-                    if result.isFailure, self.automaticallyCancelOnStreamError {
-                        self.cancel()
-                    }
-
-                    queue.async {
-                        self.capturingError {
-                            try stream(.init(event: .stream(result), token: .init(self)))
-                        }
-
-                        self.updateAndCompleteIfPossible()
-                    }
-                }
-            }
-        }
-
-        $streamMutableState.write { $0.streams.append(parser) }
-        appendStreamCompletion(on: queue, stream: stream)
-
-        return self
-    }
-
-    /// Adds a `StreamHandler` which parses incoming `Data` as a UTF8 `String`.
-    ///
-    /// - Parameters:
-    ///   - queue:      `DispatchQueue` on which to perform `StreamHandler` closure.
-    ///   - stream:     `StreamHandler` closure called as `Data` is received. May be called multiple times.
-    ///
-    /// - Returns:  The `DataStreamRequest`.
-    @discardableResult
-    public func responseStreamString(on queue: DispatchQueue = .main,
-                                     stream: @escaping Handler<String, Never>) -> Self {
-        let parser = { [unowned self] (data: Data) in
-            self.serializationQueue.async {
-                // Start work on serialization queue.
-                let string = String(decoding: data, as: UTF8.self)
-                // End work on serialization queue.
-                self.underlyingQueue.async {
-                    self.eventMonitor?.request(self, didParseStream: .success(string))
-
-                    queue.async {
-                        self.capturingError {
-                            try stream(.init(event: .stream(.success(string)), token: .init(self)))
-                        }
-
-                        self.updateAndCompleteIfPossible()
-                    }
-                }
-            }
-        }
-
-        $streamMutableState.write { $0.streams.append(parser) }
-        appendStreamCompletion(on: queue, stream: stream)
-
-        return self
-    }
-
-    private func updateAndCompleteIfPossible() {
-        $streamMutableState.write { state in
-            state.numberOfExecutingStreams -= 1
-
-            guard state.numberOfExecutingStreams == 0, !state.enqueuedCompletionEvents.isEmpty else { return }
-
-            let completionEvents = state.enqueuedCompletionEvents
-            self.underlyingQueue.async { completionEvents.forEach { $0() } }
-            state.enqueuedCompletionEvents.removeAll()
-        }
-    }
-
-    /// Adds a `StreamHandler` which parses incoming `Data` using the provided `DataDecoder`.
-    ///
-    /// - Parameters:
-    ///   - type:         `Decodable` type to parse incoming `Data` into.
-    ///   - queue:        `DispatchQueue` on which to perform `StreamHandler` closure.
-    ///   - decoder:      `DataDecoder` used to decode the incoming `Data`.
-    ///   - preprocessor: `DataPreprocessor` used to process the incoming `Data` before it's passed to the `decoder`.
-    ///   - stream:       `StreamHandler` closure called as `Data` is received. May be called multiple times.
-    ///
-    /// - Returns: The `DataStreamRequest`.
-    @discardableResult
-    public func responseStreamDecodable<T: Decodable>(of type: T.Type = T.self,
-                                                      on queue: DispatchQueue = .main,
-                                                      using decoder: DataDecoder = JSONDecoder(),
-                                                      preprocessor: DataPreprocessor = PassthroughPreprocessor(),
-                                                      stream: @escaping Handler<T, AFError>) -> Self {
-        responseStream(using: DecodableStreamSerializer<T>(decoder: decoder, dataPreprocessor: preprocessor),
-                       stream: stream)
-    }
-}

+ 0 - 120
Pods/Alamofire/Source/Result+Alamofire.swift

@@ -1,120 +0,0 @@
-//
-//  Result+Alamofire.swift
-//
-//  Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// Default type of `Result` returned by Alamofire, with an `AFError` `Failure` type.
-public typealias AFResult<Success> = Result<Success, AFError>
-
-// MARK: - Internal APIs
-
-extension Result {
-    /// Returns whether the instance is `.success`.
-    var isSuccess: Bool {
-        guard case .success = self else { return false }
-        return true
-    }
-
-    /// Returns whether the instance is `.failure`.
-    var isFailure: Bool {
-        !isSuccess
-    }
-
-    /// Returns the associated value if the result is a success, `nil` otherwise.
-    var success: Success? {
-        guard case let .success(value) = self else { return nil }
-        return value
-    }
-
-    /// Returns the associated error value if the result is a failure, `nil` otherwise.
-    var failure: Failure? {
-        guard case let .failure(error) = self else { return nil }
-        return error
-    }
-
-    /// Initializes a `Result` from value or error. Returns `.failure` if the error is non-nil, `.success` otherwise.
-    ///
-    /// - Parameters:
-    ///   - value: A value.
-    ///   - error: An `Error`.
-    init(value: Success, error: Failure?) {
-        if let error = error {
-            self = .failure(error)
-        } else {
-            self = .success(value)
-        }
-    }
-
-    /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter.
-    ///
-    /// Use the `tryMap` method with a closure that may throw an error. For example:
-    ///
-    ///     let possibleData: Result<Data, Error> = .success(Data(...))
-    ///     let possibleObject = possibleData.tryMap {
-    ///         try JSONSerialization.jsonObject(with: $0)
-    ///     }
-    ///
-    /// - parameter transform: A closure that takes the success value of the instance.
-    ///
-    /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the
-    ///            same failure.
-    func tryMap<NewSuccess>(_ transform: (Success) throws -> NewSuccess) -> Result<NewSuccess, Error> {
-        switch self {
-        case let .success(value):
-            do {
-                return try .success(transform(value))
-            } catch {
-                return .failure(error)
-            }
-        case let .failure(error):
-            return .failure(error)
-        }
-    }
-
-    /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter.
-    ///
-    /// Use the `tryMapError` function with a closure that may throw an error. For example:
-    ///
-    ///     let possibleData: Result<Data, Error> = .success(Data(...))
-    ///     let possibleObject = possibleData.tryMapError {
-    ///         try someFailableFunction(taking: $0)
-    ///     }
-    ///
-    /// - Parameter transform: A throwing closure that takes the error of the instance.
-    ///
-    /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns
-    ///            the same success.
-    func tryMapError<NewFailure: Error>(_ transform: (Failure) throws -> NewFailure) -> Result<Success, Error> {
-        switch self {
-        case let .failure(error):
-            do {
-                return try .failure(transform(error))
-            } catch {
-                return .failure(error)
-            }
-        case let .success(value):
-            return .success(value)
-        }
-    }
-}

+ 0 - 434
Pods/Alamofire/Source/RetryPolicy.swift

@@ -1,434 +0,0 @@
-//
-//  RetryPolicy.swift
-//
-//  Copyright (c) 2019-2020 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 retry policy that retries requests using an exponential backoff for allowed HTTP methods and HTTP status codes
-/// as well as certain types of networking errors.
-open class RetryPolicy: RequestInterceptor {
-    /// The default retry limit for retry policies.
-    public static let defaultRetryLimit: UInt = 2
-
-    /// The default exponential backoff base for retry policies (must be a minimum of 2).
-    public static let defaultExponentialBackoffBase: UInt = 2
-
-    /// The default exponential backoff scale for retry policies.
-    public static let defaultExponentialBackoffScale: Double = 0.5
-
-    /// The default HTTP methods to retry.
-    /// See [RFC 2616 - Section 9.1.2](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) for more information.
-    public static let defaultRetryableHTTPMethods: Set<HTTPMethod> = [.delete, // [Delete](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7) - not always idempotent
-                                                                      .get, // [GET](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3) - generally idempotent
-                                                                      .head, // [HEAD](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4) - generally idempotent
-                                                                      .options, // [OPTIONS](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.2) - inherently idempotent
-                                                                      .put, // [PUT](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6) - not always idempotent
-                                                                      .trace // [TRACE](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.8) - inherently idempotent
-    ]
-
-    /// The default HTTP status codes to retry.
-    /// See [RFC 2616 - Section 10](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10) for more information.
-    public static let defaultRetryableHTTPStatusCodes: Set<Int> = [408, // [Request Timeout](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.9)
-                                                                   500, // [Internal Server Error](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1)
-                                                                   502, // [Bad Gateway](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3)
-                                                                   503, // [Service Unavailable](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4)
-                                                                   504 // [Gateway Timeout](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.5)
-    ]
-
-    /// The default URL error codes to retry.
-    public static let defaultRetryableURLErrorCodes: Set<URLError.Code> = [// [Security] App Transport Security disallowed a connection because there is no secure network connection.
-        //   - [Disabled] ATS settings do not change at runtime.
-        // .appTransportSecurityRequiresSecureConnection,
-
-        // [System] An app or app extension attempted to connect to a background session that is already connected to a
-        // process.
-        //   - [Enabled] The other process could release the background session.
-        .backgroundSessionInUseByAnotherProcess,
-
-        // [System] The shared container identifier of the URL session configuration is needed but has not been set.
-        //   - [Disabled] Cannot change at runtime.
-        // .backgroundSessionRequiresSharedContainer,
-
-        // [System] The app is suspended or exits while a background data task is processing.
-        //   - [Enabled] App can be foregrounded or launched to recover.
-        .backgroundSessionWasDisconnected,
-
-        // [Network] The URL Loading system received bad data from the server.
-        //   - [Enabled] Server could return valid data when retrying.
-        .badServerResponse,
-
-        // [Resource] A malformed URL prevented a URL request from being initiated.
-        //   - [Disabled] URL was most likely constructed incorrectly.
-        // .badURL,
-
-        // [System] A connection was attempted while a phone call is active on a network that does not support
-        // simultaneous phone and data communication (EDGE or GPRS).
-        //   - [Enabled] Phone call could be ended to allow request to recover.
-        .callIsActive,
-
-        // [Client] An asynchronous load has been canceled.
-        //   - [Disabled] Request was cancelled by the client.
-        // .cancelled,
-
-        // [File System] A download task couldn’t close the downloaded file on disk.
-        //   - [Disabled] File system error is unlikely to recover with retry.
-        // .cannotCloseFile,
-
-        // [Network] An attempt to connect to a host failed.
-        //   - [Enabled] Server or DNS lookup could recover during retry.
-        .cannotConnectToHost,
-
-        // [File System] A download task couldn’t create the downloaded file on disk because of an I/O failure.
-        //   - [Disabled] File system error is unlikely to recover with retry.
-        // .cannotCreateFile,
-
-        // [Data] Content data received during a connection request had an unknown content encoding.
-        //   - [Disabled] Server is unlikely to modify the content encoding during a retry.
-        // .cannotDecodeContentData,
-
-        // [Data] Content data received during a connection request could not be decoded for a known content encoding.
-        //   - [Disabled] Server is unlikely to modify the content encoding during a retry.
-        // .cannotDecodeRawData,
-
-        // [Network] The host name for a URL could not be resolved.
-        //   - [Enabled] Server or DNS lookup could recover during retry.
-        .cannotFindHost,
-
-        // [Network] A request to load an item only from the cache could not be satisfied.
-        //   - [Enabled] Cache could be populated during a retry.
-        .cannotLoadFromNetwork,
-
-        // [File System] A download task was unable to move a downloaded file on disk.
-        //   - [Disabled] File system error is unlikely to recover with retry.
-        // .cannotMoveFile,
-
-        // [File System] A download task was unable to open the downloaded file on disk.
-        //   - [Disabled] File system error is unlikely to recover with retry.
-        // .cannotOpenFile,
-
-        // [Data] A task could not parse a response.
-        //   - [Disabled] Invalid response is unlikely to recover with retry.
-        // .cannotParseResponse,
-
-        // [File System] A download task was unable to remove a downloaded file from disk.
-        //   - [Disabled] File system error is unlikely to recover with retry.
-        // .cannotRemoveFile,
-
-        // [File System] A download task was unable to write to the downloaded file on disk.
-        //   - [Disabled] File system error is unlikely to recover with retry.
-        // .cannotWriteToFile,
-
-        // [Security] A client certificate was rejected.
-        //   - [Disabled] Client certificate is unlikely to change with retry.
-        // .clientCertificateRejected,
-
-        // [Security] A client certificate was required to authenticate an SSL connection during a request.
-        //   - [Disabled] Client certificate is unlikely to be provided with retry.
-        // .clientCertificateRequired,
-
-        // [Data] The length of the resource data exceeds the maximum allowed.
-        //   - [Disabled] Resource will likely still exceed the length maximum on retry.
-        // .dataLengthExceedsMaximum,
-
-        // [System] The cellular network disallowed a connection.
-        //   - [Enabled] WiFi connection could be established during retry.
-        .dataNotAllowed,
-
-        // [Network] The host address could not be found via DNS lookup.
-        //   - [Enabled] DNS lookup could succeed during retry.
-        .dnsLookupFailed,
-
-        // [Data] A download task failed to decode an encoded file during the download.
-        //   - [Enabled] Server could correct the decoding issue with retry.
-        .downloadDecodingFailedMidStream,
-
-        // [Data] A download task failed to decode an encoded file after downloading.
-        //   - [Enabled] Server could correct the decoding issue with retry.
-        .downloadDecodingFailedToComplete,
-
-        // [File System] A file does not exist.
-        //   - [Disabled] File system error is unlikely to recover with retry.
-        // .fileDoesNotExist,
-
-        // [File System] A request for an FTP file resulted in the server responding that the file is not a plain file,
-        // but a directory.
-        //   - [Disabled] FTP directory is not likely to change to a file during a retry.
-        // .fileIsDirectory,
-
-        // [Network] A redirect loop has been detected or the threshold for number of allowable redirects has been
-        // exceeded (currently 16).
-        //   - [Disabled] The redirect loop is unlikely to be resolved within the retry window.
-        // .httpTooManyRedirects,
-
-        // [System] The attempted connection required activating a data context while roaming, but international roaming
-        // is disabled.
-        //   - [Enabled] WiFi connection could be established during retry.
-        .internationalRoamingOff,
-
-        // [Connectivity] A client or server connection was severed in the middle of an in-progress load.
-        //   - [Enabled] A network connection could be established during retry.
-        .networkConnectionLost,
-
-        // [File System] A resource couldn’t be read because of insufficient permissions.
-        //   - [Disabled] Permissions are unlikely to be granted during retry.
-        // .noPermissionsToReadFile,
-
-        // [Connectivity] A network resource was requested, but an internet connection has not been established and
-        // cannot be established automatically.
-        //   - [Enabled] A network connection could be established during retry.
-        .notConnectedToInternet,
-
-        // [Resource] A redirect was specified by way of server response code, but the server did not accompany this
-        // code with a redirect URL.
-        //   - [Disabled] The redirect URL is unlikely to be supplied during a retry.
-        // .redirectToNonExistentLocation,
-
-        // [Client] A body stream is needed but the client did not provide one.
-        //   - [Disabled] The client will be unlikely to supply a body stream during retry.
-        // .requestBodyStreamExhausted,
-
-        // [Resource] A requested resource couldn’t be retrieved.
-        //   - [Disabled] The resource is unlikely to become available during the retry window.
-        // .resourceUnavailable,
-
-        // [Security] An attempt to establish a secure connection failed for reasons that can’t be expressed more
-        // specifically.
-        //   - [Enabled] The secure connection could be established during a retry given the lack of specificity
-        //     provided by the error.
-        .secureConnectionFailed,
-
-        // [Security] A server certificate had a date which indicates it has expired, or is not yet valid.
-        //   - [Enabled] The server certificate could become valid within the retry window.
-        .serverCertificateHasBadDate,
-
-        // [Security] A server certificate was not signed by any root server.
-        //   - [Disabled] The server certificate is unlikely to change during the retry window.
-        // .serverCertificateHasUnknownRoot,
-
-        // [Security] A server certificate is not yet valid.
-        //   - [Enabled] The server certificate could become valid within the retry window.
-        .serverCertificateNotYetValid,
-
-        // [Security] A server certificate was signed by a root server that isn’t trusted.
-        //   - [Disabled] The server certificate is unlikely to become trusted within the retry window.
-        // .serverCertificateUntrusted,
-
-        // [Network] An asynchronous operation timed out.
-        //   - [Enabled] The request timed out for an unknown reason and should be retried.
-        .timedOut
-
-        // [System] The URL Loading System encountered an error that it can’t interpret.
-        //   - [Disabled] The error could not be interpreted and is unlikely to be recovered from during a retry.
-        // .unknown,
-
-        // [Resource] A properly formed URL couldn’t be handled by the framework.
-        //   - [Disabled] The URL is unlikely to change during a retry.
-        // .unsupportedURL,
-
-        // [Client] Authentication is required to access a resource.
-        //   - [Disabled] The user authentication is unlikely to be provided by retrying.
-        // .userAuthenticationRequired,
-
-        // [Client] An asynchronous request for authentication has been canceled by the user.
-        //   - [Disabled] The user cancelled authentication and explicitly took action to not retry.
-        // .userCancelledAuthentication,
-
-        // [Resource] A server reported that a URL has a non-zero content length, but terminated the network connection
-        // gracefully without sending any data.
-        //   - [Disabled] The server is unlikely to provide data during the retry window.
-        // .zeroByteResource,
-    ]
-
-    /// The total number of times the request is allowed to be retried.
-    public let retryLimit: UInt
-
-    /// The base of the exponential backoff policy (should always be greater than or equal to 2).
-    public let exponentialBackoffBase: UInt
-
-    /// The scale of the exponential backoff.
-    public let exponentialBackoffScale: Double
-
-    /// The HTTP methods that are allowed to be retried.
-    public let retryableHTTPMethods: Set<HTTPMethod>
-
-    /// The HTTP status codes that are automatically retried by the policy.
-    public let retryableHTTPStatusCodes: Set<Int>
-
-    /// The URL error codes that are automatically retried by the policy.
-    public let retryableURLErrorCodes: Set<URLError.Code>
-
-    /// Creates a `RetryPolicy` from the specified parameters.
-    ///
-    /// - Parameters:
-    ///   - retryLimit:               The total number of times the request is allowed to be retried. `2` by default.
-    ///   - exponentialBackoffBase:   The base of the exponential backoff policy. `2` by default.
-    ///   - exponentialBackoffScale:  The scale of the exponential backoff. `0.5` by default.
-    ///   - retryableHTTPMethods:     The HTTP methods that are allowed to be retried.
-    ///                               `RetryPolicy.defaultRetryableHTTPMethods` by default.
-    ///   - retryableHTTPStatusCodes: The HTTP status codes that are automatically retried by the policy.
-    ///                               `RetryPolicy.defaultRetryableHTTPStatusCodes` by default.
-    ///   - retryableURLErrorCodes:   The URL error codes that are automatically retried by the policy.
-    ///                               `RetryPolicy.defaultRetryableURLErrorCodes` by default.
-    public init(retryLimit: UInt = RetryPolicy.defaultRetryLimit,
-                exponentialBackoffBase: UInt = RetryPolicy.defaultExponentialBackoffBase,
-                exponentialBackoffScale: Double = RetryPolicy.defaultExponentialBackoffScale,
-                retryableHTTPMethods: Set<HTTPMethod> = RetryPolicy.defaultRetryableHTTPMethods,
-                retryableHTTPStatusCodes: Set<Int> = RetryPolicy.defaultRetryableHTTPStatusCodes,
-                retryableURLErrorCodes: Set<URLError.Code> = RetryPolicy.defaultRetryableURLErrorCodes) {
-        precondition(exponentialBackoffBase >= 2, "The `exponentialBackoffBase` must be a minimum of 2.")
-
-        self.retryLimit = retryLimit
-        self.exponentialBackoffBase = exponentialBackoffBase
-        self.exponentialBackoffScale = exponentialBackoffScale
-        self.retryableHTTPMethods = retryableHTTPMethods
-        self.retryableHTTPStatusCodes = retryableHTTPStatusCodes
-        self.retryableURLErrorCodes = retryableURLErrorCodes
-    }
-
-    open func retry(_ request: Request,
-                    for session: Session,
-                    dueTo error: Error,
-                    completion: @escaping (RetryResult) -> Void) {
-        if request.retryCount < retryLimit, shouldRetry(request: request, dueTo: error) {
-            completion(.retryWithDelay(pow(Double(exponentialBackoffBase), Double(request.retryCount)) * exponentialBackoffScale))
-        } else {
-            completion(.doNotRetry)
-        }
-    }
-
-    /// Determines whether or not to retry the provided `Request`.
-    ///
-    /// - Parameters:
-    ///     - request: `Request` that failed due to the provided `Error`.
-    ///     - error:   `Error` encountered while executing the `Request`.
-    ///
-    /// - Returns:     `Bool` determining whether or not to retry the `Request`.
-    open func shouldRetry(request: Request, dueTo error: Error) -> Bool {
-        guard let httpMethod = request.request?.method, retryableHTTPMethods.contains(httpMethod) else { return false }
-
-        if let statusCode = request.response?.statusCode, retryableHTTPStatusCodes.contains(statusCode) {
-            return true
-        } else {
-            let errorCode = (error as? URLError)?.code
-            let afErrorCode = (error.asAFError?.underlyingError as? URLError)?.code
-
-            guard let code = errorCode ?? afErrorCode else { return false }
-
-            return retryableURLErrorCodes.contains(code)
-        }
-    }
-}
-
-#if swift(>=5.5)
-extension RequestInterceptor where Self == RetryPolicy {
-    /// Provides a default `RetryPolicy` instance.
-    public static var retryPolicy: RetryPolicy { RetryPolicy() }
-
-    /// Creates an `RetryPolicy` from the specified parameters.
-    ///
-    /// - Parameters:
-    ///   - retryLimit:               The total number of times the request is allowed to be retried. `2` by default.
-    ///   - exponentialBackoffBase:   The base of the exponential backoff policy. `2` by default.
-    ///   - exponentialBackoffScale:  The scale of the exponential backoff. `0.5` by default.
-    ///   - retryableHTTPMethods:     The HTTP methods that are allowed to be retried.
-    ///                               `RetryPolicy.defaultRetryableHTTPMethods` by default.
-    ///   - retryableHTTPStatusCodes: The HTTP status codes that are automatically retried by the policy.
-    ///                               `RetryPolicy.defaultRetryableHTTPStatusCodes` by default.
-    ///   - retryableURLErrorCodes:   The URL error codes that are automatically retried by the policy.
-    ///                               `RetryPolicy.defaultRetryableURLErrorCodes` by default.
-    ///
-    /// - Returns:                    The `RetryPolicy`
-    public static func retryPolicy(retryLimit: UInt = RetryPolicy.defaultRetryLimit,
-                                   exponentialBackoffBase: UInt = RetryPolicy.defaultExponentialBackoffBase,
-                                   exponentialBackoffScale: Double = RetryPolicy.defaultExponentialBackoffScale,
-                                   retryableHTTPMethods: Set<HTTPMethod> = RetryPolicy.defaultRetryableHTTPMethods,
-                                   retryableHTTPStatusCodes: Set<Int> = RetryPolicy.defaultRetryableHTTPStatusCodes,
-                                   retryableURLErrorCodes: Set<URLError.Code> = RetryPolicy.defaultRetryableURLErrorCodes) -> RetryPolicy {
-        RetryPolicy(retryLimit: retryLimit,
-                    exponentialBackoffBase: exponentialBackoffBase,
-                    exponentialBackoffScale: exponentialBackoffScale,
-                    retryableHTTPMethods: retryableHTTPMethods,
-                    retryableHTTPStatusCodes: retryableHTTPStatusCodes,
-                    retryableURLErrorCodes: retryableURLErrorCodes)
-    }
-}
-#endif
-
-// MARK: -
-
-/// A retry policy that automatically retries idempotent requests for network connection lost errors. For more
-/// information about retrying network connection lost errors, please refer to Apple's
-/// [technical document](https://developer.apple.com/library/content/qa/qa1941/_index.html).
-open class ConnectionLostRetryPolicy: RetryPolicy {
-    /// Creates a `ConnectionLostRetryPolicy` instance from the specified parameters.
-    ///
-    /// - Parameters:
-    ///   - retryLimit:              The total number of times the request is allowed to be retried.
-    ///                              `RetryPolicy.defaultRetryLimit` by default.
-    ///   - exponentialBackoffBase:  The base of the exponential backoff policy.
-    ///                              `RetryPolicy.defaultExponentialBackoffBase` by default.
-    ///   - exponentialBackoffScale: The scale of the exponential backoff.
-    ///                              `RetryPolicy.defaultExponentialBackoffScale` by default.
-    ///   - retryableHTTPMethods:    The idempotent http methods to retry.
-    ///                              `RetryPolicy.defaultRetryableHTTPMethods` by default.
-    public init(retryLimit: UInt = RetryPolicy.defaultRetryLimit,
-                exponentialBackoffBase: UInt = RetryPolicy.defaultExponentialBackoffBase,
-                exponentialBackoffScale: Double = RetryPolicy.defaultExponentialBackoffScale,
-                retryableHTTPMethods: Set<HTTPMethod> = RetryPolicy.defaultRetryableHTTPMethods) {
-        super.init(retryLimit: retryLimit,
-                   exponentialBackoffBase: exponentialBackoffBase,
-                   exponentialBackoffScale: exponentialBackoffScale,
-                   retryableHTTPMethods: retryableHTTPMethods,
-                   retryableHTTPStatusCodes: [],
-                   retryableURLErrorCodes: [.networkConnectionLost])
-    }
-}
-
-#if swift(>=5.5)
-extension RequestInterceptor where Self == ConnectionLostRetryPolicy {
-    /// Provides a default `ConnectionLostRetryPolicy` instance.
-    public static var connectionLostRetryPolicy: ConnectionLostRetryPolicy { ConnectionLostRetryPolicy() }
-
-    /// Creates a `ConnectionLostRetryPolicy` instance from the specified parameters.
-    ///
-    /// - Parameters:
-    ///   - retryLimit:              The total number of times the request is allowed to be retried.
-    ///                              `RetryPolicy.defaultRetryLimit` by default.
-    ///   - exponentialBackoffBase:  The base of the exponential backoff policy.
-    ///                              `RetryPolicy.defaultExponentialBackoffBase` by default.
-    ///   - exponentialBackoffScale: The scale of the exponential backoff.
-    ///                              `RetryPolicy.defaultExponentialBackoffScale` by default.
-    ///   - retryableHTTPMethods:    The idempotent http methods to retry.
-    ///
-    /// - Returns:                   The `ConnectionLostRetryPolicy`.
-    public static func connectionLostRetryPolicy(retryLimit: UInt = RetryPolicy.defaultRetryLimit,
-                                                 exponentialBackoffBase: UInt = RetryPolicy.defaultExponentialBackoffBase,
-                                                 exponentialBackoffScale: Double = RetryPolicy.defaultExponentialBackoffScale,
-                                                 retryableHTTPMethods: Set<HTTPMethod> = RetryPolicy.defaultRetryableHTTPMethods) -> ConnectionLostRetryPolicy {
-        ConnectionLostRetryPolicy(retryLimit: retryLimit,
-                                  exponentialBackoffBase: exponentialBackoffBase,
-                                  exponentialBackoffScale: exponentialBackoffScale,
-                                  retryableHTTPMethods: retryableHTTPMethods)
-    }
-}
-#endif

+ 0 - 743
Pods/Alamofire/Source/ServerTrustEvaluation.swift

@@ -1,743 +0,0 @@
-//
-//  ServerTrustPolicy.swift
-//
-//  Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// Responsible for managing the mapping of `ServerTrustEvaluating` values to given hosts.
-open class ServerTrustManager {
-    /// Determines whether all hosts for this `ServerTrustManager` must be evaluated. `true` by default.
-    public let allHostsMustBeEvaluated: Bool
-
-    /// The dictionary of policies mapped to a particular host.
-    public let evaluators: [String: ServerTrustEvaluating]
-
-    /// Initializes the `ServerTrustManager` instance with the given evaluators.
-    ///
-    /// Since different servers and web services can have different leaf certificates, intermediate and even root
-    /// certificates, it is important to have the flexibility to specify evaluation policies on a per host basis. This
-    /// allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key
-    /// pinning for host3 and disabling evaluation for host4.
-    ///
-    /// - Parameters:
-    ///   - allHostsMustBeEvaluated: The value determining whether all hosts for this instance must be evaluated. `true`
-    ///                              by default.
-    ///   - evaluators:              A dictionary of evaluators mapped to hosts.
-    public init(allHostsMustBeEvaluated: Bool = true, evaluators: [String: ServerTrustEvaluating]) {
-        self.allHostsMustBeEvaluated = allHostsMustBeEvaluated
-        self.evaluators = evaluators
-    }
-
-    #if !(os(Linux) || os(Windows))
-    /// Returns the `ServerTrustEvaluating` value for the given host, if one is set.
-    ///
-    /// By default, this method will return the policy that perfectly matches the given host. Subclasses could override
-    /// this method and implement more complex mapping implementations such as wildcards.
-    ///
-    /// - Parameter host: The host to use when searching for a matching policy.
-    ///
-    /// - Returns:        The `ServerTrustEvaluating` value for the given host if found, `nil` otherwise.
-    /// - Throws:         `AFError.serverTrustEvaluationFailed` if `allHostsMustBeEvaluated` is `true` and no matching
-    ///                   evaluators are found.
-    open func serverTrustEvaluator(forHost host: String) throws -> ServerTrustEvaluating? {
-        guard let evaluator = evaluators[host] else {
-            if allHostsMustBeEvaluated {
-                throw AFError.serverTrustEvaluationFailed(reason: .noRequiredEvaluator(host: host))
-            }
-
-            return nil
-        }
-
-        return evaluator
-    }
-    #endif
-}
-
-/// A protocol describing the API used to evaluate server trusts.
-public protocol ServerTrustEvaluating {
-    #if os(Linux) || os(Windows)
-    // Implement this once Linux/Windows has API for evaluating server trusts.
-    #else
-    /// Evaluates the given `SecTrust` value for the given `host`.
-    ///
-    /// - Parameters:
-    ///   - trust: The `SecTrust` value to evaluate.
-    ///   - host:  The host for which to evaluate the `SecTrust` value.
-    ///
-    /// - Returns: A `Bool` indicating whether the evaluator considers the `SecTrust` value valid for `host`.
-    func evaluate(_ trust: SecTrust, forHost host: String) throws
-    #endif
-}
-
-// MARK: - Server Trust Evaluators
-
-#if !(os(Linux) || os(Windows))
-/// An evaluator which uses the default server trust evaluation while allowing you to control whether to validate the
-/// host provided by the challenge. Applications are encouraged to always validate the host in production environments
-/// to guarantee the validity of the server's certificate chain.
-public final class DefaultTrustEvaluator: ServerTrustEvaluating {
-    private let validateHost: Bool
-
-    /// Creates a `DefaultTrustEvaluator`.
-    ///
-    /// - Parameter validateHost: Determines whether or not the evaluator should validate the host. `true` by default.
-    public init(validateHost: Bool = true) {
-        self.validateHost = validateHost
-    }
-
-    public func evaluate(_ trust: SecTrust, forHost host: String) throws {
-        if validateHost {
-            try trust.af.performValidation(forHost: host)
-        }
-
-        try trust.af.performDefaultValidation(forHost: host)
-    }
-}
-
-/// An evaluator which Uses the default and revoked server trust evaluations allowing you to control whether to validate
-/// the host provided by the challenge as well as specify the revocation flags for testing for revoked certificates.
-/// Apple platforms did not start testing for revoked certificates automatically until iOS 10.1, macOS 10.12 and tvOS
-/// 10.1 which is demonstrated in our TLS tests. Applications are encouraged to always validate the host in production
-/// environments to guarantee the validity of the server's certificate chain.
-public final class RevocationTrustEvaluator: ServerTrustEvaluating {
-    /// Represents the options to be use when evaluating the status of a certificate.
-    /// Only Revocation Policy Constants are valid, and can be found in [Apple's documentation](https://developer.apple.com/documentation/security/certificate_key_and_trust_services/policies/1563600-revocation_policy_constants).
-    public struct Options: OptionSet {
-        /// Perform revocation checking using the CRL (Certification Revocation List) method.
-        public static let crl = Options(rawValue: kSecRevocationCRLMethod)
-        /// Consult only locally cached replies; do not use network access.
-        public static let networkAccessDisabled = Options(rawValue: kSecRevocationNetworkAccessDisabled)
-        /// Perform revocation checking using OCSP (Online Certificate Status Protocol).
-        public static let ocsp = Options(rawValue: kSecRevocationOCSPMethod)
-        /// Prefer CRL revocation checking over OCSP; by default, OCSP is preferred.
-        public static let preferCRL = Options(rawValue: kSecRevocationPreferCRL)
-        /// Require a positive response to pass the policy. If the flag is not set, revocation checking is done on a
-        /// "best attempt" basis, where failure to reach the server is not considered fatal.
-        public static let requirePositiveResponse = Options(rawValue: kSecRevocationRequirePositiveResponse)
-        /// Perform either OCSP or CRL checking. The checking is performed according to the method(s) specified in the
-        /// certificate and the value of `preferCRL`.
-        public static let any = Options(rawValue: kSecRevocationUseAnyAvailableMethod)
-
-        /// The raw value of the option.
-        public let rawValue: CFOptionFlags
-
-        /// Creates an `Options` value with the given `CFOptionFlags`.
-        ///
-        /// - Parameter rawValue: The `CFOptionFlags` value to initialize with.
-        public init(rawValue: CFOptionFlags) {
-            self.rawValue = rawValue
-        }
-    }
-
-    private let performDefaultValidation: Bool
-    private let validateHost: Bool
-    private let options: Options
-
-    /// Creates a `RevocationTrustEvaluator` using the provided parameters.
-    ///
-    /// - Note: Default and host validation will fail when using this evaluator with self-signed certificates. Use
-    ///         `PinnedCertificatesTrustEvaluator` if you need to use self-signed certificates.
-    ///
-    /// - Parameters:
-    ///   - performDefaultValidation: Determines whether default validation should be performed in addition to
-    ///                               evaluating the pinned certificates. `true` by default.
-    ///   - validateHost:             Determines whether or not the evaluator should validate the host, in addition to
-    ///                               performing the default evaluation, even if `performDefaultValidation` is `false`.
-    ///                               `true` by default.
-    ///   - options:                  The `Options` to use to check the revocation status of the certificate. `.any` by
-    ///                               default.
-    public init(performDefaultValidation: Bool = true, validateHost: Bool = true, options: Options = .any) {
-        self.performDefaultValidation = performDefaultValidation
-        self.validateHost = validateHost
-        self.options = options
-    }
-
-    public func evaluate(_ trust: SecTrust, forHost host: String) throws {
-        if performDefaultValidation {
-            try trust.af.performDefaultValidation(forHost: host)
-        }
-
-        if validateHost {
-            try trust.af.performValidation(forHost: host)
-        }
-
-        if #available(iOS 12, macOS 10.14, tvOS 12, watchOS 5, *) {
-            try trust.af.evaluate(afterApplying: SecPolicy.af.revocation(options: options))
-        } else {
-            try trust.af.validate(policy: SecPolicy.af.revocation(options: options)) { status, result in
-                AFError.serverTrustEvaluationFailed(reason: .revocationCheckFailed(output: .init(host, trust, status, result), options: options))
-            }
-        }
-    }
-}
-
-#if swift(>=5.5)
-extension ServerTrustEvaluating where Self == RevocationTrustEvaluator {
-    /// Provides a default `RevocationTrustEvaluator` instance.
-    public static var revocationChecking: RevocationTrustEvaluator { RevocationTrustEvaluator() }
-
-    /// Creates a `RevocationTrustEvaluator` using the provided parameters.
-    ///
-    /// - Note: Default and host validation will fail when using this evaluator with self-signed certificates. Use
-    ///         `PinnedCertificatesTrustEvaluator` if you need to use self-signed certificates.
-    ///
-    /// - Parameters:
-    ///   - performDefaultValidation: Determines whether default validation should be performed in addition to
-    ///                               evaluating the pinned certificates. `true` by default.
-    ///   - validateHost:             Determines whether or not the evaluator should validate the host, in addition
-    ///                               to performing the default evaluation, even if `performDefaultValidation` is
-    ///                               `false`. `true` by default.
-    ///   - options:                  The `Options` to use to check the revocation status of the certificate. `.any`
-    ///                               by default.
-    /// - Returns:                    The `RevocationTrustEvaluator`.
-    public static func revocationChecking(performDefaultValidation: Bool = true,
-                                          validateHost: Bool = true,
-                                          options: RevocationTrustEvaluator.Options = .any) -> RevocationTrustEvaluator {
-        RevocationTrustEvaluator(performDefaultValidation: performDefaultValidation,
-                                 validateHost: validateHost,
-                                 options: options)
-    }
-}
-#endif
-
-/// Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned
-/// certificates match one of the server certificates. By validating both the certificate chain and host, certificate
-/// pinning provides a very secure form of server trust validation mitigating most, if not all, MITM attacks.
-/// Applications are encouraged to always validate the host and require a valid certificate chain in production
-/// environments.
-public final class PinnedCertificatesTrustEvaluator: ServerTrustEvaluating {
-    private let certificates: [SecCertificate]
-    private let acceptSelfSignedCertificates: Bool
-    private let performDefaultValidation: Bool
-    private let validateHost: Bool
-
-    /// Creates a `PinnedCertificatesTrustEvaluator` from the provided parameters.
-    ///
-    /// - Parameters:
-    ///   - certificates:                 The certificates to use to evaluate the trust. All `cer`, `crt`, and `der`
-    ///                                   certificates in `Bundle.main` by default.
-    ///   - acceptSelfSignedCertificates: Adds the provided certificates as anchors for the trust evaluation, allowing
-    ///                                   self-signed certificates to pass. `false` by default. THIS SETTING SHOULD BE
-    ///                                   FALSE IN PRODUCTION!
-    ///   - performDefaultValidation:     Determines whether default validation should be performed in addition to
-    ///                                   evaluating the pinned certificates. `true` by default.
-    ///   - validateHost:                 Determines whether or not the evaluator should validate the host, in addition
-    ///                                   to performing the default evaluation, even if `performDefaultValidation` is
-    ///                                   `false`. `true` by default.
-    public init(certificates: [SecCertificate] = Bundle.main.af.certificates,
-                acceptSelfSignedCertificates: Bool = false,
-                performDefaultValidation: Bool = true,
-                validateHost: Bool = true) {
-        self.certificates = certificates
-        self.acceptSelfSignedCertificates = acceptSelfSignedCertificates
-        self.performDefaultValidation = performDefaultValidation
-        self.validateHost = validateHost
-    }
-
-    public func evaluate(_ trust: SecTrust, forHost host: String) throws {
-        guard !certificates.isEmpty else {
-            throw AFError.serverTrustEvaluationFailed(reason: .noCertificatesFound)
-        }
-
-        if acceptSelfSignedCertificates {
-            try trust.af.setAnchorCertificates(certificates)
-        }
-
-        if performDefaultValidation {
-            try trust.af.performDefaultValidation(forHost: host)
-        }
-
-        if validateHost {
-            try trust.af.performValidation(forHost: host)
-        }
-
-        let serverCertificatesData = Set(trust.af.certificateData)
-        let pinnedCertificatesData = Set(certificates.af.data)
-        let pinnedCertificatesInServerData = !serverCertificatesData.isDisjoint(with: pinnedCertificatesData)
-        if !pinnedCertificatesInServerData {
-            throw AFError.serverTrustEvaluationFailed(reason: .certificatePinningFailed(host: host,
-                                                                                        trust: trust,
-                                                                                        pinnedCertificates: certificates,
-                                                                                        serverCertificates: trust.af.certificates))
-        }
-    }
-}
-
-#if swift(>=5.5)
-extension ServerTrustEvaluating where Self == PinnedCertificatesTrustEvaluator {
-    /// Provides a default `PinnedCertificatesTrustEvaluator` instance.
-    public static var pinnedCertificates: PinnedCertificatesTrustEvaluator { PinnedCertificatesTrustEvaluator() }
-
-    /// Creates a `PinnedCertificatesTrustEvaluator` using the provided parameters.
-    ///
-    /// - Parameters:
-    ///   - certificates:                 The certificates to use to evaluate the trust. All `cer`, `crt`, and `der`
-    ///                                   certificates in `Bundle.main` by default.
-    ///   - acceptSelfSignedCertificates: Adds the provided certificates as anchors for the trust evaluation, allowing
-    ///                                   self-signed certificates to pass. `false` by default. THIS SETTING SHOULD BE
-    ///                                   FALSE IN PRODUCTION!
-    ///   - performDefaultValidation:     Determines whether default validation should be performed in addition to
-    ///                                   evaluating the pinned certificates. `true` by default.
-    ///   - validateHost:                 Determines whether or not the evaluator should validate the host, in addition
-    ///                                   to performing the default evaluation, even if `performDefaultValidation` is
-    ///                                   `false`. `true` by default.
-    public static func pinnedCertificates(certificates: [SecCertificate] = Bundle.main.af.certificates,
-                                          acceptSelfSignedCertificates: Bool = false,
-                                          performDefaultValidation: Bool = true,
-                                          validateHost: Bool = true) -> PinnedCertificatesTrustEvaluator {
-        PinnedCertificatesTrustEvaluator(certificates: certificates,
-                                         acceptSelfSignedCertificates: acceptSelfSignedCertificates,
-                                         performDefaultValidation: performDefaultValidation,
-                                         validateHost: validateHost)
-    }
-}
-#endif
-
-/// Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned
-/// public keys match one of the server certificate public keys. By validating both the certificate chain and host,
-/// public key pinning provides a very secure form of server trust validation mitigating most, if not all, MITM attacks.
-/// Applications are encouraged to always validate the host and require a valid certificate chain in production
-/// environments.
-public final class PublicKeysTrustEvaluator: ServerTrustEvaluating {
-    private let keys: [SecKey]
-    private let performDefaultValidation: Bool
-    private let validateHost: Bool
-
-    /// Creates a `PublicKeysTrustEvaluator` from the provided parameters.
-    ///
-    /// - Note: Default and host validation will fail when using this evaluator with self-signed certificates. Use
-    ///         `PinnedCertificatesTrustEvaluator` if you need to use self-signed certificates.
-    ///
-    /// - Parameters:
-    ///   - keys:                     The `SecKey`s to use to validate public keys. Defaults to the public keys of all
-    ///                               certificates included in the main bundle.
-    ///   - performDefaultValidation: Determines whether default validation should be performed in addition to
-    ///                               evaluating the pinned certificates. `true` by default.
-    ///   - validateHost:             Determines whether or not the evaluator should validate the host, in addition to
-    ///                               performing the default evaluation, even if `performDefaultValidation` is `false`.
-    ///                               `true` by default.
-    public init(keys: [SecKey] = Bundle.main.af.publicKeys,
-                performDefaultValidation: Bool = true,
-                validateHost: Bool = true) {
-        self.keys = keys
-        self.performDefaultValidation = performDefaultValidation
-        self.validateHost = validateHost
-    }
-
-    public func evaluate(_ trust: SecTrust, forHost host: String) throws {
-        guard !keys.isEmpty else {
-            throw AFError.serverTrustEvaluationFailed(reason: .noPublicKeysFound)
-        }
-
-        if performDefaultValidation {
-            try trust.af.performDefaultValidation(forHost: host)
-        }
-
-        if validateHost {
-            try trust.af.performValidation(forHost: host)
-        }
-
-        let pinnedKeysInServerKeys: Bool = {
-            for serverPublicKey in trust.af.publicKeys {
-                for pinnedPublicKey in keys {
-                    if serverPublicKey == pinnedPublicKey {
-                        return true
-                    }
-                }
-            }
-            return false
-        }()
-
-        if !pinnedKeysInServerKeys {
-            throw AFError.serverTrustEvaluationFailed(reason: .publicKeyPinningFailed(host: host,
-                                                                                      trust: trust,
-                                                                                      pinnedKeys: keys,
-                                                                                      serverKeys: trust.af.publicKeys))
-        }
-    }
-}
-
-#if swift(>=5.5)
-extension ServerTrustEvaluating where Self == PublicKeysTrustEvaluator {
-    /// Provides a default `PublicKeysTrustEvaluator` instance.
-    public static var publicKeys: PublicKeysTrustEvaluator { PublicKeysTrustEvaluator() }
-
-    /// Creates a `PublicKeysTrustEvaluator` from the provided parameters.
-    ///
-    /// - Note: Default and host validation will fail when using this evaluator with self-signed certificates. Use
-    ///         `PinnedCertificatesTrustEvaluator` if you need to use self-signed certificates.
-    ///
-    /// - Parameters:
-    ///   - keys:                     The `SecKey`s to use to validate public keys. Defaults to the public keys of all
-    ///                               certificates included in the main bundle.
-    ///   - performDefaultValidation: Determines whether default validation should be performed in addition to
-    ///                               evaluating the pinned certificates. `true` by default.
-    ///   - validateHost:             Determines whether or not the evaluator should validate the host, in addition to
-    ///                               performing the default evaluation, even if `performDefaultValidation` is `false`.
-    ///                               `true` by default.
-    public static func publicKeys(keys: [SecKey] = Bundle.main.af.publicKeys,
-                                  performDefaultValidation: Bool = true,
-                                  validateHost: Bool = true) -> PublicKeysTrustEvaluator {
-        PublicKeysTrustEvaluator(keys: keys, performDefaultValidation: performDefaultValidation, validateHost: validateHost)
-    }
-}
-#endif
-
-/// Uses the provided evaluators to validate the server trust. The trust is only considered valid if all of the
-/// evaluators consider it valid.
-public final class CompositeTrustEvaluator: ServerTrustEvaluating {
-    private let evaluators: [ServerTrustEvaluating]
-
-    /// Creates a `CompositeTrustEvaluator` from the provided evaluators.
-    ///
-    /// - Parameter evaluators: The `ServerTrustEvaluating` values used to evaluate the server trust.
-    public init(evaluators: [ServerTrustEvaluating]) {
-        self.evaluators = evaluators
-    }
-
-    public func evaluate(_ trust: SecTrust, forHost host: String) throws {
-        try evaluators.evaluate(trust, forHost: host)
-    }
-}
-
-#if swift(>=5.5)
-extension ServerTrustEvaluating where Self == CompositeTrustEvaluator {
-    /// Creates a `CompositeTrustEvaluator` from the provided evaluators.
-    ///
-    /// - Parameter evaluators: The `ServerTrustEvaluating` values used to evaluate the server trust.
-    public static func composite(evaluators: [ServerTrustEvaluating]) -> CompositeTrustEvaluator {
-        CompositeTrustEvaluator(evaluators: evaluators)
-    }
-}
-#endif
-
-/// Disables all evaluation which in turn will always consider any server trust as valid.
-///
-/// - Note: Instead of disabling server trust evaluation, it's a better idea to configure systems to properly trust test
-///         certificates, as outlined in [this Apple tech note](https://developer.apple.com/library/archive/qa/qa1948/_index.html).
-///
-/// **THIS EVALUATOR SHOULD NEVER BE USED IN PRODUCTION!**
-@available(*, deprecated, renamed: "DisabledTrustEvaluator", message: "DisabledEvaluator has been renamed DisabledTrustEvaluator.")
-public typealias DisabledEvaluator = DisabledTrustEvaluator
-
-/// Disables all evaluation which in turn will always consider any server trust as valid.
-///
-///
-/// - Note: Instead of disabling server trust evaluation, it's a better idea to configure systems to properly trust test
-///         certificates, as outlined in [this Apple tech note](https://developer.apple.com/library/archive/qa/qa1948/_index.html).
-///
-/// **THIS EVALUATOR SHOULD NEVER BE USED IN PRODUCTION!**
-public final class DisabledTrustEvaluator: ServerTrustEvaluating {
-    /// Creates an instance.
-    public init() {}
-
-    public func evaluate(_ trust: SecTrust, forHost host: String) throws {}
-}
-
-// MARK: - Extensions
-
-extension Array where Element == ServerTrustEvaluating {
-    #if os(Linux) || os(Windows)
-    // Add this same convenience method for Linux/Windows.
-    #else
-    /// Evaluates the given `SecTrust` value for the given `host`.
-    ///
-    /// - Parameters:
-    ///   - trust: The `SecTrust` value to evaluate.
-    ///   - host:  The host for which to evaluate the `SecTrust` value.
-    ///
-    /// - Returns: Whether or not the evaluator considers the `SecTrust` value valid for `host`.
-    public func evaluate(_ trust: SecTrust, forHost host: String) throws {
-        for evaluator in self {
-            try evaluator.evaluate(trust, forHost: host)
-        }
-    }
-    #endif
-}
-
-extension Bundle: AlamofireExtended {}
-extension AlamofireExtension where ExtendedType: Bundle {
-    /// Returns all valid `cer`, `crt`, and `der` certificates in the bundle.
-    public var certificates: [SecCertificate] {
-        paths(forResourcesOfTypes: [".cer", ".CER", ".crt", ".CRT", ".der", ".DER"]).compactMap { path in
-            guard
-                let certificateData = try? Data(contentsOf: URL(fileURLWithPath: path)) as CFData,
-                let certificate = SecCertificateCreateWithData(nil, certificateData) else { return nil }
-
-            return certificate
-        }
-    }
-
-    /// Returns all public keys for the valid certificates in the bundle.
-    public var publicKeys: [SecKey] {
-        certificates.af.publicKeys
-    }
-
-    /// Returns all pathnames for the resources identified by the provided file extensions.
-    ///
-    /// - Parameter types: The filename extensions locate.
-    ///
-    /// - Returns:         All pathnames for the given filename extensions.
-    public func paths(forResourcesOfTypes types: [String]) -> [String] {
-        Array(Set(types.flatMap { type.paths(forResourcesOfType: $0, inDirectory: nil) }))
-    }
-}
-
-extension SecTrust: AlamofireExtended {}
-extension AlamofireExtension where ExtendedType == SecTrust {
-    /// Evaluates `self` after applying the `SecPolicy` value provided.
-    ///
-    /// - Parameter policy: The `SecPolicy` to apply to `self` before evaluation.
-    ///
-    /// - Throws:           Any `Error` from applying the `SecPolicy` or from evaluation.
-    @available(iOS 12, macOS 10.14, tvOS 12, watchOS 5, *)
-    public func evaluate(afterApplying policy: SecPolicy) throws {
-        try apply(policy: policy).af.evaluate()
-    }
-
-    /// Attempts to validate `self` using the `SecPolicy` provided and transforming any error produced using the closure passed.
-    ///
-    /// - Parameters:
-    ///   - policy:        The `SecPolicy` used to evaluate `self`.
-    ///   - errorProducer: The closure used transform the failed `OSStatus` and `SecTrustResultType`.
-    /// - Throws:          Any `Error` from applying the `policy`, or the result of `errorProducer` if validation fails.
-    @available(iOS, introduced: 10, deprecated: 12, renamed: "evaluate(afterApplying:)")
-    @available(macOS, introduced: 10.12, deprecated: 10.14, renamed: "evaluate(afterApplying:)")
-    @available(tvOS, introduced: 10, deprecated: 12, renamed: "evaluate(afterApplying:)")
-    @available(watchOS, introduced: 3, deprecated: 5, renamed: "evaluate(afterApplying:)")
-    public func validate(policy: SecPolicy, errorProducer: (_ status: OSStatus, _ result: SecTrustResultType) -> Error) throws {
-        try apply(policy: policy).af.validate(errorProducer: errorProducer)
-    }
-
-    /// Applies a `SecPolicy` to `self`, throwing if it fails.
-    ///
-    /// - Parameter policy: The `SecPolicy`.
-    ///
-    /// - Returns: `self`, with the policy applied.
-    /// - Throws: An `AFError.serverTrustEvaluationFailed` instance with a `.policyApplicationFailed` reason.
-    public func apply(policy: SecPolicy) throws -> SecTrust {
-        let status = SecTrustSetPolicies(type, policy)
-
-        guard status.af.isSuccess else {
-            throw AFError.serverTrustEvaluationFailed(reason: .policyApplicationFailed(trust: type,
-                                                                                       policy: policy,
-                                                                                       status: status))
-        }
-
-        return type
-    }
-
-    /// Evaluate `self`, throwing an `Error` if evaluation fails.
-    ///
-    /// - Throws: `AFError.serverTrustEvaluationFailed` with reason `.trustValidationFailed` and associated error from
-    ///           the underlying evaluation.
-    @available(iOS 12, macOS 10.14, tvOS 12, watchOS 5, *)
-    public func evaluate() throws {
-        var error: CFError?
-        let evaluationSucceeded = SecTrustEvaluateWithError(type, &error)
-
-        if !evaluationSucceeded {
-            throw AFError.serverTrustEvaluationFailed(reason: .trustEvaluationFailed(error: error))
-        }
-    }
-
-    /// Validate `self`, passing any failure values through `errorProducer`.
-    ///
-    /// - Parameter errorProducer: The closure used to transform the failed `OSStatus` and `SecTrustResultType` into an
-    ///                            `Error`.
-    /// - Throws:                  The `Error` produced by the `errorProducer` closure.
-    @available(iOS, introduced: 10, deprecated: 12, renamed: "evaluate()")
-    @available(macOS, introduced: 10.12, deprecated: 10.14, renamed: "evaluate()")
-    @available(tvOS, introduced: 10, deprecated: 12, renamed: "evaluate()")
-    @available(watchOS, introduced: 3, deprecated: 5, renamed: "evaluate()")
-    public func validate(errorProducer: (_ status: OSStatus, _ result: SecTrustResultType) -> Error) throws {
-        var result = SecTrustResultType.invalid
-        let status = SecTrustEvaluate(type, &result)
-
-        guard status.af.isSuccess && result.af.isSuccess else {
-            throw errorProducer(status, result)
-        }
-    }
-
-    /// Sets a custom certificate chain on `self`, allowing full validation of a self-signed certificate and its chain.
-    ///
-    /// - Parameter certificates: The `SecCertificate`s to add to the chain.
-    /// - Throws:                 Any error produced when applying the new certificate chain.
-    public func setAnchorCertificates(_ certificates: [SecCertificate]) throws {
-        // Add additional anchor certificates.
-        let status = SecTrustSetAnchorCertificates(type, certificates as CFArray)
-        guard status.af.isSuccess else {
-            throw AFError.serverTrustEvaluationFailed(reason: .settingAnchorCertificatesFailed(status: status,
-                                                                                               certificates: certificates))
-        }
-
-        // Trust only the set anchor certs.
-        let onlyStatus = SecTrustSetAnchorCertificatesOnly(type, true)
-        guard onlyStatus.af.isSuccess else {
-            throw AFError.serverTrustEvaluationFailed(reason: .settingAnchorCertificatesFailed(status: onlyStatus,
-                                                                                               certificates: certificates))
-        }
-    }
-
-    /// The public keys contained in `self`.
-    public var publicKeys: [SecKey] {
-        certificates.af.publicKeys
-    }
-
-    #if swift(>=5.5.1) // Xcode 13.1 / 2021 SDKs.
-    /// The `SecCertificate`s contained in `self`.
-    public var certificates: [SecCertificate] {
-        if #available(iOS 15, macOS 12, tvOS 15, watchOS 8, *) {
-            return (SecTrustCopyCertificateChain(type) as? [SecCertificate]) ?? []
-        } else {
-            return (0..<SecTrustGetCertificateCount(type)).compactMap { index in
-                SecTrustGetCertificateAtIndex(type, index)
-            }
-        }
-    }
-    #else
-    /// The `SecCertificate`s contained in `self`.
-    public var certificates: [SecCertificate] {
-        (0..<SecTrustGetCertificateCount(type)).compactMap { index in
-            SecTrustGetCertificateAtIndex(type, index)
-        }
-    }
-    #endif
-
-    /// The `Data` values for all certificates contained in `self`.
-    public var certificateData: [Data] {
-        certificates.af.data
-    }
-
-    /// Validates `self` after applying `SecPolicy.af.default`. This evaluation does not validate the hostname.
-    ///
-    /// - Parameter host: The hostname, used only in the error output if validation fails.
-    /// - Throws: An `AFError.serverTrustEvaluationFailed` instance with a `.defaultEvaluationFailed` reason.
-    public func performDefaultValidation(forHost host: String) throws {
-        if #available(iOS 12, macOS 10.14, tvOS 12, watchOS 5, *) {
-            try evaluate(afterApplying: SecPolicy.af.default)
-        } else {
-            try validate(policy: SecPolicy.af.default) { status, result in
-                AFError.serverTrustEvaluationFailed(reason: .defaultEvaluationFailed(output: .init(host, type, status, result)))
-            }
-        }
-    }
-
-    /// Validates `self` after applying `SecPolicy.af.hostname(host)`, which performs the default validation as well as
-    /// hostname validation.
-    ///
-    /// - Parameter host: The hostname to use in the validation.
-    /// - Throws:         An `AFError.serverTrustEvaluationFailed` instance with a `.defaultEvaluationFailed` reason.
-    public func performValidation(forHost host: String) throws {
-        if #available(iOS 12, macOS 10.14, tvOS 12, watchOS 5, *) {
-            try evaluate(afterApplying: SecPolicy.af.hostname(host))
-        } else {
-            try validate(policy: SecPolicy.af.hostname(host)) { status, result in
-                AFError.serverTrustEvaluationFailed(reason: .hostValidationFailed(output: .init(host, type, status, result)))
-            }
-        }
-    }
-}
-
-extension SecPolicy: AlamofireExtended {}
-extension AlamofireExtension where ExtendedType == SecPolicy {
-    /// Creates a `SecPolicy` instance which will validate server certificates but not require a host name match.
-    public static let `default` = SecPolicyCreateSSL(true, nil)
-
-    /// Creates a `SecPolicy` instance which will validate server certificates and much match the provided hostname.
-    ///
-    /// - Parameter hostname: The hostname to validate against.
-    ///
-    /// - Returns:            The `SecPolicy`.
-    public static func hostname(_ hostname: String) -> SecPolicy {
-        SecPolicyCreateSSL(true, hostname as CFString)
-    }
-
-    /// Creates a `SecPolicy` which checks the revocation of certificates.
-    ///
-    /// - Parameter options: The `RevocationTrustEvaluator.Options` for evaluation.
-    ///
-    /// - Returns:           The `SecPolicy`.
-    /// - Throws:            An `AFError.serverTrustEvaluationFailed` error with reason `.revocationPolicyCreationFailed`
-    ///                      if the policy cannot be created.
-    public static func revocation(options: RevocationTrustEvaluator.Options) throws -> SecPolicy {
-        guard let policy = SecPolicyCreateRevocation(options.rawValue) else {
-            throw AFError.serverTrustEvaluationFailed(reason: .revocationPolicyCreationFailed)
-        }
-
-        return policy
-    }
-}
-
-extension Array: AlamofireExtended {}
-extension AlamofireExtension where ExtendedType == [SecCertificate] {
-    /// All `Data` values for the contained `SecCertificate`s.
-    public var data: [Data] {
-        type.map { SecCertificateCopyData($0) as Data }
-    }
-
-    /// All public `SecKey` values for the contained `SecCertificate`s.
-    public var publicKeys: [SecKey] {
-        type.compactMap(\.af.publicKey)
-    }
-}
-
-extension SecCertificate: AlamofireExtended {}
-extension AlamofireExtension where ExtendedType == SecCertificate {
-    /// The public key for `self`, if it can be extracted.
-    ///
-    /// - Note: On 2020 OSes and newer, only RSA and ECDSA keys are supported.
-    ///
-    public var publicKey: SecKey? {
-        let policy = SecPolicyCreateBasicX509()
-        var trust: SecTrust?
-        let trustCreationStatus = SecTrustCreateWithCertificates(type, policy, &trust)
-
-        guard let createdTrust = trust, trustCreationStatus == errSecSuccess else { return nil }
-
-        #if swift(>=5.3.1) // SecTrustCopyKey not visible in Xcode <= 12.1, despite being a 2020 API.
-        if #available(iOS 14, macOS 11, tvOS 14, watchOS 7, *) {
-            return SecTrustCopyKey(createdTrust)
-        } else {
-            return SecTrustCopyPublicKey(createdTrust)
-        }
-        #else
-        return SecTrustCopyPublicKey(createdTrust)
-        #endif
-    }
-}
-
-extension OSStatus: AlamofireExtended {}
-extension AlamofireExtension where ExtendedType == OSStatus {
-    /// Returns whether `self` is `errSecSuccess`.
-    public var isSuccess: Bool { type == errSecSuccess }
-}
-
-extension SecTrustResultType: AlamofireExtended {}
-extension AlamofireExtension where ExtendedType == SecTrustResultType {
-    /// Returns whether `self is `.unspecified` or `.proceed`.
-    public var isSuccess: Bool {
-        type == .unspecified || type == .proceed
-    }
-}
-#endif

+ 0 - 1264
Pods/Alamofire/Source/Session.swift

@@ -1,1264 +0,0 @@
-//
-//  Session.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// `Session` creates and manages Alamofire's `Request` types during their lifetimes. It also provides common
-/// functionality for all `Request`s, including queuing, interception, trust management, redirect handling, and response
-/// cache handling.
-open class Session {
-    /// Shared singleton instance used by all `AF.request` APIs. Cannot be modified.
-    public static let `default` = Session()
-
-    /// Underlying `URLSession` used to create `URLSessionTasks` for this instance, and for which this instance's
-    /// `delegate` handles `URLSessionDelegate` callbacks.
-    ///
-    /// - Note: This instance should **NOT** be used to interact with the underlying `URLSessionTask`s. Doing so will
-    ///         break internal Alamofire logic that tracks those tasks.
-    ///
-    public let session: URLSession
-    /// Instance's `SessionDelegate`, which handles the `URLSessionDelegate` methods and `Request` interaction.
-    public let delegate: SessionDelegate
-    /// Root `DispatchQueue` for all internal callbacks and state update. **MUST** be a serial queue.
-    public let rootQueue: DispatchQueue
-    /// Value determining whether this instance automatically calls `resume()` on all created `Request`s.
-    public let startRequestsImmediately: Bool
-    /// `DispatchQueue` on which `URLRequest`s are created asynchronously. By default this queue uses `rootQueue` as its
-    /// `target`, but a separate queue can be used if request creation is determined to be a bottleneck. Always profile
-    /// and test before introducing an additional queue.
-    public let requestQueue: DispatchQueue
-    /// `DispatchQueue` passed to all `Request`s on which they perform their response serialization. By default this
-    /// queue uses `rootQueue` as its `target` but a separate queue can be used if response serialization is determined
-    /// to be a bottleneck. Always profile and test before introducing an additional queue.
-    public let serializationQueue: DispatchQueue
-    /// `RequestInterceptor` used for all `Request` created by the instance. `RequestInterceptor`s can also be set on a
-    /// per-`Request` basis, in which case the `Request`'s interceptor takes precedence over this value.
-    public let interceptor: RequestInterceptor?
-    /// `ServerTrustManager` instance used to evaluate all trust challenges and provide certificate and key pinning.
-    public let serverTrustManager: ServerTrustManager?
-    /// `RedirectHandler` instance used to provide customization for request redirection.
-    public let redirectHandler: RedirectHandler?
-    /// `CachedResponseHandler` instance used to provide customization of cached response handling.
-    public let cachedResponseHandler: CachedResponseHandler?
-    /// `CompositeEventMonitor` used to compose Alamofire's `defaultEventMonitors` and any passed `EventMonitor`s.
-    public let eventMonitor: CompositeEventMonitor
-    /// `EventMonitor`s included in all instances. `[AlamofireNotifications()]` by default.
-    public let defaultEventMonitors: [EventMonitor] = [AlamofireNotifications()]
-
-    /// Internal map between `Request`s and any `URLSessionTasks` that may be in flight for them.
-    var requestTaskMap = RequestTaskMap()
-    /// `Set` of currently active `Request`s.
-    var activeRequests: Set<Request> = []
-    /// Completion events awaiting `URLSessionTaskMetrics`.
-    var waitingCompletions: [URLSessionTask: () -> Void] = [:]
-
-    /// Creates a `Session` from a `URLSession` and other parameters.
-    ///
-    /// - Note: When passing a `URLSession`, you must create the `URLSession` with a specific `delegateQueue` value and
-    ///         pass the `delegateQueue`'s `underlyingQueue` as the `rootQueue` parameter of this initializer.
-    ///
-    /// - Parameters:
-    ///   - session:                  Underlying `URLSession` for this instance.
-    ///   - delegate:                 `SessionDelegate` that handles `session`'s delegate callbacks as well as `Request`
-    ///                               interaction.
-    ///   - rootQueue:                Root `DispatchQueue` for all internal callbacks and state updates. **MUST** be a
-    ///                               serial queue.
-    ///   - startRequestsImmediately: Determines whether this instance will automatically start all `Request`s. `true`
-    ///                               by default. If set to `false`, all `Request`s created must have `.resume()` called.
-    ///                               on them for them to start.
-    ///   - requestQueue:             `DispatchQueue` on which to perform `URLRequest` creation. By default this queue
-    ///                               will use the `rootQueue` as its `target`. A separate queue can be used if it's
-    ///                               determined request creation is a bottleneck, but that should only be done after
-    ///                               careful testing and profiling. `nil` by default.
-    ///   - serializationQueue:       `DispatchQueue` on which to perform all response serialization. By default this
-    ///                               queue will use the `rootQueue` as its `target`. A separate queue can be used if
-    ///                               it's determined response serialization is a bottleneck, but that should only be
-    ///                               done after careful testing and profiling. `nil` by default.
-    ///   - interceptor:              `RequestInterceptor` to be used for all `Request`s created by this instance. `nil`
-    ///                               by default.
-    ///   - serverTrustManager:       `ServerTrustManager` to be used for all trust evaluations by this instance. `nil`
-    ///                               by default.
-    ///   - redirectHandler:          `RedirectHandler` to be used by all `Request`s created by this instance. `nil` by
-    ///                               default.
-    ///   - cachedResponseHandler:    `CachedResponseHandler` to be used by all `Request`s created by this instance.
-    ///                               `nil` by default.
-    ///   - eventMonitors:            Additional `EventMonitor`s used by the instance. Alamofire always adds a
-    ///                               `AlamofireNotifications` `EventMonitor` to the array passed here. `[]` by default.
-    public init(session: URLSession,
-                delegate: SessionDelegate,
-                rootQueue: DispatchQueue,
-                startRequestsImmediately: Bool = true,
-                requestQueue: DispatchQueue? = nil,
-                serializationQueue: DispatchQueue? = nil,
-                interceptor: RequestInterceptor? = nil,
-                serverTrustManager: ServerTrustManager? = nil,
-                redirectHandler: RedirectHandler? = nil,
-                cachedResponseHandler: CachedResponseHandler? = nil,
-                eventMonitors: [EventMonitor] = []) {
-        precondition(session.configuration.identifier == nil,
-                     "Alamofire does not support background URLSessionConfigurations.")
-        precondition(session.delegateQueue.underlyingQueue === rootQueue,
-                     "Session(session:) initializer must be passed the DispatchQueue used as the delegateQueue's underlyingQueue as rootQueue.")
-
-        self.session = session
-        self.delegate = delegate
-        self.rootQueue = rootQueue
-        self.startRequestsImmediately = startRequestsImmediately
-        self.requestQueue = requestQueue ?? DispatchQueue(label: "\(rootQueue.label).requestQueue", target: rootQueue)
-        self.serializationQueue = serializationQueue ?? DispatchQueue(label: "\(rootQueue.label).serializationQueue", target: rootQueue)
-        self.interceptor = interceptor
-        self.serverTrustManager = serverTrustManager
-        self.redirectHandler = redirectHandler
-        self.cachedResponseHandler = cachedResponseHandler
-        eventMonitor = CompositeEventMonitor(monitors: defaultEventMonitors + eventMonitors)
-        delegate.eventMonitor = eventMonitor
-        delegate.stateProvider = self
-    }
-
-    /// Creates a `Session` from a `URLSessionConfiguration`.
-    ///
-    /// - Note: This initializer lets Alamofire handle the creation of the underlying `URLSession` and its
-    ///         `delegateQueue`, and is the recommended initializer for most uses.
-    ///
-    /// - Parameters:
-    ///   - configuration:            `URLSessionConfiguration` to be used to create the underlying `URLSession`. Changes
-    ///                               to this value after being passed to this initializer will have no effect.
-    ///                               `URLSessionConfiguration.af.default` by default.
-    ///   - delegate:                 `SessionDelegate` that handles `session`'s delegate callbacks as well as `Request`
-    ///                               interaction. `SessionDelegate()` by default.
-    ///   - rootQueue:                Root `DispatchQueue` for all internal callbacks and state updates. **MUST** be a
-    ///                               serial queue. `DispatchQueue(label: "org.alamofire.session.rootQueue")` by default.
-    ///   - startRequestsImmediately: Determines whether this instance will automatically start all `Request`s. `true`
-    ///                               by default. If set to `false`, all `Request`s created must have `.resume()` called.
-    ///                               on them for them to start.
-    ///   - requestQueue:             `DispatchQueue` on which to perform `URLRequest` creation. By default this queue
-    ///                               will use the `rootQueue` as its `target`. A separate queue can be used if it's
-    ///                               determined request creation is a bottleneck, but that should only be done after
-    ///                               careful testing and profiling. `nil` by default.
-    ///   - serializationQueue:       `DispatchQueue` on which to perform all response serialization. By default this
-    ///                               queue will use the `rootQueue` as its `target`. A separate queue can be used if
-    ///                               it's determined response serialization is a bottleneck, but that should only be
-    ///                               done after careful testing and profiling. `nil` by default.
-    ///   - interceptor:              `RequestInterceptor` to be used for all `Request`s created by this instance. `nil`
-    ///                               by default.
-    ///   - serverTrustManager:       `ServerTrustManager` to be used for all trust evaluations by this instance. `nil`
-    ///                               by default.
-    ///   - redirectHandler:          `RedirectHandler` to be used by all `Request`s created by this instance. `nil` by
-    ///                               default.
-    ///   - cachedResponseHandler:    `CachedResponseHandler` to be used by all `Request`s created by this instance.
-    ///                               `nil` by default.
-    ///   - eventMonitors:            Additional `EventMonitor`s used by the instance. Alamofire always adds a
-    ///                               `AlamofireNotifications` `EventMonitor` to the array passed here. `[]` by default.
-    public convenience init(configuration: URLSessionConfiguration = URLSessionConfiguration.af.default,
-                            delegate: SessionDelegate = SessionDelegate(),
-                            rootQueue: DispatchQueue = DispatchQueue(label: "org.alamofire.session.rootQueue"),
-                            startRequestsImmediately: Bool = true,
-                            requestQueue: DispatchQueue? = nil,
-                            serializationQueue: DispatchQueue? = nil,
-                            interceptor: RequestInterceptor? = nil,
-                            serverTrustManager: ServerTrustManager? = nil,
-                            redirectHandler: RedirectHandler? = nil,
-                            cachedResponseHandler: CachedResponseHandler? = nil,
-                            eventMonitors: [EventMonitor] = []) {
-        precondition(configuration.identifier == nil, "Alamofire does not support background URLSessionConfigurations.")
-
-        // Retarget the incoming rootQueue for safety, unless it's the main queue, which we know is safe.
-        let serialRootQueue = (rootQueue === DispatchQueue.main) ? rootQueue : DispatchQueue(label: rootQueue.label,
-                                                                                             target: rootQueue)
-        let delegateQueue = OperationQueue(maxConcurrentOperationCount: 1, underlyingQueue: serialRootQueue, name: "\(serialRootQueue.label).sessionDelegate")
-        let session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: delegateQueue)
-
-        self.init(session: session,
-                  delegate: delegate,
-                  rootQueue: serialRootQueue,
-                  startRequestsImmediately: startRequestsImmediately,
-                  requestQueue: requestQueue,
-                  serializationQueue: serializationQueue,
-                  interceptor: interceptor,
-                  serverTrustManager: serverTrustManager,
-                  redirectHandler: redirectHandler,
-                  cachedResponseHandler: cachedResponseHandler,
-                  eventMonitors: eventMonitors)
-    }
-
-    deinit {
-        finishRequestsForDeinit()
-        session.invalidateAndCancel()
-    }
-
-    // MARK: - All Requests API
-
-    /// Perform an action on all active `Request`s.
-    ///
-    /// - Note: The provided `action` closure is performed asynchronously, meaning that some `Request`s may complete and
-    ///         be unavailable by time it runs. Additionally, this action is performed on the instances's `rootQueue`,
-    ///         so care should be taken that actions are fast. Once the work on the `Request`s is complete, any
-    ///         additional work should be performed on another queue.
-    ///
-    /// - Parameters:
-    ///   - action:     Closure to perform with all `Request`s.
-    public func withAllRequests(perform action: @escaping (Set<Request>) -> Void) {
-        rootQueue.async {
-            action(self.activeRequests)
-        }
-    }
-
-    /// Cancel all active `Request`s, optionally calling a completion handler when complete.
-    ///
-    /// - Note: This is an asynchronous operation and does not block the creation of future `Request`s. Cancelled
-    ///         `Request`s may not cancel immediately due internal work, and may not cancel at all if they are close to
-    ///         completion when cancelled.
-    ///
-    /// - Parameters:
-    ///   - queue:      `DispatchQueue` on which the completion handler is run. `.main` by default.
-    ///   - completion: Closure to be called when all `Request`s have been cancelled.
-    public func cancelAllRequests(completingOnQueue queue: DispatchQueue = .main, completion: (() -> Void)? = nil) {
-        withAllRequests { requests in
-            requests.forEach { $0.cancel() }
-            queue.async {
-                completion?()
-            }
-        }
-    }
-
-    // MARK: - DataRequest
-
-    /// Closure which provides a `URLRequest` for mutation.
-    public typealias RequestModifier = (inout URLRequest) throws -> Void
-
-    struct RequestConvertible: URLRequestConvertible {
-        let url: URLConvertible
-        let method: HTTPMethod
-        let parameters: Parameters?
-        let encoding: ParameterEncoding
-        let headers: HTTPHeaders?
-        let requestModifier: RequestModifier?
-
-        func asURLRequest() throws -> URLRequest {
-            var request = try URLRequest(url: url, method: method, headers: headers)
-            try requestModifier?(&request)
-
-            return try encoding.encode(request, with: parameters)
-        }
-    }
-
-    /// Creates a `DataRequest` from a `URLRequest` created using the passed components and a `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - convertible:     `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - method:          `HTTPMethod` for the `URLRequest`. `.get` by default.
-    ///   - parameters:      `Parameters` (a.k.a. `[String: Any]`) value to be encoded into the `URLRequest`. `nil` by
-    ///                      default.
-    ///   - encoding:        `ParameterEncoding` to be used to encode the `parameters` value into the `URLRequest`.
-    ///                      `URLEncoding.default` by default.
-    ///   - headers:         `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - interceptor:     `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided
-    ///                      parameters. `nil` by default.
-    ///
-    /// - Returns:       The created `DataRequest`.
-    open func request(_ convertible: URLConvertible,
-                      method: HTTPMethod = .get,
-                      parameters: Parameters? = nil,
-                      encoding: ParameterEncoding = URLEncoding.default,
-                      headers: HTTPHeaders? = nil,
-                      interceptor: RequestInterceptor? = nil,
-                      requestModifier: RequestModifier? = nil) -> DataRequest {
-        let convertible = RequestConvertible(url: convertible,
-                                             method: method,
-                                             parameters: parameters,
-                                             encoding: encoding,
-                                             headers: headers,
-                                             requestModifier: requestModifier)
-
-        return request(convertible, interceptor: interceptor)
-    }
-
-    struct RequestEncodableConvertible<Parameters: Encodable>: URLRequestConvertible {
-        let url: URLConvertible
-        let method: HTTPMethod
-        let parameters: Parameters?
-        let encoder: ParameterEncoder
-        let headers: HTTPHeaders?
-        let requestModifier: RequestModifier?
-
-        func asURLRequest() throws -> URLRequest {
-            var request = try URLRequest(url: url, method: method, headers: headers)
-            try requestModifier?(&request)
-
-            return try parameters.map { try encoder.encode($0, into: request) } ?? request
-        }
-    }
-
-    /// Creates a `DataRequest` from a `URLRequest` created using the passed components, `Encodable` parameters, and a
-    /// `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - convertible:     `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - method:          `HTTPMethod` for the `URLRequest`. `.get` by default.
-    ///   - parameters:      `Encodable` value to be encoded into the `URLRequest`. `nil` by default.
-    ///   - encoder:         `ParameterEncoder` to be used to encode the `parameters` value into the `URLRequest`.
-    ///                      `URLEncodedFormParameterEncoder.default` by default.
-    ///   - headers:         `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - interceptor:     `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from
-    ///                      the provided parameters. `nil` by default.
-    ///
-    /// - Returns:           The created `DataRequest`.
-    open func request<Parameters: Encodable>(_ convertible: URLConvertible,
-                                             method: HTTPMethod = .get,
-                                             parameters: Parameters? = nil,
-                                             encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default,
-                                             headers: HTTPHeaders? = nil,
-                                             interceptor: RequestInterceptor? = nil,
-                                             requestModifier: RequestModifier? = nil) -> DataRequest {
-        let convertible = RequestEncodableConvertible(url: convertible,
-                                                      method: method,
-                                                      parameters: parameters,
-                                                      encoder: encoder,
-                                                      headers: headers,
-                                                      requestModifier: requestModifier)
-
-        return request(convertible, interceptor: interceptor)
-    }
-
-    /// Creates a `DataRequest` from a `URLRequestConvertible` value and a `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`.
-    ///   - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///
-    /// - Returns:       The created `DataRequest`.
-    open func request(_ convertible: URLRequestConvertible, interceptor: RequestInterceptor? = nil) -> DataRequest {
-        let request = DataRequest(convertible: convertible,
-                                  underlyingQueue: rootQueue,
-                                  serializationQueue: serializationQueue,
-                                  eventMonitor: eventMonitor,
-                                  interceptor: interceptor,
-                                  delegate: self)
-
-        perform(request)
-
-        return request
-    }
-
-    // MARK: - DataStreamRequest
-
-    /// Creates a `DataStreamRequest` from the passed components, `Encodable` parameters, and `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - convertible:                      `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - method:                           `HTTPMethod` for the `URLRequest`. `.get` by default.
-    ///   - parameters:                       `Encodable` value to be encoded into the `URLRequest`. `nil` by default.
-    ///   - encoder:                          `ParameterEncoder` to be used to encode the `parameters` value into the
-    ///                                       `URLRequest`.
-    ///                                       `URLEncodedFormParameterEncoder.default` by default.
-    ///   - headers:                          `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - automaticallyCancelOnStreamError: `Bool` indicating whether the instance should be canceled when an `Error`
-    ///                                       is thrown while serializing stream `Data`. `false` by default.
-    ///   - interceptor:                      `RequestInterceptor` value to be used by the returned `DataRequest`. `nil`
-    ///                                       by default.
-    ///   - requestModifier:                  `RequestModifier` which will be applied to the `URLRequest` created from
-    ///                                       the provided parameters. `nil` by default.
-    ///
-    /// - Returns:       The created `DataStream` request.
-    open func streamRequest<Parameters: Encodable>(_ convertible: URLConvertible,
-                                                   method: HTTPMethod = .get,
-                                                   parameters: Parameters? = nil,
-                                                   encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default,
-                                                   headers: HTTPHeaders? = nil,
-                                                   automaticallyCancelOnStreamError: Bool = false,
-                                                   interceptor: RequestInterceptor? = nil,
-                                                   requestModifier: RequestModifier? = nil) -> DataStreamRequest {
-        let convertible = RequestEncodableConvertible(url: convertible,
-                                                      method: method,
-                                                      parameters: parameters,
-                                                      encoder: encoder,
-                                                      headers: headers,
-                                                      requestModifier: requestModifier)
-
-        return streamRequest(convertible,
-                             automaticallyCancelOnStreamError: automaticallyCancelOnStreamError,
-                             interceptor: interceptor)
-    }
-
-    /// Creates a `DataStreamRequest` from the passed components and `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - convertible:                      `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - method:                           `HTTPMethod` for the `URLRequest`. `.get` by default.
-    ///   - headers:                          `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - automaticallyCancelOnStreamError: `Bool` indicating whether the instance should be canceled when an `Error`
-    ///                                       is thrown while serializing stream `Data`. `false` by default.
-    ///   - interceptor:                      `RequestInterceptor` value to be used by the returned `DataRequest`. `nil`
-    ///                                       by default.
-    ///   - requestModifier:                  `RequestModifier` which will be applied to the `URLRequest` created from
-    ///                                       the provided parameters. `nil` by default.
-    ///
-    /// - Returns:       The created `DataStream` request.
-    open func streamRequest(_ convertible: URLConvertible,
-                            method: HTTPMethod = .get,
-                            headers: HTTPHeaders? = nil,
-                            automaticallyCancelOnStreamError: Bool = false,
-                            interceptor: RequestInterceptor? = nil,
-                            requestModifier: RequestModifier? = nil) -> DataStreamRequest {
-        let convertible = RequestEncodableConvertible(url: convertible,
-                                                      method: method,
-                                                      parameters: Empty?.none,
-                                                      encoder: URLEncodedFormParameterEncoder.default,
-                                                      headers: headers,
-                                                      requestModifier: requestModifier)
-
-        return streamRequest(convertible,
-                             automaticallyCancelOnStreamError: automaticallyCancelOnStreamError,
-                             interceptor: interceptor)
-    }
-
-    /// Creates a `DataStreamRequest` from the passed `URLRequestConvertible` value and `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - convertible:                      `URLRequestConvertible` value to be used to create the `URLRequest`.
-    ///   - automaticallyCancelOnStreamError: `Bool` indicating whether the instance should be canceled when an `Error`
-    ///                                       is thrown while serializing stream `Data`. `false` by default.
-    ///   - interceptor:                      `RequestInterceptor` value to be used by the returned `DataRequest`. `nil`
-    ///                                        by default.
-    ///
-    /// - Returns:       The created `DataStreamRequest`.
-    open func streamRequest(_ convertible: URLRequestConvertible,
-                            automaticallyCancelOnStreamError: Bool = false,
-                            interceptor: RequestInterceptor? = nil) -> DataStreamRequest {
-        let request = DataStreamRequest(convertible: convertible,
-                                        automaticallyCancelOnStreamError: automaticallyCancelOnStreamError,
-                                        underlyingQueue: rootQueue,
-                                        serializationQueue: serializationQueue,
-                                        eventMonitor: eventMonitor,
-                                        interceptor: interceptor,
-                                        delegate: self)
-
-        perform(request)
-
-        return request
-    }
-
-    // MARK: - DownloadRequest
-
-    /// Creates a `DownloadRequest` using a `URLRequest` created using the passed components, `RequestInterceptor`, and
-    /// `Destination`.
-    ///
-    /// - Parameters:
-    ///   - convertible:     `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - method:          `HTTPMethod` for the `URLRequest`. `.get` by default.
-    ///   - parameters:      `Parameters` (a.k.a. `[String: Any]`) value to be encoded into the `URLRequest`. `nil` by
-    ///                      default.
-    ///   - encoding:        `ParameterEncoding` to be used to encode the `parameters` value into the `URLRequest`.
-    ///                      Defaults to `URLEncoding.default`.
-    ///   - headers:         `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - interceptor:     `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided
-    ///                      parameters. `nil` by default.
-    ///   - destination:     `DownloadRequest.Destination` closure used to determine how and where the downloaded file
-    ///                      should be moved. `nil` by default.
-    ///
-    /// - Returns:           The created `DownloadRequest`.
-    open func download(_ convertible: URLConvertible,
-                       method: HTTPMethod = .get,
-                       parameters: Parameters? = nil,
-                       encoding: ParameterEncoding = URLEncoding.default,
-                       headers: HTTPHeaders? = nil,
-                       interceptor: RequestInterceptor? = nil,
-                       requestModifier: RequestModifier? = nil,
-                       to destination: DownloadRequest.Destination? = nil) -> DownloadRequest {
-        let convertible = RequestConvertible(url: convertible,
-                                             method: method,
-                                             parameters: parameters,
-                                             encoding: encoding,
-                                             headers: headers,
-                                             requestModifier: requestModifier)
-
-        return download(convertible, interceptor: interceptor, to: destination)
-    }
-
-    /// Creates a `DownloadRequest` from a `URLRequest` created using the passed components, `Encodable` parameters, and
-    /// a `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - convertible:     `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - method:          `HTTPMethod` for the `URLRequest`. `.get` by default.
-    ///   - parameters:      Value conforming to `Encodable` to be encoded into the `URLRequest`. `nil` by default.
-    ///   - encoder:         `ParameterEncoder` to be used to encode the `parameters` value into the `URLRequest`.
-    ///                      Defaults to `URLEncodedFormParameterEncoder.default`.
-    ///   - headers:         `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - interceptor:     `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided
-    ///                      parameters. `nil` by default.
-    ///   - destination:     `DownloadRequest.Destination` closure used to determine how and where the downloaded file
-    ///                      should be moved. `nil` by default.
-    ///
-    /// - Returns:           The created `DownloadRequest`.
-    open func download<Parameters: Encodable>(_ convertible: URLConvertible,
-                                              method: HTTPMethod = .get,
-                                              parameters: Parameters? = nil,
-                                              encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default,
-                                              headers: HTTPHeaders? = nil,
-                                              interceptor: RequestInterceptor? = nil,
-                                              requestModifier: RequestModifier? = nil,
-                                              to destination: DownloadRequest.Destination? = nil) -> DownloadRequest {
-        let convertible = RequestEncodableConvertible(url: convertible,
-                                                      method: method,
-                                                      parameters: parameters,
-                                                      encoder: encoder,
-                                                      headers: headers,
-                                                      requestModifier: requestModifier)
-
-        return download(convertible, interceptor: interceptor, to: destination)
-    }
-
-    /// Creates a `DownloadRequest` from a `URLRequestConvertible` value, a `RequestInterceptor`, and a `Destination`.
-    ///
-    /// - Parameters:
-    ///   - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`.
-    ///   - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - destination: `DownloadRequest.Destination` closure used to determine how and where the downloaded file
-    ///                  should be moved. `nil` by default.
-    ///
-    /// - Returns:       The created `DownloadRequest`.
-    open func download(_ convertible: URLRequestConvertible,
-                       interceptor: RequestInterceptor? = nil,
-                       to destination: DownloadRequest.Destination? = nil) -> DownloadRequest {
-        let request = DownloadRequest(downloadable: .request(convertible),
-                                      underlyingQueue: rootQueue,
-                                      serializationQueue: serializationQueue,
-                                      eventMonitor: eventMonitor,
-                                      interceptor: interceptor,
-                                      delegate: self,
-                                      destination: destination ?? DownloadRequest.defaultDestination)
-
-        perform(request)
-
-        return request
-    }
-
-    /// Creates a `DownloadRequest` from the `resumeData` produced from a previously cancelled `DownloadRequest`, as
-    /// well as a `RequestInterceptor`, and a `Destination`.
-    ///
-    /// - Note: If `destination` is not specified, the download will be moved to a temporary location determined by
-    ///         Alamofire. The file will not be deleted until the system purges the temporary files.
-    ///
-    /// - Note: On some versions of all Apple platforms (iOS 10 - 10.2, macOS 10.12 - 10.12.2, tvOS 10 - 10.1, watchOS 3 - 3.1.1),
-    /// `resumeData` is broken on background URL session configurations. There's an underlying bug in the `resumeData`
-    /// generation logic where the data is written incorrectly and will always fail to resume the download. For more
-    /// information about the bug and possible workarounds, please refer to the [this Stack Overflow post](http://stackoverflow.com/a/39347461/1342462).
-    ///
-    /// - Parameters:
-    ///   - data:        The resume data from a previously cancelled `DownloadRequest` or `URLSessionDownloadTask`.
-    ///   - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - destination: `DownloadRequest.Destination` closure used to determine how and where the downloaded file
-    ///                  should be moved. `nil` by default.
-    ///
-    /// - Returns:       The created `DownloadRequest`.
-    open func download(resumingWith data: Data,
-                       interceptor: RequestInterceptor? = nil,
-                       to destination: DownloadRequest.Destination? = nil) -> DownloadRequest {
-        let request = DownloadRequest(downloadable: .resumeData(data),
-                                      underlyingQueue: rootQueue,
-                                      serializationQueue: serializationQueue,
-                                      eventMonitor: eventMonitor,
-                                      interceptor: interceptor,
-                                      delegate: self,
-                                      destination: destination ?? DownloadRequest.defaultDestination)
-
-        perform(request)
-
-        return request
-    }
-
-    // MARK: - UploadRequest
-
-    struct ParameterlessRequestConvertible: URLRequestConvertible {
-        let url: URLConvertible
-        let method: HTTPMethod
-        let headers: HTTPHeaders?
-        let requestModifier: RequestModifier?
-
-        func asURLRequest() throws -> URLRequest {
-            var request = try URLRequest(url: url, method: method, headers: headers)
-            try requestModifier?(&request)
-
-            return request
-        }
-    }
-
-    struct Upload: UploadConvertible {
-        let request: URLRequestConvertible
-        let uploadable: UploadableConvertible
-
-        func createUploadable() throws -> UploadRequest.Uploadable {
-            try uploadable.createUploadable()
-        }
-
-        func asURLRequest() throws -> URLRequest {
-            try request.asURLRequest()
-        }
-    }
-
-    // MARK: Data
-
-    /// Creates an `UploadRequest` for the given `Data`, `URLRequest` components, and `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - data:            The `Data` to upload.
-    ///   - convertible:     `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - method:          `HTTPMethod` for the `URLRequest`. `.post` by default.
-    ///   - headers:         `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - interceptor:     `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - fileManager:     `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by
-    ///                      default.
-    ///   - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided
-    ///                      parameters. `nil` by default.
-    ///
-    /// - Returns:           The created `UploadRequest`.
-    open func upload(_ data: Data,
-                     to convertible: URLConvertible,
-                     method: HTTPMethod = .post,
-                     headers: HTTPHeaders? = nil,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default,
-                     requestModifier: RequestModifier? = nil) -> UploadRequest {
-        let convertible = ParameterlessRequestConvertible(url: convertible,
-                                                          method: method,
-                                                          headers: headers,
-                                                          requestModifier: requestModifier)
-
-        return upload(data, with: convertible, interceptor: interceptor, fileManager: fileManager)
-    }
-
-    /// Creates an `UploadRequest` for the given `Data` using the `URLRequestConvertible` value and `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - data:        The `Data` to upload.
-    ///   - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`.
-    ///   - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by
-    ///                  default.
-    ///
-    /// - Returns:       The created `UploadRequest`.
-    open func upload(_ data: Data,
-                     with convertible: URLRequestConvertible,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default) -> UploadRequest {
-        upload(.data(data), with: convertible, interceptor: interceptor, fileManager: fileManager)
-    }
-
-    // MARK: File
-
-    /// Creates an `UploadRequest` for the file at the given file `URL`, using a `URLRequest` from the provided
-    /// components and `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - fileURL:         The `URL` of the file to upload.
-    ///   - convertible:     `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - method:          `HTTPMethod` for the `URLRequest`. `.post` by default.
-    ///   - headers:         `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - interceptor:     `RequestInterceptor` value to be used by the returned `UploadRequest`. `nil` by default.
-    ///   - fileManager:     `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by
-    ///                      default.
-    ///   - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided
-    ///                      parameters. `nil` by default.
-    ///
-    /// - Returns:           The created `UploadRequest`.
-    open func upload(_ fileURL: URL,
-                     to convertible: URLConvertible,
-                     method: HTTPMethod = .post,
-                     headers: HTTPHeaders? = nil,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default,
-                     requestModifier: RequestModifier? = nil) -> UploadRequest {
-        let convertible = ParameterlessRequestConvertible(url: convertible,
-                                                          method: method,
-                                                          headers: headers,
-                                                          requestModifier: requestModifier)
-
-        return upload(fileURL, with: convertible, interceptor: interceptor, fileManager: fileManager)
-    }
-
-    /// Creates an `UploadRequest` for the file at the given file `URL` using the `URLRequestConvertible` value and
-    /// `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - fileURL:     The `URL` of the file to upload.
-    ///   - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`.
-    ///   - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by
-    ///                  default.
-    ///
-    /// - Returns:       The created `UploadRequest`.
-    open func upload(_ fileURL: URL,
-                     with convertible: URLRequestConvertible,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default) -> UploadRequest {
-        upload(.file(fileURL, shouldRemove: false), with: convertible, interceptor: interceptor, fileManager: fileManager)
-    }
-
-    // MARK: InputStream
-
-    /// Creates an `UploadRequest` from the `InputStream` provided using a `URLRequest` from the provided components and
-    /// `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - stream:          The `InputStream` that provides the data to upload.
-    ///   - convertible:     `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - method:          `HTTPMethod` for the `URLRequest`. `.post` by default.
-    ///   - headers:         `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - interceptor:     `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - fileManager:     `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by
-    ///                      default.
-    ///   - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided
-    ///                      parameters. `nil` by default.
-    ///
-    /// - Returns:           The created `UploadRequest`.
-    open func upload(_ stream: InputStream,
-                     to convertible: URLConvertible,
-                     method: HTTPMethod = .post,
-                     headers: HTTPHeaders? = nil,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default,
-                     requestModifier: RequestModifier? = nil) -> UploadRequest {
-        let convertible = ParameterlessRequestConvertible(url: convertible,
-                                                          method: method,
-                                                          headers: headers,
-                                                          requestModifier: requestModifier)
-
-        return upload(stream, with: convertible, interceptor: interceptor, fileManager: fileManager)
-    }
-
-    /// Creates an `UploadRequest` from the provided `InputStream` using the `URLRequestConvertible` value and
-    /// `RequestInterceptor`.
-    ///
-    /// - Parameters:
-    ///   - stream:      The `InputStream` that provides the data to upload.
-    ///   - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`.
-    ///   - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by
-    ///                  default.
-    ///
-    /// - Returns:       The created `UploadRequest`.
-    open func upload(_ stream: InputStream,
-                     with convertible: URLRequestConvertible,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default) -> UploadRequest {
-        upload(.stream(stream), with: convertible, interceptor: interceptor, fileManager: fileManager)
-    }
-
-    // MARK: MultipartFormData
-
-    /// Creates an `UploadRequest` for the multipart form data built using a closure and sent using the provided
-    /// `URLRequest` components and `RequestInterceptor`.
-    ///
-    /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative
-    /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most
-    /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to
-    /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory
-    /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be
-    /// used for larger payloads such as video content.
-    ///
-    /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory
-    /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`,
-    /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk
-    /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding
-    /// technique was used.
-    ///
-    /// - Parameters:
-    ///   - multipartFormData:      `MultipartFormData` building closure.
-    ///   - url:                    `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or
-    ///                              onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by
-    ///                              default.
-    ///   - method:                  `HTTPMethod` for the `URLRequest`. `.post` by default.
-    ///   - headers:                 `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - interceptor:             `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - fileManager:             `FileManager` to be used if the form data exceeds the memory threshold and is
-    ///                              written to disk before being uploaded. `.default` instance by default.
-    ///   - requestModifier:         `RequestModifier` which will be applied to the `URLRequest` created from the
-    ///                              provided parameters. `nil` by default.
-    ///
-    /// - Returns:                   The created `UploadRequest`.
-    open func upload(multipartFormData: @escaping (MultipartFormData) -> Void,
-                     to url: URLConvertible,
-                     usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold,
-                     method: HTTPMethod = .post,
-                     headers: HTTPHeaders? = nil,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default,
-                     requestModifier: RequestModifier? = nil) -> UploadRequest {
-        let convertible = ParameterlessRequestConvertible(url: url,
-                                                          method: method,
-                                                          headers: headers,
-                                                          requestModifier: requestModifier)
-
-        let formData = MultipartFormData(fileManager: fileManager)
-        multipartFormData(formData)
-
-        return upload(multipartFormData: formData,
-                      with: convertible,
-                      usingThreshold: encodingMemoryThreshold,
-                      interceptor: interceptor,
-                      fileManager: fileManager)
-    }
-
-    /// Creates an `UploadRequest` using a `MultipartFormData` building closure, the provided `URLRequestConvertible`
-    /// value, and a `RequestInterceptor`.
-    ///
-    /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative
-    /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most
-    /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to
-    /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory
-    /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be
-    /// used for larger payloads such as video content.
-    ///
-    /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory
-    /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`,
-    /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk
-    /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding
-    /// technique was used.
-    ///
-    /// - Parameters:
-    ///   - multipartFormData:       `MultipartFormData` building closure.
-    ///   - request:                 `URLRequestConvertible` value to be used to create the `URLRequest`.
-    ///   - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or
-    ///                              onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by
-    ///                              default.
-    ///   - interceptor:             `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - fileManager:             `FileManager` to be used if the form data exceeds the memory threshold and is
-    ///                              written to disk before being uploaded. `.default` instance by default.
-    ///
-    /// - Returns:                   The created `UploadRequest`.
-    open func upload(multipartFormData: @escaping (MultipartFormData) -> Void,
-                     with request: URLRequestConvertible,
-                     usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default) -> UploadRequest {
-        let formData = MultipartFormData(fileManager: fileManager)
-        multipartFormData(formData)
-
-        return upload(multipartFormData: formData,
-                      with: request,
-                      usingThreshold: encodingMemoryThreshold,
-                      interceptor: interceptor,
-                      fileManager: fileManager)
-    }
-
-    /// Creates an `UploadRequest` for the prebuilt `MultipartFormData` value using the provided `URLRequest` components
-    /// and `RequestInterceptor`.
-    ///
-    /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative
-    /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most
-    /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to
-    /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory
-    /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be
-    /// used for larger payloads such as video content.
-    ///
-    /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory
-    /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`,
-    /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk
-    /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding
-    /// technique was used.
-    ///
-    /// - Parameters:
-    ///   - multipartFormData:       `MultipartFormData` instance to upload.
-    ///   - url:                     `URLConvertible` value to be used as the `URLRequest`'s `URL`.
-    ///   - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or
-    ///                              onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by
-    ///                              default.
-    ///   - method:                  `HTTPMethod` for the `URLRequest`. `.post` by default.
-    ///   - headers:                 `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default.
-    ///   - interceptor:             `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - fileManager:             `FileManager` to be used if the form data exceeds the memory threshold and is
-    ///                              written to disk before being uploaded. `.default` instance by default.
-    ///   - requestModifier:         `RequestModifier` which will be applied to the `URLRequest` created from the
-    ///                              provided parameters. `nil` by default.
-    ///
-    /// - Returns:                   The created `UploadRequest`.
-    open func upload(multipartFormData: MultipartFormData,
-                     to url: URLConvertible,
-                     usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold,
-                     method: HTTPMethod = .post,
-                     headers: HTTPHeaders? = nil,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default,
-                     requestModifier: RequestModifier? = nil) -> UploadRequest {
-        let convertible = ParameterlessRequestConvertible(url: url,
-                                                          method: method,
-                                                          headers: headers,
-                                                          requestModifier: requestModifier)
-
-        let multipartUpload = MultipartUpload(encodingMemoryThreshold: encodingMemoryThreshold,
-                                              request: convertible,
-                                              multipartFormData: multipartFormData)
-
-        return upload(multipartUpload, interceptor: interceptor, fileManager: fileManager)
-    }
-
-    /// Creates an `UploadRequest` for the prebuilt `MultipartFormData` value using the providing `URLRequestConvertible`
-    /// value and `RequestInterceptor`.
-    ///
-    /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative
-    /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most
-    /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to
-    /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory
-    /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be
-    /// used for larger payloads such as video content.
-    ///
-    /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory
-    /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`,
-    /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk
-    /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding
-    /// technique was used.
-    ///
-    /// - Parameters:
-    ///   - multipartFormData:       `MultipartFormData` instance to upload.
-    ///   - request:                 `URLRequestConvertible` value to be used to create the `URLRequest`.
-    ///   - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or
-    ///                              onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by
-    ///                              default.
-    ///   - interceptor:             `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default.
-    ///   - fileManager:             `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by
-    ///                              default.
-    ///
-    /// - Returns:                   The created `UploadRequest`.
-    open func upload(multipartFormData: MultipartFormData,
-                     with request: URLRequestConvertible,
-                     usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold,
-                     interceptor: RequestInterceptor? = nil,
-                     fileManager: FileManager = .default) -> UploadRequest {
-        let multipartUpload = MultipartUpload(encodingMemoryThreshold: encodingMemoryThreshold,
-                                              request: request,
-                                              multipartFormData: multipartFormData)
-
-        return upload(multipartUpload, interceptor: interceptor, fileManager: fileManager)
-    }
-
-    // MARK: - Internal API
-
-    // MARK: Uploadable
-
-    func upload(_ uploadable: UploadRequest.Uploadable,
-                with convertible: URLRequestConvertible,
-                interceptor: RequestInterceptor?,
-                fileManager: FileManager) -> UploadRequest {
-        let uploadable = Upload(request: convertible, uploadable: uploadable)
-
-        return upload(uploadable, interceptor: interceptor, fileManager: fileManager)
-    }
-
-    func upload(_ upload: UploadConvertible, interceptor: RequestInterceptor?, fileManager: FileManager) -> UploadRequest {
-        let request = UploadRequest(convertible: upload,
-                                    underlyingQueue: rootQueue,
-                                    serializationQueue: serializationQueue,
-                                    eventMonitor: eventMonitor,
-                                    interceptor: interceptor,
-                                    fileManager: fileManager,
-                                    delegate: self)
-
-        perform(request)
-
-        return request
-    }
-
-    // MARK: Perform
-
-    /// Starts performing the provided `Request`.
-    ///
-    /// - Parameter request: The `Request` to perform.
-    func perform(_ request: Request) {
-        rootQueue.async {
-            guard !request.isCancelled else { return }
-
-            self.activeRequests.insert(request)
-
-            self.requestQueue.async {
-                // Leaf types must come first, otherwise they will cast as their superclass.
-                switch request {
-                case let r as UploadRequest: self.performUploadRequest(r) // UploadRequest must come before DataRequest due to subtype relationship.
-                case let r as DataRequest: self.performDataRequest(r)
-                case let r as DownloadRequest: self.performDownloadRequest(r)
-                case let r as DataStreamRequest: self.performDataStreamRequest(r)
-                default: fatalError("Attempted to perform unsupported Request subclass: \(type(of: request))")
-                }
-            }
-        }
-    }
-
-    func performDataRequest(_ request: DataRequest) {
-        dispatchPrecondition(condition: .onQueue(requestQueue))
-
-        performSetupOperations(for: request, convertible: request.convertible)
-    }
-
-    func performDataStreamRequest(_ request: DataStreamRequest) {
-        dispatchPrecondition(condition: .onQueue(requestQueue))
-
-        performSetupOperations(for: request, convertible: request.convertible)
-    }
-
-    func performUploadRequest(_ request: UploadRequest) {
-        dispatchPrecondition(condition: .onQueue(requestQueue))
-
-        performSetupOperations(for: request, convertible: request.convertible) {
-            do {
-                let uploadable = try request.upload.createUploadable()
-                self.rootQueue.async { request.didCreateUploadable(uploadable) }
-                return true
-            } catch {
-                self.rootQueue.async { request.didFailToCreateUploadable(with: error.asAFError(or: .createUploadableFailed(error: error))) }
-                return false
-            }
-        }
-    }
-
-    func performDownloadRequest(_ request: DownloadRequest) {
-        dispatchPrecondition(condition: .onQueue(requestQueue))
-
-        switch request.downloadable {
-        case let .request(convertible):
-            performSetupOperations(for: request, convertible: convertible)
-        case let .resumeData(resumeData):
-            rootQueue.async { self.didReceiveResumeData(resumeData, for: request) }
-        }
-    }
-
-    func performSetupOperations(for request: Request,
-                                convertible: URLRequestConvertible,
-                                shouldCreateTask: @escaping () -> Bool = { true }) {
-        dispatchPrecondition(condition: .onQueue(requestQueue))
-
-        let initialRequest: URLRequest
-
-        do {
-            initialRequest = try convertible.asURLRequest()
-            try initialRequest.validate()
-        } catch {
-            rootQueue.async { request.didFailToCreateURLRequest(with: error.asAFError(or: .createURLRequestFailed(error: error))) }
-            return
-        }
-
-        rootQueue.async { request.didCreateInitialURLRequest(initialRequest) }
-
-        guard !request.isCancelled else { return }
-
-        guard let adapter = adapter(for: request) else {
-            guard shouldCreateTask() else { return }
-            rootQueue.async { self.didCreateURLRequest(initialRequest, for: request) }
-            return
-        }
-
-        let adapterState = RequestAdapterState(requestID: request.id, session: self)
-
-        adapter.adapt(initialRequest, using: adapterState) { result in
-            do {
-                let adaptedRequest = try result.get()
-                try adaptedRequest.validate()
-
-                self.rootQueue.async { request.didAdaptInitialRequest(initialRequest, to: adaptedRequest) }
-
-                guard shouldCreateTask() else { return }
-
-                self.rootQueue.async { self.didCreateURLRequest(adaptedRequest, for: request) }
-            } catch {
-                self.rootQueue.async { request.didFailToAdaptURLRequest(initialRequest, withError: .requestAdaptationFailed(error: error)) }
-            }
-        }
-    }
-
-    // MARK: - Task Handling
-
-    func didCreateURLRequest(_ urlRequest: URLRequest, for request: Request) {
-        dispatchPrecondition(condition: .onQueue(rootQueue))
-
-        request.didCreateURLRequest(urlRequest)
-
-        guard !request.isCancelled else { return }
-
-        let task = request.task(for: urlRequest, using: session)
-        requestTaskMap[request] = task
-        request.didCreateTask(task)
-
-        updateStatesForTask(task, request: request)
-    }
-
-    func didReceiveResumeData(_ data: Data, for request: DownloadRequest) {
-        dispatchPrecondition(condition: .onQueue(rootQueue))
-
-        guard !request.isCancelled else { return }
-
-        let task = request.task(forResumeData: data, using: session)
-        requestTaskMap[request] = task
-        request.didCreateTask(task)
-
-        updateStatesForTask(task, request: request)
-    }
-
-    func updateStatesForTask(_ task: URLSessionTask, request: Request) {
-        dispatchPrecondition(condition: .onQueue(rootQueue))
-
-        request.withState { state in
-            switch state {
-            case .initialized, .finished:
-                // Do nothing.
-                break
-            case .resumed:
-                task.resume()
-                rootQueue.async { request.didResumeTask(task) }
-            case .suspended:
-                task.suspend()
-                rootQueue.async { request.didSuspendTask(task) }
-            case .cancelled:
-                // Resume to ensure metrics are gathered.
-                task.resume()
-                task.cancel()
-                rootQueue.async { request.didCancelTask(task) }
-            }
-        }
-    }
-
-    // MARK: - Adapters and Retriers
-
-    func adapter(for request: Request) -> RequestAdapter? {
-        if let requestInterceptor = request.interceptor, let sessionInterceptor = interceptor {
-            return Interceptor(adapters: [requestInterceptor, sessionInterceptor])
-        } else {
-            return request.interceptor ?? interceptor
-        }
-    }
-
-    func retrier(for request: Request) -> RequestRetrier? {
-        if let requestInterceptor = request.interceptor, let sessionInterceptor = interceptor {
-            return Interceptor(retriers: [requestInterceptor, sessionInterceptor])
-        } else {
-            return request.interceptor ?? interceptor
-        }
-    }
-
-    // MARK: - Invalidation
-
-    func finishRequestsForDeinit() {
-        requestTaskMap.requests.forEach { request in
-            rootQueue.async {
-                request.finish(error: AFError.sessionDeinitialized)
-            }
-        }
-    }
-}
-
-// MARK: - RequestDelegate
-
-extension Session: RequestDelegate {
-    public var sessionConfiguration: URLSessionConfiguration {
-        session.configuration
-    }
-
-    public var startImmediately: Bool { startRequestsImmediately }
-
-    public func cleanup(after request: Request) {
-        activeRequests.remove(request)
-    }
-
-    public func retryResult(for request: Request, dueTo error: AFError, completion: @escaping (RetryResult) -> Void) {
-        guard let retrier = retrier(for: request) else {
-            rootQueue.async { completion(.doNotRetry) }
-            return
-        }
-
-        retrier.retry(request, for: self, dueTo: error) { retryResult in
-            self.rootQueue.async {
-                guard let retryResultError = retryResult.error else { completion(retryResult); return }
-
-                let retryError = AFError.requestRetryFailed(retryError: retryResultError, originalError: error)
-                completion(.doNotRetryWithError(retryError))
-            }
-        }
-    }
-
-    public func retryRequest(_ request: Request, withDelay timeDelay: TimeInterval?) {
-        rootQueue.async {
-            let retry: () -> Void = {
-                guard !request.isCancelled else { return }
-
-                request.prepareForRetry()
-                self.perform(request)
-            }
-
-            if let retryDelay = timeDelay {
-                self.rootQueue.after(retryDelay) { retry() }
-            } else {
-                retry()
-            }
-        }
-    }
-}
-
-// MARK: - SessionStateProvider
-
-extension Session: SessionStateProvider {
-    func request(for task: URLSessionTask) -> Request? {
-        dispatchPrecondition(condition: .onQueue(rootQueue))
-
-        return requestTaskMap[task]
-    }
-
-    func didGatherMetricsForTask(_ task: URLSessionTask) {
-        dispatchPrecondition(condition: .onQueue(rootQueue))
-
-        let didDisassociate = requestTaskMap.disassociateIfNecessaryAfterGatheringMetricsForTask(task)
-
-        if didDisassociate {
-            waitingCompletions[task]?()
-            waitingCompletions[task] = nil
-        }
-    }
-
-    func didCompleteTask(_ task: URLSessionTask, completion: @escaping () -> Void) {
-        dispatchPrecondition(condition: .onQueue(rootQueue))
-
-        let didDisassociate = requestTaskMap.disassociateIfNecessaryAfterCompletingTask(task)
-
-        if didDisassociate {
-            completion()
-        } else {
-            waitingCompletions[task] = completion
-        }
-    }
-
-    func credential(for task: URLSessionTask, in protectionSpace: URLProtectionSpace) -> URLCredential? {
-        dispatchPrecondition(condition: .onQueue(rootQueue))
-
-        return requestTaskMap[task]?.credential ??
-            session.configuration.urlCredentialStorage?.defaultCredential(for: protectionSpace)
-    }
-
-    func cancelRequestsForSessionInvalidation(with error: Error?) {
-        dispatchPrecondition(condition: .onQueue(rootQueue))
-
-        requestTaskMap.requests.forEach { $0.finish(error: AFError.sessionInvalidated(error: error)) }
-    }
-}

+ 0 - 336
Pods/Alamofire/Source/SessionDelegate.swift

@@ -1,336 +0,0 @@
-//
-//  SessionDelegate.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// Class which implements the various `URLSessionDelegate` methods to connect various Alamofire features.
-open class SessionDelegate: NSObject {
-    private let fileManager: FileManager
-
-    weak var stateProvider: SessionStateProvider?
-    var eventMonitor: EventMonitor?
-
-    /// Creates an instance from the given `FileManager`.
-    ///
-    /// - Parameter fileManager: `FileManager` to use for underlying file management, such as moving downloaded files.
-    ///                          `.default` by default.
-    public init(fileManager: FileManager = .default) {
-        self.fileManager = fileManager
-    }
-
-    /// Internal method to find and cast requests while maintaining some integrity checking.
-    ///
-    /// - Parameters:
-    ///   - task: The `URLSessionTask` for which to find the associated `Request`.
-    ///   - type: The `Request` subclass type to cast any `Request` associate with `task`.
-    func request<R: Request>(for task: URLSessionTask, as type: R.Type) -> R? {
-        guard let provider = stateProvider else {
-            assertionFailure("StateProvider is nil.")
-            return nil
-        }
-
-        return provider.request(for: task) as? R
-    }
-}
-
-/// Type which provides various `Session` state values.
-protocol SessionStateProvider: AnyObject {
-    var serverTrustManager: ServerTrustManager? { get }
-    var redirectHandler: RedirectHandler? { get }
-    var cachedResponseHandler: CachedResponseHandler? { get }
-
-    func request(for task: URLSessionTask) -> Request?
-    func didGatherMetricsForTask(_ task: URLSessionTask)
-    func didCompleteTask(_ task: URLSessionTask, completion: @escaping () -> Void)
-    func credential(for task: URLSessionTask, in protectionSpace: URLProtectionSpace) -> URLCredential?
-    func cancelRequestsForSessionInvalidation(with error: Error?)
-}
-
-// MARK: URLSessionDelegate
-
-extension SessionDelegate: URLSessionDelegate {
-    open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) {
-        eventMonitor?.urlSession(session, didBecomeInvalidWithError: error)
-
-        stateProvider?.cancelRequestsForSessionInvalidation(with: error)
-    }
-}
-
-// MARK: URLSessionTaskDelegate
-
-extension SessionDelegate: URLSessionTaskDelegate {
-    /// Result of a `URLAuthenticationChallenge` evaluation.
-    typealias ChallengeEvaluation = (disposition: URLSession.AuthChallengeDisposition, credential: URLCredential?, error: AFError?)
-
-    open func urlSession(_ session: URLSession,
-                         task: URLSessionTask,
-                         didReceive challenge: URLAuthenticationChallenge,
-                         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
-        eventMonitor?.urlSession(session, task: task, didReceive: challenge)
-
-        let evaluation: ChallengeEvaluation
-        switch challenge.protectionSpace.authenticationMethod {
-        case NSURLAuthenticationMethodHTTPBasic, NSURLAuthenticationMethodHTTPDigest, NSURLAuthenticationMethodNTLM,
-             NSURLAuthenticationMethodNegotiate:
-            evaluation = attemptCredentialAuthentication(for: challenge, belongingTo: task)
-        #if !(os(Linux) || os(Windows))
-        case NSURLAuthenticationMethodServerTrust:
-            evaluation = attemptServerTrustAuthentication(with: challenge)
-        case NSURLAuthenticationMethodClientCertificate:
-            evaluation = attemptCredentialAuthentication(for: challenge, belongingTo: task)
-        #endif
-        default:
-            evaluation = (.performDefaultHandling, nil, nil)
-        }
-
-        if let error = evaluation.error {
-            stateProvider?.request(for: task)?.didFailTask(task, earlyWithError: error)
-        }
-
-        completionHandler(evaluation.disposition, evaluation.credential)
-    }
-
-    #if !(os(Linux) || os(Windows))
-    /// Evaluates the server trust `URLAuthenticationChallenge` received.
-    ///
-    /// - Parameter challenge: The `URLAuthenticationChallenge`.
-    ///
-    /// - Returns:             The `ChallengeEvaluation`.
-    func attemptServerTrustAuthentication(with challenge: URLAuthenticationChallenge) -> ChallengeEvaluation {
-        let host = challenge.protectionSpace.host
-
-        guard challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust,
-              let trust = challenge.protectionSpace.serverTrust
-        else {
-            return (.performDefaultHandling, nil, nil)
-        }
-
-        do {
-            guard let evaluator = try stateProvider?.serverTrustManager?.serverTrustEvaluator(forHost: host) else {
-                return (.performDefaultHandling, nil, nil)
-            }
-
-            try evaluator.evaluate(trust, forHost: host)
-
-            return (.useCredential, URLCredential(trust: trust), nil)
-        } catch {
-            return (.cancelAuthenticationChallenge, nil, error.asAFError(or: .serverTrustEvaluationFailed(reason: .customEvaluationFailed(error: error))))
-        }
-    }
-    #endif
-
-    /// Evaluates the credential-based authentication `URLAuthenticationChallenge` received for `task`.
-    ///
-    /// - Parameters:
-    ///   - challenge: The `URLAuthenticationChallenge`.
-    ///   - task:      The `URLSessionTask` which received the challenge.
-    ///
-    /// - Returns:     The `ChallengeEvaluation`.
-    func attemptCredentialAuthentication(for challenge: URLAuthenticationChallenge,
-                                         belongingTo task: URLSessionTask) -> ChallengeEvaluation {
-        guard challenge.previousFailureCount == 0 else {
-            return (.rejectProtectionSpace, nil, nil)
-        }
-
-        guard let credential = stateProvider?.credential(for: task, in: challenge.protectionSpace) else {
-            return (.performDefaultHandling, nil, nil)
-        }
-
-        return (.useCredential, credential, nil)
-    }
-
-    open func urlSession(_ session: URLSession,
-                         task: URLSessionTask,
-                         didSendBodyData bytesSent: Int64,
-                         totalBytesSent: Int64,
-                         totalBytesExpectedToSend: Int64) {
-        eventMonitor?.urlSession(session,
-                                 task: task,
-                                 didSendBodyData: bytesSent,
-                                 totalBytesSent: totalBytesSent,
-                                 totalBytesExpectedToSend: totalBytesExpectedToSend)
-
-        stateProvider?.request(for: task)?.updateUploadProgress(totalBytesSent: totalBytesSent,
-                                                                totalBytesExpectedToSend: totalBytesExpectedToSend)
-    }
-
-    open func urlSession(_ session: URLSession,
-                         task: URLSessionTask,
-                         needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) {
-        eventMonitor?.urlSession(session, taskNeedsNewBodyStream: task)
-
-        guard let request = request(for: task, as: UploadRequest.self) else {
-            assertionFailure("needNewBodyStream did not find UploadRequest.")
-            completionHandler(nil)
-            return
-        }
-
-        completionHandler(request.inputStream())
-    }
-
-    open func urlSession(_ session: URLSession,
-                         task: URLSessionTask,
-                         willPerformHTTPRedirection response: HTTPURLResponse,
-                         newRequest request: URLRequest,
-                         completionHandler: @escaping (URLRequest?) -> Void) {
-        eventMonitor?.urlSession(session, task: task, willPerformHTTPRedirection: response, newRequest: request)
-
-        if let redirectHandler = stateProvider?.request(for: task)?.redirectHandler ?? stateProvider?.redirectHandler {
-            redirectHandler.task(task, willBeRedirectedTo: request, for: response, completion: completionHandler)
-        } else {
-            completionHandler(request)
-        }
-    }
-
-    open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) {
-        eventMonitor?.urlSession(session, task: task, didFinishCollecting: metrics)
-
-        stateProvider?.request(for: task)?.didGatherMetrics(metrics)
-
-        stateProvider?.didGatherMetricsForTask(task)
-    }
-
-    open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
-        eventMonitor?.urlSession(session, task: task, didCompleteWithError: error)
-
-        let request = stateProvider?.request(for: task)
-
-        stateProvider?.didCompleteTask(task) {
-            request?.didCompleteTask(task, with: error.map { $0.asAFError(or: .sessionTaskFailed(error: $0)) })
-        }
-    }
-
-    @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *)
-    open func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) {
-        eventMonitor?.urlSession(session, taskIsWaitingForConnectivity: task)
-    }
-}
-
-// MARK: URLSessionDataDelegate
-
-extension SessionDelegate: URLSessionDataDelegate {
-    open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
-        eventMonitor?.urlSession(session, dataTask: dataTask, didReceive: data)
-
-        if let request = request(for: dataTask, as: DataRequest.self) {
-            request.didReceive(data: data)
-        } else if let request = request(for: dataTask, as: DataStreamRequest.self) {
-            request.didReceive(data: data)
-        } else {
-            assertionFailure("dataTask did not find DataRequest or DataStreamRequest in didReceive")
-            return
-        }
-    }
-
-    open func urlSession(_ session: URLSession,
-                         dataTask: URLSessionDataTask,
-                         willCacheResponse proposedResponse: CachedURLResponse,
-                         completionHandler: @escaping (CachedURLResponse?) -> Void) {
-        eventMonitor?.urlSession(session, dataTask: dataTask, willCacheResponse: proposedResponse)
-
-        if let handler = stateProvider?.request(for: dataTask)?.cachedResponseHandler ?? stateProvider?.cachedResponseHandler {
-            handler.dataTask(dataTask, willCacheResponse: proposedResponse, completion: completionHandler)
-        } else {
-            completionHandler(proposedResponse)
-        }
-    }
-}
-
-// MARK: URLSessionDownloadDelegate
-
-extension SessionDelegate: URLSessionDownloadDelegate {
-    open func urlSession(_ session: URLSession,
-                         downloadTask: URLSessionDownloadTask,
-                         didResumeAtOffset fileOffset: Int64,
-                         expectedTotalBytes: Int64) {
-        eventMonitor?.urlSession(session,
-                                 downloadTask: downloadTask,
-                                 didResumeAtOffset: fileOffset,
-                                 expectedTotalBytes: expectedTotalBytes)
-        guard let downloadRequest = request(for: downloadTask, as: DownloadRequest.self) else {
-            assertionFailure("downloadTask did not find DownloadRequest.")
-            return
-        }
-
-        downloadRequest.updateDownloadProgress(bytesWritten: fileOffset,
-                                               totalBytesExpectedToWrite: expectedTotalBytes)
-    }
-
-    open func urlSession(_ session: URLSession,
-                         downloadTask: URLSessionDownloadTask,
-                         didWriteData bytesWritten: Int64,
-                         totalBytesWritten: Int64,
-                         totalBytesExpectedToWrite: Int64) {
-        eventMonitor?.urlSession(session,
-                                 downloadTask: downloadTask,
-                                 didWriteData: bytesWritten,
-                                 totalBytesWritten: totalBytesWritten,
-                                 totalBytesExpectedToWrite: totalBytesExpectedToWrite)
-        guard let downloadRequest = request(for: downloadTask, as: DownloadRequest.self) else {
-            assertionFailure("downloadTask did not find DownloadRequest.")
-            return
-        }
-
-        downloadRequest.updateDownloadProgress(bytesWritten: bytesWritten,
-                                               totalBytesExpectedToWrite: totalBytesExpectedToWrite)
-    }
-
-    open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) {
-        eventMonitor?.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location)
-
-        guard let request = request(for: downloadTask, as: DownloadRequest.self) else {
-            assertionFailure("downloadTask did not find DownloadRequest.")
-            return
-        }
-
-        let (destination, options): (URL, DownloadRequest.Options)
-        if let response = request.response {
-            (destination, options) = request.destination(location, response)
-        } else {
-            // If there's no response this is likely a local file download, so generate the temporary URL directly.
-            (destination, options) = (DownloadRequest.defaultDestinationURL(location), [])
-        }
-
-        eventMonitor?.request(request, didCreateDestinationURL: destination)
-
-        do {
-            if options.contains(.removePreviousFile), fileManager.fileExists(atPath: destination.path) {
-                try fileManager.removeItem(at: destination)
-            }
-
-            if options.contains(.createIntermediateDirectories) {
-                let directory = destination.deletingLastPathComponent()
-                try fileManager.createDirectory(at: directory, withIntermediateDirectories: true)
-            }
-
-            try fileManager.moveItem(at: location, to: destination)
-
-            request.didFinishDownloading(using: downloadTask, with: .success(destination))
-        } catch {
-            request.didFinishDownloading(using: downloadTask, with: .failure(.downloadedFileMoveFailed(error: error,
-                                                                                                       source: location,
-                                                                                                       destination: destination)))
-        }
-    }
-}

+ 0 - 55
Pods/Alamofire/Source/StringEncoding+Alamofire.swift

@@ -1,55 +0,0 @@
-//
-//  StringEncoding+Alamofire.swift
-//
-//  Copyright (c) 2020 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-extension String.Encoding {
-    /// Creates an encoding from the IANA charset name.
-    ///
-    /// - Notes: These mappings match those [provided by CoreFoundation](https://opensource.apple.com/source/CF/CF-476.18/CFStringUtilities.c.auto.html)
-    ///
-    /// - Parameter name: IANA charset name.
-    init?(ianaCharsetName name: String) {
-        switch name.lowercased() {
-        case "utf-8":
-            self = .utf8
-        case "iso-8859-1":
-            self = .isoLatin1
-        case "unicode-1-1", "iso-10646-ucs-2", "utf-16":
-            self = .utf16
-        case "utf-16be":
-            self = .utf16BigEndian
-        case "utf-16le":
-            self = .utf16LittleEndian
-        case "utf-32":
-            self = .utf32
-        case "utf-32be":
-            self = .utf32BigEndian
-        case "utf-32le":
-            self = .utf32LittleEndian
-        default:
-            return nil
-        }
-    }
-}

+ 0 - 105
Pods/Alamofire/Source/URLConvertible+URLRequestConvertible.swift

@@ -1,105 +0,0 @@
-//
-//  URLConvertible+URLRequestConvertible.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-/// Types adopting the `URLConvertible` protocol can be used to construct `URL`s, which can then be used to construct
-/// `URLRequests`.
-public protocol URLConvertible {
-    /// Returns a `URL` from the conforming instance or throws.
-    ///
-    /// - Returns: The `URL` created from the instance.
-    /// - Throws:  Any error thrown while creating the `URL`.
-    func asURL() throws -> URL
-}
-
-extension String: URLConvertible {
-    /// Returns a `URL` if `self` can be used to initialize a `URL` instance, otherwise throws.
-    ///
-    /// - Returns: The `URL` initialized with `self`.
-    /// - Throws:  An `AFError.invalidURL` instance.
-    public func asURL() throws -> URL {
-        guard let url = URL(string: self) else { throw AFError.invalidURL(url: self) }
-
-        return url
-    }
-}
-
-extension URL: URLConvertible {
-    /// Returns `self`.
-    public func asURL() throws -> URL { self }
-}
-
-extension URLComponents: URLConvertible {
-    /// Returns a `URL` if the `self`'s `url` is not nil, otherwise throws.
-    ///
-    /// - Returns: The `URL` from the `url` property.
-    /// - Throws:  An `AFError.invalidURL` instance.
-    public func asURL() throws -> URL {
-        guard let url = url else { throw AFError.invalidURL(url: self) }
-
-        return url
-    }
-}
-
-// MARK: -
-
-/// Types adopting the `URLRequestConvertible` protocol can be used to safely construct `URLRequest`s.
-public protocol URLRequestConvertible {
-    /// Returns a `URLRequest` or throws if an `Error` was encountered.
-    ///
-    /// - Returns: A `URLRequest`.
-    /// - Throws:  Any error thrown while constructing the `URLRequest`.
-    func asURLRequest() throws -> URLRequest
-}
-
-extension URLRequestConvertible {
-    /// The `URLRequest` returned by discarding any `Error` encountered.
-    public var urlRequest: URLRequest? { try? asURLRequest() }
-}
-
-extension URLRequest: URLRequestConvertible {
-    /// Returns `self`.
-    public func asURLRequest() throws -> URLRequest { self }
-}
-
-// MARK: -
-
-extension URLRequest {
-    /// Creates an instance with the specified `url`, `method`, and `headers`.
-    ///
-    /// - Parameters:
-    ///   - url:     The `URLConvertible` value.
-    ///   - method:  The `HTTPMethod`.
-    ///   - headers: The `HTTPHeaders`, `nil` by default.
-    /// - Throws:    Any error thrown while converting the `URLConvertible` to a `URL`.
-    public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws {
-        let url = try url.asURL()
-
-        self.init(url: url)
-
-        httpMethod = method.rawValue
-        allHTTPHeaderFields = headers?.dictionary
-    }
-}

+ 0 - 982
Pods/Alamofire/Source/URLEncodedFormEncoder.swift

@@ -1,982 +0,0 @@
-//
-//  URLEncodedFormEncoder.swift
-//
-//  Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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 encodes instances into URL-encoded query strings.
-///
-/// There is no published specification for how to encode collection types. By default, the convention of appending
-/// `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for
-/// nested dictionary values (`foo[bar]=baz`) is used. Optionally, `ArrayEncoding` can be used to omit the
-/// square brackets appended to array keys.
-///
-/// `BoolEncoding` can be used to configure how `Bool` values are encoded. The default behavior is to encode
-/// `true` as 1 and `false` as 0.
-///
-/// `DateEncoding` can be used to configure how `Date` values are encoded. By default, the `.deferredToDate`
-/// strategy is used, which formats dates from their structure.
-///
-/// `SpaceEncoding` can be used to configure how spaces are encoded. Modern encodings use percent replacement (`%20`),
-/// while older encodings may expect spaces to be replaced with `+`.
-///
-/// This type is largely based on Vapor's [`url-encoded-form`](https://github.com/vapor/url-encoded-form) project.
-public final class URLEncodedFormEncoder {
-    /// Encoding to use for `Array` values.
-    public enum ArrayEncoding {
-        /// An empty set of square brackets ("[]") are appended to the key for every value. This is the default encoding.
-        case brackets
-        /// No brackets are appended to the key and the key is encoded as is.
-        case noBrackets
-        /// Brackets containing the item index are appended. This matches the jQuery and Node.js behavior.
-        case indexInBrackets
-
-        /// Encodes the key according to the encoding.
-        ///
-        /// - Parameters:
-        ///     - key:      The `key` to encode.
-        ///     - index:   When this enum instance is `.indexInBrackets`, the `index` to encode.
-        ///
-        /// - Returns:          The encoded key.
-        func encode(_ key: String, atIndex index: Int) -> String {
-            switch self {
-            case .brackets: return "\(key)[]"
-            case .noBrackets: return key
-            case .indexInBrackets: return "\(key)[\(index)]"
-            }
-        }
-    }
-
-    /// Encoding to use for `Bool` values.
-    public enum BoolEncoding {
-        /// Encodes `true` as `1`, `false` as `0`.
-        case numeric
-        /// Encodes `true` as "true", `false` as "false". This is the default encoding.
-        case literal
-
-        /// Encodes the given `Bool` as a `String`.
-        ///
-        /// - Parameter value: The `Bool` to encode.
-        ///
-        /// - Returns:         The encoded `String`.
-        func encode(_ value: Bool) -> String {
-            switch self {
-            case .numeric: return value ? "1" : "0"
-            case .literal: return value ? "true" : "false"
-            }
-        }
-    }
-
-    /// Encoding to use for `Data` values.
-    public enum DataEncoding {
-        /// Defers encoding to the `Data` type.
-        case deferredToData
-        /// Encodes `Data` as a Base64-encoded string. This is the default encoding.
-        case base64
-        /// Encode the `Data` as a custom value encoded by the given closure.
-        case custom((Data) throws -> String)
-
-        /// Encodes `Data` according to the encoding.
-        ///
-        /// - Parameter data: The `Data` to encode.
-        ///
-        /// - Returns:        The encoded `String`, or `nil` if the `Data` should be encoded according to its
-        ///                   `Encodable` implementation.
-        func encode(_ data: Data) throws -> String? {
-            switch self {
-            case .deferredToData: return nil
-            case .base64: return data.base64EncodedString()
-            case let .custom(encoding): return try encoding(data)
-            }
-        }
-    }
-
-    /// Encoding to use for `Date` values.
-    public enum DateEncoding {
-        /// ISO8601 and RFC3339 formatter.
-        private static let iso8601Formatter: ISO8601DateFormatter = {
-            let formatter = ISO8601DateFormatter()
-            formatter.formatOptions = .withInternetDateTime
-            return formatter
-        }()
-
-        /// Defers encoding to the `Date` type. This is the default encoding.
-        case deferredToDate
-        /// Encodes `Date`s as seconds since midnight UTC on January 1, 1970.
-        case secondsSince1970
-        /// Encodes `Date`s as milliseconds since midnight UTC on January 1, 1970.
-        case millisecondsSince1970
-        /// Encodes `Date`s according to the ISO8601 and RFC3339 standards.
-        case iso8601
-        /// Encodes `Date`s using the given `DateFormatter`.
-        case formatted(DateFormatter)
-        /// Encodes `Date`s using the given closure.
-        case custom((Date) throws -> String)
-
-        /// Encodes the date according to the encoding.
-        ///
-        /// - Parameter date: The `Date` to encode.
-        ///
-        /// - Returns:        The encoded `String`, or `nil` if the `Date` should be encoded according to its
-        ///                   `Encodable` implementation.
-        func encode(_ date: Date) throws -> String? {
-            switch self {
-            case .deferredToDate:
-                return nil
-            case .secondsSince1970:
-                return String(date.timeIntervalSince1970)
-            case .millisecondsSince1970:
-                return String(date.timeIntervalSince1970 * 1000.0)
-            case .iso8601:
-                return DateEncoding.iso8601Formatter.string(from: date)
-            case let .formatted(formatter):
-                return formatter.string(from: date)
-            case let .custom(closure):
-                return try closure(date)
-            }
-        }
-    }
-
-    /// Encoding to use for keys.
-    ///
-    /// This type is derived from [`JSONEncoder`'s `KeyEncodingStrategy`](https://github.com/apple/swift/blob/6aa313b8dd5f05135f7f878eccc1db6f9fbe34ff/stdlib/public/Darwin/Foundation/JSONEncoder.swift#L128)
-    /// and [`XMLEncoder`s `KeyEncodingStrategy`](https://github.com/MaxDesiatov/XMLCoder/blob/master/Sources/XMLCoder/Encoder/XMLEncoder.swift#L102).
-    public enum KeyEncoding {
-        /// Use the keys specified by each type. This is the default encoding.
-        case useDefaultKeys
-        /// Convert from "camelCaseKeys" to "snake_case_keys" before writing a key.
-        ///
-        /// Capital characters are determined by testing membership in
-        /// `CharacterSet.uppercaseLetters` and `CharacterSet.lowercaseLetters`
-        /// (Unicode General Categories Lu and Lt).
-        /// The conversion to lower case uses `Locale.system`, also known as
-        /// the ICU "root" locale. This means the result is consistent
-        /// regardless of the current user's locale and language preferences.
-        ///
-        /// Converting from camel case to snake case:
-        /// 1. Splits words at the boundary of lower-case to upper-case
-        /// 2. Inserts `_` between words
-        /// 3. Lowercases the entire string
-        /// 4. Preserves starting and ending `_`.
-        ///
-        /// For example, `oneTwoThree` becomes `one_two_three`. `_oneTwoThree_` becomes `_one_two_three_`.
-        ///
-        /// - Note: Using a key encoding strategy has a nominal performance cost, as each string key has to be converted.
-        case convertToSnakeCase
-        /// Same as convertToSnakeCase, but using `-` instead of `_`.
-        /// For example `oneTwoThree` becomes `one-two-three`.
-        case convertToKebabCase
-        /// Capitalize the first letter only.
-        /// For example `oneTwoThree` becomes  `OneTwoThree`.
-        case capitalized
-        /// Uppercase all letters.
-        /// For example `oneTwoThree` becomes  `ONETWOTHREE`.
-        case uppercased
-        /// Lowercase all letters.
-        /// For example `oneTwoThree` becomes  `onetwothree`.
-        case lowercased
-        /// A custom encoding using the provided closure.
-        case custom((String) -> String)
-
-        func encode(_ key: String) -> String {
-            switch self {
-            case .useDefaultKeys: return key
-            case .convertToSnakeCase: return convertToSnakeCase(key)
-            case .convertToKebabCase: return convertToKebabCase(key)
-            case .capitalized: return String(key.prefix(1).uppercased() + key.dropFirst())
-            case .uppercased: return key.uppercased()
-            case .lowercased: return key.lowercased()
-            case let .custom(encoding): return encoding(key)
-            }
-        }
-
-        private func convertToSnakeCase(_ key: String) -> String {
-            convert(key, usingSeparator: "_")
-        }
-
-        private func convertToKebabCase(_ key: String) -> String {
-            convert(key, usingSeparator: "-")
-        }
-
-        private func convert(_ key: String, usingSeparator separator: String) -> String {
-            guard !key.isEmpty else { return key }
-
-            var words: [Range<String.Index>] = []
-            // The general idea of this algorithm is to split words on
-            // transition from lower to upper case, then on transition of >1
-            // upper case characters to lowercase
-            //
-            // myProperty -> my_property
-            // myURLProperty -> my_url_property
-            //
-            // It is assumed, per Swift naming conventions, that the first character of the key is lowercase.
-            var wordStart = key.startIndex
-            var searchRange = key.index(after: wordStart)..<key.endIndex
-
-            // Find next uppercase character
-            while let upperCaseRange = key.rangeOfCharacter(from: CharacterSet.uppercaseLetters, options: [], range: searchRange) {
-                let untilUpperCase = wordStart..<upperCaseRange.lowerBound
-                words.append(untilUpperCase)
-
-                // Find next lowercase character
-                searchRange = upperCaseRange.lowerBound..<searchRange.upperBound
-                guard let lowerCaseRange = key.rangeOfCharacter(from: CharacterSet.lowercaseLetters, options: [], range: searchRange) else {
-                    // There are no more lower case letters. Just end here.
-                    wordStart = searchRange.lowerBound
-                    break
-                }
-
-                // Is the next lowercase letter more than 1 after the uppercase?
-                // If so, we encountered a group of uppercase letters that we
-                // should treat as its own word
-                let nextCharacterAfterCapital = key.index(after: upperCaseRange.lowerBound)
-                if lowerCaseRange.lowerBound == nextCharacterAfterCapital {
-                    // The next character after capital is a lower case character and therefore not a word boundary.
-                    // Continue searching for the next upper case for the boundary.
-                    wordStart = upperCaseRange.lowerBound
-                } else {
-                    // There was a range of >1 capital letters. Turn those into a word, stopping at the capital before the lower case character.
-                    let beforeLowerIndex = key.index(before: lowerCaseRange.lowerBound)
-                    words.append(upperCaseRange.lowerBound..<beforeLowerIndex)
-
-                    // Next word starts at the capital before the lowercase we just found
-                    wordStart = beforeLowerIndex
-                }
-                searchRange = lowerCaseRange.upperBound..<searchRange.upperBound
-            }
-            words.append(wordStart..<searchRange.upperBound)
-            let result = words.map { range in
-                key[range].lowercased()
-            }.joined(separator: separator)
-
-            return result
-        }
-    }
-
-    /// Encoding to use for spaces.
-    public enum SpaceEncoding {
-        /// Encodes spaces according to normal percent escaping rules (%20).
-        case percentEscaped
-        /// Encodes spaces as `+`,
-        case plusReplaced
-
-        /// Encodes the string according to the encoding.
-        ///
-        /// - Parameter string: The `String` to encode.
-        ///
-        /// - Returns:          The encoded `String`.
-        func encode(_ string: String) -> String {
-            switch self {
-            case .percentEscaped: return string.replacingOccurrences(of: " ", with: "%20")
-            case .plusReplaced: return string.replacingOccurrences(of: " ", with: "+")
-            }
-        }
-    }
-
-    /// `URLEncodedFormEncoder` error.
-    public enum Error: Swift.Error {
-        /// An invalid root object was created by the encoder. Only keyed values are valid.
-        case invalidRootObject(String)
-
-        var localizedDescription: String {
-            switch self {
-            case let .invalidRootObject(object):
-                return "URLEncodedFormEncoder requires keyed root object. Received \(object) instead."
-            }
-        }
-    }
-
-    /// Whether or not to sort the encoded key value pairs.
-    ///
-    /// - Note: This setting ensures a consistent ordering for all encodings of the same parameters. When set to `false`,
-    ///         encoded `Dictionary` values may have a different encoded order each time they're encoded due to
-    ///       ` Dictionary`'s random storage order, but `Encodable` types will maintain their encoded order.
-    public let alphabetizeKeyValuePairs: Bool
-    /// The `ArrayEncoding` to use.
-    public let arrayEncoding: ArrayEncoding
-    /// The `BoolEncoding` to use.
-    public let boolEncoding: BoolEncoding
-    /// THe `DataEncoding` to use.
-    public let dataEncoding: DataEncoding
-    /// The `DateEncoding` to use.
-    public let dateEncoding: DateEncoding
-    /// The `KeyEncoding` to use.
-    public let keyEncoding: KeyEncoding
-    /// The `SpaceEncoding` to use.
-    public let spaceEncoding: SpaceEncoding
-    /// The `CharacterSet` of allowed (non-escaped) characters.
-    public var allowedCharacters: CharacterSet
-
-    /// Creates an instance from the supplied parameters.
-    ///
-    /// - Parameters:
-    ///   - alphabetizeKeyValuePairs: Whether or not to sort the encoded key value pairs. `true` by default.
-    ///   - arrayEncoding:            The `ArrayEncoding` to use. `.brackets` by default.
-    ///   - boolEncoding:             The `BoolEncoding` to use. `.numeric` by default.
-    ///   - dataEncoding:             The `DataEncoding` to use. `.base64` by default.
-    ///   - dateEncoding:             The `DateEncoding` to use. `.deferredToDate` by default.
-    ///   - keyEncoding:              The `KeyEncoding` to use. `.useDefaultKeys` by default.
-    ///   - spaceEncoding:            The `SpaceEncoding` to use. `.percentEscaped` by default.
-    ///   - allowedCharacters:        The `CharacterSet` of allowed (non-escaped) characters. `.afURLQueryAllowed` by
-    ///                               default.
-    public init(alphabetizeKeyValuePairs: Bool = true,
-                arrayEncoding: ArrayEncoding = .brackets,
-                boolEncoding: BoolEncoding = .numeric,
-                dataEncoding: DataEncoding = .base64,
-                dateEncoding: DateEncoding = .deferredToDate,
-                keyEncoding: KeyEncoding = .useDefaultKeys,
-                spaceEncoding: SpaceEncoding = .percentEscaped,
-                allowedCharacters: CharacterSet = .afURLQueryAllowed) {
-        self.alphabetizeKeyValuePairs = alphabetizeKeyValuePairs
-        self.arrayEncoding = arrayEncoding
-        self.boolEncoding = boolEncoding
-        self.dataEncoding = dataEncoding
-        self.dateEncoding = dateEncoding
-        self.keyEncoding = keyEncoding
-        self.spaceEncoding = spaceEncoding
-        self.allowedCharacters = allowedCharacters
-    }
-
-    func encode(_ value: Encodable) throws -> URLEncodedFormComponent {
-        let context = URLEncodedFormContext(.object([]))
-        let encoder = _URLEncodedFormEncoder(context: context,
-                                             boolEncoding: boolEncoding,
-                                             dataEncoding: dataEncoding,
-                                             dateEncoding: dateEncoding)
-        try value.encode(to: encoder)
-
-        return context.component
-    }
-
-    /// Encodes the `value` as a URL form encoded `String`.
-    ///
-    /// - Parameter value: The `Encodable` value.`
-    ///
-    /// - Returns:         The encoded `String`.
-    /// - Throws:          An `Error` or `EncodingError` instance if encoding fails.
-    public func encode(_ value: Encodable) throws -> String {
-        let component: URLEncodedFormComponent = try encode(value)
-
-        guard case let .object(object) = component else {
-            throw Error.invalidRootObject("\(component)")
-        }
-
-        let serializer = URLEncodedFormSerializer(alphabetizeKeyValuePairs: alphabetizeKeyValuePairs,
-                                                  arrayEncoding: arrayEncoding,
-                                                  keyEncoding: keyEncoding,
-                                                  spaceEncoding: spaceEncoding,
-                                                  allowedCharacters: allowedCharacters)
-        let query = serializer.serialize(object)
-
-        return query
-    }
-
-    /// Encodes the value as `Data`. This is performed by first creating an encoded `String` and then returning the
-    /// `.utf8` data.
-    ///
-    /// - Parameter value: The `Encodable` value.
-    ///
-    /// - Returns:         The encoded `Data`.
-    ///
-    /// - Throws:          An `Error` or `EncodingError` instance if encoding fails.
-    public func encode(_ value: Encodable) throws -> Data {
-        let string: String = try encode(value)
-
-        return Data(string.utf8)
-    }
-}
-
-final class _URLEncodedFormEncoder {
-    var codingPath: [CodingKey]
-    // Returns an empty dictionary, as this encoder doesn't support userInfo.
-    var userInfo: [CodingUserInfoKey: Any] { [:] }
-
-    let context: URLEncodedFormContext
-
-    private let boolEncoding: URLEncodedFormEncoder.BoolEncoding
-    private let dataEncoding: URLEncodedFormEncoder.DataEncoding
-    private let dateEncoding: URLEncodedFormEncoder.DateEncoding
-
-    init(context: URLEncodedFormContext,
-         codingPath: [CodingKey] = [],
-         boolEncoding: URLEncodedFormEncoder.BoolEncoding,
-         dataEncoding: URLEncodedFormEncoder.DataEncoding,
-         dateEncoding: URLEncodedFormEncoder.DateEncoding) {
-        self.context = context
-        self.codingPath = codingPath
-        self.boolEncoding = boolEncoding
-        self.dataEncoding = dataEncoding
-        self.dateEncoding = dateEncoding
-    }
-}
-
-extension _URLEncodedFormEncoder: Encoder {
-    func container<Key>(keyedBy type: Key.Type) -> KeyedEncodingContainer<Key> where Key: CodingKey {
-        let container = _URLEncodedFormEncoder.KeyedContainer<Key>(context: context,
-                                                                   codingPath: codingPath,
-                                                                   boolEncoding: boolEncoding,
-                                                                   dataEncoding: dataEncoding,
-                                                                   dateEncoding: dateEncoding)
-        return KeyedEncodingContainer(container)
-    }
-
-    func unkeyedContainer() -> UnkeyedEncodingContainer {
-        _URLEncodedFormEncoder.UnkeyedContainer(context: context,
-                                                codingPath: codingPath,
-                                                boolEncoding: boolEncoding,
-                                                dataEncoding: dataEncoding,
-                                                dateEncoding: dateEncoding)
-    }
-
-    func singleValueContainer() -> SingleValueEncodingContainer {
-        _URLEncodedFormEncoder.SingleValueContainer(context: context,
-                                                    codingPath: codingPath,
-                                                    boolEncoding: boolEncoding,
-                                                    dataEncoding: dataEncoding,
-                                                    dateEncoding: dateEncoding)
-    }
-}
-
-final class URLEncodedFormContext {
-    var component: URLEncodedFormComponent
-
-    init(_ component: URLEncodedFormComponent) {
-        self.component = component
-    }
-}
-
-enum URLEncodedFormComponent {
-    typealias Object = [(key: String, value: URLEncodedFormComponent)]
-
-    case string(String)
-    case array([URLEncodedFormComponent])
-    case object(Object)
-
-    /// Converts self to an `[URLEncodedFormData]` or returns `nil` if not convertible.
-    var array: [URLEncodedFormComponent]? {
-        switch self {
-        case let .array(array): return array
-        default: return nil
-        }
-    }
-
-    /// Converts self to an `Object` or returns `nil` if not convertible.
-    var object: Object? {
-        switch self {
-        case let .object(object): return object
-        default: return nil
-        }
-    }
-
-    /// Sets self to the supplied value at a given path.
-    ///
-    ///     data.set(to: "hello", at: ["path", "to", "value"])
-    ///
-    /// - parameters:
-    ///     - value: Value of `Self` to set at the supplied path.
-    ///     - path: `CodingKey` path to update with the supplied value.
-    public mutating func set(to value: URLEncodedFormComponent, at path: [CodingKey]) {
-        set(&self, to: value, at: path)
-    }
-
-    /// Recursive backing method to `set(to:at:)`.
-    private func set(_ context: inout URLEncodedFormComponent, to value: URLEncodedFormComponent, at path: [CodingKey]) {
-        guard !path.isEmpty else {
-            context = value
-            return
-        }
-
-        let end = path[0]
-        var child: URLEncodedFormComponent
-        switch path.count {
-        case 1:
-            child = value
-        case 2...:
-            if let index = end.intValue {
-                let array = context.array ?? []
-                if array.count > index {
-                    child = array[index]
-                } else {
-                    child = .array([])
-                }
-                set(&child, to: value, at: Array(path[1...]))
-            } else {
-                child = context.object?.first { $0.key == end.stringValue }?.value ?? .object(.init())
-                set(&child, to: value, at: Array(path[1...]))
-            }
-        default: fatalError("Unreachable")
-        }
-
-        if let index = end.intValue {
-            if var array = context.array {
-                if array.count > index {
-                    array[index] = child
-                } else {
-                    array.append(child)
-                }
-                context = .array(array)
-            } else {
-                context = .array([child])
-            }
-        } else {
-            if var object = context.object {
-                if let index = object.firstIndex(where: { $0.key == end.stringValue }) {
-                    object[index] = (key: end.stringValue, value: child)
-                } else {
-                    object.append((key: end.stringValue, value: child))
-                }
-                context = .object(object)
-            } else {
-                context = .object([(key: end.stringValue, value: child)])
-            }
-        }
-    }
-}
-
-struct AnyCodingKey: CodingKey, Hashable {
-    let stringValue: String
-    let intValue: Int?
-
-    init?(stringValue: String) {
-        self.stringValue = stringValue
-        intValue = nil
-    }
-
-    init?(intValue: Int) {
-        stringValue = "\(intValue)"
-        self.intValue = intValue
-    }
-
-    init<Key>(_ base: Key) where Key: CodingKey {
-        if let intValue = base.intValue {
-            self.init(intValue: intValue)!
-        } else {
-            self.init(stringValue: base.stringValue)!
-        }
-    }
-}
-
-extension _URLEncodedFormEncoder {
-    final class KeyedContainer<Key> where Key: CodingKey {
-        var codingPath: [CodingKey]
-
-        private let context: URLEncodedFormContext
-        private let boolEncoding: URLEncodedFormEncoder.BoolEncoding
-        private let dataEncoding: URLEncodedFormEncoder.DataEncoding
-        private let dateEncoding: URLEncodedFormEncoder.DateEncoding
-
-        init(context: URLEncodedFormContext,
-             codingPath: [CodingKey],
-             boolEncoding: URLEncodedFormEncoder.BoolEncoding,
-             dataEncoding: URLEncodedFormEncoder.DataEncoding,
-             dateEncoding: URLEncodedFormEncoder.DateEncoding) {
-            self.context = context
-            self.codingPath = codingPath
-            self.boolEncoding = boolEncoding
-            self.dataEncoding = dataEncoding
-            self.dateEncoding = dateEncoding
-        }
-
-        private func nestedCodingPath(for key: CodingKey) -> [CodingKey] {
-            codingPath + [key]
-        }
-    }
-}
-
-extension _URLEncodedFormEncoder.KeyedContainer: KeyedEncodingContainerProtocol {
-    func encodeNil(forKey key: Key) throws {
-        let context = EncodingError.Context(codingPath: codingPath,
-                                            debugDescription: "URLEncodedFormEncoder cannot encode nil values.")
-        throw EncodingError.invalidValue("\(key): nil", context)
-    }
-
-    func encode<T>(_ value: T, forKey key: Key) throws where T: Encodable {
-        var container = nestedSingleValueEncoder(for: key)
-        try container.encode(value)
-    }
-
-    func nestedSingleValueEncoder(for key: Key) -> SingleValueEncodingContainer {
-        let container = _URLEncodedFormEncoder.SingleValueContainer(context: context,
-                                                                    codingPath: nestedCodingPath(for: key),
-                                                                    boolEncoding: boolEncoding,
-                                                                    dataEncoding: dataEncoding,
-                                                                    dateEncoding: dateEncoding)
-
-        return container
-    }
-
-    func nestedUnkeyedContainer(forKey key: Key) -> UnkeyedEncodingContainer {
-        let container = _URLEncodedFormEncoder.UnkeyedContainer(context: context,
-                                                                codingPath: nestedCodingPath(for: key),
-                                                                boolEncoding: boolEncoding,
-                                                                dataEncoding: dataEncoding,
-                                                                dateEncoding: dateEncoding)
-
-        return container
-    }
-
-    func nestedContainer<NestedKey>(keyedBy keyType: NestedKey.Type, forKey key: Key) -> KeyedEncodingContainer<NestedKey> where NestedKey: CodingKey {
-        let container = _URLEncodedFormEncoder.KeyedContainer<NestedKey>(context: context,
-                                                                         codingPath: nestedCodingPath(for: key),
-                                                                         boolEncoding: boolEncoding,
-                                                                         dataEncoding: dataEncoding,
-                                                                         dateEncoding: dateEncoding)
-
-        return KeyedEncodingContainer(container)
-    }
-
-    func superEncoder() -> Encoder {
-        _URLEncodedFormEncoder(context: context,
-                               codingPath: codingPath,
-                               boolEncoding: boolEncoding,
-                               dataEncoding: dataEncoding,
-                               dateEncoding: dateEncoding)
-    }
-
-    func superEncoder(forKey key: Key) -> Encoder {
-        _URLEncodedFormEncoder(context: context,
-                               codingPath: nestedCodingPath(for: key),
-                               boolEncoding: boolEncoding,
-                               dataEncoding: dataEncoding,
-                               dateEncoding: dateEncoding)
-    }
-}
-
-extension _URLEncodedFormEncoder {
-    final class SingleValueContainer {
-        var codingPath: [CodingKey]
-
-        private var canEncodeNewValue = true
-
-        private let context: URLEncodedFormContext
-        private let boolEncoding: URLEncodedFormEncoder.BoolEncoding
-        private let dataEncoding: URLEncodedFormEncoder.DataEncoding
-        private let dateEncoding: URLEncodedFormEncoder.DateEncoding
-
-        init(context: URLEncodedFormContext,
-             codingPath: [CodingKey],
-             boolEncoding: URLEncodedFormEncoder.BoolEncoding,
-             dataEncoding: URLEncodedFormEncoder.DataEncoding,
-             dateEncoding: URLEncodedFormEncoder.DateEncoding) {
-            self.context = context
-            self.codingPath = codingPath
-            self.boolEncoding = boolEncoding
-            self.dataEncoding = dataEncoding
-            self.dateEncoding = dateEncoding
-        }
-
-        private func checkCanEncode(value: Any?) throws {
-            guard canEncodeNewValue else {
-                let context = EncodingError.Context(codingPath: codingPath,
-                                                    debugDescription: "Attempt to encode value through single value container when previously value already encoded.")
-                throw EncodingError.invalidValue(value as Any, context)
-            }
-        }
-    }
-}
-
-extension _URLEncodedFormEncoder.SingleValueContainer: SingleValueEncodingContainer {
-    func encodeNil() throws {
-        try checkCanEncode(value: nil)
-        defer { canEncodeNewValue = false }
-
-        let context = EncodingError.Context(codingPath: codingPath,
-                                            debugDescription: "URLEncodedFormEncoder cannot encode nil values.")
-        throw EncodingError.invalidValue("nil", context)
-    }
-
-    func encode(_ value: Bool) throws {
-        try encode(value, as: String(boolEncoding.encode(value)))
-    }
-
-    func encode(_ value: String) throws {
-        try encode(value, as: value)
-    }
-
-    func encode(_ value: Double) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: Float) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: Int) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: Int8) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: Int16) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: Int32) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: Int64) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: UInt) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: UInt8) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: UInt16) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: UInt32) throws {
-        try encode(value, as: String(value))
-    }
-
-    func encode(_ value: UInt64) throws {
-        try encode(value, as: String(value))
-    }
-
-    private func encode<T>(_ value: T, as string: String) throws where T: Encodable {
-        try checkCanEncode(value: value)
-        defer { canEncodeNewValue = false }
-
-        context.component.set(to: .string(string), at: codingPath)
-    }
-
-    func encode<T>(_ value: T) throws where T: Encodable {
-        switch value {
-        case let date as Date:
-            guard let string = try dateEncoding.encode(date) else {
-                try attemptToEncode(value)
-                return
-            }
-
-            try encode(value, as: string)
-        case let data as Data:
-            guard let string = try dataEncoding.encode(data) else {
-                try attemptToEncode(value)
-                return
-            }
-
-            try encode(value, as: string)
-        case let decimal as Decimal:
-            // Decimal's `Encodable` implementation returns an object, not a single value, so override it.
-            try encode(value, as: String(describing: decimal))
-        default:
-            try attemptToEncode(value)
-        }
-    }
-
-    private func attemptToEncode<T>(_ value: T) throws where T: Encodable {
-        try checkCanEncode(value: value)
-        defer { canEncodeNewValue = false }
-
-        let encoder = _URLEncodedFormEncoder(context: context,
-                                             codingPath: codingPath,
-                                             boolEncoding: boolEncoding,
-                                             dataEncoding: dataEncoding,
-                                             dateEncoding: dateEncoding)
-        try value.encode(to: encoder)
-    }
-}
-
-extension _URLEncodedFormEncoder {
-    final class UnkeyedContainer {
-        var codingPath: [CodingKey]
-
-        var count = 0
-        var nestedCodingPath: [CodingKey] {
-            codingPath + [AnyCodingKey(intValue: count)!]
-        }
-
-        private let context: URLEncodedFormContext
-        private let boolEncoding: URLEncodedFormEncoder.BoolEncoding
-        private let dataEncoding: URLEncodedFormEncoder.DataEncoding
-        private let dateEncoding: URLEncodedFormEncoder.DateEncoding
-
-        init(context: URLEncodedFormContext,
-             codingPath: [CodingKey],
-             boolEncoding: URLEncodedFormEncoder.BoolEncoding,
-             dataEncoding: URLEncodedFormEncoder.DataEncoding,
-             dateEncoding: URLEncodedFormEncoder.DateEncoding) {
-            self.context = context
-            self.codingPath = codingPath
-            self.boolEncoding = boolEncoding
-            self.dataEncoding = dataEncoding
-            self.dateEncoding = dateEncoding
-        }
-    }
-}
-
-extension _URLEncodedFormEncoder.UnkeyedContainer: UnkeyedEncodingContainer {
-    func encodeNil() throws {
-        let context = EncodingError.Context(codingPath: codingPath,
-                                            debugDescription: "URLEncodedFormEncoder cannot encode nil values.")
-        throw EncodingError.invalidValue("nil", context)
-    }
-
-    func encode<T>(_ value: T) throws where T: Encodable {
-        var container = nestedSingleValueContainer()
-        try container.encode(value)
-    }
-
-    func nestedSingleValueContainer() -> SingleValueEncodingContainer {
-        defer { count += 1 }
-
-        return _URLEncodedFormEncoder.SingleValueContainer(context: context,
-                                                           codingPath: nestedCodingPath,
-                                                           boolEncoding: boolEncoding,
-                                                           dataEncoding: dataEncoding,
-                                                           dateEncoding: dateEncoding)
-    }
-
-    func nestedContainer<NestedKey>(keyedBy keyType: NestedKey.Type) -> KeyedEncodingContainer<NestedKey> where NestedKey: CodingKey {
-        defer { count += 1 }
-        let container = _URLEncodedFormEncoder.KeyedContainer<NestedKey>(context: context,
-                                                                         codingPath: nestedCodingPath,
-                                                                         boolEncoding: boolEncoding,
-                                                                         dataEncoding: dataEncoding,
-                                                                         dateEncoding: dateEncoding)
-
-        return KeyedEncodingContainer(container)
-    }
-
-    func nestedUnkeyedContainer() -> UnkeyedEncodingContainer {
-        defer { count += 1 }
-
-        return _URLEncodedFormEncoder.UnkeyedContainer(context: context,
-                                                       codingPath: nestedCodingPath,
-                                                       boolEncoding: boolEncoding,
-                                                       dataEncoding: dataEncoding,
-                                                       dateEncoding: dateEncoding)
-    }
-
-    func superEncoder() -> Encoder {
-        defer { count += 1 }
-
-        return _URLEncodedFormEncoder(context: context,
-                                      codingPath: codingPath,
-                                      boolEncoding: boolEncoding,
-                                      dataEncoding: dataEncoding,
-                                      dateEncoding: dateEncoding)
-    }
-}
-
-final class URLEncodedFormSerializer {
-    private let alphabetizeKeyValuePairs: Bool
-    private let arrayEncoding: URLEncodedFormEncoder.ArrayEncoding
-    private let keyEncoding: URLEncodedFormEncoder.KeyEncoding
-    private let spaceEncoding: URLEncodedFormEncoder.SpaceEncoding
-    private let allowedCharacters: CharacterSet
-
-    init(alphabetizeKeyValuePairs: Bool,
-         arrayEncoding: URLEncodedFormEncoder.ArrayEncoding,
-         keyEncoding: URLEncodedFormEncoder.KeyEncoding,
-         spaceEncoding: URLEncodedFormEncoder.SpaceEncoding,
-         allowedCharacters: CharacterSet) {
-        self.alphabetizeKeyValuePairs = alphabetizeKeyValuePairs
-        self.arrayEncoding = arrayEncoding
-        self.keyEncoding = keyEncoding
-        self.spaceEncoding = spaceEncoding
-        self.allowedCharacters = allowedCharacters
-    }
-
-    func serialize(_ object: URLEncodedFormComponent.Object) -> String {
-        var output: [String] = []
-        for (key, component) in object {
-            let value = serialize(component, forKey: key)
-            output.append(value)
-        }
-        output = alphabetizeKeyValuePairs ? output.sorted() : output
-
-        return output.joinedWithAmpersands()
-    }
-
-    func serialize(_ component: URLEncodedFormComponent, forKey key: String) -> String {
-        switch component {
-        case let .string(string): return "\(escape(keyEncoding.encode(key)))=\(escape(string))"
-        case let .array(array): return serialize(array, forKey: key)
-        case let .object(object): return serialize(object, forKey: key)
-        }
-    }
-
-    func serialize(_ object: URLEncodedFormComponent.Object, forKey key: String) -> String {
-        var segments: [String] = object.map { subKey, value in
-            let keyPath = "[\(subKey)]"
-            return serialize(value, forKey: key + keyPath)
-        }
-        segments = alphabetizeKeyValuePairs ? segments.sorted() : segments
-
-        return segments.joinedWithAmpersands()
-    }
-
-    func serialize(_ array: [URLEncodedFormComponent], forKey key: String) -> String {
-        var segments: [String] = array.enumerated().map { index, component in
-            let keyPath = arrayEncoding.encode(key, atIndex: index)
-            return serialize(component, forKey: keyPath)
-        }
-        segments = alphabetizeKeyValuePairs ? segments.sorted() : segments
-
-        return segments.joinedWithAmpersands()
-    }
-
-    func escape(_ query: String) -> String {
-        var allowedCharactersWithSpace = allowedCharacters
-        allowedCharactersWithSpace.insert(charactersIn: " ")
-        let escapedQuery = query.addingPercentEncoding(withAllowedCharacters: allowedCharactersWithSpace) ?? query
-        let spaceEncodedQuery = spaceEncoding.encode(escapedQuery)
-
-        return spaceEncodedQuery
-    }
-}
-
-extension Array where Element == String {
-    func joinedWithAmpersands() -> String {
-        joined(separator: "&")
-    }
-}
-
-extension CharacterSet {
-    /// Creates a CharacterSet from RFC 3986 allowed characters.
-    ///
-    /// RFC 3986 states that the following characters are "reserved" characters.
-    ///
-    /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/"
-    /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "="
-    ///
-    /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow
-    /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/"
-    /// should be percent-escaped in the query string.
-    public static let afURLQueryAllowed: CharacterSet = {
-        let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4
-        let subDelimitersToEncode = "!$&'()*+,;="
-        let encodableDelimiters = CharacterSet(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)")
-
-        return CharacterSet.urlQueryAllowed.subtracting(encodableDelimiters)
-    }()
-}

+ 0 - 39
Pods/Alamofire/Source/URLRequest+Alamofire.swift

@@ -1,39 +0,0 @@
-//
-//  URLRequest+Alamofire.swift
-//
-//  Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-extension URLRequest {
-    /// Returns the `httpMethod` as Alamofire's `HTTPMethod` type.
-    public var method: HTTPMethod? {
-        get { httpMethod.flatMap(HTTPMethod.init) }
-        set { httpMethod = newValue?.rawValue }
-    }
-
-    public func validate() throws {
-        if method == .get, let bodyData = httpBody {
-            throw AFError.urlRequestValidationFailed(reason: .bodyDataInGETRequest(bodyData))
-        }
-    }
-}

+ 0 - 46
Pods/Alamofire/Source/URLSessionConfiguration+Alamofire.swift

@@ -1,46 +0,0 @@
-//
-//  URLSessionConfiguration+Alamofire.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-extension URLSessionConfiguration: AlamofireExtended {}
-extension AlamofireExtension where ExtendedType: URLSessionConfiguration {
-    /// Alamofire's default configuration. Same as `URLSessionConfiguration.default` but adds Alamofire default
-    /// `Accept-Language`, `Accept-Encoding`, and `User-Agent` headers.
-    public static var `default`: URLSessionConfiguration {
-        let configuration = URLSessionConfiguration.default
-        configuration.headers = .default
-
-        return configuration
-    }
-
-    /// `.ephemeral` configuration with Alamofire's default `Accept-Language`, `Accept-Encoding`, and `User-Agent`
-    /// headers.
-    public static var ephemeral: URLSessionConfiguration {
-        let configuration = URLSessionConfiguration.ephemeral
-        configuration.headers = .default
-
-        return configuration
-    }
-}

+ 0 - 302
Pods/Alamofire/Source/Validation.swift

@@ -1,302 +0,0 @@
-//
-//  Validation.swift
-//
-//  Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
-//
-//  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
-
-extension Request {
-    // MARK: Helper Types
-
-    fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason
-
-    /// Used to represent whether a validation succeeded or failed.
-    public typealias ValidationResult = Result<Void, Error>
-
-    fileprivate struct MIMEType {
-        let type: String
-        let subtype: String
-
-        var isWildcard: Bool { type == "*" && subtype == "*" }
-
-        init?(_ string: String) {
-            let components: [String] = {
-                let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines)
-                let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)]
-
-                return split.components(separatedBy: "/")
-            }()
-
-            if let type = components.first, let subtype = components.last {
-                self.type = type
-                self.subtype = subtype
-            } else {
-                return nil
-            }
-        }
-
-        func matches(_ mime: MIMEType) -> Bool {
-            switch (type, subtype) {
-            case (mime.type, mime.subtype), (mime.type, "*"), ("*", mime.subtype), ("*", "*"):
-                return true
-            default:
-                return false
-            }
-        }
-    }
-
-    // MARK: Properties
-
-    fileprivate var acceptableStatusCodes: Range<Int> { 200..<300 }
-
-    fileprivate var acceptableContentTypes: [String] {
-        if let accept = request?.value(forHTTPHeaderField: "Accept") {
-            return accept.components(separatedBy: ",")
-        }
-
-        return ["*/*"]
-    }
-
-    // MARK: Status Code
-
-    fileprivate func validate<S: Sequence>(statusCode acceptableStatusCodes: S,
-                                           response: HTTPURLResponse)
-        -> ValidationResult
-        where S.Iterator.Element == Int {
-        if acceptableStatusCodes.contains(response.statusCode) {
-            return .success(())
-        } else {
-            let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode)
-            return .failure(AFError.responseValidationFailed(reason: reason))
-        }
-    }
-
-    // MARK: Content Type
-
-    fileprivate func validate<S: Sequence>(contentType acceptableContentTypes: S,
-                                           response: HTTPURLResponse,
-                                           data: Data?)
-        -> ValidationResult
-        where S.Iterator.Element == String {
-        guard let data = data, !data.isEmpty else { return .success(()) }
-
-        return validate(contentType: acceptableContentTypes, response: response)
-    }
-
-    fileprivate func validate<S: Sequence>(contentType acceptableContentTypes: S,
-                                           response: HTTPURLResponse)
-        -> ValidationResult
-        where S.Iterator.Element == String {
-        guard
-            let responseContentType = response.mimeType,
-            let responseMIMEType = MIMEType(responseContentType)
-        else {
-            for contentType in acceptableContentTypes {
-                if let mimeType = MIMEType(contentType), mimeType.isWildcard {
-                    return .success(())
-                }
-            }
-
-            let error: AFError = {
-                let reason: ErrorReason = .missingContentType(acceptableContentTypes: acceptableContentTypes.sorted())
-                return AFError.responseValidationFailed(reason: reason)
-            }()
-
-            return .failure(error)
-        }
-
-        for contentType in acceptableContentTypes {
-            if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) {
-                return .success(())
-            }
-        }
-
-        let error: AFError = {
-            let reason: ErrorReason = .unacceptableContentType(acceptableContentTypes: acceptableContentTypes.sorted(),
-                                                               responseContentType: responseContentType)
-
-            return AFError.responseValidationFailed(reason: reason)
-        }()
-
-        return .failure(error)
-    }
-}
-
-// MARK: -
-
-extension DataRequest {
-    /// A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the
-    /// request was valid.
-    public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult
-
-    /// Validates that the response has a status code in the specified sequence.
-    ///
-    /// If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - Parameter acceptableStatusCodes: `Sequence` of acceptable response status codes.
-    ///
-    /// - Returns:                         The instance.
-    @discardableResult
-    public func validate<S: Sequence>(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int {
-        validate { [unowned self] _, response, _ in
-            self.validate(statusCode: acceptableStatusCodes, response: response)
-        }
-    }
-
-    /// Validates that the response has a content type in the specified sequence.
-    ///
-    /// If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes.
-    ///
-    /// - returns: The request.
-    @discardableResult
-    public func validate<S: Sequence>(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String {
-        validate { [unowned self] _, response, data in
-            self.validate(contentType: acceptableContentTypes(), response: response, data: data)
-        }
-    }
-
-    /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content
-    /// type matches any specified in the Accept HTTP header field.
-    ///
-    /// If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - returns: The request.
-    @discardableResult
-    public func validate() -> Self {
-        let contentTypes: () -> [String] = { [unowned self] in
-            self.acceptableContentTypes
-        }
-        return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes())
-    }
-}
-
-extension DataStreamRequest {
-    /// A closure used to validate a request that takes a `URLRequest` and `HTTPURLResponse` and returns whether the
-    /// request was valid.
-    public typealias Validation = (_ request: URLRequest?, _ response: HTTPURLResponse) -> ValidationResult
-
-    /// Validates that the response has a status code in the specified sequence.
-    ///
-    /// If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - Parameter acceptableStatusCodes: `Sequence` of acceptable response status codes.
-    ///
-    /// - Returns:                         The instance.
-    @discardableResult
-    public func validate<S: Sequence>(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int {
-        validate { [unowned self] _, response in
-            self.validate(statusCode: acceptableStatusCodes, response: response)
-        }
-    }
-
-    /// Validates that the response has a content type in the specified sequence.
-    ///
-    /// If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes.
-    ///
-    /// - returns: The request.
-    @discardableResult
-    public func validate<S: Sequence>(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String {
-        validate { [unowned self] _, response in
-            self.validate(contentType: acceptableContentTypes(), response: response)
-        }
-    }
-
-    /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content
-    /// type matches any specified in the Accept HTTP header field.
-    ///
-    /// If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - Returns: The instance.
-    @discardableResult
-    public func validate() -> Self {
-        let contentTypes: () -> [String] = { [unowned self] in
-            self.acceptableContentTypes
-        }
-        return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes())
-    }
-}
-
-// MARK: -
-
-extension DownloadRequest {
-    /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a
-    /// destination URL, and returns whether the request was valid.
-    public typealias Validation = (_ request: URLRequest?,
-                                   _ response: HTTPURLResponse,
-                                   _ fileURL: URL?)
-        -> ValidationResult
-
-    /// Validates that the response has a status code in the specified sequence.
-    ///
-    /// If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - Parameter acceptableStatusCodes: `Sequence` of acceptable response status codes.
-    ///
-    /// - Returns:                         The instance.
-    @discardableResult
-    public func validate<S: Sequence>(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int {
-        validate { [unowned self] _, response, _ in
-            self.validate(statusCode: acceptableStatusCodes, response: response)
-        }
-    }
-
-    /// Validates that the response has a content type in the specified sequence.
-    ///
-    /// If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes.
-    ///
-    /// - returns: The request.
-    @discardableResult
-    public func validate<S: Sequence>(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String {
-        validate { [unowned self] _, response, fileURL in
-            guard let validFileURL = fileURL else {
-                return .failure(AFError.responseValidationFailed(reason: .dataFileNil))
-            }
-
-            do {
-                let data = try Data(contentsOf: validFileURL)
-                return self.validate(contentType: acceptableContentTypes(), response: response, data: data)
-            } catch {
-                return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL)))
-            }
-        }
-    }
-
-    /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content
-    /// type matches any specified in the Accept HTTP header field.
-    ///
-    /// If validation fails, subsequent calls to response handlers will have an associated error.
-    ///
-    /// - returns: The request.
-    @discardableResult
-    public func validate() -> Self {
-        let contentTypes = { [unowned self] in
-            self.acceptableContentTypes
-        }
-        return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes())
-    }
-}

+ 1 - 21
Pods/Manifest.lock

@@ -1,60 +1,40 @@
 PODS:
-  - Alamofire (5.6.4)
   - IQKeyboardManagerSwift (6.5.12)
   - Kingfisher (7.10.0)
-  - Masonry (1.1.0)
   - MJRefresh (3.7.5)
   - ObjectMapper (4.2.0)
   - SnapKit (5.7.1)
   - Toast-Swift (5.1.1)
   - TYCyclePagerView (1.2.0)
-  - TZImagePickerController (3.8.8):
-    - TZImagePickerController/Basic (= 3.8.8)
-    - TZImagePickerController/Location (= 3.8.8)
-  - TZImagePickerController/Basic (3.8.8)
-  - TZImagePickerController/Location (3.8.8)
-  - WARangeSlider (1.2.0)
 
 DEPENDENCIES:
-  - Alamofire (= 5.6.4)
   - IQKeyboardManagerSwift (= 6.5.12)
   - Kingfisher (= 7.10.0)
-  - Masonry
   - MJRefresh (= 3.7.5)
   - ObjectMapper (= 4.2)
   - SnapKit
   - Toast-Swift
   - TYCyclePagerView
-  - TZImagePickerController
-  - WARangeSlider
 
 SPEC REPOS:
   trunk:
-    - Alamofire
     - IQKeyboardManagerSwift
     - Kingfisher
-    - Masonry
     - MJRefresh
     - ObjectMapper
     - SnapKit
     - Toast-Swift
     - TYCyclePagerView
-    - TZImagePickerController
-    - WARangeSlider
 
 SPEC CHECKSUMS:
-  Alamofire: 4e95d97098eacb88856099c4fc79b526a299e48c
   IQKeyboardManagerSwift: 371b08cb39664fb56030f5345c815a4ffc74bbc0
   Kingfisher: a18f05d3b6d37d8650ee4a3e61d57a28fc6207f6
-  Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   MJRefresh: fdf5e979eb406a0341468932d1dfc8b7f9fce961
   ObjectMapper: 1eb41f610210777375fa806bf161dc39fb832b81
   SnapKit: d612e99e678a2d3b95bf60b0705ed0a35c03484a
   Toast-Swift: 7a03a532afe3a560d4044bc7c237e2864d295173
   TYCyclePagerView: 2b051dade0615c70784aa34f40c646feeddb7344
-  TZImagePickerController: d084a7b97c82d387e7669dd86dc9a9057500aacf
-  WARangeSlider: 03f195d4dc5419e6b0d9043cc94fdf418dfe804d
 
-PODFILE CHECKSUM: 2b76774c2c825040601161b5ceaa0e459a7f8c05
+PODFILE CHECKSUM: d845390dcb5d2a1807fc43839de70d8677485883
 
 COCOAPODS: 1.16.2

+ 0 - 19
Pods/Masonry/LICENSE

@@ -1,19 +0,0 @@
-Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry
-
-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.

+ 0 - 26
Pods/Masonry/Masonry/MASCompositeConstraint.h

@@ -1,26 +0,0 @@
-//
-//  MASCompositeConstraint.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 21/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASConstraint.h"
-#import "MASUtilities.h"
-
-/**
- *	A group of MASConstraint objects
- */
-@interface MASCompositeConstraint : MASConstraint
-
-/**
- *	Creates a composite with a predefined array of children
- *
- *	@param	children	child MASConstraints
- *
- *	@return	a composite constraint
- */
-- (id)initWithChildren:(NSArray *)children;
-
-@end

+ 0 - 183
Pods/Masonry/Masonry/MASCompositeConstraint.m

@@ -1,183 +0,0 @@
-//
-//  MASCompositeConstraint.m
-//  Masonry
-//
-//  Created by Jonas Budelmann on 21/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASCompositeConstraint.h"
-#import "MASConstraint+Private.h"
-
-@interface MASCompositeConstraint () <MASConstraintDelegate>
-
-@property (nonatomic, strong) id mas_key;
-@property (nonatomic, strong) NSMutableArray *childConstraints;
-
-@end
-
-@implementation MASCompositeConstraint
-
-- (id)initWithChildren:(NSArray *)children {
-    self = [super init];
-    if (!self) return nil;
-
-    _childConstraints = [children mutableCopy];
-    for (MASConstraint *constraint in _childConstraints) {
-        constraint.delegate = self;
-    }
-
-    return self;
-}
-
-#pragma mark - MASConstraintDelegate
-
-- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint {
-    NSUInteger index = [self.childConstraints indexOfObject:constraint];
-    NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint);
-    [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint];
-}
-
-- (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
-    id<MASConstraintDelegate> strongDelegate = self.delegate;
-    MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute];
-    newConstraint.delegate = self;
-    [self.childConstraints addObject:newConstraint];
-    return newConstraint;
-}
-
-#pragma mark - NSLayoutConstraint multiplier proxies 
-
-- (MASConstraint * (^)(CGFloat))multipliedBy {
-    return ^id(CGFloat multiplier) {
-        for (MASConstraint *constraint in self.childConstraints) {
-            constraint.multipliedBy(multiplier);
-        }
-        return self;
-    };
-}
-
-- (MASConstraint * (^)(CGFloat))dividedBy {
-    return ^id(CGFloat divider) {
-        for (MASConstraint *constraint in self.childConstraints) {
-            constraint.dividedBy(divider);
-        }
-        return self;
-    };
-}
-
-#pragma mark - MASLayoutPriority proxy
-
-- (MASConstraint * (^)(MASLayoutPriority))priority {
-    return ^id(MASLayoutPriority priority) {
-        for (MASConstraint *constraint in self.childConstraints) {
-            constraint.priority(priority);
-        }
-        return self;
-    };
-}
-
-#pragma mark - NSLayoutRelation proxy
-
-- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation {
-    return ^id(id attr, NSLayoutRelation relation) {
-        for (MASConstraint *constraint in self.childConstraints.copy) {
-            constraint.equalToWithRelation(attr, relation);
-        }
-        return self;
-    };
-}
-
-#pragma mark - attribute chaining
-
-- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
-    [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute];
-    return self;
-}
-
-#pragma mark - Animator proxy
-
-#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
-
-- (MASConstraint *)animator {
-    for (MASConstraint *constraint in self.childConstraints) {
-        [constraint animator];
-    }
-    return self;
-}
-
-#endif
-
-#pragma mark - debug helpers
-
-- (MASConstraint * (^)(id))key {
-    return ^id(id key) {
-        self.mas_key = key;
-        int i = 0;
-        for (MASConstraint *constraint in self.childConstraints) {
-            constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]);
-        }
-        return self;
-    };
-}
-
-#pragma mark - NSLayoutConstraint constant setters
-
-- (void)setInsets:(MASEdgeInsets)insets {
-    for (MASConstraint *constraint in self.childConstraints) {
-        constraint.insets = insets;
-    }
-}
-
-- (void)setInset:(CGFloat)inset {
-    for (MASConstraint *constraint in self.childConstraints) {
-        constraint.inset = inset;
-    }
-}
-
-- (void)setOffset:(CGFloat)offset {
-    for (MASConstraint *constraint in self.childConstraints) {
-        constraint.offset = offset;
-    }
-}
-
-- (void)setSizeOffset:(CGSize)sizeOffset {
-    for (MASConstraint *constraint in self.childConstraints) {
-        constraint.sizeOffset = sizeOffset;
-    }
-}
-
-- (void)setCenterOffset:(CGPoint)centerOffset {
-    for (MASConstraint *constraint in self.childConstraints) {
-        constraint.centerOffset = centerOffset;
-    }
-}
-
-#pragma mark - MASConstraint
-
-- (void)activate {
-    for (MASConstraint *constraint in self.childConstraints) {
-        [constraint activate];
-    }
-}
-
-- (void)deactivate {
-    for (MASConstraint *constraint in self.childConstraints) {
-        [constraint deactivate];
-    }
-}
-
-- (void)install {
-    for (MASConstraint *constraint in self.childConstraints) {
-        constraint.updateExisting = self.updateExisting;
-        [constraint install];
-    }
-}
-
-- (void)uninstall {
-    for (MASConstraint *constraint in self.childConstraints) {
-        [constraint uninstall];
-    }
-}
-
-@end

+ 0 - 66
Pods/Masonry/Masonry/MASConstraint+Private.h

@@ -1,66 +0,0 @@
-//
-//  MASConstraint+Private.h
-//  Masonry
-//
-//  Created by Nick Tymchenko on 29/04/14.
-//  Copyright (c) 2014 cloudling. All rights reserved.
-//
-
-#import "MASConstraint.h"
-
-@protocol MASConstraintDelegate;
-
-
-@interface MASConstraint ()
-
-/**
- *  Whether or not to check for an existing constraint instead of adding constraint
- */
-@property (nonatomic, assign) BOOL updateExisting;
-
-/**
- *	Usually MASConstraintMaker but could be a parent MASConstraint
- */
-@property (nonatomic, weak) id<MASConstraintDelegate> delegate;
-
-/**
- *  Based on a provided value type, is equal to calling:
- *  NSNumber - setOffset:
- *  NSValue with CGPoint - setPointOffset:
- *  NSValue with CGSize - setSizeOffset:
- *  NSValue with MASEdgeInsets - setInsets:
- */
-- (void)setLayoutConstantWithValue:(NSValue *)value;
-
-@end
-
-
-@interface MASConstraint (Abstract)
-
-/**
- *	Sets the constraint relation to given NSLayoutRelation
- *  returns a block which accepts one of the following:
- *    MASViewAttribute, UIView, NSValue, NSArray
- *  see readme for more details.
- */
-- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation;
-
-/**
- *	Override to set a custom chaining behaviour
- */
-- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
-
-@end
-
-
-@protocol MASConstraintDelegate <NSObject>
-
-/**
- *	Notifies the delegate when the constraint needs to be replaced with another constraint. For example
- *  A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks
- */
-- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint;
-
-- (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute;
-
-@end

+ 0 - 272
Pods/Masonry/Masonry/MASConstraint.h

@@ -1,272 +0,0 @@
-//
-//  MASConstraint.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 22/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASUtilities.h"
-
-/**
- *	Enables Constraints to be created with chainable syntax
- *  Constraint can represent single NSLayoutConstraint (MASViewConstraint) 
- *  or a group of NSLayoutConstraints (MASComposisteConstraint)
- */
-@interface MASConstraint : NSObject
-
-// Chaining Support
-
-/**
- *	Modifies the NSLayoutConstraint constant,
- *  only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
- *  NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight
- */
-- (MASConstraint * (^)(MASEdgeInsets insets))insets;
-
-/**
- *	Modifies the NSLayoutConstraint constant,
- *  only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
- *  NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight
- */
-- (MASConstraint * (^)(CGFloat inset))inset;
-
-/**
- *	Modifies the NSLayoutConstraint constant,
- *  only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
- *  NSLayoutAttributeWidth, NSLayoutAttributeHeight
- */
-- (MASConstraint * (^)(CGSize offset))sizeOffset;
-
-/**
- *	Modifies the NSLayoutConstraint constant,
- *  only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
- *  NSLayoutAttributeCenterX, NSLayoutAttributeCenterY
- */
-- (MASConstraint * (^)(CGPoint offset))centerOffset;
-
-/**
- *	Modifies the NSLayoutConstraint constant
- */
-- (MASConstraint * (^)(CGFloat offset))offset;
-
-/**
- *  Modifies the NSLayoutConstraint constant based on a value type
- */
-- (MASConstraint * (^)(NSValue *value))valueOffset;
-
-/**
- *	Sets the NSLayoutConstraint multiplier property
- */
-- (MASConstraint * (^)(CGFloat multiplier))multipliedBy;
-
-/**
- *	Sets the NSLayoutConstraint multiplier to 1.0/dividedBy
- */
-- (MASConstraint * (^)(CGFloat divider))dividedBy;
-
-/**
- *	Sets the NSLayoutConstraint priority to a float or MASLayoutPriority
- */
-- (MASConstraint * (^)(MASLayoutPriority priority))priority;
-
-/**
- *	Sets the NSLayoutConstraint priority to MASLayoutPriorityLow
- */
-- (MASConstraint * (^)(void))priorityLow;
-
-/**
- *	Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium
- */
-- (MASConstraint * (^)(void))priorityMedium;
-
-/**
- *	Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh
- */
-- (MASConstraint * (^)(void))priorityHigh;
-
-/**
- *	Sets the constraint relation to NSLayoutRelationEqual
- *  returns a block which accepts one of the following:
- *    MASViewAttribute, UIView, NSValue, NSArray
- *  see readme for more details.
- */
-- (MASConstraint * (^)(id attr))equalTo;
-
-/**
- *	Sets the constraint relation to NSLayoutRelationGreaterThanOrEqual
- *  returns a block which accepts one of the following:
- *    MASViewAttribute, UIView, NSValue, NSArray
- *  see readme for more details.
- */
-- (MASConstraint * (^)(id attr))greaterThanOrEqualTo;
-
-/**
- *	Sets the constraint relation to NSLayoutRelationLessThanOrEqual
- *  returns a block which accepts one of the following:
- *    MASViewAttribute, UIView, NSValue, NSArray
- *  see readme for more details.
- */
-- (MASConstraint * (^)(id attr))lessThanOrEqualTo;
-
-/**
- *	Optional semantic property which has no effect but improves the readability of constraint
- */
-- (MASConstraint *)with;
-
-/**
- *	Optional semantic property which has no effect but improves the readability of constraint
- */
-- (MASConstraint *)and;
-
-/**
- *	Creates a new MASCompositeConstraint with the called attribute and reciever
- */
-- (MASConstraint *)left;
-- (MASConstraint *)top;
-- (MASConstraint *)right;
-- (MASConstraint *)bottom;
-- (MASConstraint *)leading;
-- (MASConstraint *)trailing;
-- (MASConstraint *)width;
-- (MASConstraint *)height;
-- (MASConstraint *)centerX;
-- (MASConstraint *)centerY;
-- (MASConstraint *)baseline;
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-
-- (MASConstraint *)firstBaseline;
-- (MASConstraint *)lastBaseline;
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-
-- (MASConstraint *)leftMargin;
-- (MASConstraint *)rightMargin;
-- (MASConstraint *)topMargin;
-- (MASConstraint *)bottomMargin;
-- (MASConstraint *)leadingMargin;
-- (MASConstraint *)trailingMargin;
-- (MASConstraint *)centerXWithinMargins;
-- (MASConstraint *)centerYWithinMargins;
-
-#endif
-
-
-/**
- *	Sets the constraint debug name
- */
-- (MASConstraint * (^)(id key))key;
-
-// NSLayoutConstraint constant Setters
-// for use outside of mas_updateConstraints/mas_makeConstraints blocks
-
-/**
- *	Modifies the NSLayoutConstraint constant,
- *  only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
- *  NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight
- */
-- (void)setInsets:(MASEdgeInsets)insets;
-
-/**
- *	Modifies the NSLayoutConstraint constant,
- *  only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
- *  NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight
- */
-- (void)setInset:(CGFloat)inset;
-
-/**
- *	Modifies the NSLayoutConstraint constant,
- *  only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
- *  NSLayoutAttributeWidth, NSLayoutAttributeHeight
- */
-- (void)setSizeOffset:(CGSize)sizeOffset;
-
-/**
- *	Modifies the NSLayoutConstraint constant,
- *  only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following
- *  NSLayoutAttributeCenterX, NSLayoutAttributeCenterY
- */
-- (void)setCenterOffset:(CGPoint)centerOffset;
-
-/**
- *	Modifies the NSLayoutConstraint constant
- */
-- (void)setOffset:(CGFloat)offset;
-
-
-// NSLayoutConstraint Installation support
-
-#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
-/**
- *  Whether or not to go through the animator proxy when modifying the constraint
- */
-@property (nonatomic, copy, readonly) MASConstraint *animator;
-#endif
-
-/**
- *  Activates an NSLayoutConstraint if it's supported by an OS. 
- *  Invokes install otherwise.
- */
-- (void)activate;
-
-/**
- *  Deactivates previously installed/activated NSLayoutConstraint.
- */
-- (void)deactivate;
-
-/**
- *	Creates a NSLayoutConstraint and adds it to the appropriate view.
- */
-- (void)install;
-
-/**
- *	Removes previously installed NSLayoutConstraint
- */
-- (void)uninstall;
-
-@end
-
-
-/**
- *  Convenience auto-boxing macros for MASConstraint methods.
- *
- *  Defining MAS_SHORTHAND_GLOBALS will turn on auto-boxing for default syntax.
- *  A potential drawback of this is that the unprefixed macros will appear in global scope.
- */
-#define mas_equalTo(...)                 equalTo(MASBoxValue((__VA_ARGS__)))
-#define mas_greaterThanOrEqualTo(...)    greaterThanOrEqualTo(MASBoxValue((__VA_ARGS__)))
-#define mas_lessThanOrEqualTo(...)       lessThanOrEqualTo(MASBoxValue((__VA_ARGS__)))
-
-#define mas_offset(...)                  valueOffset(MASBoxValue((__VA_ARGS__)))
-
-
-#ifdef MAS_SHORTHAND_GLOBALS
-
-#define equalTo(...)                     mas_equalTo(__VA_ARGS__)
-#define greaterThanOrEqualTo(...)        mas_greaterThanOrEqualTo(__VA_ARGS__)
-#define lessThanOrEqualTo(...)           mas_lessThanOrEqualTo(__VA_ARGS__)
-
-#define offset(...)                      mas_offset(__VA_ARGS__)
-
-#endif
-
-
-@interface MASConstraint (AutoboxingSupport)
-
-/**
- *  Aliases to corresponding relation methods (for shorthand macros)
- *  Also needed to aid autocompletion
- */
-- (MASConstraint * (^)(id attr))mas_equalTo;
-- (MASConstraint * (^)(id attr))mas_greaterThanOrEqualTo;
-- (MASConstraint * (^)(id attr))mas_lessThanOrEqualTo;
-
-/**
- *  A dummy method to aid autocompletion
- */
-- (MASConstraint * (^)(id offset))mas_offset;
-
-@end

+ 0 - 301
Pods/Masonry/Masonry/MASConstraint.m

@@ -1,301 +0,0 @@
-//
-//  MASConstraint.m
-//  Masonry
-//
-//  Created by Nick Tymchenko on 1/20/14.
-//
-
-#import "MASConstraint.h"
-#import "MASConstraint+Private.h"
-
-#define MASMethodNotImplemented() \
-    @throw [NSException exceptionWithName:NSInternalInconsistencyException \
-                                   reason:[NSString stringWithFormat:@"You must override %@ in a subclass.", NSStringFromSelector(_cmd)] \
-                                 userInfo:nil]
-
-@implementation MASConstraint
-
-#pragma mark - Init
-
-- (id)init {
-	NSAssert(![self isMemberOfClass:[MASConstraint class]], @"MASConstraint is an abstract class, you should not instantiate it directly.");
-	return [super init];
-}
-
-#pragma mark - NSLayoutRelation proxies
-
-- (MASConstraint * (^)(id))equalTo {
-    return ^id(id attribute) {
-        return self.equalToWithRelation(attribute, NSLayoutRelationEqual);
-    };
-}
-
-- (MASConstraint * (^)(id))mas_equalTo {
-    return ^id(id attribute) {
-        return self.equalToWithRelation(attribute, NSLayoutRelationEqual);
-    };
-}
-
-- (MASConstraint * (^)(id))greaterThanOrEqualTo {
-    return ^id(id attribute) {
-        return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual);
-    };
-}
-
-- (MASConstraint * (^)(id))mas_greaterThanOrEqualTo {
-    return ^id(id attribute) {
-        return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual);
-    };
-}
-
-- (MASConstraint * (^)(id))lessThanOrEqualTo {
-    return ^id(id attribute) {
-        return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual);
-    };
-}
-
-- (MASConstraint * (^)(id))mas_lessThanOrEqualTo {
-    return ^id(id attribute) {
-        return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual);
-    };
-}
-
-#pragma mark - MASLayoutPriority proxies
-
-- (MASConstraint * (^)(void))priorityLow {
-    return ^id{
-        self.priority(MASLayoutPriorityDefaultLow);
-        return self;
-    };
-}
-
-- (MASConstraint * (^)(void))priorityMedium {
-    return ^id{
-        self.priority(MASLayoutPriorityDefaultMedium);
-        return self;
-    };
-}
-
-- (MASConstraint * (^)(void))priorityHigh {
-    return ^id{
-        self.priority(MASLayoutPriorityDefaultHigh);
-        return self;
-    };
-}
-
-#pragma mark - NSLayoutConstraint constant proxies
-
-- (MASConstraint * (^)(MASEdgeInsets))insets {
-    return ^id(MASEdgeInsets insets){
-        self.insets = insets;
-        return self;
-    };
-}
-
-- (MASConstraint * (^)(CGFloat))inset {
-    return ^id(CGFloat inset){
-        self.inset = inset;
-        return self;
-    };
-}
-
-- (MASConstraint * (^)(CGSize))sizeOffset {
-    return ^id(CGSize offset) {
-        self.sizeOffset = offset;
-        return self;
-    };
-}
-
-- (MASConstraint * (^)(CGPoint))centerOffset {
-    return ^id(CGPoint offset) {
-        self.centerOffset = offset;
-        return self;
-    };
-}
-
-- (MASConstraint * (^)(CGFloat))offset {
-    return ^id(CGFloat offset){
-        self.offset = offset;
-        return self;
-    };
-}
-
-- (MASConstraint * (^)(NSValue *value))valueOffset {
-    return ^id(NSValue *offset) {
-        NSAssert([offset isKindOfClass:NSValue.class], @"expected an NSValue offset, got: %@", offset);
-        [self setLayoutConstantWithValue:offset];
-        return self;
-    };
-}
-
-- (MASConstraint * (^)(id offset))mas_offset {
-    // Will never be called due to macro
-    return nil;
-}
-
-#pragma mark - NSLayoutConstraint constant setter
-
-- (void)setLayoutConstantWithValue:(NSValue *)value {
-    if ([value isKindOfClass:NSNumber.class]) {
-        self.offset = [(NSNumber *)value doubleValue];
-    } else if (strcmp(value.objCType, @encode(CGPoint)) == 0) {
-        CGPoint point;
-        [value getValue:&point];
-        self.centerOffset = point;
-    } else if (strcmp(value.objCType, @encode(CGSize)) == 0) {
-        CGSize size;
-        [value getValue:&size];
-        self.sizeOffset = size;
-    } else if (strcmp(value.objCType, @encode(MASEdgeInsets)) == 0) {
-        MASEdgeInsets insets;
-        [value getValue:&insets];
-        self.insets = insets;
-    } else {
-        NSAssert(NO, @"attempting to set layout constant with unsupported value: %@", value);
-    }
-}
-
-#pragma mark - Semantic properties
-
-- (MASConstraint *)with {
-    return self;
-}
-
-- (MASConstraint *)and {
-    return self;
-}
-
-#pragma mark - Chaining
-
-- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute __unused)layoutAttribute {
-    MASMethodNotImplemented();
-}
-
-- (MASConstraint *)left {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft];
-}
-
-- (MASConstraint *)top {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop];
-}
-
-- (MASConstraint *)right {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight];
-}
-
-- (MASConstraint *)bottom {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom];
-}
-
-- (MASConstraint *)leading {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading];
-}
-
-- (MASConstraint *)trailing {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing];
-}
-
-- (MASConstraint *)width {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth];
-}
-
-- (MASConstraint *)height {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight];
-}
-
-- (MASConstraint *)centerX {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX];
-}
-
-- (MASConstraint *)centerY {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY];
-}
-
-- (MASConstraint *)baseline {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline];
-}
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-
-- (MASConstraint *)firstBaseline {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline];
-}
-- (MASConstraint *)lastBaseline {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline];
-}
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-
-- (MASConstraint *)leftMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin];
-}
-
-- (MASConstraint *)rightMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin];
-}
-
-- (MASConstraint *)topMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin];
-}
-
-- (MASConstraint *)bottomMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin];
-}
-
-- (MASConstraint *)leadingMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin];
-}
-
-- (MASConstraint *)trailingMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin];
-}
-
-- (MASConstraint *)centerXWithinMargins {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins];
-}
-
-- (MASConstraint *)centerYWithinMargins {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins];
-}
-
-#endif
-
-#pragma mark - Abstract
-
-- (MASConstraint * (^)(CGFloat multiplier))multipliedBy { MASMethodNotImplemented(); }
-
-- (MASConstraint * (^)(CGFloat divider))dividedBy { MASMethodNotImplemented(); }
-
-- (MASConstraint * (^)(MASLayoutPriority priority))priority { MASMethodNotImplemented(); }
-
-- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { MASMethodNotImplemented(); }
-
-- (MASConstraint * (^)(id key))key { MASMethodNotImplemented(); }
-
-- (void)setInsets:(MASEdgeInsets __unused)insets { MASMethodNotImplemented(); }
-
-- (void)setInset:(CGFloat __unused)inset { MASMethodNotImplemented(); }
-
-- (void)setSizeOffset:(CGSize __unused)sizeOffset { MASMethodNotImplemented(); }
-
-- (void)setCenterOffset:(CGPoint __unused)centerOffset { MASMethodNotImplemented(); }
-
-- (void)setOffset:(CGFloat __unused)offset { MASMethodNotImplemented(); }
-
-#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
-
-- (MASConstraint *)animator { MASMethodNotImplemented(); }
-
-#endif
-
-- (void)activate { MASMethodNotImplemented(); }
-
-- (void)deactivate { MASMethodNotImplemented(); }
-
-- (void)install { MASMethodNotImplemented(); }
-
-- (void)uninstall { MASMethodNotImplemented(); }
-
-@end

+ 0 - 146
Pods/Masonry/Masonry/MASConstraintMaker.h

@@ -1,146 +0,0 @@
-//
-//  MASConstraintMaker.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 20/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASConstraint.h"
-#import "MASUtilities.h"
-
-typedef NS_OPTIONS(NSInteger, MASAttribute) {
-    MASAttributeLeft = 1 << NSLayoutAttributeLeft,
-    MASAttributeRight = 1 << NSLayoutAttributeRight,
-    MASAttributeTop = 1 << NSLayoutAttributeTop,
-    MASAttributeBottom = 1 << NSLayoutAttributeBottom,
-    MASAttributeLeading = 1 << NSLayoutAttributeLeading,
-    MASAttributeTrailing = 1 << NSLayoutAttributeTrailing,
-    MASAttributeWidth = 1 << NSLayoutAttributeWidth,
-    MASAttributeHeight = 1 << NSLayoutAttributeHeight,
-    MASAttributeCenterX = 1 << NSLayoutAttributeCenterX,
-    MASAttributeCenterY = 1 << NSLayoutAttributeCenterY,
-    MASAttributeBaseline = 1 << NSLayoutAttributeBaseline,
-    
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-    
-    MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline,
-    MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline,
-    
-#endif
-    
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-    
-    MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin,
-    MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin,
-    MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin,
-    MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin,
-    MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin,
-    MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin,
-    MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins,
-    MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins,
-
-#endif
-    
-};
-
-/**
- *  Provides factory methods for creating MASConstraints.
- *  Constraints are collected until they are ready to be installed
- *
- */
-@interface MASConstraintMaker : NSObject
-
-/**
- *	The following properties return a new MASViewConstraint
- *  with the first item set to the makers associated view and the appropriate MASViewAttribute
- */
-@property (nonatomic, strong, readonly) MASConstraint *left;
-@property (nonatomic, strong, readonly) MASConstraint *top;
-@property (nonatomic, strong, readonly) MASConstraint *right;
-@property (nonatomic, strong, readonly) MASConstraint *bottom;
-@property (nonatomic, strong, readonly) MASConstraint *leading;
-@property (nonatomic, strong, readonly) MASConstraint *trailing;
-@property (nonatomic, strong, readonly) MASConstraint *width;
-@property (nonatomic, strong, readonly) MASConstraint *height;
-@property (nonatomic, strong, readonly) MASConstraint *centerX;
-@property (nonatomic, strong, readonly) MASConstraint *centerY;
-@property (nonatomic, strong, readonly) MASConstraint *baseline;
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-
-@property (nonatomic, strong, readonly) MASConstraint *firstBaseline;
-@property (nonatomic, strong, readonly) MASConstraint *lastBaseline;
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-
-@property (nonatomic, strong, readonly) MASConstraint *leftMargin;
-@property (nonatomic, strong, readonly) MASConstraint *rightMargin;
-@property (nonatomic, strong, readonly) MASConstraint *topMargin;
-@property (nonatomic, strong, readonly) MASConstraint *bottomMargin;
-@property (nonatomic, strong, readonly) MASConstraint *leadingMargin;
-@property (nonatomic, strong, readonly) MASConstraint *trailingMargin;
-@property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins;
-@property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins;
-
-#endif
-
-/**
- *  Returns a block which creates a new MASCompositeConstraint with the first item set
- *  to the makers associated view and children corresponding to the set bits in the
- *  MASAttribute parameter. Combine multiple attributes via binary-or.
- */
-@property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs);
-
-/**
- *	Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges
- *  which generates the appropriate MASViewConstraint children (top, left, bottom, right)
- *  with the first item set to the makers associated view
- */
-@property (nonatomic, strong, readonly) MASConstraint *edges;
-
-/**
- *	Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize
- *  which generates the appropriate MASViewConstraint children (width, height)
- *  with the first item set to the makers associated view
- */
-@property (nonatomic, strong, readonly) MASConstraint *size;
-
-/**
- *	Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter
- *  which generates the appropriate MASViewConstraint children (centerX, centerY)
- *  with the first item set to the makers associated view
- */
-@property (nonatomic, strong, readonly) MASConstraint *center;
-
-/**
- *  Whether or not to check for an existing constraint instead of adding constraint
- */
-@property (nonatomic, assign) BOOL updateExisting;
-
-/**
- *  Whether or not to remove existing constraints prior to installing
- */
-@property (nonatomic, assign) BOOL removeExisting;
-
-/**
- *	initialises the maker with a default view
- *
- *	@param	view	any MASConstraint are created with this view as the first item
- *
- *	@return	a new MASConstraintMaker
- */
-- (id)initWithView:(MAS_VIEW *)view;
-
-/**
- *	Calls install method on any MASConstraints which have been created by this maker
- *
- *	@return	an array of all the installed MASConstraints
- */
-- (NSArray *)install;
-
-- (MASConstraint * (^)(dispatch_block_t))group;
-
-@end

+ 0 - 273
Pods/Masonry/Masonry/MASConstraintMaker.m

@@ -1,273 +0,0 @@
-//
-//  MASConstraintMaker.m
-//  Masonry
-//
-//  Created by Jonas Budelmann on 20/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASConstraintMaker.h"
-#import "MASViewConstraint.h"
-#import "MASCompositeConstraint.h"
-#import "MASConstraint+Private.h"
-#import "MASViewAttribute.h"
-#import "View+MASAdditions.h"
-
-@interface MASConstraintMaker () <MASConstraintDelegate>
-
-@property (nonatomic, weak) MAS_VIEW *view;
-@property (nonatomic, strong) NSMutableArray *constraints;
-
-@end
-
-@implementation MASConstraintMaker
-
-- (id)initWithView:(MAS_VIEW *)view {
-    self = [super init];
-    if (!self) return nil;
-    
-    self.view = view;
-    self.constraints = NSMutableArray.new;
-    
-    return self;
-}
-
-- (NSArray *)install {
-    if (self.removeExisting) {
-        NSArray *installedConstraints = [MASViewConstraint installedConstraintsForView:self.view];
-        for (MASConstraint *constraint in installedConstraints) {
-            [constraint uninstall];
-        }
-    }
-    NSArray *constraints = self.constraints.copy;
-    for (MASConstraint *constraint in constraints) {
-        constraint.updateExisting = self.updateExisting;
-        [constraint install];
-    }
-    [self.constraints removeAllObjects];
-    return constraints;
-}
-
-#pragma mark - MASConstraintDelegate
-
-- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint {
-    NSUInteger index = [self.constraints indexOfObject:constraint];
-    NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint);
-    [self.constraints replaceObjectAtIndex:index withObject:replacementConstraint];
-}
-
-- (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
-    MASViewAttribute *viewAttribute = [[MASViewAttribute alloc] initWithView:self.view layoutAttribute:layoutAttribute];
-    MASViewConstraint *newConstraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:viewAttribute];
-    if ([constraint isKindOfClass:MASViewConstraint.class]) {
-        //replace with composite constraint
-        NSArray *children = @[constraint, newConstraint];
-        MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children];
-        compositeConstraint.delegate = self;
-        [self constraint:constraint shouldBeReplacedWithConstraint:compositeConstraint];
-        return compositeConstraint;
-    }
-    if (!constraint) {
-        newConstraint.delegate = self;
-        [self.constraints addObject:newConstraint];
-    }
-    return newConstraint;
-}
-
-- (MASConstraint *)addConstraintWithAttributes:(MASAttribute)attrs {
-    __unused MASAttribute anyAttribute = (MASAttributeLeft | MASAttributeRight | MASAttributeTop | MASAttributeBottom | MASAttributeLeading
-                                          | MASAttributeTrailing | MASAttributeWidth | MASAttributeHeight | MASAttributeCenterX
-                                          | MASAttributeCenterY | MASAttributeBaseline
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-                                          | MASAttributeFirstBaseline | MASAttributeLastBaseline
-#endif
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-                                          | MASAttributeLeftMargin | MASAttributeRightMargin | MASAttributeTopMargin | MASAttributeBottomMargin
-                                          | MASAttributeLeadingMargin | MASAttributeTrailingMargin | MASAttributeCenterXWithinMargins
-                                          | MASAttributeCenterYWithinMargins
-#endif
-                                          );
-    
-    NSAssert((attrs & anyAttribute) != 0, @"You didn't pass any attribute to make.attributes(...)");
-    
-    NSMutableArray *attributes = [NSMutableArray array];
-    
-    if (attrs & MASAttributeLeft) [attributes addObject:self.view.mas_left];
-    if (attrs & MASAttributeRight) [attributes addObject:self.view.mas_right];
-    if (attrs & MASAttributeTop) [attributes addObject:self.view.mas_top];
-    if (attrs & MASAttributeBottom) [attributes addObject:self.view.mas_bottom];
-    if (attrs & MASAttributeLeading) [attributes addObject:self.view.mas_leading];
-    if (attrs & MASAttributeTrailing) [attributes addObject:self.view.mas_trailing];
-    if (attrs & MASAttributeWidth) [attributes addObject:self.view.mas_width];
-    if (attrs & MASAttributeHeight) [attributes addObject:self.view.mas_height];
-    if (attrs & MASAttributeCenterX) [attributes addObject:self.view.mas_centerX];
-    if (attrs & MASAttributeCenterY) [attributes addObject:self.view.mas_centerY];
-    if (attrs & MASAttributeBaseline) [attributes addObject:self.view.mas_baseline];
-    
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-    
-    if (attrs & MASAttributeFirstBaseline) [attributes addObject:self.view.mas_firstBaseline];
-    if (attrs & MASAttributeLastBaseline) [attributes addObject:self.view.mas_lastBaseline];
-    
-#endif
-    
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-    
-    if (attrs & MASAttributeLeftMargin) [attributes addObject:self.view.mas_leftMargin];
-    if (attrs & MASAttributeRightMargin) [attributes addObject:self.view.mas_rightMargin];
-    if (attrs & MASAttributeTopMargin) [attributes addObject:self.view.mas_topMargin];
-    if (attrs & MASAttributeBottomMargin) [attributes addObject:self.view.mas_bottomMargin];
-    if (attrs & MASAttributeLeadingMargin) [attributes addObject:self.view.mas_leadingMargin];
-    if (attrs & MASAttributeTrailingMargin) [attributes addObject:self.view.mas_trailingMargin];
-    if (attrs & MASAttributeCenterXWithinMargins) [attributes addObject:self.view.mas_centerXWithinMargins];
-    if (attrs & MASAttributeCenterYWithinMargins) [attributes addObject:self.view.mas_centerYWithinMargins];
-    
-#endif
-    
-    NSMutableArray *children = [NSMutableArray arrayWithCapacity:attributes.count];
-    
-    for (MASViewAttribute *a in attributes) {
-        [children addObject:[[MASViewConstraint alloc] initWithFirstViewAttribute:a]];
-    }
-    
-    MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children];
-    constraint.delegate = self;
-    [self.constraints addObject:constraint];
-    return constraint;
-}
-
-#pragma mark - standard Attributes
-
-- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
-    return [self constraint:nil addConstraintWithLayoutAttribute:layoutAttribute];
-}
-
-- (MASConstraint *)left {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft];
-}
-
-- (MASConstraint *)top {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop];
-}
-
-- (MASConstraint *)right {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight];
-}
-
-- (MASConstraint *)bottom {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom];
-}
-
-- (MASConstraint *)leading {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading];
-}
-
-- (MASConstraint *)trailing {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing];
-}
-
-- (MASConstraint *)width {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth];
-}
-
-- (MASConstraint *)height {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight];
-}
-
-- (MASConstraint *)centerX {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX];
-}
-
-- (MASConstraint *)centerY {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY];
-}
-
-- (MASConstraint *)baseline {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline];
-}
-
-- (MASConstraint *(^)(MASAttribute))attributes {
-    return ^(MASAttribute attrs){
-        return [self addConstraintWithAttributes:attrs];
-    };
-}
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-
-- (MASConstraint *)firstBaseline {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline];
-}
-
-- (MASConstraint *)lastBaseline {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline];
-}
-
-#endif
-
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-
-- (MASConstraint *)leftMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin];
-}
-
-- (MASConstraint *)rightMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin];
-}
-
-- (MASConstraint *)topMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin];
-}
-
-- (MASConstraint *)bottomMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin];
-}
-
-- (MASConstraint *)leadingMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin];
-}
-
-- (MASConstraint *)trailingMargin {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin];
-}
-
-- (MASConstraint *)centerXWithinMargins {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins];
-}
-
-- (MASConstraint *)centerYWithinMargins {
-    return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins];
-}
-
-#endif
-
-
-#pragma mark - composite Attributes
-
-- (MASConstraint *)edges {
-    return [self addConstraintWithAttributes:MASAttributeTop | MASAttributeLeft | MASAttributeRight | MASAttributeBottom];
-}
-
-- (MASConstraint *)size {
-    return [self addConstraintWithAttributes:MASAttributeWidth | MASAttributeHeight];
-}
-
-- (MASConstraint *)center {
-    return [self addConstraintWithAttributes:MASAttributeCenterX | MASAttributeCenterY];
-}
-
-#pragma mark - grouping
-
-- (MASConstraint *(^)(dispatch_block_t group))group {
-    return ^id(dispatch_block_t group) {
-        NSInteger previousCount = self.constraints.count;
-        group();
-
-        NSArray *children = [self.constraints subarrayWithRange:NSMakeRange(previousCount, self.constraints.count - previousCount)];
-        MASCompositeConstraint *constraint = [[MASCompositeConstraint alloc] initWithChildren:children];
-        constraint.delegate = self;
-        return constraint;
-    };
-}
-
-@end

+ 0 - 22
Pods/Masonry/Masonry/MASLayoutConstraint.h

@@ -1,22 +0,0 @@
-//
-//  MASLayoutConstraint.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 3/08/13.
-//  Copyright (c) 2013 Jonas Budelmann. All rights reserved.
-//
-
-#import "MASUtilities.h"
-
-/**
- *	When you are debugging or printing the constraints attached to a view this subclass
- *  makes it easier to identify which constraints have been created via Masonry
- */
-@interface MASLayoutConstraint : NSLayoutConstraint
-
-/**
- *	a key to associate with this constraint
- */
-@property (nonatomic, strong) id mas_key;
-
-@end

+ 0 - 13
Pods/Masonry/Masonry/MASLayoutConstraint.m

@@ -1,13 +0,0 @@
-//
-//  MASLayoutConstraint.m
-//  Masonry
-//
-//  Created by Jonas Budelmann on 3/08/13.
-//  Copyright (c) 2013 Jonas Budelmann. All rights reserved.
-//
-
-#import "MASLayoutConstraint.h"
-
-@implementation MASLayoutConstraint
-
-@end

+ 0 - 136
Pods/Masonry/Masonry/MASUtilities.h

@@ -1,136 +0,0 @@
-//
-//  MASUtilities.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 19/08/13.
-//  Copyright (c) 2013 Jonas Budelmann. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
-
-#if TARGET_OS_IPHONE || TARGET_OS_TV
-
-    #import <UIKit/UIKit.h>
-    #define MAS_VIEW UIView
-    #define MAS_VIEW_CONTROLLER UIViewController
-    #define MASEdgeInsets UIEdgeInsets
-
-    typedef UILayoutPriority MASLayoutPriority;
-    static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired;
-    static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh;
-    static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500;
-    static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow;
-    static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel;
-
-#elif TARGET_OS_MAC
-
-    #import <AppKit/AppKit.h>
-    #define MAS_VIEW NSView
-    #define MASEdgeInsets NSEdgeInsets
-
-    typedef NSLayoutPriority MASLayoutPriority;
-    static const MASLayoutPriority MASLayoutPriorityRequired = NSLayoutPriorityRequired;
-    static const MASLayoutPriority MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh;
-    static const MASLayoutPriority MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow;
-    static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 501;
-    static const MASLayoutPriority MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut;
-    static const MASLayoutPriority MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow;
-    static const MASLayoutPriority MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow;
-    static const MASLayoutPriority MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression;
-
-#endif
-
-/**
- *	Allows you to attach keys to objects matching the variable names passed.
- *
- *  view1.mas_key = @"view1", view2.mas_key = @"view2";
- *
- *  is equivalent to:
- *
- *  MASAttachKeys(view1, view2);
- */
-#define MASAttachKeys(...)                                                        \
-    {                                                                             \
-        NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__);     \
-        for (id key in keyPairs.allKeys) {                                        \
-            id obj = keyPairs[key];                                               \
-            NSAssert([obj respondsToSelector:@selector(setMas_key:)],             \
-                     @"Cannot attach mas_key to %@", obj);                        \
-            [obj setMas_key:key];                                                 \
-        }                                                                         \
-    }
-
-/**
- *  Used to create object hashes
- *  Based on http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html
- */
-#define MAS_NSUINT_BIT (CHAR_BIT * sizeof(NSUInteger))
-#define MAS_NSUINTROTATE(val, howmuch) ((((NSUInteger)val) << howmuch) | (((NSUInteger)val) >> (MAS_NSUINT_BIT - howmuch)))
-
-/**
- *  Given a scalar or struct value, wraps it in NSValue
- *  Based on EXPObjectify: https://github.com/specta/expecta
- */
-static inline id _MASBoxValue(const char *type, ...) {
-    va_list v;
-    va_start(v, type);
-    id obj = nil;
-    if (strcmp(type, @encode(id)) == 0) {
-        id actual = va_arg(v, id);
-        obj = actual;
-    } else if (strcmp(type, @encode(CGPoint)) == 0) {
-        CGPoint actual = (CGPoint)va_arg(v, CGPoint);
-        obj = [NSValue value:&actual withObjCType:type];
-    } else if (strcmp(type, @encode(CGSize)) == 0) {
-        CGSize actual = (CGSize)va_arg(v, CGSize);
-        obj = [NSValue value:&actual withObjCType:type];
-    } else if (strcmp(type, @encode(MASEdgeInsets)) == 0) {
-        MASEdgeInsets actual = (MASEdgeInsets)va_arg(v, MASEdgeInsets);
-        obj = [NSValue value:&actual withObjCType:type];
-    } else if (strcmp(type, @encode(double)) == 0) {
-        double actual = (double)va_arg(v, double);
-        obj = [NSNumber numberWithDouble:actual];
-    } else if (strcmp(type, @encode(float)) == 0) {
-        float actual = (float)va_arg(v, double);
-        obj = [NSNumber numberWithFloat:actual];
-    } else if (strcmp(type, @encode(int)) == 0) {
-        int actual = (int)va_arg(v, int);
-        obj = [NSNumber numberWithInt:actual];
-    } else if (strcmp(type, @encode(long)) == 0) {
-        long actual = (long)va_arg(v, long);
-        obj = [NSNumber numberWithLong:actual];
-    } else if (strcmp(type, @encode(long long)) == 0) {
-        long long actual = (long long)va_arg(v, long long);
-        obj = [NSNumber numberWithLongLong:actual];
-    } else if (strcmp(type, @encode(short)) == 0) {
-        short actual = (short)va_arg(v, int);
-        obj = [NSNumber numberWithShort:actual];
-    } else if (strcmp(type, @encode(char)) == 0) {
-        char actual = (char)va_arg(v, int);
-        obj = [NSNumber numberWithChar:actual];
-    } else if (strcmp(type, @encode(bool)) == 0) {
-        bool actual = (bool)va_arg(v, int);
-        obj = [NSNumber numberWithBool:actual];
-    } else if (strcmp(type, @encode(unsigned char)) == 0) {
-        unsigned char actual = (unsigned char)va_arg(v, unsigned int);
-        obj = [NSNumber numberWithUnsignedChar:actual];
-    } else if (strcmp(type, @encode(unsigned int)) == 0) {
-        unsigned int actual = (unsigned int)va_arg(v, unsigned int);
-        obj = [NSNumber numberWithUnsignedInt:actual];
-    } else if (strcmp(type, @encode(unsigned long)) == 0) {
-        unsigned long actual = (unsigned long)va_arg(v, unsigned long);
-        obj = [NSNumber numberWithUnsignedLong:actual];
-    } else if (strcmp(type, @encode(unsigned long long)) == 0) {
-        unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long);
-        obj = [NSNumber numberWithUnsignedLongLong:actual];
-    } else if (strcmp(type, @encode(unsigned short)) == 0) {
-        unsigned short actual = (unsigned short)va_arg(v, unsigned int);
-        obj = [NSNumber numberWithUnsignedShort:actual];
-    }
-    va_end(v);
-    return obj;
-}
-
-#define MASBoxValue(value) _MASBoxValue(@encode(__typeof__((value))), (value))

+ 0 - 49
Pods/Masonry/Masonry/MASViewAttribute.h

@@ -1,49 +0,0 @@
-//
-//  MASViewAttribute.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 21/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASUtilities.h"
-
-/**
- *  An immutable tuple which stores the view and the related NSLayoutAttribute.
- *  Describes part of either the left or right hand side of a constraint equation
- */
-@interface MASViewAttribute : NSObject
-
-/**
- *  The view which the reciever relates to. Can be nil if item is not a view.
- */
-@property (nonatomic, weak, readonly) MAS_VIEW *view;
-
-/**
- *  The item which the reciever relates to.
- */
-@property (nonatomic, weak, readonly) id item;
-
-/**
- *  The attribute which the reciever relates to
- */
-@property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute;
-
-/**
- *  Convenience initializer.
- */
-- (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute;
-
-/**
- *  The designated initializer.
- */
-- (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute;
-
-/**
- *	Determine whether the layoutAttribute is a size attribute
- *
- *	@return	YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight
- */
-- (BOOL)isSizeAttribute;
-
-@end

+ 0 - 46
Pods/Masonry/Masonry/MASViewAttribute.m

@@ -1,46 +0,0 @@
-//
-//  MASViewAttribute.m
-//  Masonry
-//
-//  Created by Jonas Budelmann on 21/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASViewAttribute.h"
-
-@implementation MASViewAttribute
-
-- (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute {
-    self = [self initWithView:view item:view layoutAttribute:layoutAttribute];
-    return self;
-}
-
-- (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute {
-    self = [super init];
-    if (!self) return nil;
-    
-    _view = view;
-    _item = item;
-    _layoutAttribute = layoutAttribute;
-    
-    return self;
-}
-
-- (BOOL)isSizeAttribute {
-    return self.layoutAttribute == NSLayoutAttributeWidth
-        || self.layoutAttribute == NSLayoutAttributeHeight;
-}
-
-- (BOOL)isEqual:(MASViewAttribute *)viewAttribute {
-    if ([viewAttribute isKindOfClass:self.class]) {
-        return self.view == viewAttribute.view
-            && self.layoutAttribute == viewAttribute.layoutAttribute;
-    }
-    return [super isEqual:viewAttribute];
-}
-
-- (NSUInteger)hash {
-    return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute;
-}
-
-@end

+ 0 - 48
Pods/Masonry/Masonry/MASViewConstraint.h

@@ -1,48 +0,0 @@
-//
-//  MASViewConstraint.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 20/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASViewAttribute.h"
-#import "MASConstraint.h"
-#import "MASLayoutConstraint.h"
-#import "MASUtilities.h"
-
-/**
- *  A single constraint.
- *  Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view
- */
-@interface MASViewConstraint : MASConstraint <NSCopying>
-
-/**
- *	First item/view and first attribute of the NSLayoutConstraint
- */
-@property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute;
-
-/**
- *	Second item/view and second attribute of the NSLayoutConstraint
- */
-@property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute;
-
-/**
- *	initialises the MASViewConstraint with the first part of the equation
- *
- *	@param	firstViewAttribute	view.mas_left, view.mas_width etc.
- *
- *	@return	a new view constraint
- */
-- (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute;
-
-/**
- *  Returns all MASViewConstraints installed with this view as a first item.
- *
- *  @param  view  A view to retrieve constraints for.
- *
- *  @return An array of MASViewConstraints.
- */
-+ (NSArray *)installedConstraintsForView:(MAS_VIEW *)view;
-
-@end

+ 0 - 401
Pods/Masonry/Masonry/MASViewConstraint.m

@@ -1,401 +0,0 @@
-//
-//  MASViewConstraint.m
-//  Masonry
-//
-//  Created by Jonas Budelmann on 20/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASViewConstraint.h"
-#import "MASConstraint+Private.h"
-#import "MASCompositeConstraint.h"
-#import "MASLayoutConstraint.h"
-#import "View+MASAdditions.h"
-#import <objc/runtime.h>
-
-@interface MAS_VIEW (MASConstraints)
-
-@property (nonatomic, readonly) NSMutableSet *mas_installedConstraints;
-
-@end
-
-@implementation MAS_VIEW (MASConstraints)
-
-static char kInstalledConstraintsKey;
-
-- (NSMutableSet *)mas_installedConstraints {
-    NSMutableSet *constraints = objc_getAssociatedObject(self, &kInstalledConstraintsKey);
-    if (!constraints) {
-        constraints = [NSMutableSet set];
-        objc_setAssociatedObject(self, &kInstalledConstraintsKey, constraints, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-    }
-    return constraints;
-}
-
-@end
-
-
-@interface MASViewConstraint ()
-
-@property (nonatomic, strong, readwrite) MASViewAttribute *secondViewAttribute;
-@property (nonatomic, weak) MAS_VIEW *installedView;
-@property (nonatomic, weak) MASLayoutConstraint *layoutConstraint;
-@property (nonatomic, assign) NSLayoutRelation layoutRelation;
-@property (nonatomic, assign) MASLayoutPriority layoutPriority;
-@property (nonatomic, assign) CGFloat layoutMultiplier;
-@property (nonatomic, assign) CGFloat layoutConstant;
-@property (nonatomic, assign) BOOL hasLayoutRelation;
-@property (nonatomic, strong) id mas_key;
-@property (nonatomic, assign) BOOL useAnimator;
-
-@end
-
-@implementation MASViewConstraint
-
-- (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute {
-    self = [super init];
-    if (!self) return nil;
-    
-    _firstViewAttribute = firstViewAttribute;
-    self.layoutPriority = MASLayoutPriorityRequired;
-    self.layoutMultiplier = 1;
-    
-    return self;
-}
-
-#pragma mark - NSCoping
-
-- (id)copyWithZone:(NSZone __unused *)zone {
-    MASViewConstraint *constraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:self.firstViewAttribute];
-    constraint.layoutConstant = self.layoutConstant;
-    constraint.layoutRelation = self.layoutRelation;
-    constraint.layoutPriority = self.layoutPriority;
-    constraint.layoutMultiplier = self.layoutMultiplier;
-    constraint.delegate = self.delegate;
-    return constraint;
-}
-
-#pragma mark - Public
-
-+ (NSArray *)installedConstraintsForView:(MAS_VIEW *)view {
-    return [view.mas_installedConstraints allObjects];
-}
-
-#pragma mark - Private
-
-- (void)setLayoutConstant:(CGFloat)layoutConstant {
-    _layoutConstant = layoutConstant;
-
-#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
-    if (self.useAnimator) {
-        [self.layoutConstraint.animator setConstant:layoutConstant];
-    } else {
-        self.layoutConstraint.constant = layoutConstant;
-    }
-#else
-    self.layoutConstraint.constant = layoutConstant;
-#endif
-}
-
-- (void)setLayoutRelation:(NSLayoutRelation)layoutRelation {
-    _layoutRelation = layoutRelation;
-    self.hasLayoutRelation = YES;
-}
-
-- (BOOL)supportsActiveProperty {
-    return [self.layoutConstraint respondsToSelector:@selector(isActive)];
-}
-
-- (BOOL)isActive {
-    BOOL active = YES;
-    if ([self supportsActiveProperty]) {
-        active = [self.layoutConstraint isActive];
-    }
-
-    return active;
-}
-
-- (BOOL)hasBeenInstalled {
-    return (self.layoutConstraint != nil) && [self isActive];
-}
-
-- (void)setSecondViewAttribute:(id)secondViewAttribute {
-    if ([secondViewAttribute isKindOfClass:NSValue.class]) {
-        [self setLayoutConstantWithValue:secondViewAttribute];
-    } else if ([secondViewAttribute isKindOfClass:MAS_VIEW.class]) {
-        _secondViewAttribute = [[MASViewAttribute alloc] initWithView:secondViewAttribute layoutAttribute:self.firstViewAttribute.layoutAttribute];
-    } else if ([secondViewAttribute isKindOfClass:MASViewAttribute.class]) {
-        _secondViewAttribute = secondViewAttribute;
-    } else {
-        NSAssert(NO, @"attempting to add unsupported attribute: %@", secondViewAttribute);
-    }
-}
-
-#pragma mark - NSLayoutConstraint multiplier proxies
-
-- (MASConstraint * (^)(CGFloat))multipliedBy {
-    return ^id(CGFloat multiplier) {
-        NSAssert(!self.hasBeenInstalled,
-                 @"Cannot modify constraint multiplier after it has been installed");
-        
-        self.layoutMultiplier = multiplier;
-        return self;
-    };
-}
-
-
-- (MASConstraint * (^)(CGFloat))dividedBy {
-    return ^id(CGFloat divider) {
-        NSAssert(!self.hasBeenInstalled,
-                 @"Cannot modify constraint multiplier after it has been installed");
-
-        self.layoutMultiplier = 1.0/divider;
-        return self;
-    };
-}
-
-#pragma mark - MASLayoutPriority proxy
-
-- (MASConstraint * (^)(MASLayoutPriority))priority {
-    return ^id(MASLayoutPriority priority) {
-        NSAssert(!self.hasBeenInstalled,
-                 @"Cannot modify constraint priority after it has been installed");
-        
-        self.layoutPriority = priority;
-        return self;
-    };
-}
-
-#pragma mark - NSLayoutRelation proxy
-
-- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation {
-    return ^id(id attribute, NSLayoutRelation relation) {
-        if ([attribute isKindOfClass:NSArray.class]) {
-            NSAssert(!self.hasLayoutRelation, @"Redefinition of constraint relation");
-            NSMutableArray *children = NSMutableArray.new;
-            for (id attr in attribute) {
-                MASViewConstraint *viewConstraint = [self copy];
-                viewConstraint.layoutRelation = relation;
-                viewConstraint.secondViewAttribute = attr;
-                [children addObject:viewConstraint];
-            }
-            MASCompositeConstraint *compositeConstraint = [[MASCompositeConstraint alloc] initWithChildren:children];
-            compositeConstraint.delegate = self.delegate;
-            [self.delegate constraint:self shouldBeReplacedWithConstraint:compositeConstraint];
-            return compositeConstraint;
-        } else {
-            NSAssert(!self.hasLayoutRelation || self.layoutRelation == relation && [attribute isKindOfClass:NSValue.class], @"Redefinition of constraint relation");
-            self.layoutRelation = relation;
-            self.secondViewAttribute = attribute;
-            return self;
-        }
-    };
-}
-
-#pragma mark - Semantic properties
-
-- (MASConstraint *)with {
-    return self;
-}
-
-- (MASConstraint *)and {
-    return self;
-}
-
-#pragma mark - attribute chaining
-
-- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
-    NSAssert(!self.hasLayoutRelation, @"Attributes should be chained before defining the constraint relation");
-
-    return [self.delegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute];
-}
-
-#pragma mark - Animator proxy
-
-#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
-
-- (MASConstraint *)animator {
-    self.useAnimator = YES;
-    return self;
-}
-
-#endif
-
-#pragma mark - debug helpers
-
-- (MASConstraint * (^)(id))key {
-    return ^id(id key) {
-        self.mas_key = key;
-        return self;
-    };
-}
-
-#pragma mark - NSLayoutConstraint constant setters
-
-- (void)setInsets:(MASEdgeInsets)insets {
-    NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute;
-    switch (layoutAttribute) {
-        case NSLayoutAttributeLeft:
-        case NSLayoutAttributeLeading:
-            self.layoutConstant = insets.left;
-            break;
-        case NSLayoutAttributeTop:
-            self.layoutConstant = insets.top;
-            break;
-        case NSLayoutAttributeBottom:
-            self.layoutConstant = -insets.bottom;
-            break;
-        case NSLayoutAttributeRight:
-        case NSLayoutAttributeTrailing:
-            self.layoutConstant = -insets.right;
-            break;
-        default:
-            break;
-    }
-}
-
-- (void)setInset:(CGFloat)inset {
-    [self setInsets:(MASEdgeInsets){.top = inset, .left = inset, .bottom = inset, .right = inset}];
-}
-
-- (void)setOffset:(CGFloat)offset {
-    self.layoutConstant = offset;
-}
-
-- (void)setSizeOffset:(CGSize)sizeOffset {
-    NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute;
-    switch (layoutAttribute) {
-        case NSLayoutAttributeWidth:
-            self.layoutConstant = sizeOffset.width;
-            break;
-        case NSLayoutAttributeHeight:
-            self.layoutConstant = sizeOffset.height;
-            break;
-        default:
-            break;
-    }
-}
-
-- (void)setCenterOffset:(CGPoint)centerOffset {
-    NSLayoutAttribute layoutAttribute = self.firstViewAttribute.layoutAttribute;
-    switch (layoutAttribute) {
-        case NSLayoutAttributeCenterX:
-            self.layoutConstant = centerOffset.x;
-            break;
-        case NSLayoutAttributeCenterY:
-            self.layoutConstant = centerOffset.y;
-            break;
-        default:
-            break;
-    }
-}
-
-#pragma mark - MASConstraint
-
-- (void)activate {
-    [self install];
-}
-
-- (void)deactivate {
-    [self uninstall];
-}
-
-- (void)install {
-    if (self.hasBeenInstalled) {
-        return;
-    }
-    
-    if ([self supportsActiveProperty] && self.layoutConstraint) {
-        self.layoutConstraint.active = YES;
-        [self.firstViewAttribute.view.mas_installedConstraints addObject:self];
-        return;
-    }
-    
-    MAS_VIEW *firstLayoutItem = self.firstViewAttribute.item;
-    NSLayoutAttribute firstLayoutAttribute = self.firstViewAttribute.layoutAttribute;
-    MAS_VIEW *secondLayoutItem = self.secondViewAttribute.item;
-    NSLayoutAttribute secondLayoutAttribute = self.secondViewAttribute.layoutAttribute;
-
-    // alignment attributes must have a secondViewAttribute
-    // therefore we assume that is refering to superview
-    // eg make.left.equalTo(@10)
-    if (!self.firstViewAttribute.isSizeAttribute && !self.secondViewAttribute) {
-        secondLayoutItem = self.firstViewAttribute.view.superview;
-        secondLayoutAttribute = firstLayoutAttribute;
-    }
-    
-    MASLayoutConstraint *layoutConstraint
-        = [MASLayoutConstraint constraintWithItem:firstLayoutItem
-                                        attribute:firstLayoutAttribute
-                                        relatedBy:self.layoutRelation
-                                           toItem:secondLayoutItem
-                                        attribute:secondLayoutAttribute
-                                       multiplier:self.layoutMultiplier
-                                         constant:self.layoutConstant];
-    
-    layoutConstraint.priority = self.layoutPriority;
-    layoutConstraint.mas_key = self.mas_key;
-    
-    if (self.secondViewAttribute.view) {
-        MAS_VIEW *closestCommonSuperview = [self.firstViewAttribute.view mas_closestCommonSuperview:self.secondViewAttribute.view];
-        NSAssert(closestCommonSuperview,
-                 @"couldn't find a common superview for %@ and %@",
-                 self.firstViewAttribute.view, self.secondViewAttribute.view);
-        self.installedView = closestCommonSuperview;
-    } else if (self.firstViewAttribute.isSizeAttribute) {
-        self.installedView = self.firstViewAttribute.view;
-    } else {
-        self.installedView = self.firstViewAttribute.view.superview;
-    }
-
-
-    MASLayoutConstraint *existingConstraint = nil;
-    if (self.updateExisting) {
-        existingConstraint = [self layoutConstraintSimilarTo:layoutConstraint];
-    }
-    if (existingConstraint) {
-        // just update the constant
-        existingConstraint.constant = layoutConstraint.constant;
-        self.layoutConstraint = existingConstraint;
-    } else {
-        [self.installedView addConstraint:layoutConstraint];
-        self.layoutConstraint = layoutConstraint;
-        [firstLayoutItem.mas_installedConstraints addObject:self];
-    }
-}
-
-- (MASLayoutConstraint *)layoutConstraintSimilarTo:(MASLayoutConstraint *)layoutConstraint {
-    // check if any constraints are the same apart from the only mutable property constant
-
-    // go through constraints in reverse as we do not want to match auto-resizing or interface builder constraints
-    // and they are likely to be added first.
-    for (NSLayoutConstraint *existingConstraint in self.installedView.constraints.reverseObjectEnumerator) {
-        if (![existingConstraint isKindOfClass:MASLayoutConstraint.class]) continue;
-        if (existingConstraint.firstItem != layoutConstraint.firstItem) continue;
-        if (existingConstraint.secondItem != layoutConstraint.secondItem) continue;
-        if (existingConstraint.firstAttribute != layoutConstraint.firstAttribute) continue;
-        if (existingConstraint.secondAttribute != layoutConstraint.secondAttribute) continue;
-        if (existingConstraint.relation != layoutConstraint.relation) continue;
-        if (existingConstraint.multiplier != layoutConstraint.multiplier) continue;
-        if (existingConstraint.priority != layoutConstraint.priority) continue;
-
-        return (id)existingConstraint;
-    }
-    return nil;
-}
-
-- (void)uninstall {
-    if ([self supportsActiveProperty]) {
-        self.layoutConstraint.active = NO;
-        [self.firstViewAttribute.view.mas_installedConstraints removeObject:self];
-        return;
-    }
-    
-    [self.installedView removeConstraint:self.layoutConstraint];
-    self.layoutConstraint = nil;
-    self.installedView = nil;
-    
-    [self.firstViewAttribute.view.mas_installedConstraints removeObject:self];
-}
-
-@end

+ 0 - 29
Pods/Masonry/Masonry/Masonry.h

@@ -1,29 +0,0 @@
-//
-//  Masonry.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 20/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-//! Project version number for Masonry.
-FOUNDATION_EXPORT double MasonryVersionNumber;
-
-//! Project version string for Masonry.
-FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
-
-#import "MASUtilities.h"
-#import "View+MASAdditions.h"
-#import "View+MASShorthandAdditions.h"
-#import "ViewController+MASAdditions.h"
-#import "NSArray+MASAdditions.h"
-#import "NSArray+MASShorthandAdditions.h"
-#import "MASConstraint.h"
-#import "MASCompositeConstraint.h"
-#import "MASViewAttribute.h"
-#import "MASViewConstraint.h"
-#import "MASConstraintMaker.h"
-#import "MASLayoutConstraint.h"
-#import "NSLayoutConstraint+MASDebugAdditions.h"

+ 0 - 72
Pods/Masonry/Masonry/NSArray+MASAdditions.h

@@ -1,72 +0,0 @@
-//
-//  NSArray+MASAdditions.h
-//
-//
-//  Created by Daniel Hammond on 11/26/13.
-//
-//
-
-#import "MASUtilities.h"
-#import "MASConstraintMaker.h"
-#import "MASViewAttribute.h"
-
-typedef NS_ENUM(NSUInteger, MASAxisType) {
-    MASAxisTypeHorizontal,
-    MASAxisTypeVertical
-};
-
-@interface NSArray (MASAdditions)
-
-/**
- *  Creates a MASConstraintMaker with each view in the callee.
- *  Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view
- *
- *  @param block scope within which you can build up the constraints which you wish to apply to each view.
- *
- *  @return Array of created MASConstraints
- */
-- (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block;
-
-/**
- *  Creates a MASConstraintMaker with each view in the callee.
- *  Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
- *  If an existing constraint exists then it will be updated instead.
- *
- *  @param block scope within which you can build up the constraints which you wish to apply to each view.
- *
- *  @return Array of created/updated MASConstraints
- */
-- (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block;
-
-/**
- *  Creates a MASConstraintMaker with each view in the callee.
- *  Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view.
- *  All constraints previously installed for the views will be removed.
- *
- *  @param block scope within which you can build up the constraints which you wish to apply to each view.
- *
- *  @return Array of created/updated MASConstraints
- */
-- (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block;
-
-/**
- *  distribute with fixed spacing
- *
- *  @param axisType     which axis to distribute items along
- *  @param fixedSpacing the spacing between each item
- *  @param leadSpacing  the spacing before the first item and the container
- *  @param tailSpacing  the spacing after the last item and the container
- */
-- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
-
-/**
- *  distribute with fixed item size
- *
- *  @param axisType        which axis to distribute items along
- *  @param fixedItemLength the fixed length of each item
- *  @param leadSpacing     the spacing before the first item and the container
- *  @param tailSpacing     the spacing after the last item and the container
- */
-- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing;
-
-@end

+ 0 - 162
Pods/Masonry/Masonry/NSArray+MASAdditions.m

@@ -1,162 +0,0 @@
-//
-//  NSArray+MASAdditions.m
-//  
-//
-//  Created by Daniel Hammond on 11/26/13.
-//
-//
-
-#import "NSArray+MASAdditions.h"
-#import "View+MASAdditions.h"
-
-@implementation NSArray (MASAdditions)
-
-- (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block {
-    NSMutableArray *constraints = [NSMutableArray array];
-    for (MAS_VIEW *view in self) {
-        NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
-        [constraints addObjectsFromArray:[view mas_makeConstraints:block]];
-    }
-    return constraints;
-}
-
-- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block {
-    NSMutableArray *constraints = [NSMutableArray array];
-    for (MAS_VIEW *view in self) {
-        NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
-        [constraints addObjectsFromArray:[view mas_updateConstraints:block]];
-    }
-    return constraints;
-}
-
-- (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block {
-    NSMutableArray *constraints = [NSMutableArray array];
-    for (MAS_VIEW *view in self) {
-        NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
-        [constraints addObjectsFromArray:[view mas_remakeConstraints:block]];
-    }
-    return constraints;
-}
-
-- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing {
-    if (self.count < 2) {
-        NSAssert(self.count>1,@"views to distribute need to bigger than one");
-        return;
-    }
-    
-    MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
-    if (axisType == MASAxisTypeHorizontal) {
-        MAS_VIEW *prev;
-        for (int i = 0; i < self.count; i++) {
-            MAS_VIEW *v = self[i];
-            [v mas_makeConstraints:^(MASConstraintMaker *make) {
-                if (prev) {
-                    make.width.equalTo(prev);
-                    make.left.equalTo(prev.mas_right).offset(fixedSpacing);
-                    if (i == self.count - 1) {//last one
-                        make.right.equalTo(tempSuperView).offset(-tailSpacing);
-                    }
-                }
-                else {//first one
-                    make.left.equalTo(tempSuperView).offset(leadSpacing);
-                }
-                
-            }];
-            prev = v;
-        }
-    }
-    else {
-        MAS_VIEW *prev;
-        for (int i = 0; i < self.count; i++) {
-            MAS_VIEW *v = self[i];
-            [v mas_makeConstraints:^(MASConstraintMaker *make) {
-                if (prev) {
-                    make.height.equalTo(prev);
-                    make.top.equalTo(prev.mas_bottom).offset(fixedSpacing);
-                    if (i == self.count - 1) {//last one
-                        make.bottom.equalTo(tempSuperView).offset(-tailSpacing);
-                    }                    
-                }
-                else {//first one
-                    make.top.equalTo(tempSuperView).offset(leadSpacing);
-                }
-                
-            }];
-            prev = v;
-        }
-    }
-}
-
-- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing {
-    if (self.count < 2) {
-        NSAssert(self.count>1,@"views to distribute need to bigger than one");
-        return;
-    }
-    
-    MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
-    if (axisType == MASAxisTypeHorizontal) {
-        MAS_VIEW *prev;
-        for (int i = 0; i < self.count; i++) {
-            MAS_VIEW *v = self[i];
-            [v mas_makeConstraints:^(MASConstraintMaker *make) {
-                make.width.equalTo(@(fixedItemLength));
-                if (prev) {
-                    if (i == self.count - 1) {//last one
-                        make.right.equalTo(tempSuperView).offset(-tailSpacing);
-                    }
-                    else {
-                        CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1));
-                        make.right.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset);
-                    }
-                }
-                else {//first one
-                    make.left.equalTo(tempSuperView).offset(leadSpacing);
-                }
-            }];
-            prev = v;
-        }
-    }
-    else {
-        MAS_VIEW *prev;
-        for (int i = 0; i < self.count; i++) {
-            MAS_VIEW *v = self[i];
-            [v mas_makeConstraints:^(MASConstraintMaker *make) {
-                make.height.equalTo(@(fixedItemLength));
-                if (prev) {
-                    if (i == self.count - 1) {//last one
-                        make.bottom.equalTo(tempSuperView).offset(-tailSpacing);
-                    }
-                    else {
-                        CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1));
-                        make.bottom.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset);
-                    }
-                }
-                else {//first one
-                    make.top.equalTo(tempSuperView).offset(leadSpacing);
-                }
-            }];
-            prev = v;
-        }
-    }
-}
-
-- (MAS_VIEW *)mas_commonSuperviewOfViews
-{
-    MAS_VIEW *commonSuperview = nil;
-    MAS_VIEW *previousView = nil;
-    for (id object in self) {
-        if ([object isKindOfClass:[MAS_VIEW class]]) {
-            MAS_VIEW *view = (MAS_VIEW *)object;
-            if (previousView) {
-                commonSuperview = [view mas_closestCommonSuperview:commonSuperview];
-            } else {
-                commonSuperview = view;
-            }
-            previousView = view;
-        }
-    }
-    NSAssert(commonSuperview, @"Can't constrain views that do not share a common superview. Make sure that all the views in this array have been added into the same view hierarchy.");
-    return commonSuperview;
-}
-
-@end

+ 0 - 41
Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h

@@ -1,41 +0,0 @@
-//
-//  NSArray+MASShorthandAdditions.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 22/07/13.
-//  Copyright (c) 2013 Jonas Budelmann. All rights reserved.
-//
-
-#import "NSArray+MASAdditions.h"
-
-#ifdef MAS_SHORTHAND
-
-/**
- *	Shorthand array additions without the 'mas_' prefixes,
- *  only enabled if MAS_SHORTHAND is defined
- */
-@interface NSArray (MASShorthandAdditions)
-
-- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
-- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
-- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
-
-@end
-
-@implementation NSArray (MASShorthandAdditions)
-
-- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
-    return [self mas_makeConstraints:block];
-}
-
-- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
-    return [self mas_updateConstraints:block];
-}
-
-- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
-    return [self mas_remakeConstraints:block];
-}
-
-@end
-
-#endif

+ 0 - 16
Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h

@@ -1,16 +0,0 @@
-//
-//  NSLayoutConstraint+MASDebugAdditions.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 3/08/13.
-//  Copyright (c) 2013 Jonas Budelmann. All rights reserved.
-//
-
-#import "MASUtilities.h"
-
-/**
- *	makes debug and log output of NSLayoutConstraints more readable
- */
-@interface NSLayoutConstraint (MASDebugAdditions)
-
-@end

+ 0 - 146
Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m

@@ -1,146 +0,0 @@
-//
-//  NSLayoutConstraint+MASDebugAdditions.m
-//  Masonry
-//
-//  Created by Jonas Budelmann on 3/08/13.
-//  Copyright (c) 2013 Jonas Budelmann. All rights reserved.
-//
-
-#import "NSLayoutConstraint+MASDebugAdditions.h"
-#import "MASConstraint.h"
-#import "MASLayoutConstraint.h"
-
-@implementation NSLayoutConstraint (MASDebugAdditions)
-
-#pragma mark - description maps
-
-+ (NSDictionary *)layoutRelationDescriptionsByValue {
-    static dispatch_once_t once;
-    static NSDictionary *descriptionMap;
-    dispatch_once(&once, ^{
-        descriptionMap = @{
-            @(NSLayoutRelationEqual)                : @"==",
-            @(NSLayoutRelationGreaterThanOrEqual)   : @">=",
-            @(NSLayoutRelationLessThanOrEqual)      : @"<=",
-        };
-    });
-    return descriptionMap;
-}
-
-+ (NSDictionary *)layoutAttributeDescriptionsByValue {
-    static dispatch_once_t once;
-    static NSDictionary *descriptionMap;
-    dispatch_once(&once, ^{
-        descriptionMap = @{
-            @(NSLayoutAttributeTop)      : @"top",
-            @(NSLayoutAttributeLeft)     : @"left",
-            @(NSLayoutAttributeBottom)   : @"bottom",
-            @(NSLayoutAttributeRight)    : @"right",
-            @(NSLayoutAttributeLeading)  : @"leading",
-            @(NSLayoutAttributeTrailing) : @"trailing",
-            @(NSLayoutAttributeWidth)    : @"width",
-            @(NSLayoutAttributeHeight)   : @"height",
-            @(NSLayoutAttributeCenterX)  : @"centerX",
-            @(NSLayoutAttributeCenterY)  : @"centerY",
-            @(NSLayoutAttributeBaseline) : @"baseline",
-            
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-            @(NSLayoutAttributeFirstBaseline) : @"firstBaseline",
-            @(NSLayoutAttributeLastBaseline) : @"lastBaseline",
-#endif
-            
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-            @(NSLayoutAttributeLeftMargin)           : @"leftMargin",
-            @(NSLayoutAttributeRightMargin)          : @"rightMargin",
-            @(NSLayoutAttributeTopMargin)            : @"topMargin",
-            @(NSLayoutAttributeBottomMargin)         : @"bottomMargin",
-            @(NSLayoutAttributeLeadingMargin)        : @"leadingMargin",
-            @(NSLayoutAttributeTrailingMargin)       : @"trailingMargin",
-            @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins",
-            @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins",
-#endif
-            
-        };
-    
-    });
-    return descriptionMap;
-}
-
-
-+ (NSDictionary *)layoutPriorityDescriptionsByValue {
-    static dispatch_once_t once;
-    static NSDictionary *descriptionMap;
-    dispatch_once(&once, ^{
-#if TARGET_OS_IPHONE || TARGET_OS_TV
-        descriptionMap = @{
-            @(MASLayoutPriorityDefaultHigh)      : @"high",
-            @(MASLayoutPriorityDefaultLow)       : @"low",
-            @(MASLayoutPriorityDefaultMedium)    : @"medium",
-            @(MASLayoutPriorityRequired)         : @"required",
-            @(MASLayoutPriorityFittingSizeLevel) : @"fitting size",
-        };
-#elif TARGET_OS_MAC
-        descriptionMap = @{
-            @(MASLayoutPriorityDefaultHigh)                 : @"high",
-            @(MASLayoutPriorityDragThatCanResizeWindow)     : @"drag can resize window",
-            @(MASLayoutPriorityDefaultMedium)               : @"medium",
-            @(MASLayoutPriorityWindowSizeStayPut)           : @"window size stay put",
-            @(MASLayoutPriorityDragThatCannotResizeWindow)  : @"drag cannot resize window",
-            @(MASLayoutPriorityDefaultLow)                  : @"low",
-            @(MASLayoutPriorityFittingSizeCompression)      : @"fitting size",
-            @(MASLayoutPriorityRequired)                    : @"required",
-        };
-#endif
-    });
-    return descriptionMap;
-}
-
-#pragma mark - description override
-
-+ (NSString *)descriptionForObject:(id)obj {
-    if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) {
-        return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]];
-    }
-    return [NSString stringWithFormat:@"%@:%p", [obj class], obj];
-}
-
-- (NSString *)description {
-    NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"];
-
-    [description appendString:[self.class descriptionForObject:self]];
-
-    [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]];
-    if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) {
-        [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]];
-    }
-
-    [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]];
-
-    if (self.secondItem) {
-        [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]];
-    }
-    if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) {
-        [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]];
-    }
-    
-    if (self.multiplier != 1) {
-        [description appendFormat:@" * %g", self.multiplier];
-    }
-    
-    if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) {
-        [description appendFormat:@" %g", self.constant];
-    } else {
-        if (self.constant) {
-            [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)];
-        }
-    }
-
-    if (self.priority != MASLayoutPriorityRequired) {
-        [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]];
-    }
-
-    [description appendString:@">"];
-    return description;
-}
-
-@end

+ 0 - 111
Pods/Masonry/Masonry/View+MASAdditions.h

@@ -1,111 +0,0 @@
-//
-//  UIView+MASAdditions.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 20/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "MASUtilities.h"
-#import "MASConstraintMaker.h"
-#import "MASViewAttribute.h"
-
-/**
- *	Provides constraint maker block
- *  and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs
- */
-@interface MAS_VIEW (MASAdditions)
-
-/**
- *	following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute
- */
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_left;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_top;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_right;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_leading;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_width;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_height;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline;
-@property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr);
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline;
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins;
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
-
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0));
-
-#endif
-
-/**
- *	a key to associate with this view
- */
-@property (nonatomic, strong) id mas_key;
-
-/**
- *	Finds the closest common superview between this view and another view
- *
- *	@param	view	other view
- *
- *	@return	returns nil if common superview could not be found
- */
-- (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view;
-
-/**
- *  Creates a MASConstraintMaker with the callee view.
- *  Any constraints defined are added to the view or the appropriate superview once the block has finished executing
- *
- *  @param block scope within which you can build up the constraints which you wish to apply to the view.
- *
- *  @return Array of created MASConstraints
- */
-- (NSArray *)mas_makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block;
-
-/**
- *  Creates a MASConstraintMaker with the callee view.
- *  Any constraints defined are added to the view or the appropriate superview once the block has finished executing.
- *  If an existing constraint exists then it will be updated instead.
- *
- *  @param block scope within which you can build up the constraints which you wish to apply to the view.
- *
- *  @return Array of created/updated MASConstraints
- */
-- (NSArray *)mas_updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block;
-
-/**
- *  Creates a MASConstraintMaker with the callee view.
- *  Any constraints defined are added to the view or the appropriate superview once the block has finished executing.
- *  All constraints previously installed for the view will be removed.
- *
- *  @param block scope within which you can build up the constraints which you wish to apply to the view.
- *
- *  @return Array of created/updated MASConstraints
- */
-- (NSArray *)mas_remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block;
-
-@end

+ 0 - 186
Pods/Masonry/Masonry/View+MASAdditions.m

@@ -1,186 +0,0 @@
-//
-//  UIView+MASAdditions.m
-//  Masonry
-//
-//  Created by Jonas Budelmann on 20/07/13.
-//  Copyright (c) 2013 cloudling. All rights reserved.
-//
-
-#import "View+MASAdditions.h"
-#import <objc/runtime.h>
-
-@implementation MAS_VIEW (MASAdditions)
-
-- (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block {
-    self.translatesAutoresizingMaskIntoConstraints = NO;
-    MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self];
-    block(constraintMaker);
-    return [constraintMaker install];
-}
-
-- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block {
-    self.translatesAutoresizingMaskIntoConstraints = NO;
-    MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self];
-    constraintMaker.updateExisting = YES;
-    block(constraintMaker);
-    return [constraintMaker install];
-}
-
-- (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block {
-    self.translatesAutoresizingMaskIntoConstraints = NO;
-    MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self];
-    constraintMaker.removeExisting = YES;
-    block(constraintMaker);
-    return [constraintMaker install];
-}
-
-#pragma mark - NSLayoutAttribute properties
-
-- (MASViewAttribute *)mas_left {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft];
-}
-
-- (MASViewAttribute *)mas_top {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop];
-}
-
-- (MASViewAttribute *)mas_right {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight];
-}
-
-- (MASViewAttribute *)mas_bottom {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom];
-}
-
-- (MASViewAttribute *)mas_leading {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading];
-}
-
-- (MASViewAttribute *)mas_trailing {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing];
-}
-
-- (MASViewAttribute *)mas_width {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth];
-}
-
-- (MASViewAttribute *)mas_height {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight];
-}
-
-- (MASViewAttribute *)mas_centerX {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX];
-}
-
-- (MASViewAttribute *)mas_centerY {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY];
-}
-
-- (MASViewAttribute *)mas_baseline {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline];
-}
-
-- (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute
-{
-    return ^(NSLayoutAttribute attr) {
-        return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr];
-    };
-}
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-
-- (MASViewAttribute *)mas_firstBaseline {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline];
-}
-- (MASViewAttribute *)mas_lastBaseline {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline];
-}
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-
-- (MASViewAttribute *)mas_leftMargin {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin];
-}
-
-- (MASViewAttribute *)mas_rightMargin {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin];
-}
-
-- (MASViewAttribute *)mas_topMargin {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin];
-}
-
-- (MASViewAttribute *)mas_bottomMargin {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin];
-}
-
-- (MASViewAttribute *)mas_leadingMargin {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin];
-}
-
-- (MASViewAttribute *)mas_trailingMargin {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin];
-}
-
-- (MASViewAttribute *)mas_centerXWithinMargins {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins];
-}
-
-- (MASViewAttribute *)mas_centerYWithinMargins {
-    return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins];
-}
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
-
-- (MASViewAttribute *)mas_safeAreaLayoutGuide {
-    return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
-}
-- (MASViewAttribute *)mas_safeAreaLayoutGuideTop {
-    return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeTop];
-}
-- (MASViewAttribute *)mas_safeAreaLayoutGuideBottom {
-    return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
-}
-- (MASViewAttribute *)mas_safeAreaLayoutGuideLeft {
-    return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeLeft];
-}
-- (MASViewAttribute *)mas_safeAreaLayoutGuideRight {
-    return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeRight];
-}
-
-#endif
-
-#pragma mark - associated properties
-
-- (id)mas_key {
-    return objc_getAssociatedObject(self, @selector(mas_key));
-}
-
-- (void)setMas_key:(id)key {
-    objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-}
-
-#pragma mark - heirachy
-
-- (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view {
-    MAS_VIEW *closestCommonSuperview = nil;
-
-    MAS_VIEW *secondViewSuperview = view;
-    while (!closestCommonSuperview && secondViewSuperview) {
-        MAS_VIEW *firstViewSuperview = self;
-        while (!closestCommonSuperview && firstViewSuperview) {
-            if (secondViewSuperview == firstViewSuperview) {
-                closestCommonSuperview = secondViewSuperview;
-            }
-            firstViewSuperview = firstViewSuperview.superview;
-        }
-        secondViewSuperview = secondViewSuperview.superview;
-    }
-    return closestCommonSuperview;
-}
-
-@end

+ 0 - 133
Pods/Masonry/Masonry/View+MASShorthandAdditions.h

@@ -1,133 +0,0 @@
-//
-//  UIView+MASShorthandAdditions.h
-//  Masonry
-//
-//  Created by Jonas Budelmann on 22/07/13.
-//  Copyright (c) 2013 Jonas Budelmann. All rights reserved.
-//
-
-#import "View+MASAdditions.h"
-
-#ifdef MAS_SHORTHAND
-
-/**
- *	Shorthand view additions without the 'mas_' prefixes,
- *  only enabled if MAS_SHORTHAND is defined
- */
-@interface MAS_VIEW (MASShorthandAdditions)
-
-@property (nonatomic, strong, readonly) MASViewAttribute *left;
-@property (nonatomic, strong, readonly) MASViewAttribute *top;
-@property (nonatomic, strong, readonly) MASViewAttribute *right;
-@property (nonatomic, strong, readonly) MASViewAttribute *bottom;
-@property (nonatomic, strong, readonly) MASViewAttribute *leading;
-@property (nonatomic, strong, readonly) MASViewAttribute *trailing;
-@property (nonatomic, strong, readonly) MASViewAttribute *width;
-@property (nonatomic, strong, readonly) MASViewAttribute *height;
-@property (nonatomic, strong, readonly) MASViewAttribute *centerX;
-@property (nonatomic, strong, readonly) MASViewAttribute *centerY;
-@property (nonatomic, strong, readonly) MASViewAttribute *baseline;
-@property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr);
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-
-@property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline;
-@property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline;
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-
-@property (nonatomic, strong, readonly) MASViewAttribute *leftMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *rightMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *topMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin;
-@property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins;
-@property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins;
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
-
-@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0));
-
-#endif
-
-- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
-- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
-- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
-
-@end
-
-#define MAS_ATTR_FORWARD(attr)  \
-- (MASViewAttribute *)attr {    \
-    return [self mas_##attr];   \
-}
-
-@implementation MAS_VIEW (MASShorthandAdditions)
-
-MAS_ATTR_FORWARD(top);
-MAS_ATTR_FORWARD(left);
-MAS_ATTR_FORWARD(bottom);
-MAS_ATTR_FORWARD(right);
-MAS_ATTR_FORWARD(leading);
-MAS_ATTR_FORWARD(trailing);
-MAS_ATTR_FORWARD(width);
-MAS_ATTR_FORWARD(height);
-MAS_ATTR_FORWARD(centerX);
-MAS_ATTR_FORWARD(centerY);
-MAS_ATTR_FORWARD(baseline);
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
-
-MAS_ATTR_FORWARD(firstBaseline);
-MAS_ATTR_FORWARD(lastBaseline);
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000)
-
-MAS_ATTR_FORWARD(leftMargin);
-MAS_ATTR_FORWARD(rightMargin);
-MAS_ATTR_FORWARD(topMargin);
-MAS_ATTR_FORWARD(bottomMargin);
-MAS_ATTR_FORWARD(leadingMargin);
-MAS_ATTR_FORWARD(trailingMargin);
-MAS_ATTR_FORWARD(centerXWithinMargins);
-MAS_ATTR_FORWARD(centerYWithinMargins);
-
-#endif
-
-#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
-
-MAS_ATTR_FORWARD(safeAreaLayoutGuideTop);
-MAS_ATTR_FORWARD(safeAreaLayoutGuideBottom);
-MAS_ATTR_FORWARD(safeAreaLayoutGuideLeft);
-MAS_ATTR_FORWARD(safeAreaLayoutGuideRight);
-
-#endif
-
-- (MASViewAttribute *(^)(NSLayoutAttribute))attribute {
-    return [self mas_attribute];
-}
-
-- (NSArray *)makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block {
-    return [self mas_makeConstraints:block];
-}
-
-- (NSArray *)updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block {
-    return [self mas_updateConstraints:block];
-}
-
-- (NSArray *)remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block {
-    return [self mas_remakeConstraints:block];
-}
-
-@end
-
-#endif

+ 0 - 30
Pods/Masonry/Masonry/ViewController+MASAdditions.h

@@ -1,30 +0,0 @@
-//
-//  UIViewController+MASAdditions.h
-//  Masonry
-//
-//  Created by Craig Siemens on 2015-06-23.
-//
-//
-
-#import "MASUtilities.h"
-#import "MASConstraintMaker.h"
-#import "MASViewAttribute.h"
-
-#ifdef MAS_VIEW_CONTROLLER
-
-@interface MAS_VIEW_CONTROLLER (MASAdditions)
-
-/**
- *	following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute
- */
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop;
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom;
-
-
-@end
-
-#endif

+ 0 - 39
Pods/Masonry/Masonry/ViewController+MASAdditions.m

@@ -1,39 +0,0 @@
-//
-//  UIViewController+MASAdditions.m
-//  Masonry
-//
-//  Created by Craig Siemens on 2015-06-23.
-//
-//
-
-#import "ViewController+MASAdditions.h"
-
-#ifdef MAS_VIEW_CONTROLLER
-
-@implementation MAS_VIEW_CONTROLLER (MASAdditions)
-
-- (MASViewAttribute *)mas_topLayoutGuide {
-    return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
-}
-- (MASViewAttribute *)mas_topLayoutGuideTop {
-    return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop];
-}
-- (MASViewAttribute *)mas_topLayoutGuideBottom {
-    return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
-}
-
-- (MASViewAttribute *)mas_bottomLayoutGuide {
-    return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
-}
-- (MASViewAttribute *)mas_bottomLayoutGuideTop {
-    return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
-}
-- (MASViewAttribute *)mas_bottomLayoutGuideBottom {
-    return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
-}
-
-
-
-@end
-
-#endif

+ 0 - 415
Pods/Masonry/README.md

@@ -1,415 +0,0 @@
-# Masonry [![Build Status](https://travis-ci.org/SnapKit/Masonry.svg?branch=master)](https://travis-ci.org/SnapKit/Masonry) [![Coverage Status](https://img.shields.io/coveralls/SnapKit/Masonry.svg?style=flat-square)](https://coveralls.io/r/SnapKit/Masonry) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![Pod Version](https://img.shields.io/cocoapods/v/Masonry.svg?style=flat)
-
-**Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're using Swift in your project, we recommend using [SnapKit](https://github.com/SnapKit/SnapKit) as it provides better type safety with a simpler API.**
-
-Masonry is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Masonry has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code that is more concise and readable.
-Masonry supports iOS and Mac OS X.
-
-For examples take a look at the **Masonry iOS Examples** project in the Masonry workspace. You will need to run `pod install` after downloading.
-
-## What's wrong with NSLayoutConstraints?
-
-Under the hood Auto Layout is a powerful and flexible way of organising and laying out your views. However creating constraints from code is verbose and not very descriptive.
-Imagine a simple example in which you want to have a view fill its superview but inset by 10 pixels on every side
-```obj-c
-UIView *superview = self.view;
-
-UIView *view1 = [[UIView alloc] init];
-view1.translatesAutoresizingMaskIntoConstraints = NO;
-view1.backgroundColor = [UIColor greenColor];
-[superview addSubview:view1];
-
-UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10);
-
-[superview addConstraints:@[
-
-    //view1 constraints
-    [NSLayoutConstraint constraintWithItem:view1
-                                 attribute:NSLayoutAttributeTop
-                                 relatedBy:NSLayoutRelationEqual
-                                    toItem:superview
-                                 attribute:NSLayoutAttributeTop
-                                multiplier:1.0
-                                  constant:padding.top],
-
-    [NSLayoutConstraint constraintWithItem:view1
-                                 attribute:NSLayoutAttributeLeft
-                                 relatedBy:NSLayoutRelationEqual
-                                    toItem:superview
-                                 attribute:NSLayoutAttributeLeft
-                                multiplier:1.0
-                                  constant:padding.left],
-
-    [NSLayoutConstraint constraintWithItem:view1
-                                 attribute:NSLayoutAttributeBottom
-                                 relatedBy:NSLayoutRelationEqual
-                                    toItem:superview
-                                 attribute:NSLayoutAttributeBottom
-                                multiplier:1.0
-                                  constant:-padding.bottom],
-
-    [NSLayoutConstraint constraintWithItem:view1
-                                 attribute:NSLayoutAttributeRight
-                                 relatedBy:NSLayoutRelationEqual
-                                    toItem:superview
-                                 attribute:NSLayoutAttributeRight
-                                multiplier:1
-                                  constant:-padding.right],
-
- ]];
-```
-Even with such a simple example the code needed is quite verbose and quickly becomes unreadable when you have more than 2 or 3 views.
-Another option is to use Visual Format Language (VFL), which is a bit less long winded.
-However the ASCII type syntax has its own pitfalls and its also a bit harder to animate as `NSLayoutConstraint constraintsWithVisualFormat:` returns an array.
-
-## Prepare to meet your Maker!
-
-Heres the same constraints created using MASConstraintMaker
-
-```obj-c
-UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10);
-
-[view1 mas_makeConstraints:^(MASConstraintMaker *make) {
-    make.top.equalTo(superview.mas_top).with.offset(padding.top); //with is an optional semantic filler
-    make.left.equalTo(superview.mas_left).with.offset(padding.left);
-    make.bottom.equalTo(superview.mas_bottom).with.offset(-padding.bottom);
-    make.right.equalTo(superview.mas_right).with.offset(-padding.right);
-}];
-```
-Or even shorter
-
-```obj-c
-[view1 mas_makeConstraints:^(MASConstraintMaker *make) {
-    make.edges.equalTo(superview).with.insets(padding);
-}];
-```
-
-Also note in the first example we had to add the constraints to the superview `[superview addConstraints:...`.
-Masonry however will automagically add constraints to the appropriate view.
-
-Masonry will also call `view1.translatesAutoresizingMaskIntoConstraints = NO;` for you.
-
-## Not all things are created equal
-
-> `.equalTo` equivalent to **NSLayoutRelationEqual**
-
-> `.lessThanOrEqualTo` equivalent to **NSLayoutRelationLessThanOrEqual**
-
-> `.greaterThanOrEqualTo` equivalent to **NSLayoutRelationGreaterThanOrEqual**
-
-These three equality constraints accept one argument which can be any of the following:
-
-#### 1. MASViewAttribute
-
-```obj-c
-make.centerX.lessThanOrEqualTo(view2.mas_left);
-```
-
-MASViewAttribute           |  NSLayoutAttribute
--------------------------  |  --------------------------
-view.mas_left              |  NSLayoutAttributeLeft
-view.mas_right             |  NSLayoutAttributeRight
-view.mas_top               |  NSLayoutAttributeTop
-view.mas_bottom            |  NSLayoutAttributeBottom
-view.mas_leading           |  NSLayoutAttributeLeading
-view.mas_trailing          |  NSLayoutAttributeTrailing
-view.mas_width             |  NSLayoutAttributeWidth
-view.mas_height            |  NSLayoutAttributeHeight
-view.mas_centerX           |  NSLayoutAttributeCenterX
-view.mas_centerY           |  NSLayoutAttributeCenterY
-view.mas_baseline          |  NSLayoutAttributeBaseline
-
-#### 2. UIView/NSView
-
-if you want view.left to be greater than or equal to label.left :
-```obj-c
-//these two constraints are exactly the same
-make.left.greaterThanOrEqualTo(label);
-make.left.greaterThanOrEqualTo(label.mas_left);
-```
-
-#### 3. NSNumber
-
-Auto Layout allows width and height to be set to constant values.
-if you want to set view to have a minimum and maximum width you could pass a number to the equality blocks:
-```obj-c
-//width >= 200 && width <= 400
-make.width.greaterThanOrEqualTo(@200);
-make.width.lessThanOrEqualTo(@400)
-```
-
-However Auto Layout does not allow alignment attributes such as left, right, centerY etc to be set to constant values.
-So if you pass a NSNumber for these attributes Masonry will turn these into constraints relative to the view&rsquo;s superview ie:
-```obj-c
-//creates view.left = view.superview.left + 10
-make.left.lessThanOrEqualTo(@10)
-```
-
-Instead of using NSNumber, you can use primitives and structs to build your constraints, like so:
-```obj-c
-make.top.mas_equalTo(42);
-make.height.mas_equalTo(20);
-make.size.mas_equalTo(CGSizeMake(50, 100));
-make.edges.mas_equalTo(UIEdgeInsetsMake(10, 0, 10, 0));
-make.left.mas_equalTo(view).mas_offset(UIEdgeInsetsMake(10, 0, 10, 0));
-```
-
-By default, macros which support [autoboxing](https://en.wikipedia.org/wiki/Autoboxing#Autoboxing) are prefixed with `mas_`. Unprefixed versions are available by defining `MAS_SHORTHAND_GLOBALS` before importing Masonry.
-
-#### 4. NSArray
-
-An array of a mixture of any of the previous types
-```obj-c
-make.height.equalTo(@[view1.mas_height, view2.mas_height]);
-make.height.equalTo(@[view1, view2]);
-make.left.equalTo(@[view1, @100, view3.right]);
-````
-
-## Learn to prioritize
-
-> `.priority` allows you to specify an exact priority
-
-> `.priorityHigh` equivalent to **UILayoutPriorityDefaultHigh**
-
-> `.priorityMedium` is half way between high and low
-
-> `.priorityLow` equivalent to **UILayoutPriorityDefaultLow**
-
-Priorities are can be tacked on to the end of a constraint chain like so:
-```obj-c
-make.left.greaterThanOrEqualTo(label.mas_left).with.priorityLow();
-
-make.top.equalTo(label.mas_top).with.priority(600);
-```
-
-## Composition, composition, composition
-
-Masonry also gives you a few convenience methods which create multiple constraints at the same time. These are called MASCompositeConstraints
-
-#### edges
-
-```obj-c
-// make top, left, bottom, right equal view2
-make.edges.equalTo(view2);
-
-// make top = superview.top + 5, left = superview.left + 10,
-//      bottom = superview.bottom - 15, right = superview.right - 20
-make.edges.equalTo(superview).insets(UIEdgeInsetsMake(5, 10, 15, 20))
-```
-
-#### size
-
-```obj-c
-// make width and height greater than or equal to titleLabel
-make.size.greaterThanOrEqualTo(titleLabel)
-
-// make width = superview.width + 100, height = superview.height - 50
-make.size.equalTo(superview).sizeOffset(CGSizeMake(100, -50))
-```
-
-#### center
-```obj-c
-// make centerX and centerY = button1
-make.center.equalTo(button1)
-
-// make centerX = superview.centerX - 5, centerY = superview.centerY + 10
-make.center.equalTo(superview).centerOffset(CGPointMake(-5, 10))
-```
-
-You can chain view attributes for increased readability:
-
-```obj-c
-// All edges but the top should equal those of the superview
-make.left.right.and.bottom.equalTo(superview);
-make.top.equalTo(otherView);
-```
-
-## Hold on for dear life
-
-Sometimes you need modify existing constraints in order to animate or remove/replace constraints.
-In Masonry there are a few different approaches to updating constraints.
-
-#### 1. References
-You can hold on to a reference of a particular constraint by assigning the result of a constraint make expression to a local variable or a class property.
-You could also reference multiple constraints by storing them away in an array.
-
-```obj-c
-// in public/private interface
-@property (nonatomic, strong) MASConstraint *topConstraint;
-
-...
-
-// when making constraints
-[view1 mas_makeConstraints:^(MASConstraintMaker *make) {
-    self.topConstraint = make.top.equalTo(superview.mas_top).with.offset(padding.top);
-    make.left.equalTo(superview.mas_left).with.offset(padding.left);
-}];
-
-...
-// then later you can call
-[self.topConstraint uninstall];
-```
-
-#### 2. mas_updateConstraints
-Alternatively if you are only updating the constant value of the constraint you can use the convience method `mas_updateConstraints` instead of `mas_makeConstraints`
-
-```obj-c
-// this is Apple's recommended place for adding/updating constraints
-// this method can get called multiple times in response to setNeedsUpdateConstraints
-// which can be called by UIKit internally or in your code if you need to trigger an update to your constraints
-- (void)updateConstraints {
-    [self.growingButton mas_updateConstraints:^(MASConstraintMaker *make) {
-        make.center.equalTo(self);
-        make.width.equalTo(@(self.buttonSize.width)).priorityLow();
-        make.height.equalTo(@(self.buttonSize.height)).priorityLow();
-        make.width.lessThanOrEqualTo(self);
-        make.height.lessThanOrEqualTo(self);
-    }];
-
-    //according to apple super should be called at end of method
-    [super updateConstraints];
-}
-```
-
-### 3. mas_remakeConstraints
-`mas_updateConstraints` is useful for updating a set of constraints, but doing anything beyond updating constant values can get exhausting. That's where `mas_remakeConstraints` comes in.
-
-`mas_remakeConstraints` is similar to `mas_updateConstraints`, but instead of updating constant values, it will remove all of its constraints before installing them again. This lets you provide different constraints without having to keep around references to ones which you want to remove.
-
-```obj-c
-- (void)changeButtonPosition {
-    [self.button mas_remakeConstraints:^(MASConstraintMaker *make) {
-        make.size.equalTo(self.buttonSize);
-
-        if (topLeft) {
-        	make.top.and.left.offset(10);
-        } else {
-        	make.bottom.and.right.offset(-10);
-        }
-    }];
-}
-```
-
-You can find more detailed examples of all three approaches in the **Masonry iOS Examples** project.
-
-## When the ^&*!@ hits the fan!
-
-Laying out your views doesn't always goto plan. So when things literally go pear shaped, you don't want to be looking at console output like this:
-
-```obj-c
-Unable to simultaneously satisfy constraints.....blah blah blah....
-(
-    "<NSLayoutConstraint:0x7189ac0 V:[UILabel:0x7186980(>=5000)]>",
-    "<NSAutoresizingMaskLayoutConstraint:0x839ea20 h=--& v=--& V:[MASExampleDebuggingView:0x7186560(416)]>",
-    "<NSLayoutConstraint:0x7189c70 UILabel:0x7186980.bottom == MASExampleDebuggingView:0x7186560.bottom - 10>",
-    "<NSLayoutConstraint:0x7189560 V:|-(1)-[UILabel:0x7186980]   (Names: '|':MASExampleDebuggingView:0x7186560 )>"
-)
-
-Will attempt to recover by breaking constraint
-<NSLayoutConstraint:0x7189ac0 V:[UILabel:0x7186980(>=5000)]>
-```
-
-Masonry adds a category to NSLayoutConstraint which overrides the default implementation of `- (NSString *)description`.
-Now you can give meaningful names to views and constraints, and also easily pick out the constraints created by Masonry.
-
-which means your console output can now look like this:
-
-```obj-c
-Unable to simultaneously satisfy constraints......blah blah blah....
-(
-    "<NSAutoresizingMaskLayoutConstraint:0x8887740 MASExampleDebuggingView:superview.height == 416>",
-    "<MASLayoutConstraint:ConstantConstraint UILabel:messageLabel.height >= 5000>",
-    "<MASLayoutConstraint:BottomConstraint UILabel:messageLabel.bottom == MASExampleDebuggingView:superview.bottom - 10>",
-    "<MASLayoutConstraint:ConflictingConstraint[0] UILabel:messageLabel.top == MASExampleDebuggingView:superview.top + 1>"
-)
-
-Will attempt to recover by breaking constraint
-<MASLayoutConstraint:ConstantConstraint UILabel:messageLabel.height >= 5000>
-```
-
-For an example of how to set this up take a look at the **Masonry iOS Examples** project in the Masonry workspace.
-
-## Where should I create my constraints?
-
-```objc
-@implementation DIYCustomView
-
-- (id)init {
-    self = [super init];
-    if (!self) return nil;
-
-    // --- Create your views here ---
-    self.button = [[UIButton alloc] init];
-
-    return self;
-}
-
-// tell UIKit that you are using AutoLayout
-+ (BOOL)requiresConstraintBasedLayout {
-    return YES;
-}
-
-// this is Apple's recommended place for adding/updating constraints
-- (void)updateConstraints {
-
-    // --- remake/update constraints here
-    [self.button remakeConstraints:^(MASConstraintMaker *make) {
-        make.width.equalTo(@(self.buttonSize.width));
-        make.height.equalTo(@(self.buttonSize.height));
-    }];
-    
-    //according to apple super should be called at end of method
-    [super updateConstraints];
-}
-
-- (void)didTapButton:(UIButton *)button {
-    // --- Do your changes ie change variables that affect your layout etc ---
-    self.buttonSize = CGSize(200, 200);
-
-    // tell constraints they need updating
-    [self setNeedsUpdateConstraints];
-}
-
-@end
-```
-
-## Installation
-Use the [orsome](http://www.youtube.com/watch?v=YaIZF8uUTtk) [CocoaPods](http://github.com/CocoaPods/CocoaPods).
-
-In your Podfile
->`pod 'Masonry'`
-
-If you want to use masonry without all those pesky 'mas_' prefixes. Add #define MAS_SHORTHAND to your prefix.pch before importing Masonry
->`#define MAS_SHORTHAND`
-
-Get busy Masoning
->`#import "Masonry.h"`
-
-## Code Snippets
-
-Copy the included code snippets to ``~/Library/Developer/Xcode/UserData/CodeSnippets`` to write your masonry blocks at lightning speed!
-
-`mas_make` -> ` [<#view#> mas_makeConstraints:^(MASConstraintMaker *make) {
-     <#code#>
- }];`
-
-`mas_update` -> ` [<#view#> mas_updateConstraints:^(MASConstraintMaker *make) {
-     <#code#>
- }];`
-
-`mas_remake` -> ` [<#view#> mas_remakeConstraints:^(MASConstraintMaker *make) {
-     <#code#>
- }];`
-
-## Features
-* Not limited to subset of Auto Layout. Anything NSLayoutConstraint can do, Masonry can do too!
-* Great debug support, give your views and constraints meaningful names.
-* Constraints read like sentences.
-* No crazy macro magic. Masonry won't pollute the global namespace with macros.
-* Not string or dictionary based and hence you get compile time checking.
-
-## TODO
-* Eye candy
-* Mac example project
-* More tests and examples
-

Diff do ficheiro suprimidas por serem muito extensas
+ 524 - 800
Pods/Pods.xcodeproj/project.pbxproj


+ 0 - 58
Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/Alamofire.xcscheme

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "1600"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "EAAA1AD3A8A1B59AB91319EE40752C6D"
-               BuildableName = "Alamofire.framework"
-               BlueprintName = "Alamofire"
-               ReferencedContainer = "container:Pods.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>

+ 0 - 58
Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/Masonry.xcscheme

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "1600"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "55AF53E6C77A10ED4985E04D74A8878E"
-               BuildableName = "Masonry.framework"
-               BlueprintName = "Masonry"
-               ReferencedContainer = "container:Pods.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>

+ 0 - 58
Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/TZImagePickerController.xcscheme

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "1600"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "A96BBB982D62BB807B5BD10774BE2D07"
-               BuildableName = "TZImagePickerController.framework"
-               BlueprintName = "TZImagePickerController"
-               ReferencedContainer = "container:Pods.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>

+ 0 - 58
Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/WARangeSlider.xcscheme

@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "1600"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "67216C00A28F98CC853164CA18EA6311"
-               BuildableName = "WARangeSlider.framework"
-               BlueprintName = "WARangeSlider"
-               ReferencedContainer = "container:Pods.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>

+ 11 - 39
Pods/Pods.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -4,110 +4,82 @@
 <dict>
 	<key>SchemeUserState</key>
 	<dict>
-		<key>Alamofire.xcscheme</key>
-		<dict>
-			<key>isShown</key>
-			<false/>
-			<key>orderHint</key>
-			<integer>0</integer>
-		</dict>
 		<key>IQKeyboardManagerSwift.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>1</integer>
+			<integer>0</integer>
 		</dict>
 		<key>Kingfisher-Kingfisher.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>3</integer>
+			<integer>2</integer>
 		</dict>
 		<key>Kingfisher.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>2</integer>
+			<integer>1</integer>
 		</dict>
 		<key>MJRefresh.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>5</integer>
-		</dict>
-		<key>Masonry.xcscheme</key>
-		<dict>
-			<key>isShown</key>
-			<false/>
-			<key>orderHint</key>
-			<integer>4</integer>
+			<integer>3</integer>
 		</dict>
 		<key>ObjectMapper.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>6</integer>
+			<integer>4</integer>
 		</dict>
 		<key>Pods-TSLiveWallpaper.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>7</integer>
+			<integer>5</integer>
 		</dict>
 		<key>SnapKit-SnapKit_Privacy.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>9</integer>
+			<integer>7</integer>
 		</dict>
 		<key>SnapKit.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>8</integer>
+			<integer>6</integer>
 		</dict>
 		<key>TYCyclePagerView.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>12</integer>
-		</dict>
-		<key>TZImagePickerController.xcscheme</key>
-		<dict>
-			<key>isShown</key>
-			<false/>
-			<key>orderHint</key>
-			<integer>13</integer>
+			<integer>10</integer>
 		</dict>
 		<key>Toast-Swift-Toast-Swift.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>11</integer>
+			<integer>9</integer>
 		</dict>
 		<key>Toast-Swift.xcscheme</key>
 		<dict>
 			<key>isShown</key>
 			<false/>
 			<key>orderHint</key>
-			<integer>10</integer>
-		</dict>
-		<key>WARangeSlider.xcscheme</key>
-		<dict>
-			<key>isShown</key>
-			<false/>
-			<key>orderHint</key>
-			<integer>14</integer>
+			<integer>8</integer>
 		</dict>
 	</dict>
 	<key>SuppressBuildableAutocreation</key>

+ 0 - 22
Pods/TZImagePickerController/LICENSE

@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Zhen Tan
-
-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.
-

+ 0 - 176
Pods/TZImagePickerController/README.md

@@ -1,176 +0,0 @@
-# TZImagePickerController
-[![CocoaPods](https://img.shields.io/cocoapods/v/TZImagePickerController.svg?style=flat)](https://github.com/banchichen/TZImagePickerController)
-[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
-
-
- A clone of UIImagePickerController, support picking multiple photos、original photo、video, also allow preview photo and video, support iOS10+.   
- 一个支持多选、选原图和视频的图片选择器,同时有预览功能,支持iOS10+。
- 
-## 重要提示1:提issue前,请先对照Demo、常见问题自查!Demo正常说明你可以升级下新版试试。          
- 
-## 重要提示2:3.8.8版本修复了iOS18下无照片和openURL失效的问题       
-     关于iOS14模拟器的问题
- PHAuthorizationStatusLimited授权模式下,iOS14模拟器有bug,未授权照片无法显示,真机正常,暂可忽略:https://github.com/banchichen/TZImagePickerController/issues/1347 
- 
-     关于升级iOS10和Xcdoe8的提示:    
- 在Xcode8环境下将项目运行在iOS10的设备/模拟器中,访问相册和相机需要额外配置info.plist文件。分别是Privacy - Photo Library Usage Description和Privacy - Camera Usage Description字段,详见Demo中info.plist中的设置。
-    
-     项目截图 1.Demo首页 2.照片列表页 3.照片预览页 4.视频预览页
-<img src="https://github.com/banchichen/TZImagePickerController/blob/master/TZImagePickerController/ScreenShots/DemoPage.png" width="40%" height="40%"><img src="https://github.com/banchichen/TZImagePickerController/blob/master/TZImagePickerController/ScreenShots/photoPickerVc.PNG" width="40%" height="40%">
-<img src="https://github.com/banchichen/TZImagePickerController/blob/master/TZImagePickerController/ScreenShots/photoPreviewVc.PNG" width="40%" height="40%"><img src="https://github.com/banchichen/TZImagePickerController/blob/master/TZImagePickerController/ScreenShots/videoPlayerVc.PNG" width="40%" height="40%">
-
-## 一. Installation 安装
-
-#### CocoaPods
-> pod 'TZImagePickerController'        # Full version with all features      
-> pod 'TZImagePickerController/Basic'  # No location code        
-
-#### Carthage
-> github "banchichen/TZImagePickerController"
-
-#### 手动安装
-> 将TZImagePickerController文件夹拽入项目中,导入头文件:#import "TZImagePickerController.h"
-
-## 二. Example 例子
-
-    TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:9 delegate:self];
-    
-    // You can get the photos by block, the same as by delegate.
-    // 你可以通过block或者代理,来得到用户选择的照片.
-    [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
-    
-    }];
-    [self presentViewController:imagePickerVc animated:YES completion:nil];
-  
-## 三. Requirements 要求
-   iOS 10 or later.      
-   支持iOS10及以上系统。      
-  
-   TZImagePickerController uses Camera、Location、Microphone、Photo Library,you need add these properties to info.plist like Demo:       
-   TZImagePickerController使用了相机、定位、麦克风、相册,请参考Demo添加下列属性到info.plist文件:        
-   	`Privacy - Camera Usage Description`     
-    `Privacy - Location Usage Description`    
-	`Privacy - Location When In Use Usage Description`    
- 	`Privacy - Microphone Usage Description`   
- 	`Privacy - Photo Library Usage Description`   
-    `Prevent limited photos access alert`    
-   
-## 四. More 更多 
-
-  If you find a bug, please create a issue.  
-  More information please view code.  
-  如果你发现了bug,请提一个issue。 
-  更多信息详见代码,也可查看我的博客: [我的博客](http://www.jianshu.com/p/1975411a31bb "半尺尘 - 简书")
-  
-      关于issue: 
-  请尽可能详细地描述**系统版本**、**手机型号**、**库的版本**、**崩溃日志**和**复现步骤**,**请先更新到最新版再测试一下**,如果新版还存在再提~如果已有开启的类似issue,请直接在该issue下评论说出你的问题
-  
-## 五. FAQ 常见问题    
-
-**Q:pod search TZImagePickerController 搜索出来的不是最新版本**       
-A:需要在终端执行cd转换文件路径命令退回到Desktop,然后执行pod setup命令更新本地spec缓存(可能需要几分钟),然后再搜索就可以了       
-     
-**Q:拍照后照片保存失败**         
-A:请参考issue481:https://github.com/banchichen/TZImagePickerController/issues/481 的信息排查,若还有问题请直接在issue内评论   
- 
-**Q:photos数组图片不是原图,如何获取原图?**        
-A:请参考issue457的解释:https://github.com/banchichen/TZImagePickerController/issues/457    
-
-**Q:系统语言是中文/英文,界面上却有部分相册名字、返回按钮显示成了英文/中文?**        
-A:请参考 https://github.com/banchichen/TZImagePickerController/issues/443 和 https://github.com/banchichen/TZImagePickerController/issues/929          
- 
-**Q:预览界面能否支持传入NSURL、UIImage对象?**        
-A:3.0.1版本已支持,需新接一个库:[TZImagePreviewController](https://github.com/banchichen/TZImagePreviewController),请参考里面的Demo使用。       
-
-**Q:设置可选视频的最大/最小时长?照片的最小/最大尺寸?不符合要求的不显示**       
-A:可以的,参照Demo的isAssetCanBeDisplayed方法实现。我会返回asset出来,显示与否你来决定,注意这个是一个同步方法,对于需要根据asset去异步获取的信息如视频的大小、视频是否存在iCloud里来过滤的,无法做到。如果真要这样做,相册打开速度会变慢,你需要改我源码。       
-如果需要显示,选择时才提醒用户不可选,则实现isAssetCanBeSelected,用户选择时会调用它        
-
-**Q:预览页面出现了导航栏?**        
-A:https://github.com/banchichen/TZImagePickerController/issues/652         
-   
-**Q:可否增加微信编辑图片的功能?**           
-A:考虑下,优先级低  
-
-**Q:是否有QQ/微信群/钉钉群?**            
-A:有「钉钉群:33192786」和「QQ群:859033147」,推荐加钉钉群,答疑响应更快         
-
-**Q:想提交一个Pull Request?**           
-A:请先加钉钉群(33192786)说下方案,和我确认下,避免同时改动同一处内容。**一个PR请只修复1个问题,变动内容越少越好**。     
-
-**Q:demo在真机上跑不起来?**             
-A:1、team选你自己的;2、bundleId也改成你自己的或改成一个不会和别人重复的。可参考[简书的这篇博客](https://www.jianshu.com/p/cbe59138fca6)             
-
-**Q:3.6.4以上版本设置导航栏颜色无效?**            
-A:参考Demo里的代码,加上imagePickerVc.navigationBar.standardAppearance的相关设置                     
-
-**Q:设置导航栏颜色无效?导航栏颜色总是白色?**            
-A:是否有集成WRNavigationBar?如有,参考其readme调一下它的wr_setBlackList,把TZImagePickerController相关的控制器放到黑名单里,使得不受WRNavigationBar的影响。如果没有集成,可在issues列表里搜一下看看类似的issue参考下,如实在没头绪,可加群提供个能复现该问题的demo,0~2天给你解决。最近发现WRNavigationBar的黑名单会有不生效的情况,临时解决方案大家可参考:[https://github.com/wangrui460/WRNavigationBar/issues/145](https://github.com/wangrui460/WRNavigationBar/issues/145)                          
-
-**Q:导航栏没了?**            
-A:是否有集成GKNavigationBarViewController?需要升级到2.0.4及以上版本,详见issue:[https://github.com/QuintGao/GKNavigationBarViewController/issues/7](https://github.com/QuintGao/GKNavigationBarViewController/issues/7)。       
-
-**Q:有的视频导出失败?**            
-A:升级到2.2.6及以上版本试试,发现是修正视频转向导致的,2.2.6开始默认不再主动修正。如需打开,可设置needFixComposition为YES,但有几率导致安卓拍的视频导出失败。此外也可参考这个issue:https://github.com/banchichen/TZImagePickerController/issues/1073       
-
-**Q:视频导出慢?**            
-A:视频导出分两步,第一步是通过PHAsset获取AVURLAsset,如是iCloud视频则涉及到网络请求,耗时容易不可控,第二步是通过AVURLAsset把视频保存到沙盒,耗时不算多。但第一步耗时不可控,你可以拷贝我源码出来拿到第一步的进度给用户一个进度提示...     
-
-**Q:有的图片info里没有PHImageFileURLKey?**            
-A:不要去拿PHImageFileURLKey,没用的,只有通过Photos框架才能访问相册照片,光拿一个路径没用。        
-如果需要通过路径上传照片,请先把UIImage保存到沙盒,**用沙盒路径**。           
-如果你上传照片需要一个名字参数,请参考Demo**直接用照片名字**。          
-
-## 六. Release Notes 最近更新     
-
-**3.8.8 支持iOS18,修复openURL的失效问题** [#1686](https://github.com/banchichen/TZImagePickerController/issues/1686)               
-**3.8.5 新增隐私清单文件** [#1675](https://github.com/banchichen/TZImagePickerController/pull/1675)               
-**3.8.4 支持使用不带定位代码的版本** [#1606](https://github.com/banchichen/TZImagePickerController/pull/1606)               
-3.8.1 iOS14下可添加访问更多照片,详见PR内的评论 [#1526](https://github.com/banchichen/TZImagePickerController/pull/1526)               
-3.7.6 修复iOS15.2下初次授权相册权限时的长时间卡顿&白屏问题 [#1547](https://github.com/banchichen/TZImagePickerController/issues/1547)               
-**3.6.7 修复Xcode13&iOS15下导航栏颜色异常问题**        
-3.6.2 新增allowEditVideo,单选视频时支持裁剪        
-3.6.0 修复iOS14下iCloud视频导出失败问题        
-**3.5.2 适配iPhone12系列设备**        
-3.4.4 支持Dark Mode      
-3.4.2 适配iOS14,若干问题修复                  
-3.3.2 适配iOS13,若干问题修复                 
-3.2.1 新增裁剪用scaleAspectFillCrop属性,设置为YES后,照片尺寸小于裁剪框时会自动放大撑满                
-3.2.0 加入用NSOperationQueue控制获取原图并发数降低内存的示例          
-3.1.8 批量获取图片时加入队列控制,尝试优化大批量选择图片时CPU和内存占用过高的问题(仍然危险,maxImagesCount谨慎设置过大...)             
-3.1.5 相册内无照片时给出提示,修复快速滑动时内存一直增加的问题           
-3.1.3 适配阿拉伯等语言下从右往左布局的特性         
-3.0.8 新增gifImagePlayBlock允许使用FLAnimatedImage等替换内部的GIF播放方案         
-3.0.7 适配iPhoneXR、XS、XS Max           
-3.0.6 优化保存照片、视频的方法        
-3.0.1 新增对[TZImagePreviewController](https://github.com/banchichen/TZImagePreviewController)库的支持,允许预览UIImage、NSURL、PHAsset对象       
-**3.0.0 去除iOS6和7的适配代码,更轻量,最低支持iOS8**      
-2.2.6 新增needFixComposition属性,默认为NO,不再主动修正视频转向,防止部分安卓拍的视频导出失败(**最后一个支持iOS6和7的版本**)          
-2.1.5 修复开启showSelectedIndex后照片列表页iCloud图片进度条紊乱的bug              
-2.1.4 新增多个页面和组件的样式自定义block,允许自定义绝大多数UI样式              
-2.1.2 新增showPhotoCannotSelectLayer属性,当已选照片张数达到最大可选张数时,可像微信一样让其它照片显示一个提示不可选的浮层            
-2.1.1 新增是否显示图片选中序号的属性,优化一些细节                 
-2.1.0.3 新增拍摄视频功能,优化一些细节           
-2.0.0.6 优化自定义languageBundle的支持,加入使用示例       
-2.0.0.5 优化性能,提高选择器打开速度,新增越南语支持    
-2.0.0.2 新增繁体语言,可设置首选语言,国际化支持更强大;优化一些细节     
-1.9.8  支持Carthage,优化一些细节    
-1.9.6  优化视频预览和gif预览页toolbar在iPhoneX上的样式      
-...   
-1.8.4  加入横竖屏适配;支持视频/gif多选;支持视频和照片一起选    
-1.8.1  新增2个代理方法,支持由上层来决定相册/照片的显示与否     
-...   
-1.7.7  支持GIF图片的播放和选择    
-1.7.6  支持对共享相册和同步相册的显示     
-1.7.5  允许不进入预览页面直接选择照片     
-1.7.4  支持单选模式下裁剪照片,支持任意矩形和圆形裁剪框    
-1.7.3  优化iCloud照片的显示与选择    
-...   
-1.5.0  可把拍照按钮放在外面;可自定义照片排序方式;Demo页的UI大改版,新增若干开关;   
-...      
-1.4.5  性能大幅提升(性能测试截图请去博客查看);可在照片列表页拍照;Demo大幅优化;   
-...        
-
-## 七. Common links 常用链接    
-1. Json diff online: https://www.jsondiffonline.com/       
-

+ 0 - 27
Pods/TZImagePickerController/TZImagePickerController/Location/TZLocationManager.h

@@ -1,27 +0,0 @@
-//
-//  TZLocationManager.h
-//  TZImagePickerController
-//
-//  Created by 谭真 on 2017/06/03.
-//  Copyright © 2017年 谭真. All rights reserved.
-//  定位管理类
-
-
-#import <Foundation/Foundation.h>
-#import <CoreLocation/CoreLocation.h>
-
-@interface TZLocationManager : NSObject
-
-+ (instancetype)manager NS_SWIFT_NAME(default());
-
-/// 开始定位
-- (void)startLocation;
-- (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))successBlock failureBlock:(void (^)(NSError *error))failureBlock;
-- (void)startLocationWithGeocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock;
-- (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))successBlock failureBlock:(void (^)(NSError *error))failureBlock geocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock;
-
-/// 结束定位
-- (void)stopUpdatingLocation;
-
-@end
-

+ 0 - 90
Pods/TZImagePickerController/TZImagePickerController/Location/TZLocationManager.m

@@ -1,90 +0,0 @@
-//
-//  TZLocationManager.m
-//  TZImagePickerController
-//
-//  Created by 谭真 on 2017/06/03.
-//  Copyright © 2017年 谭真. All rights reserved.
-//  定位管理类
-
-#import "TZLocationManager.h"
-
-@interface TZLocationManager ()<CLLocationManagerDelegate>
-@property (nonatomic, strong) CLLocationManager *locationManager;
-/// 定位成功的回调block
-@property (nonatomic, copy) void (^successBlock)(NSArray<CLLocation *> *);
-/// 编码成功的回调block
-@property (nonatomic, copy) void (^geocodeBlock)(NSArray *geocodeArray);
-/// 定位失败的回调block
-@property (nonatomic, copy) void (^failureBlock)(NSError *error);
-@end
-
-@implementation TZLocationManager
-
-+ (instancetype)manager {
-    static TZLocationManager *manager;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        manager = [[self alloc] init];
-        manager.locationManager = [[CLLocationManager alloc] init];
-        manager.locationManager.delegate = manager;
-        [manager.locationManager requestWhenInUseAuthorization];
-    });
-    return manager;
-}
-
-- (void)startLocation {
-    [self startLocationWithSuccessBlock:nil failureBlock:nil geocoderBlock:nil];
-}
-
-- (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))successBlock failureBlock:(void (^)(NSError *error))failureBlock {
-    [self startLocationWithSuccessBlock:successBlock failureBlock:failureBlock geocoderBlock:nil];
-}
-
-- (void)startLocationWithGeocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock {
-    [self startLocationWithSuccessBlock:nil failureBlock:nil geocoderBlock:geocoderBlock];
-}
-
-- (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))successBlock failureBlock:(void (^)(NSError *error))failureBlock geocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock {
-    [self.locationManager startUpdatingLocation];
-    _successBlock = successBlock;
-    _geocodeBlock = geocoderBlock;
-    _failureBlock = failureBlock;
-}
-
-- (void)stopUpdatingLocation {
-    [self.locationManager stopUpdatingLocation];
-}
-
-#pragma mark - CLLocationManagerDelegate
-
-/// 地理位置发生改变时触发
-- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations {
-    [manager stopUpdatingLocation];
-    
-    if (_successBlock) {
-        _successBlock(locations);
-    }
-    
-    if (_geocodeBlock && locations.count) {
-        CLGeocoder *geocoder = [[CLGeocoder alloc] init];
-        [geocoder reverseGeocodeLocation:[locations firstObject] completionHandler:^(NSArray *array, NSError *error) {
-            self->_geocodeBlock(array);
-        }];
-    }
-}
-
-/// 定位失败回调方法
-- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
-    NSLog(@"定位失败, 错误: %@",error);
-    switch([error code]) {
-        case kCLErrorDenied: { // 用户禁止了定位权限
-            
-        } break;
-        default: break;
-    }
-    if (_failureBlock) {
-        _failureBlock(error);
-    }
-}
-
-@end

+ 0 - 19
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/NSBundle+TZImagePicker.h

@@ -1,19 +0,0 @@
-//
-//  NSBundle+TZImagePicker.h
-//  TZImagePickerController
-//
-//  Created by 谭真 on 16/08/18.
-//  Copyright © 2016年 谭真. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@interface NSBundle (TZImagePicker)
-
-+ (NSBundle *)tz_imagePickerBundle;
-
-+ (NSString *)tz_localizedStringForKey:(NSString *)key value:(NSString *)value;
-+ (NSString *)tz_localizedStringForKey:(NSString *)key;
-
-@end
-

+ 0 - 35
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/NSBundle+TZImagePicker.m

@@ -1,35 +0,0 @@
-//
-//  NSBundle+TZImagePicker.m
-//  TZImagePickerController
-//
-//  Created by 谭真 on 16/08/18.
-//  Copyright © 2016年 谭真. All rights reserved.
-//
-
-#import "NSBundle+TZImagePicker.h"
-#import "TZImagePickerController.h"
-
-@implementation NSBundle (TZImagePicker)
-
-+ (NSBundle *)tz_imagePickerBundle {
-#ifdef SWIFT_PACKAGE
-    NSBundle *bundle = SWIFTPM_MODULE_BUNDLE;
-#else
-    NSBundle *bundle = [NSBundle bundleForClass:[TZImagePickerController class]];
-#endif
-    NSURL *url = [bundle URLForResource:@"TZImagePickerController" withExtension:@"bundle"];
-    bundle = [NSBundle bundleWithURL:url];
-    return bundle;
-}
-
-+ (NSString *)tz_localizedStringForKey:(NSString *)key {
-    return [self tz_localizedStringForKey:key value:@""];
-}
-
-+ (NSString *)tz_localizedStringForKey:(NSString *)key value:(NSString *)value {
-    NSBundle *bundle = [TZImagePickerConfig sharedInstance].languageBundle;
-    NSString *value1 = [bundle localizedStringForKey:key value:value table:nil];
-    return value1;
-}
-
-@end

+ 0 - 61
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetCell.h

@@ -1,61 +0,0 @@
-//
-//  TZAssetCell.h
-//  TZImagePickerController
-//
-//  Created by 谭真 on 15/12/24.
-//  Copyright © 2015年 谭真. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import <Photos/Photos.h>
-
-typedef enum : NSUInteger {
-    TZAssetCellTypePhoto = 0,
-    TZAssetCellTypeLivePhoto,
-    TZAssetCellTypePhotoGif,
-    TZAssetCellTypeVideo,
-    TZAssetCellTypeAudio,
-} TZAssetCellType;
-
-@class TZAssetModel;
-@interface TZAssetCell : UICollectionViewCell
-@property (weak, nonatomic) UIButton *selectPhotoButton;
-@property (weak, nonatomic) UIButton *cannotSelectLayerButton;
-@property (nonatomic, strong) TZAssetModel *model;
-@property (assign, nonatomic) NSInteger index;
-@property (nonatomic, copy) void (^didSelectPhotoBlock)(BOOL);
-@property (nonatomic, assign) TZAssetCellType type;
-@property (nonatomic, assign) BOOL allowPickingGif;
-@property (nonatomic, assign) BOOL allowPickingMultipleVideo;
-@property (nonatomic, copy) NSString *representedAssetIdentifier;
-@property (nonatomic, assign) int32_t imageRequestID;
-
-@property (nonatomic, strong) UIImage *photoSelImage;
-@property (nonatomic, strong) UIImage *photoDefImage;
-
-@property (nonatomic, assign) BOOL showSelectBtn;
-@property (assign, nonatomic) BOOL allowPreview;
-
-@property (nonatomic, copy) void (^assetCellDidSetModelBlock)(TZAssetCell *cell, UIImageView *imageView, UIImageView *selectImageView, UILabel *indexLabel, UIView *bottomView, UILabel *timeLength, UIImageView *videoImgView);
-@property (nonatomic, copy) void (^assetCellDidLayoutSubviewsBlock)(TZAssetCell *cell, UIImageView *imageView, UIImageView *selectImageView, UILabel *indexLabel, UIView *bottomView, UILabel *timeLength, UIImageView *videoImgView);
-@end
-
-
-@class TZAlbumModel;
-@interface TZAlbumCell : UITableViewCell
-@property (nonatomic, strong) TZAlbumModel *model;
-@property (weak, nonatomic) UIButton *selectedCountButton;
-
-@property (nonatomic, copy) void (^albumCellDidSetModelBlock)(TZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel);
-@property (nonatomic, copy) void (^albumCellDidLayoutSubviewsBlock)(TZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel);
-@end
-
-
-@interface TZAssetCameraCell : UICollectionViewCell
-@property (nonatomic, strong) UIImageView *imageView;
-@end
-
-
-@interface TZAssetAddMoreCell : TZAssetCameraCell
-@property (nonatomic, strong) UILabel *tipLabel;
-@end

+ 0 - 548
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetCell.m

@@ -1,548 +0,0 @@
-//
-//  TZAssetCell.m
-//  TZImagePickerController
-//
-//  Created by 谭真 on 15/12/24.
-//  Copyright © 2015年 谭真. All rights reserved.
-//
-
-#import "TZAssetCell.h"
-#import "TZAssetModel.h"
-#import "UIView+TZLayout.h"
-#import "TZImageManager.h"
-#import "TZImagePickerController.h"
-#import "TZProgressView.h"
-
-@interface TZAssetCell ()
-@property (weak, nonatomic) UIImageView *imageView;       // The photo / 照片
-@property (weak, nonatomic) UIImageView *selectImageView;
-@property (weak, nonatomic) UILabel *indexLabel;
-@property (weak, nonatomic) UIView *bottomView;
-@property (weak, nonatomic) UILabel *timeLength;
-@property (strong, nonatomic) UITapGestureRecognizer *tapGesture;
-
-@property (nonatomic, weak) UIImageView *videoImgView;
-@property (nonatomic, strong) TZProgressView *progressView;
-@property (nonatomic, assign) int32_t bigImageRequestID;
-@end
-
-@implementation TZAssetCell
-
-- (instancetype)initWithFrame:(CGRect)frame {
-    self = [super initWithFrame:frame];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reload:) name:@"TZ_PHOTO_PICKER_RELOAD_NOTIFICATION" object:nil];
-    return self;
-}
-
-- (void)setModel:(TZAssetModel *)model {
-    _model = model;
-    self.representedAssetIdentifier = model.asset.localIdentifier;
-    int32_t imageRequestID = [[TZImageManager manager] getPhotoWithAsset:model.asset photoWidth:self.tz_width completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) {
-        // Set the cell's thumbnail image if it's still showing the same asset.
-        if ([self.representedAssetIdentifier isEqualToString:model.asset.localIdentifier]) {
-            self.imageView.image = photo;
-            [self setNeedsLayout];
-        } else {
-            // NSLog(@"this cell is showing other asset");
-            [[PHImageManager defaultManager] cancelImageRequest:self.imageRequestID];
-        }
-        if (!isDegraded) {
-            [self hideProgressView];
-            self.imageRequestID = 0;
-        }
-    } progressHandler:nil networkAccessAllowed:NO];
-    if (imageRequestID && self.imageRequestID && imageRequestID != self.imageRequestID) {
-        [[PHImageManager defaultManager] cancelImageRequest:self.imageRequestID];
-        // NSLog(@"cancelImageRequest %d",self.imageRequestID);
-    }
-    self.imageRequestID = imageRequestID;
-    self.selectPhotoButton.selected = model.isSelected;
-    self.selectImageView.image = self.selectPhotoButton.isSelected ? self.photoSelImage : self.photoDefImage;
-    self.indexLabel.hidden = !self.selectPhotoButton.isSelected;
-    
-    self.type = (NSInteger)model.type;
-    // 让宽度/高度小于 最小可选照片尺寸 的图片不能选中
-    if (![[TZImageManager manager] isPhotoSelectableWithAsset:model.asset]) {
-        if (_selectImageView.hidden == NO) {
-            self.selectPhotoButton.hidden = YES;
-            _selectImageView.hidden = YES;
-        }
-    }
-    // 如果用户选中了该图片,提前获取一下大图
-    if (model.isSelected) {
-        [self requestBigImage];
-    } else {
-        [self cancelBigImageRequest];
-    }
-    [self setNeedsLayout];
-    
-    if (self.assetCellDidSetModelBlock) {
-        self.assetCellDidSetModelBlock(self, _imageView, _selectImageView, _indexLabel, _bottomView, _timeLength, _videoImgView);
-    }
-}
-
-- (void)setIndex:(NSInteger)index {
-    _index = index;
-    self.indexLabel.text = [NSString stringWithFormat:@"%zd", index];
-    [self.contentView bringSubviewToFront:self.indexLabel];
-}
-
-- (void)setShowSelectBtn:(BOOL)showSelectBtn {
-    _showSelectBtn = showSelectBtn;
-    BOOL selectable = [[TZImageManager manager] isPhotoSelectableWithAsset:self.model.asset];
-    if (!self.selectPhotoButton.hidden) {
-        self.selectPhotoButton.hidden = !showSelectBtn || !selectable;
-    }
-    if (!self.selectImageView.hidden) {
-        self.selectImageView.hidden = !showSelectBtn || !selectable;
-    }
-}
-
-- (void)setType:(TZAssetCellType)type {
-    _type = type;
-    if (type == TZAssetCellTypePhoto || type == TZAssetCellTypeLivePhoto || (type == TZAssetCellTypePhotoGif && !self.allowPickingGif) || self.allowPickingMultipleVideo) {
-        _selectImageView.hidden = NO;
-        _selectPhotoButton.hidden = NO;
-        _bottomView.hidden = YES;
-    } else { // Video of Gif
-        _selectImageView.hidden = YES;
-        _selectPhotoButton.hidden = YES;
-    }
-    
-    if (type == TZAssetCellTypeVideo) {
-        self.bottomView.hidden = NO;
-        self.timeLength.text = _model.timeLength;
-        self.videoImgView.hidden = NO;
-        _timeLength.tz_left = self.videoImgView.tz_right;
-        _timeLength.textAlignment = NSTextAlignmentRight;
-    } else if (type == TZAssetCellTypePhotoGif && self.allowPickingGif) {
-        self.bottomView.hidden = NO;
-        self.timeLength.text = @"GIF";
-        self.videoImgView.hidden = YES;
-        _timeLength.tz_left = 5;
-        _timeLength.textAlignment = NSTextAlignmentLeft;
-    }
-}
-
-- (void)setAllowPreview:(BOOL)allowPreview {
-    _allowPreview = allowPreview;
-    if (allowPreview) {
-        _imageView.userInteractionEnabled = NO;
-        _tapGesture.enabled = NO;
-    } else {
-        _imageView.userInteractionEnabled = YES;
-        _tapGesture.enabled = YES;
-    }
-}
-
-- (void)selectPhotoButtonClick:(UIButton *)sender {
-    if (self.didSelectPhotoBlock) {
-        self.didSelectPhotoBlock(sender.isSelected);
-    }
-    self.selectImageView.image = sender.isSelected ? self.photoSelImage : self.photoDefImage;
-    if (sender.isSelected) {
-        [UIView showOscillatoryAnimationWithLayer:_selectImageView.layer type:TZOscillatoryAnimationToBigger];
-        // 用户选中了该图片,提前获取一下大图
-        [self requestBigImage];
-    } else { // 取消选中,取消大图的获取
-        [self cancelBigImageRequest];
-    }
-}
-
-/// 只在单选状态且allowPreview为NO时会有该事件
-- (void)didTapImageView {
-    if (self.didSelectPhotoBlock) {
-        self.didSelectPhotoBlock(NO);
-    }
-}
-
-- (void)hideProgressView {
-    if (_progressView) {
-        self.progressView.hidden = YES;
-        self.imageView.alpha = 1.0;
-    }
-}
-
-- (void)requestBigImage {
-    if (_bigImageRequestID) {
-        [[PHImageManager defaultManager] cancelImageRequest:_bigImageRequestID];
-    }
-    
-    _bigImageRequestID = [[TZImageManager manager] requestImageDataForAsset:_model.asset completion:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
-        BOOL iCloudSyncFailed = !imageData && [TZCommonTools isICloudSyncError:info[PHImageErrorKey]];
-        self.model.iCloudFailed = iCloudSyncFailed;
-        if (iCloudSyncFailed && self.didSelectPhotoBlock) {
-            self.didSelectPhotoBlock(YES);
-            self.selectImageView.image = self.photoDefImage;
-        }
-        [self hideProgressView];
-    } progressHandler:^(double progress, NSError *error, BOOL *stop, NSDictionary *info) {
-        if (self.model.isSelected) {
-            progress = progress > 0.02 ? progress : 0.02;;
-            self.progressView.progress = progress;
-            self.progressView.hidden = NO;
-            self.imageView.alpha = 0.4;
-            if (progress >= 1) {
-                [self hideProgressView];
-            }
-        } else {
-            // 快速连续点几次,会EXC_BAD_ACCESS...
-            // *stop = YES;
-            [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
-            [self cancelBigImageRequest];
-        }
-    }];
-    if (_model.type == TZAssetCellTypeVideo) {
-        [[TZImageManager manager] getVideoWithAsset:_model.asset completion:^(AVPlayerItem *playerItem, NSDictionary *info) {
-            BOOL iCloudSyncFailed = !playerItem && [TZCommonTools isICloudSyncError:info[PHImageErrorKey]];
-            self.model.iCloudFailed = iCloudSyncFailed;
-            if (iCloudSyncFailed && self.didSelectPhotoBlock) {
-                dispatch_async(dispatch_get_main_queue(), ^{
-                    self.didSelectPhotoBlock(YES);
-                    self.selectImageView.image = self.photoDefImage;
-                });
-            }
-        }];
-    }
-}
-
-- (void)cancelBigImageRequest {
-    if (_bigImageRequestID) {
-        [[PHImageManager defaultManager] cancelImageRequest:_bigImageRequestID];
-    }
-    [self hideProgressView];
-}
-
-#pragma mark - Notification
-
-- (void)reload:(NSNotification *)noti {
-    TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)noti.object;
-    
-    UIViewController *parentViewController = nil;
-    UIResponder *responder = self.nextResponder;
-    do {
-        if ([responder isKindOfClass:[UIViewController class]]) {
-            parentViewController = (UIViewController *)responder;
-            break;
-        }
-        responder = responder.nextResponder;
-    } while (responder);
-    
-    if (parentViewController.navigationController != tzImagePickerVc) {
-        return;
-    }
-    
-    if (self.model.isSelected && tzImagePickerVc.showSelectedIndex) {
-        self.index = [tzImagePickerVc.selectedAssetIds indexOfObject:self.model.asset.localIdentifier] + 1;
-    }
-    self.indexLabel.hidden = !self.selectPhotoButton.isSelected;
-    BOOL notSelectable = [TZCommonTools isAssetNotSelectable:self.model tzImagePickerVc:tzImagePickerVc];
-    if (notSelectable && tzImagePickerVc.showPhotoCannotSelectLayer && !self.model.isSelected) {
-        self.cannotSelectLayerButton.backgroundColor = tzImagePickerVc.cannotSelectLayerColor;
-        self.cannotSelectLayerButton.hidden = NO;
-    } else {
-        self.cannotSelectLayerButton.hidden = YES;
-    }
-}
-
-#pragma mark - Lazy load
-
-- (UIButton *)selectPhotoButton {
-    if (_selectPhotoButton == nil) {
-        UIButton *selectPhotoButton = [[UIButton alloc] init];
-        [selectPhotoButton addTarget:self action:@selector(selectPhotoButtonClick:) forControlEvents:UIControlEventTouchUpInside];
-        [self.contentView addSubview:selectPhotoButton];
-        _selectPhotoButton = selectPhotoButton;
-    }
-    return _selectPhotoButton;
-}
-
-- (UIImageView *)imageView {
-    if (_imageView == nil) {
-        UIImageView *imageView = [[UIImageView alloc] init];
-        imageView.contentMode = UIViewContentModeScaleAspectFill;
-        imageView.clipsToBounds = YES;
-        [self.contentView addSubview:imageView];
-        _imageView = imageView;
-        
-        _tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapImageView)];
-        [_imageView addGestureRecognizer:_tapGesture];
-        self.allowPreview = self.allowPreview;
-    }
-    return _imageView;
-}
-
-- (UIImageView *)selectImageView {
-    if (_selectImageView == nil) {
-        UIImageView *selectImageView = [[UIImageView alloc] init];
-        selectImageView.contentMode = UIViewContentModeCenter;
-        selectImageView.clipsToBounds = YES;
-        [self.contentView addSubview:selectImageView];
-        _selectImageView = selectImageView;
-    }
-    return _selectImageView;
-}
-
-- (UIView *)bottomView {
-    if (_bottomView == nil) {
-        UIView *bottomView = [[UIView alloc] init];
-        static NSInteger rgb = 0;
-        bottomView.userInteractionEnabled = NO;
-        bottomView.backgroundColor = [UIColor colorWithRed:rgb green:rgb blue:rgb alpha:0.8];
-        [self.contentView addSubview:bottomView];
-        _bottomView = bottomView;
-    }
-    return _bottomView;
-}
-
-- (UIButton *)cannotSelectLayerButton {
-    if (_cannotSelectLayerButton == nil) {
-        UIButton *cannotSelectLayerButton = [[UIButton alloc] init];
-        [self.contentView addSubview:cannotSelectLayerButton];
-        _cannotSelectLayerButton = cannotSelectLayerButton;
-    }
-    return _cannotSelectLayerButton;
-}
-
-- (UIImageView *)videoImgView {
-    if (_videoImgView == nil) {
-        UIImageView *videoImgView = [[UIImageView alloc] init];
-        [videoImgView setImage:[UIImage tz_imageNamedFromMyBundle:@"VideoSendIcon"]];
-        [self.bottomView addSubview:videoImgView];
-        _videoImgView = videoImgView;
-    }
-    return _videoImgView;
-}
-
-- (UILabel *)timeLength {
-    if (_timeLength == nil) {
-        UILabel *timeLength = [[UILabel alloc] init];
-        timeLength.font = [UIFont boldSystemFontOfSize:11];
-        timeLength.textColor = [UIColor whiteColor];
-        timeLength.textAlignment = NSTextAlignmentRight;
-        [self.bottomView addSubview:timeLength];
-        _timeLength = timeLength;
-    }
-    return _timeLength;
-}
-
-- (UILabel *)indexLabel {
-    if (_indexLabel == nil) {
-        UILabel *indexLabel = [[UILabel alloc] init];
-        indexLabel.font = [UIFont systemFontOfSize:14];
-        indexLabel.adjustsFontSizeToFitWidth = YES;
-        indexLabel.textColor = [UIColor whiteColor];
-        indexLabel.textAlignment = NSTextAlignmentCenter;
-        [self.contentView addSubview:indexLabel];
-        _indexLabel = indexLabel;
-    }
-    return _indexLabel;
-}
-
-- (TZProgressView *)progressView {
-    if (_progressView == nil) {
-        _progressView = [[TZProgressView alloc] init];
-        _progressView.hidden = YES;
-        [self addSubview:_progressView];
-    }
-    return _progressView;
-}
-
-- (void)layoutSubviews {
-    [super layoutSubviews];
-    _cannotSelectLayerButton.frame = self.bounds;
-    if (self.allowPreview) {
-        _selectPhotoButton.frame = CGRectMake(self.tz_width - 44, 0, 44, 44);
-    } else {
-        _selectPhotoButton.frame = self.bounds;
-    }
-    _selectImageView.frame = CGRectMake(self.tz_width - 27, 3, 24, 24);
-    if (_selectImageView.image.size.width <= 27) {
-        _selectImageView.contentMode = UIViewContentModeCenter;
-    } else {
-        _selectImageView.contentMode = UIViewContentModeScaleAspectFit;
-    }
-    _indexLabel.frame = _selectImageView.frame;
-    _imageView.frame = self.bounds;
-
-    static CGFloat progressWH = 20;
-    CGFloat progressXY = (self.tz_width - progressWH) / 2;
-    _progressView.frame = CGRectMake(progressXY, progressXY, progressWH, progressWH);
-
-    _bottomView.frame = CGRectMake(0, self.tz_height - 17, self.tz_width, 17);
-    _videoImgView.frame = CGRectMake(8, 0, 17, 17);
-    _timeLength.frame = CGRectMake(self.videoImgView.tz_right, 0, self.tz_width - self.videoImgView.tz_right - 5, 17);
-    
-    self.type = (NSInteger)self.model.type;
-    self.showSelectBtn = self.showSelectBtn;
-    
-    [self.contentView bringSubviewToFront:_bottomView];
-    [self.contentView bringSubviewToFront:_cannotSelectLayerButton];
-    [self.contentView bringSubviewToFront:_selectPhotoButton];
-    [self.contentView bringSubviewToFront:_selectImageView];
-    [self.contentView bringSubviewToFront:_indexLabel];
-    
-    if (self.assetCellDidLayoutSubviewsBlock) {
-        self.assetCellDidLayoutSubviewsBlock(self, _imageView, _selectImageView, _indexLabel, _bottomView, _timeLength, _videoImgView);
-    }
-}
-
-- (void)dealloc {
-    [[NSNotificationCenter defaultCenter] removeObserver:self];
-}
-
-@end
-
-@interface TZAlbumCell ()
-@property (weak, nonatomic) UIImageView *posterImageView;
-@property (weak, nonatomic) UILabel *titleLabel;
-@end
-
-@implementation TZAlbumCell
-
-- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
-    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
-    self.backgroundColor = [UIColor whiteColor];
-    self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
-    return self;
-}
-
-- (void)setModel:(TZAlbumModel *)model {
-    _model = model;
-    
-    UIColor *nameColor = UIColor.blackColor;
-    if (@available(iOS 13.0, *)) {
-        nameColor = UIColor.labelColor;
-    }
-    NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:model.name attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:nameColor}];
-    NSAttributedString *countString = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"  (%zd)",model.count] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:[UIColor lightGrayColor]}];
-    [nameString appendAttributedString:countString];
-    self.titleLabel.attributedText = nameString;
-    [[TZImageManager manager] getPostImageWithAlbumModel:model completion:^(UIImage *postImage) {
-        self.posterImageView.image = postImage;
-        [self setNeedsLayout];
-    }];
-    if (model.selectedCount) {
-        self.selectedCountButton.hidden = NO;
-        [self.selectedCountButton setTitle:[NSString stringWithFormat:@"%zd",model.selectedCount] forState:UIControlStateNormal];
-    } else {
-        self.selectedCountButton.hidden = YES;
-    }
-    
-    if (self.albumCellDidSetModelBlock) {
-        self.albumCellDidSetModelBlock(self, _posterImageView, _titleLabel);
-    }
-}
-
-- (void)layoutSubviews {
-    [super layoutSubviews];
-    _selectedCountButton.frame = CGRectMake(self.contentView.tz_width - 24, 23, 24, 24);
-    NSInteger titleHeight = ceil(self.titleLabel.font.lineHeight);
-    self.titleLabel.frame = CGRectMake(80, (self.tz_height - titleHeight) / 2, self.tz_width - 80 - 50, titleHeight);
-    self.posterImageView.frame = CGRectMake(0, 0, 70, 70);
-    
-    if (self.albumCellDidLayoutSubviewsBlock) {
-        self.albumCellDidLayoutSubviewsBlock(self, _posterImageView, _titleLabel);
-    }
-}
-
-- (void)layoutSublayersOfLayer:(CALayer *)layer {
-    [super layoutSublayersOfLayer:layer];
-}
-
-#pragma mark - Lazy load
-
-- (UIImageView *)posterImageView {
-    if (_posterImageView == nil) {
-        UIImageView *posterImageView = [[UIImageView alloc] init];
-        posterImageView.contentMode = UIViewContentModeScaleAspectFill;
-        posterImageView.clipsToBounds = YES;
-        [self.contentView addSubview:posterImageView];
-        _posterImageView = posterImageView;
-    }
-    return _posterImageView;
-}
-
-- (UILabel *)titleLabel {
-    if (_titleLabel == nil) {
-        UILabel *titleLabel = [[UILabel alloc] init];
-        titleLabel.font = [UIFont boldSystemFontOfSize:17];
-        if (@available(iOS 13.0, *)) {
-            titleLabel.textColor = UIColor.labelColor;
-        } else {
-            titleLabel.textColor = [UIColor blackColor];
-        }
-        titleLabel.textAlignment = NSTextAlignmentLeft;
-        [self.contentView addSubview:titleLabel];
-        _titleLabel = titleLabel;
-    }
-    return _titleLabel;
-}
-
-- (UIButton *)selectedCountButton {
-    if (_selectedCountButton == nil) {
-        UIButton *selectedCountButton = [[UIButton alloc] init];
-        selectedCountButton.titleLabel.adjustsFontSizeToFitWidth = YES;
-        selectedCountButton.layer.cornerRadius = 12;
-        selectedCountButton.clipsToBounds = YES;
-        selectedCountButton.backgroundColor = [UIColor redColor];
-        [selectedCountButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
-        selectedCountButton.titleLabel.font = [UIFont systemFontOfSize:15];
-        [self.contentView addSubview:selectedCountButton];
-        _selectedCountButton = selectedCountButton;
-    }
-    return _selectedCountButton;
-}
-
-@end
-
-
-
-@implementation TZAssetCameraCell
-
-- (instancetype)initWithFrame:(CGRect)frame {
-    self = [super initWithFrame:frame];
-    if (self) {
-        self.backgroundColor = [UIColor whiteColor];
-        _imageView = [[UIImageView alloc] init];
-        _imageView.backgroundColor = [UIColor colorWithWhite:1.000 alpha:0.500];
-        _imageView.contentMode = UIViewContentModeScaleAspectFill;
-        [self.contentView addSubview:_imageView];
-        self.clipsToBounds = YES;
-    }
-    return self;
-}
-
-- (void)layoutSubviews {
-    [super layoutSubviews];
-    _imageView.frame = self.bounds;
-}
-
-@end
-
-
-@implementation TZAssetAddMoreCell
-
-- (instancetype)initWithFrame:(CGRect)frame {
-    self = [super initWithFrame:frame];
-    if (self) {
-        _tipLabel = [[UILabel alloc] init];
-        _tipLabel.numberOfLines = 2;
-        _tipLabel.textAlignment = NSTextAlignmentCenter;
-        _tipLabel.font = [UIFont systemFontOfSize:12];
-        _tipLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
-        CGFloat rgb = 156 / 255.0;
-        _tipLabel.textColor = [UIColor colorWithRed:rgb green:rgb blue:rgb alpha:1.0];
-        [self.contentView addSubview:_tipLabel];
-
-        self.clipsToBounds = YES;
-    }
-    return self;
-}
-
-- (void)layoutSubviews {
-    [super layoutSubviews];
-    _tipLabel.frame = CGRectMake(5, self.tz_height / 2, self.tz_width - 10, self.tz_height / 2 - 5);
-}
-
-@end

+ 0 - 56
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetModel.h

@@ -1,56 +0,0 @@
-//
-//  TZAssetModel.h
-//  TZImagePickerController
-//
-//  Created by 谭真 on 15/12/24.
-//  Copyright © 2015年 谭真. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-#import <Photos/Photos.h>
-
-typedef enum : NSUInteger {
-    TZAssetModelMediaTypePhoto = 0,
-    TZAssetModelMediaTypeLivePhoto,
-    TZAssetModelMediaTypePhotoGif,
-    TZAssetModelMediaTypeVideo,
-    TZAssetModelMediaTypeAudio
-} TZAssetModelMediaType;
-
-@class PHAsset;
-@interface TZAssetModel : NSObject
-
-@property (nonatomic, strong) PHAsset *asset;
-@property (nonatomic, assign) BOOL isSelected;      ///< The select status of a photo, default is No
-@property (nonatomic, assign) TZAssetModelMediaType type;
-@property (nonatomic, copy) NSString *timeLength;
-@property (nonatomic, assign) BOOL iCloudFailed;
-
-/// Init a photo dataModel With a PHAsset
-/// 用一个PHAsset实例,初始化一个照片模型
-+ (instancetype)modelWithAsset:(PHAsset *)asset type:(TZAssetModelMediaType)type;
-+ (instancetype)modelWithAsset:(PHAsset *)asset type:(TZAssetModelMediaType)type timeLength:(NSString *)timeLength;
-
-@end
-
-
-@class PHFetchResult;
-@interface TZAlbumModel : NSObject
-
-@property (nonatomic, strong) NSString *name;        ///< The album name
-@property (nonatomic, assign) NSInteger count;       ///< Count of photos the album contain
-@property (nonatomic, strong) PHFetchResult *result;
-@property (nonatomic, strong) PHAssetCollection *collection;
-@property (nonatomic, strong) PHFetchOptions *options;
-
-@property (nonatomic, strong) NSArray *models;
-@property (nonatomic, strong) NSArray *selectedModels;
-@property (nonatomic, assign) NSUInteger selectedCount;
-
-@property (nonatomic, assign) BOOL isCameraRoll;
-
-- (void)setResult:(PHFetchResult *)result needFetchAssets:(BOOL)needFetchAssets;
-- (void)refreshFetchResult;
-
-@end

+ 0 - 79
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetModel.m

@@ -1,79 +0,0 @@
-//
-//  TZAssetModel.m
-//  TZImagePickerController
-//
-//  Created by 谭真 on 15/12/24.
-//  Copyright © 2015年 谭真. All rights reserved.
-//
-
-#import "TZAssetModel.h"
-#import "TZImageManager.h"
-
-@implementation TZAssetModel
-
-+ (instancetype)modelWithAsset:(PHAsset *)asset type:(TZAssetModelMediaType)type{
-    TZAssetModel *model = [[TZAssetModel alloc] init];
-    model.asset = asset;
-    model.isSelected = NO;
-    model.type = type;
-    return model;
-}
-
-+ (instancetype)modelWithAsset:(PHAsset *)asset type:(TZAssetModelMediaType)type timeLength:(NSString *)timeLength {
-    TZAssetModel *model = [self modelWithAsset:asset type:type];
-    model.timeLength = timeLength;
-    return model;
-}
-
-@end
-
-
-
-@implementation TZAlbumModel
-
-- (void)setResult:(PHFetchResult *)result needFetchAssets:(BOOL)needFetchAssets {
-    _result = result;
-    if (needFetchAssets) {
-        [[TZImageManager manager] getAssetsFromFetchResult:result completion:^(NSArray<TZAssetModel *> *models) {
-            self->_models = models;
-            if (self->_selectedModels) {
-                [self checkSelectedModels];
-            }
-        }];
-    }
-}
-
-- (void)refreshFetchResult {
-    PHFetchResult *fetchResult = [PHAsset fetchAssetsInAssetCollection:self.collection options:self.options];
-    self.count = fetchResult.count;
-    [self setResult:fetchResult];
-}
-
-- (void)setSelectedModels:(NSArray *)selectedModels {
-    _selectedModels = selectedModels;
-    if (_models) {
-        [self checkSelectedModels];
-    }
-}
-
-- (void)checkSelectedModels {
-    self.selectedCount = 0;
-    NSMutableSet *selectedAssets = [NSMutableSet setWithCapacity:_selectedModels.count];
-    for (TZAssetModel *model in _selectedModels) {
-        [selectedAssets addObject:model.asset];
-    }
-    for (TZAssetModel *model in _models) {
-        if ([selectedAssets containsObject:model.asset]) {
-            self.selectedCount ++;
-        }
-    }
-}
-
-- (NSString *)name {
-    if (_name) {
-        return _name;
-    }
-    return @"";
-}
-
-@end

+ 0 - 16
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAuthLimitedFooterTipView.h

@@ -1,16 +0,0 @@
-//
-//  TZAuthLimitedFooterTipView.h
-//  TZImagePickerController
-//
-//  Created by qiaoxy on 2021/8/24.
-//
-
-#import <UIKit/UIKit.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface TZAuthLimitedFooterTipView : UIView
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 87
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAuthLimitedFooterTipView.m

@@ -1,87 +0,0 @@
-//
-//  TZAuthLimitedFooterTipView.m
-//  TZImagePickerController
-//
-//  Created by qiaoxy on 2021/8/24.
-//
-
-#import "TZAuthLimitedFooterTipView.h"
-#import "TZImagePickerController.h"
-
-@interface TZAuthLimitedFooterTipView()
-@property (nonatomic,strong) UIImageView *tipImgView;
-@property (nonatomic,strong) UILabel *tipLable;
-@property (nonatomic,strong) UIImageView *detailImgView;
-@end
-
-@implementation TZAuthLimitedFooterTipView
-
-- (instancetype)init {
-    self = [super init];
-    if (self) {
-        [self initSubViews];
-    }
-    return self;
-}
-
-- (instancetype)initWithFrame:(CGRect)frame {
-    self = [super initWithFrame:frame];
-    if (self) {
-        [self initSubViews];
-    }
-    return self;
-}
-
-- (void)initSubViews {
-    [self addSubview:self.tipImgView];
-    [self addSubview:self.tipLable];
-    [self addSubview:self.detailImgView];
-    CGFloat margin = 15;
-    CGFloat tipImgViewWH = 20;
-    CGFloat detailImgViewWH = 12;
-    CGFloat screenW = [UIScreen mainScreen].bounds.size.width;
-
-    self.tipImgView.frame = CGRectMake(margin, 0, tipImgViewWH, tipImgViewWH);
-    self.detailImgView.frame = CGRectMake(screenW - margin - detailImgViewWH, 0, detailImgViewWH, detailImgViewWH);
-    
-    CGFloat tipLabelX = CGRectGetMaxX(self.tipImgView.frame) + 10;
-    CGFloat tipLabelW = screenW - tipLabelX - detailImgViewWH - margin - 4;
-    self.tipLable.frame = CGRectMake(tipLabelX, 0, tipLabelW, self.bounds.size.height);
-    
-    self.tipImgView.center = CGPointMake(self.tipImgView.center.x, self.tipLable.center.y);
-    self.detailImgView.center = CGPointMake(self.detailImgView.center.x, self.tipLable.center.y);
-}
-
-#pragma mark - Getter
-
-- (UIImageView *)tipImgView {
-    if (!_tipImgView) {
-        _tipImgView = [[UIImageView alloc] init];
-        _tipImgView.contentMode = UIViewContentModeScaleAspectFit;
-        _tipImgView.image = [UIImage tz_imageNamedFromMyBundle:@"tip"];
-    }
-    return _tipImgView;
-}
-
-- (UILabel *)tipLable {
-    if (!_tipLable) {
-        _tipLable = [[UILabel alloc] init];
-        NSString *appName = [TZCommonTools tz_getAppName];
-        _tipLable.text = [NSString stringWithFormat:[NSBundle tz_localizedStringForKey:@"Allow %@ to access your all photos"], appName];
-        _tipLable.numberOfLines = 0;
-        _tipLable.font = [UIFont systemFontOfSize:14];
-        _tipLable.textColor = [UIColor colorWithRed:0.40 green:0.40 blue:0.40 alpha:1.0];
-    }
-    return _tipLable;
-}
-
-- (UIImageView *)detailImgView {
-    if (!_detailImgView) {
-        _detailImgView = [[UIImageView alloc] init];
-        _detailImgView.contentMode = UIViewContentModeScaleAspectFit;
-        _detailImgView.image = [UIImage tz_imageNamedFromMyBundle:@"right_arrow"];
-    }
-    return _detailImgView;
-}
-
-@end

+ 0 - 16
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZGifPhotoPreviewController.h

@@ -1,16 +0,0 @@
-//
-//  TZGifPhotoPreviewController.h
-//  TZImagePickerController
-//
-//  Created by ttouch on 2016/12/13.
-//  Copyright © 2016年 谭真. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class TZAssetModel;
-@interface TZGifPhotoPreviewController : UIViewController
-
-@property (nonatomic, strong) TZAssetModel *model;
-
-@end

+ 0 - 173
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZGifPhotoPreviewController.m

@@ -1,173 +0,0 @@
-//
-//  TZGifPhotoPreviewController.m
-//  TZImagePickerController
-//
-//  Created by ttouch on 2016/12/13.
-//  Copyright © 2016年 谭真. All rights reserved.
-//
-
-#import "TZGifPhotoPreviewController.h"
-#import "TZImagePickerController.h"
-#import "TZAssetModel.h"
-#import "UIView+TZLayout.h"
-#import "TZPhotoPreviewCell.h"
-#import "TZImageManager.h"
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-@interface TZGifPhotoPreviewController () {
-    UIView *_toolBar;
-    UIButton *_doneButton;
-    UIProgressView *_progress;
-    
-    TZPhotoPreviewView *_previewView;
-    
-    UIStatusBarStyle _originStatusBarStyle;
-}
-@property (assign, nonatomic) BOOL needShowStatusBar;
-@end
-
-@implementation TZGifPhotoPreviewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    self.needShowStatusBar = ![UIApplication sharedApplication].statusBarHidden;
-    self.view.backgroundColor = [UIColor blackColor];
-    TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
-    if (tzImagePickerVc) {
-        self.navigationItem.title = [NSString stringWithFormat:@"GIF %@",tzImagePickerVc.previewBtnTitleStr];
-    }
-    [self configPreviewView];
-    [self configBottomToolBar];
-}
-
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    _originStatusBarStyle = [UIApplication sharedApplication].statusBarStyle;
-    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
-}
-
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-    if (self.needShowStatusBar) {
-        [UIApplication sharedApplication].statusBarHidden = NO;
-    }
-    [UIApplication sharedApplication].statusBarStyle = _originStatusBarStyle;
-}
-
-- (void)configPreviewView {
-    _previewView = [[TZPhotoPreviewView alloc] initWithFrame:CGRectZero];
-    _previewView.model = self.model;
-    __weak typeof(self) weakSelf = self;
-    [_previewView setSingleTapGestureBlock:^{
-        __strong typeof(weakSelf) strongSelf = weakSelf;
-        [strongSelf signleTapAction];
-    }];
-    [self.view addSubview:_previewView];
-}
-
-- (void)configBottomToolBar {
-    _toolBar = [[UIView alloc] initWithFrame:CGRectZero];
-    CGFloat rgb = 34 / 255.0;
-    _toolBar.backgroundColor = [UIColor colorWithRed:rgb green:rgb blue:rgb alpha:0.7];
-    
-    _doneButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    _doneButton.titleLabel.font = [UIFont systemFontOfSize:16];
-    [_doneButton addTarget:self action:@selector(doneButtonClick) forControlEvents:UIControlEventTouchUpInside];
-    TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
-    if (tzImagePickerVc) {
-        [_doneButton setTitle:tzImagePickerVc.doneBtnTitleStr forState:UIControlStateNormal];
-        [_doneButton setTitleColor:tzImagePickerVc.oKButtonTitleColorNormal forState:UIControlStateNormal];
-    } else {
-        [_doneButton setTitle:[NSBundle tz_localizedStringForKey:@"Done"] forState:UIControlStateNormal];
-        [_doneButton setTitleColor:[UIColor colorWithRed:(83/255.0) green:(179/255.0) blue:(17/255.0) alpha:1.0] forState:UIControlStateNormal];
-    }
-    [_toolBar addSubview:_doneButton];
-    
-    UILabel *byteLabel = [[UILabel alloc] init];
-    byteLabel.textColor = [UIColor whiteColor];
-    byteLabel.font = [UIFont systemFontOfSize:13];
-    byteLabel.frame = CGRectMake(10, 0, 100, 44);
-    [[TZImageManager manager] getPhotosBytesWithArray:@[_model] completion:^(NSString *totalBytes) {
-        byteLabel.text = totalBytes;
-    }];
-    [_toolBar addSubview:byteLabel];
-    
-    [self.view addSubview:_toolBar];
-    
-    if (tzImagePickerVc.gifPreviewPageUIConfigBlock) {
-        tzImagePickerVc.gifPreviewPageUIConfigBlock(_toolBar, _doneButton);
-    }
-}
-
-- (UIStatusBarStyle)preferredStatusBarStyle {
-    TZImagePickerController *tzImagePicker = (TZImagePickerController *)self.navigationController;
-    if (tzImagePicker && [tzImagePicker isKindOfClass:[TZImagePickerController class]]) {
-        return tzImagePicker.statusBarStyle;
-    }
-    return [super preferredStatusBarStyle];
-}
-
-#pragma mark - Layout
-
-- (void)viewDidLayoutSubviews {
-    [super viewDidLayoutSubviews];
-    
-    _previewView.frame = self.view.bounds;
-    _previewView.scrollView.frame = self.view.bounds;
-    CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
-    _toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight);
-    [_doneButton sizeToFit];
-    _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
-    
-    TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
-    if (tzImagePickerVc.gifPreviewPageDidLayoutSubviewsBlock) {
-        tzImagePickerVc.gifPreviewPageDidLayoutSubviewsBlock(_toolBar, _doneButton);
-    }
-}
-
-#pragma mark - Click Event
-
-- (void)signleTapAction {
-    _toolBar.hidden = !_toolBar.isHidden;
-    [self.navigationController setNavigationBarHidden:_toolBar.isHidden];
-    TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
-    if (_toolBar.isHidden) {
-        [UIApplication sharedApplication].statusBarHidden = YES;
-    } else if (tzImagePickerVc.needShowStatusBar) {
-        [UIApplication sharedApplication].statusBarHidden = NO;
-    }
-}
-
-- (void)doneButtonClick {
-    if (self.navigationController) {
-        TZImagePickerController *imagePickerVc = (TZImagePickerController *)self.navigationController;
-        if (imagePickerVc.autoDismiss) {
-            [self.navigationController dismissViewControllerAnimated:YES completion:^{
-                [self callDelegateMethod];
-            }];
-        } else {
-            [self callDelegateMethod];
-        }
-    } else {
-        [self dismissViewControllerAnimated:YES completion:^{
-            [self callDelegateMethod];
-        }];
-    }
-}
-
-- (void)callDelegateMethod {
-    TZImagePickerController *imagePickerVc = (TZImagePickerController *)self.navigationController;
-    UIImage *animatedImage = _previewView.imageView.image;
-    if ([imagePickerVc.pickerDelegate respondsToSelector:@selector(imagePickerController:didFinishPickingGifImage:sourceAssets:)]) {
-        [imagePickerVc.pickerDelegate imagePickerController:imagePickerVc didFinishPickingGifImage:animatedImage sourceAssets:_model.asset];
-    }
-    if (imagePickerVc.didFinishPickingGifImageHandle) {
-        imagePickerVc.didFinishPickingGifImageHandle(animatedImage,_model.asset);
-    }
-}
-
-#pragma clang diagnostic pop
-
-@end

+ 0 - 39
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageCropManager.h

@@ -1,39 +0,0 @@
-//
-//  TZImageCropManager.h
-//  TZImagePickerController
-//
-//  Created by 谭真 on 2016/12/5.
-//  Copyright © 2016年 谭真. All rights reserved.
-//  图片裁剪管理类
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-
-@interface TZImageCropManager : NSObject
-
-/// 裁剪框背景的处理
-+ (void)overlayClippingWithView:(UIView *)view cropRect:(CGRect)cropRect containerView:(UIView *)containerView needCircleCrop:(BOOL)needCircleCrop;
-
-/*
- 1.7.2 为了解决多位同学对于图片裁剪的需求,我这两天有空便在研究图片裁剪
- 幸好有tuyou的PhotoTweaks库做参考,裁剪的功能实现起来简单许多
- 该方法和其内部引用的方法基本来自于tuyou的PhotoTweaks库,我做了稍许删减和修改
- 感谢tuyou同学在github开源了优秀的裁剪库PhotoTweaks,表示感谢
- PhotoTweaks库的github链接:https://github.com/itouch2/PhotoTweaks
- */
-/// 获得裁剪后的图片
-+ (UIImage *)cropImageView:(UIImageView *)imageView toRect:(CGRect)rect zoomScale:(double)zoomScale containerView:(UIView *)containerView;
-
-/// 获取圆形图片
-+ (UIImage *)circularClipImage:(UIImage *)image;
-
-@end
-
-
-/// 该分类的代码来自SDWebImage:https://github.com/rs/SDWebImage
-/// 为了防止冲突,我将分类名字和方法名字做了修改
-@interface UIImage (TZGif)
-
-+ (UIImage *)sd_tz_animatedGIFWithData:(NSData *)data;
-
-@end

+ 0 - 199
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageCropManager.m

@@ -1,199 +0,0 @@
-//
-//  TZImageCropManager.m
-//  TZImagePickerController
-//
-//  Created by 谭真 on 2016/12/5.
-//  Copyright © 2016年 谭真. All rights reserved.
-//
-
-#import "TZImageCropManager.h"
-#import "UIView+TZLayout.h"
-#import <ImageIO/ImageIO.h>
-#import "TZImageManager.h"
-#import "TZImagePickerController.h"
-
-@implementation TZImageCropManager
-
-/// 裁剪框背景的处理
-+ (void)overlayClippingWithView:(UIView *)view cropRect:(CGRect)cropRect containerView:(UIView *)containerView needCircleCrop:(BOOL)needCircleCrop {
-    UIBezierPath *path= [UIBezierPath bezierPathWithRect:[UIScreen mainScreen].bounds];
-    CAShapeLayer *layer = [CAShapeLayer layer];
-    if (needCircleCrop) { // 圆形裁剪框
-        [path appendPath:[UIBezierPath bezierPathWithRoundedRect:cropRect cornerRadius:cropRect.size.width / 2]];
-    } else { // 矩形裁剪框
-        [path appendPath:[UIBezierPath bezierPathWithRect:cropRect]];
-    }
-    layer.path = path.CGPath;
-    layer.fillRule = kCAFillRuleEvenOdd;
-    layer.fillColor = [[UIColor blackColor] CGColor];
-    layer.opacity = 0.5;
-    [view.layer addSublayer:layer];
-}
-
-/// 获得裁剪后的图片
-+ (UIImage *)cropImageView:(UIImageView *)imageView toRect:(CGRect)rect zoomScale:(double)zoomScale containerView:(UIView *)containerView {
-    CGAffineTransform transform = CGAffineTransformIdentity;
-    // 平移的处理
-    CGRect imageViewRect = [imageView convertRect:imageView.bounds toView:containerView];
-    CGPoint point = CGPointMake(imageViewRect.origin.x + imageViewRect.size.width / 2, imageViewRect.origin.y + imageViewRect.size.height / 2);
-    CGFloat xMargin = containerView.tz_width - CGRectGetMaxX(rect) - rect.origin.x;
-    CGPoint zeroPoint = CGPointMake((CGRectGetWidth(containerView.frame) - xMargin) / 2, containerView.center.y);
-    CGPoint translation = CGPointMake(point.x - zeroPoint.x, point.y - zeroPoint.y);
-    transform = CGAffineTransformTranslate(transform, translation.x, translation.y);
-    // 缩放的处理
-    transform = CGAffineTransformScale(transform, zoomScale, zoomScale);
-    
-    CGImageRef imageRef = [self newTransformedImage:transform
-                                        sourceImage:imageView.image.CGImage
-                                         sourceSize:imageView.image.size
-                                        outputWidth:rect.size.width * [UIScreen mainScreen].scale
-                                           cropSize:rect.size
-                                      imageViewSize:imageView.frame.size];
-    UIImage *cropedImage = [UIImage imageWithCGImage:imageRef];
-    cropedImage = [[TZImageManager manager] fixOrientation:cropedImage];
-    CGImageRelease(imageRef);
-    return cropedImage;
-}
-
-+ (CGImageRef)newTransformedImage:(CGAffineTransform)transform sourceImage:(CGImageRef)sourceImage sourceSize:(CGSize)sourceSize  outputWidth:(CGFloat)outputWidth cropSize:(CGSize)cropSize imageViewSize:(CGSize)imageViewSize {
-    CGImageRef source = [self newScaledImage:sourceImage toSize:sourceSize];
-    
-    CGFloat aspect = cropSize.height/cropSize.width;
-    CGSize outputSize = CGSizeMake(outputWidth, outputWidth*aspect);
-    
-    CGContextRef context = CGBitmapContextCreate(NULL, outputSize.width, outputSize.height, CGImageGetBitsPerComponent(source), 0, CGImageGetColorSpace(source), CGImageGetBitmapInfo(source));
-    CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]);
-    CGContextFillRect(context, CGRectMake(0, 0, outputSize.width, outputSize.height));
-    
-    CGAffineTransform uiCoords = CGAffineTransformMakeScale(outputSize.width / cropSize.width, outputSize.height / cropSize.height);
-    uiCoords = CGAffineTransformTranslate(uiCoords, cropSize.width/2.0, cropSize.height / 2.0);
-    uiCoords = CGAffineTransformScale(uiCoords, 1.0, -1.0);
-    CGContextConcatCTM(context, uiCoords);
-    
-    CGContextConcatCTM(context, transform);
-    CGContextScaleCTM(context, 1.0, -1.0);
-    
-    CGContextDrawImage(context, CGRectMake(-imageViewSize.width/2, -imageViewSize.height/2.0, imageViewSize.width, imageViewSize.height), source);
-    CGImageRef resultRef = CGBitmapContextCreateImage(context);
-    CGContextRelease(context);
-    CGImageRelease(source);
-    return resultRef;
-}
-
-+ (CGImageRef)newScaledImage:(CGImageRef)source toSize:(CGSize)size {
-    CGSize srcSize = size;
-    CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB();
-    CGContextRef context = CGBitmapContextCreate(NULL, size.width, size.height, 8, 0, rgbColorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
-    CGColorSpaceRelease(rgbColorSpace);
-    
-    CGContextSetInterpolationQuality(context, kCGInterpolationNone);
-    CGContextTranslateCTM(context, size.width/2, size.height/2);
-    
-    CGContextDrawImage(context, CGRectMake(-srcSize.width/2, -srcSize.height/2, srcSize.width, srcSize.height), source);
-    
-    CGImageRef resultRef = CGBitmapContextCreateImage(context);
-    CGContextRelease(context);
-    return resultRef;
-}
-
-/// 获取圆形图片
-+ (UIImage *)circularClipImage:(UIImage *)image {
-    UIGraphicsBeginImageContextWithOptions(image.size, NO, [UIScreen mainScreen].scale);
-    
-    CGContextRef ctx = UIGraphicsGetCurrentContext();
-    CGRect rect = CGRectMake(0, 0, image.size.width, image.size.height);
-    CGContextAddEllipseInRect(ctx, rect);
-    CGContextClip(ctx);
-    
-    [image drawInRect:rect];
-    UIImage *circleImage = UIGraphicsGetImageFromCurrentImageContext();
-    
-    UIGraphicsEndImageContext();
-    return circleImage;
-}
-
-@end
-
-
-@implementation UIImage (TZGif)
-
-+ (UIImage *)sd_tz_animatedGIFWithData:(NSData *)data {
-    if (!data) {
-        return nil;
-    }
-    
-    CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL);
-    
-    size_t count = CGImageSourceGetCount(source);
-    
-    UIImage *animatedImage;
-    
-    if (count <= 1) {
-        animatedImage = [[UIImage alloc] initWithData:data];
-    }
-    else {
-        // images数组过大时内存会飙升,在这里限制下最大count
-        NSInteger maxCount = [TZImagePickerConfig sharedInstance].gifPreviewMaxImagesCount ?: 50;
-        NSInteger interval = MAX((count + maxCount / 2) / maxCount, 1);
-        
-        NSMutableArray *images = [NSMutableArray array];
-        
-        NSTimeInterval duration = 0.0f;
-        
-        for (size_t i = 0; i < count; i+=interval) {
-            CGImageRef image = CGImageSourceCreateImageAtIndex(source, i, NULL);
-            if (!image) {
-                continue;
-            }
-            
-            duration += [self sd_frameDurationAtIndex:i source:source] * MIN(interval, 3);
-            
-            [images addObject:[UIImage imageWithCGImage:image scale:[UIScreen mainScreen].scale orientation:UIImageOrientationUp]];
-            
-            CGImageRelease(image);
-        }
-        
-        if (!duration) {
-            duration = (1.0f / 10.0f) * count;
-        }
-        
-        animatedImage = [UIImage animatedImageWithImages:images duration:duration];
-    }
-    
-    CFRelease(source);
-    
-    return animatedImage;
-}
-
-+ (float)sd_frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source {
-    float frameDuration = 0.1f;
-    CFDictionaryRef cfFrameProperties = CGImageSourceCopyPropertiesAtIndex(source, index, nil);
-    NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties;
-    NSDictionary *gifProperties = frameProperties[(NSString *)kCGImagePropertyGIFDictionary];
-    
-    NSNumber *delayTimeUnclampedProp = gifProperties[(NSString *)kCGImagePropertyGIFUnclampedDelayTime];
-    if (delayTimeUnclampedProp) {
-        frameDuration = [delayTimeUnclampedProp floatValue];
-    }
-    else {
-        
-        NSNumber *delayTimeProp = gifProperties[(NSString *)kCGImagePropertyGIFDelayTime];
-        if (delayTimeProp) {
-            frameDuration = [delayTimeProp floatValue];
-        }
-    }
-    
-    // Many annoying ads specify a 0 duration to make an image flash as quickly as possible.
-    // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify
-    // a duration of <= 10 ms. See <rdar://problem/7689300> and <http://webkit.org/b/36082>
-    // for more information.
-    
-    if (frameDuration < 0.011f) {
-        frameDuration = 0.100f;
-    }
-    
-    CFRelease(cfFrameProperties);
-    return frameDuration;
-}
-
-@end

+ 0 - 140
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageManager.h

@@ -1,140 +0,0 @@
-//
-//  TZImageManager.h
-//  TZImagePickerController
-//
-//  Created by 谭真 on 16/1/4.
-//  Copyright © 2016年 谭真. All rights reserved.
-//  图片资源获取管理类
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-#import <AVFoundation/AVFoundation.h>
-#import <Photos/Photos.h>
-#import "TZAssetModel.h"
-
-@class TZAlbumModel,TZAssetModel;
-@protocol TZImagePickerControllerDelegate;
-@interface TZImageManager : NSObject
-
-@property (nonatomic, strong) PHCachingImageManager *cachingImageManager;
-
-+ (instancetype)manager NS_SWIFT_NAME(default());
-+ (void)deallocManager;
-
-@property (weak, nonatomic) id<TZImagePickerControllerDelegate> pickerDelegate;
-
-@property (nonatomic, assign) BOOL shouldFixOrientation;
-
-@property (nonatomic, assign) BOOL isPreviewNetworkImage;
-
-/// Default is 600px / 默认600像素宽
-@property (nonatomic, assign) CGFloat photoPreviewMaxWidth;
-/// The pixel width of output image, Default is 828px / 导出图片的宽度,默认828像素宽
-@property (nonatomic, assign) CGFloat photoWidth;
-
-/// Default is 4, Use in photos collectionView in TZPhotoPickerController
-/// 默认4列, TZPhotoPickerController中的照片collectionView
-@property (nonatomic, assign) NSInteger columnNumber;
-
-/// Sort photos ascending by modificationDate,Default is YES
-/// 对照片排序,按修改时间升序,默认是YES。如果设置为NO,最新的照片会显示在最前面,内部的拍照按钮会排在第一个
-@property (nonatomic, assign) BOOL sortAscendingByModificationDate;
-
-/// Minimum selectable photo width, Default is 0
-/// 最小可选中的图片宽度,默认是0,小于这个宽度的图片不可选中
-@property (nonatomic, assign) NSInteger minPhotoWidthSelectable;
-@property (nonatomic, assign) NSInteger minPhotoHeightSelectable;
-@property (nonatomic, assign) BOOL hideWhenCanNotSelect;
-
-/// Return YES if Authorized 返回YES如果得到了授权
-- (BOOL)authorizationStatusAuthorized;
-- (void)requestAuthorizationWithCompletion:(void (^)(void))completion;
-- (BOOL)isPHAuthorizationStatusLimited;
-
-/// Get Album 获得相册/相册数组
-- (void)getCameraRollAlbumWithFetchAssets:(BOOL)needFetchAssets completion:(void (^)(TZAlbumModel *model))completion;
-- (void)getCameraRollAlbum:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage needFetchAssets:(BOOL)needFetchAssets completion:(void (^)(TZAlbumModel *model))completion __attribute__((deprecated("Use -getCameraRollAlbumWithFetchAssets:completion:. You can config allowPickingImage、allowPickingVideo by TZImagePickerConfig")));
-- (void)getAllAlbums:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage needFetchAssets:(BOOL)needFetchAssets completion:(void (^)(NSArray<TZAlbumModel *> *models))completion __attribute__((deprecated("Use -getAllAlbumsWithFetchAssets:completion:. You can config allowPickingImage、allowPickingVideo by TZImagePickerConfig")));
-- (void)getAllAlbumsWithFetchAssets:(BOOL)needFetchAssets completion:(void (^)(NSArray<TZAlbumModel *> *models))completion;
-
-/// Get Assets 获得Asset数组
-- (void)getAssetsFromFetchResult:(PHFetchResult *)result completion:(void (^)(NSArray<TZAssetModel *> *models))completion;
-- (void)getAssetsFromFetchResult:(PHFetchResult *)result allowPickingVideo:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage completion:(void (^)(NSArray<TZAssetModel *> *models))completion __attribute__((deprecated("Use -getAssetsFromFetchResult:completion:. You can config allowPickingImage、allowPickingVideo by TZImagePickerConfig")));
-- (void)getAssetFromFetchResult:(PHFetchResult *)result atIndex:(NSInteger)index allowPickingVideo:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage completion:(void (^)(TZAssetModel *model))completion __attribute__((deprecated("Use -getAssetFromFetchResult:atIndex:completion:. You can config allowPickingImage、allowPickingVideo by TZImagePickerConfig")));
-- (void)getAssetFromFetchResult:(PHFetchResult *)result atIndex:(NSInteger)index completion:(void (^)(TZAssetModel *model))completion;
-
-/// Get photo 获得照片
-- (PHImageRequestID)getPostImageWithAlbumModel:(TZAlbumModel *)model completion:(void (^)(UIImage *postImage))completion;
-
-- (PHImageRequestID)getPhotoWithAsset:(PHAsset *)asset completion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion;
-- (PHImageRequestID)getPhotoWithAsset:(PHAsset *)asset photoWidth:(CGFloat)photoWidth completion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion;
-- (PHImageRequestID)getPhotoWithAsset:(PHAsset *)asset completion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler networkAccessAllowed:(BOOL)networkAccessAllowed;
-- (PHImageRequestID)getPhotoWithAsset:(PHAsset *)asset photoWidth:(CGFloat)photoWidth completion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler networkAccessAllowed:(BOOL)networkAccessAllowed;
-- (PHImageRequestID)requestImageDataForAsset:(PHAsset *)asset completion:(void (^)(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info))completion progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler;
-
-/// Get full Image 获取原图
-/// 如下两个方法completion一般会调多次,一般会先返回缩略图,再返回原图(详见方法内部使用的系统API的说明),如果info[PHImageResultIsDegradedKey] 为 YES,则表明当前返回的是缩略图,否则是原图。
-- (PHImageRequestID)getOriginalPhotoWithAsset:(PHAsset *)asset completion:(void (^)(UIImage *photo,NSDictionary *info))completion;
-- (PHImageRequestID)getOriginalPhotoWithAsset:(PHAsset *)asset newCompletion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion;
-- (PHImageRequestID)getOriginalPhotoWithAsset:(PHAsset *)asset progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler newCompletion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion;
-// 该方法中,completion只会走一次
-- (PHImageRequestID)getOriginalPhotoDataWithAsset:(PHAsset *)asset completion:(void (^)(NSData *data,NSDictionary *info,BOOL isDegraded))completion;
-- (PHImageRequestID)getOriginalPhotoDataWithAsset:(PHAsset *)asset progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler completion:(void (^)(NSData *data,NSDictionary *info,BOOL isDegraded))completion;
-
-/// Get Image For VideoURL
-- (UIImage *)getImageWithVideoURL:(NSURL *)videoURL;
-
-/// Save photo 保存照片
-- (void)savePhotoWithImage:(UIImage *)image completion:(void (^)(PHAsset *asset, NSError *error))completion;
-- (void)savePhotoWithImage:(UIImage *)image location:(CLLocation *)location completion:(void (^)(PHAsset *asset, NSError *error))completion;
-- (void)savePhotoWithImage:(UIImage *)image meta:(NSDictionary *)meta location:(CLLocation *)location completion:(void (^)(PHAsset *asset, NSError *error))completion;
-
-/// Save video 保存视频
-- (void)saveVideoWithUrl:(NSURL *)url completion:(void (^)(PHAsset *asset, NSError *error))completion;
-- (void)saveVideoWithUrl:(NSURL *)url location:(CLLocation *)location completion:(void (^)(PHAsset *asset, NSError *error))completion;
-
-/// Get video 获得视频
-- (void)getVideoWithAsset:(PHAsset *)asset completion:(void (^)(AVPlayerItem * playerItem, NSDictionary * info))completion;
-- (void)getVideoWithAsset:(PHAsset *)asset progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler completion:(void (^)(AVPlayerItem *, NSDictionary *))completion;
-
-/// Export video 导出视频 presetName: 预设名字,默认值是AVAssetExportPreset640x480
-- (void)getVideoOutputPathWithAsset:(PHAsset *)asset success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure;
-- (void)getVideoOutputPathWithAsset:(PHAsset *)asset presetName:(NSString *)presetName success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure;
-- (void)getVideoOutputPathWithAsset:(PHAsset *)asset presetName:(NSString *)presetName timeRange:(CMTimeRange)timeRange success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure;
-/// 新的导出视频API,解决iOS14 iCloud视频导出失败的问题,未大量测试,请大家多多测试,有问题群里反馈
-- (void)requestVideoOutputPathWithAsset:(PHAsset *)asset presetName:(NSString *)presetName success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure;
-/// 得到视频原始文件地址
-- (void)requestVideoURLWithAsset:(PHAsset *)asset success:(void (^)(NSURL *videoURL))success failure:(void (^)(NSDictionary* info))failure;
-
-/// Get photo bytes 获得一组照片的大小
-- (void)getPhotosBytesWithArray:(NSArray *)photos completion:(void (^)(NSString *totalBytes))completion;
-
-- (BOOL)isCameraRollAlbum:(PHAssetCollection *)metadata;
-
-/// 检查照片大小是否满足最小要求
-- (BOOL)isPhotoSelectableWithAsset:(PHAsset *)asset;
-
-/// 检查照片能否被选中
-- (BOOL)isAssetCannotBeSelected:(PHAsset *)asset;
-
-/// 修正图片转向
-- (UIImage *)fixOrientation:(UIImage *)aImage;
-
-/// 获取asset的资源类型
-- (TZAssetModelMediaType)getAssetType:(PHAsset *)asset;
-/// 缩放图片至新尺寸
-- (UIImage *)scaleImage:(UIImage *)image toSize:(CGSize)size;
-
-/// 判断asset是否是视频
-- (BOOL)isVideo:(PHAsset *)asset;
-
-/// for TZImagePreviewController
-- (NSString *)getNewTimeFromDurationSecond:(NSInteger)duration;
-
-- (TZAssetModel *)createModelWithAsset:(PHAsset *)asset;
-
-@end
-
-//@interface TZSortDescriptor : NSSortDescriptor
-//
-//@end

+ 0 - 1077
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageManager.m

@@ -1,1077 +0,0 @@
-//
-//  TZImageManager.m
-//  TZImagePickerController
-//
-//  Created by 谭真 on 16/1/4.
-//  Copyright © 2016年 谭真. All rights reserved.
-//
-
-#import "TZImageManager.h"
-#import "TZAssetModel.h"
-#import "TZImagePickerController.h"
-#import <MobileCoreServices/MobileCoreServices.h>
-
-@interface TZImageManager ()
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-@end
-
-@implementation TZImageManager
-
-CGSize AssetGridThumbnailSize;
-CGFloat TZScreenWidth;
-CGFloat TZScreenScale;
-
-static TZImageManager *manager;
-static dispatch_once_t onceToken;
-
-+ (instancetype)manager {
-    dispatch_once(&onceToken, ^{
-        manager = [[self alloc] init];
-        // manager.cachingImageManager = [[PHCachingImageManager alloc] init];
-        // manager.cachingImageManager.allowsCachingHighQualityImages = YES;
-        
-        [manager configTZScreenWidth];
-    });
-    return manager;
-}
-
-+ (void)deallocManager {
-    onceToken = 0;
-    manager = nil;
-}
-
-- (void)setPhotoWidth:(CGFloat)photoWidth {
-    _photoWidth = photoWidth;
-    TZScreenWidth = photoWidth / 2;
-}
-
-- (void)setColumnNumber:(NSInteger)columnNumber {
-    [self configTZScreenWidth];
-
-    _columnNumber = columnNumber;
-    CGFloat margin = 4;
-    CGFloat itemWH = (TZScreenWidth - 2 * margin - 4) / columnNumber - margin;
-    AssetGridThumbnailSize = CGSizeMake(itemWH * TZScreenScale, itemWH * TZScreenScale);
-}
-
-- (void)configTZScreenWidth {
-    TZScreenWidth = [UIScreen mainScreen].bounds.size.width;
-    // 测试发现,如果scale在plus真机上取到3.0,内存会增大特别多。故这里写死成2.0
-    TZScreenScale = 2.0;
-    if (TZScreenWidth > 700) {
-        TZScreenScale = 1.5;
-    }
-}
-
-- (BOOL)isPHAuthorizationStatusLimited {
-    if (@available(iOS 14,*)) {
-        NSInteger status = [PHPhotoLibrary authorizationStatusForAccessLevel:PHAccessLevelReadWrite];
-        if (status == PHAuthorizationStatusLimited) {
-            return YES;
-        }
-    }
-    return NO;
-}
-
-/// Return YES if Authorized 返回YES如果得到了授权
-- (BOOL)authorizationStatusAuthorized {
-    if (self.isPreviewNetworkImage) {
-        return YES;
-    }
-    NSInteger status = [PHPhotoLibrary authorizationStatus];
-    if (status == 0) {
-        /**
-         * 当某些情况下AuthorizationStatus == AuthorizationStatusNotDetermined时,无法弹出系统首次使用的授权alertView,系统应用设置里亦没有相册的设置,此时将无法使用,故作以下操作,弹出系统首次使用的授权alertView
-         */
-        [self requestAuthorizationWithCompletion:nil];
-    }
-    
-    return status == 3;
-}
-
-- (void)requestAuthorizationWithCompletion:(void (^)(void))completion {
-    void (^callCompletionBlock)(void) = ^(){
-        dispatch_async(dispatch_get_main_queue(), ^{
-            if (completion) {
-                completion();
-            }
-        });
-    };
-    
-    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-        [PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
-            callCompletionBlock();
-        }];
-    });
-}
-
-#pragma mark - Get Album
-
-- (void)getCameraRollAlbum:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage needFetchAssets:(BOOL)needFetchAssets completion:(void (^)(TZAlbumModel *model))completion {
-    TZImagePickerConfig *config = [TZImagePickerConfig sharedInstance];
-    config.allowPickingVideo = allowPickingVideo;
-    config.allowPickingImage = allowPickingImage;
-    [self getCameraRollAlbumWithFetchAssets:needFetchAssets completion:completion];
-}
-
-/// Get Album 获得相册/相册数组
-- (void)getCameraRollAlbumWithFetchAssets:(BOOL)needFetchAssets completion:(void (^)(TZAlbumModel *model))completion {
-    __block TZAlbumModel *model;
-    TZImagePickerConfig *config = [TZImagePickerConfig sharedInstance];
-    PHFetchOptions *option = [[PHFetchOptions alloc] init];
-    if (!config.allowPickingVideo) option.predicate = [NSPredicate predicateWithFormat:@"mediaType == %ld", PHAssetMediaTypeImage];
-    if (!config.allowPickingImage) option.predicate = [NSPredicate predicateWithFormat:@"mediaType == %ld",
-                                                PHAssetMediaTypeVideo];
-    // option.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"modificationDate" ascending:self.sortAscendingByModificationDate]];
-    if (!self.sortAscendingByModificationDate) {
-        option.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:self.sortAscendingByModificationDate]];
-    }
-    PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAny options:nil];
-    for (PHAssetCollection *collection in smartAlbums) {
-        // 有可能是PHCollectionList类的的对象,过滤掉
-        if (![collection isKindOfClass:[PHAssetCollection class]]) continue;
-        // 过滤空相册
-        if (collection.estimatedAssetCount <= 0) continue;
-        if ([self isCameraRollAlbum:collection]) {
-            PHFetchResult *fetchResult = [PHAsset fetchAssetsInAssetCollection:collection options:option];
-            model = [self modelWithResult:fetchResult collection:collection isCameraRoll:YES needFetchAssets:needFetchAssets options:option];
-            if (completion) completion(model);
-            break;
-        }
-    }
-}
-
-- (void)getAllAlbums:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage needFetchAssets:(BOOL)needFetchAssets completion:(void (^)(NSArray<TZAlbumModel *> *))completion {
-    TZImagePickerConfig *config = [TZImagePickerConfig sharedInstance];
-    config.allowPickingVideo = allowPickingVideo;
-    config.allowPickingImage = allowPickingImage;
-    [self getAllAlbumsWithFetchAssets:needFetchAssets completion:completion];
-}
-
-- (void)getAllAlbumsWithFetchAssets:(BOOL)needFetchAssets completion:(void (^)(NSArray<TZAlbumModel *> *))completion {
-    TZImagePickerConfig *config = [TZImagePickerConfig sharedInstance];
-    NSMutableArray *albumArr = [NSMutableArray array];
-    PHFetchOptions *option = [[PHFetchOptions alloc] init];
-    if (!config.allowPickingVideo) option.predicate = [NSPredicate predicateWithFormat:@"mediaType == %ld", PHAssetMediaTypeImage];
-    if (!config.allowPickingImage) option.predicate = [NSPredicate predicateWithFormat:@"mediaType == %ld",
-                                                PHAssetMediaTypeVideo];
-    // option.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"modificationDate" ascending:self.sortAscendingByModificationDate]];
-    if (!self.sortAscendingByModificationDate) {
-        option.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:self.sortAscendingByModificationDate]];
-    }
-    // 我的照片流 1.6.10重新加入..
-    PHFetchResult *myPhotoStreamAlbum = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumMyPhotoStream options:nil];
-    PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAny options:nil];
-    PHFetchResult *topLevelUserCollections = [PHCollectionList fetchTopLevelUserCollectionsWithOptions:nil];
-    PHFetchResult *syncedAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumSyncedAlbum options:nil];
-    PHFetchResult *sharedAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumCloudShared options:nil];
-    NSArray *allAlbums = @[myPhotoStreamAlbum,smartAlbums,topLevelUserCollections,syncedAlbums,sharedAlbums];
-    for (PHFetchResult *fetchResult in allAlbums) {
-        for (PHAssetCollection *collection in fetchResult) {
-            // 有可能是PHCollectionList类的的对象,过滤掉
-            if (![collection isKindOfClass:[PHAssetCollection class]]) continue;
-            // 过滤空相册
-            if (collection.estimatedAssetCount <= 0 && ![self isCameraRollAlbum:collection]) continue;
-            PHFetchResult *fetchResult = [PHAsset fetchAssetsInAssetCollection:collection options:option];
-            if (fetchResult.count < 1 && ![self isCameraRollAlbum:collection]) continue;
-            
-            if ([self.pickerDelegate respondsToSelector:@selector(isAlbumCanSelect:result:)]) {
-                if (![self.pickerDelegate isAlbumCanSelect:collection.localizedTitle result:fetchResult]) {
-                    continue;
-                }
-            }
-            
-            if (collection.assetCollectionSubtype == PHAssetCollectionSubtypeSmartAlbumAllHidden) continue;
-            if (collection.assetCollectionSubtype == 1000000201) continue; //『最近删除』相册
-            if ([self isCameraRollAlbum:collection]) {
-                [albumArr insertObject:[self modelWithResult:fetchResult collection:collection isCameraRoll:YES needFetchAssets:needFetchAssets options:option] atIndex:0];
-            } else {
-                [albumArr addObject:[self modelWithResult:fetchResult collection:collection isCameraRoll:NO needFetchAssets:needFetchAssets options:option]];
-            }
-        }
-    }
-    if (completion) {
-        completion(albumArr);
-    }
-}
-
-#pragma mark - Get Assets
-
-/// Get Assets 获得照片数组
-- (void)getAssetsFromFetchResult:(PHFetchResult *)result allowPickingVideo:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage completion:(void (^)(NSArray<TZAssetModel *> *))completion {
-    TZImagePickerConfig *config = [TZImagePickerConfig sharedInstance];
-    config.allowPickingVideo = allowPickingVideo;
-    config.allowPickingImage = allowPickingImage;
-    return [self getAssetsFromFetchResult:result completion:completion];
-}
-
-- (void)getAssetsFromFetchResult:(PHFetchResult *)result completion:(void (^)(NSArray<TZAssetModel *> *))completion {
-    TZImagePickerConfig *config = [TZImagePickerConfig sharedInstance];
-    NSMutableArray *photoArr = [NSMutableArray array];
-    [result enumerateObjectsUsingBlock:^(PHAsset *asset, NSUInteger idx, BOOL * _Nonnull stop) {
-        TZAssetModel *model = [self assetModelWithAsset:asset allowPickingVideo:config.allowPickingVideo allowPickingImage:config.allowPickingImage];
-        if (model) {
-            [photoArr addObject:model];
-        }
-    }];
-    if (completion) completion(photoArr);
-}
-
-///  Get asset at index 获得下标为index的单个照片
-///  if index beyond bounds, return nil in callback 如果索引越界, 在回调中返回 nil
-- (void)getAssetFromFetchResult:(PHFetchResult *)result atIndex:(NSInteger)index allowPickingVideo:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage completion:(void (^)(TZAssetModel *))completion {
-    TZImagePickerConfig *config = [TZImagePickerConfig sharedInstance];
-    config.allowPickingVideo = allowPickingVideo;
-    config.allowPickingImage = allowPickingImage;
-    [self getAssetFromFetchResult:result atIndex:index allowPickingVideo:config.allowPickingVideo allowPickingImage:config.allowPickingImage completion:completion];
-}
-
-- (void)getAssetFromFetchResult:(PHFetchResult *)result atIndex:(NSInteger)index completion:(void (^)(TZAssetModel *))completion {
-    PHAsset *asset;
-    @try {
-        asset = result[index];
-    }
-    @catch (NSException* e) {
-        if (completion) completion(nil);
-        return;
-    }
-    TZImagePickerConfig *config = [TZImagePickerConfig sharedInstance];
-    TZAssetModel *model = [self assetModelWithAsset:asset allowPickingVideo:config.allowPickingVideo allowPickingImage:config.allowPickingImage];
-    if (completion) completion(model);
-}
-
-- (TZAssetModel *)assetModelWithAsset:(PHAsset *)asset allowPickingVideo:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage {
-    BOOL canSelect = YES;
-    if ([self.pickerDelegate respondsToSelector:@selector(isAssetCanSelect:)]) {
-        canSelect = [self.pickerDelegate isAssetCanSelect:asset];
-    }
-    if ([self.pickerDelegate respondsToSelector:@selector(isAssetCanBeDisplayed:)]){
-        canSelect = [self.pickerDelegate isAssetCanBeDisplayed:asset];
-    }
-    
-    if (!canSelect) return nil;
-    
-    TZAssetModel *model;
-    TZAssetModelMediaType type = [self getAssetType:asset];
-    if (!allowPickingVideo && type == TZAssetModelMediaTypeVideo) return nil;
-    if (!allowPickingImage && type == TZAssetModelMediaTypePhoto) return nil;
-    if (!allowPickingImage && type == TZAssetModelMediaTypePhotoGif) return nil;
-    
-    PHAsset *phAsset = (PHAsset *)asset;
-    if (self.hideWhenCanNotSelect) {
-        // 过滤掉尺寸不满足要求的图片
-        if (![self isPhotoSelectableWithAsset:phAsset]) {
-            return nil;
-        }
-    }
-    NSString *timeLength = type == TZAssetModelMediaTypeVideo ? [NSString stringWithFormat:@"%0.0f",phAsset.duration] : @"";
-    timeLength = [self getNewTimeFromDurationSecond:timeLength.integerValue];
-    model = [TZAssetModel modelWithAsset:asset type:type timeLength:timeLength];
-    return model;
-}
-
-- (TZAssetModelMediaType)getAssetType:(PHAsset *)asset {
-    TZAssetModelMediaType type = TZAssetModelMediaTypePhoto;
-    PHAsset *phAsset = (PHAsset *)asset;
-    if (phAsset.mediaType == PHAssetMediaTypeVideo)      type = TZAssetModelMediaTypeVideo;
-    else if (phAsset.mediaType == PHAssetMediaTypeAudio) type = TZAssetModelMediaTypeAudio;
-    else if (phAsset.mediaType == PHAssetMediaTypeImage) {
-        if (@available(iOS 9.1, *)) {
-            // if (asset.mediaSubtypes == PHAssetMediaSubtypePhotoLive) type = TZAssetModelMediaTypeLivePhoto;
-        }
-        // Gif
-        if ([[phAsset valueForKey:@"filename"] hasSuffix:@"GIF"]) {
-            type = TZAssetModelMediaTypePhotoGif;
-        }
-    }
-    return type;
-}
-
-- (NSString *)getNewTimeFromDurationSecond:(NSInteger)duration {
-    NSString *newTime;
-    if (duration < 10) {
-        newTime = [NSString stringWithFormat:@"0:0%zd",duration];
-    } else if (duration < 60) {
-        newTime = [NSString stringWithFormat:@"0:%zd",duration];
-    } else {
-        NSInteger min = duration / 60;
-        NSInteger sec = duration - (min * 60);
-        if (sec < 10) {
-            newTime = [NSString stringWithFormat:@"%zd:0%zd",min,sec];
-        } else {
-            newTime = [NSString stringWithFormat:@"%zd:%zd",min,sec];
-        }
-    }
-    return newTime;
-}
-
-/// Get photo bytes 获得一组照片的大小
-- (void)getPhotosBytesWithArray:(NSArray *)photos completion:(void (^)(NSString *totalBytes))completion {
-    if (!photos || !photos.count) {
-        if (completion) completion(@"0B");
-        return;
-    }
-    __block NSInteger dataLength = 0;
-    __block NSInteger assetCount = 0;
-    for (NSInteger i = 0; i < photos.count; i++) {
-        TZAssetModel *model = photos[i];
-        PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
-        options.resizeMode = PHImageRequestOptionsResizeModeFast;
-        options.networkAccessAllowed = YES;
-        if (model.type == TZAssetModelMediaTypePhotoGif) {
-            options.version = PHImageRequestOptionsVersionOriginal;
-        }
-        [[PHImageManager defaultManager] requestImageDataForAsset:model.asset options:options resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
-            if (model.type != TZAssetModelMediaTypeVideo) dataLength += imageData.length;
-            assetCount ++;
-            if (assetCount >= photos.count) {
-                NSString *bytes = [self getBytesFromDataLength:dataLength];
-                if (completion) completion(bytes);
-            }
-        }];
-    }
-}
-
-- (NSString *)getBytesFromDataLength:(NSInteger)dataLength {
-    NSString *bytes;
-    if (dataLength >= 0.1 * (1024 * 1024)) {
-        bytes = [NSString stringWithFormat:@"%0.1fM",dataLength/1024/1024.0];
-    } else if (dataLength >= 1024) {
-        bytes = [NSString stringWithFormat:@"%0.0fK",dataLength/1024.0];
-    } else {
-        bytes = [NSString stringWithFormat:@"%zdB",dataLength];
-    }
-    return bytes;
-}
-
-#pragma mark - Get Photo
-
-/// Get photo 获得照片本身
-- (PHImageRequestID)getPhotoWithAsset:(PHAsset *)asset completion:(void (^)(UIImage *, NSDictionary *, BOOL isDegraded))completion {
-    return [self getPhotoWithAsset:asset completion:completion progressHandler:nil networkAccessAllowed:YES];
-}
-
-- (PHImageRequestID)getPhotoWithAsset:(PHAsset *)asset photoWidth:(CGFloat)photoWidth completion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion {
-    return [self getPhotoWithAsset:asset photoWidth:photoWidth completion:completion progressHandler:nil networkAccessAllowed:YES];
-}
-
-- (PHImageRequestID)getPhotoWithAsset:(PHAsset *)asset completion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler networkAccessAllowed:(BOOL)networkAccessAllowed {
-    CGFloat fullScreenWidth = TZScreenWidth;
-    if (_photoPreviewMaxWidth > 0 && fullScreenWidth > _photoPreviewMaxWidth) {
-        fullScreenWidth = _photoPreviewMaxWidth;
-    }
-    return [self getPhotoWithAsset:asset photoWidth:fullScreenWidth completion:completion progressHandler:progressHandler networkAccessAllowed:networkAccessAllowed];
-}
-
-- (PHImageRequestID)requestImageDataForAsset:(PHAsset *)asset completion:(void (^)(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info))completion progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler {
-    PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
-    options.progressHandler = ^(double progress, NSError *error, BOOL *stop, NSDictionary *info) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            if (progressHandler) {
-                progressHandler(progress, error, stop, info);
-            }
-        });
-    };
-    options.networkAccessAllowed = YES;
-    options.resizeMode = PHImageRequestOptionsResizeModeFast;
-    int32_t imageRequestID = [[PHImageManager defaultManager] requestImageDataForAsset:asset options:options resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
-        if (completion) completion(imageData,dataUTI,orientation,info);
-    }];
-    return imageRequestID;
-}
-
-- (PHImageRequestID)getPhotoWithAsset:(PHAsset *)asset photoWidth:(CGFloat)photoWidth completion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler networkAccessAllowed:(BOOL)networkAccessAllowed {
-    CGSize imageSize;
-    if (photoWidth < TZScreenWidth && photoWidth < _photoPreviewMaxWidth) {
-        imageSize = AssetGridThumbnailSize;
-    } else {
-        PHAsset *phAsset = (PHAsset *)asset;
-        CGFloat aspectRatio = phAsset.pixelWidth / (CGFloat)phAsset.pixelHeight;
-        CGFloat pixelWidth = photoWidth * TZScreenScale;
-        // 超宽图片
-        if (aspectRatio > 1.8) {
-            pixelWidth = pixelWidth * aspectRatio;
-        }
-        // 超高图片
-        if (aspectRatio < 0.2) {
-            pixelWidth = pixelWidth * 0.5;
-        }
-        CGFloat pixelHeight = pixelWidth / aspectRatio;
-        imageSize = CGSizeMake(pixelWidth, pixelHeight);
-    }
-    
-    // 修复获取图片时出现的瞬间内存过高问题
-    // 下面两行代码,来自hsjcom,他的github是:https://github.com/hsjcom 表示感谢
-    PHImageRequestOptions *option = [[PHImageRequestOptions alloc] init];
-    option.resizeMode = PHImageRequestOptionsResizeModeFast;
-    int32_t imageRequestID = [[PHImageManager defaultManager] requestImageForAsset:asset targetSize:imageSize contentMode:PHImageContentModeAspectFill options:option resultHandler:^(UIImage *result, NSDictionary *info) {
-        BOOL cancelled = [[info objectForKey:PHImageCancelledKey] boolValue];
-        if (!cancelled && result) {
-            result = [self fixOrientation:result];
-            if (completion) completion(result,info,[[info objectForKey:PHImageResultIsDegradedKey] boolValue]);
-        }
-        // Download image from iCloud / 从iCloud下载图片
-        if ([info objectForKey:PHImageResultIsInCloudKey] && !result && networkAccessAllowed) {
-            PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
-            options.progressHandler = ^(double progress, NSError *error, BOOL *stop, NSDictionary *info) {
-                dispatch_async(dispatch_get_main_queue(), ^{
-                    if (progressHandler) {
-                        progressHandler(progress, error, stop, info);
-                    }
-                });
-            };
-            options.networkAccessAllowed = YES;
-            options.resizeMode = PHImageRequestOptionsResizeModeFast;
-            [[PHImageManager defaultManager] requestImageDataForAsset:asset options:options resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
-                UIImage *resultImage = [UIImage imageWithData:imageData];
-                if (![TZImagePickerConfig sharedInstance].notScaleImage) {
-                    resultImage = [self scaleImage:resultImage toSize:imageSize];
-                }
-                if (!resultImage && result) {
-                    resultImage = result;
-                }
-                resultImage = [self fixOrientation:resultImage];
-                if (completion) completion(resultImage,info,NO);
-            }];
-        }
-    }];
-    return imageRequestID;
-}
-
-/// Get postImage / 获取封面图
-- (PHImageRequestID)getPostImageWithAlbumModel:(TZAlbumModel *)model completion:(void (^)(UIImage *))completion {
-    id asset = [model.result lastObject];
-    if (!self.sortAscendingByModificationDate) {
-        asset = [model.result firstObject];
-    }
-    if (!asset) {
-        return -1;
-    }
-    return [[TZImageManager manager] getPhotoWithAsset:asset photoWidth:80 completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) {
-        if (completion) completion(photo);
-    }];
-}
-
-/// Get Original Photo / 获取原图
-- (PHImageRequestID)getOriginalPhotoWithAsset:(PHAsset *)asset completion:(void (^)(UIImage *photo,NSDictionary *info))completion {
-   return [self getOriginalPhotoWithAsset:asset newCompletion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) {
-        if (completion) {
-            completion(photo,info);
-        }
-    }];
-}
-
-- (PHImageRequestID)getOriginalPhotoWithAsset:(PHAsset *)asset newCompletion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion {
-    return [self getOriginalPhotoWithAsset:asset progressHandler:nil newCompletion:completion];
-}
-
-- (PHImageRequestID)getOriginalPhotoWithAsset:(PHAsset *)asset progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler newCompletion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion {
-    PHImageRequestOptions *option = [[PHImageRequestOptions alloc]init];
-    option.networkAccessAllowed = YES;
-    if (progressHandler) {
-        [option setProgressHandler:progressHandler];
-    }
-    option.resizeMode = PHImageRequestOptionsResizeModeFast;
-    return [[PHImageManager defaultManager] requestImageDataForAsset:asset options:option resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
-        BOOL cancelled = [[info objectForKey:PHImageCancelledKey] boolValue];
-        if (!cancelled && imageData) {
-            UIImage *result = [self fixOrientation:[UIImage imageWithData:imageData]];
-            BOOL isDegraded = [[info objectForKey:PHImageResultIsDegradedKey] boolValue];
-            if (completion) completion(result,info,isDegraded);
-        }
-    }];
-}
-
-- (PHImageRequestID)getOriginalPhotoDataWithAsset:(PHAsset *)asset completion:(void (^)(NSData *data,NSDictionary *info,BOOL isDegraded))completion {
-    return [self getOriginalPhotoDataWithAsset:asset progressHandler:nil completion:completion];
-}
-
-- (PHImageRequestID)getOriginalPhotoDataWithAsset:(PHAsset *)asset progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler completion:(void (^)(NSData *data,NSDictionary *info,BOOL isDegraded))completion {
-    PHImageRequestOptions *option = [[PHImageRequestOptions alloc] init];
-    option.networkAccessAllowed = YES;
-    if ([[asset valueForKey:@"filename"] hasSuffix:@"GIF"]) {
-        // if version isn't PHImageRequestOptionsVersionOriginal, the gif may cann't play
-        option.version = PHImageRequestOptionsVersionOriginal;
-    }
-    [option setProgressHandler:progressHandler];
-    option.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
-    return [[PHImageManager defaultManager] requestImageDataForAsset:asset options:option resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
-        BOOL cancelled = [[info objectForKey:PHImageCancelledKey] boolValue];
-        if (!cancelled && imageData) {
-            if (completion) completion(imageData,info,NO);
-        }
-    }];
-}
-
-- (UIImage *)getImageWithVideoURL:(NSURL *)videoURL {
-    AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:videoURL options:nil];
-    if (!asset) {
-        return nil;
-    }
-    AVAssetImageGenerator *generator =[[AVAssetImageGenerator alloc] initWithAsset:asset];
-    generator.appliesPreferredTrackTransform = YES;
-    generator.apertureMode = AVAssetImageGeneratorApertureModeEncodedPixels;
-    
-    CFTimeInterval time = 0.1;
-    CGImageRef imageRef = [generator copyCGImageAtTime:CMTimeMake(time, 60) actualTime:NULL error:nil];
-    UIImage *image = [[UIImage alloc] initWithCGImage:imageRef];
-    CGImageRelease(imageRef);
-    return image;
-}
-
-#pragma mark - Save photo
-
-- (void)savePhotoWithImage:(UIImage *)image completion:(void (^)(PHAsset *asset, NSError *error))completion {
-    [self savePhotoWithImage:image location:nil completion:completion];
-}
-
-- (void)savePhotoWithImage:(UIImage *)image location:(CLLocation *)location completion:(void (^)(PHAsset *asset, NSError *error))completion {
-    __block NSString *localIdentifier = nil;
-    [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
-        PHAssetChangeRequest *request = [PHAssetChangeRequest creationRequestForAssetFromImage:image];
-        localIdentifier = request.placeholderForCreatedAsset.localIdentifier;
-        if (location) {
-            request.location = location;
-        }
-        request.creationDate = [NSDate date];
-    } completionHandler:^(BOOL success, NSError *error) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            if (success && completion && localIdentifier) {
-                [self fetchAssetByIocalIdentifier:localIdentifier retryCount:10 completion:completion];
-            } else {
-                if (error) {
-                    NSLog(@"保存照片出错:%@",error.localizedDescription);
-                }
-                if (completion) {
-                    completion(nil, error);
-                }
-            }
-        });
-    }];
-}
-
-- (void)savePhotoWithImage:(UIImage *)image meta:(NSDictionary *)meta location:(CLLocation *)location completion:(void (^)(PHAsset *asset, NSError *error))completion {
-    NSData *imageData = UIImageJPEGRepresentation(image, 1.0f);
-    CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)imageData, NULL);
-    NSDateFormatter *formater = [[NSDateFormatter alloc] init];
-    [formater setDateFormat:@"yyyy-MM-dd-HH:mm:ss-SSS"];
-    NSString *path = [NSTemporaryDirectory() stringByAppendingFormat:@"image-%@.jpg", [formater stringFromDate:[NSDate date]]];
-    NSURL *tmpURL = [NSURL fileURLWithPath:path];
-    CGImageDestinationRef destination = CGImageDestinationCreateWithURL((__bridge CFURLRef)tmpURL, kUTTypeJPEG, 1, NULL);
-    CGImageDestinationAddImageFromSource(destination, source, 0, (__bridge CFDictionaryRef)meta);
-    CGImageDestinationFinalize(destination);
-    CFRelease(source);
-    CFRelease(destination);
-    
-    __block NSString *localIdentifier = nil;
-    [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
-        PHAssetChangeRequest *request = [PHAssetChangeRequest creationRequestForAssetFromImageAtFileURL:tmpURL];
-        localIdentifier = request.placeholderForCreatedAsset.localIdentifier;
-        if (location) {
-            request.location = location;
-        }
-        request.creationDate = [NSDate date];
-    } completionHandler:^(BOOL success, NSError *error) {
-        [[NSFileManager defaultManager] removeItemAtPath:path error:nil];
-        dispatch_async(dispatch_get_main_queue(), ^{
-            if (success && completion && localIdentifier) {
-                [self fetchAssetByIocalIdentifier:localIdentifier retryCount:10 completion:completion];
-            } else {
-                if (error) {
-                    NSLog(@"保存照片出错:%@",error.localizedDescription);
-                }
-                if (completion) {
-                    completion(nil, error);
-                }
-            }
-        });
-    }];
-}
-
-- (void)fetchAssetByIocalIdentifier:(NSString *)localIdentifier retryCount:(NSInteger)retryCount completion:(void (^)(PHAsset *asset, NSError *error))completion {
-    PHAsset *asset = [[PHAsset fetchAssetsWithLocalIdentifiers:@[localIdentifier] options:nil] firstObject];
-    if (asset || retryCount <= 0) {
-        if (completion) {
-            completion(asset, nil);
-        }
-        return;
-    }
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        [self fetchAssetByIocalIdentifier:localIdentifier retryCount:retryCount - 1 completion:completion];
-    });
-}
-
-#pragma mark - Save video
-
-- (void)saveVideoWithUrl:(NSURL *)url completion:(void (^)(PHAsset *asset, NSError *error))completion {
-    [self saveVideoWithUrl:url location:nil completion:completion];
-}
-
-- (void)saveVideoWithUrl:(NSURL *)url location:(CLLocation *)location completion:(void (^)(PHAsset *asset, NSError *error))completion {
-    __block NSString *localIdentifier = nil;
-    [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
-        PHAssetChangeRequest *request = [PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:url];
-        localIdentifier = request.placeholderForCreatedAsset.localIdentifier;
-        if (location) {
-            request.location = location;
-        }
-        request.creationDate = [NSDate date];
-    } completionHandler:^(BOOL success, NSError *error) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            if (success && completion && localIdentifier) {
-                [self fetchAssetByIocalIdentifier:localIdentifier retryCount:10 completion:completion];
-            } else {
-                if (error) {
-                    NSLog(@"保存视频出错:%@",error.localizedDescription);
-                }
-                if (completion) {
-                    completion(nil, error);
-                }
-            }
-        });
-    }];
-}
-
-#pragma mark - Get Video
-
-/// Get Video / 获取视频
-- (void)getVideoWithAsset:(PHAsset *)asset completion:(void (^)(AVPlayerItem *, NSDictionary *))completion {
-    [self getVideoWithAsset:asset progressHandler:nil completion:completion];
-}
-
-- (void)getVideoWithAsset:(PHAsset *)asset progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler completion:(void (^)(AVPlayerItem *, NSDictionary *))completion {
-    PHVideoRequestOptions *option = [[PHVideoRequestOptions alloc] init];
-    option.networkAccessAllowed = YES;
-    option.progressHandler = ^(double progress, NSError *error, BOOL *stop, NSDictionary *info) {
-        dispatch_async(dispatch_get_main_queue(), ^{
-            if (progressHandler) {
-                progressHandler(progress, error, stop, info);
-            }
-        });
-    };
-    [[PHImageManager defaultManager] requestPlayerItemForVideo:asset options:option resultHandler:^(AVPlayerItem *playerItem, NSDictionary *info) {
-        if (completion) completion(playerItem,info);
-    }];
-}
-
-#pragma mark - Export video
-
-/// Export Video / 导出视频
-- (void)getVideoOutputPathWithAsset:(PHAsset *)asset success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure {
-    [self getVideoOutputPathWithAsset:asset presetName:AVAssetExportPresetMediumQuality success:success failure:failure];
-}
-
-- (void)getVideoOutputPathWithAsset:(PHAsset *)asset presetName:(NSString *)presetName success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure {
-    [self getVideoOutputPathWithAsset:asset presetName:presetName timeRange:kCMTimeRangeZero success:success failure:failure];
-}
-
-- (void)startExportVideoWithVideoAsset:(AVURLAsset *)videoAsset presetName:(NSString *)presetName success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure {
-    [self startExportVideoWithVideoAsset:videoAsset timeRange:kCMTimeRangeZero presetName:presetName success:success failure:failure];
-}
-
-- (void)getVideoOutputPathWithAsset:(PHAsset *)asset presetName:(NSString *)presetName timeRange:(CMTimeRange)timeRange success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure {
-    if (@available(iOS 14.0, *)) {
-        [self requestVideoOutputPathWithAsset:asset presetName:presetName timeRange:timeRange success:success failure:failure];
-        return;
-    }
-    [[PHImageManager defaultManager] requestAVAssetForVideo:asset options:[self getVideoRequestOptions] resultHandler:^(AVAsset* avasset, AVAudioMix* audioMix, NSDictionary* info){
-        // NSLog(@"Info:\n%@",info);
-        AVURLAsset *videoAsset = (AVURLAsset*)avasset;
-        // NSLog(@"AVAsset URL: %@",myAsset.URL);
-        [self startExportVideoWithVideoAsset:videoAsset timeRange:timeRange presetName:presetName success:success failure:failure];
-    }];
-}
-
-- (void)startExportVideoWithVideoAsset:(AVURLAsset *)videoAsset timeRange:(CMTimeRange)timeRange presetName:(NSString *)presetName success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure  {
-    if (!presetName) {
-        presetName = AVAssetExportPresetMediumQuality;
-    }
-    // Find compatible presets by video asset.
-    NSArray *presets = [AVAssetExportSession exportPresetsCompatibleWithAsset:videoAsset];
-    // Begin to compress video
-    // Now we just compress to low resolution if it supports
-    // If you need to upload to the server, but server does't support to upload by streaming,
-    // You can compress the resolution to lower. Or you can support more higher resolution.
-    if ([presets containsObject:presetName]) {
-        AVAssetExportSession *session = [[AVAssetExportSession alloc] initWithAsset:videoAsset presetName:presetName];
-        NSString *outputPath = [self getVideoOutputPath];
-
-        // Optimize for network use.
-        session.shouldOptimizeForNetworkUse = true;
-        if (!CMTimeRangeEqual(timeRange, kCMTimeRangeZero)) {
-            session.timeRange = timeRange;
-        }
-        
-        NSArray *supportedTypeArray = session.supportedFileTypes;
-        if ([supportedTypeArray containsObject:AVFileTypeMPEG4]) {
-            session.outputFileType = AVFileTypeMPEG4;
-        } else if (supportedTypeArray.count == 0) {
-            if (failure) {
-                failure(@"该视频类型暂不支持导出", nil);
-            }
-            NSLog(@"No supported file types 视频类型暂不支持导出");
-            return;
-        } else {
-            session.outputFileType = [supportedTypeArray objectAtIndex:0];
-            if (videoAsset.URL && videoAsset.URL.lastPathComponent) {
-                outputPath = [outputPath stringByReplacingOccurrencesOfString:@".mp4" withString:[NSString stringWithFormat:@"-%@", videoAsset.URL.lastPathComponent]];
-            }
-        }
-        // NSLog(@"video outputPath = %@",outputPath);
-        session.outputURL = [NSURL fileURLWithPath:outputPath];
-        
-        if (![[NSFileManager defaultManager] fileExistsAtPath:[NSHomeDirectory() stringByAppendingFormat:@"/tmp"]]) {
-            [[NSFileManager defaultManager] createDirectoryAtPath:[NSHomeDirectory() stringByAppendingFormat:@"/tmp"] withIntermediateDirectories:YES attributes:nil error:nil];
-        }
-        
-        if ([TZImagePickerConfig sharedInstance].needFixComposition) {
-            AVMutableVideoComposition *videoComposition = [self fixedCompositionWithAsset:videoAsset];
-            if (videoComposition.renderSize.width) {
-                // 修正视频转向
-                session.videoComposition = videoComposition;
-            }
-        }
-
-        // Begin to export video to the output path asynchronously.
-        [session exportAsynchronouslyWithCompletionHandler:^(void) {
-            [self handleVideoExportResult:session outputPath:outputPath success:success failure:failure];
-        }];
-    } else {
-        if (failure) {
-            NSString *errorMessage = [NSString stringWithFormat:@"当前设备不支持该预设:%@", presetName];
-            failure(errorMessage, nil);
-        }
-    }
-}
-
-- (void)requestVideoOutputPathWithAsset:(PHAsset *)asset presetName:(NSString *)presetName success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure {
-    [self requestVideoOutputPathWithAsset:asset presetName:presetName timeRange:kCMTimeRangeZero success:success failure:failure];
-}
-
-- (void)requestVideoOutputPathWithAsset:(PHAsset *)asset presetName:(NSString *)presetName timeRange:(CMTimeRange)timeRange success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure {
-    if (!presetName) {
-        presetName = AVAssetExportPresetMediumQuality;
-    }
-    [[PHImageManager defaultManager] requestExportSessionForVideo:asset options:[self getVideoRequestOptions] exportPreset:presetName resultHandler:^(AVAssetExportSession *_Nullable exportSession, NSDictionary *_Nullable info) {
-        NSString *outputPath = [self getVideoOutputPath];
-        exportSession.outputURL = [NSURL fileURLWithPath:outputPath];
-        exportSession.shouldOptimizeForNetworkUse = NO;
-        exportSession.outputFileType = AVFileTypeMPEG4;
-        if (!CMTimeRangeEqual(timeRange, kCMTimeRangeZero)) {
-            exportSession.timeRange = timeRange;
-        }
-        [exportSession exportAsynchronouslyWithCompletionHandler:^{
-            [self handleVideoExportResult:exportSession outputPath:outputPath success:success failure:failure];
-        }];
-    }];
-}
-
-- (void)requestVideoURLWithAsset:(PHAsset *)asset success:(void (^)(NSURL *videoURL))success failure:(void (^)(NSDictionary* info))failure {
-    [[PHImageManager defaultManager] requestAVAssetForVideo:asset options:[self getVideoRequestOptions] resultHandler:^(AVAsset* avasset, AVAudioMix* audioMix, NSDictionary* info){
-        // NSLog(@"AVAsset URL: %@",myAsset.URL);
-        if ([avasset isKindOfClass:[AVURLAsset class]]) {
-            NSURL *url = [(AVURLAsset *)avasset URL];
-            if (success) {
-                success(url);
-            }
-        } else if (failure) {
-            failure(info);
-        }
-    }];
-}
-
-- (void)handleVideoExportResult:(AVAssetExportSession *)session outputPath:(NSString *)outputPath success:(void (^)(NSString *outputPath))success failure:(void (^)(NSString *errorMessage, NSError *error))failure {
-    dispatch_async(dispatch_get_main_queue(), ^{
-        switch (session.status) {
-            case AVAssetExportSessionStatusUnknown: {
-                NSLog(@"AVAssetExportSessionStatusUnknown");
-            }  break;
-            case AVAssetExportSessionStatusWaiting: {
-                NSLog(@"AVAssetExportSessionStatusWaiting");
-            }  break;
-            case AVAssetExportSessionStatusExporting: {
-                NSLog(@"AVAssetExportSessionStatusExporting");
-            }  break;
-            case AVAssetExportSessionStatusCompleted: {
-                NSLog(@"AVAssetExportSessionStatusCompleted");
-                if (success) {
-                    success(outputPath);
-                }
-            }  break;
-            case AVAssetExportSessionStatusFailed: {
-                NSLog(@"AVAssetExportSessionStatusFailed");
-                if (failure) {
-                    failure(@"视频导出失败", session.error);
-                }
-            }  break;
-            case AVAssetExportSessionStatusCancelled: {
-                NSLog(@"AVAssetExportSessionStatusCancelled");
-                if (failure) {
-                    failure(@"导出任务已被取消", nil);
-                }
-            }  break;
-            default: break;
-        }
-    });
-}
-
-- (PHVideoRequestOptions *)getVideoRequestOptions {
-    PHVideoRequestOptions* options = [[PHVideoRequestOptions alloc] init];
-    options.deliveryMode = PHVideoRequestOptionsDeliveryModeAutomatic;
-    options.networkAccessAllowed = YES;
-    return options;
-}
-
-- (NSString *)getVideoOutputPath {
-    NSDateFormatter *formater = [[NSDateFormatter alloc] init];
-    [formater setDateFormat:@"yyyy-MM-dd-HH-mm-ss-SSS"];
-    NSString *outputPath = [NSHomeDirectory() stringByAppendingFormat:@"/tmp/video-%@-%d.mp4", [formater stringFromDate:[NSDate date]], arc4random_uniform(10000000)];
-    return outputPath;
-}
-
-- (BOOL)isCameraRollAlbum:(PHAssetCollection *)metadata {
-    NSString *versionStr = [[UIDevice currentDevice].systemVersion stringByReplacingOccurrencesOfString:@"." withString:@""];
-    if (versionStr.length <= 1) {
-        versionStr = [versionStr stringByAppendingString:@"00"];
-    } else if (versionStr.length <= 2) {
-        versionStr = [versionStr stringByAppendingString:@"0"];
-    }
-    CGFloat version = versionStr.floatValue;
-    // 目前已知8.0.0 ~ 8.0.2系统,拍照后的图片会保存在最近添加中
-    if (version >= 800 && version <= 802) {
-        return ((PHAssetCollection *)metadata).assetCollectionSubtype == PHAssetCollectionSubtypeSmartAlbumRecentlyAdded;
-    } else {
-        return ((PHAssetCollection *)metadata).assetCollectionSubtype == PHAssetCollectionSubtypeSmartAlbumUserLibrary;
-    }
-}
-
-/// 检查照片大小是否满足最小要求
-- (BOOL)isPhotoSelectableWithAsset:(PHAsset *)asset {
-    CGSize photoSize = CGSizeMake(asset.pixelWidth, asset.pixelHeight);
-    if (self.minPhotoWidthSelectable > photoSize.width || self.minPhotoHeightSelectable > photoSize.height) {
-        return NO;
-    }
-    return YES;
-}
-
-/// 检查照片能否被选中
-- (BOOL)isAssetCannotBeSelected:(PHAsset *)asset {
-    if ([self.pickerDelegate respondsToSelector:@selector(isAssetCanBeSelected:)]) {
-        BOOL canSelectAsset = [self.pickerDelegate isAssetCanBeSelected:asset];
-        return !canSelectAsset;
-    }
-    return NO;
-}
-
-#pragma mark - Private Method
-
-- (TZAlbumModel *)modelWithResult:(PHFetchResult *)result collection:(PHAssetCollection *)collection isCameraRoll:(BOOL)isCameraRoll needFetchAssets:(BOOL)needFetchAssets options:(PHFetchOptions *)options {
-    TZAlbumModel *model = [[TZAlbumModel alloc] init];
-    [model setResult:result needFetchAssets:needFetchAssets];
-    model.name = collection.localizedTitle;
-    model.collection = collection;
-    model.options = options;
-    model.isCameraRoll = isCameraRoll;
-    model.count = result.count;
-    return model;
-}
-
-/// 缩放图片至新尺寸
-- (UIImage *)scaleImage:(UIImage *)image toSize:(CGSize)size {
-    if (image.size.width > size.width) {
-        UIGraphicsBeginImageContext(size);
-        [image drawInRect:CGRectMake(0, 0, size.width, size.height)];
-        UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
-        UIGraphicsEndImageContext();
-        return newImage;
-        
-        /* 好像不怎么管用:https://mp.weixin.qq.com/s/CiqMlEIp1Ir2EJSDGgMooQ
-        CGFloat maxPixelSize = MAX(size.width, size.height);
-        CGImageSourceRef sourceRef = CGImageSourceCreateWithData((__bridge CFDataRef)UIImageJPEGRepresentation(image, 0.9), nil);
-        NSDictionary *options = @{(__bridge id)kCGImageSourceCreateThumbnailFromImageAlways:(__bridge id)kCFBooleanTrue,
-                                  (__bridge id)kCGImageSourceThumbnailMaxPixelSize:[NSNumber numberWithFloat:maxPixelSize]
-                                  };
-        CGImageRef imageRef = CGImageSourceCreateImageAtIndex(sourceRef, 0, (__bridge CFDictionaryRef)options);
-        UIImage *newImage = [UIImage imageWithCGImage:imageRef scale:2 orientation:image.imageOrientation];
-        CGImageRelease(imageRef);
-        CFRelease(sourceRef);
-        return newImage;
-         */
-    } else {
-        return image;
-    }
-}
-
-/// 判断asset是否是视频
-- (BOOL)isVideo:(PHAsset *)asset {
-    return asset.mediaType == PHAssetMediaTypeVideo;
-}
-
-- (TZAssetModel *)createModelWithAsset:(PHAsset *)asset {
-    TZAssetModelMediaType type = [[TZImageManager manager] getAssetType:asset];
-    NSString *timeLength = type == TZAssetModelMediaTypeVideo ? [NSString stringWithFormat:@"%0.0f",asset.duration] : @"";
-    timeLength = [[TZImageManager manager] getNewTimeFromDurationSecond:timeLength.integerValue];
-    TZAssetModel *model = [TZAssetModel modelWithAsset:asset type:type timeLength:timeLength];
-    return model;
-}
-
-/// 获取优化后的视频转向信息
-- (AVMutableVideoComposition *)fixedCompositionWithAsset:(AVAsset *)videoAsset {
-    AVMutableVideoComposition *videoComposition = [AVMutableVideoComposition videoComposition];
-    // 视频转向
-    int degrees = [self degressFromVideoFileWithAsset:videoAsset];
-    if (degrees != 0) {
-        CGAffineTransform translateToCenter;
-        CGAffineTransform mixedTransform;
-        videoComposition.frameDuration = CMTimeMake(1, 30);
-        
-        NSArray *tracks = [videoAsset tracksWithMediaType:AVMediaTypeVideo];
-        AVAssetTrack *videoTrack = [tracks objectAtIndex:0];
-        
-        AVMutableVideoCompositionInstruction *roateInstruction = [AVMutableVideoCompositionInstruction videoCompositionInstruction];
-        roateInstruction.timeRange = CMTimeRangeMake(kCMTimeZero, [videoAsset duration]);
-        AVMutableVideoCompositionLayerInstruction *roateLayerInstruction = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:videoTrack];
-        
-        if (degrees == 90) {
-            // 顺时针旋转90°
-            translateToCenter = CGAffineTransformMakeTranslation(videoTrack.naturalSize.height, 0.0);
-            mixedTransform = CGAffineTransformRotate(translateToCenter,M_PI_2);
-            videoComposition.renderSize = CGSizeMake(videoTrack.naturalSize.height,videoTrack.naturalSize.width);
-            [roateLayerInstruction setTransform:mixedTransform atTime:kCMTimeZero];
-        } else if(degrees == 180){
-            // 顺时针旋转180°
-            translateToCenter = CGAffineTransformMakeTranslation(videoTrack.naturalSize.width, videoTrack.naturalSize.height);
-            mixedTransform = CGAffineTransformRotate(translateToCenter,M_PI);
-            videoComposition.renderSize = CGSizeMake(videoTrack.naturalSize.width,videoTrack.naturalSize.height);
-            [roateLayerInstruction setTransform:mixedTransform atTime:kCMTimeZero];
-        } else if(degrees == 270){
-            // 顺时针旋转270°
-            translateToCenter = CGAffineTransformMakeTranslation(0.0, videoTrack.naturalSize.width);
-            mixedTransform = CGAffineTransformRotate(translateToCenter,M_PI_2*3.0);
-            videoComposition.renderSize = CGSizeMake(videoTrack.naturalSize.height,videoTrack.naturalSize.width);
-            [roateLayerInstruction setTransform:mixedTransform atTime:kCMTimeZero];
-        }
-        
-        roateInstruction.layerInstructions = @[roateLayerInstruction];
-        // 加入视频方向信息
-        videoComposition.instructions = @[roateInstruction];
-    }
-    return videoComposition;
-}
-
-/// 获取视频角度
-- (int)degressFromVideoFileWithAsset:(AVAsset *)asset {
-    int degress = 0;
-    NSArray *tracks = [asset tracksWithMediaType:AVMediaTypeVideo];
-    if([tracks count] > 0) {
-        AVAssetTrack *videoTrack = [tracks objectAtIndex:0];
-        CGAffineTransform t = videoTrack.preferredTransform;
-        if(t.a == 0 && t.b == 1.0 && t.c == -1.0 && t.d == 0){
-            // Portrait
-            degress = 90;
-        } else if(t.a == 0 && t.b == -1.0 && t.c == 1.0 && t.d == 0){
-            // PortraitUpsideDown
-            degress = 270;
-        } else if(t.a == 1.0 && t.b == 0 && t.c == 0 && t.d == 1.0){
-            // LandscapeRight
-            degress = 0;
-        } else if(t.a == -1.0 && t.b == 0 && t.c == 0 && t.d == -1.0){
-            // LandscapeLeft
-            degress = 180;
-        }
-    }
-    return degress;
-}
-
-/// 修正图片转向
-- (UIImage *)fixOrientation:(UIImage *)aImage {
-    if (!self.shouldFixOrientation) return aImage;
-    
-    // No-op if the orientation is already correct
-    if (aImage.imageOrientation == UIImageOrientationUp)
-        return aImage;
-    
-    // We need to calculate the proper transformation to make the image upright.
-    // We do it in 2 steps: Rotate if Left/Right/Down, and then flip if Mirrored.
-    CGAffineTransform transform = CGAffineTransformIdentity;
-    
-    switch (aImage.imageOrientation) {
-        case UIImageOrientationDown:
-        case UIImageOrientationDownMirrored:
-            transform = CGAffineTransformTranslate(transform, aImage.size.width, aImage.size.height);
-            transform = CGAffineTransformRotate(transform, M_PI);
-            break;
-            
-        case UIImageOrientationLeft:
-        case UIImageOrientationLeftMirrored:
-            transform = CGAffineTransformTranslate(transform, aImage.size.width, 0);
-            transform = CGAffineTransformRotate(transform, M_PI_2);
-            break;
-            
-        case UIImageOrientationRight:
-        case UIImageOrientationRightMirrored:
-            transform = CGAffineTransformTranslate(transform, 0, aImage.size.height);
-            transform = CGAffineTransformRotate(transform, -M_PI_2);
-            break;
-        default:
-            break;
-    }
-    
-    switch (aImage.imageOrientation) {
-        case UIImageOrientationUpMirrored:
-        case UIImageOrientationDownMirrored:
-            transform = CGAffineTransformTranslate(transform, aImage.size.width, 0);
-            transform = CGAffineTransformScale(transform, -1, 1);
-            break;
-            
-        case UIImageOrientationLeftMirrored:
-        case UIImageOrientationRightMirrored:
-            transform = CGAffineTransformTranslate(transform, aImage.size.height, 0);
-            transform = CGAffineTransformScale(transform, -1, 1);
-            break;
-        default:
-            break;
-    }
-    
-    // Now we draw the underlying CGImage into a new context, applying the transform
-    // calculated above.
-    CGContextRef ctx = CGBitmapContextCreate(NULL, aImage.size.width, aImage.size.height,
-                                             CGImageGetBitsPerComponent(aImage.CGImage), 0,
-                                             CGImageGetColorSpace(aImage.CGImage),
-                                             CGImageGetBitmapInfo(aImage.CGImage));
-    CGContextConcatCTM(ctx, transform);
-    switch (aImage.imageOrientation) {
-        case UIImageOrientationLeft:
-        case UIImageOrientationLeftMirrored:
-        case UIImageOrientationRight:
-        case UIImageOrientationRightMirrored:
-            // Grr...
-            CGContextDrawImage(ctx, CGRectMake(0,0,aImage.size.height,aImage.size.width), aImage.CGImage);
-            break;
-            
-        default:
-            CGContextDrawImage(ctx, CGRectMake(0,0,aImage.size.width,aImage.size.height), aImage.CGImage);
-            break;
-    }
-    
-    // And now we just create a new UIImage from the drawing context
-    CGImageRef cgimg = CGBitmapContextCreateImage(ctx);
-    UIImage *img = [UIImage imageWithCGImage:cgimg];
-    CGContextRelease(ctx);
-    CGImageRelease(cgimg);
-    return img;
-}
-
-#pragma clang diagnostic pop
-
-@end
-
-
-//@implementation TZSortDescriptor
-//
-//- (id)reversedSortDescriptor {
-//    return [NSNumber numberWithBool:![TZImageManager manager].sortAscendingByModificationDate];
-//}
-//
-//@end

BIN
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/MMVideoPreviewPlay@2x.png


BIN
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/MMVideoPreviewPlayHL@2x.png


BIN
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/VideoSendIcon@2x.png


BIN
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/addMore@2x.png


+ 0 - 26
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/ar.lproj/Localizable.strings

@@ -1,26 +0,0 @@
-"KEY"                     = "阿拉伯语";
-"OK"                      = "حسنا";
-"Back"                    = "الى الخلف";
-"Done"                    = "فعله";
-"Edit"                    = "تعديل";
-"Sorry"                   = "آسف";
-"Cancel"                  = "إلغاء";
-"Setting"                 = "ضبط";
-"Photos"                  = "الصور";
-"Videos"                  = "أشرطة فيديو";
-"Preview"                 = "معاينة";
-"Full image"              = "الصورة كاملة";
-"Processing..."           = "معالجة...";
-"No Photos or Videos"     = "لا توجد صور أو مقاطع فيديو";
-"Synchronizing photos from iCloud" = "مزامنة الصور من iCloud";
-"iCloud sync failed"    = "iCloud فشلت المزامنة";
-"Can not use camera"      = "لا يمكن استخدام الكاميرا";
-"Can not choose both video and photo" = "لا يمكن اختيار كل من الفيديو والصور";
-"Can not choose both photo and GIF" = "لا يمكن اختيار كل من الصور و GIF";
-"Select the video when in multi state, we will handle the video as a photo" = "حدد مقطع الفيديو عندما يكون في حالة متعددة، وسنعمل على معالجة مقطع الفيديو كصورة";
-"Can not jump to the privacy settings page, please go to the settings page by self, thank you" = "إذا تعذّر الانتقال إلى صفحة \"إعدادات الخصوصية\"، فيرجى الانتقال إلى صفحة \"الإعدادات\" بنفسك، شكرًا لك";
-"Select a maximum of %zd photos" = "حدد فقط ما يصل إلى %zd صورة";
-"Select a minimum of %zd photos" = "الرجاء تحديد %zd صورة على الأقل";
-"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "السماح لـ %@ بالوصول إلى الألبوم في \"الإعدادات > الخصوصية > الصور\"";
-"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "الرجاء السماح لـ %@ بالوصول إلى الكاميرا في \"الإعدادات > الخصوصية > الكاميرا\"";
-"Selected for %ld seconds" = "محدد لمدة %ld ثانية";

+ 0 - 26
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/de.lproj/Localizable.strings

@@ -1,26 +0,0 @@
-"KEY"                     = "德语";
-"OK"                      = "OK";
-"Back"                    = "Zurück";
-"Done"                    = "Erledigt";
-"Edit"                    = "Bearbeiten";
-"Sorry"                   = "Es tut uns leid";
-"Cancel"                  = "Stornieren";
-"Setting"                 = "Rahmen";
-"Photos"                  = "Fotos";
-"Videos"                  = "Videos";
-"Preview"                 = "Vorschau";
-"Full image"              = "Vollbild";
-"Processing..."           = "Wird bearbeitet...";
-"No Photos or Videos"     = "Keine Fotos oder Videos";
-"Synchronizing photos from iCloud" = "Fotos aus iCloud synchronisieren";
-"iCloud sync failed"    = "iCloud Synchronisierung fehlgeschlagen";
-"Can not use camera"      = "Kann die Kamera nicht benutzen";
-"Can not choose both video and photo" = "Video und Foto können nicht ausgewählt werden";
-"Can not choose both photo and GIF" = "Foto und GIF können nicht ausgewählt werden";
-"Select the video when in multi state, we will handle the video as a photo" = "Wenn Sie das Video im Multi-Status auswählen, wird es als Foto behandelt";
-"Can not jump to the privacy settings page, please go to the settings page by self, thank you" = "Sie können nicht zur Seite mit den Datenschutz-Einstellungen springen; bitte navigieren Sie selbst zur Einstellungsseite. Vielen Dank.";
-"Select a maximum of %zd photos" = "Wählen Sie maximal %zd Bilder aus";
-"Select a minimum of %zd photos" = "Bitte wählen Sie mindestens %zd Fotos aus";
-"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "Erlauben Sie %@ den Zugriff auf Ihr Album unter: „Einstellungen > Datenschutz > Fotos“";
-"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "Erlauben Sie %@ den Zugriff auf Ihre Kamera unter: „Einstellungen > Datenschutz > Kamera“";
-"Selected for %ld seconds" = "Ausgewählt für %ld Sekunden";

BIN
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/en.lproj/Localizable.strings


+ 0 - 26
Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.bundle/es.lproj/Localizable.strings

@@ -1,26 +0,0 @@
-"KEY"                     = "西班牙语";
-"OK"                      = "DE ACUERDO";
-"Back"                    = "Espalda";
-"Done"                    = "Hecho";
-"Edit"                    = "επεξεργασία";
-"Sorry"                   = "Lo siento";
-"Cancel"                  = "Cancelar";
-"Setting"                 = "Ajuste";
-"Photos"                  = "Las fotos";
-"Videos"                  = "Videos";
-"Preview"                 = "Avance";
-"Full image"              = "Imagen completa";
-"Processing..."           = "Tratamiento...";
-"No Photos or Videos"     = "No hay fotos o videos";
-"Synchronizing photos from iCloud" = "Sincronizando fotos desde iCloud";
-"iCloud sync failed"    = "la sincronización falló";
-"Can not use camera"      = "No puedo usar la camara";
-"Can not choose both video and photo" = "No se puede elegir tanto el video como la foto.";
-"Can not choose both photo and GIF" = "No se puede elegir tanto foto como GIF";
-"Select the video when in multi state, we will handle the video as a photo" = "Seleccione el vídeo en estado múltiple, trataremos el vídeo como una fotografía";
-"Can not jump to the privacy settings page, please go to the settings page by self, thank you" = "No se puede saltar a la página de ajustes de privacidad, vaya a la página de ajustes manualmente, muchas gracias";
-"Select a maximum of %zd photos" = "Seleccione solamente hasta %zd imágenes";
-"Select a minimum of %zd photos" = "Seleccione al menos %zd fotografías";
-"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "Permita que %@ acceda a su galería en \"Ajustes > Privacidad > Fotografías\"";
-"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "Permita que %@ acceda a su cámara en \"Ajustes > Privacidad > Cámara\"";
-"Selected for %ld seconds" = "Seleccionado para %ld segundos";

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff